aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el43
1 files changed, 28 insertions, 15 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index cd7a90b5111..bd2de4121d3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -920,21 +920,21 @@ in *Help* buffer. See also the command `describe-char'."
920(defvar read-expression-history nil) 920(defvar read-expression-history nil)
921 921
922(defcustom eval-expression-print-level 4 922(defcustom eval-expression-print-level 4
923 "*Value to use for `print-level' when printing value in `eval-expression'. 923 "Value for `print-level' while printing value in `eval-expression'.
924A value of nil means no limit." 924A value of nil means no limit."
925 :group 'lisp 925 :group 'lisp
926 :type '(choice (const :tag "No Limit" nil) integer) 926 :type '(choice (const :tag "No Limit" nil) integer)
927 :version "21.1") 927 :version "21.1")
928 928
929(defcustom eval-expression-print-length 12 929(defcustom eval-expression-print-length 12
930 "*Value to use for `print-length' when printing value in `eval-expression'. 930 "Value for `print-length' while printing value in `eval-expression'.
931A value of nil means no limit." 931A value of nil means no limit."
932 :group 'lisp 932 :group 'lisp
933 :type '(choice (const :tag "No Limit" nil) integer) 933 :type '(choice (const :tag "No Limit" nil) integer)
934 :version "21.1") 934 :version "21.1")
935 935
936(defcustom eval-expression-debug-on-error t 936(defcustom eval-expression-debug-on-error t
937 "*Non-nil means set `debug-on-error' when evaluating in `eval-expression'. 937 "If non-nil set `debug-on-error' to t in `eval-expression'.
938If nil, don't change the value of `debug-on-error'." 938If nil, don't change the value of `debug-on-error'."
939 :group 'lisp 939 :group 'lisp
940 :type 'boolean 940 :type 'boolean
@@ -3346,34 +3346,43 @@ Outline mode sets this."
3346 (or (memq prop buffer-invisibility-spec) 3346 (or (memq prop buffer-invisibility-spec)
3347 (assq prop buffer-invisibility-spec))))) 3347 (assq prop buffer-invisibility-spec)))))
3348 3348
3349;; Perform vertical scrolling of tall images if necessary. 3349;; This is like line-move-1 except that it also performs
3350;; Don't vscroll in a keyboard macro. 3350;; vertical scrolling of tall images if appropriate.
3351;; That is not really a clean thing to do, since it mixes
3352;; scrolling with cursor motion. But so far we don't have
3353;; a cleaner solution to the problem of making C-n do something
3354;; useful given a tall image.
3351(defun line-move (arg &optional noerror to-end try-vscroll) 3355(defun line-move (arg &optional noerror to-end try-vscroll)
3352 (if (and auto-window-vscroll try-vscroll 3356 (if (and auto-window-vscroll try-vscroll
3357 ;; But don't vscroll in a keyboard macro.
3353 (not defining-kbd-macro) 3358 (not defining-kbd-macro)
3354 (not executing-kbd-macro)) 3359 (not executing-kbd-macro))
3355 (let ((forward (> arg 0)) 3360 (let ((forward (> arg 0))
3356 (part (nth 2 (pos-visible-in-window-p (point) nil t)))) 3361 (part (nth 2 (pos-visible-in-window-p (point) nil t))))
3357 (if (and (consp part) 3362 (if (and (consp part)
3358 (> (setq part (if forward (cdr part) (car part))) 0)) 3363 (> (if forward (cdr part) (car part)) 0))
3359 (set-window-vscroll nil 3364 (set-window-vscroll nil
3360 (if forward 3365 (if forward
3361 (+ (window-vscroll nil t) 3366 (+ (window-vscroll nil t)
3362 (min part 3367 (min (cdr part)
3363 (* (frame-char-height) arg))) 3368 (* (frame-char-height) arg)))
3364 (max 0 3369 (max 0
3365 (- (window-vscroll nil t) 3370 (- (window-vscroll nil t)
3366 (min part 3371 (min (car part)
3367 (* (frame-char-height) (- arg)))))) 3372 (* (frame-char-height) (- arg))))))
3368 t) 3373 t)
3369 (set-window-vscroll nil 0) 3374 (set-window-vscroll nil 0)
3370 (when (line-move-1 arg noerror to-end) 3375 (when (line-move-1 arg noerror to-end)
3371 (sit-for 0) 3376 (when (not forward)
3372 (if (and (not forward) 3377 ;; Update display before calling pos-visible-in-window-p,
3373 (setq part (nth 2 (pos-visible-in-window-p 3378 ;; because it depends on window-start being up-to-date.
3374 (line-beginning-position) nil t))) 3379 (sit-for 0)
3375 (> (cdr part) 0)) 3380 ;; If the current line is partly hidden at the bottom,
3376 (set-window-vscroll nil (cdr part) t)) 3381 ;; scroll it partially up so as to unhide the bottom.
3382 (if (and (setq part (nth 2 (pos-visible-in-window-p
3383 (line-beginning-position) nil t)))
3384 (> (cdr part) 0))
3385 (set-window-vscroll nil (cdr part) t)))
3377 t))) 3386 t)))
3378 (line-move-1 arg noerror to-end))) 3387 (line-move-1 arg noerror to-end)))
3379 3388
@@ -4835,7 +4844,11 @@ of the differing parts is, by contrast, slightly highlighted."
4835 (- (point) (minibuffer-prompt-end))))) 4844 (- (point) (minibuffer-prompt-end)))))
4836 ;; Otherwise, in minibuffer, the whole input is being completed. 4845 ;; Otherwise, in minibuffer, the whole input is being completed.
4837 (if (minibufferp mainbuf) 4846 (if (minibufferp mainbuf)
4838 (setq completion-base-size 0))) 4847 (if (and (symbolp minibuffer-completion-table)
4848 (get minibuffer-completion-table 'completion-base-size-function))
4849 (setq completion-base-size
4850 (funcall (get minibuffer-completion-table 'completion-base-size-function)))
4851 (setq completion-base-size 0))))
4839 ;; Put faces on first uncommon characters and common parts. 4852 ;; Put faces on first uncommon characters and common parts.
4840 (when completion-base-size 4853 (when completion-base-size
4841 (let* ((common-string-length 4854 (let* ((common-string-length