SUPERSEDES m264kjbaj5.fsf(a)silver.local
Based on everyone's comments, here is my revised patch for w3.el. As
suggested it uses (featurep 'xemacs) to identify XEmacs instead of string
matches. I've also included Adrian's list of wide characters.
In addition to the changes listed below, w3's font.el will be removed because
it is not used anymore.
Malcolm
ChangeLog addition:
2006-05-08 Malcolm Purvis <malcolmp(a)xemacs.org>
* lisp/Makefile.in (SOURCES):
* lisp/css.el:
* lisp/css.el (font-rgb-color-p): New.
* lisp/css.el (font-rgb-color-red): New.
* lisp/css.el (font-rgb-color-green): New.
* lisp/css.el (font-rgb-color-blue): New.
* lisp/css.el (css-replace-regexp):
* lisp/css.el (css-running-xemacs): Removed.
* lisp/css.el (featurep):
* lisp/css.el (css-active-device-types):
* lisp/devices.el (if):
* lisp/images.el (if):
* lisp/images.el (image-native-formats):
* lisp/mule-sysdp.el (mule-sysdep-version):
* lisp/url-file.el (url-dired-minor-mode-map):
* lisp/url-vars.el (url-default-ports):
* lisp/url-vars.el (url-running-xemacs): Removed.
* lisp/url.el (if):
* lisp/w3-display.el:
* lisp/w3-display.el (set-font-style-by-keywords): New.
* lisp/w3-display.el (w3-pause):
* lisp/w3-display.el (w3-get-default-color):
* lisp/w3-display.el (not):
* lisp/w3-display.el (w3-finalize-image-download):
* lisp/w3-display.el (w3-resurrect-hyperlinks):
* lisp/w3-display.el (w3-display-node):
* lisp/w3-display.el (w3-finish-drawing):
* lisp/w3-menu.el (w3-menu-filters-supported-p):
* lisp/w3-menu.el (w3-menu-dummy-menu):
* lisp/w3-menu.el (w3-toggle-minibuffer):
* lisp/w3-menu.el (w3-toggle-location):
* lisp/w3-menu.el (w3-toggle-menubar):
* lisp/w3-menu.el (w3-location-active):
* lisp/w3-menu.el (w3-menubar-active):
* lisp/w3-menu.el (w3-menu-global-menubar):
* lisp/w3-menu.el (w3-menu-file-menu):
* lisp/w3-menu.el (w3-menu-options-menu):
* lisp/w3-menu.el (w3-menu-buffer-menu):
* lisp/w3-menu.el (w3-menu-emacs-button):
* lisp/w3-menu.el (w3-menu-install-menubar):
* lisp/w3-menu.el (w3-menu-install-menubar-item):
* lisp/w3-menu.el (w3-menu-set-menubar-dirty-flag):
* lisp/w3-menu.el (w3-menu-toggle-menubar):
* lisp/w3-menu.el (w3-menu-popup-menu):
* lisp/w3-mouse.el (w3-mouse-button1):
* lisp/w3-mouse.el (not):
* lisp/w3-parse.el (w3-invalid-sgml-char-replacement): Extra
characters.
* lisp/w3-sysdp.el (window-system):
* lisp/w3-vars.el:
* lisp/w3-vars.el (w3-running-xemacs): Removed.
* lisp/w3-widget.el (featurep):
* lisp/w3-widget.el (widget-image-value-create):
* lisp/w3.el (w3-load-flavors):
Removed font.el because it is in core, some inline functions moved
to other files. Use (featurep 'xemacs) instead of string matches
on emacs-version.
xemacs-w3.el source patch:
Diff command: cvs -q diff -u
Files affected: lisp/w3.el lisp/w3-widget.el lisp/w3-vars.el lisp/w3-sysdp.el
lisp/w3-parse.el lisp/w3-mouse.el lisp/w3-menu.el lisp/w3-display.el lisp/url.el
lisp/url-vars.el lisp/url-file.el lisp/mule-sysdp.el lisp/images.el lisp/devices.el
lisp/css.el lisp/Makefile.in
Index: lisp/Makefile.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- lisp/Makefile.in 1999/11/27 15:37:17 1.5
+++ lisp/Makefile.in 2006/05/08 13:02:13
@@ -32,7 +32,7 @@
SOURCES = \
mule-sysdp.el w3-widget.el devices.el w3-imap.el css.el \
- dsssl.el dsssl-flow.el font.el images.el w3-vars.el w3-cus.el \
+ dsssl.el dsssl-flow.el images.el w3-vars.el w3-cus.el \
w3-style.el w3-keyword.el w3-forms.el w3-emulate.el \
w3-props.el w3-menu.el w3-mouse.el w3-toolbar.el \
w3-speak.el w3-latex.el w3-parse.el w3-display.el w3-print.el \
Index: lisp/css.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/css.el,v
retrieving revision 1.6
diff -u -r1.6 css.el
--- lisp/css.el 2005/12/26 13:47:35 1.6
+++ lisp/css.el 2006/05/08 13:02:14
@@ -46,6 +46,15 @@
For a terminal screen, the value is always 1."
(font-width (face-font 'default frame))))
+(defsubst font-rgb-color-p (obj)
+ (or (and (vectorp obj)
+ (= (length obj) 4)
+ (eq (aref obj 0) 'rgb))))
+
+(defsubst font-rgb-color-red (obj) (aref obj 1))
+(defsubst font-rgb-color-green (obj) (aref obj 2))
+(defsubst font-rgb-color-blue (obj) (aref obj 3))
+
;; CBI = Cant Be Implemented - due to limitations in emacs/xemacs
;; NYI = Not Yet Implemented - due to limitations of space/time
;; NYPI = Not Yet Partially Implemented - possible partial support, eventually
@@ -214,10 +223,6 @@
(defvar css-scratch-current-value nil)
)
-(defconst css-running-xemacs
- (string-match "XEmacs" (emacs-version))
- "Whether we are running in XEmacs or not.")
-
(defsubst css-replace-regexp (regexp to-string)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
@@ -754,7 +759,7 @@
(css-replace-regexp "[ \t\r]+$" "") ; Nuke whitespace at end of
line
(goto-char (point-min)))
-(if css-running-xemacs
+(if (featurep 'xemacs)
(defun css-color-light-p (color-or-face)
(let (face color)
(cond
@@ -808,8 +813,10 @@
(defun css-active-device-types (&optional device)
(let ((types (list 'all
- (if css-running-xemacs 'xemacs 'emacs)
- (if (or css-running-xemacs font-running-emacs-new-redisplay)
+ (if (featurep 'xemacs) 'xemacs 'emacs)
+ (if (or (featurep 'xemacs)
+ (and (fboundp 'set-face-attribute)
+ (fboundp 'set-face-background-pixmap)))
'multifont 'unifont)
(if (css-color-light-p 'default) 'light 'dark)))
(type (device-type device)))
Index: lisp/devices.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/devices.el,v
retrieving revision 1.3
diff -u -r1.3 devices.el
--- lisp/devices.el 1999/02/26 15:05:31 1.3
+++ lisp/devices.el 2006/05/08 13:02:15
@@ -33,10 +33,10 @@
(require 'cl)
(eval-when-compile
- (if (string-match "XEmacs" (emacs-version))
+ (if (featurep 'xemacs)
(set 'byte-optimize nil)))
-(if (string-match "XEmacs" (emacs-version))
+(if (featurep 'xemacs)
nil
'()
(defalias 'selected-device 'ignore)
@@ -338,5 +338,5 @@
(provide 'devices)
(eval-when-compile
- (if (string-match "XEmacs" (emacs-version))
+ (if (featurep 'xemacs)
(set 'byte-optimize t)))
cvs server: cannot find lisp/font.el
Index: lisp/images.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/images.el,v
retrieving revision 1.4
diff -u -r1.4 images.el
--- lisp/images.el 1999/11/27 15:37:18 1.4
+++ lisp/images.el 2006/05/08 13:02:15
@@ -32,7 +32,7 @@
(require 'mule-sysdp)
(eval-and-compile
- (if (not (and (string-match "XEmacs" emacs-version)
+ (if (not (and (featurep 'xemacs)
(or (> emacs-major-version 19)
(>= emacs-minor-version 14))))
(require 'w3-sysdp)))
@@ -41,7 +41,7 @@
(defvar image-converters nil "Storage for the image converters.")
(defvar image-native-formats
(cond
- ((string-match "XEmacs" emacs-version)
+ ((featurep 'xemacs)
(delq nil (cons (if (featurep 'x) 'xbm)
(mapcar (function (lambda (x) (if (featurep x) x)))
'(xpm gif jpeg tiff png imagick)))))
Index: lisp/mule-sysdp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/mule-sysdp.el,v
retrieving revision 1.7
diff -u -r1.7 mule-sysdp.el
--- lisp/mule-sysdp.el 2002/05/09 03:22:49 1.7
+++ lisp/mule-sysdp.el 2006/05/08 13:02:15
@@ -13,7 +13,7 @@
(defconst mule-sysdep-version (if (featurep 'mule)
(cond
- ((string-match "XEmacs" emacs-version)
+ ((featurep 'xemacs)
(if (boundp 'enable-multibyte-characters)
(make-variable-buffer-local 'enable-multibyte-characters))
'xemacs)
Index: lisp/url-file.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/url-file.el,v
retrieving revision 1.5
diff -u -r1.5 url-file.el
--- lisp/url-file.el 1999/11/27 15:37:19 1.5
+++ lisp/url-file.el 2006/05/08 13:02:16
@@ -89,7 +89,7 @@
(defvar url-dired-minor-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-m" 'url-dired-find-file)
- (if url-running-xemacs
+ (if (featurep 'xemacs)
(define-key map [button2] 'url-dired-find-file-mouse)
(define-key map [mouse-2] 'url-dired-find-file-mouse))
map)
Index: lisp/url-vars.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/url-vars.el,v
retrieving revision 1.8
diff -u -r1.8 url-vars.el
--- lisp/url-vars.el 2000/10/06 09:15:22 1.8
+++ lisp/url-vars.el 2006/05/08 13:02:17
@@ -549,9 +549,6 @@
(const :tag "Direct connection" :value native))
:group 'url-hairy)
-(defvar url-running-xemacs (string-match "XEmacs" emacs-version)
- "*Got XEmacs?")
-
(defvar url-default-ports '(("http" . "80")
("gopher" . "70")
("telnet" . "23")
Index: lisp/url.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/url.el,v
retrieving revision 1.9
diff -u -r1.9 url.el
--- lisp/url.el 2003/01/08 21:56:44 1.9
+++ lisp/url.el 2006/05/08 13:02:19
@@ -46,7 +46,7 @@
(error nil)))
(eval-and-compile
- (if (not (and (string-match "XEmacs" emacs-version)
+ (if (not (and (featurep 'xemacs)
(or (> emacs-major-version 19)
(>= emacs-minor-version 14))))
(require 'w3-sysdp)))
Index: lisp/w3-display.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-display.el,v
retrieving revision 1.6
diff -u -r1.6 w3-display.el
--- lisp/w3-display.el 2004/06/18 04:48:04 1.6
+++ lisp/w3-display.el 2006/05/08 13:02:22
@@ -133,6 +133,18 @@
)
+(defsubst set-font-style-by-keywords (fontobj styles)
+ (make-local-variable 'font-func)
+ (declare (special font-func))
+ (if (listp styles)
+ (while styles
+ (setq font-func (car-safe (cdr-safe (assq (car styles) font-style-keywords)))
+ styles (cdr styles))
+ (and (fboundp font-func) (funcall font-func fontobj t)))
+ (setq font-func (car-safe (cdr-safe (assq styles font-style-keywords))))
+ (and (fboundp font-func) (funcall font-func fontobj t))))
+
+
(defvar w3-display-same-buffer nil)
(defvar w3-face-cache nil "Cache for w3-face-for-element")
(defvar w3-face-index 0)
@@ -174,7 +186,7 @@
(save-excursion
(goto-char (or cur-viewing-pos (point-min)))
(cond
- (w3-running-xemacs
+ ((featurep 'xemacs)
(if (and (not (sit-for 0)) (input-pending-p))
(condition-case ()
(let ((buffer-read-only t))
@@ -273,7 +285,7 @@
(equal foreground background))
(defun w3-get-default-color (backgroundp)
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
(or (if backgroundp
(face-background-name 'default)
(face-foreground-name 'default))
@@ -339,7 +351,7 @@
(cond
((not (fboundp 'make-face))
(fset 'w3-make-face 'ignore))
- (w3-running-xemacs
+ ((featurep 'xemacs)
(fset 'w3-make-face 'make-face))
(t
(fset 'w3-make-face 'w3-make-face-emacs19)))
@@ -916,7 +928,7 @@
(not (buffer-name buffer)))
nil)
((and (eq widget 'background)
- w3-running-xemacs)
+ (featurep 'xemacs))
(set-face-background-pixmap face
(glyph-image-instance glyph)
buffer))
@@ -1987,7 +1999,7 @@
(defvar w3-display-hackmap nil "Keymap used for hyperlink widgets")
(defun w3-resurrect-hyperlinks ()
- (if (and (not w3-display-hackmap) w3-running-xemacs)
+ (if (and (not w3-display-hackmap) (featurep 'xemacs))
(progn
(setq w3-display-hackmap (make-sparse-keymap))
(set-keymap-parent w3-display-hackmap widget-button-keymap)
@@ -2437,7 +2449,7 @@
(setf (car w3-face-color) fore)
(setf (car w3-face-background-color) back)
- (if (not font-running-xemacs)
+ (if (not (featurep 'xemacs))
(setq w3-display-background-properties (cons fore back))
(if pixm
(w3-maybe-start-background-image-download pixm 'default))
@@ -2714,7 +2726,7 @@
(push-mark (point) t)
(w3-find-specific-link (url-target url-current-object)))
(goto-char (point-min)))
- (and (not w3-running-xemacs)
+ (and (not (featurep 'xemacs))
(not (eq (device-type) 'tty))
(w3-fixup-eol-faces))
(message "Drawing... done"))
Index: lisp/w3-menu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-menu.el,v
retrieving revision 1.6
diff -u -r1.6 w3-menu.el
--- lisp/w3-menu.el 1999/11/27 15:37:20 1.6
+++ lisp/w3-menu.el 2006/05/08 13:02:23
@@ -41,7 +41,7 @@
;;; Spiffy new menus (for both Emacs and XEmacs)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar w3-menu-filters-supported-p
- (or w3-running-xemacs (and (= emacs-major-version 20)
+ (or (featurep 'xemacs) (and (= emacs-major-version 20)
(>= emacs-minor-version 3))))
(defvar w3-menu-fsfemacs-bookmark-menu nil)
@@ -116,7 +116,7 @@
menu-desc))
(defun w3-menu-dummy-menu (item)
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
(list (vector item nil nil))
(list "Ignored" (vector item nil nil))))
@@ -194,7 +194,7 @@
(defun w3-toggle-minibuffer ()
(interactive)
(cond
- (w3-running-xemacs
+ ((featurep 'xemacs)
(if (equal (frame-property (selected-frame) 'minibuffer) t)
;; frame has a minibuffer, so remove it
@@ -216,7 +216,7 @@
(defun w3-toggle-location ()
(interactive)
(cond
- (w3-running-xemacs
+ ((featurep 'xemacs)
(let ((on (specifier-instance has-modeline-p (selected-window))))
(set-specifier has-modeline-p (not on) (selected-window))))
(t nil)))
@@ -225,7 +225,7 @@
(interactive)
(cond
;; XEmacs style
- (w3-running-xemacs
+ ((featurep 'xemacs)
(set-specifier menubar-visible-p (cons (current-buffer)
(not (specifier-instance
menubar-visible-p)))))
@@ -234,17 +234,17 @@
(menu-bar-mode (if (w3-menubar-active) -1 1)))))
(defun w3-location-active ()
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
(specifier-instance has-modeline-p (selected-window))
t))
(defun w3-menubar-active ()
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
(and (featurep 'menubar) (specifier-instance menubar-visible-p))
(and (boundp 'menu-bar-mode) menu-bar-mode)))
(defun w3-menu-global-menubar ()
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
(default-value 'default-menubar)
(lookup-key (current-global-map) [menu-bar])))
@@ -280,7 +280,7 @@
["PostScript" (w3-mail-current-document nil "PostScript") t]
["LaTeX Source" (w3-mail-current-document nil "LaTeX Source") t]
)
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
"---:shadowDoubleEtchedIn"
"---")
["Close" delete-frame (not (eq (next-frame) (selected-frame)))]
@@ -380,15 +380,15 @@
"---"
["Show Menubar" w3-toggle-menubar
:style toggle :selected (w3-menubar-active)]
- (if (and w3-running-xemacs (featurep 'toolbar))
+ (if (and (featurep 'xemacs) (featurep 'toolbar))
["Show Toolbar" w3-toggle-toolbar
:style toggle :selected (w3-toolbar-active)]
["Show Toolbar" w3-toggle-toolbar nil])
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
["Show Location" w3-toggle-location
:style toggle :selected (w3-location-active)]
["Show Location" w3-toggle-location nil])
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
["Show Status Bar" w3-toggle-minibuffer
:style toggle
:selected (eq (frame-property (selected-frame) 'minibuffer) t)
@@ -433,7 +433,7 @@
"W3 menu style list.")
(defconst w3-menu-buffer-menu
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
'("Buffers"
:filter buffers-menu-filter
["List All Buffers" list-buffers t]
@@ -454,7 +454,7 @@
(defconst w3-menu-emacs-button
(vector
- (if w3-running-xemacs "XEmacs" "Emacs")
'w3-menu-toggle-menubar t))
+ (if (featurep 'xemacs) "XEmacs" "Emacs")
'w3-menu-toggle-menubar t))
(defconst w3-menu-help-menu
(list
@@ -599,7 +599,7 @@
(defun w3-menu-install-menubar ()
(cond
- (w3-running-xemacs
+ ((featurep 'xemacs)
(cond
((not (featurep 'menubar)) nil) ; No menus available
((featurep 'infodock) nil) ; InfoDock does it automatically
@@ -613,7 +613,7 @@
(defun w3-menu-install-menubar-item ()
(cond
- (w3-running-xemacs
+ ((featurep 'xemacs)
(if (not (featurep 'menubar))
nil ; No menus available
(set-buffer-menubar (copy-sequence (w3-menu-global-menubar)))
@@ -633,7 +633,7 @@
(t nil)))
(defun w3-menu-set-menubar-dirty-flag ()
- (cond (w3-running-xemacs
+ (cond ((featurep 'xemacs)
(set-menubar-dirty-flag))
(t
(force-mode-line-update))))
@@ -643,7 +643,7 @@
(cond
;;((eq w3-use-menus 1)
;;nil)
- (w3-running-xemacs
+ ((featurep 'xemacs)
(if (null (car (find-menu-item current-menubar '("XEmacs"))))
(set-buffer-menubar w3-menu-w3-menubar)
(set-buffer-menubar (copy-sequence (w3-menu-global-menubar)))
@@ -776,7 +776,7 @@
(fset 'event-glyph 'ignore))
(defun w3-menu-popup-menu (e menu)
- (if w3-running-xemacs
+ (if (featurep 'xemacs)
(popup-menu menu)
(let ((bogus-menu nil))
(easy-menu-define bogus-menu nil nil menu)
Index: lisp/w3-mouse.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-mouse.el,v
retrieving revision 1.3
diff -u -r1.3 w3-mouse.el
--- lisp/w3-mouse.el 1999/02/26 15:05:47 1.3
+++ lisp/w3-mouse.el 2006/05/08 13:02:23
@@ -55,18 +55,18 @@
(defvar w3-mouse-button1 (cond
((featurep 'infodock) nil)
- ((and w3-running-xemacs (featurep 'mouse)) 'button1)
- (w3-running-xemacs nil)
+ ((and (featurep 'xemacs) (featurep 'mouse)) 'button1)
+ ((featurep 'xemacs) nil)
(t 'down-mouse-1)))
(defvar w3-mouse-button2 (cond
((featurep 'infodock) nil)
- ((and w3-running-xemacs (featurep 'mouse)) 'button2)
- (w3-running-xemacs nil)
+ ((and (featurep 'xemacs) (featurep 'mouse)) 'button2)
+ ((featurep 'xemacs) nil)
(t 'down-mouse-2)))
(defvar w3-mouse-button3 (cond
((featurep 'infodock) nil)
- ((and w3-running-xemacs (featurep 'mouse)) 'button3)
- (w3-running-xemacs nil)
+ ((and (featurep 'xemacs) (featurep 'mouse)) 'button3)
+ ((featurep 'xemacs) nil)
(t 'down-mouse-3)))
(if w3-mouse-button3
@@ -83,7 +83,7 @@
(define-key w3-netscape-emulation-minor-mode-map
(vector w3-mouse-button2) 'w3-follow-mouse-other-frame)))
-(if (not w3-running-xemacs)
+(if (not (featurep 'xemacs))
(progn
(if w3-track-mouse
(define-key w3-mode-map [mouse-movement] 'w3-mouse-handler))
Index: lisp/w3-parse.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-parse.el,v
retrieving revision 1.7
diff -u -r1.7 w3-parse.el
--- lisp/w3-parse.el 2000/10/06 09:15:23 1.7
+++ lisp/w3-parse.el 2006/05/08 13:02:28
@@ -1939,6 +1939,17 @@
(155 . ">") ; single right-pointing angle quotation mark
(156 . "oe") ; latin small ligature oe
(157 . "Y\\..") ; latin capital letter Y with diaeresis
+ ;; APA: testing wide characters
+ ;; See
http://www.w3.org/People/mimasa/test/xhtml/entities/entities.html
+ (8211 . "--") ; ndash
+ (8216 . "`") ; lsquo
+ (8217 . "'") ; rsquo
+ (8220 . "``") ; ldquo
+ (8221 . "''") ; rdquo
+ (8222 . ",,") ; bdquo
+ (8226 . "*") ; bull
+ (8230 . "...") ; hellip
+ (9560 . "?") ; illegal character in paypal spam
)
"Replacement for invalid SGML characters")
Index: lisp/w3-sysdp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-sysdp.el,v
retrieving revision 1.4
diff -u -r1.4 w3-sysdp.el
--- lisp/w3-sysdp.el 2000/10/06 09:15:23 1.4
+++ lisp/w3-sysdp.el 2006/05/08 13:02:29
@@ -158,10 +158,6 @@
(match-beginning 1) (match-end 1)))
0))
-(sysdep-defconst sysdep-running-xemacs
- (or (string-match "Lucid" emacs-version)
- (string-match "XEmacs" emacs-version)))
-
(sysdep-defconst window-system nil)
(sysdep-defconst window-system-version 0)
Index: lisp/w3-vars.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-vars.el,v
retrieving revision 1.7
diff -u -r1.7 w3-vars.el
--- lisp/w3-vars.el 1999/11/27 15:37:20 1.7
+++ lisp/w3-vars.el 2006/05/08 13:02:29
@@ -74,12 +74,6 @@
in later garbage collections taking more time.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Figure out what flavor of emacs we are running
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar w3-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
- "*Got XEmacs?.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Store the database of HTML general entities.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar w3-html-entities
Index: lisp/w3-widget.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3-widget.el,v
retrieving revision 1.3
diff -u -r1.3 w3-widget.el
--- lisp/w3-widget.el 1999/11/27 15:37:20 1.3
+++ lisp/w3-widget.el 2006/05/08 13:02:30
@@ -61,7 +61,7 @@
(defconst widget-mouse-button2 nil)
(defconst widget-mouse-button3 nil)
-(if (string-match "XEmacs" (emacs-version))
+(if (featurep 'xemacs)
(if (featurep 'mouse)
(setq widget-mouse-button1 'button1
widget-mouse-button2 'button2
@@ -180,7 +180,7 @@
;; data back from a URL somewhere.
(cond
- (w3-running-xemacs
+ ((featurep 'xemacs)
;; All XEmacsen have support for glyphs
(setq invalid-glyph (and glyph (condition-case ()
(if (fboundp 'specifier-instance)
Index: lisp/w3.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/w3/lisp/w3.el,v
retrieving revision 1.7
diff -u -r1.7 w3.el
--- lisp/w3.el 2000/10/06 09:15:23 1.7
+++ lisp/w3.el 2006/05/08 13:02:33
@@ -1446,7 +1446,7 @@
(defun w3-load-flavors ()
;; Load the correct emacsen specific stuff
(cond
- (w3-running-xemacs (require 'w3-xemac))
+ ((featurep 'xemacs) (require 'w3-xemac))
(t ; Assume we are the FSF variant
(require (intern (format "w3-e%d" emacs-major-version)))))
(if (featurep 'emacspeak)
--
Malcolm Purvis <malcolmp(a)xemacs.org>