[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101402: ispell.el: Improve comments.
From: |
Agustin martin |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101402: ispell.el: Improve comments. XEmacs compatibility changes. |
Date: |
Fri, 10 Sep 2010 13:20:51 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101402
committer: Agustin martin <address@hidden>
branch nick: trunk
timestamp: Fri 2010-09-10 13:20:51 +0200
message:
ispell.el: Improve comments. XEmacs compatibility changes.
* textmodes/ispell.el (ispell-init-process): Improve comments.
XEmacs compatibility changes regarding (add-hook) 'local option
and (set-process-query-on-exit-flag).
modified:
lisp/ChangeLog
lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-09-09 13:24:39 +0000
+++ b/lisp/ChangeLog 2010-09-10 11:20:51 +0000
@@ -1,3 +1,9 @@
+2010-09-10 Agustín Martín <address@hidden>
+
+ * textmodes/ispell.el (ispell-init-process): Improve comments.
+ XEmacs compatibility changes regarding (add-hook) 'local option
+ and (set-process-query-on-exit-flag).
+
2010-09-09 Michael Albinus <address@hidden>
* net/tramp-cache.el (tramp-parse-connection-properties): Set
=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el 2010-09-08 14:54:00 +0000
+++ b/lisp/textmodes/ispell.el 2010-09-10 11:20:51 +0000
@@ -2674,24 +2674,27 @@
ispell-filter-continue nil
ispell-process-directory default-directory)
- ;; Kill ispell process when killing its associated buffer if using Ispell
- ;; per-directory personal dictionaries.
(unless (equal ispell-process-directory (expand-file-name "~/"))
- (with-current-buffer
- (if (and (window-minibuffer-p)
- (fboundp 'minibuffer-selected-window)) ;; E.g. XEmacs.
- ;; When spellchecking minibuffer contents, assign ispell
- ;; process to parent buffer if known (not known for XEmacs).
- ;; Use (buffer-name) otherwise.
+ ;; At this point, `ispell-process-directory' will be "~/" unless using
+ ;; Ispell with directory-specific dicts and not in XEmacs minibuffer.
+ ;; If not, kill ispell process when killing buffer. It may be in a
+ ;; removable device that would otherwise become un-mountable.
+ (with-current-buffer
+ (if (and (window-minibuffer-p) ;; In minibuffer
+ (fboundp 'minibuffer-selected-window)) ;; Not XEmacs.
+ ;; In this case kill ispell only when parent buffer is killed
+ ;; to avoid over and over ispell kill.
(window-buffer (minibuffer-selected-window))
- (current-buffer))
- (add-hook 'kill-buffer-hook (lambda () (ispell-kill-ispell t))
- nil 'local)))
+ (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
+ (lambda () (ispell-kill-ispell t)) nil 'local)))
(if ispell-async-processp
(set-process-filter ispell-process 'ispell-filter))
- ;; protect against bogus binding of `enable-multibyte-characters' in
- ;; XEmacs.
+ ;; Protect against XEmacs bogus binding of `enable-multibyte-characters'.
(if (and (or (featurep 'xemacs)
(and (boundp 'enable-multibyte-characters)
enable-multibyte-characters))
@@ -2727,7 +2730,9 @@
(if extended-char-mode ; ~ extended character mode
(ispell-send-string (concat extended-char-mode "\n"))))
(if ispell-async-processp
- (set-process-query-on-exit-flag ispell-process nil)))))
+ (if (fboundp 'set-process-query-on-exit-flag) ;; not XEmacs
+ (set-process-query-on-exit-flag ispell-process nil)
+ (process-kill-without-query ispell-process))))))
;;;###autoload
(defun ispell-kill-ispell (&optional no-error)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101402: ispell.el: Improve comments. XEmacs compatibility changes.,
Agustin martin <=