Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8e41a31c
Commit
8e41a31c
authored
Sep 30, 1997
by
Michael Kifer
Browse files
new version
parent
991667f8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
208 additions
and
97 deletions
+208
-97
lisp/ediff-init.el
lisp/ediff-init.el
+80
-16
lisp/ediff-merg.el
lisp/ediff-merg.el
+6
-0
lisp/ediff-util.el
lisp/ediff-util.el
+12
-8
lisp/ediff.el
lisp/ediff.el
+2
-2
lisp/emulation/viper-cmd.el
lisp/emulation/viper-cmd.el
+20
-23
lisp/emulation/viper-ex.el
lisp/emulation/viper-ex.el
+15
-14
lisp/emulation/viper-init.el
lisp/emulation/viper-init.el
+61
-29
lisp/emulation/viper.el
lisp/emulation/viper.el
+12
-5
No files found.
lisp/ediff-init.el
View file @
8e41a31c
...
...
@@ -877,7 +877,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-current-diff-face-A
'ediff-current-diff-face-A
)
(
defvar
ediff-current-diff-face-A
'ediff-current-diff-face-A
"Face for highlighting the selected difference in buffer A.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-current-diff-face-A'
this variable represents."
)
(
ediff-hide-face
'ediff-current-diff-face-A
)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed.
...
...
@@ -913,7 +917,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-current-diff-face-B
'ediff-current-diff-face-B
)
(
defvar
ediff-current-diff-face-B
'ediff-current-diff-face-B
"Face for highlighting the selected difference in buffer B.
this variable. Instead, use the customization
widget to customize the actual face `ediff-current-diff-face-B'
this variable represents."
)
(
ediff-hide-face
'ediff-current-diff-face-B
)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed.
...
...
@@ -947,7 +955,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-current-diff-face-C
'ediff-current-diff-face-C
)
(
defvar
ediff-current-diff-face-C
'ediff-current-diff-face-C
"Face for highlighting the selected difference in buffer C.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-current-diff-face-C'
this variable represents."
)
(
ediff-hide-face
'ediff-current-diff-face-C
)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed.
...
...
@@ -973,7 +985,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-current-diff-face-Ancestor
'ediff-current-diff-face-Ancestor
)
(
defvar
ediff-current-diff-face-Ancestor
'ediff-current-diff-face-Ancestor
"Face for highlighting the selected difference in buffer Ancestor.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-current-diff-face-Ancestor'
this variable represents."
)
(
ediff-hide-face
'ediff-current-diff-face-Ancestor
)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed.
...
...
@@ -1015,7 +1031,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-fine-diff-face-A
'ediff-fine-diff-face-A
)
(
defvar
ediff-fine-diff-face-A
'ediff-fine-diff-face-A
"Face for highlighting the fine differences in buffer A.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-face-A'
this variable represents."
)
(
ediff-hide-face
'ediff-fine-diff-face-A
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1047,7 +1067,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-fine-diff-face-B
'ediff-fine-diff-face-B
)
(
defvar
ediff-fine-diff-face-B
'ediff-fine-diff-face-B
"Face for highlighting the fine differences in buffer B.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-face-B'
this variable represents."
)
(
ediff-hide-face
'ediff-fine-diff-face-B
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1080,7 +1104,11 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-fine-diff-face-C
'ediff-fine-diff-face-C
)
(
defvar
ediff-fine-diff-face-C
'ediff-fine-diff-face-C
"Face for highlighting the fine differences in buffer C.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-face-C'
this variable represents."
)
(
ediff-hide-face
'ediff-fine-diff-face-C
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1114,7 +1142,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-fine-diff-face-Ancestor
'ediff-fine-diff-face-Ancestor
)
(
defvar
ediff-fine-diff-face-Ancestor
'ediff-fine-diff-face-Ancestor
"Face for highlighting the fine differences in buffer Ancestor.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-face-Ancestor'
this variable represents."
)
(
ediff-hide-face
'ediff-fine-diff-face-Ancestor
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1149,7 +1181,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-even-diff-face-A
'ediff-even-diff-face-A
)
(
defvar
ediff-even-diff-face-A
'ediff-even-diff-face-A
"Face for highlighting even-numbered non-current differences in buffer A.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-face-A'
this variable represents."
)
(
ediff-hide-face
'ediff-even-diff-face-A
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1183,7 +1219,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-even-diff-face-B
'ediff-even-diff-face-B
)
(
defvar
ediff-even-diff-face-B
'ediff-even-diff-face-B
"Face for highlighting even-numbered non-current differences in buffer B.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-face-B'
this variable represents."
)
(
ediff-hide-face
'ediff-even-diff-face-B
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1212,7 +1252,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-even-diff-face-C
'ediff-even-diff-face-C
)
(
defvar
ediff-even-diff-face-C
'ediff-even-diff-face-C
"Face for highlighting even-numbered non-current differences in buffer C.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-face-C'
this variable represents."
)
(
ediff-hide-face
'ediff-even-diff-face-C
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1242,7 +1286,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-even-diff-face-Ancestor
'ediff-even-diff-face-Ancestor
)
(
defvar
ediff-even-diff-face-Ancestor
'ediff-even-diff-face-Ancestor
"Face for highlighting even-numbered non-current differences in buffer Ancestor.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-face-Ancestor'
this variable represents."
)
(
ediff-hide-face
'ediff-even-diff-face-Ancestor
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1284,7 +1332,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-odd-diff-face-A
'ediff-odd-diff-face-A
)
(
defvar
ediff-odd-diff-face-A
'ediff-odd-diff-face-A
"Face for highlighting odd-numbered non-current differences in buffer A.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-face-A'
this variable represents."
)
(
ediff-hide-face
'ediff-odd-diff-face-A
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1319,7 +1371,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-odd-diff-face-B
'ediff-odd-diff-face-B
)
(
defvar
ediff-odd-diff-face-B
'ediff-odd-diff-face-B
"Face for highlighting odd-numbered non-current differences in buffer B.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-face-B'
this variable represents."
)
(
ediff-hide-face
'ediff-odd-diff-face-B
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1347,7 +1403,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-odd-diff-face-C
'ediff-odd-diff-face-C
)
(
defvar
ediff-odd-diff-face-C
'ediff-odd-diff-face-C
"Face for highlighting odd-numbered non-current differences in buffer C.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-face-C'
this variable represents."
)
(
ediff-hide-face
'ediff-odd-diff-face-C
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
@@ -1375,7 +1435,11 @@ ancestor buffer."
:group
'ediff-highlighting
)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
;; this variable is set to nil, then again to the appropriate face.
(
defvar
ediff-odd-diff-face-Ancestor
'ediff-odd-diff-face-Ancestor
)
(
defvar
ediff-odd-diff-face-Ancestor
'ediff-odd-diff-face-Ancestor
"Face for highlighting odd-numbered non-current differences in buffer Ancestor.
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-face-Ancestor'
this variable represents."
)
(
ediff-hide-face
'ediff-odd-diff-face-Ancestor
)
;; Until custom.el for XEmacs starts supporting :stipple we do this.
;; This means that some use customization may be trashed.
...
...
lisp/ediff-merg.el
View file @
8e41a31c
...
...
@@ -81,6 +81,12 @@ STRING3
This means that regions that have status prefer-A or prefer-B will be
skiped over. Nil means show all regions."
)
;; If ediff-show-clashes-only, check if there is no clash between the ancestor
;; and one of the variants.
(
defsubst
ediff-merge-region-is-non-clash
(
n
)
(
and
ediff-show-clashes-only
(
string-match
"prefer"
(
or
(
ediff-get-state-of-merge
n
)
""
))))
(
defsubst
ediff-get-combined-region
(
n
)
(
concat
(
nth
0
ediff-combination-pattern
)
"\n"
...
...
lisp/ediff-util.el
View file @
8e41a31c
...
...
@@ -1586,20 +1586,20 @@ With a prefix argument, go forward that many differences."
(
if
(
<
ediff-current-difference
ediff-number-of-differences
)
(
let
((
n
(
min
ediff-number-of-differences
(
+
ediff-current-difference
arg
)))
regexp-skip
)
non-clash-skip
regexp-skip
)
(
ediff-visible-region
)
(
or
(
>=
n
ediff-number-of-differences
)
(
setq
regexp-skip
(
funcall
ediff-skip-diff-region-function
n
))
;; this won't exec if regexp-skip is t
(
setq
non-clash-skip
(
ediff-merge-region-is-non-clash
n
))
(
ediff-install-fine-diff-if-necessary
n
))
(
while
(
and
(
<
n
ediff-number-of-differences
)
(
or
;; regexp skip
regexp-skip
;; skip clashes, if necessary
(
and
ediff-show-clashes-only
(
string-match
"prefer"
(
or
(
ediff-get-state-of-merge
n
)
""
)))
non-clash-skip
;; skip difference regions that differ in white space
(
and
ediff-ignore-similar-regions
(
eq
(
ediff-no-fine-diffs-p
n
)
t
))))
...
...
@@ -1608,6 +1608,8 @@ With a prefix argument, go forward that many differences."
(
message
"Skipped over region %d and counting ..."
n
))
(
or
(
>=
n
ediff-number-of-differences
)
(
setq
regexp-skip
(
funcall
ediff-skip-diff-region-function
n
))
;; this won't exec if regexp-skip is t
(
setq
non-clash-skip
(
ediff-merge-region-is-non-clash
n
))
(
ediff-install-fine-diff-if-necessary
n
))
)
(
message
""
)
...
...
@@ -1623,20 +1625,20 @@ With a prefix argument, go back that many differences."
(
ediff-barf-if-not-control-buffer
)
(
if
(
>
ediff-current-difference
-1
)
(
let
((
n
(
max
-1
(
-
ediff-current-difference
arg
)))
regexp-skip
)
non-clash-skip
regexp-skip
)
(
ediff-visible-region
)
(
or
(
<
n
0
)
(
setq
regexp-skip
(
funcall
ediff-skip-diff-region-function
n
))
;; this won't exec if regexp-skip is t
(
setq
non-clash-skip
(
ediff-merge-region-is-non-clash
n
))
(
ediff-install-fine-diff-if-necessary
n
))
(
while
(
and
(
>
n
-1
)
(
or
;; regexp skip
regexp-skip
;; skip clashes, if necessary
(
and
ediff-show-clashes-only
(
string-match
"prefer"
(
or
(
ediff-get-state-of-merge
n
)
""
)))
non-clash-skip
;; skip difference regions that differ in white space
(
and
ediff-ignore-similar-regions
(
eq
(
ediff-no-fine-diffs-p
n
)
t
))))
...
...
@@ -1645,6 +1647,8 @@ With a prefix argument, go back that many differences."
(
setq
n
(
1-
n
))
(
or
(
<
n
0
)
(
setq
regexp-skip
(
funcall
ediff-skip-diff-region-function
n
))
;; this won't exec if regexp-skip is t
(
setq
non-clash-skip
(
ediff-merge-region-is-non-clash
n
))
(
ediff-install-fine-diff-if-necessary
n
))
)
(
message
""
)
...
...
lisp/ediff.el
View file @
8e41a31c
...
...
@@ -6,8 +6,8 @@
;; Created: February 2, 1994
;; Keywords: comparing, merging, patching, version control.
(
defconst
ediff-version
"2.67"
"The current version of Ediff"
)
(
defconst
ediff-date
"September 3, 1997"
"Date of last update"
)
(
defconst
ediff-version
"2.67
1
"
"The current version of Ediff"
)
(
defconst
ediff-date
"September
2
3, 1997"
"Date of last update"
)
;; This file is part of GNU Emacs.
...
...
lisp/emulation/viper-cmd.el
View file @
8e41a31c
...
...
@@ -1814,7 +1814,7 @@ suffixes, the user is asked to confirm.
To turn this feature off, set this variable to nil."
:type
'
(
repeat
string
)
:group
'viper
)
:group
'viper
-misc
)
;; Try to add a suitable suffix to files whose name ends with a `.'
...
...
@@ -3230,7 +3230,8 @@ controlled by the sign of prefix numeric value."
(
defun
viper-forward-sentence
(
arg
)
"Forward sentence."
(
interactive
"P"
)
(
push-mark
nil
t
)
(
or
(
eq
last-command
this-command
)
(
push-mark
nil
t
))
(
let
((
val
(
viper-p-val
arg
))
(
com
(
viper-getcom
arg
)))
(
if
com
(
viper-move-marker-locally
'viper-com-point
(
point
)))
...
...
@@ -3240,7 +3241,8 @@ controlled by the sign of prefix numeric value."
(
defun
viper-backward-sentence
(
arg
)
"Backward sentence."
(
interactive
"P"
)
(
push-mark
nil
t
)
(
or
(
eq
last-command
this-command
)
(
push-mark
nil
t
))
(
let
((
val
(
viper-p-val
arg
))
(
com
(
viper-getcom
arg
)))
(
if
com
(
viper-move-marker-locally
'viper-com-point
(
point
)))
...
...
@@ -3250,7 +3252,8 @@ controlled by the sign of prefix numeric value."
(
defun
viper-forward-paragraph
(
arg
)
"Forward paragraph."
(
interactive
"P"
)
(
push-mark
nil
t
)
(
or
(
eq
last-command
this-command
)
(
push-mark
nil
t
))
(
let
((
val
(
viper-p-val
arg
))
(
com
(
viper-getCom
arg
)))
(
if
com
(
viper-move-marker-locally
'viper-com-point
(
point
)))
...
...
@@ -3263,7 +3266,8 @@ controlled by the sign of prefix numeric value."
(
defun
viper-backward-paragraph
(
arg
)
"Backward paragraph."
(
interactive
"P"
)
(
push-mark
nil
t
)
(
or
(
eq
last-command
this-command
)
(
push-mark
nil
t
))
(
let
((
val
(
viper-p-val
arg
))
(
com
(
viper-getCom
arg
)))
(
if
com
(
viper-move-marker-locally
'viper-com-point
(
point
)))
...
...
@@ -3274,8 +3278,7 @@ controlled by the sign of prefix numeric value."
(
viper-execute-com
'viper-backward-paragraph
nil
com
)
(
backward-char
1
)))))
;; should be mode-specific etc.
;; should be mode-specific
(
defun
viper-prev-heading
(
arg
)
(
interactive
"P"
)
(
let
((
val
(
viper-p-val
arg
))
...
...
@@ -4288,13 +4291,10 @@ One can use `` and '' to temporarily jump 1 step back."
(
view-register
(
downcase
reg
)))
((
viper-valid-register
reg
'
(
digit
))
(
let
((
text
(
current-kill
(
-
reg
?1
)
'do-not-rotate
)))
(
save-excursion
(
set-buffer
(
get-buffer-create
"*Output*"
))
(
delete-region
(
point-min
)
(
point-max
))
(
insert
(
format
"Register %c contains the string:\n"
reg
))
(
insert
text
)
(
goto-char
(
point-min
)))
(
display-buffer
"*Output*"
)))
(
with-output-to-temp-buffer
" *viper-info*"
(
princ
(
format
"Register %c contains the string:\n"
reg
))
(
princ
text
))
))
((
=
?\]
reg
)
(
viper-next-heading
arg
))
(
t
(
error
...
...
@@ -4310,14 +4310,12 @@ One can use `` and '' to temporarily jump 1 step back."
(
viper-heading-end
arg
))
((
viper-valid-register
reg
'
(
letter
))
(
let*
((
val
(
get-register
(
1+
(
-
reg
?a
))))
(
buf
(
if
(
not
val
)
(
buf
(
if
(
not
(
markerp
val
)
)
(
error
viper-EmptyTextmarker
reg
)
(
marker-buffer
val
)))
(
pos
(
marker-position
val
))
line-no
text
(
s
pos
)
(
e
pos
))
(
save-excursion
(
set-buffer
(
get-buffer-create
"*Output*"
))
(
delete-region
(
point-min
)
(
point-max
))
(
with-output-to-temp-buffer
" *viper-info*"
(
if
(
and
buf
pos
)
(
progn
(
save-excursion
...
...
@@ -4339,15 +4337,14 @@ One can use `` and '' to temporarily jump 1 step back."
(
setq
text
(
format
"%s<%c>%s"
(
substring
text
0
(
-
pos
s
))
reg
(
substring
text
(
-
pos
s
)))))
(
insert
(
princ
(
format
"Textmarker `%c' is in buffer `%s' at line %d.\n"
reg
(
buffer-name
buf
)
line-no
))
(
insert
(
format
"Here is some text around %c:\n\n %s"
(
princ
(
format
"Here is some text around %c:\n\n %s"
reg
text
)))
(
insert
(
format
viper-EmptyTextmarker
reg
)))
(
goto-char
(
point-min
)))
(
display-buffer
"*Output*"
)))
(
princ
(
format
viper-EmptyTextmarker
reg
))))
))
(
t
(
error
viper-InvalidTextmarker
reg
)))))
...
...
lisp/emulation/viper-ex.el
View file @
8e41a31c
...
...
@@ -107,8 +107,10 @@
;; List of addresses passed to Ex command
(
defvar
ex-addresses
nil
)
;; It seems that this flag is used only for `#', `print', and `list', which
;; aren't implemented. Check later.
;; This flag is supposed to be set only by `#', `print', and `list',
;; none of which is implemented. So, it and the pices of the code it
;; controls are dead weight. We keep it just in case this might be
;; needed in the future.
(
defvar
ex-flag
nil
)
;; "buffer" where Ex commands keep deleted data.
...
...
@@ -1134,16 +1136,16 @@ reversed."
(
copy-region-as-kill
(
point
)
(
mark
t
)))
(
if
ex-flag
(
progn
(
with-output-to-temp-buffer
"*copy text*"
(
with-output-to-temp-buffer
"
*copy text*"
(
princ
(
if
(
or
del-flag
ex-g-flag
ex-g-variant
)
(
current-kill
0
)
(
buffer-substring
(
point
)
(
mark
t
)))))
(
condition-case
nil
(
progn
(
read-string
"[Hit return to con
tinue
] "
)
(
save-excursion
(
kill-buffer
"*copy text*"
)))
(
quit
(
save-excursion
(
kill-buffer
"*copy text*"
))
(
read-string
"[Hit return to con
firm
] "
)
(
save-excursion
(
kill-buffer
"
*copy text*"
)))
(
quit
(
save-excursion
(
kill-buffer
"
*copy text*"
))
(
signal
'quit
nil
))))))
(
if
(
=
address
0
)
(
goto-char
(
point-min
))
...
...
@@ -1172,7 +1174,7 @@ reversed."
(
with-output-to-temp-buffer
" *delete text*"
(
princ
(
buffer-substring
(
point
)
(
mark
t
))))
(
condition-case
nil
(
read-string
"[Hit return to con
tinue
] "
)
(
read-string
"[Hit return to con
firm
] "
)
(
quit
(
save-excursion
(
kill-buffer
" *delete text*"
))
(
error
""
)))
...
...
@@ -1349,14 +1351,14 @@ reversed."
(
if
ex-flag
;; show text to be joined and ask for confirmation
(
progn
(
with-output-to-temp-buffer
" *text*"
(
with-output-to-temp-buffer
" *
join
text*"
(
princ
(
buffer-substring
(
point
)
(
mark
t
))))
(
condition-case
nil
(
progn
(
read-string
"[Hit return to con
tinue
] "
)
(
read-string
"[Hit return to con
firm
] "
)
(
ex-line-subr
com
(
point
)
(
mark
t
)))
(
quit
(
ding
)))
(
save-excursion
(
kill-buffer
" *text*"
)))
(
save-excursion
(
kill-buffer
" *
join
text*"
)))
(
ex-line-subr
com
(
point
)
(
mark
t
)))
(
setq
point
(
point
)))
(
goto-char
(
1-
point
))
...
...
@@ -2115,10 +2117,9 @@ Please contact your system administrator. "
(
message
(
concat
file
" "
info
))
(
save-window-excursion
(
with-output-to-temp-buffer
" *viper-info*"
(
princ
(
concat
"\n"
file
"\n\n\t"
info
"\n\n\nPress any key to continue...\n\n"
)))
(
viper-read-event
)
(
princ
(
concat
"\n"
file
"\n\n\t"
info
"\n\n"
)))
(
let
((
inhibit-quit
t
))
(
viper-set-unread-command-events
(
viper-read-event
)))
(
kill-buffer
" *viper-info*"
)))
))
...
...
lisp/emulation/viper-init.el
View file @
8e41a31c
...
...
@@ -51,16 +51,17 @@
(
defun
viper-window-display-p
()
(
and
(
viper-device-type
)
(
not
(
memq
(
viper-device-type
)
'
(
tty
stream
pc
)))))
(
defcustom
viper-ms-style-os-p
(
memq
system-type
'
(
ms-dos
windows-nt
windows-95
))
(
defcustom
viper-ms-style-os-p
(
memq
system-type
'
(
ms-dos
windows-nt
windows-95
))
"Tells if Emacs is running under an MS-style OS: ms-dos, windows-nt, W95."
:type
'boolean
:tag
"Is it Microsoft-made OS?"
:group
'viper
)
:group
'viper
-misc
)
(
defcustom
viper-vms-os-p
(
memq
system-type
'
(
vax-vms
axp-vms
))
"Tells if Emacs is running under VMS."
:type
'boolean
:tag
"Is it VMS?"
:group
'viper
)
:group
'viper
-misc
)
(
defcustom
viper-force-faces
nil
"If t, Viper will think that it is running on a display that supports faces.
...
...
@@ -68,7 +69,7 @@ This is provided as a temporary relief for users of graphics-capable terminals
that Viper doesn't know about.
In all likelihood, you don't need to bother with this setting."
:type
'boolean
:group
'viper
)
:group
'viper
-highlighting
)
(
defun
viper-has-face-support-p
()
(
cond
((
viper-window-display-p
))
...
...
@@ -470,7 +471,7 @@ color displays. By default, the delimiters are used only on TTYs."
This is a list where Viper keeps the history of previously inserted pieces of
text."
:type
'integer
:group
'viper
)
:group
'viper
-misc
)
;; The insertion ring.
(
defvar
viper-insertion-ring
nil
)
;; This is temp insertion ring. Used to do rotation for display purposes.
...
...
@@ -481,7 +482,7 @@ text."
(
defcustom
viper-command-ring-size
14
"The size of history of Vi commands repeatable with dot."
:type
'integer
:group
'viper
)
:group
'viper
-misc
)
;; The command ring.
(
defvar
viper-command-ring
nil
)
;; This is temp command ring. Used to do rotation for display purposes.
...
...
@@ -494,7 +495,7 @@ text."
Setting this too high may slow down your typing. Setting this value too low
will make it hard to use Vi-stile timeout macros."
:type
'integer
:group
'viper
)
:group
'viper
-misc
)
(
defcustom
viper-ESC-keyseq-timeout
(
if
(
viper-window-display-p
)
0
viper-fast-keyseq-timeout
)
...
...
@@ -503,7 +504,7 @@ Setting this too high may slow down switching from insert to vi state. Setting
this value too low will make it impossible to use function keys in insert mode
on a dumb terminal."
:type
'integer
:group
'viper
)
:group
'viper
-misc
)
;; Modes and related variables
...
...
@@ -612,6 +613,11 @@ to a new place after repeating previous Vi command."
;;; Variables for Moves and Searches
(
defgroup
viper-search
nil
"Variables that define the search and query-replace behavior of Viper."
:prefix
"viper-"
:group
'viper
)
;; For use by `;' command.
(
defvar
viper-f-char
nil
)
...
...
@@ -638,13 +644,13 @@ to a new place after repeating previous Vi command."
(
defcustom
viper-case-fold-search
nil
"*If not nil, search ignores cases."
:type
'boolean
:group
'viper
)
:group
'viper
-search
)
(
defcustom
viper-re-search
t
"*If not nil, search is regexp search, otherwise vanilla search."
:type
'boolean
:tag
"Regexp Search"
:group
'viper
)
:group
'viper
-search
)
(
defcustom
viper-search-scroll-threshold
2
"*If search lands within this threshnold from the window top/bottom,
...
...
@@ -652,19 +658,19 @@ the window will be scrolled up or down appropriately, to reveal context.
If you want Viper search to behave as usual in Vi, set this variable to a
negative number."
:type
'boolean
:group
'viper
)
:group
'viper
-search
)
(
defcustom
viper-re-query-replace
t
"*If t then do regexp replace, if nil then do string replace."
:type
'boolean
:tag
"Regexp Query Replace"
:group
'viper
)
:group
'viper
-search
)
(
defcustom
viper-re-replace
t
"*If t, do regexp replace. nil means do string replace."
:type
'boolean
:tag
"Regexp Replace"
:group
'viper
)
:group
'viper
-search
)
(
defcustom
viper-parse-sexp-ignore-comments
t
"*If t, `%' ignores the parentheses that occur inside comments."
...
...
@@ -707,20 +713,20 @@ If nil, the cursor will move backwards without deleting anything."
(
defcustom
viper-buffer-search-char
nil
"*Key used for buffer-searching. Must be a character type, e.g., ?g."
:type
'
(
choice
(
const
nil
)
character
)
:group
'viper
)
:group
'viper
-search
)
(
defcustom
viper-search-wrap-around-t
t
"*If t, search wraps around."
:type
'boolean
:tag
"Search Wraps Around"
:group
'viper
)
:group
'viper
-search
)
(
viper-deflocalvar
viper-related-files-and-buffers-ring
nil
""
)
(
defcustom
viper-related-files-and-buffers-ring
nil
"*List of file and buffer names that are considered to be related to the current buffer.
Related buffers can be cycled through via :R and :P commands."
:type
'boolean
:group
'viper
)
:group
'viper
-misc
)
(
put
'viper-related-files-and-buffers-ring
'permanent-local
t
)
;; Used to find out if we are done with searching the current buffer.
...
...
@@ -826,7 +832,11 @@ Related buffers can be cycled through via :R and :P commands."
"*Face used to flash out the search pattern."
:group
'viper-highlighting
)
;; An internal variable. Viper takes the face from here.
(
defvar
viper-search-face
'viper-search-face
)
(
defvar
viper-search-face
'viper-search-face
"Face used to flash out the search pattern.
DO NOT CHANGE this variable. Instead, use the customization widget
to customize the actual face object `viper-search-face'
this variable represents."
)
(
viper-hide-face
'viper-search-face
)
;;(defvar viper-replace-overlay-face
...
...
@@ -852,7 +862,11 @@ Related buffers can be cycled through via :R and :P commands."
"*Face for highlighting replace regions on a window display."
:group
'viper-highlighting
)
;; An internal variable. Viper takes the face from here.
(
defvar
viper-replace-overlay-face
'viper-replace-overlay-face
)