Show
Ignore:
Timestamp:
05/13/06 11:31:18 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/textmodes/ispell.el

    r4058 r4079  
    26082608          nil t) 
    26092609         current-prefix-arg)) 
    2610   (unless arg (ispell-buffer-local-dict)) 
     2610  (unless arg (ispell-buffer-local-dict 'no-reload)) 
    26112611  (if (equal dict "default") (setq dict nil)) 
    26122612  ;; This relies on completing-read's bug of returning "" for no match 
    26132613  (cond ((equal dict "") 
     2614         (ispell-internal-change-dictionary) 
    26142615         (message "Using %s dictionary" 
    26152616                  (or ispell-local-dictionary ispell-dictionary "default"))) 
    26162617        ((equal dict (or ispell-local-dictionary 
    26172618                         ispell-dictionary "default")) 
    2618          ;; Specified dictionary is the default already.  No-op 
     2619         ;; Specified dictionary is the default already. Could reload 
     2620         ;; the dictionaries if needed. 
     2621         (ispell-internal-change-dictionary) 
    26192622         (and (interactive-p) 
    26202623              (message "No change, using %s dictionary" dict))) 
     
    26352638 
    26362639(defun ispell-internal-change-dictionary () 
    2637   "Update the dictionary actually used by Ispell. 
     2640  "Update the dictionary and the personal dictionary used by Ispell. 
    26382641This may kill the Ispell process; if so, 
    26392642a new one will be started when needed." 
    2640   (let ((dict (or ispell-local-dictionary ispell-dictionary))) 
    2641     (unless (equal ispell-current-dictionary dict) 
     2643  (let ((dict (or ispell-local-dictionary ispell-dictionary)) 
     2644        (pdict (or ispell-local-pdict ispell-personal-dictionary))) 
     2645    (unless (and (equal ispell-current-dictionary dict) 
     2646                 (equal ispell-current-personal-dictionary pdict)) 
    26422647      (ispell-kill-ispell t) 
    2643       (setq ispell-current-dictionary dict)))) 
     2648      (setq ispell-current-dictionary dict 
     2649            ispell-current-personal-dictionary pdict)))) 
    26442650 
    26452651;;; Spelling of comments are checked when ispell-check-comments is non-nil. 
     
    36683674;;; Can kill the current ispell process 
    36693675 
    3670 (defun ispell-buffer-local-dict (
     3676(defun ispell-buffer-local-dict (&optional no-reload
    36713677  "Initializes local dictionary and local personal dictionary. 
     3678If optional NO-RELOAD is non-nil, do not make any dictionary reloading. 
    36723679When a dictionary is defined in the buffer (see variable 
    36733680`ispell-dictionary-keyword'), it will override the local setting 
     
    36963703                (setq ispell-local-pdict 
    36973704                      (match-string-no-properties 1))))))) 
    3698   ;; Reload if new personal dictionary defined. 
    3699   (if (not (equal ispell-current-personal-dictionary 
    3700                   (or ispell-local-pdict ispell-personal-dictionary))) 
    3701       (ispell-kill-ispell t)) 
    3702   ;; Reload if new dictionary defined. 
    3703   (ispell-internal-change-dictionary)) 
     3705  (unless no-reload 
     3706    ;; Reload if new dictionary (maybe the personal one) defined. 
     3707    (ispell-internal-change-dictionary))) 
    37043708 
    37053709