diff options
| author | Richard M. Stallman | 1993-07-26 07:31:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-07-26 07:31:11 +0000 |
| commit | fcadf1c77d05374e6a8f0dc46cca077086e8a939 (patch) | |
| tree | 8244da975c814bb7f5d20ebed7c85436a39cdf8a | |
| parent | 3bbf636395b25f35d1c2e9b7a4bc57bc798a1cfd (diff) | |
| download | emacs-fcadf1c77d05374e6a8f0dc46cca077086e8a939.tar.gz emacs-fcadf1c77d05374e6a8f0dc46cca077086e8a939.zip | |
(kill-ring-save): Delete spurious `message' call.
(set-mark): If POS is nil, call deactivate-mark.
| -rw-r--r-- | lisp/simple.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 1739c393945..1a4dfb5a9a7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1095,9 +1095,7 @@ system cut and paste." | |||
| 1095 | ;; If user quit, deactivate the mark | 1095 | ;; If user quit, deactivate the mark |
| 1096 | ;; as C-g would as a command. | 1096 | ;; as C-g would as a command. |
| 1097 | (and quit-flag mark-active | 1097 | (and quit-flag mark-active |
| 1098 | (progn | 1098 | (deactivate-mark))) |
| 1099 | (message "foo") ;XXX what is this here for? --roland | ||
| 1100 | (deactivate-mark)))) | ||
| 1101 | (let* ((killed-text (current-kill 0)) | 1099 | (let* ((killed-text (current-kill 0)) |
| 1102 | (message-len (min (length killed-text) 40))) | 1100 | (message-len (min (length killed-text) 40))) |
| 1103 | (if (= (point) beg) | 1101 | (if (= (point) beg) |
| @@ -1262,6 +1260,7 @@ a mistake; see the documentation of `set-mark'." | |||
| 1262 | ;; run deactivate-mark-hook. This shorthand should simplify. | 1260 | ;; run deactivate-mark-hook. This shorthand should simplify. |
| 1263 | (defsubst deactivate-mark () | 1261 | (defsubst deactivate-mark () |
| 1264 | "Deactivate the mark by setting `mark-active' to nil. | 1262 | "Deactivate the mark by setting `mark-active' to nil. |
| 1263 | \(That makes a difference only in Transient Mark mode.) | ||
| 1265 | Also runs the hook `deactivate-mark-hook'." | 1264 | Also runs the hook `deactivate-mark-hook'." |
| 1266 | (setq mark-active nil) | 1265 | (setq mark-active nil) |
| 1267 | (run-hooks 'deactivate-mark-hook)) | 1266 | (run-hooks 'deactivate-mark-hook)) |
| @@ -1283,9 +1282,13 @@ store it in a Lisp variable. Example: | |||
| 1283 | 1282 | ||
| 1284 | (let ((beg (point))) (forward-line 1) (delete-region beg (point)))." | 1283 | (let ((beg (point))) (forward-line 1) (delete-region beg (point)))." |
| 1285 | 1284 | ||
| 1286 | (setq mark-active t) | 1285 | (if pos |
| 1287 | (run-hooks 'activate-mark-hook) | 1286 | (progn |
| 1288 | (set-marker (mark-marker) pos (current-buffer))) | 1287 | (setq mark-active t) |
| 1288 | (run-hooks 'activate-mark-hook) | ||
| 1289 | (set-marker (mark-marker) pos (current-buffer))) | ||
| 1290 | (deactivate-mark) | ||
| 1291 | (set-marker (mark-marker) pos (current-buffer)))) | ||
| 1289 | 1292 | ||
| 1290 | (defvar mark-ring nil | 1293 | (defvar mark-ring nil |
| 1291 | "The list of saved former marks of the current buffer, | 1294 | "The list of saved former marks of the current buffer, |