Revision: emacs@sv.gnu.org/emacs--devo--0--patch-272
authorMiles Bader <miles@gnu.org>
Wed, 10 May 2006 02:07:12 +0000 (02:07 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 10 May 2006 02:07:12 +0000 (02:07 +0000)
(comint-insert-input): Remove redundant calls to setq and goto-char

lisp/ChangeLog
lisp/comint.el

index 50fb393..4b3f30e 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-09  Miles Bader  <miles@gnu.org>
+
+       * comint.el (comint-insert-input): Remove redundant calls to setq
+       and goto-char.
+
 2006-05-10  Nick Roberts  <nickrob@snap.net.nz>
 
        * comint.el (comint-insert-input): Make it work when
index 940643b..c7e5b3b 100644 (file)
@@ -817,9 +817,7 @@ buffer.  The hook `comint-exec-hook' is run after each exec."
          (let* ((keys (this-command-keys))
                 (last-key (and (vectorp keys) (aref keys (1- (length keys)))))
                 (fun (and last-key (lookup-key global-map (vector last-key)))))
-           (goto-char pos)
            (and fun (call-interactively fun)))
-       (setq pos (point))
        ;; There's previous input at POS, insert it at the end of the buffer.
        (goto-char (point-max))
        ;; First delete any old unsent input at the end
@@ -829,6 +827,7 @@ buffer.  The hook `comint-exec-hook' is run after each exec."
         (point))
        ;; Insert the input at point
        (insert (field-string-no-properties pos))))))
+
 \f
 ;; Input history processing in a buffer
 ;; ===========================================================================