"Eric M. Ludlam" <zappo(a)ultranet.com> writes:
>Are you interested in adding your checkdoc.el to XEmacs
>package? I'm asking because I made some change for it to
>work with XEmacs in my workspace. (Mininum change is to use
>characterp instead of integerp in line 647.)
That is fine with me. Feel free to send me the patch. I have several
other small changes that I haven't published yet.
Here's the patch. Changes are:
1. New variable checkdoc-xemacs-p.
2. Avoid integerp check. Return value of read-char is
always a character on XEmacs.
If this patch is OK to you, I'd like to add this to
CVS XEmacs package tree. Steve, where would you suggest to
add? I think xemacs-devel package is a good candidate.
Once it's added to the CVS tree, I'll ask Martin to change
CVS write access and after that it will be maintained by
you.
If anyone is ever interested in the latest goings on of any of my
software, feel free to go here to check the latest RCS logs:
http://choochoo.ultranet.com/~zappo/fsf.shtml
Wow. I'd like to see every software incorporated into XEmacs
package.
--- checkdoc.el.orig Wed Oct 18 19:46:00 2000
+++ checkdoc.el Wed Oct 18 01:05:41 2000
@@ -189,6 +189,8 @@
(defmacro defcustom (var value doc &rest args)
(` (defvar (, var) (, value) (, doc))))))
+(defvar checkdoc-xemacs-p (string-match "XEmacs" emacs-version))
+
(defcustom checkdoc-autofix-flag 'semiautomatic
"*Non-nil means attempt auto-fixing of doc strings.
If this value is the symbol `query', then the user is queried before
@@ -445,7 +447,7 @@
;;; Compatibility
;;
-(if (string-match "X[Ee]macs" emacs-version)
+(if checkdoc-xemacs-p
(progn
(defalias 'checkdoc-make-overlay 'make-extent)
(defalias 'checkdoc-overlay-put 'set-extent-property)
@@ -650,8 +652,10 @@
(goto-char (checkdoc-error-start (car (car err-list))))
(if (not (pos-visible-in-window-p))
(recenter (- (window-height) 2)))
- (setq c (checkdoc-read-event)))1
- (if (not (integerp c)) (setq c ??))
+ (setq c (checkdoc-read-event)))
+ (if (and (not checkdoc-xemacs-p)
+ (not (integerp c)))
+ (setq c ??))
(cond
;; Exit condition
((checkdoc-char= c ?\C-g) (signal 'quit nil))
@@ -1193,7 +1197,7 @@
;; Override some bindings
(define-key map "\C-\M-x" 'checkdoc-eval-defun)
;(define-key map "\C-x`" 'checkdoc-continue)
- (if (not (string-match "XEmacs" emacs-version))
+ (if (not checkdoc-xemacs-p)
(define-key map [menu-bar emacs-lisp eval-buffer]
'checkdoc-eval-current-buffer))
;; Add some new bindings under C-c ?
@@ -2660,7 +2664,7 @@
(if checkdoc-output-mode-map
nil
(setq checkdoc-output-mode-map (make-sparse-keymap))
- (if (not (string-match "XEmacs" emacs-version))
+ (if (not checkdoc-xemacs-p)
(define-key checkdoc-output-mode-map [mouse-2]
'checkdoc-find-error-mouse))
(define-key checkdoc-output-mode-map "\C-c\C-c" 'checkdoc-find-error)
--
Yoshiki Hayashi