diff options
| author | Stefan Kangas | 2023-08-05 14:56:27 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2023-08-05 17:57:53 +0200 |
| commit | ed3954445045aca3cdc60dbd6b75a3a55470e28b (patch) | |
| tree | f633cb54f692ae087aa26e97104853ed27bc4310 /lisp/eshell | |
| parent | 7df1adab1e1a9a37920f3fa107794c2d081ebaf4 (diff) | |
| download | emacs-ed3954445045aca3cdc60dbd6b75a3a55470e28b.tar.gz emacs-ed3954445045aca3cdc60dbd6b75a3a55470e28b.zip | |
Make eshell-redisplay into alias for redisplay
* lisp/eshell/esh-util.el (eshell-redisplay): Make into obsolete
function alias for 'redisplay'. This removes a workaround for some
obscure bug apparently found in Emacs 21. Update all callers.
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/em-hist.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/em-smart.el | 4 | ||||
| -rw-r--r-- | lisp/eshell/esh-util.el | 12 |
3 files changed, 5 insertions, 13 deletions
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 2c199ec160f..79232d8e9b5 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el | |||
| @@ -534,7 +534,7 @@ See also `eshell-read-history'." | |||
| 534 | (forward-line 3) | 534 | (forward-line 3) |
| 535 | (while (search-backward "completion" nil 'move) | 535 | (while (search-backward "completion" nil 'move) |
| 536 | (replace-match "history reference"))) | 536 | (replace-match "history reference"))) |
| 537 | (eshell-redisplay) | 537 | (redisplay) |
| 538 | (message "Hit space to flush") | 538 | (message "Hit space to flush") |
| 539 | (let ((ch (read-event))) | 539 | (let ((ch (read-event))) |
| 540 | (if (eq ch ?\ ) | 540 | (if (eq ch ?\ ) |
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index d8b7fadc2c2..d5002a59d14 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el | |||
| @@ -214,7 +214,7 @@ The options are `begin', `after' or `end'." | |||
| 214 | 0 frame) | 214 | 0 frame) |
| 215 | (if affected | 215 | (if affected |
| 216 | (let (window-scroll-functions) ;;FIXME: Why? | 216 | (let (window-scroll-functions) ;;FIXME: Why? |
| 217 | (eshell-redisplay))))) | 217 | (redisplay))))) |
| 218 | 218 | ||
| 219 | (defun eshell-smart-display-setup () | 219 | (defun eshell-smart-display-setup () |
| 220 | "Set the point to somewhere in the beginning of the last command." | 220 | "Set the point to somewhere in the beginning of the last command." |
| @@ -261,7 +261,7 @@ and the end of the buffer are still visible." | |||
| 261 | (recenter -1) | 261 | (recenter -1) |
| 262 | ;; trigger the redisplay now, so that we catch any attempted | 262 | ;; trigger the redisplay now, so that we catch any attempted |
| 263 | ;; point motion; this is to cover for a redisplay bug | 263 | ;; point motion; this is to cover for a redisplay bug |
| 264 | (eshell-redisplay)) | 264 | (redisplay)) |
| 265 | (let ((top-point (point))) | 265 | (let ((top-point (point))) |
| 266 | (and (memq 'eshell-smart-display-move pre-command-hook) | 266 | (and (memq 'eshell-smart-display-move pre-command-hook) |
| 267 | (>= (point) eshell-last-input-start) | 267 | (>= (point) eshell-last-input-start) |
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 6353e3d4aae..87cd1f5dcb2 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -476,16 +476,6 @@ list." | |||
| 476 | (cadr flist) | 476 | (cadr flist) |
| 477 | (cdr flist)))) | 477 | (cdr flist)))) |
| 478 | 478 | ||
| 479 | (defsubst eshell-redisplay () | ||
| 480 | "Allow Emacs to redisplay buffers." | ||
| 481 | ;; for some strange reason, Emacs 21 is prone to trigger an | ||
| 482 | ;; "args out of range" error in `sit-for', if this function | ||
| 483 | ;; runs while point is in the minibuffer and the users attempt | ||
| 484 | ;; to use completion. Don't ask me. | ||
| 485 | (condition-case nil | ||
| 486 | (sit-for 0) | ||
| 487 | (error nil))) | ||
| 488 | |||
| 489 | (defun eshell-user-login-name () | 479 | (defun eshell-user-login-name () |
| 490 | "Return the connection-aware value of the user's login name. | 480 | "Return the connection-aware value of the user's login name. |
| 491 | See also `user-login-name'." | 481 | See also `user-login-name'." |
| @@ -795,6 +785,8 @@ If N or M is nil, it means the end of the list." | |||
| 795 | (declare (obsolete seq-subseq "28.1")) | 785 | (declare (obsolete seq-subseq "28.1")) |
| 796 | (seq-subseq l n (1+ m))) | 786 | (seq-subseq l n (1+ m))) |
| 797 | 787 | ||
| 788 | (define-obsolete-function-alias 'eshell-redisplay #'redisplay "30.1") | ||
| 789 | |||
| 798 | (provide 'esh-util) | 790 | (provide 'esh-util) |
| 799 | 791 | ||
| 800 | ;;; esh-util.el ends here | 792 | ;;; esh-util.el ends here |