1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00

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.
This commit is contained in:
Michael Kifer 2002-09-18 04:23:27 +00:00
parent bd3c9eb622
commit f3eabcdf40
7 changed files with 49 additions and 26 deletions

View File

@ -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'

View File

@ -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

View File

@ -758,15 +758,15 @@ to temp files when Ediff needs to find fine differences."
(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 @@ to temp files when Ediff needs to find fine differences."
(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 @@ Unless optional argument INPLACE is non-nil, return a new string."
(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"))

View File

@ -4040,8 +4040,8 @@ Mail anyway? (y or n) ")
))
(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

View File

@ -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)))

View File

@ -422,6 +422,10 @@ widget."
efs-mode
tar-mode
browse-kill-ring-mode
recentf-mode
occur-mode
mh-folder-mode
mail-mode
gnus-group-mode

View File

@ -4479,6 +4479,7 @@ kanze@@gabi-soft.fr (James Kanze),
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),