Function: ispell-pdict-save

ispell-pdict-save is an autoloaded, interactive and byte-compiled function defined in ispell.el.gz.

Signature

(ispell-pdict-save &optional NO-QUERY FORCE-SAVE)

Documentation

Check to see if the personal dictionary has been modified.

If so, ask if it needs to be saved. If NO-QUERY is non-nil, save the personal dictionary without asking. Interactively, if ispell-silently-savep is non-nil, don't ask. If FORCE-SAVE is non-nil, suggest to save the personal dictionary even if not modified; this always happens interactively.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/ispell.el.gz
;; Global ispell-pdict-modified-p is set by ispell-command-loop and
;; tracks changes in the dictionary.  The global may either be
;; a value or a list, whose value is the state of whether the
;; dictionary needs to be saved.

;;;###autoload
(defun ispell-pdict-save (&optional no-query force-save)
  "Check to see if the personal dictionary has been modified.
If so, ask if it needs to be saved.
If NO-QUERY is non-nil, save the personal dictionary without asking.
Interactively, if `ispell-silently-savep' is non-nil, don't ask.
If FORCE-SAVE is non-nil, suggest to save the personal dictionary even
if not modified; this always happens interactively."
  (interactive (list ispell-silently-savep t))
  (if (and ispell-pdict-modified-p (listp ispell-pdict-modified-p))
      (setq ispell-pdict-modified-p (car ispell-pdict-modified-p)))
  (when (and (or ispell-pdict-modified-p force-save)
	     (or no-query
		 (y-or-n-p "Personal dictionary modified.  Save? ")))
    (ispell-send-string "#\n")	; save dictionary
    (message "Personal dictionary saved."))
  ;; unassert variable, even if not saved to avoid questioning.
  (setq ispell-pdict-modified-p nil))