** TAB now indents the region if the region is active and
`transient-mark-mode' is turned on.
+** `use-empty-active-region' controls whether an empty active region
+in Transient Mark mode should make commands operate on that empty region.
+
** C-z now invokes `suspend-frame', C-x C-c now invokes
`save-buffers-kill-terminal'.
** `frame-inherited-parameters' lets new frames inherit parameters from
the selected frame.
+** Commands should use `region-active-p' to test whether there is
+an active region that they should operate on.
+
** New keymap `input-decode-map' overrides like key-translation-map, but
applies before function-key-map. Also it is terminal-local contrary to
key-translation-map. Terminal-specific key-sequences are generally added to
2007-12-23 Richard Stallman <rms@gnu.org>
+ * simple.el (region-active-p): New function.
+ (use-empty-active-region): New variable.
+
* dired-aux.el (dired): Load dired.el at run time too.
2007-12-23 Juri Linkov <juri@jurta.org>
(run-hooks 'deactivate-mark-hook)
(set-marker (mark-marker) nil)))
+(defcustom use-empty-active-region nil
+ "If non-nil, an active region takes control even if empty.
+This applies to certain commands which, in Transient Mark mode,
+apply to the active region if there is one. If the setting is t,
+these commands apply to an empty active region if there is one.
+If the setting is nil, these commands treat an empty active
+region as if it were not active."
+ :type 'boolean
+ :version "23.1"
+ :group 'editing-basics)
+
+(defun region-active-p ()
+ "Return t if certain commands should apply to the region.
+Certain commands normally apply to text near point,
+but in Transient Mark mode when the mark is active they apply
+to the region instead. Such commands should use this subroutine to
+test whether to do that.
+
+This function also obeys `use-empty-active-region'."
+ (and transient-mark-mode mark-active
+ (or use-empty-active-region (> (region-end) (region-beginning)))))
+
(defvar mark-ring nil
"The list of former marks of the current buffer, most recent first.")
(make-variable-buffer-local 'mark-ring)