[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111076: ispell.el: Use expanded valu
From: |
Agustin Martin |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111076: ispell.el: Use expanded values of personal dictionary for process restart checks. |
Date: |
Mon, 03 Dec 2012 18:15:32 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111076
fixes bug: http://debbugs.gnu.org/13019
committer: Agustin Martin <address@hidden>
branch nick: trunk
timestamp: Mon 2012-12-03 18:15:32 +0100
message:
ispell.el: Use expanded values of personal dictionary for process restart
checks.
(ispell-internal-change-dictionary):
Improve ispell process restart checks by using expanded values for ispell
personal dictionary and for related restart check.
(ispell-start-process):
* Remove apparently redundant code that seems better handled from
(ispell-internal-change-dictionary)
* No longer need to expand ispell personal dictionary, it is already
expanded.
modified:
lisp/ChangeLog
lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-12-03 16:08:23 +0000
+++ b/lisp/ChangeLog 2012-12-03 17:15:32 +0000
@@ -2,7 +2,8 @@
* textmodes/ispell.el (ispell-init-process)
(ispell-start-process): Make sure personal dictionary name is
- expanded after initial `default-directory' value (Bug#13019).
+ expanded after initial `default-directory' value. Use expanded
+ values for keep/restart checks (Bug#13019).
2012-12-03 Jay Belanger <address@hidden>
=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el 2012-12-03 16:08:23 +0000
+++ b/lisp/textmodes/ispell.el 2012-12-03 17:15:32 +0000
@@ -2649,11 +2649,8 @@
(defun ispell-start-process ()
"Start the Ispell process, with support for no asynchronous processes.
Keeps argument list for future Ispell invocations for no async support."
- ;; Local dictionary becomes the global dictionary in use.
- (setq ispell-current-dictionary
- (or ispell-local-dictionary ispell-dictionary))
- (setq ispell-current-personal-dictionary
- (or ispell-local-pdict ispell-personal-dictionary))
+ ;; `ispell-current-dictionary' and `ispell-current-personal-dictionary'
+ ;; are properly set in `ispell-internal-change-dictionary'.
(let* ((default-directory
(if (and (file-directory-p default-directory)
(file-readable-p default-directory))
@@ -2668,9 +2665,7 @@
(list "-d" ispell-current-dictionary))
orig-args
(if ispell-current-personal-dictionary ; Use specified pers dict.
- (list "-p"
- (expand-file-name ispell-current-personal-dictionary
- current-ispell-directory)))
+ (list "-p" ispell-current-personal-dictionary))
;; If we are using recent aspell or hunspell, make sure we use the
;; right encoding for communication. ispell or older aspell/hunspell
;; does not support this.
@@ -2900,13 +2895,15 @@
"Update the dictionary and the personal dictionary used by Ispell.
This may kill the Ispell process; if so, a new one will be started
when needed."
- (let ((dict (or ispell-local-dictionary ispell-dictionary))
- (pdict (or ispell-local-pdict ispell-personal-dictionary)))
+ (let* ((dict (or ispell-local-dictionary ispell-dictionary))
+ (pdict (or ispell-local-pdict ispell-personal-dictionary))
+ (expanded-pdict (if pdict (expand-file-name pdict))))
(unless (and (equal ispell-current-dictionary dict)
- (equal ispell-current-personal-dictionary pdict))
+ (equal ispell-current-personal-dictionary
+ expanded-pdict))
(ispell-kill-ispell t)
(setq ispell-current-dictionary dict
- ispell-current-personal-dictionary pdict))))
+ ispell-current-personal-dictionary expanded-pdict))))
;; Avoid error messages when compiling for these dynamic variables.
(defvar ispell-start)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111076: ispell.el: Use expanded values of personal dictionary for process restart checks.,
Agustin Martin <=