diff options
| -rw-r--r-- | lisp/textmodes/ispell.el | 55 |
1 files changed, 10 insertions, 45 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index a6dd9058a22..6a28db624d5 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -833,22 +833,10 @@ See `ispell-buffer-with-debug' for an example of use." | |||
| 833 | ;; Redo menu when loading ispell to get dictionary modifications | 833 | ;; Redo menu when loading ispell to get dictionary modifications |
| 834 | (setq ispell-menu-map nil) | 834 | (setq ispell-menu-map nil) |
| 835 | 835 | ||
| 836 | ;;;###autoload | ||
| 837 | (defvar ispell-menu-xemacs nil | ||
| 838 | "Spelling menu for XEmacs. | ||
| 839 | If nil when package is loaded, a standard menu will be set, | ||
| 840 | and added as a submenu of the \"Edit\" menu.") | ||
| 841 | |||
| 842 | ;; Break out XEmacs menu and split into several calls to avoid having | ||
| 843 | ;; long lines in loaddefs.el. Detect need off following constant. | ||
| 844 | |||
| 845 | ;;; Set up dictionary | 836 | ;;; Set up dictionary |
| 846 | ;;;###autoload | 837 | ;;;###autoload |
| 847 | (defvar ispell-menu-map-needed | 838 | (defvar ispell-menu-map-needed |
| 848 | ;; only needed when not version 18 and not XEmacs. | 839 | (unless ispell-menu-map 'reload)) |
| 849 | (and (not ispell-menu-map) | ||
| 850 | (not (featurep 'xemacs)) | ||
| 851 | 'reload)) | ||
| 852 | 840 | ||
| 853 | (defvar ispell-library-directory (condition-case () | 841 | (defvar ispell-library-directory (condition-case () |
| 854 | (ispell-check-version) | 842 | (ispell-check-version) |
| @@ -1932,32 +1920,20 @@ quit spell session exited." | |||
| 1932 | (cond ((eq poss t) | 1920 | (cond ((eq poss t) |
| 1933 | (or quietly | 1921 | (or quietly |
| 1934 | (message "%s is correct" | 1922 | (message "%s is correct" |
| 1935 | (funcall ispell-format-word-function word))) | 1923 | (funcall ispell-format-word-function word)))) |
| 1936 | (and (featurep 'xemacs) | ||
| 1937 | (extent-at start) | ||
| 1938 | (and (fboundp 'delete-extent) | ||
| 1939 | (delete-extent (extent-at start))))) | ||
| 1940 | ((stringp poss) | 1924 | ((stringp poss) |
| 1941 | (or quietly | 1925 | (or quietly |
| 1942 | (message "%s is correct because of root %s" | 1926 | (message "%s is correct because of root %s" |
| 1943 | (funcall ispell-format-word-function word) | 1927 | (funcall ispell-format-word-function word) |
| 1944 | (funcall ispell-format-word-function poss))) | 1928 | (funcall ispell-format-word-function poss)))) |
| 1945 | (and (featurep 'xemacs) | ||
| 1946 | (extent-at start) | ||
| 1947 | (and (fboundp 'delete-extent) | ||
| 1948 | (delete-extent (extent-at start))))) | ||
| 1949 | ((null poss) | 1929 | ((null poss) |
| 1950 | (message "Error checking word %s using %s with %s dictionary" | 1930 | (message "Error checking word %s using %s with %s dictionary" |
| 1951 | (funcall ispell-format-word-function word) | 1931 | (funcall ispell-format-word-function word) |
| 1952 | (file-name-nondirectory ispell-program-name) | 1932 | (file-name-nondirectory ispell-program-name) |
| 1953 | (or ispell-current-dictionary "default"))) | 1933 | (or ispell-current-dictionary "default"))) |
| 1954 | (ispell-check-only ; called from ispell minor mode. | 1934 | (ispell-check-only ; called from ispell minor mode. |
| 1955 | (if (fboundp 'make-extent) | 1935 | (progn |
| 1956 | (if (fboundp 'set-extent-property) | 1936 | (beep) |
| 1957 | (let ((ext (make-extent start end))) | ||
| 1958 | (set-extent-property ext 'face ispell-highlight-face) | ||
| 1959 | (set-extent-property ext 'priority 2000))) | ||
| 1960 | (beep) | ||
| 1961 | (message "%s is incorrect" | 1937 | (message "%s is incorrect" |
| 1962 | (funcall ispell-format-word-function word)))) | 1938 | (funcall ispell-format-word-function word)))) |
| 1963 | (t ; prompt for correct word. | 1939 | (t ; prompt for correct word. |
| @@ -2890,10 +2866,7 @@ Keeps argument list for future Ispell invocations for no async support." | |||
| 2890 | ;; to avoid over and over ispell kill. | 2866 | ;; to avoid over and over ispell kill. |
| 2891 | (window-buffer (minibuffer-selected-window)) | 2867 | (window-buffer (minibuffer-selected-window)) |
| 2892 | (current-buffer)) | 2868 | (current-buffer)) |
| 2893 | ;; 'local does not automatically make hook buffer-local in XEmacs. | 2869 | (add-hook 'kill-buffer-hook |
| 2894 | (if (featurep 'xemacs) | ||
| 2895 | (make-local-hook 'kill-buffer-hook)) | ||
| 2896 | (add-hook 'kill-buffer-hook | ||
| 2897 | (lambda () (ispell-kill-ispell t)) nil 'local))) | 2870 | (lambda () (ispell-kill-ispell t)) nil 'local))) |
| 2898 | 2871 | ||
| 2899 | (if ispell-async-processp | 2872 | (if ispell-async-processp |
| @@ -2938,12 +2911,8 @@ Keeps argument list for future Ispell invocations for no async support." | |||
| 2938 | (let ((extended-char-mode (ispell-get-extended-character-mode))) | 2911 | (let ((extended-char-mode (ispell-get-extended-character-mode))) |
| 2939 | (if extended-char-mode ; ~ extended character mode | 2912 | (if extended-char-mode ; ~ extended character mode |
| 2940 | (ispell-send-string (concat extended-char-mode "\n")))) | 2913 | (ispell-send-string (concat extended-char-mode "\n")))) |
| 2941 | (if ispell-async-processp | 2914 | (when ispell-async-processp |
| 2942 | (if (featurep 'emacs) | 2915 | (set-process-query-on-exit-flag ispell-process nil))))) |
| 2943 | (set-process-query-on-exit-flag ispell-process nil) | ||
| 2944 | (if (fboundp 'set-process-query-on-exit-flag) | ||
| 2945 | (set-process-query-on-exit-flag ispell-process nil) | ||
| 2946 | (process-kill-without-query ispell-process))))))) | ||
| 2947 | 2916 | ||
| 2948 | ;;;###autoload | 2917 | ;;;###autoload |
| 2949 | (defun ispell-kill-ispell (&optional no-error clear) | 2918 | (defun ispell-kill-ispell (&optional no-error clear) |
| @@ -2955,9 +2924,7 @@ With CLEAR, buffer session localwords are cleaned." | |||
| 2955 | ;; to optimize the common cases. | 2924 | ;; to optimize the common cases. |
| 2956 | (run-hooks 'ispell-kill-ispell-hook) | 2925 | (run-hooks 'ispell-kill-ispell-hook) |
| 2957 | (if (or clear | 2926 | (if (or clear |
| 2958 | (if (featurep 'xemacs) | 2927 | (called-interactively-p 'interactive)) |
| 2959 | (interactive-p) | ||
| 2960 | (called-interactively-p 'interactive))) | ||
| 2961 | (setq ispell-buffer-session-localwords nil)) | 2928 | (setq ispell-buffer-session-localwords nil)) |
| 2962 | (if (not (and ispell-process | 2929 | (if (not (and ispell-process |
| 2963 | (eq (ispell-process-status) 'run))) | 2930 | (eq (ispell-process-status) 'run))) |
| @@ -3006,9 +2973,7 @@ By just answering RET you can find out what the current dictionary is." | |||
| 3006 | ;; Specified dictionary is the default already. Could reload | 2973 | ;; Specified dictionary is the default already. Could reload |
| 3007 | ;; the dictionaries if needed. | 2974 | ;; the dictionaries if needed. |
| 3008 | (ispell-internal-change-dictionary) | 2975 | (ispell-internal-change-dictionary) |
| 3009 | (and (if (featurep 'xemacs) | 2976 | (when (called-interactively-p 'interactive) |
| 3010 | (interactive-p) | ||
| 3011 | (called-interactively-p 'interactive)) | ||
| 3012 | (message "No change, using %s dictionary" dict))) | 2977 | (message "No change, using %s dictionary" dict))) |
| 3013 | (t ; reset dictionary! | 2978 | (t ; reset dictionary! |
| 3014 | (if (or (assoc dict ispell-local-dictionary-alist) | 2979 | (if (or (assoc dict ispell-local-dictionary-alist) |