diff options
| author | Michael Kifer | 2002-09-18 04:23:27 +0000 |
|---|---|---|
| committer | Michael Kifer | 2002-09-18 04:23:27 +0000 |
| commit | f3eabcdf400d9a6848cf46973cde07b13d7fbab0 (patch) | |
| tree | f5dcdbaff36ba3985d80f59f74eb604ce5e330e8 /lisp | |
| parent | bd3c9eb62202f579000c3dad85e3a79003e2beb7 (diff) | |
| download | emacs-f3eabcdf400d9a6848cf46973cde07b13d7fbab0.tar.gz emacs-f3eabcdf400d9a6848cf46973cde07b13d7fbab0.zip | |
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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/ediff-hook.el | 4 | ||||
| -rw-r--r-- | lisp/ediff-init.el | 35 | ||||
| -rw-r--r-- | lisp/ediff-util.el | 4 | ||||
| -rw-r--r-- | lisp/emulation/viper-util.el | 15 | ||||
| -rw-r--r-- | lisp/emulation/viper.el | 4 |
6 files changed, 48 insertions, 26 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 012ac51a6f5..9009888c364 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2002-09-18 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 2 | |||
| 3 | * ediff-hooks.el: Put back the autoloads (for compatibility with XEmacs). | ||
| 4 | |||
| 5 | * ediff-init.el: Use defalias instead of fset. | ||
| 6 | |||
| 7 | * ediff-util.el: Use defalias instead of fset. | ||
| 8 | |||
| 9 | * viper-util.el (viper-chars-in-region): simplification. | ||
| 10 | |||
| 11 | * viper.el (viper-emacs-state-mode-list): added modes. | ||
| 12 | |||
| 1 | 2002-09-18 Miles Bader <miles@gnu.org> | 13 | 2002-09-18 Miles Bader <miles@gnu.org> |
| 2 | 14 | ||
| 3 | * diff-mode.el (diff-mode): Don't evaluate `compilation-last-buffer' | 15 | * diff-mode.el (diff-mode): Don't evaluate `compilation-last-buffer' |
diff --git a/lisp/ediff-hook.el b/lisp/ediff-hook.el index daae55827a9..23baeb49d7d 100644 --- a/lisp/ediff-hook.el +++ b/lisp/ediff-hook.el | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | ;; end pacifier | 44 | ;; end pacifier |
| 45 | 45 | ||
| 46 | ;; allow menus to be set up without ediff-wind.el being loaded | 46 | ;; allow menus to be set up without ediff-wind.el being loaded |
| 47 | ;;;###autoload | ||
| 47 | (defvar ediff-window-setup-function) | 48 | (defvar ediff-window-setup-function) |
| 48 | 49 | ||
| 49 | ;; This macro is used to avoid compilation warnings. | 50 | ;; This macro is used to avoid compilation warnings. |
| @@ -51,12 +52,14 @@ | |||
| 51 | ;; compiler at hand (emacs or xemacs). | 52 | ;; compiler at hand (emacs or xemacs). |
| 52 | ;; The autoload, below, is useless in Emacs because ediff-hook.el | 53 | ;; The autoload, below, is useless in Emacs because ediff-hook.el |
| 53 | ;; is dumped with emacs, but it is needed in XEmacs | 54 | ;; is dumped with emacs, but it is needed in XEmacs |
| 55 | ;;;###autoload | ||
| 54 | (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form) | 56 | (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form) |
| 55 | (if (string-match "XEmacs" emacs-version) | 57 | (if (string-match "XEmacs" emacs-version) |
| 56 | xemacs-form emacs-form)) | 58 | xemacs-form emacs-form)) |
| 57 | 59 | ||
| 58 | ;; This autoload is useless in Emacs because ediff-hook.el is dumped with | 60 | ;; This autoload is useless in Emacs because ediff-hook.el is dumped with |
| 59 | ;; emacs, but it is needed in XEmacs | 61 | ;; emacs, but it is needed in XEmacs |
| 62 | ;;;###autoload | ||
| 60 | (ediff-cond-compile-for-xemacs-or-emacs | 63 | (ediff-cond-compile-for-xemacs-or-emacs |
| 61 | ;; xemacs form | 64 | ;; xemacs form |
| 62 | (defun ediff-xemacs-init-menus () | 65 | (defun ediff-xemacs-init-menus () |
| @@ -79,6 +82,7 @@ | |||
| 79 | 82 | ||
| 80 | ;; This autoload is useless in Emacs because ediff-hook.el is dumped with | 83 | ;; This autoload is useless in Emacs because ediff-hook.el is dumped with |
| 81 | ;; emacs, but it is needed in XEmacs | 84 | ;; emacs, but it is needed in XEmacs |
| 85 | ;;;###autoload | ||
| 82 | (ediff-cond-compile-for-xemacs-or-emacs | 86 | (ediff-cond-compile-for-xemacs-or-emacs |
| 83 | (progn | 87 | (progn |
| 84 | (defvar ediff-menu | 88 | (defvar ediff-menu |
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index ad59b18d3fd..7b540ad710c 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -758,15 +758,15 @@ to temp files when Ediff needs to find fine differences." | |||
| 758 | 758 | ||
| 759 | (ediff-cond-compile-for-xemacs-or-emacs | 759 | (ediff-cond-compile-for-xemacs-or-emacs |
| 760 | (progn ; xemacs | 760 | (progn ; xemacs |
| 761 | (fset 'ediff-read-event (symbol-function 'next-command-event)) | 761 | (defalias 'ediff-read-event 'next-command-event) |
| 762 | (fset 'ediff-overlayp (symbol-function 'extentp)) | 762 | (defalias 'ediff-overlayp 'extentp) |
| 763 | (fset 'ediff-make-overlay (symbol-function 'make-extent)) | 763 | (defalias 'ediff-make-overlay 'make-extent) |
| 764 | (fset 'ediff-delete-overlay (symbol-function 'delete-extent))) | 764 | (defalias 'ediff-delete-overlay 'delete-extent)) |
| 765 | (progn ; emacs | 765 | (progn ; emacs |
| 766 | (fset 'ediff-read-event (symbol-function 'read-event)) | 766 | (defalias 'ediff-read-event 'read-event) |
| 767 | (fset 'ediff-overlayp (symbol-function 'overlayp)) | 767 | (defalias 'ediff-overlayp 'overlayp) |
| 768 | (fset 'ediff-make-overlay (symbol-function 'make-overlay)) | 768 | (defalias 'ediff-make-overlay 'make-overlay) |
| 769 | (fset 'ediff-delete-overlay (symbol-function 'delete-overlay))) | 769 | (defalias 'ediff-delete-overlay 'delete-overlay)) |
| 770 | ) | 770 | ) |
| 771 | 771 | ||
| 772 | ;; Check the current version against the major and minor version numbers | 772 | ;; Check the current version against the major and minor version numbers |
| @@ -831,18 +831,17 @@ to temp files when Ediff needs to find fine differences." | |||
| 831 | (if (ediff-window-display-p) | 831 | (if (ediff-window-display-p) |
| 832 | (ediff-cond-compile-for-xemacs-or-emacs | 832 | (ediff-cond-compile-for-xemacs-or-emacs |
| 833 | (progn ; xemacs | 833 | (progn ; xemacs |
| 834 | (fset 'ediff-display-pixel-width (symbol-function 'device-pixel-width)) | 834 | (defalias 'ediff-display-pixel-width 'device-pixel-width) |
| 835 | (fset 'ediff-display-pixel-height | 835 | (defalias 'ediff-display-pixel-height 'device-pixel-height)) |
| 836 | (symbol-function 'device-pixel-height))) | ||
| 837 | (progn ; emacs | 836 | (progn ; emacs |
| 838 | (fset 'ediff-display-pixel-width | 837 | (defalias 'ediff-display-pixel-width |
| 839 | (if (fboundp 'display-pixel-width) | 838 | (if (fboundp 'display-pixel-width) |
| 840 | (symbol-function 'display-pixel-width) | 839 | 'display-pixel-width |
| 841 | (symbol-function 'x-display-pixel-width))) | 840 | 'x-display-pixel-width)) |
| 842 | (fset 'ediff-display-pixel-height | 841 | (defalias 'ediff-display-pixel-height |
| 843 | (if (fboundp 'display-pixel-height) | 842 | (if (fboundp 'display-pixel-height) |
| 844 | (symbol-function 'display-pixel-height) | 843 | 'display-pixel-height |
| 845 | (symbol-function 'x-display-pixel-height)))) | 844 | 'x-display-pixel-height))) |
| 846 | )) | 845 | )) |
| 847 | 846 | ||
| 848 | ;; A-list of current-diff-overlay symbols associated with buf types | 847 | ;; A-list of current-diff-overlay symbols associated with buf types |
| @@ -1738,7 +1737,7 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 1738 | 1737 | ||
| 1739 | 1738 | ||
| 1740 | (if (fboundp 'with-syntax-table) | 1739 | (if (fboundp 'with-syntax-table) |
| 1741 | (fset 'ediff-with-syntax-table 'with-syntax-table) | 1740 | (defalias 'ediff-with-syntax-table 'with-syntax-table) |
| 1742 | ;; stolen from subr.el in emacs 21 | 1741 | ;; stolen from subr.el in emacs 21 |
| 1743 | (defmacro ediff-with-syntax-table (table &rest body) | 1742 | (defmacro ediff-with-syntax-table (table &rest body) |
| 1744 | (let ((old-table (make-symbol "table")) | 1743 | (let ((old-table (make-symbol "table")) |
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 1e0bcb8cbb3..64d19c5ee69 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -4040,8 +4040,8 @@ Mail anyway? (y or n) ") | |||
| 4040 | )) | 4040 | )) |
| 4041 | 4041 | ||
| 4042 | (cond ((fboundp 'nuke-selective-display) | 4042 | (cond ((fboundp 'nuke-selective-display) |
| 4043 | ;; XEmacs 19.12 has nuke-selective-display | 4043 | ;; XEmacs has nuke-selective-display |
| 4044 | (fset 'ediff-nuke-selective-display 'nuke-selective-display)) | 4044 | (defalias 'ediff-nuke-selective-display 'nuke-selective-display)) |
| 4045 | (t | 4045 | (t |
| 4046 | (defun ediff-nuke-selective-display () | 4046 | (defun ediff-nuke-selective-display () |
| 4047 | (save-excursion | 4047 | (save-excursion |
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index bb748fcadfc..2bbdb828ff6 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -264,13 +264,16 @@ | |||
| 264 | (goto-char cur-pos) | 264 | (goto-char cur-pos) |
| 265 | result)) | 265 | result)) |
| 266 | 266 | ||
| 267 | ;; Emacs counts each multibyte character as several positions in the buffer, so | 267 | ;; Emacs used to count each multibyte character as several positions in the buffer, |
| 268 | ;; we use Emacs' chars-in-region. XEmacs is counting each char as just one pos, | 268 | ;; so we had to use Emacs' chars-in-region to count characters. Since 20.3, |
| 269 | ;; so we can simply subtract. | 269 | ;; Emacs counts multibyte characters as 1 position. XEmacs has always been |
| 270 | ;; counting each char as just one pos. So, now we can simply subtract beg from | ||
| 271 | ;; end to determine the number of characters in a region. | ||
| 270 | (defun viper-chars-in-region (beg end &optional preserve-sign) | 272 | (defun viper-chars-in-region (beg end &optional preserve-sign) |
| 271 | (let ((count (abs (if (fboundp 'chars-in-region) | 273 | ;;(let ((count (abs (if (fboundp 'chars-in-region) |
| 272 | (chars-in-region beg end) | 274 | ;; (chars-in-region beg end) |
| 273 | (- end beg))))) | 275 | ;; (- end beg))))) |
| 276 | (let ((count (abs (- end beg)))) | ||
| 274 | (if (and (< end beg) preserve-sign) | 277 | (if (and (< end beg) preserve-sign) |
| 275 | (- count) | 278 | (- count) |
| 276 | count))) | 279 | count))) |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 27bcf021e80..50b5d82dff0 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -422,6 +422,10 @@ widget." | |||
| 422 | efs-mode | 422 | efs-mode |
| 423 | tar-mode | 423 | tar-mode |
| 424 | 424 | ||
| 425 | browse-kill-ring-mode | ||
| 426 | recentf-mode | ||
| 427 | occur-mode | ||
| 428 | |||
| 425 | mh-folder-mode | 429 | mh-folder-mode |
| 426 | mail-mode | 430 | mail-mode |
| 427 | gnus-group-mode | 431 | gnus-group-mode |