aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/simple.el9
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.
1235This option makes a difference in Transient Mark mode.
1236When the option is non-nil, deactivation of the mark
1237turns off region highlighting, but commands that use the mark
1238behave 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.
1235If optional argument FORCE is non-nil, access the mark value 1242If optional argument FORCE is non-nil, access the mark value
@@ -1238,7 +1245,7 @@ if there is no mark at all.
1238 1245
1239If you are using this in an editing command, you are most likely making 1246If you are using this in an editing command, you are most likely making
1240a mistake; see the documentation of `set-mark'." 1247a 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