diff options
| author | Richard M. Stallman | 1993-06-30 20:58:28 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-30 20:58:28 +0000 |
| commit | 0bf0c097bd2d63421fa65deaab18845e0a088372 (patch) | |
| tree | 26d10c22575906aac96b1eae0c466b01ec1ff54c | |
| parent | 46b3623d72e92ccef7c36093cf45a713ae023622 (diff) | |
| download | emacs-0bf0c097bd2d63421fa65deaab18845e0a088372.tar.gz emacs-0bf0c097bd2d63421fa65deaab18845e0a088372.zip | |
(mark-even-if-inactive): New variable.
(mark): Test it.
| -rw-r--r-- | lisp/simple.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index c4d065a1647..b4eda5b4d9b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1230,6 +1230,13 @@ START and END specify the portion of the current buffer to be copied." | |||
| 1230 | (save-excursion | 1230 | (save-excursion |
| 1231 | (insert-buffer-substring oldbuf start end))))) | 1231 | (insert-buffer-substring oldbuf start end))))) |
| 1232 | 1232 | ||
| 1233 | (defvar mark-even-if-inactive nil | ||
| 1234 | "*Non-nil means you can use the mark even when inactive. | ||
| 1235 | This option makes a difference in Transient Mark mode. | ||
| 1236 | When the option is non-nil, deactivation of the mark | ||
| 1237 | turns off region highlighting, but commands that use the mark | ||
| 1238 | behave as if the mark were still active.") | ||
| 1239 | |||
| 1233 | (defun mark (&optional force) | 1240 | (defun mark (&optional force) |
| 1234 | "Return this buffer's mark value as integer; error if mark inactive. | 1241 | "Return this buffer's mark value as integer; error if mark inactive. |
| 1235 | If optional argument FORCE is non-nil, access the mark value | 1242 | If optional argument FORCE is non-nil, access the mark value |
| @@ -1238,7 +1245,7 @@ if there is no mark at all. | |||
| 1238 | 1245 | ||
| 1239 | If you are using this in an editing command, you are most likely making | 1246 | If you are using this in an editing command, you are most likely making |
| 1240 | a mistake; see the documentation of `set-mark'." | 1247 | a mistake; see the documentation of `set-mark'." |
| 1241 | (if (or force mark-active) | 1248 | (if (or force mark-active mark-even-if-inactive) |
| 1242 | (marker-position (mark-marker)) | 1249 | (marker-position (mark-marker)) |
| 1243 | (error "The mark is not currently active"))) | 1250 | (error "The mark is not currently active"))) |
| 1244 | 1251 | ||