changeset 87678:ae3fe9150b36

2008-01-09 Michael Kifer <kifer@cs.stonybrook.edu> * ediff*.el: commented out declare-function. "make bootstrap" stops with an error and emacs does not compile with those things in. Besides, declare-function is not defined in XEmacs. * ediff-util (eqiff-quit): autoraise minibuffer. * ediff-diff (ediff-convert-fine-diffs-to-overlays): make it a defin * viper*.el: commented out declare-function -- not defined in XEmacs. * viper-ex.el (viper-info-on-file): take care of indiret buffers. * viper.el (viper-set-hooks, set-cursor-color): set viper-vi-state-cursor-color.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Wed, 09 Jan 2008 06:16:07 +0000
parents f001e1c2f823
children caf9a76fd5a3
files lisp/ChangeLog lisp/ediff-diff.el lisp/ediff-util.el lisp/ediff-wind.el lisp/ediff.el lisp/emulation/viper-cmd.el lisp/emulation/viper-ex.el lisp/emulation/viper-keym.el lisp/emulation/viper-util.el lisp/emulation/viper.el
diffstat 10 files changed, 61 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/ChangeLog	Wed Jan 09 06:16:07 2008 +0000
@@ -1,3 +1,19 @@
+2008-01-09  Michael Kifer  <kifer@cs.stonybrook.edu>
+
+	* ediff*.el: commented out declare-function. "make bootstrap"
+	stops with an error and emacs does not compile with those things in.
+	Besides, declare-function is not defined in XEmacs.
+	
+	* ediff-util (eqiff-quit): autoraise minibuffer.
+	
+	* ediff-diff (ediff-convert-fine-diffs-to-overlays): make it a defin
+	
+	* viper*.el: commented out declare-function -- not defined in XEmacs.
+	
+	* viper-ex.el (viper-info-on-file): take care of indiret buffers.
+	
+	* viper.el (viper-set-hooks, set-cursor-color): set viper-vi-state-cursor-color.
+	
 2008-01-09  Tom Tromey  <tromey@redhat.com>
 
 	* vc.el (vc-status-headers): Rename from
--- a/lisp/ediff-diff.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/ediff-diff.el	Wed Jan 09 06:16:07 2008 +0000
@@ -948,7 +948,7 @@
       )))
 
 
