aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2019-10-04 01:54:56 +0200
committerStefan Kangas2019-10-04 01:59:22 +0200
commit3886a5c140b03f07c8faea7cacad0a791bc54fa5 (patch)
tree439d7035874ba434db0e5b7be397b6eb6ae44478
parenta397fa06d18d6ae37a3a1288f269e1ae9eb3b569 (diff)
downloademacs-3886a5c140b03f07c8faea7cacad0a791bc54fa5.tar.gz
emacs-3886a5c140b03f07c8faea7cacad0a791bc54fa5.zip
Remove more XEmacs compat code in cperl-mode.el
* lisp/progmodes/cperl-mode.el (condition-case, cperl-problems) (cperl-problems-old-emaxen, cperl-init-faces) (cperl-word-at-point): Remove more XEmacs compat code.
-rw-r--r--lisp/progmodes/cperl-mode.el37
1 files changed, 3 insertions, 34 deletions
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 8e94da082a3..3c06d230950 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -89,9 +89,6 @@
89 (error nil)) 89 (error nil))
90 (defvar msb-menu-cond) 90 (defvar msb-menu-cond)
91 (defvar gud-perldb-history) 91 (defvar gud-perldb-history)
92 (defvar font-lock-background-mode) ; not in Emacs
93 (defvar font-lock-display-type) ; ditto
94 (defvar paren-backwards-message) ; Not in newer XEmacs?
95 (defmacro cperl-is-face (arg) ; Takes quoted arg 92 (defmacro cperl-is-face (arg) ; Takes quoted arg
96 (cond ((fboundp 'find-face) 93 (cond ((fboundp 'find-face)
97 `(find-face ,arg)) 94 `(find-face ,arg))
@@ -704,7 +701,7 @@ to detect it and bulk out).
704 701
705See documentation of a variable `cperl-problems-old-emaxen' for the 702See documentation of a variable `cperl-problems-old-emaxen' for the
706problems which disappear if you upgrade Emacs to a reasonably new 703problems which disappear if you upgrade Emacs to a reasonably new
707version (20.3 for Emacs, and those of 2004 for XEmacs).") 704version (20.3 for Emacs).")
708 705
709(defvar cperl-problems-old-emaxen 'please-ignore-this-line 706(defvar cperl-problems-old-emaxen 'please-ignore-this-line
710 "Description of problems in CPerl mode specific for older Emacs versions. 707 "Description of problems in CPerl mode specific for older Emacs versions.
@@ -712,8 +709,7 @@ version (20.3 for Emacs, and those of 2004 for XEmacs).")
712Emacs had a _very_ restricted syntax parsing engine until version 709Emacs had a _very_ restricted syntax parsing engine until version
71320.1. Most problems below are corrected starting from this version of 71020.1. Most problems below are corrected starting from this version of
714Emacs, and all of them should be fixed in version 20.3. (Or apply 711Emacs, and all of them should be fixed in version 20.3. (Or apply
715patches to Emacs 19.33/34 - see tips.) XEmacs was very backward in 712patches to Emacs 19.33/34 - see tips.)
716this respect (until 2003).
717 713
718Note that even with newer Emacsen in some very rare cases the details 714Note that even with newer Emacsen in some very rare cases the details
719of interaction of `font-lock' and syntaxification may be not cleaned 715of interaction of `font-lock' and syntaxification may be not cleaned
@@ -5897,8 +5893,6 @@ indentation and initial hashes. Behaves usually outside of comment."
5897 t 5893 t
5898 nil)))) 5894 nil))))
5899 ;; Do it the dull way, without choose-color 5895 ;; Do it the dull way, without choose-color
5900 (defvar cperl-guessed-background nil
5901 "Display characteristics as guessed by cperl.")
5902 (cperl-force-face font-lock-constant-face 5896 (cperl-force-face font-lock-constant-face
5903 "Face for constant and label names") 5897 "Face for constant and label names")
5904 (cperl-force-face font-lock-variable-name-face 5898 (cperl-force-face font-lock-variable-name-face
@@ -5927,19 +5921,6 @@ indentation and initial hashes. Behaves usually outside of comment."
5927 ;; (defconst cperl-nonoverridable-face 5921 ;; (defconst cperl-nonoverridable-face
5928 ;; 'cperl-nonoverridable-face 5922 ;; 'cperl-nonoverridable-face
5929 ;; "Face to use for data types from another group.")) 5923 ;; "Face to use for data types from another group."))
5930 ;;(if (not (featurep 'xemacs)) nil
5931 ;; (or (boundp 'font-lock-comment-face)
5932 ;; (defconst font-lock-comment-face
5933 ;; 'font-lock-comment-face
5934 ;; "Face to use for comments."))
5935 ;; (or (boundp 'font-lock-keyword-face)
5936 ;; (defconst font-lock-keyword-face
5937 ;; 'font-lock-keyword-face
5938 ;; "Face to use for keywords."))
5939 ;; (or (boundp 'font-lock-function-name-face)
5940 ;; (defconst font-lock-function-name-face
5941 ;; 'font-lock-function-name-face
5942 ;; "Face to use for function names.")))
5943 (if (and 5924 (if (and
5944 (not (cperl-is-face 'cperl-array-face)) 5925 (not (cperl-is-face 'cperl-array-face))
5945 (cperl-is-face 'font-lock-emphasized-face)) 5926 (cperl-is-face 'font-lock-emphasized-face))
@@ -5960,17 +5941,7 @@ indentation and initial hashes. Behaves usually outside of comment."
5960 ;; (defconst cperl-array-face 5941 ;; (defconst cperl-array-face
5961 ;; 'cperl-array-face 5942 ;; 'cperl-array-face
5962 ;; "Face to use for arrays.")) 5943 ;; "Face to use for arrays."))
5963 ;; Here we try to guess background 5944 (let ((background 'light))
5964 (let ((background
5965 (if (boundp 'font-lock-background-mode)
5966 font-lock-background-mode
5967 'light)))
5968 (defvar cperl-guessed-background
5969 (if (and (boundp 'font-lock-display-type)
5970 (eq font-lock-display-type 'grayscale))
5971 'gray
5972 background)
5973 "Background as guessed by CPerl mode")
5974 (and (not (cperl-is-face 'font-lock-constant-face)) 5945 (and (not (cperl-is-face 'font-lock-constant-face))
5975 (cperl-is-face 'font-lock-reference-face) 5946 (cperl-is-face 'font-lock-reference-face)
5976 (copy-face 'font-lock-reference-face 'font-lock-constant-face)) 5947 (copy-face 'font-lock-reference-face 'font-lock-constant-face))
@@ -6400,8 +6371,6 @@ side-effect of memorizing only. Examples in `cperl-style-examples'."
6400 (funcall (or (and (boundp 'find-tag-default-function) 6371 (funcall (or (and (boundp 'find-tag-default-function)
6401 find-tag-default-function) 6372 find-tag-default-function)
6402 (get major-mode 'find-tag-default-function) 6373 (get major-mode 'find-tag-default-function)
6403 ;; XEmacs 19.12 has `find-tag-default-hook'; it is
6404 ;; automatically used within `find-tag-default':
6405 'find-tag-default)))))) 6374 'find-tag-default))))))
6406 6375
6407(defun cperl-info-on-command (command) 6376(defun cperl-info-on-command (command)