diff options
| author | Miles Bader | 2006-05-10 02:07:12 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-05-10 02:07:12 +0000 |
| commit | 9a4d87c8d5f4503d67d5155eae6d543cc31f86d0 (patch) | |
| tree | 83f57bae66f7d3ba4da2fc77afa662040f15068b | |
| parent | 1627b55f61f5284bfe26e9bf62d0ea2d61f576da (diff) | |
| download | emacs-9a4d87c8d5f4503d67d5155eae6d543cc31f86d0.tar.gz emacs-9a4d87c8d5f4503d67d5155eae6d543cc31f86d0.zip | |
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-272
(comint-insert-input): Remove redundant calls to setq and goto-char
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/comint.el | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50fb393e245..4b3f30e9692 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-05-09 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * comint.el (comint-insert-input): Remove redundant calls to setq | ||
| 4 | and goto-char. | ||
| 5 | |||
| 1 | 2006-05-10 Nick Roberts <nickrob@snap.net.nz> | 6 | 2006-05-10 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 7 | ||
| 3 | * comint.el (comint-insert-input): Make it work when | 8 | * comint.el (comint-insert-input): Make it work when |
diff --git a/lisp/comint.el b/lisp/comint.el index 940643b24cc..c7e5b3bdddd 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -817,9 +817,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." | |||
| 817 | (let* ((keys (this-command-keys)) | 817 | (let* ((keys (this-command-keys)) |
| 818 | (last-key (and (vectorp keys) (aref keys (1- (length keys))))) | 818 | (last-key (and (vectorp keys) (aref keys (1- (length keys))))) |
| 819 | (fun (and last-key (lookup-key global-map (vector last-key))))) | 819 | (fun (and last-key (lookup-key global-map (vector last-key))))) |
| 820 | (goto-char pos) | ||
| 821 | (and fun (call-interactively fun))) | 820 | (and fun (call-interactively fun))) |
| 822 | (setq pos (point)) | ||
| 823 | ;; There's previous input at POS, insert it at the end of the buffer. | 821 | ;; There's previous input at POS, insert it at the end of the buffer. |
| 824 | (goto-char (point-max)) | 822 | (goto-char (point-max)) |
| 825 | ;; First delete any old unsent input at the end | 823 | ;; First delete any old unsent input at the end |
| @@ -829,6 +827,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." | |||
| 829 | (point)) | 827 | (point)) |
| 830 | ;; Insert the input at point | 828 | ;; Insert the input at point |
| 831 | (insert (field-string-no-properties pos)))))) | 829 | (insert (field-string-no-properties pos)))))) |
| 830 | |||
| 832 | 831 | ||
| 833 | ;; Input history processing in a buffer | 832 | ;; Input history processing in a buffer |
| 834 | ;; =========================================================================== | 833 | ;; =========================================================================== |