emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108004: Remove obsolete usage of (is


From: Agustin Martin
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108004: Remove obsolete usage of (ispell-insert-word)
Date: Mon, 23 Apr 2012 12:03:33 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 108004
committer: Agustin Martin <address@hidden>
branch nick: trunk
timestamp: Mon 2012-04-23 12:03:33 +0200
message:
  Remove obsolete usage of (ispell-insert-word)
  
  `ispell-insert-word' is a plain `insert' together with word filtering
  through `translation-table-for-input' for character code unification.
  This was useful in Emacs 22, but is not needed for Emacs 23 and above
  since unification is now direct.
  
  Since XEmacs does not have `translation-table-for-input' there is no
  need at all to keep this old code, but use (insert) directly.
modified:
  lisp/ChangeLog
  lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-22 18:04:54 +0000
+++ b/lisp/ChangeLog    2012-04-23 10:03:33 +0000
@@ -1,3 +1,10 @@
+2012-04-23  Agustín Martín Domingo  <address@hidden>
+
+       * ispell.el (ispell-insert-word) Remove unneeded function using
+       obsolete `translation-table-for-input'.
+       (ispell-word, ispell-process-line, ispell-complete-word): Use
+       plain `insert' instead of removed `ispell-insert-word'.
+
 2012-04-22  Chong Yidong  <address@hidden>
 
        * cus-edit.el (custom-variable-menu)

=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el  2012-04-16 17:32:02 +0000
+++ b/lisp/textmodes/ispell.el  2012-04-23 10:03:33 +0000
@@ -1665,16 +1665,6 @@
                          (setq more-lines (= 0 (forward-line))))))))))))))
 
 
-;; Insert WORD while possibly translating characters by
-;; translation-table-for-input.
-(defun ispell-insert-word (word)
-  (let ((pos (point)))
-    (insert word)
-    ;; Avoid "obsolete" warnings for translation-table-for-input.
-    (with-no-warnings
-      (if (char-table-p translation-table-for-input)
-         (translate-region pos (point) translation-table-for-input)))))
-
 ;;;###autoload
 (defun ispell-word (&optional following quietly continue region)
   "Check spelling of word under or before the cursor.
@@ -1787,7 +1777,7 @@
                          ;; Insert first and then delete,
                          ;; to avoid collapsing markers before and after
                          ;; into a single place.
-                         (ispell-insert-word new-word)
+                         (insert new-word)
                          (delete-region (point) end)
                          ;; It is meaningless to preserve the cursor position
                          ;; inside a word that has changed.
@@ -3277,7 +3267,7 @@
              (delete-region (point) (+ word-len (point)))
              (if (not (listp replace))
                  (progn
-                   (ispell-insert-word replace) ; insert dictionary word
+                   (insert replace) ; insert dictionary word
                    (ispell-send-replacement (car poss) replace)
                    (setq accept-list (cons replace accept-list)))
                (let ((replace-word (car replace)))
@@ -3451,7 +3441,7 @@
             (setq word (if (atom replacement) replacement (car replacement))
                   cursor-location (+ (- (length word) (- end start))
                                      cursor-location))
-            (ispell-insert-word word)
+            (insert word)
             (if (not (atom replacement)) ; recheck spelling of replacement.
                 (progn
                   (goto-char cursor-location)


reply via email to

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