(allout-write-file-hook-handler): Simplify code.
** `frame-inherited-parameters' lets new frames inherit parameters from
the selected frame.
-** Commands should use `region-active-p' to test whether there is
+** Commands should use `use-region-p' to test whether there is
an active region that they should operate on.
+** `region-active-p' returns non-nil when Transient Mark mode
+is enabled and there is an active region. This is NOT the best function
+to use to test whether a command should operate on the region instead
+of the usual behavior -- for that, use `use-region-p'.
+
** 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-25 Richard Stallman <rms@gnu.org>
+ * allout.el (allout-region-active-p): Renamed from my-region-active-p.
+ Use `use-region-p'.
+ (allout-write-file-hook-handler): Simplify code.
+
+ * ps-print.el (ps-mark-active-p): Function deleted.
+ (ps-print-preprint-region): Use (mark) for the error check.
+
+ * tooltip.el (tooltip-region-active-p): Use `use-region-p'.
+
+ * winner.el (winner-active-region): Use `mark-active' if it's defined.
+
+ * progmodes/ada-mode.el (ada-region-selected): Use `use-region-p'.
+
+ * textmodes/org.el (org-region-active-p): Use `use-region-p'.
+
+ * progmodes/idlwave.el (idlwave-region-active-p): Use `use-region-p'.
+
+ * textmodes/reftex.el (reftex-region-active-p): Use `use-region-p'.
+
+ * progmodes/cc-defs.el (c-region-is-active-p):
+ Use `mark-active' if it's defined.
+
+ * progmodes/cc-cmds.el (c-indent-line-or-region):
+ Pass prefix arg to `c-indent-command'. Use `use-region-p'.
+
* simple.el (select-active-regions): New option.
(set-mark): Obey it.
(yank-pop-change-selection): New option.
(current-kill): Obey it.
+ * simple.el (use-region-p): Renamed from `region-active-p'.
+ (region-active-p): New function.
+
2007-12-25 David Golden <david.delaharpe.golden@gmail.com> (tiny change)
* term/x-win.el (x-select-enable-primary): New option.
(condition-case failure
(setq allout-after-save-decrypt
(allout-encrypt-decrypted except-mark))
- (error (progn
- (message
- "allout-write-file-hook-handler suppressing error %s"
- failure)
- (sit-for 2))))))
+ (message "allout-write-file-hook-handler suppressing error %s"
+ failure)
+ (sit-for 2)
+ (error "allout-write-file-hook-handler suppressing error %s"
+ failure))))
))
nil)
;;;_ > allout-auto-save-hook-handler ()
(cdr format)))))))
;; Put the list with first at front, to last at back:
(nreverse result))))
-;;;_ > my-region-active-p ()
-(defmacro my-region-active-p ()
- (if (fboundp 'region-active-p)
- '(region-active-p)
- 'mark-active))
+;;;_ > allout-region-active-p ()
+(defmacro allout-region-active-p ()
+ (if (fboundp 'use-region-p)
+ '(use-region-p)
+ '(region-active-p)))
;;;_ > allout-process-exposed (&optional func from to frombuf
;;; tobuf format)
(defun allout-process-exposed (&optional func from to frombuf tobuf
; defaulting if necessary:
(if (not func) (setq func 'allout-insert-listified))
(if (not (and from to))
- (if (my-region-active-p)
+ (if (allout-region-active-p)
(setq from (region-beginning) to (region-end))
(setq from (point-min) to (point-max))))
(if frombuf