-(defsubst ediff-convert-fine-diffs-to-overlays (diff-list region-num)
+(defun ediff-convert-fine-diffs-to-overlays (diff-list region-num)
   (ediff-set-fine-overlays-in-one-buffer 'A diff-list region-num)
   (ediff-set-fine-overlays-in-one-buffer 'B diff-list region-num)
   (if ediff-3way-job
--- a/lisp/ediff-util.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/ediff-util.el	Wed Jan 09 06:16:07 2008 +0000
@@ -2406,7 +2406,9 @@
 temporarily reverses the meaning of this variable."
   (interactive "P")
   (ediff-barf-if-not-control-buffer)
-  (let ((ctl-buf (current-buffer)))
+  (let ((ctl-buf (current-buffer))
+	(ctl-frm (selected-frame))
+	(minibuffer-auto-raise t))
     (if (y-or-n-p (format "Quit this Ediff session%s? "
 			  (if (ediff-buffer-live-p ediff-meta-buffer)
 			      " & show containing session group" "")))
@@ -2414,6 +2416,8 @@
 	  (message "")
 	  (set-buffer ctl-buf)
 	  (ediff-really-quit reverse-default-keep-variants))
+      (select-frame ctl-frm)
+      (raise-frame ctl-frm)
       (message ""))))
 
 
@@ -2818,7 +2822,8 @@
 
 
 ;; ediff-barf-if-not-control-buffer ensures only called from ediff.
-(declare-function ediff-version "ediff" ())
+;; declare-function does not exist in XEmacs
+;;(declare-function ediff-version "ediff" ()))
 
 (defun ediff-status-info ()
   "Show the names of the buffers or files being operated on by Ediff.
--- a/lisp/ediff-wind.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/ediff-wind.el	Wed Jan 09 06:16:07 2008 +0000
@@ -147,9 +147,10 @@
   :type 'function
   :group 'ediff-window)
 
+;; declare-function does not exist in XEmacs
 ;; Definitions hidden from the compiler by compat wrappers.
-(declare-function ediff-display-pixel-width "ediff-init")
-(declare-function ediff-display-pixel-height "ediff-init")
+;;(declare-function ediff-display-pixel-width "ediff-init")
+;;(declare-function ediff-display-pixel-height "ediff-init")
 
 (defconst ediff-control-frame-parameters
   (list
--- a/lisp/ediff.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/ediff.el	Wed Jan 09 06:16:07 2008 +0000
@@ -8,7 +8,7 @@
 ;; Keywords: comparing, merging, patching, tools, unix
 
 (defconst ediff-version "2.81.2" "The current version of Ediff")
-(defconst ediff-date "August 18, 2007" "Date of last update")
+(defconst ediff-date "January 09, 2008" "Date of last update")
 
 
 ;; This file is part of GNU Emacs.
@@ -361,7 +361,8 @@
 		 (list (cons 'ediff-job-name job-name))
 		 merge-buffer-file)))
 
-(declare-function diff-latest-backup-file "diff" (fn))
+;; declare-function does not exist in XEmacs
+;;(declare-function diff-latest-backup-file "diff" (fn)))
 
 ;;;###autoload
 (defalias 'ediff 'ediff-files)
@@ -1427,7 +1428,7 @@
     (format "Ediff %s of %s" ediff-version ediff-date)))
 
 ;; info is run first, and will autoload info.el.
-(declare-function Info-goto-node "info" (nodename &optional fork))
+;;(declare-function Info-goto-node "info" (nodename &optional fork))
 
 ;;;###autoload
 (defun ediff-documentation (&optional node)
--- a/lisp/emulation/viper-cmd.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/emulation/viper-cmd.el	Wed Jan 09 06:16:07 2008 +0000
@@ -2773,7 +2773,9 @@
 (defun viper-next-line-carefully (arg)
   (condition-case nil
       ;; do not use forward-line! need to keep column
-      (with-no-warnings (next-line arg))
+      (if (featurep 'emacs)
+	  (with-no-warnings (next-line arg))
+	(next-line arg))
     (error nil)))
 
 
@@ -3073,15 +3075,18 @@
 	(com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
     ;; do not use forward-line! need to keep column
-    (with-no-warnings (next-line val))
+    (if (featurep 'emacs)
+	(with-no-warnings (next-line val))
+      (next-line val))
     (if viper-ex-style-motion
 	(if (and (eolp) (not (bolp))) (backward-char 1)))
     (setq this-command 'next-line)
     (if com (viper-execute-com 'viper-next-line val com))))
 
-(declare-function widget-type "wid-edit" (widget))
-(declare-function widget-button-press "wid-edit" (pos &optional event))
-(declare-function viper-set-hooks "viper" ())
+;; declare-function is not defined in XEmacs
+;;(declare-function widget-type "wid-edit" (widget))
+;;(declare-function widget-button-press "wid-edit" (pos &optional event))
+;;(declare-function viper-set-hooks "viper" ())
 
 (defun viper-next-line-at-bol (arg)
   "Next line at beginning of line.
@@ -3120,7 +3125,9 @@
 	(com (viper-getCom arg)))
     (if com (viper-move-marker-locally 'viper-com-point (point)))
     ;; do not use forward-line! need to keep column
-    (with-no-warnings (previous-line val))
+    (if (featurep 'emacs)
+	(with-no-warnings (previous-line val))
+      (previous-line val))
     (if viper-ex-style-motion
 	(if (and (eolp) (not (bolp))) (backward-char 1)))
     (setq this-command 'previous-line)
--- a/lisp/emulation/viper-ex.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/emulation/viper-ex.el	Wed Jan 09 06:16:07 2008 +0000
@@ -2216,9 +2216,11 @@
 	(pos2 (viper-line-pos 'end))
 	lines file info)
     (setq lines (count-lines (point-min) (viper-line-pos 'end))
-	  file (if (buffer-file-name)
-		   (concat (viper-abbreviate-file-name (buffer-file-name)) ":")
-		 (concat (buffer-name) " [Not visiting any file]:"))
+	  file (cond ((buffer-file-name)
+		      (concat (viper-abbreviate-file-name (buffer-file-name)) ":"))
+		     ((buffer-file-name (buffer-base-buffer))
+		      (concat (viper-abbreviate-file-name (buffer-file-name (buffer-base-buffer))) " (indirect buffer):"))
+		     (t (concat (buffer-name) " [Not visiting any file]:")))
 	  info (format "line=%d/%d pos=%d/%d col=%d %s"
 		       (if (= pos1 pos2)
 			   (1+ lines)
--- a/lisp/emulation/viper-keym.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/emulation/viper-keym.el	Wed Jan 09 06:16:07 2008 +0000
@@ -37,9 +37,10 @@
 
 (require 'viper-util)
 
-(declare-function viper-ex "viper-ex" (arg &optional string))
-(declare-function viper-normalize-minor-mode-map-alist "viper-cmd" ())
-(declare-function viper-set-mode-vars-for "viper-cmd" (state))
+;; declare-function is not defined in XEmacs
+;;(declare-function viper-ex "viper-ex" (arg &optional string))
+;;(declare-function viper-normalize-minor-mode-map-alist "viper-cmd" ())
+;;(declare-function viper-set-mode-vars-for "viper-cmd" (state))
 
 ;;; Variables
 
--- a/lisp/emulation/viper-util.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/emulation/viper-util.el	Wed Jan 09 06:16:07 2008 +0000
@@ -374,7 +374,8 @@
 
 
 
-(declare-function viper-forward-Word "viper-cmd" (arg))
+;; declare-function is not defined in XEmacs
+;;(declare-function viper-forward-Word "viper-cmd" (arg))
 
 ;;; Support for :e, :r, :w file globbing
 
@@ -713,7 +714,7 @@
 	     (not (memq (vc-state file) '(edited needs-merge)))
 	     (not (stringp (vc-state file))))
 	 ;; XEmacs has no vc-state
-	 (if (featurep 'xemacs)(not (vc-locking-user file))))
+	 (if (featurep 'xemacs) (not (vc-locking-user file))))
        ))
 
 ;; checkout if visited file is checked in
--- a/lisp/emulation/viper.el	Wed Jan 09 06:15:40 2008 +0000
+++ b/lisp/emulation/viper.el	Wed Jan 09 06:16:07 2008 +0000
@@ -9,7 +9,7 @@
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Keywords: emulations
 
-(defconst viper-version "3.14 of August 18, 2007"
+(defconst viper-version "3.14 of January 09, 2008"
   "The current version of Viper")
 
 ;; This file is part of GNU Emacs.
@@ -857,7 +857,9 @@
 	       (modify-frame-parameters
 		(selected-frame)
 		(list (cons 'viper-vi-state-cursor-color
-			    (viper-get-cursor-color))))))
+			    (viper-get-cursor-color))))
+	       (setq viper-vi-state-cursor-color (viper-get-cursor-color))
+	       ))
 
   ;; Tell vc-diff to put *vc* in Vi mode
   (if (featurep 'vc)
@@ -900,6 +902,7 @@
     (modify-frame-parameters
 	(selected-frame)
 	(list (cons 'viper-vi-state-cursor-color (ad-get-arg 0))))
+    (setq viper-vi-state-cursor-color (ad-get-arg 0))
     )
 
   (when (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists))