emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100259: Do not ispell-kill-ispell ov


From: Agustin martin
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100259: Do not ispell-kill-ispell over and over when spellchecking minibuffer contents.
Date: Thu, 13 May 2010 12:36:03 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100259
committer: Agustin martin <address@hidden>
branch nick: trunk
timestamp: Thu 2010-05-13 12:36:03 +0200
message:
  Do not ispell-kill-ispell over and over when spellchecking minibuffer 
contents.
  
  * ispell.el (ispell-init-process): Do not kill ispell process 
  everytime when spellchecking from the minibuffer (bug#6143).
modified:
  lisp/ChangeLog
  lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-05-13 00:44:22 +0000
+++ b/lisp/ChangeLog    2010-05-13 10:36:03 +0000
@@ -1,3 +1,8 @@
+2010-05-13  Agustín Martín  <address@hidden>
+
+       * ispell.el (ispell-init-process): Do not kill ispell process
+       everytime when spellchecking from the minibuffer (bug#6143).
+
 2010-05-13  Stefan Monnier  <address@hidden>
 
        * progmodes/sh-script.el (sh-mode): Use define-derived-mode.

=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el  2010-04-27 10:44:44 +0000
+++ b/lisp/textmodes/ispell.el  2010-05-13 10:36:03 +0000
@@ -2630,11 +2630,22 @@
             (or ispell-local-dictionary ispell-dictionary "default"))
     (sit-for 0)
     (setq ispell-library-directory (ispell-check-version)
-         ispell-process-directory default-directory
          ispell-process (ispell-start-process)
          ispell-filter nil
-         ispell-filter-continue nil
-         ispell-process-buffer-name (buffer-name))
+         ispell-filter-continue nil)
+    ;; When spellchecking minibuffer contents, make sure ispell process
+    ;; is not restarted every time the minibuffer is killed.
+    (if (window-minibuffer-p)
+       (if (fboundp 'minibuffer-selected-window)
+           ;; Assign ispell process to parent buffer
+           (setq ispell-process-directory default-directory
+                 ispell-process-buffer-name (window-buffer 
(minibuffer-selected-window)))
+         ;; Force `ispell-process-directory' to $HOME and use a dummy name
+         (setq ispell-process-directory (expand-file-name "~/")
+               ispell-process-buffer-name " * 
Minibuffer-has-spellcheck-enabled"))
+      ;; Not in a minibuffer
+      (setq ispell-process-directory default-directory
+           ispell-process-buffer-name (buffer-name)))
     (if ispell-async-processp
        (set-process-filter ispell-process 'ispell-filter))
     ;; protect against bogus binding of `enable-multibyte-characters' in XEmacs


reply via email to

[Prev in Thread] Current Thread [Next in Thread]