]> git.eshelyaron.com Git - emacs.git/commitdiff
* sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at):
authorDan Nicolaescu <dann@ics.uci.edu>
Thu, 24 Jan 2008 15:14:52 +0000 (15:14 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Thu, 24 Jan 2008 15:14:52 +0000 (15:14 +0000)
* message.el (message-beginning-of-line): Use featurep instead of bound
tests in order to resolve conditionals at compile time.

* textmodes/reftex-toc.el (reftex-toc-next, reftex-toc-previous)
(reftex-toc-restore-region):
* textmodes/reftex-index.el (reftex-index-initialize-phrases-buffer)
(reftex-index-phrases-apply-to-region):
* textmodes/ispell.el (ispell-word):
* progmodes/vhdl-mode.el (vhdl-keep-region-active):
* progmodes/pascal.el (pascal-mark-defun):
* progmodes/f90.el (f90-mark-subprogram, f90-indent-region)
(f90-fill-region):
* emulation/tpu-edt.el (tpu-set-mark):
* emulation/crisp.el (crisp-region-active):
* winner.el (winner-active-region):
* ansi-color.el (ansi-color-set-extent-face): Use featurep instead
of bound tests in order to resolve conditionals at compile time.

14 files changed:
lisp/ChangeLog
lisp/ansi-color.el
lisp/emulation/crisp.el
lisp/emulation/tpu-edt.el
lisp/gnus/ChangeLog
lisp/gnus/message.el
lisp/gnus/sieve.el
lisp/progmodes/f90.el
lisp/progmodes/pascal.el
lisp/progmodes/vhdl-mode.el
lisp/textmodes/ispell.el
lisp/textmodes/reftex-index.el
lisp/textmodes/reftex-toc.el
lisp/winner.el

index 18baed67097e413a73854b83e1384c12519a30cc..cb0e6acecdf7e15f0e833de10c5182bb6393a49b 100644 (file)
@@ -1,3 +1,20 @@
+2008-01-24  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * textmodes/reftex-toc.el (reftex-toc-next, reftex-toc-previous)
+       (reftex-toc-restore-region):
+       * textmodes/reftex-index.el (reftex-index-initialize-phrases-buffer)
+       (reftex-index-phrases-apply-to-region):
+       * textmodes/ispell.el (ispell-word):
+       * progmodes/vhdl-mode.el (vhdl-keep-region-active):
+       * progmodes/pascal.el (pascal-mark-defun):
+       * progmodes/f90.el (f90-mark-subprogram, f90-indent-region)
+       (f90-fill-region):
+       * emulation/tpu-edt.el (tpu-set-mark):
+       * emulation/crisp.el (crisp-region-active):
+       * winner.el (winner-active-region):
+       * ansi-color.el (ansi-color-set-extent-face): Use featurep instead
+       of bound tests in order to resolve conditionals at compile time.
+
 2008-01-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * delsel.el (delsel-unload-function): Don't use `remprop'; it is
index 530325cd24eb3df68d433ab43d564e46a7f524e7..db2818f31ed1b847f890c825e9a00301633c7925 100644 (file)
@@ -513,7 +513,7 @@ property."
 (defun ansi-color-set-extent-face (extent face)
   "Set the `face' property of EXTENT to FACE.
 XEmacs uses `set-extent-face', Emacs  uses `overlay-put'."
-  (if (fboundp 'set-extent-face)
+  (if (featurep 'xemacs)
       (set-extent-face extent face)
     (overlay-put extent 'face face)))
 
index b5fd7ee602c8a26243e071b0df7921cafc60a709..7c254da869afa81fa57f36390de4a057628d8d47 100644 (file)
@@ -148,7 +148,7 @@ does not load the scroll-all package."
 
 (defun crisp-region-active ()
   "Compatibility function to test for an active region."
-  (if (boundp 'zmacs-region-active-p)
+  (if (featurep 'xemacs)
       zmacs-region-active-p
     mark-active))
 
index ff0e6ad25eba7b4248417cd8b2106c9a003254cf..e9de0409aa49c41fd081fc1742b86b583186459f 100644 (file)
@@ -751,9 +751,7 @@ version of Emacs."
 Sets the mark at POS and activates the region according to the
 current version of Emacs."
   (set-mark pos)
-  ;; We use a separate `if' for the fboundp so the byte-compiler notices it
-  ;; and doesn't complain about the subsequent call.
-  (if (fboundp 'zmacs-activate-region) (if pos (zmacs-activate-region))))
+  (when (featurep 'xemacs) (when pos (zmacs-activate-region))))
 
 (defun tpu-string-prompt (prompt history-symbol)
   "Read a string with PROMPT."
index dbba5fd608eeb64eeb9f3f37aead4a9879ef5c3a..35347c8e71ae25b8d7cafe119bd32fbd42227c2e 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-24  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * sieve.el (sieve-make-overlay, sieve-overlay-put, sieve-overlays-at):
+       * message.el (message-beginning-of-line): Use featurep instead of bound
+       tests in order to resolve conditionals at compile time.
+
 2008-01-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-insert-mime-button): Don't decode description.
index 731d992428698fbfdf547a9604aa047f5d315c74..273d1c4ec5b919c70ac0be98c16cbea67d03bf8c 100644 (file)
@@ -5952,7 +5952,7 @@ beginning of header value.  Therefore, repeated calls will toggle point
 between beginning of field and beginning of line."
   (interactive "p")
   (let ((zrs 'zmacs-region-stays))
-    (when (and (interactive-p) (boundp zrs))
+    (when (and (featurep 'xemacs) (interactive-p) (boundp zrs))
       (set zrs t)))
   (if (and message-beginning-of-line
           (message-point-in-header-p))
index c05e9d1a356e0f999900dbddfa43b931c81db105..c32c44ae505485e8c6556669360c0e6bb94c97fe 100644 (file)
@@ -290,15 +290,15 @@ Server  : " server ":" (or port "2000") "
   (get-char-property (or pos (point)) 'script-name))
 
 (eval-and-compile
-  (defalias 'sieve-make-overlay (if (fboundp 'make-overlay)
-                                   'make-overlay
-                                 'make-extent))
-  (defalias 'sieve-overlay-put (if (fboundp 'overlay-put)
-                                  'overlay-put
-                                'set-extent-property))
-  (defalias 'sieve-overlays-at (if (fboundp 'overlays-at)
-                                  'overlays-at
-                                'extents-at)))
+  (defalias 'sieve-make-overlay (if (featurep 'xemacs)
+                                   'make-extent
+                                 'make-overlay))
+  (defalias 'sieve-overlay-put (if (featurep 'xemacs)
+                                  'set-extent-property
+                                'overlay-put))
+  (defalias 'sieve-overlays-at (if  (featurep 'xemacs)
+                                  'extents-at
+                                'overlays-at)))
 
 (defun sieve-highlight (on)
   "Turn ON or off highlighting on the current language overlay."
index df10b5ecd30258b503804f664280c20099e42743..2c152d91512d08629969c965cafe76aca4a20f49 100644 (file)
@@ -1681,7 +1681,7 @@ A block is a subroutine, if-endif, etc."
     (push-mark)
     (goto-char pos)
     (setq program (f90-beginning-of-subprogram))
-    (if (fboundp 'zmacs-activate-region)
+    (if (featurep 'xemacs)
         (zmacs-activate-region)
       (setq mark-active t
             deactivate-mark nil))
@@ -1866,7 +1866,7 @@ If run in the middle of a line, the line is not broken."
     (goto-char save-point)
     (set-marker end-region-mark nil)
     (set-marker save-point nil)
-    (if (fboundp 'zmacs-deactivate-region)
+    (if (featurep 'xemacs)
         (zmacs-deactivate-region)
       (deactivate-mark))))
 
@@ -1976,7 +1976,7 @@ Like `join-line', but handles F90 syntax."
             f90-cache-position (point)))
     (setq f90-cache-position nil)
     (set-marker end-region-mark nil)
-    (if (fboundp 'zmacs-deactivate-region)
+    (if (featurep 'xemacs)
         (zmacs-deactivate-region)
       (deactivate-mark))))
 \f
index 6dca919ba2505e8f20150f66fbdb97682d349d48..4c33b6b053ca02327923d39183227ed4dba301fb 100644 (file)
@@ -523,8 +523,8 @@ This puts the mark at the end, and point at the beginning."
   (pascal-end-of-defun)
   (push-mark (point))
   (pascal-beg-of-defun)
-  (if (fboundp 'zmacs-activate-region)
-      (zmacs-activate-region)))
+  (when (featurep 'xemacs)
+    (zmacs-activate-region)))
 
 (defun pascal-comment-area (start end)
   "Put the region into a Pascal comment.
index 98818ea83540bc9ef938ba881bcb37b92abe6595..72fda808053f2f6629c31b89194f4e9e256cc528 100644 (file)
@@ -2047,7 +2047,7 @@ your style, only those that are different from the default.")
 (defun vhdl-keep-region-active ()
   "Do whatever is necessary to keep the region active in XEmacs.
 Ignore byte-compiler warnings you might see."
-  (and (boundp 'zmacs-region-stays)
+  (and (featurep 'xemacs)
        (setq zmacs-region-stays t)))
 
 ;; `wildcard-to-regexp' is included only in XEmacs 21
index 813b26ee6e40f15c5e199f117399e816a0ac6f07..fcb1d2444ec8b8ab655f8d9da14843066ab73e91 100644 (file)
@@ -1627,7 +1627,7 @@ quit          spell session exited."
             (or quietly
                 (message "%s is correct"
                          (funcall ispell-format-word-function word)))
-            (and (fboundp 'extent-at)
+            (and (featurep 'xemacs)
                  (extent-at start)
                  (and (fboundp 'delete-extent)
                       (delete-extent (extent-at start)))))
@@ -1636,7 +1636,7 @@ quit          spell session exited."
                 (message "%s is correct because of root %s"
                          (funcall ispell-format-word-function word)
                          (funcall ispell-format-word-function poss)))
-            (and (fboundp 'extent-at)
+            (and (featurep 'xemacs)
                  (extent-at start)
                  (and (fboundp 'delete-extent)
                       (delete-extent (extent-at start)))))
index 2d489eb58969ab588a0f31832de05f076147bc35..15fba461fd3978ac7dda4e36e72dd2db9abbf696 100644 (file)
@@ -1243,8 +1243,9 @@ If the buffer is non-empty, delete the old header first."
           (beginning-of-line 2))
       (while (looking-at "^[ \t]*$")
           (beginning-of-line 2))          
-      (cond ((fboundp 'zmacs-activate-region) (zmacs-activate-region))
-            ((boundp 'make-active) (setq mark-active t)))
+      (if (featurep 'xemacs) 
+         (zmacs-activate-region)
+       (setq mark-active t))
       (if (yes-or-no-p "Delete and rebuild header? ")
           (delete-region (point-min) (point))))
 
@@ -1495,8 +1496,9 @@ index the new part without having to go over the unchanged parts again."
       (unwind-protect
           (progn
             ;; Hide the region highlighting
-            (cond ((fboundp 'zmacs-deactivate-region) (zmacs-deactivate-region))
-                  ((fboundp 'deactivate-mark) (deactivate-mark)))
+            (if (featurep 'xemacs)
+               (zmacs-deactivate-region)
+             (deactivate-mark))
             (delete-other-windows)
             (reftex-index-visit-phrases-buffer)
             (reftex-index-all-phrases))
index 0e501fdf23ee1b9ec1d90f0032b79f0833de8342..e57e9a59a735a559494ce1bd0fe298324bcbc90a 100644 (file)
@@ -326,7 +326,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 (defun reftex-toc-next (&optional arg)
   "Move to next selectable item."
   (interactive "p")
-  (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
+  (when (featurep 'xemacs) (setq zmacs-region-stays t))
   (setq reftex-callback-fwd t)
   (or (eobp) (forward-char 1))
   (goto-char (or (next-single-property-change (point) :data) 
@@ -334,21 +334,21 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 (defun reftex-toc-previous (&optional arg)
   "Move to previous selectable item."
   (interactive "p")
-  (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
+  (when (featurep 'xemacs) (setq zmacs-region-stays t))
   (setq reftex-callback-fwd nil)
   (goto-char (or (previous-single-property-change (point) :data)
                  (point))))
 (defun reftex-toc-next-heading (&optional arg)
   "Move to next table of contentes line."
   (interactive "p")
-  (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
+  (when (featurep 'xemacs) (setq zmacs-region-stays t))
   (end-of-line)
   (re-search-forward "^ " nil t arg)
   (beginning-of-line))
 (defun reftex-toc-previous-heading (&optional arg)
   "Move to previous table of contentes line."
   (interactive "p")
-  (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
+  (when (featurep 'xemacs) (setq zmacs-region-stays t))
   (re-search-backward "^ " nil t arg))
 (defun reftex-toc-toggle-follow ()
   "Toggle follow (other window follows with context)."
@@ -637,7 +637,7 @@ point."
   (if mark-line
       (progn
         (set-mark mpos)
-        (if (fboundp 'zmacs-activate-region)
+        (if (featurep 'xemacs)
             (zmacs-activate-region)
           (setq mark-active t
                 deactivate-mark nil)))))
index 27b68106a531ee52909ce34d7256899a92e1a832..5e9d6a3212e90e434116d9ce5f089db79b190e39 100644 (file)
@@ -51,7 +51,7 @@
     '(region-active-p)))
 
 (defsetf winner-active-region () (store)
-  (if (fboundp 'zmacs-activate-region)
+  (if (featurep 'xemacs)
       `(if ,store (zmacs-activate-region)
         (zmacs-deactivate-region))
     `(setq mark-active ,store)))