]> git.eshelyaron.com Git - emacs.git/commitdiff
2002-09-18 Michael Kifer <kifer@cs.stonybrook.edu>
authorMichael Kifer <kifer@cs.stonybrook.edu>
Wed, 18 Sep 2002 04:23:27 +0000 (04:23 +0000)
committerMichael Kifer <kifer@cs.stonybrook.edu>
Wed, 18 Sep 2002 04:23:27 +0000 (04:23 +0000)
* 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.

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

index 012ac51a6f5fc6eb9808c8dcb405e45db05a50c9..9009888c3643e424a98f91b305db574e42f7b9aa 100644 (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'
index daae55827a93f4d59cf921d0db28091fc5985d7f..23baeb49d7d8e316dac3fe6b79447e0d1571af1f 100644 (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.
 ;; 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
index ad59b18d3fd960b55361ca3595ea356ee8329c12..7b540ad710c61f87e81f584247b6ba9620eb550a 100644 (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"))
index 1e0bcb8cbb3cb9bc6a931fbec4d89b4223a288fc..64d19c5ee698624bbf83a5d976de87c4e84f5b34 100644 (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
index bb748fcadfc3439e34108c6e894237921e985866..2bbdb828ff631949a57a54beeafedc6c3f6a8055 100644 (file)
     (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)))
index 27bcf021e803e88c75ca474341e061823bbf43ea..50b5d82dff0f2b8a220c66c7c86ca55ba8ebf38e 100644 (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
index 8a7072802b046e0a6a99c2209e1c0fc0ecd03c48..81362b111d17086912d27b60929e5bd6f1aab7ec 100644 (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),