And this annoyed me as I was doing the previous change.
APPROVE COMMIT psgml
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1488572202 0
# Fri Mar 03 20:16:42 2017 +0000
# Node ID e8aec82924b4d160e6ffd5b867d5d9b876eb7a41
# Parent 62b07faa58ac420b3d5d4703bf994098dd60e4ec
Change running-xemacs to (featurep 'xemacs), which bytecomp.el knows about
2017-03-03 Aidan Kehoe <kehoea(a)parhasard.net>
[...]
* psgml-debug.el (load):
* psgml-parse.el (sgml-set-buffer-multibyte):
* psgml.el (sgml-mouse-region):
* psgml.el (and):
* psgml.el (sgml-options-menu-items):
* psgml.el (sgml-mode):
* psgml.el (xml-mode):
running-xemacs -> (featurep 'xemacs), which the byte compiler
knows to reduce to a constant.
diff -r 62b07faa58ac -r e8aec82924b4 ChangeLog
--- a/ChangeLog Fri Mar 03 20:12:17 2017 +0000
+++ b/ChangeLog Fri Mar 03 20:16:42 2017 +0000
@@ -4,6 +4,16 @@
Only remove SGML from the menu if we have menubar support, avoid
annoying backtraces on TTY-only builds.
+ * psgml-debug.el (load):
+ * psgml-parse.el (sgml-set-buffer-multibyte):
+ * psgml.el (sgml-mouse-region):
+ * psgml.el (and):
+ * psgml.el (sgml-options-menu-items):
+ * psgml.el (sgml-mode):
+ * psgml.el (xml-mode):
+ running-xemacs -> (featurep 'xemacs), which the byte compiler
+ knows to reduce to a constant.
+
2014-06-29 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.49 released.
diff -r 62b07faa58ac -r e8aec82924b4 psgml-debug.el
--- a/psgml-debug.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-debug.el Fri Mar 03 20:16:42 2017 +0000
@@ -118,7 +118,7 @@
)
(eval-when (load)
- (unless running-xemacs ;; XEmacs change
+ (unless (featurep 'xemacs) ;; XEmacs change
(def-edebug-spec sgml-with-parser-syntax (&rest form))
(def-edebug-spec sgml-with-parser-syntax-ro (&rest form))
(def-edebug-spec sgml-skip-upto (sexp))
diff -r 62b07faa58ac -r e8aec82924b4 psgml-html.el
--- a/psgml-html.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-html.el Fri Mar 03 20:16:42 2017 +0000
@@ -267,7 +267,7 @@
;; font-lock setup for various emacsen: XEmacs, Emacs 19.29+, Emacs <19.29.
;; By Ulrik Dickow <dickow(a)nbi.dk>. (Last update: 05-Sep-1995).
- (cond (running-xemacs ; XEmacs/Lucid
+ (cond ((featurep 'xemacs) ; XEmacs/Lucid
(put major-mode 'font-lock-keywords-case-fold-search t))
;; XEmacs (19.13, at least) guesses the rest correctly.
;; If any older XEmacsen don't, then tell me.
diff -r 62b07faa58ac -r e8aec82924b4 psgml-parse.el
--- a/psgml-parse.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-parse.el Fri Mar 03 20:16:42 2017 +0000
@@ -354,7 +354,7 @@
(sgml-debug "Restoring buffer mod: %s" buffer-modified)))))
(defun sgml-set-buffer-multibyte (flag)
- (cond (running-xemacs
+ (cond ((featurep 'xemacs)
flag)
((and (boundp 'emacs-major-version) (>= emacs-major-version 20))
(set-buffer-multibyte
diff -r 62b07faa58ac -r e8aec82924b4 psgml-sysdep.el
--- a/psgml-sysdep.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml-sysdep.el Fri Mar 03 20:16:42 2017 +0000
@@ -4,7 +4,7 @@
(require 'psgml)
(cond
;; XEmacs change
- (running-xemacs
+ ((featurep 'xemacs)
(require 'psgml-xemacs))
(t
(require 'psgml-other)))
diff -r 62b07faa58ac -r e8aec82924b4 psgml.el
--- a/psgml.el Fri Mar 03 20:12:17 2017 +0000
+++ b/psgml.el Fri Mar 03 20:16:42 2017 +0000
@@ -885,7 +885,7 @@
(defun sgml-mouse-region ()
(let (start end)
(cond
- (running-xemacs ;; XEmacs change
+ ((featurep 'xemacs) ;; XEmacs change
(cond
((null (mark-marker)) nil)
(t (setq start (region-beginning)
@@ -1109,12 +1109,12 @@
;; XEmacs change: psgml-xemacs hasn't been necessarily pulled in before
;; we need this.
(eval-and-compile
- (and running-xemacs
+ (and (featurep 'xemacs)
(autoload 'sgml-make-options-menu "psgml-xemacs")))
(defun sgml-options-menu-items (vars)
;; XEmacs change: use sgml-make-options-menu on XEmacs
- (if running-xemacs
+ (if (featurep 'xemacs)
(sgml-make-options-menu vars)
(mapcar (lambda (var)
(let ((desc (format "%s [%s]"
@@ -1360,7 +1360,7 @@
(make-local-variable 'indent-line-function)
(setq indent-line-function 'sgml-indent-line)
(make-local-variable 'mode-line-format)
- (if running-xemacs ;; XEmacs change
+ (if (featurep 'xemacs) ;; XEmacs change
;; Modify mode-line-format with subst (suggested by wing)
;; Apart from requiring CL at runtime, this doesn't work in Emacs
;; 21. It's the sort of thing which-func is supposed to do...
@@ -1381,7 +1381,7 @@
(add-to-list 'text-property-default-nonsticky '(face . t)))
(make-local-hook 'post-command-hook)
(add-hook 'post-command-hook 'sgml-command-post 'append 'local)
- (unless running-xemacs ;; XEmacs change
+ (unless (featurep 'xemacs) ;; XEmacs change
;; XEmacs 20.4 doesn't handle local activate-menubar-hook
;; it tries to call the function `t' when using the menubar
(make-local-hook 'activate-menubar-hook))
@@ -1413,7 +1413,7 @@
`sgml-indent-data' is non-nil."
;; XEmacs change: use HTML font lock keywords. Urk, this is bad!
(cond
- (running-xemacs
+ ((featurep 'xemacs)
(require 'psgml-html)
(put 'xml-mode 'font-lock-defaults '(html-font-lock-keywords nil t))))
(setq sgml-xml-p t)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date