Value is also consed on to front of the variable `values'.
Optional argument EVAL-EXPRESSION-INSERT-VALUE, if non-nil, means
insert the result into the current buffer instead of printing it in
-the echo area."
+the echo area.
+
+If `eval-expression-debug-on-error' is non-nil, which is the default,
+this command arranges for all errors to enter the debugger."
(interactive
(list (read-from-minibuffer "Eval: "
nil read-expression-map t
\(That convention is designed to do the right thing for
recursive uses of the minibuffer.)")
(setq minibuffer-history-variable 'minibuffer-history)
-(setq minibuffer-history-position nil)
+(setq minibuffer-history-position nil) ;; Defvar is in C code.
(defvar minibuffer-history-search-history nil)
(defvar minibuffer-text-before-history nil
(defvar minibuffer-temporary-goal-position nil)
(defun next-history-element (n)
- "Insert the next element of the minibuffer history into the minibuffer."
+ "Puts next element of the minibuffer history in the minibuffer.
+With argument N, it uses the Nth following element."
(interactive "p")
(or (zerop n)
(let ((narg (- minibuffer-history-position n))
(goto-char (or minibuffer-temporary-goal-position (point-max))))))
(defun previous-history-element (n)
- "Inserts the previous element of the minibuffer history into the minibuffer."
+ "Puts previous element of the minibuffer history in the minibuffer.
+With argument N, it uses the Nth previous element."
(interactive "p")
(next-history-element (- n)))
;; but we don't want to ask the question again.
(setq undo-extra-outer-limit (+ size 50000))
(if (let (use-dialog-box track-mouse executing-kbd-macro )
- (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
+ (yes-or-no-p (format "Buffer `%s' undo info is %d bytes long; discard it? "
(buffer-name) size)))
(progn (setq buffer-undo-list nil)
(setq undo-extra-outer-limit nil)
nil))
(display-warning '(undo discard-info)
(concat
- (format "Buffer %s undo info was %d bytes long.\n"
+ (format "Buffer `%s' undo info was %d bytes long.\n"
(buffer-name) size)
"The undo info was discarded because it exceeded \
`undo-outer-limit'.
If this variable is nil, no filtering is performed.")
-(defun filter-buffer-substring (beg end &optional delete)
+(defun filter-buffer-substring (beg end &optional delete noprops)
"Return the buffer substring between BEG and END, after filtering.
The buffer substring is passed through each of the filter
functions in `buffer-substring-filters', and the value from the
If DELETE is non-nil, the text between BEG and END is deleted
from the buffer.
+If NOPROPS is non-nil, final string returned does not include
+text properties, while the string passed to the filters still
+includes text properties from the buffer text.
+
Point is temporarily set to BEG before calling
`buffer-substring-filters', in case the functions need to know
where the text came from.
-This function should be used instead of `buffer-substring' or
-`delete-and-extract-region' when you want to allow filtering to
-take place. For example, major or minor modes can use
-`buffer-substring-filters' to extract characters that are special
-to a buffer, and should not be copied into other buffers."
- (save-excursion
- (goto-char beg)
- (let ((string (if delete (delete-and-extract-region beg end)
- (buffer-substring beg end))))
- (dolist (filter buffer-substring-filters string)
- (setq string (funcall filter string))))))
+This function should be used instead of `buffer-substring',
+`buffer-substring-no-properties', or `delete-and-extract-region'
+when you want to allow filtering to take place. For example,
+major or minor modes can use `buffer-substring-filters' to
+extract characters that are special to a buffer, and should not
+be copied into other buffers."
+ (cond
+ ((or delete buffer-substring-filters)
+ (save-excursion
+ (goto-char beg)
+ (let ((string (if delete (delete-and-extract-region beg end)
+ (buffer-substring beg end))))
+ (dolist (filter buffer-substring-filters)
+ (setq string (funcall filter string)))
+ (if noprops
+ (set-text-properties 0 (length string) nil string))
+ string)))
+ (noprops
+ (buffer-substring-no-properties beg end))
+ (t
+ (buffer-substring beg end))))
+
;;;; Window system cut and paste hooks.
(put 'text-read-only 'error-message "Text is read-only")
(defun kill-region (beg end &optional yank-handler)
- "Kill between point and mark.
-The text is deleted but saved in the kill ring.
+ "Kill (\"cut\") text between point and mark.
+This deletes the text from the buffer and saves it in the kill ring.
The command \\[yank] can retrieve it from there.
\(If you want to kill and then yank immediately, use \\[kill-ring-save].)
nil)
(defun yank (&optional arg)
- "Reinsert the last stretch of killed text.
+ "Reinsert (\"paste\") the last stretch of killed text.
More precisely, reinsert the stretch of killed text most recently
killed OR yanked. Put point at end, and set mark at beginning.
With just \\[universal-argument] as argument, same but put point at beginning (and mark at end).
\\[universal-argument] \\[set-mark-command], unconditionally
set mark where point is.
+Setting the mark also sets the \"region\", which is the closest
+equivalent in Emacs to what some editors call the \"selection\".
+
Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes. See the documentation of `set-mark' for more information."
(interactive "P")
To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(interactive "p")
(or arg (setq arg 1))
-
+
(let ((orig (point)))
;; Move by lines, if ARG is not 1 (the default).
:group 'paren-blinking)
(defcustom blink-matching-paren-dont-ignore-comments nil
- "*Non-nil means `blink-matching-paren' will not ignore comments."
+ "*nil means `blink-matching-paren' ignores comments.
+More precisely, when looking for the matching parenthesis,
+it skips the contents of comments that end before point."
:type 'boolean
:group 'paren-blinking)