[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs doc/misc/ChangeLog lisp/ediff-init.el lis...
From: |
Michael Kifer |
Subject: |
[Emacs-diffs] emacs doc/misc/ChangeLog lisp/ediff-init.el lis... |
Date: |
Sun, 22 Nov 2009 03:14:16 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Michael Kifer <kifer> 09/11/22 03:14:16
Modified files:
doc/misc : ChangeLog
lisp : ediff-init.el ediff-mult.el ediff-util.el
ediff-vers.el ediff.el
lisp/emulation : viper-cmd.el viper-util.el viper.el
Log message:
2009-11-22 Michael Kifer <address@hidden>
* viper-cmd.el: use viper-last-command-char instead of
last-command-char/last-command-event.
(viper-prefix-arg-value): do correct conversion of event-char
for
XEmacs.
* viper-util.el, viper.el: use viper-last-command-char instead
of
last-command-char/last-command-event.
* ediff-init.el, ediff-mult.el, ediff-util.el: relpace
last-command-char and last-command-event with
(ediff-last-command-char) everywhere.
* ediff-vers.el (ediff-rcs-get-output-buffer): make sure the
buffer is
created in fundamental mode.
* ediff.el (ediff-version): revert the change of interactive-p
to
called-interactively-p.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/misc/ChangeLog?cvsroot=emacs&r1=1.345&r2=1.346
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ediff-init.el?cvsroot=emacs&r1=1.97&r2=1.98
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ediff-mult.el?cvsroot=emacs&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ediff-util.el?cvsroot=emacs&r1=1.99&r2=1.100
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ediff-vers.el?cvsroot=emacs&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ediff.el?cvsroot=emacs&r1=1.110&r2=1.111
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/viper-cmd.el?cvsroot=emacs&r1=1.86&r2=1.87
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/viper-util.el?cvsroot=emacs&r1=1.88&r2=1.89
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/viper.el?cvsroot=emacs&r1=1.126&r2=1.127
Patches:
Index: doc/misc/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/misc/ChangeLog,v
retrieving revision 1.345
retrieving revision 1.346
diff -u -b -r1.345 -r1.346
--- doc/misc/ChangeLog 22 Nov 2009 02:19:23 -0000 1.345
+++ doc/misc/ChangeLog 22 Nov 2009 03:14:14 -0000 1.346
@@ -1,3 +1,22 @@
+2009-11-22 Michael Kifer <address@hidden>
+
+ * viper-cmd.el: use viper-last-command-char instead of
+ last-command-char/last-command-event.
+ (viper-prefix-arg-value): do correct conversion of event-char for
+ XEmacs.
+
+ * viper-util.el, viper.el: use viper-last-command-char instead of
+ last-command-char/last-command-event.
+
+ * ediff-init.el, ediff-mult.el, ediff-util.el: relpace
+ last-command-char and last-command-event with (ediff-last-command-char)
everywhere.
+
+ * ediff-vers.el (ediff-rcs-get-output-buffer): make sure the buffer is
+ created in fundamental mode.
+
+ * ediff.el (ediff-version): revert the change of interactive-p to
+ called-interactively-p.
+
2009-11-22 Jay Belanger <address@hidden>
* calc.texi (Radix modes): Discuss alternate bases for two's complement
Index: lisp/ediff-init.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff-init.el,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- lisp/ediff-init.el 15 Aug 2009 05:57:12 -0000 1.97
+++ lisp/ediff-init.el 22 Nov 2009 03:14:14 -0000 1.98
@@ -1551,6 +1551,9 @@
(if (eventp event-or-key) (event-key event-or-key) event-or-key)
event-or-key))
+(defun ediff-last-command-char ()
+ (ediff-event-key last-command-event))
+
(defsubst ediff-frame-iconified-p (frame)
(and (ediff-window-display-p) (frame-live-p frame)
Index: lisp/ediff-mult.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff-mult.el,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- lisp/ediff-mult.el 13 Nov 2009 22:19:50 -0000 1.67
+++ lisp/ediff-mult.el 22 Nov 2009 03:14:15 -0000 1.68
@@ -2342,10 +2342,10 @@
This is used only for sessions that involve 2 or 3 files at the same time.
ACTION is an optional argument that can be ?h, ?m, ?=, to mark for hiding, mark
for operation, or simply indicate which are equal files. If it is nil, then
-`last-command-event' is used to decide which action to take."
+`(ediff-last-command-char)' is used to decide which action to take."
(interactive)
(if (null action)
- (setq action last-command-event))
+ (setq action (ediff-last-command-char)))
(let ((list (cdr ediff-meta-list))
marked1 marked2 marked3
fileinfo1 fileinfo2 fileinfo3 elt)
Index: lisp/ediff-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff-util.el,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- lisp/ediff-util.el 13 Nov 2009 22:19:50 -0000 1.99
+++ lisp/ediff-util.el 22 Nov 2009 03:14:15 -0000 1.100
@@ -1011,7 +1011,7 @@
(interactive)
(ediff-barf-if-not-control-buffer)
(let ((ctl-buf (if (null buf) (current-buffer)))
- (buf-type (ediff-char-to-buftype last-command-event)))
+ (buf-type (ediff-char-to-buftype (ediff-last-command-char))))
(or buf (ediff-recenter))
(or buf
(setq buf (ediff-get-buffer buf-type)))
@@ -1513,7 +1513,7 @@
(error ediff-KILLED-VITAL-BUFFER))
(ediff-operate-on-windows
- (if (memq last-command-event '(?v ?\C-v))
+ (if (memq (ediff-last-command-char) '(?v ?\C-v))
'scroll-up
'scroll-down)
;; calculate argument to scroll-up/down
@@ -1561,7 +1561,7 @@
;; interactively so that they set the window's min_hscroll.
;; Otherwise, automatic hscrolling will undo the effect of
;; hscrolling.
- (if (= last-command-event ?<)
+ (if (= (ediff-last-command-char) ?<)
(lambda (arg)
(let ((prefix-arg arg))
(call-interactively 'scroll-left)))
@@ -1825,7 +1825,7 @@
in the specified buffer."
(interactive "P")
(ediff-barf-if-not-control-buffer)
- (let* ((buf-type (ediff-char-to-buftype last-command-event))
+ (let* ((buf-type (ediff-char-to-buftype (ediff-last-command-char)))
(buffer (ediff-get-buffer buf-type))
(pt (ediff-with-current-buffer buffer (point)))
(diff-no (ediff-diff-at-point buf-type nil (if arg 'after)))
@@ -2161,13 +2161,13 @@
"Restore ARGth diff from `ediff-killed-diffs-alist'.
ARG is a prefix argument. If ARG is nil, restore the current-difference.
If the second optional argument, a character, is given, use it to
-determine the target buffer instead of last-command-event"
+determine the target buffer instead of (ediff-last-command-char)"
(interactive "P")
(ediff-barf-if-not-control-buffer)
(if (numberp arg)
(ediff-jump-to-difference arg))
(ediff-pop-diff ediff-current-difference
- (ediff-char-to-buftype (or key last-command-event)))
+ (ediff-char-to-buftype (or key (ediff-last-command-char))))
;; recenter with rehighlighting, but no messages
(let (ediff-verbose-p)
(ediff-recenter)))
@@ -2191,13 +2191,13 @@
(cond
((or (and (eq ediff-skip-diff-region-function
ediff-focus-on-regexp-matches-function)
- (eq last-command-event ?f))
+ (eq (ediff-last-command-char) ?f))
(and (eq ediff-skip-diff-region-function
ediff-hide-regexp-matches-function)
- (eq last-command-event ?h)))
+ (eq (ediff-last-command-char) ?h)))
(message "Selective browsing by regexp turned off")
(setq ediff-skip-diff-region-function 'ediff-show-all-diffs))
- ((eq last-command-event ?h)
+ ((eq (ediff-last-command-char) ?h)
(setq ediff-skip-diff-region-function ediff-hide-regexp-matches-function
regexp-A
(read-string
@@ -2235,7 +2235,7 @@
(or (string= regexp-B "") (setq ediff-regexp-hide-B regexp-B))
(or (string= regexp-C "") (setq ediff-regexp-hide-C regexp-C)))
- ((eq last-command-event ?f)
+ ((eq (ediff-last-command-char) ?f)
(setq ediff-skip-diff-region-function
ediff-focus-on-regexp-matches-function
regexp-A
@@ -3301,10 +3301,10 @@
(ediff-barf-if-not-control-buffer)
(ediff-compute-custom-diffs-maybe)
(ediff-with-current-buffer
- (cond ((memq last-command-event '(?a ?b ?c))
+ (cond ((memq (ediff-last-command-char) '(?a ?b ?c))
(ediff-get-buffer
- (ediff-char-to-buftype last-command-event)))
- ((eq last-command-event ?d)
+ (ediff-char-to-buftype (ediff-last-command-char))))
+ ((eq (ediff-last-command-char) ?d)
(message "Saving diff output ...")
(sit-for 1) ; let the user see the message
(cond ((and arg (ediff-buffer-live-p ediff-diff-buffer))
Index: lisp/ediff-vers.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff-vers.el,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- lisp/ediff-vers.el 13 Nov 2009 22:19:51 -0000 1.47
+++ lisp/ediff-vers.el 22 Nov 2009 03:14:15 -0000 1.48
@@ -136,7 +136,8 @@
;; Optional NAME is name to use instead of `*RCS-output*'.
;; This is a modified version from rcs.el v1.1. I use it here to make
;; Ediff immune to changes in rcs.el
- (let ((buf (get-buffer-create name)))
+ (let* ((default-major-mode 'fundamental-mode) ; no frills!
+ (buf (get-buffer-create name)))
(with-current-buffer buf
(setq buffer-read-only nil
default-directory (file-name-directory (expand-file-name file)))
Index: lisp/ediff.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff.el,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- lisp/ediff.el 13 Nov 2009 22:19:51 -0000 1.110
+++ lisp/ediff.el 22 Nov 2009 03:14:15 -0000 1.111
@@ -1451,7 +1451,9 @@
"Return string describing the version of Ediff.
When called interactively, displays the version."
(interactive)
- (if (called-interactively-p 'interactive)
+ ;; called-interactively-p - not in XEmacs
+ ;; (if (called-interactively-p 'interactive)
+ (if (interactive-p)
(message "%s" (ediff-version))
(format "Ediff %s of %s" ediff-version ediff-date)))
Index: lisp/emulation/viper-cmd.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emulation/viper-cmd.el,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- lisp/emulation/viper-cmd.el 3 Nov 2009 02:04:34 -0000 1.86
+++ lisp/emulation/viper-cmd.el 22 Nov 2009 03:14:15 -0000 1.87
@@ -719,7 +719,7 @@
ARG is used as the prefix value for the executed command. If
EVENTS is a list of events, which become the beginning of the command."
(interactive "P")
- (if (viper= last-command-event ?\\)
+ (if (viper= (viper-last-command-char) ?\\)
(message "Switched to EMACS state for the next command..."))
(viper-escape-to-state arg events 'emacs-state))
@@ -1181,7 +1181,10 @@
((eq event-char 'delete) (setq event-char ?\C-?))
((eq event-char 'backspace) (setq event-char ?\C-h))
((eq event-char 'space) (setq event-char ?\ )))
- (setq last-command-event (or com event-char))
+ (setq last-command-event
+ (if (featurep 'xemacs)
+ (character-to-event (or com event-char))
+ (or com event-char)))
(setq func (viper-exec-form-in-vi
`(key-binding (char-to-string ,event-char))))
(funcall func prefix-arg)
@@ -1311,7 +1314,7 @@
(interactive "P")
(viper-leave-region-active)
(viper-prefix-arg-value
- last-command-event (if (consp arg) (cdr arg) nil)))
+ (viper-last-command-char) (if (consp arg) (cdr arg) nil)))
(defun viper-command-argument (arg)
"Accept a motion command as an argument."
@@ -1319,7 +1322,7 @@
(let ((viper-intermediate-command 'viper-command-argument))
(condition-case nil
(viper-prefix-arg-com
- last-command-event
+ (viper-last-command-char)
(cond ((null arg) nil)
((consp arg) (car arg))
((integerp arg) arg)
@@ -2096,7 +2099,7 @@
"Exit minibuffer Viper way."
(interactive)
(let (command)
- (setq command (local-key-binding (char-to-string last-command-event)))
+ (setq command (local-key-binding (char-to-string
(viper-last-command-char))))
(run-hooks 'viper-minibuffer-exit-hook)
(if command
(command-execute command)
@@ -3771,7 +3774,9 @@
"///" 'vi-state
[2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e
return]
scope)
- (if (called-interactively-p 'interactive)
+ ;; XEmacs has no called-interactively-p
+ ;; (if (called-interactively-p 'interactive)
+ (if (interactive-p)
(message
"// and /// now toggle case-sensitivity and regexp search")))
(viper-unrecord-kbd-macro "//" 'vi-state)
@@ -3794,7 +3799,10 @@
"%%%" 'vi-state
[(meta x) v i p e r - t o g g l e - p a r s e - s e x p - i g n o
r e - c o m m e n t s return]
't)
- (if (called-interactively-p 'interactive)
+ ;; XEmacs has no called-interactively-p. And interactive-p
+ ;; works fine here.
+ ;; (if (called-interactively-p 'interactive)
+ (if (interactive-p)
(message
"%%%%%% now toggles whether comments should be parsed for
matching parentheses")))
(viper-unrecord-kbd-macro "%%%" 'vi-state))))
@@ -3823,7 +3831,10 @@
"///" 'emacs-state
[2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e
return]
(or arg-majormode major-mode))
- (if (called-interactively-p 'interactive)
+ ;; called-interactively-p does not work for
+ ;; XEmacs. interactive-p is ok here.
+ ;; (if (called-interactively-p 'interactive)
+ (if (interactive-p)
(message
"// and /// now toggle case-sensitivity and regexp search.")))
(viper-unrecord-kbd-macro "//" 'emacs-state)
Index: lisp/emulation/viper-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emulation/viper-util.el,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- lisp/emulation/viper-util.el 3 Nov 2009 02:04:34 -0000 1.88
+++ lisp/emulation/viper-util.el 22 Nov 2009 03:14:15 -0000 1.89
@@ -174,12 +174,14 @@
(viper-frame-value viper-vi-state-cursor-color)
frame))))
-;; By default, saves current frame cursor color in the
-;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay
+;; By default, saves current frame cursor color before changing viper state
(defun viper-save-cursor-color (before-which-mode)
(if (and (viper-window-display-p) (viper-color-display-p))
(let ((color (viper-get-cursor-color)))
(if (and (stringp color) (viper-color-defined-p color)
+ ;; there is something fishy in that the color is not saved if
+ ;; it is the same as frames default cursor color. need to be
+ ;; checked.
(not (string= color
(viper-frame-value
viper-replace-overlay-cursor-color))))
@@ -1047,6 +1049,11 @@
(append mod (list basis))
basis))))
+(defun viper-last-command-char ()
+ (if (featurep 'xemacs)
+ (event-to-character last-command-event)
+ last-command-event))
+
(defun viper-key-to-emacs-key (key)
(let (key-name char-p modifiers mod-char-list base-key base-key-name)
(cond ((featurep 'xemacs) key)
Index: lisp/emulation/viper.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emulation/viper.el,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -b -r1.126 -r1.127
--- lisp/emulation/viper.el 14 Nov 2009 04:37:03 -0000 1.126
+++ lisp/emulation/viper.el 22 Nov 2009 03:14:15 -0000 1.127
@@ -889,7 +889,10 @@
(defadvice self-insert-command (around viper-self-insert-ad activate)
"Ignore all self-inserting keys in the vi-state."
(if (and (eq viper-current-state 'vi-state)
- (called-interactively-p 'interactive))
+ ;; Do not use called-interactively-p here. XEmacs does not have it
+ ;; and interactive-p is just fine.
+ ;; (called-interactively-p 'interactive))
+ (interactive-p))
(beep 1)
ad-do-it
))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs doc/misc/ChangeLog lisp/ediff-init.el lis...,
Michael Kifer <=