emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el,v


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cperl-mode.el,v
Date: Mon, 29 Oct 2007 15:33:07 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   07/10/29 15:33:06

Index: progmodes/cperl-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cperl-mode.el,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- progmodes/cperl-mode.el     13 Oct 2007 03:00:45 -0000      1.97
+++ progmodes/cperl-mode.el     29 Oct 2007 15:32:32 -0000      1.98
@@ -78,9 +78,8 @@
       (condition-case nil
          (require 'man)
        (error nil))
-      (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
       (defvar cperl-can-font-lock
-       (or cperl-xemacs-p
+       (or (featurep 'xemacs)
            (and (boundp 'emacs-major-version)
                 (or window-system
                     (> emacs-major-version 20)))))
@@ -131,14 +130,14 @@
                 (cperl-make-face ,arg ,descr))
             (or (boundp (quote ,arg)) ; We use unquoted variants too
                 (defvar ,arg (quote ,arg) ,descr))))
-      (if cperl-xemacs-p
+      (if (featurep 'xemacs)
          (defmacro cperl-etags-snarf-tag (file line)
            `(progn
                (beginning-of-line 2)
                (list ,file ,line)))
        (defmacro cperl-etags-snarf-tag (file line)
          `(etags-snarf-tag)))
-      (if cperl-xemacs-p
+      (if (featurep 'xemacs)
          (defmacro cperl-etags-goto-tag-location (elt)
            ;;(progn
             ;; (switch-to-buffer (get-file-buffer (elt ,elt 0)))
@@ -151,10 +150,8 @@
        (defmacro cperl-etags-goto-tag-location (elt)
          `(etags-goto-tag-location ,elt))))
 
-(defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
-
 (defvar cperl-can-font-lock
-  (or cperl-xemacs-p
+  (or (featurep 'xemacs)
       (and (boundp 'emacs-major-version)
           (or window-system
               (> emacs-major-version 20)))))
@@ -458,7 +455,7 @@
   :group 'cperl-faces)
 
 ;;; Some double-evaluation happened with font-locks...  Needed with 21.2...
-(defvar cperl-singly-quote-face cperl-xemacs-p)
+(defvar cperl-singly-quote-face (featurep 'xemacs))
 
 (defcustom cperl-invalid-face 'underline
   "*Face for highlighting trailing whitespace."
@@ -1011,7 +1008,7 @@
 (defmacro cperl-define-key (emacs-key definition &optional xemacs-key)
   `(define-key cperl-mode-map
      ,(if xemacs-key
-         `(if cperl-xemacs-p ,xemacs-key ,emacs-key)
+         `(if (featurep 'xemacs) ,xemacs-key ,emacs-key)
        emacs-key)
      ,definition))
 
@@ -1024,7 +1021,7 @@
      (setq cperl-del-back-ch (aref cperl-del-back-ch 0)))
 
 (defun cperl-mark-active () (mark))    ; Avoid undefined warning
-(if cperl-xemacs-p
+(if (featurep 'xemacs)
     (progn
       ;; "Active regions" are on: use region only if active
       ;; "Active regions" are off: use region unconditionally
@@ -1040,7 +1037,7 @@
 (defun cperl-putback-char (c)          ; Emacs 19
   (set 'unread-command-events (list c))) ; Avoid undefined warning
 
-(if cperl-xemacs-p
+(if (featurep 'xemacs)
     (defun cperl-putback-char (c)      ; XEmacs >= 19.12
       (setq unread-command-events (list (eval '(character-to-event c))))))
 
@@ -1192,7 +1189,7 @@
                      ;;(concat (char-to-string help-char) "v") ; does not work
                      'cperl-get-help
                      [(control c) (control h) v]))
-  (if (and cperl-xemacs-p
+  (if (and (featurep 'xemacs)
           (<= emacs-minor-version 11) (<= emacs-major-version 19))
       (progn
        ;; substitute-key-definition is usefulness-deenhanced...
@@ -1744,7 +1741,7 @@
   (setq paragraph-separate paragraph-start)
   (make-local-variable 'paragraph-ignore-fill-prefix)
   (setq paragraph-ignore-fill-prefix t)
-  (if cperl-xemacs-p
+  (if (featurep 'xemacs)
     (progn
       (make-local-variable 'paren-backwards-message)
       (set 'paren-backwards-message t)))
@@ -1835,7 +1832,7 @@
        (or (boundp 'font-lock-unfontify-region-function)
            (set 'font-lock-unfontify-region-function
                 'font-lock-default-unfontify-region))
-       (unless cperl-xemacs-p          ; Our: just a plug for wrong font-lock
+       (unless (featurep 'xemacs)              ; Our: just a plug for wrong 
font-lock
          (make-local-variable 'font-lock-unfontify-region-function)
          (set 'font-lock-unfontify-region-function ; not present with old Emacs
               'cperl-font-lock-unfontify-region-function))
@@ -5854,7 +5851,7 @@
           (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock
                ;; not yet as of XEmacs 19.12, works with 21.1.11
                (or
-                (not cperl-xemacs-p)
+                (not (featurep 'xemacs))
                 (string< "21.1.9" emacs-version)
                 (and (string< "21.1.10" emacs-version)
                      (string< emacs-version "21.1.2")))
@@ -6015,7 +6012,7 @@
          ;;    (defconst cperl-nonoverridable-face
          ;;    'cperl-nonoverridable-face
          ;;    "Face to use for data types from another group."))
-         ;;(if (not cperl-xemacs-p) nil
+         ;;(if (not (featurep 'xemacs)) nil
          ;;  (or (boundp 'font-lock-comment-face)
          ;;    (defconst font-lock-comment-face
          ;;      'font-lock-comment-face
@@ -6964,7 +6961,7 @@
     (save-excursion
       (cond (inbuffer nil)             ; Already there
            ((file-exists-p tags-file-name)
-            (if cperl-xemacs-p
+            (if (featurep 'xemacs)
                 (visit-tags-table-buffer)
               (visit-tags-table-buffer tags-file-name)))
            (t (set-buffer (find-file-noselect tags-file-name))))
@@ -7100,7 +7097,7 @@
            pack name cons1 to l1 l2 l3 l4 b)
        ;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later!
        (setq cperl-hierarchy (list l1 l2 l3))
-       (if cperl-xemacs-p              ; Not checked
+       (if (featurep 'xemacs)          ; Not checked
            (progn
              (or tags-file-name
                  ;; Does this work in XEmacs?
@@ -8451,7 +8448,7 @@
                                  'variable-documentation))))
         (manual-program (if is-func "perldoc -f" "perldoc")))
     (cond
-     (cperl-xemacs-p
+     ((featurep 'xemacs)
       (let ((Manual-program "perldoc")
            (Manual-switches (if is-func (list "-f"))))
        (manual-entry word)))
@@ -8493,7 +8490,7 @@
   (interactive)
   (require 'man)
   (cond
-   (cperl-xemacs-p
+   ((featurep 'xemacs)
     (let ((Manual-program "perldoc"))
       (manual-entry buffer-file-name)))
    (t
@@ -8689,6 +8686,8 @@
       (message "to %s:%6s,%7s" l delta tot))
     tot))
 
+(defvar font-lock-cache-position)
+
 (defun cperl-emulate-lazy-lock (&optional window-size)
   "Emulate `lazy-lock' without `condition-case', so `debug-on-error' works.
 Start fontifying the buffer from the start (or end) using the given




reply via email to

[Prev in Thread] Current Thread [Next in Thread]