CVS update by viteno xemacs-builds/viteno ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/26 14:08:08
Modified: xemacs-builds/viteno package-index setup-packages.ini
Log:
Package database backup:
- ediff-1.63
- viper-1.49
Revision Changes Path
1.307 +12 -12 XEmacs/xemacs-builds/viteno/package-index
Index: package-index
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/viteno/package-index,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -p -r1.306 -r1.307
--- …
[View More]package-index 2006/08/21 06:09:44 1.306
+++ package-index 2006/08/26 12:08:07 1.307
@@ -1581,19 +1581,19 @@
(package-get-update-base-entry (quote
(viper
(standards-version 1.1
- version "1.48"
+ version "1.49"
author-version "3.09"
- date "2006-02-20"
- build-date "2006-02-20"
+ date "2006-08-26"
+ build-date "2006-08-26"
maintainer "Michael Kifer <kifer(a)cs.sunysb.edu>"
distribution xemacs
priority low
category "standard"
dump nil
description "VI emulation support."
- filename "viper-1.48-pkg.tar.gz"
- md5sum "8dfb84c0ad5e7d3c01ad65b80ee0911e"
- size 335880
+ filename "viper-1.49-pkg.tar.gz"
+ md5sum "86777e186f699c6b5f3829ec98ff4e8e"
+ size 336990
provides (viper-cmd viper-ex viper-init viper-keym viper-macs viper-mous viper-util viper)
requires (xemacs-base)
type regular
@@ -1955,19 +1955,19 @@
(package-get-update-base-entry (quote
(ediff
(standards-version 1.1
- version "1.62"
+ version "1.63"
author-version "2.75"
- date "2006-02-22"
- build-date "2006-02-22"
+ date "2006-08-26"
+ build-date "2006-08-26"
maintainer "Michael Kifer <kifer(a)cs.sunysb.edu>"
distribution xemacs
priority medium
category "standard"
dump nil
description "Interface over GNU patch."
- filename "ediff-1.62-pkg.tar.gz"
- md5sum "ac969eb66da2f958ae6c437e7128f305"
- size 315669
+ filename "ediff-1.63-pkg.tar.gz"
+ md5sum "7d59a0f2998caff3de122e57fb74847d"
+ size 316816
provides (ediff-diff ediff-help ediff-hook ediff-init ediff-merg ediff-mult ediff-ptch ediff-tbar ediff-util ediff-vers ediff-wind ediff)
requires (pcl-cvs elib dired xemacs-base edebug prog-modes)
type regular
1.293 +4 -4 XEmacs/xemacs-builds/viteno/setup-packages.ini
Index: setup-packages.ini
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs-builds/viteno/setup-packages.ini,v
retrieving revision 1.292
retrieving revision 1.293
diff -u -p -r1.292 -r1.293
--- setup-packages.ini 2006/08/21 06:09:45 1.292
+++ setup-packages.ini 2006/08/26 12:08:07 1.293
@@ -140,8 +140,8 @@ version: 1.18
install: packages/debug-1.18-pkg.tar.gz 107997
@ ediff
-version: 1.62
-install: packages/ediff-1.62-pkg.tar.gz 315669
+version: 1.63
+install: packages/ediff-1.63-pkg.tar.gz 316816
@ emerge
version: 1.11
@@ -208,8 +208,8 @@ version: 1.14
install: packages/tpu-1.14-pkg.tar.gz 59529
@ viper
-version: 1.48
-install: packages/viper-1.48-pkg.tar.gz 335880
+version: 1.49
+install: packages/viper-1.49-pkg.tar.gz 336990
@ eterm
version: 1.17
[View Less]
CVS update by viteno packages/xemacs-packages/viper ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/26 14:03:25
Modified: packages/xemacs-packages/viper ChangeLog Makefile
Log:
Increment VERSION in Makefile
Revision Changes Path
1.75 +4 -0 XEmacs/packages/xemacs-packages/viper/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/ChangeLog,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -p -r1.74 -r1.75
--- ChangeLog 2006/08/25 …
[View More]16:48:42 1.74
+++ ChangeLog 2006/08/26 12:03:24 1.75
@@ -1,3 +1,7 @@
+2006-08-26 Norbert Koch <viteno(a)xemacs.org>
+
+ * Makefile (VERSION): XEmacs package 1.49 released.
+
2006-08-25 Michael Kifer <kifer(a)cs.stonybrook.edu>
* viper.el (viper-set-hooks): use frame bindings for
1.57 +1 -1 XEmacs/packages/xemacs-packages/viper/Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/Makefile,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -p -r1.56 -r1.57
--- Makefile 2006/02/20 07:27:44 1.56
+++ Makefile 2006/08/26 12:03:24 1.57
@@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-VERSION = 1.48
+VERSION = 1.49
AUTHOR_VERSION = 3.09
MAINTAINER = Michael Kifer <kifer(a)cs.sunysb.edu>
PACKAGE = viper
[View Less]
CVS update by viteno packages/xemacs-packages/ediff ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/26 14:02:46
Modified: packages/xemacs-packages/ediff ChangeLog Makefile
Log:
Increment VERSION in Makefile
Revision Changes Path
1.105 +4 -0 XEmacs/packages/xemacs-packages/ediff/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ChangeLog,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -p -r1.104 -r1.105
--- ChangeLog 2006/…
[View More]08/25 16:43:18 1.104
+++ ChangeLog 2006/08/26 12:02:46 1.105
@@ -1,3 +1,7 @@
+2006-08-26 Norbert Koch <viteno(a)xemacs.org>
+
+ * Makefile (VERSION): XEmacs package 1.63 released.
+
2006-08-25 Michael Kifer <kifer(a)cs.stonybrook.edu>
* ediff-mult.el (ediff-intersect-directories,
1.75 +1 -1 XEmacs/packages/xemacs-packages/ediff/Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/Makefile,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -p -r1.74 -r1.75
--- Makefile 2006/02/22 12:53:13 1.74
+++ Makefile 2006/08/26 12:02:46 1.75
@@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-VERSION = 1.62
+VERSION = 1.63
AUTHOR_VERSION = 2.75
MAINTAINER = Michael Kifer <kifer(a)cs.sunysb.edu>
PACKAGE = ediff
[View Less]
CVS update by viteno packages ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/26 14:02:02
Modified: packages ChangeLog
Log:
Package release
Revision Changes Path
1.637 +4 -0 XEmacs/packages/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/ChangeLog,v
retrieving revision 1.636
retrieving revision 1.637
diff -u -p -r1.636 -r1.637
--- ChangeLog 2006/08/21 06:06:04 1.636
+++ ChangeLog 2006/08/26 12:02:01 1.637
@@ -1,3 +1,7 @@
+2006-08-26 …
[View More]Norbert Koch <viteno(a)xemacs.org>
+
+ * Packages released: ediff viper.
+
2006-08-21 Norbert Koch <viteno(a)xemacs.org>
* Packages released: calendar.
[View Less]
CVS update by viteno xemacs ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/25 23:50:48
Modified: xemacs version.sh
Log:
Update xemacs_extra_name.
Revision Changes Path
1.1633 +1 -1 XEmacs/xemacs/version.sh
Index: version.sh
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/version.sh,v
retrieving revision 1.1632
retrieving revision 1.1633
diff -u -p -r1.1632 -r1.1633
--- version.sh 2006/08/24 21:51:13 1.1632
+++ version.sh 2006/08/25 21:50:47 1.1633
@@ -8,5 +8,…
[View More]5 @@ emacs_kit_version=
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8
-xemacs_extra_name="(+CVS-20060824)"
+xemacs_extra_name="(+CVS-20060825)"
xemacs_release_date="2006-05-16"
[View Less]
CVS update by michaelk packages/xemacs-packages/viper, viper-util.el, viper-cmd.el ...
18 years, 7 months
CVS Monitor
User: michaelk
Date: 06/08/25 18:48:43
Modified: packages/xemacs-packages/viper viper.texi viper.el
viper-util.el viper-init.el viper-ex.el
viper-cmd.el ChangeLog
Log:
* viper.el (viper-set-hooks): use frame bindings for
viper-vi-state-cursor-color.
(viper-non-hook-settings): don't set default
mode-line-buffer-identification.
* viper-util.el (viper-set-cursor-color-according-to-state): new
function.
(viper-set-cursor-color-…
[View More]according-to-state,
viper-get-saved-cursor-color-in-replace-mode,
viper-get-saved-cursor-color-in-insert-mode): make conditional on
viper-emacs-state-cursor-color.
* viper-cmd.el (viper-envelop-ESC-key): bug fix.
(viper-undo): use point if undo-beg-posn is nil.
(viper-insert-state-post-command-sentinel,viper-change-state-to-emacs,
viper-after-change-undo-hook): don't use
viper-emacs-state-cursor-color by default.
(viper-undo): more sensible positioning after undo.
* viper-ex.el (ex-splice-args-in-1-letr-cmd): got rid of caddr.
(viper-emacs-state-cursor-color): default to nil, since this feature
doesn't work well yet.
* viper-cmd.el (viper-special-read-and-insert-char): use
read-key-sequence.
(viper-after-change-undo-hook): enhancements.
(viper-after-change-undo-hook): new hook.
(viper-undo): use viper-after-change-undo-hook.
(viper-add-newline-at-eob-if-necessary): widen before making changes.
(viper-next-line-at-bol): If point is on a widget or a button, simulate
clicking on that widget/button.
* viper.el (viper-mode): allow for a separate cursor color in Emacs
state.
Revision Changes Path
1.31 +6 -6 XEmacs/packages/xemacs-packages/viper/viper.texi
Index: viper.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper.texi,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- viper.texi 2006/02/19 03:23:12 1.30
+++ viper.texi 2006/08/25 16:48:41 1.31
@@ -8,7 +8,7 @@
@copying
Copyright @copyright{} 1995, 1996, 1997, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+2005, 2006 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -236,7 +236,7 @@ etc.
Furthermore, Viper lets Ex-style commands to work on the current region.
This is done by typing a digit argument before @kbd{:}. For instance,
-typing @kbd{1:} will propmt you with something like @emph{:123,135},
+typing @kbd{1:} will prompt you with something like @emph{:123,135},
assuming that the current region starts at line 123 and ends at line
135. There is no need to type the line numbers, since Viper inserts them
automatically in front of the Ex command.
@@ -417,7 +417,7 @@ should start them with a @kbd{:}, e.g.,
In Viper, Ex commands can be made to work on the current Emacs region.
This is done by typing a digit argument before @kbd{:}.
-For instance, typing @kbd{1:} will propmt you with something like
+For instance, typing @kbd{1:} will prompt you with something like
@emph{:123,135}, assuming that the current region starts at line 123 and
ends at line 135. There is no need to type the line numbers, since Viper
inserts them automatically in front of the Ex command.
@@ -2292,7 +2292,7 @@ the Shell mode by changing the bindings
(@pxref{Customization}).
In some cases, some @emph{minor} modes might override certain essential
-bindings in Vi command state. This is not a big priblem because this
+bindings in Vi command state. This is not a big problem because this
can happen only in the beginning, when the minor mode kicks in. Typing
@code{M-x viper-mode} will correct the situation. Viper knows about
several such minor modes and takes care of them, so the above trick
@@ -2670,7 +2670,7 @@ placing this command in @code{~/.viper}:
(setq viper-mouse-insert-key '(meta 2))
@end lisp
If you want to bind mouse-insert to an action even if this action is
-already taked for other purposes in Emacs, then you should add this command
+already taken for other purposes in Emacs, then you should add this command
to @code{~/.viper}, after setting @code{viper-mouse-insert-key}:
@lisp
(viper-bind-mouse-insert-key 'force)
@@ -3239,7 +3239,7 @@ Control character.
Finally, we note that Viper's Ex-style commands can be made to work on the
current Emacs region. This is done by typing a digit argument before
-@kbd{:}. For instance, typing @kbd{1:} will propmt you with something like
+@kbd{:}. For instance, typing @kbd{1:} will prompt you with something like
@emph{:123,135}, assuming that the current region starts at line 123 and
ends at line 135. There is no need to type the line numbers, since Viper
inserts them automatically in front of the Ex command.
1.38 +9 -8 XEmacs/packages/xemacs-packages/viper/viper.el
Index: viper.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper.el,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -p -r1.37 -r1.38
--- viper.el 2006/02/19 03:23:12 1.37
+++ viper.el 2006/08/25 16:48:41 1.38
@@ -545,8 +545,6 @@ If Viper is enabled, turn it off. Other
(if viper-first-time ; Important check. Prevents mix-up of startup
(progn ; and expert-level msgs when viper-mode recurses
(setq viper-first-time nil)
- (setq viper-vi-state-cursor-color
- (viper-get-cursor-color))
(if (not viper-inhibit-startup-message)
(save-window-excursion
(setq viper-inhibit-startup-message t)
@@ -616,7 +614,8 @@ This startup message appears whenever yo
(or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi
(memq major-mode viper-insert-state-mode-list) ; don't switch
- (viper-change-state-to-vi)))))
+ (viper-change-state-to-vi))
+ )))
;; Apply a little heuristic to invoke vi state on major-modes
@@ -860,8 +859,11 @@ It also can't undo some Viper settings."
;; info about the display and windows until emacs initialization is complete
;; So do it via the window-setup-hook
(add-hook 'window-setup-hook
- '(lambda ()
- (setq viper-vi-state-cursor-color (viper-get-cursor-color))))
+ '(lambda ()
+ (modify-frame-parameters
+ (selected-frame)
+ (list (cons 'viper-vi-state-cursor-color
+ (viper-get-cursor-color))))))
;; Tell vc-diff to put *vc* in Vi mode
(if (featurep 'vc)
@@ -901,7 +903,6 @@ It also can't undo some Viper settings."
(defadvice set-cursor-color (after viper-set-cursor-color-ad activate)
"Change cursor color in VI state."
- ;;(setq viper-vi-state-cursor-color (ad-get-arg 0))
(modify-frame-parameters
(selected-frame)
(list (cons 'viper-vi-state-cursor-color (ad-get-arg 0))))
@@ -1006,8 +1007,8 @@ It also can't undo some Viper settings."
;; these are primarily advices and Vi-ish variable settings
(defun viper-non-hook-settings ()
- ;; Viper changes the default mode-line-buffer-identification
- (setq-default mode-line-buffer-identification '(" %b"))
+ ;;;; Viper changes the default mode-line-buffer-identification
+ ;;(setq-default mode-line-buffer-identification '(" %b"))
;; setup emacs-supported vi-style feel
(setq next-line-add-newlines nil
1.27 +21 -8 XEmacs/packages/xemacs-packages/viper/viper-util.el
Index: viper-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-util.el,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- viper-util.el 2006/02/19 03:23:12 1.26
+++ viper-util.el 2006/08/25 16:48:42 1.27
@@ -137,10 +137,10 @@
(x-display-color-p) ; emacs
))
-(defsubst viper-get-cursor-color ()
+(defun viper-get-cursor-color (&optional frame)
(viper-cond-compile-for-xemacs-or-emacs
- ;; xemacs
- (color-instance-name (frame-property (selected-frame) 'cursor-color))
+ (color-instance-name
+ (frame-property (or frame (selected-frame)) 'cursor-color)) ; xemacs
(cdr (assoc 'cursor-color (frame-parameters))) ; emacs
))
@@ -152,18 +152,31 @@
;; cursor colors
-(defun viper-change-cursor-color (new-color)
+(defun viper-change-cursor-color (new-color &optional frame)
(if (and (viper-window-display-p) (viper-color-display-p)
(stringp new-color) (viper-color-defined-p new-color)
(not (string= new-color (viper-get-cursor-color))))
(viper-cond-compile-for-xemacs-or-emacs
(set-frame-property
- (selected-frame) 'cursor-color (make-color-instance new-color))
+ (or frame (selected-frame))
+ 'cursor-color (make-color-instance new-color))
(modify-frame-parameters
- (selected-frame) (list (cons 'cursor-color new-color)))
+ (or frame (selected-frame))
+ (list (cons 'cursor-color new-color)))
)
))
+(defun viper-set-cursor-color-according-to-state (&optional frame)
+ (cond ((eq viper-current-state 'replace-state)
+ (viper-change-cursor-color viper-replace-state-cursor-color frame))
+ ((and (eq viper-current-state 'emacs-state)
+ viper-emacs-state-cursor-color)
+ (viper-change-cursor-color viper-emacs-state-cursor-color frame))
+ ((eq viper-current-state 'insert-state)
+ (viper-change-cursor-color viper-insert-state-cursor-color frame))
+ (t
+ (viper-change-cursor-color 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
(defun viper-save-cursor-color (before-which-mode)
@@ -191,7 +204,7 @@
(if viper-emacs-p 'frame-parameter 'frame-property)
(selected-frame)
'viper-saved-cursor-color-in-replace-mode)
- (if (eq viper-current-state 'emacs-mode)
+ (if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color)
viper-emacs-state-cursor-color
viper-vi-state-cursor-color)))
@@ -201,7 +214,7 @@
(if viper-emacs-p 'frame-parameter 'frame-property)
(selected-frame)
'viper-saved-cursor-color-in-insert-mode)
- (if (eq viper-current-state 'emacs-mode)
+ (if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color)
viper-emacs-state-cursor-color
viper-vi-state-cursor-color)))
1.22 +4 -15 XEmacs/packages/xemacs-packages/viper/viper-init.el
Index: viper-init.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-init.el,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- viper-init.el 2006/02/19 03:23:13 1.21
+++ viper-init.el 2006/08/25 16:48:42 1.22
@@ -434,7 +434,10 @@ delete the text being replaced, as in st
(if (fboundp 'make-variable-frame-local)
(make-variable-frame-local 'viper-insert-state-cursor-color))
-(defcustom viper-emacs-state-cursor-color "Magenta"
+;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be
+;; confused in some cases. So, this var is nulled for now.
+;; (defcustom viper-emacs-state-cursor-color "Magenta"
+(defcustom viper-emacs-state-cursor-color nil
"Cursor color when Viper is in emacs state."
:type 'string
:group 'viper)
@@ -854,11 +857,6 @@ Related buffers can be cycled through vi
;;; Face-saving tricks
-(defun viper-hide-face (face)
- (if (and (viper-has-face-support-p) viper-emacs-p)
- (add-to-list 'facemenu-unlisted-faces face)))
-
-
(defgroup viper-highlighting nil
"Hilighting of replace region, search pattern, minibuffer, etc."
:prefix "viper-"
@@ -876,8 +874,6 @@ Related buffers can be cycled through vi
DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-search'
this variable represents.")
-(viper-hide-face viper-search-face)
-
(defface viper-replace-overlay
'((((class color)) (:foreground "Black" :background "darkseagreen2"))
@@ -890,9 +886,7 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-replace-overlay'
this variable represents.")
-(viper-hide-face viper-replace-overlay-face)
-
(defface viper-minibuffer-emacs
'((((class color)) (:foreground "Black" :background "darkseagreen2"))
(t (:weight bold)))
@@ -904,8 +898,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-minibuffer-emacs'
this variable represents.")
-(viper-hide-face viper-minibuffer-emacs-face)
-
(defface viper-minibuffer-insert
'((((class color)) (:foreground "Black" :background "pink"))
@@ -918,8 +910,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-minibuffer-insert'
this variable represents.")
-(viper-hide-face viper-minibuffer-insert-face)
-
(defface viper-minibuffer-vi
'((((class color)) (:foreground "DarkGreen" :background "grey"))
@@ -932,7 +922,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-minibuffer-vi'
this variable represents.")
-(viper-hide-face viper-minibuffer-vi-face)
;; the current face to be used in the minibuffer
(viper-deflocalvar
1.26 +4 -4 XEmacs/packages/xemacs-packages/viper/viper-ex.el
Index: viper-ex.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-ex.el,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- viper-ex.el 2006/02/19 03:23:13 1.25
+++ viper-ex.el 2006/08/25 16:48:42 1.26
@@ -208,12 +208,12 @@
;; If this is a one-letter magic command, splice in args.
(defun ex-splice-args-in-1-letr-cmd (key list)
- (let ((onelet (ex-cmd-is-one-letter (assoc (substring key 0 1) list))))
- (if onelet
+ (let ((oneletter (ex-cmd-is-one-letter (assoc (substring key 0 1) list))))
+ (if oneletter
(list key
- (append (cadr onelet)
+ (append (cadr oneletter)
(if (< 1 (length key)) (list (substring key 1))))
- (caddr onelet)))
+ (car (cdr (cdr oneletter))) ))
))
1.33 +104 -55 XEmacs/packages/xemacs-packages/viper/viper-cmd.el
Index: viper-cmd.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/viper-cmd.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -r1.32 -r1.33
--- viper-cmd.el 2006/02/19 03:23:13 1.32
+++ viper-cmd.el 2006/08/25 16:48:42 1.33
@@ -46,6 +46,8 @@
(defvar mark-even-if-inactive)
(defvar init-message)
(defvar initial)
+(defvar undo-beg-posn)
+(defvar undo-end-posn)
;; loading happens only in non-interactive compilation
;; in order to spare non-viperized emacs from being viperized
@@ -196,7 +198,7 @@
(viper-save-cursor-color 'before-insert-mode))
;; set insert mode cursor color
(viper-change-cursor-color viper-insert-state-cursor-color)))
- (if (eq viper-current-state 'emacs-state)
+ (if (and viper-emacs-state-cursor-color (eq viper-current-state 'emacs-state))
(let ((has-saved-cursor-color-in-emacs-mode
(stringp (viper-get-saved-cursor-color-in-emacs-mode))))
(or has-saved-cursor-color-in-emacs-mode
@@ -722,12 +724,13 @@
(viper-set-replace-overlay (point-min) (point-min)))
(viper-hide-replace-overlay)
- (let ((has-saved-cursor-color-in-emacs-mode
- (stringp (viper-get-saved-cursor-color-in-emacs-mode))))
- (or has-saved-cursor-color-in-emacs-mode
- (string= (viper-get-cursor-color) viper-emacs-state-cursor-color)
- (viper-save-cursor-color 'before-emacs-mode))
- (viper-change-cursor-color viper-emacs-state-cursor-color))
+ (if viper-emacs-state-cursor-color
+ (let ((has-saved-cursor-color-in-emacs-mode
+ (stringp (viper-get-saved-cursor-color-in-emacs-mode))))
+ (or has-saved-cursor-color-in-emacs-mode
+ (string= (viper-get-cursor-color) viper-emacs-state-cursor-color)
+ (viper-save-cursor-color 'before-emacs-mode))
+ (viper-change-cursor-color viper-emacs-state-cursor-color)))
(viper-change-state 'emacs-state)
@@ -887,12 +890,15 @@ Vi's prefix argument will be used. Othe
(setq ch (aref (read-key-sequence nil) 0)))
(insert ch))
(t
- (setq ch (read-char-exclusive))
+ ;;(setq ch (read-char-exclusive))
+ (setq ch (aref (read-key-sequence nil) 0))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
;; Make sure ^V and ^Q work as quotation chars
(if (memq ch '(?\C-v ?\C-q))
- (setq ch (read-char-exclusive)))
+ ;;(setq ch (read-char-exclusive))
+ (setq ch (aref (read-key-sequence nil) 0))
+ )
(insert ch))
)
(setq last-command-event
@@ -1027,10 +1033,13 @@ as a Meta key and any number of multiple
(inhibit-quit t))
(if (viper-ESC-event-p event)
(progn
- ;; Emacs 22.50.8 introduced a bug, which makes even a single ESC into
- ;; a fast keyseq. To guard against this, we added a check if there
- ;; are other events as well
- (if (and (viper-fast-keysequence-p) unread-command-events)
+ ;; Some versions of Emacs (eg., 22.50.8 have a bug, which makes even
+ ;; a single ESC into ;; a fast keyseq. To guard against this, we
+ ;; added a check if there are other events as well. Keep the next
+ ;; line for the next time the bug reappears, so that will remember to
+ ;; report it.
+ ;;(if (and (viper-fast-keysequence-p) unread-command-events)
+ (if (viper-fast-keysequence-p) ;; for Emacsen without the above bug
(progn
(let (minor-mode-map-alist emulation-mode-map-alists)
(viper-set-unread-command-events event)
@@ -1730,42 +1739,63 @@ invokes the command before that, etc."
;; undoing
+;; hook used inside undo
+(defvar viper-undo-functions nil)
+
+;; Runs viper-before-change-functions inside before-change-functions
+(defun viper-undo-sentinel (beg end length)
+ (run-hook-with-args 'viper-undo-functions beg end length))
+
+(add-hook 'after-change-functions 'viper-undo-sentinel)
+
+;; Hook used in viper-undo
+(defun viper-after-change-undo-hook (beg end len)
+ (if undo-in-progress
+ (setq undo-beg-posn beg
+ undo-end-posn (or end beg))
+ ;; some other hooks may be changing various text properties in
+ ;; the buffer in response to 'undo'; so remove this hook to avoid
+ ;; its repeated invocation
+ (remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local)
+ ))
+
(defun viper-undo ()
"Undo previous change."
(interactive)
(message "undo!")
(let ((modified (buffer-modified-p))
(before-undo-pt (point-marker))
- (after-change-functions after-change-functions)
undo-beg-posn undo-end-posn)
- ;; no need to remove this hook, since this var has scope inside a let.
- (add-hook 'after-change-functions
- '(lambda (beg end len)
- (setq undo-beg-posn beg
- undo-end-posn (or end beg))))
+ ;; the viper-after-change-undo-hook removes itself after the 1st invocation
+ (add-hook 'viper-undo-functions 'viper-after-change-undo-hook nil 'local)
(undo-start)
(undo-more 2)
- (setq undo-beg-posn (or undo-beg-posn before-undo-pt)
- undo-end-posn (or undo-end-posn undo-beg-posn))
+ ;;(setq undo-beg-posn (or undo-beg-posn (point))
+ ;; undo-end-posn (or undo-end-posn (point)))
+ ;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt)
+ ;; undo-end-posn (or undo-end-posn undo-beg-posn))
+
+ (if (and undo-beg-posn undo-end-posn)
+ (progn
+ (goto-char undo-beg-posn)
+ (sit-for 0)
+ (if (and viper-keep-point-on-undo
+ (pos-visible-in-window-p before-undo-pt))
+ (progn
+ (push-mark (point-marker) t)
+ (viper-sit-for-short 300)
+ (goto-char undo-end-posn)
+ (viper-sit-for-short 300)
+ (if (pos-visible-in-window-p undo-beg-posn)
+ (goto-char before-undo-pt)
+ (goto-char undo-beg-posn)))
+ (push-mark before-undo-pt t))
+ ))
- (goto-char undo-beg-posn)
- (sit-for 0)
- (if (and viper-keep-point-on-undo
- (pos-visible-in-window-p before-undo-pt))
- (progn
- (push-mark (point-marker) t)
- (viper-sit-for-short 300)
- (goto-char undo-end-posn)
- (viper-sit-for-short 300)
- (if (and (> (viper-chars-in-region undo-beg-posn before-undo-pt) 1)
- (> (viper-chars-in-region undo-end-posn before-undo-pt) 1))
- (goto-char before-undo-pt)
- (goto-char undo-beg-posn)))
- (push-mark before-undo-pt t))
(if (and (eolp) (not (bolp))) (backward-char 1))
- (if (not modified) (set-buffer-modified-p t)))
+ )
(setq this-command 'viper-undo))
;; Continue undoing previous changes.
@@ -1813,8 +1843,8 @@ invokes the command before that, etc."
(setq viper-undo-needs-adjustment t)))))
+;;; Viper's destructive Command ring utilities
-
(defun viper-display-current-destructive-command ()
(let ((text (nth 4 viper-d-com))
(keys (nth 5 viper-d-com))
@@ -1927,12 +1957,15 @@ Undo previous insertion and inserts new.
(end-of-line)
;; make sure all lines end with newline, unless in the minibuffer or
;; when requested otherwise (require-final-newline is nil)
- (if (and (eobp)
- (not (bolp))
- require-final-newline
- (not (viper-is-in-minibuffer))
- (not buffer-read-only))
- (insert "\n"))))
+ (save-restriction
+ (widen)
+ (if (and (eobp)
+ (not (bolp))
+ require-final-newline
+ (not (viper-is-in-minibuffer))
+ (not buffer-read-only))
+ (insert "\n")))
+ ))
(defun viper-yank-defun ()
(mark-defun)
@@ -3045,19 +3078,34 @@ On reaching beginning of line, stop and
(setq this-command 'next-line)
(if com (viper-execute-com 'viper-next-line val com))))
+
(defun viper-next-line-at-bol (arg)
- "Next line at beginning of line."
+ "Next line at beginning of line.
+If point is on a widget or a button, simulate clicking on that widget/button."
(interactive "P")
- (viper-leave-region-active)
- (save-excursion
- (end-of-line)
- (if (eobp) (error "Last line in buffer")))
- (let ((val (viper-p-val arg))
- (com (viper-getCom arg)))
- (if com (viper-move-marker-locally 'viper-com-point (point)))
- (forward-line val)
- (back-to-indentation)
- (if com (viper-execute-com 'viper-next-line-at-bol val com))))
+ (let* ((field (get-char-property (point) 'field))
+ (button (get-char-property (point) 'button))
+ (doc (get-char-property (point) 'widget-doc))
+ (widget (or field button doc)))
+ (if (and widget
+ (if (symbolp widget)
+ (get widget 'widget-type)
+ (and (consp widget)
+ (get (widget-type widget) 'widget-type))))
+ (widget-button-press (point))
+ (if (button-at (point))
+ (push-button)
+ ;; not a widget or a button
+ (viper-leave-region-active)
+ (save-excursion
+ (end-of-line)
+ (if (eobp) (error "Last line in buffer")))
+ (let ((val (viper-p-val arg))
+ (com (viper-getCom arg)))
+ (if com (viper-move-marker-locally 'viper-com-point (point)))
+ (forward-line val)
+ (back-to-indentation)
+ (if com (viper-execute-com 'viper-next-line-at-bol val com)))))))
(defun viper-previous-line (arg)
@@ -3916,7 +3964,8 @@ Null string will repeat previous search.
(let ((val (viper-p-val arg))
(com (viper-getcom arg))
debug-on-error)
- (if (null viper-s-string) (error viper-NoPrevSearch))
+ (if (or (null viper-s-string) (string= viper-s-string ""))
+ (error viper-NoPrevSearch))
(viper-search viper-s-string viper-s-forward arg)
(if com
(progn
1.74 +39 -0 XEmacs/packages/xemacs-packages/viper/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/viper/ChangeLog,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -p -r1.73 -r1.74
--- ChangeLog 2006/02/20 07:27:44 1.73
+++ ChangeLog 2006/08/25 16:48:42 1.74
@@ -1,3 +1,42 @@
+2006-08-25 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * viper.el (viper-set-hooks): use frame bindings for
+ viper-vi-state-cursor-color.
+ (viper-non-hook-settings): don't set default
+ mode-line-buffer-identification.
+
+ * viper-util.el (viper-set-cursor-color-according-to-state): new
+ function.
+ (viper-set-cursor-color-according-to-state,
+ viper-get-saved-cursor-color-in-replace-mode,
+ viper-get-saved-cursor-color-in-insert-mode): make conditional on
+ viper-emacs-state-cursor-color.
+
+ * viper-cmd.el (viper-envelop-ESC-key): bug fix.
+ (viper-undo): use point if undo-beg-posn is nil.
+ (viper-insert-state-post-command-sentinel,viper-change-state-to-emacs,
+ viper-after-change-undo-hook): don't use
+ viper-emacs-state-cursor-color by default.
+ (viper-undo): more sensible positioning after undo.
+
+ * viper-ex.el (ex-splice-args-in-1-letr-cmd): got rid of caddr.
+ (viper-emacs-state-cursor-color): default to nil, since this feature
+ doesn't work well yet.
+
+2006-06-18 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * viper-cmd.el (viper-special-read-and-insert-char): use
+ read-key-sequence.
+ (viper-after-change-undo-hook): enhancements.
+ (viper-after-change-undo-hook): new hook.
+ (viper-undo): use viper-after-change-undo-hook.
+ (viper-add-newline-at-eob-if-necessary): widen before making changes.
+ (viper-next-line-at-bol): If point is on a widget or a button, simulate
+ clicking on that widget/button.
+
+ * viper.el (viper-mode): allow for a separate cursor color in Emacs
+ state.
+
2006-02-20 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.48 released.
[View Less]
CVS update by michaelk packages/xemacs-packages/ediff, ediff-wind.el, ediff-diff.el ...
18 years, 7 months
CVS Monitor
User: michaelk
Date: 06/08/25 18:43:20
Modified: packages/xemacs-packages/ediff ediff.texi ediff.el
ediff-wind.el ediff-vers.el ediff-mult.el
ediff-diff.el ChangeLog
Log:
* ediff-mult.el (ediff-intersect-directories,
ediff-get-directory-files-under-revision, ediff-dir-diff-copy-file):
always expand filenames.
* ediff-diff (ediff-test-patch-utility): catch errors.
(ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
…
[View More](ediff-set-actual-diff-options): new function.
(ediff-reset-diff-options, ediff-toggle-ignore-case):
use ediff-set-actual-diff-options.
(ediff-extract-diffs): catch errors.
(ediff-whitespace): add nonbreakable space.
(ediff-same-file-contents): catch errors.
* ediff-mult.el (ediff-collect-custom-diffs): save
coding-system-for-read.
* ediff-vers.el (ediff-keep-tmp-versions): new var.
(ediff-vc-internal, ediff-vc-merge-internal): use
ediff-delete-version-file.
(ediff-delete-version-file): new function.
* ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
* ediff.el (ediff-directories, ediff-directory-revisions,
ediff-merge-directories, ediff-merge-directories-with-ancestor,
ediff-directories-internal, ediff-merge-directory-revisions,
ediff-merge-directory-revisions-with-ancestor,
ediff-directories3): use read-directory-name.
Revision Changes Path
1.35 +18 -8 XEmacs/packages/xemacs-packages/ediff/ediff.texi
Index: ediff.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff.texi,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -r1.34 -r1.35
--- ediff.texi 2006/02/19 03:35:17 1.34
+++ ediff.texi 2006/08/25 16:43:17 1.35
@@ -26,7 +26,7 @@ This file documents Ediff, a comprehensi
and patch utilities.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -135,7 +135,7 @@ The architecture and the interface are,
@chapter Major Entry Points
When Ediff starts up, it displays a small control window, which accepts the
-Ediff commands and two or three windows displaying the files to be compared
+Ediff commands, and two or three windows displaying the files to be compared
or merged. The control window can be in its own small frame or it can be
part of a bigger frame that displays other buffers. In any case, it is
important that the control window be active (i.e., be the one receiving the
@@ -829,7 +829,7 @@ identical to its default setting, as ori
instance, if Ediff is merging according to the `combined' policy, then the
merge region is skipped over if it is different from the combination of the
regions in buffers A and B. (Warning: swapping buffers A and B will confuse
-things in this respect). If the merge region is marked as `prefer-A' then
+things in this respect.) If the merge region is marked as `prefer-A' then
this region will be skipped if it differs from the current difference
region in buffer A, etc.
@@ -1455,7 +1455,7 @@ the control frame.
To start Ediff with an iconified Control Panel, you should set this
variable to @code{t} and @code{ediff-prefer-long-help-message} to
@code{nil} (@pxref{Quick Help Customization}). This behavior is useful
-only if icons are allowed to accept keybord input (which depend on the
+only if icons are allowed to accept keyboard input (which depends on the
window manager and other factors).
@end table
@@ -1599,8 +1599,6 @@ problem.
@vindex ediff-ignore-case
Finally, Ediff can be told to ignore the case of the letters. This behavior
can be toggled with @kbd{#c} and it is controlled with three variables:
-Toggle case sensitivity in the diff program. All diffs are recomputed.
-Case sensitivity is controlled by the variables
@code{ediff-ignore-case-option}, @code{ediff-ignore-case-option3}, and
@code{ediff-ignore-case}.
@@ -1616,6 +1614,9 @@ The variable @code{ediff-ignore-case} co
ignoring letter case or not. It can be set in @file{.emacs} using
@code{setq-default}.
+When case sensitivity is toggled, all difference
+regions are recomputed.
+
@node Highlighting Difference Regions, Narrowing, Selective Browsing, Customization
@section Highlighting Difference Regions
@@ -1682,7 +1683,7 @@ Ediff uses faces to highlight difference
@item ediff-highlight-all-diffs
@vindex ediff-highlight-all-diffs
-Indicates whether---on a windowind display---Ediff should highlight
+Indicates whether---on a windowing display---Ediff should highlight
differences using inserted strings (as on text-only terminals) or using
colors and highlighting. Normally, Ediff highlights all differences, but
the selected difference is highlighted more visibly. One can cycle through
@@ -1721,7 +1722,7 @@ some Lisp code in @file{~/.emacs}. For
@end example
@noindent
-would use the pre-defined fase @code{bold-italic} to highlight the current
+would use the pre-defined face @code{bold-italic} to highlight the current
difference region in buffer A (this face is not a good choice, by the way).
If you are unhappy with just @emph{some} of the aspects of the default
@@ -2318,6 +2319,14 @@ prior to starting Ediff, so Ediff just p
Using @code{ediff-cleanup-hook}, one can make Ediff delete the variants
unconditionally (e.g., by making @code{ediff-janitor} into one of these hooks).
+
+@item ediff-keep-tmp-versions
+@vindex @code{ediff-keep-tmp-versions}
+Default is @code{nil}. If @code{t}, the versions of the files being
+compared or merged using operations such as @code{ediff-revision} or
+@code{ediff-merge-revisions} are not deleted on exit. The normal action is
+to clean up and delete these version files.
+
@item ediff-grab-mouse
@vindex @code{ediff-grab-mouse}
Default is @code{t}. Normally, Ediff grabs mouse and puts it in its
@@ -2459,6 +2468,7 @@ Karl Heuer (kwzh@(a)gnu.org),
(jaffe@(a)chipmunk.cita.utoronto.ca),
David Karr (dkarr@(a)nmo.gtegsc.com),
Norbert Kiesel (norbert@(a)i3.informatik.rwth-aachen.de),
+Steffen Kilb (skilb@(a)gmx.net),
Leigh L Klotz (klotz@(a)adoc.xerox.com),
Fritz Knabe (Fritz.Knabe@(a)ecrc.de),
Heinz Knutzen (hk@(a)informatik.uni-kiel.d400.de),
1.34 +69 -79 XEmacs/packages/xemacs-packages/ediff/ediff.el
Index: ediff.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff.el,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- ediff.el 2006/02/19 03:35:17 1.33
+++ ediff.el 2006/08/25 16:43:18 1.34
@@ -210,12 +210,11 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1)))
)))
(ediff-files-internal file-A
@@ -246,25 +245,22 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons
- (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "File C to compare"
(setq dir-C (if ediff-use-last-dir
ediff-last-dir-C
(file-name-directory ff)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory ff)
- dir-C))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory ff)
+ dir-C)))
(ediff-get-default-file-name ff 2)))
)))
(ediff-files-internal file-A
@@ -504,12 +500,13 @@ expression; only file names that match t
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil))
- (ediff-read-file-name "Directory B to compare:"
- (if ediff-use-last-dir
- ediff-last-dir-B
- (ediff-strip-last-dir f))
- nil)
+ (list (setq f (read-directory-name
+ "Directory A to compare:" dir-A nil 'must-match))
+ (read-directory-name "Directory B to compare:"
+ (if ediff-use-last-dir
+ ediff-last-dir-B
+ (ediff-strip-last-dir f))
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -536,8 +533,8 @@ names. Only the files that are under re
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
)
- (list (ediff-read-file-name
- "Directory to compare with revision:" dir-A nil)
+ (list (read-directory-name
+ "Directory to compare with revision:" dir-A nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -565,17 +562,17 @@ regular expression; only file names that
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil))
- (setq f (ediff-read-file-name "Directory B to compare:"
- (if ediff-use-last-dir
- ediff-last-dir-B
- (ediff-strip-last-dir f))
- nil))
- (ediff-read-file-name "Directory C to compare:"
- (if ediff-use-last-dir
- ediff-last-dir-C
- (ediff-strip-last-dir f))
- nil)
+ (list (setq f (read-directory-name "Directory A to compare:" dir-A nil))
+ (setq f (read-directory-name "Directory B to compare:"
+ (if ediff-use-last-dir
+ ediff-last-dir-B
+ (ediff-strip-last-dir f))
+ nil 'must-match))
+ (read-directory-name "Directory C to compare:"
+ (if ediff-use-last-dir
+ ediff-last-dir-C
+ (ediff-strip-last-dir f))
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -601,12 +598,13 @@ expression; only file names that match t
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil))
- (ediff-read-file-name "Directory B to merge:"
- (if ediff-use-last-dir
- ediff-last-dir-B
- (ediff-strip-last-dir f))
- nil)
+ (list (setq f (read-directory-name "Directory A to merge:"
+ dir-A nil 'must-match))
+ (read-directory-name "Directory B to merge:"
+ (if ediff-use-last-dir
+ ediff-last-dir-B
+ (ediff-strip-last-dir f))
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -637,17 +635,17 @@ only file names that match the regexp ar
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
f)
- (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil))
- (setq f (ediff-read-file-name "Directory B to merge:"
+ (list (setq f (read-directory-name "Directory A to merge:" dir-A nil))
+ (setq f (read-directory-name "Directory B to merge:"
(if ediff-use-last-dir
ediff-last-dir-B
(ediff-strip-last-dir f))
- nil))
- (ediff-read-file-name "Ancestor directory:"
+ nil 'must-match))
+ (read-directory-name "Ancestor directory:"
(if ediff-use-last-dir
ediff-last-dir-C
(ediff-strip-last-dir f))
- nil)
+ nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -673,8 +671,8 @@ names. Only the files that are under re
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
)
- (list (ediff-read-file-name
- "Directory to merge with revisions:" dir-A nil)
+ (list (read-directory-name
+ "Directory to merge with revisions:" dir-A nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -703,8 +701,9 @@ names. Only the files that are under re
(let ((dir-A (ediff-get-default-directory-name))
(default-regexp (eval ediff-default-filtering-regexp))
)
- (list (ediff-read-file-name
- "Directory to merge with revisions and ancestors:" dir-A nil)
+ (list (read-directory-name
+ "Directory to merge with revisions and ancestors:"
+ dir-A nil 'must-match)
(read-string
(if (stringp default-regexp)
(format "Filter through regular expression (default %s): "
@@ -737,11 +736,6 @@ names. Only the files that are under re
(defun ediff-directories-internal (dir1 dir2 dir3 regexp action jobname
&optional startup-hooks
merge-autostore-dir)
- ;; ediff-read-file-name is set to attach a previously entered file name if
- ;; the currently entered file is a directory. This code takes care of that.
- (setq dir1 (if (file-directory-p dir1) dir1 (file-name-directory dir1))
- dir2 (if (file-directory-p dir2) dir2 (file-name-directory dir2)))
-
(if (stringp dir3)
(setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3))))
@@ -767,7 +761,7 @@ names. Only the files that are under re
(ediff-merge-metajob jobname)
(not merge-autostore-dir))
(setq merge-autostore-dir
- (read-file-name "Save merged files in directory: "
+ (read-directory-name "Save merged files in directory: "
(if ediff-use-last-dir
ediff-last-merge-autostore-dir
(ediff-strip-last-dir dir1))
@@ -827,7 +821,7 @@ names. Only the files that are under re
(ediff-merge-metajob jobname)
(not merge-autostore-dir))
(setq merge-autostore-dir
- (read-file-name "Save merged files in directory: "
+ (read-directory-name "Save merged files in directory: "
(if ediff-use-last-dir
ediff-last-merge-autostore-dir
(ediff-strip-last-dir dir1))
@@ -1109,12 +1103,11 @@ lines. For small regions, use `ediff-re
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
@@ -1153,13 +1146,11 @@ lines. For small regions, use `ediff-re
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons
- (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "Ancestor file"
(setq dir-ancestor
@@ -1167,12 +1158,11 @@ lines. For small regions, use `ediff-re
ediff-last-dir-ancestor
(file-name-directory ff)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory ff)
- dir-ancestor))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory ff)
+ dir-ancestor)))
(ediff-get-default-file-name ff 2)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
1.24 +2 -0 XEmacs/packages/xemacs-packages/ediff/ediff-wind.el
Index: ediff-wind.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-wind.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- ediff-wind.el 2006/02/19 03:35:17 1.23
+++ ediff-wind.el 2006/08/25 16:43:18 1.24
@@ -158,6 +158,8 @@ In this case, Ediff will use those frame
'(scrollbar-height . 0) ; XEmacs only
'(menu-bar-lines . 0) ; Emacs only
'(tool-bar-lines . 0) ; Emacs 21+ only
+ '(left-fringe . 0)
+ '(right-fringe . 0)
;; don't lower but auto-raise
'(auto-lower . nil)
'(auto-raise . t)
1.16 +19 -7 XEmacs/packages/xemacs-packages/ediff/ediff-vers.el
Index: ediff-vers.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-vers.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- ediff-vers.el 2006/02/19 03:35:18 1.15
+++ ediff-vers.el 2006/08/25 16:43:18 1.16
@@ -52,6 +52,13 @@
)))
;; end pacifier
+(defcustom ediff-keep-tmp-versions nil
+ "*If t, do not delete temporary previous versions for the files on which
+comparison or merge operations are being performed."
+:type 'boolean
+:group 'ediff-vers
+ )
+
;; VC.el support
(defun ediff-vc-latest-version (file)
@@ -87,8 +94,8 @@
file2 (buffer-file-name)))
(setq startup-hooks
(cons `(lambda ()
- (delete-file ,file1)
- (or ,(string= rev2 "") (delete-file ,file2)))
+ (ediff-delete-version-file ,file1)
+ (or ,(string= rev2 "") (ediff-delete-version-file ,file2)))
startup-hooks)))
(ediff-buffers
rev1buf rev2buf
@@ -199,12 +206,12 @@
(setq startup-hooks
(cons
`(lambda ()
- (delete-file ,(buffer-file-name buf1))
+ (ediff-delete-version-file ,(buffer-file-name buf1))
(or ,(string= rev2 "")
- (delete-file ,(buffer-file-name buf2)))
+ (ediff-delete-version-file ,(buffer-file-name buf2)))
(or ,(string= ancestor-rev "")
,(not ancestor-rev)
- (delete-file ,(buffer-file-name ancestor-buf)))
+ (ediff-delete-version-file ,(buffer-file-name ancestor-buf)))
)
startup-hooks)))
(if ancestor-rev
@@ -305,8 +312,13 @@
(find-file-noselect (cvs-fileinfo->full-name fileinfo)))
nil ; startup-hooks
'ediff-revisions)))
- (if (stringp tmp-file) (delete-file tmp-file))
- (if (stringp ancestor-file) (delete-file ancestor-file))))
+ (if (stringp tmp-file) (ediff-delete-version-file tmp-file))
+ (if (stringp ancestor-file) (ediff-delete-version-file ancestor-file))))
+
+
+;; delete version file on exit unless ediff-keep-tmp-versions is true
+(defun ediff-delete-version-file (file)
+ (or ediff-keep-tmp-versions (delete-file file)))
(provide 'ediff-vers)
1.26 +28 -21 XEmacs/packages/xemacs-packages/ediff/ediff-mult.el
Index: ediff-mult.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-mult.el,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- ediff-mult.el 2006/02/19 03:35:18 1.25
+++ ediff-mult.el 2006/08/25 16:43:18 1.26
@@ -648,8 +648,8 @@ behavior."
(mapcar
(lambda (elt)
(ediff-make-new-meta-list-element
- (concat auxdir1 elt)
- (concat auxdir2 elt)
+ (expand-file-name (concat auxdir1 elt))
+ (expand-file-name (concat auxdir2 elt))
(if lis3
(progn
;; The following is done because: In merging with
@@ -660,7 +660,7 @@ behavior."
;; the second case, we insert nil.
(setq elt (ediff-add-slash-if-directory auxdir3 elt))
(if (file-exists-p (concat auxdir3 elt))
- (concat auxdir3 elt))))))
+ (expand-file-name (concat auxdir3 elt)))))))
common)))
;; return result
(cons common-part difflist)
@@ -716,7 +716,7 @@ behavior."
auxdir1 nil nil
merge-autostore-dir nil)
(mapcar (lambda (elt) (ediff-make-new-meta-list-element
- (concat auxdir1 elt) nil nil))
+ (expand-file-name (concat auxdir1 elt)) nil nil))
common))
))
@@ -1338,7 +1338,10 @@ Useful commands:
;; update ediff-meta-list by direct modification
(nconc meta-list
(list (ediff-make-new-meta-list-element
- otherfile1 otherfile2 otherfile3)))
+ (expand-file-name otherfile1)
+ (expand-file-name otherfile2)
+ (if otherfile3
+ (expand-file-name otherfile3)))))
)
(ediff-update-meta-buffer meta-buf 'must-redraw)
))
@@ -1656,22 +1659,26 @@ This operation is defined only for `edif
multifile patches. For `ediff-directory-revisions', we insist that
all marked sessions must be active."
(interactive)
- (or (ediff-buffer-live-p ediff-meta-diff-buffer)
- (setq ediff-meta-diff-buffer
- (get-buffer-create
- (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*"))))
- (ediff-with-current-buffer ediff-meta-diff-buffer
- (setq buffer-read-only nil)
- (erase-buffer))
- (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0)
- ;; did something
- (progn
- (display-buffer ediff-meta-diff-buffer 'not-this-window)
- (ediff-with-current-buffer ediff-meta-diff-buffer
- (set-buffer-modified-p nil)
- (setq buffer-read-only t)))
- (beep)
- (message "No marked sessions found")))
+ (let ((coding-system-for-read ediff-coding-system-for-read))
+ (or (ediff-buffer-live-p ediff-meta-diff-buffer)
+ (setq ediff-meta-diff-buffer
+ (get-buffer-create
+ (ediff-unique-buffer-name "*Ediff Multifile Diffs" "*"))))
+ (ediff-with-current-buffer ediff-meta-diff-buffer
+ (setq buffer-read-only nil)
+ (erase-buffer))
+ (if (> (ediff-operate-on-marked-sessions 'ediff-append-custom-diff) 0)
+ ;; did something
+ (progn
+ (display-buffer ediff-meta-diff-buffer 'not-this-window)
+ (ediff-with-current-buffer ediff-meta-diff-buffer
+ (set-buffer-modified-p nil)
+ (setq buffer-read-only t))
+ (if (fboundp 'diff-mode)
+ (with-current-buffer ediff-meta-diff-buffer
+ (diff-mode))))
+ (beep)
+ (message "No marked sessions found"))))
(defun ediff-meta-show-patch ()
"Show the multi-file patch associated with this group session."
1.29 +53 -35 XEmacs/packages/xemacs-packages/ediff/ediff-diff.el
Index: ediff-diff.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ediff-diff.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- ediff-diff.el 2006/02/22 06:52:34 1.28
+++ ediff-diff.el 2006/08/25 16:43:18 1.29
@@ -65,8 +65,11 @@ Must produce output compatible with Unix
;; The following functions needed for setting diff/diff3 options
;; test if diff supports the --binary option
(defsubst ediff-test-utility (diff-util option &optional files)
- (eq 0 (apply 'call-process
- (append (list diff-util nil nil nil option) files))))
+ (condition-case nil
+ (eq 0 (apply 'call-process
+ (append (list diff-util nil nil nil option) files)))
+ (error (format "Cannot execute program %S." diff-util)))
+ )
(defun ediff-diff-mandatory-option (diff-util)
(let ((file (if (boundp 'null-device) null-device "/dev/null")))
@@ -75,13 +78,17 @@ Must produce output compatible with Unix
((and (string= diff-util ediff-diff-program)
(ediff-test-utility
ediff-diff-program "--binary" (list file file)))
- "--binary")
+ "--binary ")
((and (string= diff-util ediff-diff3-program)
(ediff-test-utility
ediff-diff3-program "--binary" (list file file file)))
- "--binary")
+ "--binary ")
(t ""))))
+
+;; must be before ediff-reset-diff-options to avoid compiler errors
+(fset 'ediff-set-actual-diff-options '(lambda () nil))
+
;; make sure that mandatory options are added even if the user changes
;; ediff-diff-options or ediff-diff3-options in the customization widget
(defun ediff-reset-diff-options (symb val)
@@ -89,12 +96,9 @@ Must produce output compatible with Unix
(if (eq symb 'ediff-diff-options)
ediff-diff-program
ediff-diff3-program))
- (mandatory-option (ediff-diff-mandatory-option diff-program))
- (spacer (if (string-equal mandatory-option "") "" " ")))
- (set symb
- (if (string-match mandatory-option val)
- val
- (concat mandatory-option spacer val)))
+ (mandatory-option (ediff-diff-mandatory-option diff-program)))
+ (set symb (concat mandatory-option val))
+ (ediff-set-actual-diff-options)
))
@@ -128,10 +132,10 @@ are `-I REGEXP', to ignore changes whose
(defcustom ediff-diff-options ""
"*Options to pass to `ediff-diff-program'.
-If Unix diff is used as `ediff-diff-program', then a useful option is
-`-w', to ignore space, and `-i', to ignore case of letters.
-Options `-c' and `-i' are not allowed. Case sensitivity can be toggled
-interactively using [ediff-toggle-ignore-case]"
+If Unix diff is used as `ediff-diff-program',
+ then a useful option is `-w', to ignore space.
+Options `-c' and `-i' are not allowed. Case sensitivity can be
+ toggled interactively using \\[ediff-toggle-ignore-case]."
:set 'ediff-reset-diff-options
:type 'string
:group 'ediff-diff)
@@ -153,7 +157,7 @@ GNU diff3 doesn't have such an option."
:group 'ediff-diff)
;; the actual options used in comparison
-(ediff-defvar-local ediff-actual-diff-options "" "")
+(ediff-defvar-local ediff-actual-diff-options ediff-diff-options "")
(defcustom ediff-custom-diff-program ediff-diff-program
"*Program to use for generating custom diff output for saving it in a file.
@@ -176,7 +180,7 @@ This output is not used by Ediff interna
:group 'ediff-diff)
;; the actual options used in comparison
-(ediff-defvar-local ediff-actual-diff3-options "" "")
+(ediff-defvar-local ediff-actual-diff3-options ediff-diff3-options "")
(defcustom ediff-diff3-ok-lines-regexp
"^\\([1-3]:\\|====\\| \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)"
@@ -399,7 +403,7 @@ one optional arguments, diff-number to r
(c-prev-pt nil)
diff-list shift-A shift-B
)
-
+
;; diff list contains word numbers, unless changed later
(setq diff-list (cons (if word-mode 'words 'points)
diff-list))
@@ -411,7 +415,7 @@ one optional arguments, diff-number to r
shift-B
(ediff-overlay-start
(ediff-get-value-according-to-buffer-type 'B bounds))))
-
+
;; reset point in buffers A/B/C
(ediff-with-current-buffer A-buffer
(goto-char (if shift-A shift-A (point-min))))
@@ -1270,7 +1274,9 @@ delimiter regions"))
;; Similarly for Windows-*
;; In DOS, must synchronize because DOS doesn't have
;; asynchronous processes.
- (apply 'call-process program nil buffer nil args)
+ (condition-case nil
+ (apply 'call-process program nil buffer nil args)
+ (error (format "Cannot execute program %S." program)))
;; On other systems, do it asynchronously.
(setq proc (get-buffer-process buffer))
(if proc (kill-process proc))
@@ -1326,7 +1332,8 @@ delimiter regions"))
Used for splitting difference regions into individual words.")
(make-variable-buffer-local 'ediff-forward-word-function)
-(defvar ediff-whitespace " \n\t\f"
+;; \240 is unicode symbol for nonbreakable whitespace
+(defvar ediff-whitespace " \n\t\f\r\240"
"*Characters constituting white space.
These characters are ignored when differing regions are split into words.")
(make-variable-buffer-local 'ediff-whitespace)
@@ -1440,11 +1447,13 @@ arguments to `skip-chars-forward'."
"Return t if files F1 and F2 have identical contents."
(if (and (not (file-directory-p f1))
(not (file-directory-p f2)))
- (let ((res
- (apply 'call-process ediff-cmp-program nil nil nil
- (append ediff-cmp-options (list f1 f2)))))
- (and (numberp res) (eq res 0))))
- )
+ (condition-case nil
+ (let ((res
+ (apply 'call-process ediff-cmp-program nil nil nil
+ (append ediff-cmp-options (list f1 f2)))))
+ (and (numberp res) (eq res 0)))
+ (error (format "Cannot execute program %S." ediff-cmp-program)))
+ ))
(defun ediff-same-contents (d1 d2 &optional filter-re)
@@ -1519,21 +1528,30 @@ affects only files whose names match the
(setq file-list-list (cdr file-list-list)))
(reverse result)))
+
+(defun ediff-set-actual-diff-options ()
+ (if ediff-ignore-case
+ (setq ediff-actual-diff-options
+ (concat ediff-diff-options " " ediff-ignore-case-option)
+ ediff-actual-diff3-options
+ (concat ediff-diff3-options " " ediff-ignore-case-option3))
+ (setq ediff-actual-diff-options ediff-diff-options
+ ediff-actual-diff3-options ediff-diff3-options)
+ )
+ (setq-default ediff-actual-diff-options ediff-actual-diff-options
+ ediff-actual-diff3-options ediff-actual-diff3-options)
+ )
+
+
;; Ignore case handling - some ideas from drew.adams@(a)oracle.com
(defun ediff-toggle-ignore-case ()
(interactive)
(ediff-barf-if-not-control-buffer)
(setq ediff-ignore-case (not ediff-ignore-case))
- (cond (ediff-ignore-case
- (setq ediff-actual-diff-options
- (concat ediff-diff-options " " ediff-ignore-case-option)
- ediff-actual-diff3-options
- (concat ediff-diff3-options " " ediff-ignore-case-option3))
- (message "Ignoring regions that differ only in case"))
- (t
- (setq ediff-actual-diff-options ediff-diff-options
- ediff-actual-diff3-options ediff-diff3-options)
- (message "Ignoring case differences turned OFF")))
+ (ediff-set-actual-diff-options)
+ (if ediff-ignore-case
+ (message "Ignoring regions that differ only in case")
+ (message "Ignoring case differences turned OFF"))
(cond (ediff-merge-job
(message "Ignoring letter case is too dangerous in merge jobs"))
((and ediff-diff3-job (string= ediff-ignore-case-option3 ""))
1.104 +30 -0 XEmacs/packages/xemacs-packages/ediff/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ediff/ChangeLog,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -p -r1.103 -r1.104
--- ChangeLog 2006/02/22 12:53:13 1.103
+++ ChangeLog 2006/08/25 16:43:18 1.104
@@ -1,3 +1,33 @@
+2006-08-25 Michael Kifer <kifer(a)cs.stonybrook.edu>
+
+ * ediff-mult.el (ediff-intersect-directories,
+ ediff-get-directory-files-under-revision, ediff-dir-diff-copy-file):
+ always expand filenames.
+ * ediff-diff (ediff-test-patch-utility): catch errors.
+ (ediff-actual-diff-options, ediff-actual-diff3-options): new variables.
+ (ediff-set-actual-diff-options): new function.
+ (ediff-reset-diff-options, ediff-toggle-ignore-case):
+ use ediff-set-actual-diff-options.
+ (ediff-extract-diffs): catch errors.
+ (ediff-whitespace): add nonbreakable space.
+ (ediff-same-file-contents): catch errors.
+
+ * ediff-mult.el (ediff-collect-custom-diffs): save
+ coding-system-for-read.
+
+ * ediff-vers.el (ediff-keep-tmp-versions): new var.
+ (ediff-vc-internal, ediff-vc-merge-internal): use
+ ediff-delete-version-file.
+ (ediff-delete-version-file): new function.
+
+ * ediff-wind.el (ediff-control-frame-parameters): set frame fringes.
+
+ * ediff.el (ediff-directories, ediff-directory-revisions,
+ ediff-merge-directories, ediff-merge-directories-with-ancestor,
+ ediff-directories-internal, ediff-merge-directory-revisions,
+ ediff-merge-directory-revisions-with-ancestor,
+ ediff-directories3): use read-directory-name.
+
2006-02-22 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.62 released.
[View Less]
CVS update by viteno xemacs ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/24 23:51:13
Modified: xemacs version.sh
Log:
Update xemacs_extra_name.
Revision Changes Path
1.1632 +1 -1 XEmacs/xemacs/version.sh
Index: version.sh
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/version.sh,v
retrieving revision 1.1631
retrieving revision 1.1632
diff -u -p -r1.1631 -r1.1632
--- version.sh 2006/08/23 21:51:03 1.1631
+++ version.sh 2006/08/24 21:51:13 1.1632
@@ -8,5 +8,…
[View More]5 @@ emacs_kit_version=
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8
-xemacs_extra_name="(+CVS-20060823)"
+xemacs_extra_name="(+CVS-20060824)"
xemacs_release_date="2006-05-16"
[View Less]
CVS update by aidan xemacs/src, redisplay-tty.c ...
18 years, 7 months
CVS Monitor
User: aidan
Date: 06/08/24 23:21:40
Modified: xemacs/src ChangeLog console-tty-impl.h console-tty.c
redisplay-tty.c text.c
Log:
Vary support for multiple-width characters on a per-console basis.
Revision Changes Path
1.999 +28 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.998
retrieving revision 1.999
…
[View More]diff -u -p -r1.998 -r1.999
--- ChangeLog 2006/08/23 19:57:49 1.998
+++ ChangeLog 2006/08/24 21:21:34 1.999
@@ -1,3 +1,31 @@
+2006-08-24 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * console-tty-impl.h (struct tty_console):
+ New flag; multiple_width, specifying whether East Asian characters
+ take up two columns on this terminal. The macro to access it
+ expands to a constant under non-Mule, so anything conditionalising
+ on it will be optimised away.
+
+ * console-tty.c:
+ * console-tty.c (tty_init_console):
+ Initialise tty_con->multiple_width; zero on non-Mule, one on Mule.
+
+ * console-tty.c (Fconsole_tty_multiple_width): New.
+ * console-tty.c (Fset_console_tty_multiple_width): New.
+ * console-tty.c (syms_of_console_tty): Make them available outside
+ console-tty.c.
+
+ * redisplay-tty.c (tty_text_width):
+ * redisplay-tty.c (tty_output_ibyte_string):
+ Check that the relevant console has multiple-width characters
+ before using something other than the number of characters in a
+ string for the text width of that string.
+
+ * text.c:
+ * text.c (ibyte_string_displayed_columns):
+ * text.c (ichar_string_displayed_columns):
+ Remove some Mule conditionals; add some sanity-checking.
+
2006-08-23 Aidan Kehoe <kehoea(a)parhasard.net>
* syntax.c (complex_vars_of_syntax):
1.3 +13 -0 XEmacs/xemacs/src/console-tty-impl.h
Index: console-tty-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-tty-impl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- console-tty-impl.h 2005/11/25 01:41:57 1.2
+++ console-tty-impl.h 2006/08/24 21:21:36 1.3
@@ -200,6 +200,8 @@ struct tty_console
/* Is this TTY our controlling terminal? */
unsigned int controlling_terminal :1;
unsigned int is_stdio :1;
+ /* Do East Asian chars take up two columns? */
+ unsigned int multiple_width :1;
};
#ifdef NEW_GC
@@ -220,6 +222,17 @@ DECLARE_LRECORD (tty_console, Lisp_Tty_C
#define CONSOLE_TTY_REAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->real_cursor_y)
#define CONSOLE_TTY_FINAL_CURSOR_X(c) (CONSOLE_TTY_DATA (c)->final_cursor_x)
#define CONSOLE_TTY_FINAL_CURSOR_Y(c) (CONSOLE_TTY_DATA (c)->final_cursor_y)
+
+/* In a more ideal world where available terminfo files actually included
+ information on whether a given TTY supports double-width characters or
+ not, oh, and where Mule was not conditional, SUPPORTS_MULTIPLE_WIDTH
+ would be as console-specific as its syntax implies.
+
+ In this world, this is overengineering more than it is anything. */
+#define CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH(c) (1 != MAX_ICHAR_LEN)
+#define CONSOLE_TTY_MULTIPLE_WIDTH(c) \
+ (CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH(c) ? \
+ CONSOLE_TTY_DATA (c)->multiple_width : (0))
#define TTY_CM(c) (CONSOLE_TTY_DATA (c)->cm)
#define TTY_SE(c) (CONSOLE_TTY_DATA (c)->se)
1.35 +51 -0 XEmacs/xemacs/src/console-tty.c
Index: console-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-tty.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -r1.34 -r1.35
--- console-tty.c 2005/11/25 01:41:58 1.34
+++ console-tty.c 2006/08/24 21:21:36 1.35
@@ -158,6 +158,10 @@ tty_init_console (struct console *con, L
tty_con->terminal_type = terminal_type;
tty_con->controlling_process = controlling_process;
+ /* Defaults to 1 with Mule, 0 without. In the latter case the attribute is
+ read-only from Lisp. */
+ tty_con->multiple_width = CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH(c);
+
if (NILP (CONSOLE_NAME (con)))
CONSOLE_NAME (con) = Ffile_name_nondirectory (tty);
{
@@ -319,6 +323,51 @@ CODESYS defaults to the value of `termin
return Qnil;
}
+DEFUN ("console-tty-multiple-width", Fconsole_tty_multiple_width,
+ 0, 1, 0, /*
+Return whether CONSOLE treats East Asian double-width chars as such.
+
+CONSOLE defaults to the selected console. Without XEmacs support for
+double-width characters, this always gives nil.
+*/
+ (console))
+{
+ return CONSOLE_TTY_MULTIPLE_WIDTH (decode_tty_console(console))
+ ? Qt : Qnil;
+}
+
+DEFUN ("set-console-tty-multiple-width", Fset_console_tty_multiple_width,
+ 0, 2, 0, /*
+Set whether CONSOLE treats East Asian double-width characters as such.
+
+CONSOLE defaults to the selected console, and VALUE defaults to nil.
+Without XEmacs support for double-width characters, this throws an error if
+VALUE is non-nil.
+*/
+ (console, value))
+{
+ struct console *c = decode_tty_console (console);
+
+ /* So people outside of East Asia can put (set-console-tty-multiple-width
+ (selected-console) nil) in their init files, independent of whether
+ Mule is enabled. */
+ if (!CONSOLE_TTY_MULTIPLE_WIDTH (c) && NILP(value))
+ {
+ return Qnil;
+ }
+
+ if (!CONSOLE_TTY_SUPPORTS_MULTIPLE_WIDTH (c))
+ {
+ invalid_change
+ ("No console support for double-width chars",
+ Fmake_symbol(CONSOLE_NAME(c)));
+ }
+
+ CONSOLE_TTY_DATA(c)->multiple_width = NILP(value) ? 0 : 1;
+
+ return Qnil;
+}
+
/* #### Move this function to lisp */
DEFUN ("set-console-tty-coding-system", Fset_console_tty_coding_system,
0, 2, 0, /*
@@ -431,6 +480,8 @@ syms_of_console_tty (void)
DEFSUBR (Fconsole_tty_input_coding_system);
DEFSUBR (Fset_console_tty_input_coding_system);
DEFSUBR (Fset_console_tty_coding_system);
+ DEFSUBR (Fconsole_tty_multiple_width);
+ DEFSUBR (Fset_console_tty_multiple_width);
}
void
1.27 +14 -4 XEmacs/xemacs/src/redisplay-tty.c
Index: redisplay-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-tty.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- redisplay-tty.c 2006/06/27 22:59:40 1.26
+++ redisplay-tty.c 2006/08/24 21:21:36 1.27
@@ -100,16 +100,23 @@ static void term_get_fkeys (Lisp_Object
/*****************************************************************************
tty_text_width
- Non-Mule tty's don't have fonts (that we use at least), so everything
+ Non-Mule TTYs don't have fonts (that we use at least), so everything
is considered to be fixed width -- in other words, we return LEN.
Under Mule, however, a character can still cover more than one
column, so we use ichar_string_displayed_columns().
****************************************************************************/
static int
-tty_text_width (struct frame *UNUSED (f), struct face_cachel *UNUSED (cachel),
+tty_text_width (struct frame *f, struct face_cachel *UNUSED (cachel),
const Ichar *str, Charcount len)
{
- return ichar_string_displayed_columns (str, len);
+ struct console *c = XCONSOLE(FRAME_CONSOLE (f));
+
+ if (CONSOLE_TTY_MULTIPLE_WIDTH (c))
+ {
+ return ichar_string_displayed_columns (str, len);
+ }
+
+ return len;
}
/*****************************************************************************
@@ -533,6 +540,9 @@ tty_output_ibyte_string (struct window *
{
struct frame *f = XFRAME (w->frame);
struct console *c = XCONSOLE (FRAME_CONSOLE (f));
+ int incing = CONSOLE_TTY_MULTIPLE_WIDTH (c) ?
+ ibyte_string_displayed_columns (str, len) :
+ bytecount_to_charcount(str, len);
/* First position the cursor. */
cmgoto (f, dl->ypos - 1, xpos);
@@ -541,7 +551,7 @@ tty_output_ibyte_string (struct window *
tty_turn_on_face (w, findex);
send_string_to_tty_console (c, str, len);
- TTY_INC_CURSOR_X (c, ibyte_string_displayed_columns (str, len));
+ TTY_INC_CURSOR_X (c, incing);
/* Turn the face properties back off. */
tty_turn_off_face (w, findex);
1.29 +14 -10 XEmacs/xemacs/src/text.c
Index: text.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/text.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- text.c 2006/07/08 16:15:57 1.28
+++ text.c 2006/08/24 21:21:36 1.29
@@ -1998,20 +1998,26 @@ find_charsets_in_ichar_string (unsigned
#endif
}
+/* A couple of these functions should only be called on a non-Mule build. */
+#ifdef MULE
+#define ASSERT_BUILT_WITH_MULE() assert(1)
+#else /* MULE */
+#define ASSERT_BUILT_WITH_MULE() assert(0)
+#endif /* MULE */
+
int
ibyte_string_displayed_columns (const Ibyte *str, Bytecount len)
{
int cols = 0;
const Ibyte *end = str + len;
+ Ichar ch;
+
+ ASSERT_BUILT_WITH_MULE();
while (str < end)
{
-#ifdef MULE
- Ichar ch = itext_ichar (str);
+ ch = itext_ichar (str);
cols += XCHARSET_COLUMNS (ichar_charset (ch));
-#else
- cols++;
-#endif
INC_IBYTEPTR (str);
}
@@ -2019,19 +2025,17 @@ ibyte_string_displayed_columns (const Ib
}
int
-ichar_string_displayed_columns (const Ichar *USED_IF_MULE (str), Charcount len)
+ichar_string_displayed_columns (const Ichar * USED_IF_MULE(str), Charcount len)
{
-#ifdef MULE
int cols = 0;
int i;
+ ASSERT_BUILT_WITH_MULE();
+
for (i = 0; i < len; i++)
cols += XCHARSET_COLUMNS (ichar_charset (str[i]));
return cols;
-#else /* not MULE */
- return len;
-#endif
}
Charcount
[View Less]
CVS update by viteno xemacs ...
18 years, 7 months
CVS Monitor
User: viteno
Date: 06/08/23 23:51:04
Modified: xemacs version.sh
Log:
Update xemacs_extra_name.
Revision Changes Path
1.1631 +1 -1 XEmacs/xemacs/version.sh
Index: version.sh
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/version.sh,v
retrieving revision 1.1630
retrieving revision 1.1631
diff -u -p -r1.1630 -r1.1631
--- version.sh 2006/08/22 21:51:18 1.1630
+++ version.sh 2006/08/23 21:51:03 1.1631
@@ -8,5 +8,…
[View More]5 @@ emacs_kit_version=
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8
-xemacs_extra_name="(+CVS-20060822)"
+xemacs_extra_name="(+CVS-20060823)"
xemacs_release_date="2006-05-16"
[View Less]