Mercurial > emacs
changeset 61986:91b85d61710d
(widen-automatically): New variable.
(pop-global-mark): Obey widen-automatically.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 01 May 2005 18:54:00 +0000 |
parents | 2afdce105d7a |
children | aabdcfa2f3d6 |
files | lisp/simple.el |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Sun May 01 18:51:39 2005 +0000 +++ b/lisp/simple.el Sun May 01 18:54:00 2005 +0000 @@ -3201,6 +3201,14 @@ commands which are sensitive to the Transient Mark mode." :global t :group 'editing-basics :require nil) +(defvar widen-automatically t + "Non-nil means it is ok for commands to call `widen' when they want to. +Some commands will do this in order to go to positions outside +the current accessible part of the buffer. + +If `widen-automatically' is nil, these commands will do something else +as a fallback, and won't change the buffer bounds.") + (defun pop-global-mark () "Pop off global mark ring and jump to the top location." (interactive) @@ -3217,7 +3225,9 @@ (set-buffer buffer) (or (and (>= position (point-min)) (<= position (point-max))) - (widen)) + (if widen-automatically + (error "Global mark position is outside accessible part of buffer") + (widen))) (goto-char position) (switch-to-buffer buffer)))