]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/ispell.el
Merge from emacs-24; up to 2013-01-02T16:37:04Z!eggert@cs.ucla.edu
[gnu-emacs] / lisp / textmodes / ispell.el
index 92e21c300c7f760119fc56cf6635f000c9b1bc81..3998fafa5cc4370bc867f6990f8c29b887eaff0c 100644 (file)
@@ -1157,7 +1157,7 @@ all uninitialized dicts using that affix file."
          (use-for-dicts (list dict))
          (dict-args-cdr (cdr (ispell-parse-hunspell-affix-file dict)))
          newlist)
-      ;; Get a list of unitialized dicts using the same affix file.
+      ;; Get a list of uninitialized dicts using the same affix file.
       (dolist (dict-equiv-alist-entry ispell-hunspell-dictionary-equivs-alist)
        (let ((dict-equiv-key (car dict-equiv-alist-entry))
              (dict-equiv-value (cadr dict-equiv-alist-entry)))
@@ -1383,7 +1383,8 @@ aspell is used along with Emacs).")
                ;; Unless default dict, re-add "-d" option with the mapped value
                (if dict-name
                    (if dict-equiv
-                       (nconc ispell-args (list "-d" dict-equiv))
+                       (setq ispell-args
+                             (nconc ispell-args (list "-d" dict-equiv)))
                      (message
                       "ispell-set-spellchecker-params: Missing hunspell equiv for \"%s\". Skipping."
                       dict-name)
@@ -2217,7 +2218,7 @@ Global `ispell-quit' set to start location to continue spell session."
        (window-min-height (min window-min-height
                                ispell-choices-win-default-height))
        (command-characters '( ?  ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m ))
-       (dedicated (window-dedicated-p (selected-window)))
+       (dedicated (window-dedicated-p))
        (skipped 0)
        char num result textwin dedicated-win)
 
@@ -2328,10 +2329,14 @@ Global `ispell-quit' set to start location to continue spell session."
                   ((= char ?i)         ; accept and insert word into pers dict
                    (ispell-send-string (concat "*" word "\n"))
                    (setq ispell-pdict-modified-p '(t)) ; dictionary modified!
+                   (and (fboundp 'flyspell-unhighlight-at)
+                        (flyspell-unhighlight-at start))
                    nil)
                   ((or (= char ?a) (= char ?A)) ; accept word without insert
                    (ispell-send-string (concat "@" word "\n"))
                    (add-to-list 'ispell-buffer-session-localwords word)
+                   (and (fboundp 'flyspell-unhighlight-at)
+                        (flyspell-unhighlight-at start))
                    (or ispell-buffer-local-name ; session localwords might conflict
                        (setq ispell-buffer-local-name (buffer-name)))
                    (if (null ispell-pdict-modified-p)
@@ -4331,8 +4336,13 @@ Both should not be used to define a buffer-local dictionary."
                                   (if (fboundp 'comment-padright)
                                       ;; Try and use the proper comment marker,
                                       ;; e.g. ";;" rather than ";".
-                                      (comment-padright comment-start
-                                                        (comment-add nil))
+                                     (progn
+                                       ;; XEmacs: comment-normalize-vars
+                                       ;; (newcomment.el) only in >= 21.5
+                                       (and (fboundp 'comment-normalize-vars)
+                                            (comment-normalize-vars))
+                                       (comment-padright comment-start
+                                                         (comment-add nil)))
                                     comment-start)
                                   " ")
                               "")