[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ff5dedd 10/23: Remove XEmacs-specific code from isp
From: |
Reuben Thomas |
Subject: |
[Emacs-diffs] master ff5dedd 10/23: Remove XEmacs-specific code from ispell.el |
Date: |
Tue, 13 Dec 2016 19:44:36 +0000 (UTC) |
branch: master
commit ff5deddc83ea07916c161457920bee301dc3e5f8
Author: Reuben Thomas <address@hidden>
Commit: Reuben Thomas <address@hidden>
Remove XEmacs-specific code from ispell.el
* lisp/textmodes/ispell.el (ispell-menu-xemacs): Remove
(ispell-menu-map-needed): Remove XEmacs-specific check.
(ispell-word): Remove XEmacs-specific extent code.
(ispell-init-process): Remove XEmacs workaround for local add-hook.
Assume we have set-process-query-on-exit-flag.
(ispell-kill-ispell, ispell-change-dictionary): Remove XEmacs
workaround for called-interactively-p.
---
lisp/textmodes/ispell.el | 55 +++++++++-------------------------------------
1 file changed, 10 insertions(+), 45 deletions(-)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index a6dd905..6a28db6 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."
;; Redo menu when loading ispell to get dictionary modifications
(setq ispell-menu-map nil)
-;;;###autoload
-(defvar ispell-menu-xemacs nil
- "Spelling menu for XEmacs.
-If nil when package is loaded, a standard menu will be set,
-and added as a submenu of the \"Edit\" menu.")
-
-;; Break out XEmacs menu and split into several calls to avoid having
-;; long lines in loaddefs.el. Detect need off following constant.
-
;;; Set up dictionary
;;;###autoload
(defvar ispell-menu-map-needed
- ;; only needed when not version 18 and not XEmacs.
- (and (not ispell-menu-map)
- (not (featurep 'xemacs))
- 'reload))
+ (unless ispell-menu-map 'reload))
(defvar ispell-library-directory (condition-case ()
(ispell-check-version)
@@ -1932,32 +1920,20 @@ quit spell session exited."
(cond ((eq poss t)
(or quietly
(message "%s is correct"
- (funcall ispell-format-word-function word)))
- (and (featurep 'xemacs)
- (extent-at start)
- (and (fboundp 'delete-extent)
- (delete-extent (extent-at start)))))
+ (funcall ispell-format-word-function word))))
((stringp poss)
(or quietly
(message "%s is correct because of root %s"
(funcall ispell-format-word-function word)
- (funcall ispell-format-word-function poss)))
- (and (featurep 'xemacs)
- (extent-at start)
- (and (fboundp 'delete-extent)
- (delete-extent (extent-at start)))))
+ (funcall ispell-format-word-function poss))))
((null poss)
(message "Error checking word %s using %s with %s dictionary"
(funcall ispell-format-word-function word)
(file-name-nondirectory ispell-program-name)
(or ispell-current-dictionary "default")))
(ispell-check-only ; called from ispell minor mode.
- (if (fboundp 'make-extent)
- (if (fboundp 'set-extent-property)
- (let ((ext (make-extent start end)))
- (set-extent-property ext 'face ispell-highlight-face)
- (set-extent-property ext 'priority 2000)))
- (beep)
+ (progn
+ (beep)
(message "%s is incorrect"
(funcall ispell-format-word-function word))))
(t ; prompt for correct word.
@@ -2890,10 +2866,7 @@ Keeps argument list for future Ispell invocations for no
async support."
;; to avoid over and over ispell kill.
(window-buffer (minibuffer-selected-window))
(current-buffer))
- ;; 'local does not automatically make hook buffer-local in XEmacs.
- (if (featurep 'xemacs)
- (make-local-hook 'kill-buffer-hook))
- (add-hook 'kill-buffer-hook
+ (add-hook 'kill-buffer-hook
(lambda () (ispell-kill-ispell t)) nil 'local)))
(if ispell-async-processp
@@ -2938,12 +2911,8 @@ Keeps argument list for future Ispell invocations for no
async support."
(let ((extended-char-mode (ispell-get-extended-character-mode)))
(if extended-char-mode ; ~ extended character mode
(ispell-send-string (concat extended-char-mode "\n"))))
- (if ispell-async-processp
- (if (featurep 'emacs)
- (set-process-query-on-exit-flag ispell-process nil)
- (if (fboundp 'set-process-query-on-exit-flag)
- (set-process-query-on-exit-flag ispell-process nil)
- (process-kill-without-query ispell-process)))))))
+ (when ispell-async-processp
+ (set-process-query-on-exit-flag ispell-process nil)))))
;;;###autoload
(defun ispell-kill-ispell (&optional no-error clear)
@@ -2955,9 +2924,7 @@ With CLEAR, buffer session localwords are cleaned."
;; to optimize the common cases.
(run-hooks 'ispell-kill-ispell-hook)
(if (or clear
- (if (featurep 'xemacs)
- (interactive-p)
- (called-interactively-p 'interactive)))
+ (called-interactively-p 'interactive))
(setq ispell-buffer-session-localwords nil))
(if (not (and ispell-process
(eq (ispell-process-status) 'run)))
@@ -3006,9 +2973,7 @@ By just answering RET you can find out what the current
dictionary is."
;; Specified dictionary is the default already. Could reload
;; the dictionaries if needed.
(ispell-internal-change-dictionary)
- (and (if (featurep 'xemacs)
- (interactive-p)
- (called-interactively-p 'interactive))
+ (when (called-interactively-p 'interactive)
(message "No change, using %s dictionary" dict)))
(t ; reset dictionary!
(if (or (assoc dict ispell-local-dictionary-alist)
- [Emacs-diffs] master 3ac94b9 06/23: Remove some XEmacs-specific code from ispell.el, (continued)
- [Emacs-diffs] master 3ac94b9 06/23: Remove some XEmacs-specific code from ispell.el, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 8edf0eb 02/23: Assume we have version<= for checking ispell version, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 854ed8a 07/23: Assume Emacs supports [:alpha:] in regexps, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master e1aa788 18/23: Remove boundp test for always-bound symbol, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 6e88249 12/23: Remove XEmacs-specific horizontal scrollbar handling in ispell.el, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 8315d50 15/23: Remove support for old versions of supercite and GNUS from ispell.el, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 51d011d 04/23: Remove tests for built-in functions, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 8af9cb2 19/23: Remove meaningless defconst ispell-version, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 3affed0 16/23: Remove unused constant, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 8245e5b 11/23: Remove XEmacs-specific code dealing with enable-multibyte-characters, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master ff5dedd 10/23: Remove XEmacs-specific code from ispell.el,
Reuben Thomas <=
- [Emacs-diffs] master 97f327d 22/23: Minor docstring and comment fixes to ispell.el, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master f25c8b3 01/23: Remove ispell.el pre-GNU Emacs comments, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master c89dc9d 08/23: Remove XEmacs and old Emacs highlighting code, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 6b5ac58 20/23: Remove XEmacs-specific ispell-with-no-warnings, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master b989c41 14/23: Remove remaining mentions of XEmacs from ispell.el, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master db6e1f8 17/23: Remove support for ispell < 3.1.12, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 94834bd 21/23: Remove unused variable, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 028249e 05/23: Generalise over-specific documentation, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master ada717e 09/23: Remove some commented-out code, Reuben Thomas, 2016/12/13
- [Emacs-diffs] master 8886f15 13/23: Remove XEmacs-specific minibuffer handling code from ispell.el, Reuben Thomas, 2016/12/13