]> git.eshelyaron.com Git - emacs.git/commitdiff
(verilog-error-regexp-add-xemacs): Silence compiler by only defining on XEmacs.
authorGlenn Morris <rgm@gnu.org>
Sun, 19 Jul 2009 00:47:47 +0000 (00:47 +0000)
committerGlenn Morris <rgm@gnu.org>
Sun, 19 Jul 2009 00:47:47 +0000 (00:47 +0000)
lisp/ChangeLog
lisp/progmodes/verilog-mode.el

index 4c74d22f737632f8e61c340895e492b3b20c2b3f..04a93dfe596ae48242718d1ff9c850ba2fe29adf 100644 (file)
@@ -1,5 +1,8 @@
 2009-07-19  Glenn Morris  <rgm@gnu.org>
 
+       * progmodes/verilog-mode.el (verilog-error-regexp-add-xemacs):
+       Silence compiler by only defining on XEmacs.
+
        * international/mule.el (auto-coding-regexp-alist): Only match
        BABYL... at the start of buffer, not of lines.  (Bug#3790)
 
index 1a885fe6b733448059c79c025fb639252d52cc84..c4b2f4a009ee5b64332a18ea73ac49fdb2549a6c 100644 (file)
@@ -1454,31 +1454,32 @@ without the directory portion, will be substituted."
           "\\b__FILE__\\b" (file-name-nondirectory (buffer-file-name))
           t t compile-command))))
 
-;; Following code only gets called from compilation-mode-hook on XEmacs to add error handling.
-(defun verilog-error-regexp-add-xemacs ()
-  "Teach XEmacs about verilog errors.
+(if (featurep 'xemacs)
+    ;; Following code only gets called from compilation-mode-hook on XEmacs to add error handling.
+    (defun verilog-error-regexp-add-xemacs ()
+      "Teach XEmacs about verilog errors.
 Called by `compilation-mode-hook'.  This allows \\[next-error] to
 find the errors."
-  (interactive)
-  (if (boundp 'compilation-error-regexp-systems-alist)
-      (if (and 
-           (not (equal compilation-error-regexp-systems-list 'all))
-           (not (member compilation-error-regexp-systems-list 'verilog)))
-         (push 'verilog compilation-error-regexp-systems-list)))
-  (if (boundp 'compilation-error-regexp-alist-alist)
-      (if (not (assoc 'verilog compilation-error-regexp-alist-alist))
-          (setcdr compilation-error-regexp-alist-alist
-                  (cons verilog-error-regexp-xemacs-alist
-                        (cdr compilation-error-regexp-alist-alist)))))
-  (if (boundp 'compilation-font-lock-keywords)
-      (progn
-        (make-variable-buffer-local 'compilation-font-lock-keywords)
-        (setq compilation-font-lock-keywords  verilog-error-font-lock-keywords)
-        (font-lock-set-defaults)))
-  ;; Need to re-run compilation-error-regexp builder
-  (if (fboundp 'compilation-build-compilation-error-regexp-alist)
-      (compilation-build-compilation-error-regexp-alist))
-  )
+      (interactive)
+      (if (boundp 'compilation-error-regexp-systems-alist)
+         (if (and
+              (not (equal compilation-error-regexp-systems-list 'all))
+              (not (member compilation-error-regexp-systems-list 'verilog)))
+             (push 'verilog compilation-error-regexp-systems-list)))
+      (if (boundp 'compilation-error-regexp-alist-alist)
+         (if (not (assoc 'verilog compilation-error-regexp-alist-alist))
+             (setcdr compilation-error-regexp-alist-alist
+                     (cons verilog-error-regexp-xemacs-alist
+                           (cdr compilation-error-regexp-alist-alist)))))
+      (if (boundp 'compilation-font-lock-keywords)
+         (progn
+           (make-variable-buffer-local 'compilation-font-lock-keywords)
+           (setq compilation-font-lock-keywords  verilog-error-font-lock-keywords)
+           (font-lock-set-defaults)))
+      ;; Need to re-run compilation-error-regexp builder
+      (if (fboundp 'compilation-build-compilation-error-regexp-alist)
+         (compilation-build-compilation-error-regexp-alist))
+      ))
 
 ;; Following code only gets called from compilation-mode-hook on Emacs to add error handling.
 (defun verilog-error-regexp-add-emacs ()