diff options
| author | Stefan Kangas | 2019-10-04 01:54:56 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2019-10-04 01:59:22 +0200 |
| commit | 3886a5c140b03f07c8faea7cacad0a791bc54fa5 (patch) | |
| tree | 439d7035874ba434db0e5b7be397b6eb6ae44478 | |
| parent | a397fa06d18d6ae37a3a1288f269e1ae9eb3b569 (diff) | |
| download | emacs-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.el | 37 |
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 | ||
| 705 | See documentation of a variable `cperl-problems-old-emaxen' for the | 702 | See documentation of a variable `cperl-problems-old-emaxen' for the |
| 706 | problems which disappear if you upgrade Emacs to a reasonably new | 703 | problems which disappear if you upgrade Emacs to a reasonably new |
| 707 | version (20.3 for Emacs, and those of 2004 for XEmacs).") | 704 | version (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).") | |||
| 712 | Emacs had a _very_ restricted syntax parsing engine until version | 709 | Emacs had a _very_ restricted syntax parsing engine until version |
| 713 | 20.1. Most problems below are corrected starting from this version of | 710 | 20.1. Most problems below are corrected starting from this version of |
| 714 | Emacs, and all of them should be fixed in version 20.3. (Or apply | 711 | Emacs, and all of them should be fixed in version 20.3. (Or apply |
| 715 | patches to Emacs 19.33/34 - see tips.) XEmacs was very backward in | 712 | patches to Emacs 19.33/34 - see tips.) |
| 716 | this respect (until 2003). | ||
| 717 | 713 | ||
| 718 | Note that even with newer Emacsen in some very rare cases the details | 714 | Note that even with newer Emacsen in some very rare cases the details |
| 719 | of interaction of `font-lock' and syntaxification may be not cleaned | 715 | of 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) |