]> git.eshelyaron.com Git - emacs.git/commitdiff
(allout-region-active-p): Renamed from my-region-active-p. Use `use-region-p'.
authorRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2007 23:00:07 +0000 (23:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 25 Dec 2007 23:00:07 +0000 (23:00 +0000)
(allout-write-file-hook-handler): Simplify code.

etc/NEWS
lisp/ChangeLog
lisp/allout.el

index 56ddf7531ce4b129e64b5d1133705cdf0ca3922b..c71fb2ae349809d0eb9e97871d9aceeeb18c50d0 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -450,9 +450,14 @@ variable as having been made within Custom.
 ** `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
index af3dc4344486ba6b35d805b7cfadaa67aa997f35..f4533083e2c913ce25f45fa33763539410a1fc66 100644 (file)
 
 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.
index 8878c56735fb730fbd2435ac3bf2440e273b86f7..12c1b3941c3bf46a82bb1a9b4961e5ca760c8616 100644 (file)
@@ -1501,11 +1501,11 @@ See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.")
             (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 ()
@@ -5457,11 +5457,11 @@ header and body.  The elements of that list are:
                                 (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
@@ -5494,7 +5494,7 @@ Defaults:
                                        ; 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