diff options
| author | Dan Nicolaescu <dann@ics.uci.edu> | 2007-10-21 17:22:04 +0000 | 
|---|---|---|
| committer | Dan Nicolaescu <dann@ics.uci.edu> | 2007-10-21 17:22:04 +0000 | 
| commit | f82460271ec718957a1ae311c2cdbd8f7d5ca8c4 (patch) | |
| tree | d207d4304089ead427d20211bcf3fab48342ce32 /lisp/progmodes | |
| parent | 3cd79f623b94e3aeef6c08dde13128733e5e6dec (diff) | |
| download | emacs-f82460271ec718957a1ae311c2cdbd8f7d5ca8c4.tar.gz | |
* emulation/edt-mapper.el (function-key-map):
(edt-map-key): Make it a function instead of using fset. Inline
edt-gnu-map-key and edt-lucid-map-key. Use featurep 'xemacs.
(edt-gnu-map-key, edt-lucid-map-key): Remove.
(edt-x-emacs-p): Remove.
(edt-emacs-variant, edt-window-system, edt-xserver):
Use featurep 'xemacs.
* net/eudc.el: Use (featurep 'xemacs) instead of the string test.
Replace eudc-xemacs-p with its definition.
(eudc-xemacs-p, eudc-emacs-p, eudc-xemacs-mule-p)
(eudc-emacs-mule-p): Remove.
(eudc-install-menu, eudc-mode): Replace eudc-emacs-p and
eudc-xemacs-p with feature tests.
* net/eudc-bob.el (eudc-bob-generic-menu, eudc-bob-mail-keymap)
(eudc-bob-url-keymap, eudc-bob-sound-keymap)
(eudc-bob-generic-keymap, eudc-bob-popup-menu)
(eudc-bob-toggle-inline-display):
* net/eudc-hotlist.el (eudc-hotlist-emacs-menu): Replace
eudc-emacs-p and eudc-xemacs-p with feature tests.
* net/eudcb-ph.el (eudc-ph-open-session): Replace
eudc-xemacs-mule-p with its former definition.
* progmodes/octave-mod.el (octave-xemacs-p): Remove.
(octave-abbrev-start): Replace octave-xemacs-p with
(featurep 'xemacs).
* progmodes/vera-mode.el (vera-xemacs): Remove.
(vera-mode-syntax-table): Replace vera-xemacs with
(featurep 'xemacs).
* progmodes/vhdl-mode.el (vhdl-xemacs): Remove.
(vhdl-doc-mode, vhdl-doc-variable, vhdl-compile-init)
(vhdl-speedbar-initialize, vhdl-ps-print-init)
(vhdl-forward-comment, vhdl-mode-map-init, vhdl-show-messages)
(vhdl-emacs-22, vhdl-emacs-21): Replace vhdl-xemacs
with (featurep 'xemacs).
* progmodes/antlr-mode.el (cond-emacs-xemacs-macfn, defunx)
(save-buffer-state-x):
* obsolete/fast-lock.el (fast-lock-verbose):
* emulation/viper-init.el (viper-xemacs-p)
(viper-cond-compile-for-xemacs-or-emacs):
* emacs-lisp/checkdoc.el (checkdoc-minor-mode-map):
* ps-print.el (case-fold-search):
* ediff-hook.el (ediff-cond-compile-for-xemacs-or-emacs):
* calculator.el (calculator-help): Use featurep 'xemacs.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/antlr-mode.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/octave-mod.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/vera-mode.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/vhdl-mode.el | 33 | 
4 files changed, 22 insertions, 32 deletions
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 594b628ad44..01f1c86618c 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -99,7 +99,7 @@        (and (eq (car args) :@) (null msg) ; (:@ ...spliced...)  	   (setq args (cdr args)  		 msg "(:@ ....) must return exactly one element")) -      (let ((ignore (if (string-match "XEmacs" emacs-version) :EMACS :XEMACS)) +      (let ((ignore (if (featurep 'xemacs) :EMACS :XEMACS))  	    (mode :BOTH) code)  	(while (consp args)  	  (if (memq (car args) '(:EMACS :XEMACS :BOTH)) (setq mode (pop args))) @@ -115,7 +115,7 @@    ;; existing functions when they are `fboundp', provide shortcuts if they are    ;; known to be defined in a specific Emacs branch (for short .elc)    (defmacro defunx (name arglist &rest definition) -    (let ((xemacsp (string-match "XEmacs" emacs-version)) reuses) +    (let ((xemacsp (featurep 'xemacs)) reuses)        (while (memq (car definition)  		   '(:try :emacs-and-try :xemacs-and-try))  	(if (eq (pop definition) (if xemacsp :xemacs-and-try :emacs-and-try)) @@ -152,7 +152,7 @@    (defmacro ignore-errors-x (&rest body)      (let ((specials '((scan-sexps . 4) (scan-lists . 5)))  	  spec nils) -      (if (and (string-match "XEmacs" emacs-version) +      (if (and (featurep 'xemacs)  	       (null (cdr body)) (consp (car body))  	       (setq spec (assq (caar body) specials))  	       (>= (setq nils (- (cdr spec) (length (car body)))) 0)) @@ -166,7 +166,7 @@        `(let ((,modified (buffer-modified-p)))  	 (unwind-protect  	     (let ((buffer-undo-list t) (inhibit-read-only t) -		   ,@(unless (string-match "XEmacs" emacs-version) +		   ,@(unless (featurep 'xemacs)  		       '((inhibit-point-motion-hooks t) deactivate-mark))  		   before-change-functions after-change-functions  		   buffer-file-name buffer-file-truename) diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index b7084950a09..a0d33f56ee4 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -621,9 +621,6 @@ the end keyword."      (delete-horizontal-space)      (insert (concat " " octave-continuation-string)))) -(defvar octave-xemacs-p -  (string-match "XEmacs\\|Lucid" emacs-version)) -  ;;; Comments  (defun octave-comment-region (beg end &optional arg)    "Comment or uncomment each line in the region as Octave code. @@ -1341,7 +1338,7 @@ Note that all Octave mode abbrevs start with a grave accent."        (self-insert-command 1)      (let (c)        (insert last-command-char) -      (if (if octave-xemacs-p +      (if (if (featurep 'xemacs)  	      (or (eq (event-to-character (setq c (next-event))) ??)  		  (eq (event-to-character c) help-char))  	    (or (eq (setq c (read-event)) ??) diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el index 9aaee22b9a9..11f47b40592 100644 --- a/lisp/progmodes/vera-mode.el +++ b/lisp/progmodes/vera-mode.el @@ -77,10 +77,6 @@  ;;; Code: -;; XEmacs handling -(defconst vera-xemacs (string-match "XEmacs" emacs-version) -  "Non-nil if XEmacs is used.") -  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;; Variables  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -231,7 +227,7 @@ If nil, TAB always indents current line."      (modify-syntax-entry ?\{ "(}"   syntax-table)      (modify-syntax-entry ?\} "){"   syntax-table)      ;; comment -    (if vera-xemacs +    (if (featurep 'xemacs)  	(modify-syntax-entry ?\/ ". 1456" syntax-table) ; XEmacs        (modify-syntax-entry ?\/ ". 124b" syntax-table)) ; Emacs      (modify-syntax-entry ?\* ". 23" syntax-table) @@ -600,7 +596,7 @@ Key bindings:  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;; XEmacs compatibility -(when vera-xemacs +(when (featurep 'xemacs)    (require 'font-lock)    (copy-face 'font-lock-reference-face 'font-lock-constant-face)    (copy-face 'font-lock-preprocessor-face 'font-lock-builtin-face)) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 60d30eb8a6d..df315e4f46e 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -125,13 +125,10 @@  ;;; Code: -;; XEmacs handling -(defconst vhdl-xemacs (string-match "XEmacs" emacs-version) -  "Non-nil if XEmacs is used.")  ;; Emacs 21+ handling -(defconst vhdl-emacs-21 (and (<= 21 emacs-major-version) (not vhdl-xemacs)) +(defconst vhdl-emacs-21 (and (<= 21 emacs-major-version) (not (featurep 'xemacs)))    "Non-nil if GNU Emacs 21, 22, ... is used.") -(defconst vhdl-emacs-22 (and (<= 22 emacs-major-version) (not vhdl-xemacs)) +(defconst vhdl-emacs-22 (and (<= 22 emacs-major-version) (not (featurep 'xemacs)))    "Non-nil if GNU Emacs 22, ... is used.")  (defvar compilation-file-regexp-alist) @@ -1844,13 +1841,13 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry  ;; add related general customizations  (custom-add-to-group 'vhdl-related 'hideshow 'custom-group) -(if vhdl-xemacs +(if (featurep 'xemacs)      (custom-add-to-group 'vhdl-related 'paren-mode 'custom-variable)    (custom-add-to-group 'vhdl-related 'paren-showing 'custom-group))  (custom-add-to-group 'vhdl-related 'ps-print 'custom-group)  (custom-add-to-group 'vhdl-related 'speedbar 'custom-group)  (custom-add-to-group 'vhdl-related 'line-number-mode 'custom-variable) -(unless vhdl-xemacs +(unless (featurep 'xemacs)    (custom-add-to-group 'vhdl-related 'transient-mark-mode 'custom-variable))  (custom-add-to-group 'vhdl-related 'user-full-name 'custom-variable)  (custom-add-to-group 'vhdl-related 'mail-host-address 'custom-variable) @@ -2093,7 +2090,7 @@ Ignore byte-compiler warnings you might see."        newstr)))  ;; `itimer.el': idle timer bug fix in version 1.09 (XEmacs 21.1.9) -(when (and vhdl-xemacs (string< itimer-version "1.09") +(when (and (featurep 'xemacs) (string< itimer-version "1.09")  	   (not noninteractive))    (load "itimer")    (when (string< itimer-version "1.09") @@ -2486,7 +2483,7 @@ conversion."  (defun vhdl-show-messages ()    "Get *Messages* buffer to show recent messages."    (interactive) -  (display-buffer (if vhdl-xemacs " *Message-Log*" "*Messages*"))) +  (display-buffer (if (featurep 'xemacs) " *Message-Log*" "*Messages*")))  (defun vhdl-use-direct-instantiation ()    "Return whether direct instantiation is used." @@ -2686,7 +2683,7 @@ STRING are replaced by `-' and substrings are converted to lower case."    (define-key vhdl-mode-map "\M-\C-u"	   'vhdl-backward-up-list)    (define-key vhdl-mode-map "\M-\C-a"	   'vhdl-backward-same-indent)    (define-key vhdl-mode-map "\M-\C-e"	   'vhdl-forward-same-indent) -  (unless vhdl-xemacs ; would override `M-backspace' in XEmacs +  (unless (featurep 'xemacs) ; would override `M-backspace' in XEmacs      (define-key vhdl-mode-map "\M-\C-h"	   'vhdl-mark-defun))    (define-key vhdl-mode-map "\M-\C-q"	   'vhdl-indent-sexp)    (define-key vhdl-mode-map "\M-^"	   'vhdl-delete-indentation) @@ -2713,7 +2710,7 @@ STRING are replaced by `-' and substrings are converted to lower case."    (define-key vhdl-mode-map "\C-c\C-p\C-i" 'vhdl-port-paste-instance)    (define-key vhdl-mode-map "\C-c\C-p\C-s" 'vhdl-port-paste-signals)    (define-key vhdl-mode-map "\C-c\C-p\M-c" 'vhdl-port-paste-constants) -  (if vhdl-xemacs ; `... C-g' not allowed in XEmacs +  (if (featurep 'xemacs) ; `... C-g' not allowed in XEmacs        (define-key vhdl-mode-map "\C-c\C-p\M-g" 'vhdl-port-paste-generic-map)      (define-key vhdl-mode-map "\C-c\C-p\C-g" 'vhdl-port-paste-generic-map))    (define-key vhdl-mode-map "\C-c\C-p\C-z" 'vhdl-port-paste-initializations) @@ -5395,7 +5392,7 @@ negative, skip forward otherwise."        (skip-chars-forward " \t\n"))))  ;; XEmacs hack: work around buggy `forward-comment' in XEmacs 21.4+ -(unless (and vhdl-xemacs (string< "21.2" emacs-version)) +(unless (and (featurep 'xemacs) (string< "21.2" emacs-version))    (defalias 'vhdl-forward-comment 'forward-comment))  ;; This is the best we can do in Win-Emacs. @@ -13013,7 +13010,7 @@ This does background highlighting of translate-off regions.")  (defun vhdl-ps-print-init ()    "Initialize postscript printing." -  (if vhdl-xemacs +  (if (featurep 'xemacs)        (when (boundp 'ps-print-color-p)  	(vhdl-ps-print-settings))      (make-local-variable 'ps-print-hook) @@ -14064,10 +14061,10 @@ if required."  	  (save-excursion (beginning-of-line) (looking-at "[0-9]+:"))]  	 ["Rescan Directory" vhdl-speedbar-rescan-hierarchy  	  :active (save-excursion (beginning-of-line) (looking-at "[0-9]+:")) -	  ,(if vhdl-xemacs :active :visible) (not vhdl-speedbar-show-projects)] +	  ,(if (featurep 'xemacs) :active :visible) (not vhdl-speedbar-show-projects)]  	 ["Rescan Project" vhdl-speedbar-rescan-hierarchy  	  :active (save-excursion (beginning-of-line) (looking-at "[0-9]+:")) -	  ,(if vhdl-xemacs :active :visible) vhdl-speedbar-show-projects] +	  ,(if (featurep 'xemacs) :active :visible) vhdl-speedbar-show-projects]  	 ["Save Caches" vhdl-save-caches vhdl-updated-project-list])))      ;; hook-ups      (speedbar-add-expansion-list @@ -16189,7 +16186,7 @@ no project is defined."  		    (assoc (car sublist) regexp-alist))  	  (setq regexp-alist (cons (list (nth 0 sublist)  					 (if (= 0 (nth 1 sublist)) -					     (if vhdl-xemacs 9 nil) +					     (if (featurep 'xemacs) 9 nil)  					   (nth 1 sublist))  					 (nth 2 sublist) (nth 3 sublist))  				   regexp-alist))) @@ -16989,7 +16986,7 @@ to visually support naming conventions.")  (defun vhdl-doc-variable (variable)    "Display VARIABLE's documentation in *Help* buffer."    (interactive) -  (unless vhdl-xemacs +  (unless (featurep 'xemacs)      (help-setup-xref (list #'vhdl-doc-variable variable) (interactive-p)))    (with-output-to-temp-buffer        (if (fboundp 'help-buffer) (help-buffer) "*Help*") @@ -17001,7 +16998,7 @@ to visually support naming conventions.")  (defun vhdl-doc-mode ()    "Display VHDL Mode documentation in *Help* buffer."    (interactive) -  (unless vhdl-xemacs +  (unless (featurep 'xemacs)      (help-setup-xref (list #'vhdl-doc-mode) (interactive-p)))    (with-output-to-temp-buffer        (if (fboundp 'help-buffer) (help-buffer) "*Help*")  | 
