+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
(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)))
(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))
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."
+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.
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))
(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."
(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))
(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))))
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
(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.
(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
(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)))))
(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)))))
(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))))
(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))
(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)
(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)."
(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)))))
'(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)))