Mercurial > emacs
changeset 47520:a37b476e1aec
2002-09-18 Michael Kifer <kifer@cs.stonybrook.edu>
* ediff-hooks.el: Put back the autoloads (for compatibility with XEmacs).
* ediff-init.el: Use defalias instead of fset.
* ediff-util.el: Use defalias instead of fset.
* viper-util.el (viper-chars-in-region): simplification.
* viper.el (viper-emacs-state-mode-list): added modes.
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Wed, 18 Sep 2002 04:23:27 +0000 |
parents | 1ddc3c34180d |
children | c361d424aee2 |
files | lisp/ChangeLog lisp/ediff-hook.el lisp/ediff-init.el lisp/ediff-util.el lisp/emulation/viper-util.el lisp/emulation/viper.el man/viper.texi |
diffstat | 7 files changed, 49 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Sep 18 02:36:10 2002 +0000 +++ b/lisp/ChangeLog Wed Sep 18 04:23:27 2002 +0000 @@ -1,3 +1,15 @@ +2002-09-18 Michael Kifer <kifer@cs.stonybrook.edu> + + * ediff-hooks.el: Put back the autoloads (for compatibility with XEmacs). + + * ediff-init.el: Use defalias instead of fset. + + * ediff-util.el: Use defalias instead of fset. + + * viper-util.el (viper-chars-in-region): simplification. + + * viper.el (viper-emacs-state-mode-list): added modes. + 2002-09-18 Miles Bader <miles@gnu.org> * diff-mode.el (diff-mode): Don't evaluate `compilation-last-buffer'
--- a/lisp/ediff-hook.el Wed Sep 18 02:36:10 2002 +0000 +++ b/lisp/ediff-hook.el Wed Sep 18 04:23:27 2002 +0000 @@ -44,6 +44,7 @@ ;; end pacifier ;; allow menus to be set up without ediff-wind.el being loaded +;;;###autoload (defvar ediff-window-setup-function) ;; This macro is used to avoid compilation warnings. @@ -51,12 +52,14 @@ ;; compiler at hand (emacs or xemacs). ;; The autoload, below, is useless in Emacs because ediff-hook.el ;; is dumped with emacs, but it is needed in XEmacs +;;;###autoload (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form) (if (string-match "XEmacs" emacs-version) xemacs-form emacs-form)) ;; This autoload is useless in Emacs because ediff-hook.el is dumped with ;; emacs, but it is needed in XEmacs +;;;###autoload (ediff-cond-compile-for-xemacs-or-emacs ;; xemacs form (defun ediff-xemacs-init-menus () @@ -79,6 +82,7 @@ ;; This autoload is useless in Emacs because ediff-hook.el is dumped with ;; emacs, but it is needed in XEmacs +;;;###autoload (ediff-cond-compile-for-xemacs-or-emacs (progn (defvar ediff-menu
--- a/lisp/ediff-init.el Wed Sep 18 02:36:10 2002 +0000 +++ b/lisp/ediff-init.el Wed Sep 18 04:23:27 2002 +0000 @@ -758,15 +758,15 @@ (ediff-cond-compile-for-xemacs-or-emacs (progn ; xemacs - (fset 'ediff-read-event (symbol-function 'next-command-event)) - (fset 'ediff-overlayp (symbol-function 'extentp)) - (fset 'ediff-make-overlay (symbol-function 'make-extent)) - (fset 'ediff-delete-overlay (symbol-function 'delete-extent))) + (defalias 'ediff-read-event 'next-command-event) + (defalias 'ediff-overlayp 'extentp) + (defalias 'ediff-make-overlay 'make-extent) + (defalias 'ediff-delete-overlay 'delete-extent)) (progn ; emacs - (fset 'ediff-read-event (symbol-function 'read-event)) - (fset 'ediff-overlayp (symbol-function 'overlayp)) - (fset 'ediff-make-overlay (symbol-function 'make-overlay)) - (fset 'ediff-delete-overlay (symbol-function 'delete-overlay))) + (defalias 'ediff-read-event 'read-event) + (defalias 'ediff-overlayp 'overlayp) + (defalias 'ediff-make-overlay 'make-overlay) + (defalias 'ediff-delete-overlay 'delete-overlay)) ) ;; Check the current version against the major and minor version numbers @@ -831,18 +831,17 @@ (if (ediff-window-display-p) (ediff-cond-compile-for-xemacs-or-emacs (progn ; xemacs - (fset 'ediff-display-pixel-width (symbol-function 'device-pixel-width)) - (fset 'ediff-display-pixel-height - (symbol-function 'device-pixel-height))) + (defalias 'ediff-display-pixel-width 'device-pixel-width) + (defalias 'ediff-display-pixel-height 'device-pixel-height)) (progn ; emacs - (fset 'ediff-display-pixel-width + (defalias 'ediff-display-pixel-width (if (fboundp 'display-pixel-width) - (symbol-function 'display-pixel-width) - (symbol-function 'x-display-pixel-width))) - (fset 'ediff-display-pixel-height + 'display-pixel-width + 'x-display-pixel-width)) + (defalias 'ediff-display-pixel-height (if (fboundp 'display-pixel-height) - (symbol-function 'display-pixel-height) - (symbol-function 'x-display-pixel-height)))) + 'display-pixel-height + 'x-display-pixel-height))) )) ;; A-list of current-diff-overlay symbols associated with buf types @@ -1738,7 +1737,7 @@ (if (fboundp 'with-syntax-table) - (fset 'ediff-with-syntax-table 'with-syntax-table) + (defalias 'ediff-with-syntax-table 'with-syntax-table) ;; stolen from subr.el in emacs 21 (defmacro ediff-with-syntax-table (table &rest body) (let ((old-table (make-symbol "table"))
--- a/lisp/ediff-util.el Wed Sep 18 02:36:10 2002 +0000 +++ b/lisp/ediff-util.el Wed Sep 18 04:23:27 2002 +0000 @@ -4040,8 +4040,8 @@ )) (cond ((fboundp 'nuke-selective-display) - ;; XEmacs 19.12 has nuke-selective-display - (fset 'ediff-nuke-selective-display 'nuke-selective-display)) + ;; XEmacs has nuke-selective-display + (defalias 'ediff-nuke-selective-display 'nuke-selective-display)) (t (defun ediff-nuke-selective-display () (save-excursion
--- a/lisp/emulation/viper-util.el Wed Sep 18 02:36:10 2002 +0000 +++ b/lisp/emulation/viper-util.el Wed Sep 18 04:23:27 2002 +0000 @@ -264,13 +264,16 @@ (goto-char cur-pos) result)) -;; Emacs counts each multibyte character as several positions in the buffer, so -;; we use Emacs' chars-in-region. XEmacs is counting each char as just one pos, -;; so we can simply subtract. +;; Emacs used to count each multibyte character as several positions in the buffer, +;; so we had to use Emacs' chars-in-region to count characters. Since 20.3, +;; Emacs counts multibyte characters as 1 position. XEmacs has always been +;; counting each char as just one pos. So, now we can simply subtract beg from +;; end to determine the number of characters in a region. (defun viper-chars-in-region (beg end &optional preserve-sign) - (let ((count (abs (if (fboundp 'chars-in-region) - (chars-in-region beg end) - (- end beg))))) + ;;(let ((count (abs (if (fboundp 'chars-in-region) + ;; (chars-in-region beg end) + ;; (- end beg))))) + (let ((count (abs (- end beg)))) (if (and (< end beg) preserve-sign) (- count) count)))
--- a/lisp/emulation/viper.el Wed Sep 18 02:36:10 2002 +0000 +++ b/lisp/emulation/viper.el Wed Sep 18 04:23:27 2002 +0000 @@ -422,6 +422,10 @@ efs-mode tar-mode + browse-kill-ring-mode + recentf-mode + occur-mode + mh-folder-mode mail-mode gnus-group-mode
--- a/man/viper.texi Wed Sep 18 02:36:10 2002 +0000 +++ b/man/viper.texi Wed Sep 18 04:23:27 2002 +0000 @@ -4479,6 +4479,7 @@ kin@@isi.com (Kin Cho), kwzh@@gnu.org (Karl Heuer), lindstro@@biostat.wisc.edu (Mary Lindstrom), +lektu@@terra.es (Juanma Barranquero), minakaji@@osaka.email.ne.jp (Mikio Nakajima), Mark.Bordas@@East.Sun.COM (Mark Bordas), meyering@@comco.com (Jim Meyering),