diff options
Diffstat (limited to 'lisp/progmodes/ebrowse.el')
| -rw-r--r-- | lisp/progmodes/ebrowse.el | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 2d0ab0fdeaf..466b76d2bb3 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -1936,10 +1936,10 @@ COLLAPSE non-nil means collapse the branch." | |||
| 1936 | Don't let it move into the title lines. | 1936 | Don't let it move into the title lines. |
| 1937 | See `Electric-command-loop' for a description of STATE and CONDITION." | 1937 | See `Electric-command-loop' for a description of STATE and CONDITION." |
| 1938 | (cond ((and condition | 1938 | (cond ((and condition |
| 1939 | (not (memq (car condition) | 1939 | (not (or (error-has-type-p condition 'buffer-read-only) |
| 1940 | '(buffer-read-only end-of-buffer | 1940 | (error-has-type-p condition 'end-of-buffer) |
| 1941 | beginning-of-buffer)))) | 1941 | (error-has-type-p condition 'beginning-of-buffer)))) |
| 1942 | (signal (car condition) (cdr condition))) | 1942 | (signal condition)) |
| 1943 | ((< (point) (car state)) | 1943 | ((< (point) (car state)) |
| 1944 | (goto-char (point-min)) | 1944 | (goto-char (point-min)) |
| 1945 | (forward-line 2)) | 1945 | (forward-line 2)) |
| @@ -3879,23 +3879,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'." | |||
| 3879 | (kill-buffer buffer))) | 3879 | (kill-buffer buffer))) |
| 3880 | 3880 | ||
| 3881 | 3881 | ||
| 3882 | (defun ebrowse-electric-position-looper (state condition) | 3882 | (defalias 'ebrowse-electric-position-looper #'ebrowse-electric-list-looper) |
| 3883 | "Prevent moving point on invalid lines. | ||
| 3884 | Called from `Electric-command-loop'. See there for the meaning | ||
| 3885 | of STATE and CONDITION." | ||
| 3886 | (cond ((and condition | ||
| 3887 | (not (memq (car condition) '(buffer-read-only | ||
| 3888 | end-of-buffer | ||
| 3889 | beginning-of-buffer)))) | ||
| 3890 | (signal (car condition) (cdr condition))) | ||
| 3891 | ((< (point) (car state)) | ||
| 3892 | (goto-char (point-min)) | ||
| 3893 | (forward-line 2)) | ||
| 3894 | ((> (point) (cdr state)) | ||
| 3895 | (goto-char (point-max)) | ||
| 3896 | (forward-line -1) | ||
| 3897 | (if (pos-visible-in-window-p (point-max)) | ||
| 3898 | (recenter -1))))) | ||
| 3899 | 3883 | ||
| 3900 | 3884 | ||
| 3901 | (defun ebrowse-electric-position-undefined () | 3885 | (defun ebrowse-electric-position-undefined () |