+2008-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el (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.
+
2008-04-02 Alan Mackenzie <acm@muc.de>
- * progmodes/cc-cmds.el (c-defun-name, c-cpp-define-name): New
- optimised functions to get the name of the current defun/macro.
+ * progmodes/cc-cmds.el (c-defun-name, c-cpp-define-name):
+ New optimised functions to get the name of the current defun/macro.
* add-log.el (add-log-current-defun): Move the functionality which
gets the current function name for C like modes to cc-cmds.el,
* simple.el (deactivate-mark): When the mark is temporarily
active, restore the original value of transient-mark-mode.
- (set-mark-command): First deactivate the mark if was temporarily
- active.
+ (set-mark-command): First deactivate the mark if was temporarily active.
(exchange-point-and-mark): Reactivate the mark if it was
temporarily active.
(handle-shift-selection): New fun.
2008-04-02 Michael Albinus <michael.albinus@gmx.de>
- * net/tramp.el (tramp-make-tramp-temp-file): Use
- `tramp-drop-volume-letter' for the local file name part.
+ * net/tramp.el (tramp-make-tramp-temp-file):
+ Use `tramp-drop-volume-letter' for the local file name part.
2008-04-02 Dan Nicolaescu <dann@ics.uci.edu>
2008-04-01 Jari Aalto <jari.aalto@cante.net>
- * find-dired.el (find-dired-filter): Align columns by padding file
- sizes.
+ * find-dired.el (find-dired-filter): Align columns by padding file sizes.
2008-04-01 Jason Rumney <jasonr@gnu.org>
\(goto-char (point-min)) is faster and avoids clobbering the mark."
(interactive "^P")
(or (consp arg)
- (and transient-mark-mode mark-active)
+ (region-active-p)
(push-mark))
(let ((size (- (point-max) (point-min))))
(goto-char (if (and arg (not (consp arg)))
Don't use this command in Lisp programs!
\(goto-char (point-max)) is faster and avoids clobbering the mark."
(interactive "^P")
- (or (consp arg)
- (and transient-mark-mode mark-active)
- (push-mark))
+ (or (consp arg) (region-active-p) (push-mark))
(let ((size (- (point-max) (point-min))))
(goto-char (if (and arg (not (consp arg)))
(- (point-max)
(if window (select-window window)
(switch-to-buffer-other-window buffer))))
;; Leave mark at previous position
- (or (and transient-mark-mode mark-active)
- (push-mark))
+ (or (region-active-p) (push-mark))
;; Move to the specified line number in that buffer.
(save-restriction
(widen)
;; it shows nothing else happened in between.
(gethash list undo-equiv-table))))
(setq undo-in-region
- (if transient-mark-mode mark-active (and arg (not (numberp arg)))))
+ (or (region-active-p) (and arg (not (numberp arg)))))
(if undo-in-region
(undo-start (region-beginning) (region-end))
(undo-start))
(if next (setq equiv next))))
(setq pending-undo-list equiv)))
(undo-more
- (if (or transient-mark-mode (numberp arg))
+ (if (numberp arg)
(prefix-numeric-value arg)
1))
;; Record the fact that the just-generated undo records come from an
(if (eq last-command 'kill-region)
(kill-append (filter-buffer-substring beg end) (< end beg))
(kill-new (filter-buffer-substring beg end)))
- (if transient-mark-mode
- (setq deactivate-mark t))
+ (setq deactivate-mark t)
nil)
(defun kill-ring-save (beg end)
;; look like a C-g typed as a command.
(inhibit-quit t))
(if (pos-visible-in-window-p other-end (selected-window))
- (unless (and transient-mark-mode
+ ;; Swap point-and-mark quickly so as to show the region that
+ ;; was selected. Don't do it if the region is highlighted.
+ (unless (and (region-active-p)
(face-background 'region))
;; Swap point and mark.
(set-marker (mark-marker) (point) (current-buffer))
test whether to do that.
This function also obeys `use-empty-active-region'."
- (and transient-mark-mode mark-active
+ (and (region-active-p)
(or use-empty-active-region (> (region-end) (region-beginning)))))
(defun region-active-p ()
(interactive "P\np")
(cond ((and allow-extend
(or (and (eq last-command this-command) (mark t))
- (and transient-mark-mode mark-active)))
+ (region-active-p)))
(setq arg (if arg (prefix-numeric-value arg)
(if (< (mark) (point)) -1 1)))
(set-mark
(abort-recursive-edit))
(current-prefix-arg
nil)
- ((and transient-mark-mode mark-active)
+ ((region-active-p)
(deactivate-mark))
((> (recursion-depth) 0)
(exit-recursive-edit))