aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2007-10-30 03:17:35 +0000
committerDan Nicolaescu2007-10-30 03:17:35 +0000
commit4ea0e84a4979654b84d0d8db8f5b26cad1ebc552 (patch)
tree2268d44f27733e79c1931355835b5cedf7bac6e2
parent8d55ef780e5f80906d73c16241e79cd94fb8a236 (diff)
downloademacs-4ea0e84a4979654b84d0d8db8f5b26cad1ebc552.tar.gz
emacs-4ea0e84a4979654b84d0d8db8f5b26cad1ebc552.zip
* emulation/edt.el (edt-emacs19-p, edt-x-emacs19-p)
(edt-gnu-emacs19-p): Remove. (edt-emacs-variant, edt-window-system): Use feature 'emacs. (edt-xserver, edt-page-backward, edt-beginning-of-line) (edt-end-of-line-forward, edt-end-of-line-backward) (edt-one-word-forward, edt-one-word-backward, edt-character) (edt-line-forward, edt-next-line, edt-previous-line, edt-top) (edt-find-forward, edt-find-backward, edt-find-next-forward) (edt-find-next-backward, edt-reset, edt-advance, edt-backup) (edt-define-key, edt-bottom-check, edt-sentence-forward) (edt-sentence-backward, edt-paragraph-forward) (edt-paragraph-backward, edt-restore-key, edt-window-top) (edt-window-bottom, edt-scroll-window-forward-line) (edt-scroll-window-backward-line, edt-line-to-bottom-of-window) (edt-line-to-top-of-window, edt-paragraph-backward) (edt-restore-key, edt-window-top, edt-window-bottom) (edt-scroll-window-forward-line) (edt-scroll-window-backward-line, edt-line-to-bottom-of-window) (edt-line-to-middle-of-window, edt-goto-percentage) (edt-display-the-time, edt-remember, edt-split-window) (edt-emulation-on, edt-emulation-off) (edt-default-emulation-setup, edt-user-emulation-setup) (edt-select-default-global-map, edt-select-user-global-map): Replace uses of edt-x-emacs19-p and edt-gnu-emacs19-p with feature tests. * textmodes/reftex-index.el (reftex-index-selection-or-word): Use feature test instead of boundp test so it can be resolved at compile time. * net/newsticker.el (replace-regexp-in-string): Only define for XEmacs.
-rw-r--r--lisp/ChangeLog35
-rw-r--r--lisp/emulation/edt.el106
-rw-r--r--lisp/net/newsticker.el9
-rw-r--r--lisp/textmodes/reftex-index.el2
4 files changed, 89 insertions, 63 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d1910299720..ad0a093f1c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,38 @@
12007-10-30 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * emulation/edt.el (edt-emacs19-p, edt-x-emacs19-p)
4 (edt-gnu-emacs19-p): Remove.
5 (edt-emacs-variant, edt-window-system): Use feature 'emacs.
6 (edt-xserver, edt-page-backward, edt-beginning-of-line)
7 (edt-end-of-line-forward, edt-end-of-line-backward)
8 (edt-one-word-forward, edt-one-word-backward, edt-character)
9 (edt-line-forward, edt-next-line, edt-previous-line, edt-top)
10 (edt-find-forward, edt-find-backward, edt-find-next-forward)
11 (edt-find-next-backward, edt-reset, edt-advance, edt-backup)
12 (edt-define-key, edt-bottom-check, edt-sentence-forward)
13 (edt-sentence-backward, edt-paragraph-forward)
14 (edt-paragraph-backward, edt-restore-key, edt-window-top)
15 (edt-window-bottom, edt-scroll-window-forward-line)
16 (edt-scroll-window-backward-line, edt-line-to-bottom-of-window)
17 (edt-line-to-top-of-window, edt-paragraph-backward)
18 (edt-restore-key, edt-window-top, edt-window-bottom)
19 (edt-scroll-window-forward-line)
20 (edt-scroll-window-backward-line, edt-line-to-bottom-of-window)
21 (edt-line-to-middle-of-window, edt-goto-percentage)
22 (edt-display-the-time, edt-remember, edt-split-window)
23 (edt-emulation-on, edt-emulation-off)
24 (edt-default-emulation-setup, edt-user-emulation-setup)
25 (edt-select-default-global-map, edt-select-user-global-map):
26 Replace uses of edt-x-emacs19-p and edt-gnu-emacs19-p with feature
27 tests.
28
29 * textmodes/reftex-index.el (reftex-index-selection-or-word): Use
30 feature test instead of boundp test so it can be resolved at
31 compile time.
32
33 * net/newsticker.el (replace-regexp-in-string): Only define for
34 XEmacs.
35
12007-10-30 Stefan Monnier <monnier@iro.umontreal.ca> 362007-10-30 Stefan Monnier <monnier@iro.umontreal.ca>
2 37
3 * abbrev.el: Rename `count' and `system-flag' to :count and :system. 38 * abbrev.el: Rename `count' and `system-flag' to :count and :system.
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index 3ea7ebb5b12..4a68e258cb1 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -321,24 +321,14 @@ This means that an edt-user.el file was found in the user's `load-path'.")
321;;; 321;;;
322;;; o edt-emulation-on o edt-load-keys 322;;; o edt-emulation-on o edt-load-keys
323;;; 323;;;
324(defconst edt-emacs19-p (not (string-lessp emacs-version "19")) 324(defconst edt-emacs-variant (if (featurep 'emacs) "gnu" "xemacs")
325 "Non-nil if we are running GNU Emacs or XEmacs version 19, or higher.")
326
327(defconst edt-x-emacs19-p
328 (and edt-emacs19-p (featurep 'xemacs))
329 "Non-nil if we are running XEmacs version 19, or higher.")
330
331(defconst edt-gnu-emacs19-p (and edt-emacs19-p (not edt-x-emacs19-p))
332 "Non-nil if we are running GNU Emacs version 19, or higher.")
333
334(defconst edt-emacs-variant (if edt-gnu-emacs19-p "gnu" "xemacs")
335 "Indicates Emacs variant: GNU Emacs or XEmacs \(aka Lucid Emacs\).") 325 "Indicates Emacs variant: GNU Emacs or XEmacs \(aka Lucid Emacs\).")
336 326
337(defconst edt-window-system (if edt-gnu-emacs19-p window-system (console-type)) 327(defconst edt-window-system (if (featurep 'emacs) window-system (console-type))
338 "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") 328 "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).")
339 329
340(defconst edt-xserver (if (eq edt-window-system 'x) 330(defconst edt-xserver (if (eq edt-window-system 'x)
341 (if edt-x-emacs19-p 331 (if (featurep 'xemacs)
342 ;; The Cygwin window manager has a `/' in its 332 ;; The Cygwin window manager has a `/' in its
343 ;; name, which breaks the generated file name of 333 ;; name, which breaks the generated file name of
344 ;; the custom key map file. Replace `/' with a 334 ;; the custom key map file. Replace `/' with a
@@ -409,7 +399,7 @@ Argument NUM is the number of page delimiters to move."
409 (progn 399 (progn
410 (backward-page num) 400 (backward-page num)
411 (edt-line-to-top-of-window) 401 (edt-line-to-top-of-window)
412 (if edt-x-emacs19-p (setq zmacs-region-stays t))))) 402 (if (featurep 'xemacs) (setq zmacs-region-stays t)))))
413 403
414(defun edt-page (num) 404(defun edt-page (num)
415 "Move in current direction to next page delimiter. 405 "Move in current direction to next page delimiter.
@@ -470,7 +460,7 @@ Argument NUM is the number of BOL marks to move."
470 (setq num (1- num)) 460 (setq num (1- num))
471 (forward-line (* -1 num)))) 461 (forward-line (* -1 num))))
472 (edt-top-check beg num)) 462 (edt-top-check beg num))
473 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 463 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
474 464
475 465
476;;; 466;;;
@@ -486,7 +476,7 @@ Argument NUM is the number of EOL marks to move."
486 (forward-char) 476 (forward-char)
487 (end-of-line num) 477 (end-of-line num)
488 (edt-bottom-check beg num)) 478 (edt-bottom-check beg num))
489 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 479 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
490 480
491 481
492(defun edt-end-of-line-backward (num) 482(defun edt-end-of-line-backward (num)
@@ -497,7 +487,7 @@ Argument NUM is the number of EOL marks to move."
497 (let ((beg (edt-current-line))) 487 (let ((beg (edt-current-line)))
498 (end-of-line (1- num)) 488 (end-of-line (1- num))
499 (edt-top-check beg num)) 489 (edt-top-check beg num))
500 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 490 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
501 491
502 492
503(defun edt-end-of-line (num) 493(defun edt-end-of-line (num)
@@ -542,7 +532,7 @@ Argument NUM is the number of EOL marks to move."
542 (eq ?\ (char-syntax (following-char))) 532 (eq ?\ (char-syntax (following-char)))
543 (not (memq (following-char) edt-word-entities))) 533 (not (memq (following-char) edt-word-entities)))
544 (forward-char)))) 534 (forward-char))))
545 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 535 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
546 536
547(defun edt-one-word-backward () 537(defun edt-one-word-backward ()
548 "Move backward to first character of previous word." 538 "Move backward to first character of previous word."
@@ -566,7 +556,7 @@ Argument NUM is the number of EOL marks to move."
566 (not (eq ?\ (char-syntax (preceding-char)))) 556 (not (eq ?\ (char-syntax (preceding-char))))
567 (not (memq (preceding-char) edt-word-entities))) 557 (not (memq (preceding-char) edt-word-entities)))
568 (backward-char))))) 558 (backward-char)))))
569 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 559 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
570 560
571(defun edt-word-forward (num) 561(defun edt-word-forward (num)
572 "Move forward to first character of next word. 562 "Move forward to first character of next word.
@@ -606,7 +596,7 @@ Argument NUM is the number of characters to move."
606 (if (equal edt-direction-string edt-forward-string) 596 (if (equal edt-direction-string edt-forward-string)
607 (forward-char num) 597 (forward-char num)
608 (backward-char num)) 598 (backward-char num))
609 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 599 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
610 600
611;;; 601;;;
612;;; LINE 602;;; LINE
@@ -629,7 +619,7 @@ Argument NUM is the number of BOL marks to move."
629 (let ((beg (edt-current-line))) 619 (let ((beg (edt-current-line)))
630 (forward-line num) 620 (forward-line num)
631 (edt-bottom-check beg num)) 621 (edt-bottom-check beg num))
632 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 622 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
633 623
634(defun edt-line (num) 624(defun edt-line (num)
635 "Move in current direction to next beginning of line mark. 625 "Move in current direction to next beginning of line mark.
@@ -651,7 +641,7 @@ Argument NUM is the number of lines to move."
651 (let ((beg (edt-current-line))) 641 (let ((beg (edt-current-line)))
652 (forward-line num) 642 (forward-line num)
653 (edt-bottom-check beg num)) 643 (edt-bottom-check beg num))
654 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 644 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
655 645
656(defun edt-previous-line (num) 646(defun edt-previous-line (num)
657 "Move cursor up one line. 647 "Move cursor up one line.
@@ -661,7 +651,7 @@ Argument NUM is the number of lines to move."
661 (let ((beg (edt-current-line))) 651 (let ((beg (edt-current-line)))
662 (forward-line (- num)) 652 (forward-line (- num))
663 (edt-top-check beg num)) 653 (edt-top-check beg num))
664 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 654 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
665 655
666 656
667;;; 657;;;
@@ -672,7 +662,7 @@ Argument NUM is the number of lines to move."
672 "Move cursor to the beginning of buffer." 662 "Move cursor to the beginning of buffer."
673 (interactive) 663 (interactive)
674 (goto-char (point-min)) 664 (goto-char (point-min))
675 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 665 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
676 666
677;;; 667;;;
678;;; BOTTOM 668;;; BOTTOM
@@ -718,7 +708,7 @@ Optional argument FIND is t is this function is called from `edt-find'."
718 (recenter (- left bottom-up-margin)))) 708 (recenter (- left bottom-up-margin))))
719 (t 709 (t
720 (and (> (point) bottom) (recenter bottom-margin))))))) 710 (and (> (point) bottom) (recenter bottom-margin)))))))
721 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 711 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
722 712
723(defun edt-find-backward (&optional find) 713(defun edt-find-backward (&optional find)
724 "Find first occurrence of a string in the backward direction and save it. 714 "Find first occurrence of a string in the backward direction and save it.
@@ -743,7 +733,7 @@ Optional argument FIND is t if this function is called from `edt-find'."
743 (if (search-backward edt-find-last-text) 733 (if (search-backward edt-find-last-text)
744 (edt-set-match)) 734 (edt-set-match))
745 (and (< (point) top) (recenter (min beg top-margin)))) 735 (and (< (point) top) (recenter (min beg top-margin))))
746 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 736 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
747 737
748(defun edt-find () 738(defun edt-find ()
749 "Find first occurrence of string in current direction and save it." 739 "Find first occurrence of string in current direction and save it."
@@ -789,7 +779,7 @@ Optional argument FIND is t if this function is called from `edt-find'."
789 (progn 779 (progn
790 (backward-char 1) 780 (backward-char 1)
791 (error "Search failed: \"%s\"" edt-find-last-text)))) 781 (error "Search failed: \"%s\"" edt-find-last-text))))
792 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 782 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
793 783
794(defun edt-find-next-backward () 784(defun edt-find-next-backward ()
795 "Find next occurrence of a string in backward direction." 785 "Find next occurrence of a string in backward direction."
@@ -813,7 +803,7 @@ Optional argument FIND is t if this function is called from `edt-find'."
813 (progn 803 (progn
814 (edt-set-match) 804 (edt-set-match)
815 (and (< (point) top) (recenter (min beg top-margin)))))) 805 (and (< (point) top) (recenter (min beg top-margin))))))
816 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 806 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
817 807
818(defun edt-find-next () 808(defun edt-find-next ()
819 "Find next occurrence of a string in current direction." 809 "Find next occurrence of a string in current direction."
@@ -891,7 +881,7 @@ In select mode, selected text is highlighted."
891(defun edt-reset () 881(defun edt-reset ()
892 "Cancel text selection." 882 "Cancel text selection."
893 (interactive) 883 (interactive)
894 (if edt-gnu-emacs19-p 884 (if (featurep 'emacs)
895 (deactivate-mark) 885 (deactivate-mark)
896 (zmacs-deactivate-region))) 886 (zmacs-deactivate-region)))
897 887
@@ -1108,7 +1098,7 @@ Also, execute command specified if in Minibuffer."
1108 (if (string-equal " *Minibuf" 1098 (if (string-equal " *Minibuf"
1109 (substring (buffer-name) 0 (min (length (buffer-name)) 9))) 1099 (substring (buffer-name) 0 (min (length (buffer-name)) 9)))
1110 (exit-minibuffer)) 1100 (exit-minibuffer))
1111 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1101 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1112 1102
1113 1103
1114;;; 1104;;;
@@ -1124,7 +1114,7 @@ Also, execute command specified if in Minibuffer."
1124 (if (string-equal " *Minibuf" 1114 (if (string-equal " *Minibuf"
1125 (substring (buffer-name) 0 (min (length (buffer-name)) 9))) 1115 (substring (buffer-name) 0 (min (length (buffer-name)) 9)))
1126 (exit-minibuffer)) 1116 (exit-minibuffer))
1127 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1117 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1128 1118
1129 1119
1130;;; 1120;;;
@@ -1174,12 +1164,12 @@ Argument NUM is the numbers of consecutive characters to change."
1174The current key definition is saved in `edt-last-replaced-key-definition'. 1164The current key definition is saved in `edt-last-replaced-key-definition'.
1175Use `edt-restore-key' to restore last replaced key definition." 1165Use `edt-restore-key' to restore last replaced key definition."
1176 (interactive) 1166 (interactive)
1177 (if edt-x-emacs19-p (setq zmacs-region-stays t)) 1167 (if (featurep 'xemacs) (setq zmacs-region-stays t))
1178 (let (edt-function 1168 (let (edt-function
1179 edt-key-definition) 1169 edt-key-definition)
1180 (setq edt-key-definition 1170 (setq edt-key-definition
1181 (read-key-sequence "Press the key to be defined: ")) 1171 (read-key-sequence "Press the key to be defined: "))
1182 (if (if edt-gnu-emacs19-p 1172 (if (if (featurep 'emacs)
1183 (string-equal "\C-m" edt-key-definition) 1173 (string-equal "\C-m" edt-key-definition)
1184 (string-equal "\C-m" (events-to-keys edt-key-definition))) 1174 (string-equal "\C-m" (events-to-keys edt-key-definition)))
1185 (message "Key not defined") 1175 (message "Key not defined")
@@ -1259,7 +1249,7 @@ Argument LINES is the number of lines the cursor moved toward the bottom."
1259 ;; subtract 1 from height because it includes mode line 1249 ;; subtract 1 from height because it includes mode line
1260 (difference (- height margin 1))) 1250 (difference (- height margin 1)))
1261 (cond ((> beg difference) (recenter beg)) 1251 (cond ((> beg difference) (recenter beg))
1262 ((and edt-x-emacs19-p (> (+ beg lines 1) difference)) 1252 ((and (featurep 'xemacs) (> (+ beg lines 1) difference))
1263 (recenter (- margin))) 1253 (recenter (- margin)))
1264 ((> (+ beg lines) difference) (recenter (- margin)))))) 1254 ((> (+ beg lines) difference) (recenter (- margin))))))
1265 1255
@@ -1363,7 +1353,7 @@ Argument NUM is the positive number of sentences to move."
1363 (recenter (- left bottom-up-margin)))) 1353 (recenter (- left bottom-up-margin))))
1364 (t 1354 (t
1365 (and (> (point) bottom) (recenter bottom-margin))))) 1355 (and (> (point) bottom) (recenter bottom-margin)))))
1366 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1356 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1367 1357
1368(defun edt-sentence-backward (num) 1358(defun edt-sentence-backward (num)
1369 "Move backward to next sentence beginning. 1359 "Move backward to next sentence beginning.
@@ -1389,7 +1379,7 @@ Argument NUM is the positive number of sentences to move."
1389 (error "End of buffer")) 1379 (error "End of buffer"))
1390 (backward-sentence num)) 1380 (backward-sentence num))
1391 (and (< (point) top) (recenter (min beg top-margin)))) 1381 (and (< (point) top) (recenter (min beg top-margin))))
1392 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1382 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1393 1383
1394(defun edt-sentence (num) 1384(defun edt-sentence (num)
1395 "Move in current direction to next sentence. 1385 "Move in current direction to next sentence.
@@ -1434,7 +1424,7 @@ Argument NUM is the positive number of paragraphs to move."
1434 (recenter (- left bottom-up-margin)))) 1424 (recenter (- left bottom-up-margin))))
1435 (t 1425 (t
1436 (and (> (point) bottom) (recenter bottom-margin))))) 1426 (and (> (point) bottom) (recenter bottom-margin)))))
1437 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1427 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1438 1428
1439(defun edt-paragraph-backward (num) 1429(defun edt-paragraph-backward (num)
1440 "Move backward to beginning of paragraph. 1430 "Move backward to beginning of paragraph.
@@ -1459,7 +1449,7 @@ Argument NUM is the positive number of paragraphs to move."
1459 (start-of-paragraph-text) 1449 (start-of-paragraph-text)
1460 (setq num (1- num))) 1450 (setq num (1- num)))
1461 (and (< (point) top) (recenter (min beg top-margin)))) 1451 (and (< (point) top) (recenter (min beg top-margin))))
1462 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1452 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1463 1453
1464(defun edt-paragraph (num) 1454(defun edt-paragraph (num)
1465 "Move in current direction to next paragraph. 1455 "Move in current direction to next paragraph.
@@ -1477,20 +1467,20 @@ Argument NUM is the positive number of paragraphs to move."
1477 "Restore last replaced key definition. 1467 "Restore last replaced key definition.
1478Definition is stored in `edt-last-replaced-key-definition'." 1468Definition is stored in `edt-last-replaced-key-definition'."
1479 (interactive) 1469 (interactive)
1480 (if edt-x-emacs19-p (setq zmacs-region-stays t)) 1470 (if (featurep 'xemacs) (setq zmacs-region-stays t))
1481 (if edt-last-replaced-key-definition 1471 (if edt-last-replaced-key-definition
1482 (progn 1472 (progn
1483 (let (edt-key-definition) 1473 (let (edt-key-definition)
1484 (set 'edt-key-definition 1474 (set 'edt-key-definition
1485 (read-key-sequence "Press the key to be restored: ")) 1475 (read-key-sequence "Press the key to be restored: "))
1486 (if (if edt-gnu-emacs19-p 1476 (if (if (featurep 'emacs)
1487 (string-equal "\C-m" edt-key-definition) 1477 (string-equal "\C-m" edt-key-definition)
1488 (string-equal "\C-m" (events-to-keys edt-key-definition))) 1478 (string-equal "\C-m" (events-to-keys edt-key-definition)))
1489 (message "Key not restored") 1479 (message "Key not restored")
1490 (progn 1480 (progn
1491 (define-key (current-global-map) 1481 (define-key (current-global-map)
1492 edt-key-definition edt-last-replaced-key-definition) 1482 edt-key-definition edt-last-replaced-key-definition)
1493 (if edt-gnu-emacs19-p 1483 (if (featurep 'emacs)
1494 (message "Key definition for %s has been restored." 1484 (message "Key definition for %s has been restored."
1495 edt-key-definition) 1485 edt-key-definition)
1496 (message "Key definition for %s has been restored." 1486 (message "Key definition for %s has been restored."
@@ -1507,7 +1497,7 @@ Definition is stored in `edt-last-replaced-key-definition'."
1507 (let ((start-column (current-column))) 1497 (let ((start-column (current-column)))
1508 (move-to-window-line 0) 1498 (move-to-window-line 0)
1509 (move-to-column start-column)) 1499 (move-to-column start-column))
1510 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1500 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1511 1501
1512;;; 1502;;;
1513;;; WINDOW BOTTOM 1503;;; WINDOW BOTTOM
@@ -1519,7 +1509,7 @@ Definition is stored in `edt-last-replaced-key-definition'."
1519 (let ((start-column (current-column))) 1509 (let ((start-column (current-column)))
1520 (move-to-window-line (- (window-height) 2)) 1510 (move-to-window-line (- (window-height) 2))
1521 (move-to-column start-column)) 1511 (move-to-column start-column))
1522 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1512 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1523 1513
1524;;; 1514;;;
1525;;; SCROLL WINDOW LINE 1515;;; SCROLL WINDOW LINE
@@ -1529,13 +1519,13 @@ Definition is stored in `edt-last-replaced-key-definition'."
1529 "Move window forward one line leaving cursor at position in window." 1519 "Move window forward one line leaving cursor at position in window."
1530 (interactive) 1520 (interactive)
1531 (scroll-up 1) 1521 (scroll-up 1)
1532 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1522 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1533 1523
1534(defun edt-scroll-window-backward-line () 1524(defun edt-scroll-window-backward-line ()
1535 "Move window backward one line leaving cursor at position in window." 1525 "Move window backward one line leaving cursor at position in window."
1536 (interactive) 1526 (interactive)
1537 (scroll-down 1) 1527 (scroll-down 1)
1538 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1528 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1539 1529
1540(defun edt-scroll-line () 1530(defun edt-scroll-line ()
1541 "Move window one line in current direction." 1531 "Move window one line in current direction."
@@ -1582,7 +1572,7 @@ Argument NUM is the positive number of windows to move."
1582 "Move the current line to the bottom of the window." 1572 "Move the current line to the bottom of the window."
1583 (interactive) 1573 (interactive)
1584 (recenter -1) 1574 (recenter -1)
1585 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1575 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1586 1576
1587;;; 1577;;;
1588;;; LINE TO TOP OF WINDOW 1578;;; LINE TO TOP OF WINDOW
@@ -1592,7 +1582,7 @@ Argument NUM is the positive number of windows to move."
1592 "Move the current line to the top of the window." 1582 "Move the current line to the top of the window."
1593 (interactive) 1583 (interactive)
1594 (recenter 0) 1584 (recenter 0)
1595 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1585 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1596 1586
1597;;; 1587;;;
1598;;; LINE TO MIDDLE OF WINDOW 1588;;; LINE TO MIDDLE OF WINDOW
@@ -1602,7 +1592,7 @@ Argument NUM is the positive number of windows to move."
1602 "Move window so line with cursor is in the middle of the window." 1592 "Move window so line with cursor is in the middle of the window."
1603 (interactive) 1593 (interactive)
1604 (recenter '(4)) 1594 (recenter '(4))
1605 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1595 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1606 1596
1607;;; 1597;;;
1608;;; GOTO PERCENTAGE 1598;;; GOTO PERCENTAGE
@@ -1615,7 +1605,7 @@ Argument NUM is the percentage into the buffer to move."
1615 (if (or (> num 100) (< num 0)) 1605 (if (or (> num 100) (< num 0))
1616 (error "Percentage %d out of range 0 < percent < 100" num) 1606 (error "Percentage %d out of range 0 < percent < 100" num)
1617 (goto-char (/ (* (point-max) num) 100))) 1607 (goto-char (/ (* (point-max) num) 100)))
1618 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1608 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1619 1609
1620;;; 1610;;;
1621;;; FILL REGION 1611;;; FILL REGION
@@ -1785,7 +1775,7 @@ Argument NUM is the number of times to duplicate the line."
1785(defun edt-display-the-time () 1775(defun edt-display-the-time ()
1786 "Display the current time." 1776 "Display the current time."
1787 (interactive) 1777 (interactive)
1788 (if edt-x-emacs19-p (setq zmacs-region-stays t)) 1778 (if (featurep 'xemacs) (setq zmacs-region-stays t))
1789 (message "%s" (current-time-string))) 1779 (message "%s" (current-time-string)))
1790 1780
1791;;; 1781;;;
@@ -1813,7 +1803,7 @@ Argument NUM is the number of times to duplicate the line."
1813 (let (edt-key-definition) 1803 (let (edt-key-definition)
1814 (set 'edt-key-definition 1804 (set 'edt-key-definition
1815 (read-key-sequence "Enter key for binding: ")) 1805 (read-key-sequence "Enter key for binding: "))
1816 (if (if edt-gnu-emacs19-p 1806 (if (if (featurep 'emacs)
1817 (string-equal "\C-m" edt-key-definition) 1807 (string-equal "\C-m" edt-key-definition)
1818 (string-equal "\C-m" (events-to-keys edt-key-definition))) 1808 (string-equal "\C-m" (events-to-keys edt-key-definition)))
1819 (message "Key sequence not remembered") 1809 (message "Key sequence not remembered")
@@ -1866,7 +1856,7 @@ Warn user that modifications will be lost."
1866 (interactive) 1856 (interactive)
1867 (split-window) 1857 (split-window)
1868 (other-window 1) 1858 (other-window 1)
1869 (if edt-x-emacs19-p (setq zmacs-region-stays t))) 1859 (if (featurep 'xemacs) (setq zmacs-region-stays t)))
1870 1860
1871;;; 1861;;;
1872;;; COPY RECTANGLE 1862;;; COPY RECTANGLE
@@ -2152,7 +2142,7 @@ created."
2152 (setq edt-term term)))) 2142 (setq edt-term term))))
2153 (edt-load-keys nil)) 2143 (edt-load-keys nil))
2154 ;; Make highlighting of selected text work properly for EDT commands. 2144 ;; Make highlighting of selected text work properly for EDT commands.
2155 (if edt-gnu-emacs19-p 2145 (if (featurep 'emacs)
2156 (progn 2146 (progn
2157 (setq edt-orig-transient-mark-mode transient-mark-mode) 2147 (setq edt-orig-transient-mark-mode transient-mark-mode)
2158 (add-hook 'activate-mark-hook 2148 (add-hook 'activate-mark-hook
@@ -2188,7 +2178,7 @@ created."
2188 (setq edt-select-mode-current nil) 2178 (setq edt-select-mode-current nil)
2189 (edt-reset) 2179 (edt-reset)
2190 (force-mode-line-update t) 2180 (force-mode-line-update t)
2191 (if edt-gnu-emacs19-p 2181 (if (featurep 'emacs)
2192 (setq transient-mark-mode edt-orig-transient-mark-mode)) 2182 (setq transient-mark-mode edt-orig-transient-mark-mode))
2193 (message "Original key bindings restored; EDT Emulation disabled")) 2183 (message "Original key bindings restored; EDT Emulation disabled"))
2194 2184
@@ -2203,7 +2193,7 @@ Optional argument USER-SETUP non-nil means called from function
2203 ;; disturbing the original bindings in global-map. 2193 ;; disturbing the original bindings in global-map.
2204 (fset 'edt-default-ESC-prefix (copy-keymap 'ESC-prefix)) 2194 (fset 'edt-default-ESC-prefix (copy-keymap 'ESC-prefix))
2205 (setq edt-default-global-map (copy-keymap (current-global-map))) 2195 (setq edt-default-global-map (copy-keymap (current-global-map)))
2206 (if edt-gnu-emacs19-p 2196 (if (featurep 'emacs)
2207 (define-key edt-default-global-map "\e" 'edt-default-ESC-prefix) 2197 (define-key edt-default-global-map "\e" 'edt-default-ESC-prefix)
2208 (define-key edt-default-global-map [escape] 'edt-default-ESC-prefix)) 2198 (define-key edt-default-global-map [escape] 'edt-default-ESC-prefix))
2209 (define-prefix-command 'edt-default-gold-map) 2199 (define-prefix-command 'edt-default-gold-map)
@@ -2239,7 +2229,7 @@ Optional argument USER-SETUP non-nil means called from function
2239 ;; Setup user EDT global map by copying default EDT global map bindings. 2229 ;; Setup user EDT global map by copying default EDT global map bindings.
2240 (fset 'edt-user-ESC-prefix (copy-keymap 'edt-default-ESC-prefix)) 2230 (fset 'edt-user-ESC-prefix (copy-keymap 'edt-default-ESC-prefix))
2241 (setq edt-user-global-map (copy-keymap edt-default-global-map)) 2231 (setq edt-user-global-map (copy-keymap edt-default-global-map))
2242 (if edt-gnu-emacs19-p 2232 (if (featurep 'emacs)
2243 (define-key edt-user-global-map "\e" 'edt-user-ESC-prefix) 2233 (define-key edt-user-global-map "\e" 'edt-user-ESC-prefix)
2244 (define-key edt-user-global-map [escape] 'edt-user-ESC-prefix)) 2234 (define-key edt-user-global-map [escape] 'edt-user-ESC-prefix))
2245 ;; If terminal has additional function keys, the user's initialization 2235 ;; If terminal has additional function keys, the user's initialization
@@ -2253,7 +2243,7 @@ Optional argument USER-SETUP non-nil means called from function
2253(defun edt-select-default-global-map() 2243(defun edt-select-default-global-map()
2254 "Select default EDT emulation key bindings." 2244 "Select default EDT emulation key bindings."
2255 (interactive) 2245 (interactive)
2256 (if edt-gnu-emacs19-p 2246 (if (featurep 'emacs)
2257 (transient-mark-mode 1)) 2247 (transient-mark-mode 1))
2258 (use-global-map edt-default-global-map) 2248 (use-global-map edt-default-global-map)
2259 (if (not edt-keep-current-page-delimiter) 2249 (if (not edt-keep-current-page-delimiter)
@@ -2271,7 +2261,7 @@ Optional argument USER-SETUP non-nil means called from function
2271 (interactive) 2261 (interactive)
2272 (if edt-user-map-configured 2262 (if edt-user-map-configured
2273 (progn 2263 (progn
2274 (if edt-gnu-emacs19-p 2264 (if (featurep 'emacs)
2275 (transient-mark-mode 1)) 2265 (transient-mark-mode 1))
2276 (use-global-map edt-user-global-map) 2266 (use-global-map edt-user-global-map)
2277 (if (not edt-keep-current-page-delimiter) 2267 (if (not edt-keep-current-page-delimiter)
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el
index eb70a2e2d31..735d946346d 100644
--- a/lisp/net/newsticker.el
+++ b/lisp/net/newsticker.el
@@ -1199,10 +1199,11 @@ buffers *newsticker-wget-<feed>* will not be closed."
1199(unless (fboundp 'match-string-no-properties) 1199(unless (fboundp 'match-string-no-properties)
1200 (defalias 'match-string-no-properties 'match-string)) 1200 (defalias 'match-string-no-properties 'match-string))
1201 1201
1202(unless (fboundp 'replace-regexp-in-string) 1202(when (featurep 'xemacs)
1203 (defun replace-regexp-in-string (re rp st) 1203 (unless (fboundp 'replace-regexp-in-string)
1204 (save-match-data ;; apparently XEmacs needs save-match-data 1204 (defun replace-regexp-in-string (re rp st)
1205 (replace-in-string st re rp)))) 1205 (save-match-data ;; apparently XEmacs needs save-match-data
1206 (replace-in-string st re rp)))))
1206 1207
1207;; copied from subr.el 1208;; copied from subr.el
1208(unless (fboundp 'add-to-invisibility-spec) 1209(unless (fboundp 'add-to-invisibility-spec)
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index 35714ddb0b2..f430e9bd01a 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -52,7 +52,7 @@ which is part of AUCTeX, the string is first processed with the
52 (interactive "P") 52 (interactive "P")
53 (let* ((use-default (not (equal arg '(16)))) ; check for double prefix 53 (let* ((use-default (not (equal arg '(16)))) ; check for double prefix
54 ;; check if we have an active selection 54 ;; check if we have an active selection
55 (active (if (boundp 'zmacs-regions) 55 (active (if (featurep 'xemacs)
56 (and zmacs-regions (region-exists-p)) ; XEmacs 56 (and zmacs-regions (region-exists-p)) ; XEmacs
57 (and transient-mark-mode mark-active))) ; Emacs 57 (and transient-mark-mode mark-active))) ; Emacs
58 (beg (if active 58 (beg (if active