Changeset 4079 for trunk/lisp/textmodes/ispell.el
- Timestamp:
- 05/13/06 11:31:18 (3 years ago)
- Files:
-
- trunk/lisp/textmodes/ispell.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/textmodes/ispell.el
r4058 r4079 2608 2608 nil t) 2609 2609 current-prefix-arg)) 2610 (unless arg (ispell-buffer-local-dict ))2610 (unless arg (ispell-buffer-local-dict 'no-reload)) 2611 2611 (if (equal dict "default") (setq dict nil)) 2612 2612 ;; This relies on completing-read's bug of returning "" for no match 2613 2613 (cond ((equal dict "") 2614 (ispell-internal-change-dictionary) 2614 2615 (message "Using %s dictionary" 2615 2616 (or ispell-local-dictionary ispell-dictionary "default"))) 2616 2617 ((equal dict (or ispell-local-dictionary 2617 2618 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) 2619 2622 (and (interactive-p) 2620 2623 (message "No change, using %s dictionary" dict))) … … 2635 2638 2636 2639 (defun ispell-internal-change-dictionary () 2637 "Update the dictionary a ctually used by Ispell.2640 "Update the dictionary and the personal dictionary used by Ispell. 2638 2641 This may kill the Ispell process; if so, 2639 2642 a 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)) 2642 2647 (ispell-kill-ispell t) 2643 (setq ispell-current-dictionary dict)))) 2648 (setq ispell-current-dictionary dict 2649 ispell-current-personal-dictionary pdict)))) 2644 2650 2645 2651 ;;; Spelling of comments are checked when ispell-check-comments is non-nil. … … 3668 3674 ;;; Can kill the current ispell process 3669 3675 3670 (defun ispell-buffer-local-dict ( )3676 (defun ispell-buffer-local-dict (&optional no-reload) 3671 3677 "Initializes local dictionary and local personal dictionary. 3678 If optional NO-RELOAD is non-nil, do not make any dictionary reloading. 3672 3679 When a dictionary is defined in the buffer (see variable 3673 3680 `ispell-dictionary-keyword'), it will override the local setting … … 3696 3703 (setq ispell-local-pdict 3697 3704 (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))) 3704 3708 3705 3709
