Mercurial > emacs
comparison lisp/simple.el @ 3029:2bf7bd92bd43
(shell-command): Don't activate mark even momentarily.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 24 May 1993 18:46:13 +0000 |
parents | 518509536741 |
children | dd65780e6246 |
comparison
equal
deleted
inserted
replaced
3028:cf9379f91ea1 | 3029:2bf7bd92bd43 |
---|---|
646 ;; "if ($?prompt) exit" before things which are not useful | 646 ;; "if ($?prompt) exit" before things which are not useful |
647 ;; non-interactively. Besides, if someone wants their other | 647 ;; non-interactively. Besides, if someone wants their other |
648 ;; aliases for shell commands then they can still have them. | 648 ;; aliases for shell commands then they can still have them. |
649 (call-process shell-file-name nil t nil | 649 (call-process shell-file-name nil t nil |
650 "-c" command) | 650 "-c" command) |
651 (exchange-point-and-mark)) | 651 ;; This is like exchange-point-and-mark, but doesn't activate the mark. |
652 ;; It is cleaner to avoid activation, even though the command | |
653 ;; loop would deactivate the mark because we inserted text. | |
654 (goto-char (prog1 (mark t) | |
655 (set-marker (mark-marker) (point) | |
656 (current-buffer))))) | |
652 ;; Preserve the match data in case called from a program. | 657 ;; Preserve the match data in case called from a program. |
653 (let ((data (match-data))) | 658 (let ((data (match-data))) |
654 (unwind-protect | 659 (unwind-protect |
655 (if (string-match "[ \t]*&[ \t]*$" command) | 660 (if (string-match "[ \t]*&[ \t]*$" command) |
656 ;; Command ending with ampersand means asynchronous. | 661 ;; Command ending with ampersand means asynchronous. |