diff options
| author | Stefan Monnier | 2008-04-03 02:16:17 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-04-03 02:16:17 +0000 |
| commit | d34c311ab4d865e0bbfd0d9c81719580f8bdacf4 (patch) | |
| tree | 319ee1717b24d055b6c6d8aa4aa4677f63bb26f3 | |
| parent | 57f31575dd120ee7059b57a49181333866e923ec (diff) | |
| download | emacs-d34c311ab4d865e0bbfd0d9c81719580f8bdacf4.tar.gz emacs-d34c311ab4d865e0bbfd0d9c81719580f8bdacf4.zip | |
(beginning-of-buffer, end-of-buffer, goto-line, undo)
(copy-region-as-kill, kill-ring-save, use-region-p, mark-word)
(keyboard-escape-quit): Check region-active-p i.s.o transient-mark-mode.
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/simple.el | 26 |
2 files changed, 24 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 45dd978a524..2ad26207d6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | 2008-04-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * simple.el (beginning-of-buffer, end-of-buffer, goto-line, undo) | ||
| 4 | (copy-region-as-kill, kill-ring-save, use-region-p, mark-word) | ||
| 5 | (keyboard-escape-quit): Check region-active-p i.s.o transient-mark-mode. | ||
| 6 | |||
| 1 | 2008-04-02 Alan Mackenzie <acm@muc.de> | 7 | 2008-04-02 Alan Mackenzie <acm@muc.de> |
| 2 | 8 | ||
| 3 | * progmodes/cc-cmds.el (c-defun-name, c-cpp-define-name): New | 9 | * progmodes/cc-cmds.el (c-defun-name, c-cpp-define-name): |
| 4 | optimised functions to get the name of the current defun/macro. | 10 | New optimised functions to get the name of the current defun/macro. |
| 5 | 11 | ||
| 6 | * add-log.el (add-log-current-defun): Move the functionality which | 12 | * add-log.el (add-log-current-defun): Move the functionality which |
| 7 | gets the current function name for C like modes to cc-cmds.el, | 13 | gets the current function name for C like modes to cc-cmds.el, |
| @@ -11,8 +17,7 @@ | |||
| 11 | 17 | ||
| 12 | * simple.el (deactivate-mark): When the mark is temporarily | 18 | * simple.el (deactivate-mark): When the mark is temporarily |
| 13 | active, restore the original value of transient-mark-mode. | 19 | active, restore the original value of transient-mark-mode. |
| 14 | (set-mark-command): First deactivate the mark if was temporarily | 20 | (set-mark-command): First deactivate the mark if was temporarily active. |
| 15 | active. | ||
| 16 | (exchange-point-and-mark): Reactivate the mark if it was | 21 | (exchange-point-and-mark): Reactivate the mark if it was |
| 17 | temporarily active. | 22 | temporarily active. |
| 18 | (handle-shift-selection): New fun. | 23 | (handle-shift-selection): New fun. |
| @@ -35,8 +40,8 @@ | |||
| 35 | 40 | ||
| 36 | 2008-04-02 Michael Albinus <michael.albinus@gmx.de> | 41 | 2008-04-02 Michael Albinus <michael.albinus@gmx.de> |
| 37 | 42 | ||
| 38 | * net/tramp.el (tramp-make-tramp-temp-file): Use | 43 | * net/tramp.el (tramp-make-tramp-temp-file): |
| 39 | `tramp-drop-volume-letter' for the local file name part. | 44 | Use `tramp-drop-volume-letter' for the local file name part. |
| 40 | 45 | ||
| 41 | 2008-04-02 Dan Nicolaescu <dann@ics.uci.edu> | 46 | 2008-04-02 Dan Nicolaescu <dann@ics.uci.edu> |
| 42 | 47 | ||
| @@ -95,8 +100,7 @@ | |||
| 95 | 100 | ||
| 96 | 2008-04-01 Jari Aalto <jari.aalto@cante.net> | 101 | 2008-04-01 Jari Aalto <jari.aalto@cante.net> |
| 97 | 102 | ||
| 98 | * find-dired.el (find-dired-filter): Align columns by padding file | 103 | * find-dired.el (find-dired-filter): Align columns by padding file sizes. |
| 99 | sizes. | ||
| 100 | 104 | ||
| 101 | 2008-04-01 Jason Rumney <jasonr@gnu.org> | 105 | 2008-04-01 Jason Rumney <jasonr@gnu.org> |
| 102 | 106 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 4f2221ee94e..13517b8b916 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -759,7 +759,7 @@ Don't use this command in Lisp programs! | |||
| 759 | \(goto-char (point-min)) is faster and avoids clobbering the mark." | 759 | \(goto-char (point-min)) is faster and avoids clobbering the mark." |
| 760 | (interactive "^P") | 760 | (interactive "^P") |
| 761 | (or (consp arg) | 761 | (or (consp arg) |
| 762 | (and transient-mark-mode mark-active) | 762 | (region-active-p) |
| 763 | (push-mark)) | 763 | (push-mark)) |
| 764 | (let ((size (- (point-max) (point-min)))) | 764 | (let ((size (- (point-max) (point-min)))) |
| 765 | (goto-char (if (and arg (not (consp arg))) | 765 | (goto-char (if (and arg (not (consp arg))) |
| @@ -783,9 +783,7 @@ of the accessible part of the buffer. | |||
| 783 | Don't use this command in Lisp programs! | 783 | Don't use this command in Lisp programs! |
| 784 | \(goto-char (point-max)) is faster and avoids clobbering the mark." | 784 | \(goto-char (point-max)) is faster and avoids clobbering the mark." |
| 785 | (interactive "^P") | 785 | (interactive "^P") |
| 786 | (or (consp arg) | 786 | (or (consp arg) (region-active-p) (push-mark)) |
| 787 | (and transient-mark-mode mark-active) | ||
| 788 | (push-mark)) | ||
| 789 | (let ((size (- (point-max) (point-min)))) | 787 | (let ((size (- (point-max) (point-min)))) |
| 790 | (goto-char (if (and arg (not (consp arg))) | 788 | (goto-char (if (and arg (not (consp arg))) |
| 791 | (- (point-max) | 789 | (- (point-max) |
| @@ -861,8 +859,7 @@ If there's a number in the buffer at point, it is the default for ARG." | |||
| 861 | (if window (select-window window) | 859 | (if window (select-window window) |
| 862 | (switch-to-buffer-other-window buffer)))) | 860 | (switch-to-buffer-other-window buffer)))) |
| 863 | ;; Leave mark at previous position | 861 | ;; Leave mark at previous position |
| 864 | (or (and transient-mark-mode mark-active) | 862 | (or (region-active-p) (push-mark)) |
| 865 | (push-mark)) | ||
| 866 | ;; Move to the specified line number in that buffer. | 863 | ;; Move to the specified line number in that buffer. |
| 867 | (save-restriction | 864 | (save-restriction |
| 868 | (widen) | 865 | (widen) |
| @@ -1619,7 +1616,7 @@ as an argument limits undo to changes within the current region." | |||
| 1619 | ;; it shows nothing else happened in between. | 1616 | ;; it shows nothing else happened in between. |
| 1620 | (gethash list undo-equiv-table)))) | 1617 | (gethash list undo-equiv-table)))) |
| 1621 | (setq undo-in-region | 1618 | (setq undo-in-region |
| 1622 | (if transient-mark-mode mark-active (and arg (not (numberp arg))))) | 1619 | (or (region-active-p) (and arg (not (numberp arg))))) |
| 1623 | (if undo-in-region | 1620 | (if undo-in-region |
| 1624 | (undo-start (region-beginning) (region-end)) | 1621 | (undo-start (region-beginning) (region-end)) |
| 1625 | (undo-start)) | 1622 | (undo-start)) |
| @@ -1641,7 +1638,7 @@ as an argument limits undo to changes within the current region." | |||
| 1641 | (if next (setq equiv next)))) | 1638 | (if next (setq equiv next)))) |
| 1642 | (setq pending-undo-list equiv))) | 1639 | (setq pending-undo-list equiv))) |
| 1643 | (undo-more | 1640 | (undo-more |
| 1644 | (if (or transient-mark-mode (numberp arg)) | 1641 | (if (numberp arg) |
| 1645 | (prefix-numeric-value arg) | 1642 | (prefix-numeric-value arg) |
| 1646 | 1)) | 1643 | 1)) |
| 1647 | ;; Record the fact that the just-generated undo records come from an | 1644 | ;; Record the fact that the just-generated undo records come from an |
| @@ -2857,8 +2854,7 @@ This command's old key binding has been given to `kill-ring-save'." | |||
| 2857 | (if (eq last-command 'kill-region) | 2854 | (if (eq last-command 'kill-region) |
| 2858 | (kill-append (filter-buffer-substring beg end) (< end beg)) | 2855 | (kill-append (filter-buffer-substring beg end) (< end beg)) |
| 2859 | (kill-new (filter-buffer-substring beg end))) | 2856 | (kill-new (filter-buffer-substring beg end))) |
| 2860 | (if transient-mark-mode | 2857 | (setq deactivate-mark t) |
| 2861 | (setq deactivate-mark t)) | ||
| 2862 | nil) | 2858 | nil) |
| 2863 | 2859 | ||
| 2864 | (defun kill-ring-save (beg end) | 2860 | (defun kill-ring-save (beg end) |
| @@ -2883,7 +2879,9 @@ visual feedback indicating the extent of the region being copied." | |||
| 2883 | ;; look like a C-g typed as a command. | 2879 | ;; look like a C-g typed as a command. |
| 2884 | (inhibit-quit t)) | 2880 | (inhibit-quit t)) |
| 2885 | (if (pos-visible-in-window-p other-end (selected-window)) | 2881 | (if (pos-visible-in-window-p other-end (selected-window)) |
| 2886 | (unless (and transient-mark-mode | 2882 | ;; Swap point-and-mark quickly so as to show the region that |
| 2883 | ;; was selected. Don't do it if the region is highlighted. | ||
| 2884 | (unless (and (region-active-p) | ||
| 2887 | (face-background 'region)) | 2885 | (face-background 'region)) |
| 2888 | ;; Swap point and mark. | 2886 | ;; Swap point and mark. |
| 2889 | (set-marker (mark-marker) (point) (current-buffer)) | 2887 | (set-marker (mark-marker) (point) (current-buffer)) |
| @@ -3453,7 +3451,7 @@ to the region instead. Such commands should use this subroutine to | |||
| 3453 | test whether to do that. | 3451 | test whether to do that. |
| 3454 | 3452 | ||
| 3455 | This function also obeys `use-empty-active-region'." | 3453 | This function also obeys `use-empty-active-region'." |
| 3456 | (and transient-mark-mode mark-active | 3454 | (and (region-active-p) |
| 3457 | (or use-empty-active-region (> (region-end) (region-beginning))))) | 3455 | (or use-empty-active-region (> (region-end) (region-beginning))))) |
| 3458 | 3456 | ||
| 3459 | (defun region-active-p () | 3457 | (defun region-active-p () |
| @@ -4445,7 +4443,7 @@ it marks the next ARG words after the ones already marked." | |||
| 4445 | (interactive "P\np") | 4443 | (interactive "P\np") |
| 4446 | (cond ((and allow-extend | 4444 | (cond ((and allow-extend |
| 4447 | (or (and (eq last-command this-command) (mark t)) | 4445 | (or (and (eq last-command this-command) (mark t)) |
| 4448 | (and transient-mark-mode mark-active))) | 4446 | (region-active-p))) |
| 4449 | (setq arg (if arg (prefix-numeric-value arg) | 4447 | (setq arg (if arg (prefix-numeric-value arg) |
| 4450 | (if (< (mark) (point)) -1 1))) | 4448 | (if (< (mark) (point)) -1 1))) |
| 4451 | (set-mark | 4449 | (set-mark |
| @@ -4986,7 +4984,7 @@ or go back to just one window (by deleting all but the selected window)." | |||
| 4986 | (abort-recursive-edit)) | 4984 | (abort-recursive-edit)) |
| 4987 | (current-prefix-arg | 4985 | (current-prefix-arg |
| 4988 | nil) | 4986 | nil) |
| 4989 | ((and transient-mark-mode mark-active) | 4987 | ((region-active-p) |
| 4990 | (deactivate-mark)) | 4988 | (deactivate-mark)) |
| 4991 | ((> (recursion-depth) 0) | 4989 | ((> (recursion-depth) 0) |
| 4992 | (exit-recursive-edit)) | 4990 | (exit-recursive-edit)) |