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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
8a946354
Commit
8a946354
authored
Nov 27, 2001
by
Sam Steingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted backquote to the new style.
parent
c6aedc92
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
848 additions
and
848 deletions
+848
-848
lisp/ChangeLog
lisp/ChangeLog
+10
-0
lisp/ansi-color.el
lisp/ansi-color.el
+14
-14
lisp/bookmark.el
lisp/bookmark.el
+20
-21
lisp/dired.el
lisp/dired.el
+20
-20
lisp/emacs-lisp/advice.el
lisp/emacs-lisp/advice.el
+254
-255
lisp/emacs-lisp/checkdoc.el
lisp/emacs-lisp/checkdoc.el
+12
-12
lisp/emacs-lisp/ewoc.el
lisp/emacs-lisp/ewoc.el
+8
-8
lisp/emerge.el
lisp/emerge.el
+122
-122
lisp/fast-lock.el
lisp/fast-lock.el
+45
-45
lisp/lazy-lock.el
lisp/lazy-lock.el
+21
-21
lisp/mail/feedmail.el
lisp/mail/feedmail.el
+10
-10
lisp/mouse-sel.el
lisp/mouse-sel.el
+59
-61
lisp/obsolete/c-mode.el
lisp/obsolete/c-mode.el
+83
-85
lisp/obsolete/cplus-md.el
lisp/obsolete/cplus-md.el
+83
-85
lisp/progmodes/dcl-mode.el
lisp/progmodes/dcl-mode.el
+5
-6
lisp/progmodes/idlw-shell.el
lisp/progmodes/idlw-shell.el
+28
-29
lisp/progmodes/idlwave.el
lisp/progmodes/idlwave.el
+16
-16
lisp/term/sun-mouse.el
lisp/term/sun-mouse.el
+26
-26
lisp/textmodes/artist.el
lisp/textmodes/artist.el
+12
-12
No files found.
lisp/ChangeLog
View file @
8a946354
2001-11-27 Sam Steingold <sds@gnu.org>
* ansi-color.el, bookmark.el, dired.el, emerge.el, fast-lock.el
* lazy-lock.el, mouse-sel.el, mail/feedmail.el
* emacs-lisp/advice.el, emacs-lisp/checkdoc.el, emacs-lisp/ewoc.el
* obsolete/c-mode.el, obsolete/cplus-md.el
* progmodes/dcl-mode.el, progmodes/idlw-shell.el, progmodes/idlwave.el
* term/sun-mouse.el, textmodes/artist.el:
Converted backquote to the new style.
2001-11-27 Richard M. Stallman <rms@gnu.org>
* cus-edit.el (custom-load-symbol): Don't always load locate-library.
...
...
lisp/ansi-color.el
View file @
8a946354
...
...
@@ -223,20 +223,20 @@ This is a good function to put in `comint-output-filter-functions'."
(
eval-when-compile
;; We use this to preserve or protect things when modifying text
;; properties. Stolen from lazy-lock and font-lock. Ugly!!!
;; Probably most of this is not needed?
(
defmacro
save-buffer-state
(
varlist
&rest
body
)
"Bind variables according to VARLIST and eval BODY restoring buffer state."
(
`
(
let*
((
,@
(
append
varlist
'
((
modified
(
buffer-modified-p
))
(
buffer-undo-list
t
)
(
inhibit-read-only
t
)
(
inhibit-point-motion-hooks
t
)
before-change-functions
after-change-functions
deactivate-mark
buffer-file-name
buffer-file-truename
)
)))
(
,@
body
)
(
when
(
and
(
not
modified
)
(
buffer-modified-p
))
(
set-buffer-modified-p
nil
)
))))
(
put
'save-buffer-state
'lisp-indent-function
1
))
;; We use this to preserve or protect things when modifying text
;; properties. Stolen from lazy-lock and font-lock. Ugly!!!
;; Probably most of this is not needed?
(
defmacro
save-buffer-state
(
varlist
&rest
body
)
"Bind variables according to VARLIST and eval BODY restoring buffer state."
`
(
let*
(
,@
(
append
varlist
'
((
modified
(
buffer-modified-p
))
(
buffer-undo-list
t
)
(
inhibit-read-only
t
)
(
inhibit-point-motion-hooks
t
)
before-change-functions
after-change-functions
deactivate-mark
buffer-file-name
buffer-file-truename
)))
,@
body
(
when
(
and
(
not
modified
)
(
buffer-modified-p
))
(
set-buffer-modified-p
nil
))))
(
put
'save-buffer-state
'lisp-indent-function
1
))
(
defun
ansi-color-unfontify-region
(
beg
end
&rest
xemacs-stuff
)
"Replacement function for `font-lock-default-unfontify-region'.
...
...
lisp/bookmark.el
View file @
8a946354
...
...
@@ -539,21 +539,20 @@ being set. This might change someday.
Optional second arg INFO-NODE means this bookmark is at info node
INFO-NODE, so record this fact in the bookmark's entry."
(
let
((
the-record
(
`
((
filename
.
(
,
(
bookmark-buffer-file-name
)))
(
front-context-string
.
(
,
(
if
(
>=
(
-
(
point-max
)
(
point
))
bookmark-search-size
)
(
buffer-substring-no-properties
(
point
)
(
+
(
point
)
bookmark-search-size
))
nil
)))
(
rear-context-string
.
(
,
(
if
(
>=
(
-
(
point
)
(
point-min
))
bookmark-search-size
)
(
buffer-substring-no-properties
(
point
)
(
-
(
point
)
bookmark-search-size
))
nil
)))
(
position
.
(
,
(
point
)))
))))
`
((
filename
.
,
(
bookmark-buffer-file-name
))
(
front-context-string
.
,
(
if
(
>=
(
-
(
point-max
)
(
point
))
bookmark-search-size
)
(
buffer-substring-no-properties
(
point
)
(
+
(
point
)
bookmark-search-size
))
nil
))
(
rear-context-string
.
,
(
if
(
>=
(
-
(
point
)
(
point-min
))
bookmark-search-size
)
(
buffer-substring-no-properties
(
point
)
(
-
(
point
)
bookmark-search-size
))
nil
))
(
position
.
,
(
point
)))))
;; Now fill in the optional parts:
...
...
@@ -661,11 +660,11 @@ affect point."
(
ann
(
nth
4
record
)))
(
list
name
(
`
((
filename
.
(
,
filename
)
)
(
front-context-string
.
(
,
(
or
front-str
""
)
))
(
rear-context-string
.
(
,
(
or
rear-str
""
)
))
(
position
.
(
,
position
)
)
(
annotation
.
(
,
ann
))
)))))
`
((
filename
.
,
filename
)
(
front-context-string
.
,
(
or
front-str
""
))
(
rear-context-string
.
,
(
or
rear-str
""
))
(
position
.
,
position
)
(
annotation
.
,
ann
)))))
old-list
))
...
...
@@ -1347,7 +1346,7 @@ for a file, defaulting to the file defined by variable
(
set-buffer
(
let
((
enable-local-variables
nil
))
(
find-file-noselect
file
)))
(
goto-char
(
point-min
))
(
let
((
print-length
nil
)
(
let
((
print-length
nil
)
(
print-level
nil
))
(
delete-region
(
point-min
)
(
point-max
))
(
bookmark-insert-file-format-version-stamp
)
...
...
lisp/dired.el
View file @
8a946354
...
...
@@ -317,26 +317,26 @@ Subexpression 2 must end right before the \\n or \\r.")
;; It should end with a noun that can be pluralized by adding `s'.
;; Return value is the number of files marked, or nil if none were marked.
(
defmacro
dired-mark-if
(
predicate
msg
)
(
`
(
let
(
buffer-read-only
count
)
(
save-excursion
(
setq
count
0
)
(
if
(
,
msg
)
(
message
"Marking %ss..."
(
,
msg
)
))
(
goto-char
(
point-min
))
(
while
(
not
(
eobp
))
(
if
(
,
predicate
)
(
progn
(
delete-char
1
)
(
insert
dired-marker-char
)
(
setq
count
(
1+
count
))))
(
forward-line
1
))
(
if
(
,
msg
)
(
message
"%s %s%s %s%s."
count
(
,
msg
)
(
dired-plural-s
count
)
(
if
(
eq
dired-marker-char
?\040
)
"un"
""
)
(
if
(
eq
dired-marker-char
dired-del-marker
)
"flagged"
"marked"
))))
(
and
(
>
count
0
)
count
)
)))
`
(
let
(
buffer-read-only
count
)
(
save-excursion
(
setq
count
0
)
(
if
,
msg
(
message
"Marking %ss..."
,
msg
))
(
goto-char
(
point-min
))
(
while
(
not
(
eobp
))
(
if
,
predicate
(
progn
(
delete-char
1
)
(
insert
dired-marker-char
)
(
setq
count
(
1+
count
))))
(
forward-line
1
))
(
if
,
msg
(
message
"%s %s%s %s%s."
count
,
msg
(
dired-plural-s
count
)
(
if
(
eq
dired-marker-char
?\040
)
"un"
""
)
(
if
(
eq
dired-marker-char
dired-del-marker
)
"flagged"
"marked"
))))
(
and
(
>
count
0
)
count
)))
(
defmacro
dired-map-over-marks
(
body
arg
&optional
show-progress
)
"Eval BODY with point on each marked line. Return a list of BODY's results.
...
...
lisp/emacs-lisp/advice.el
View file @
8a946354
This diff is collapsed.
Click to expand it.
lisp/emacs-lisp/checkdoc.el
View file @
8a946354
...
...
@@ -176,18 +176,18 @@
;; From custom web page for compatibility between versions of custom:
(
eval-and-compile
(
condition-case
()
(
require
'custom
)
(
error
nil
))
(
if
(
and
(
featurep
'custom
)
(
fboundp
'custom-declare-variable
))
nil
;; We've got what we needed
;; We have the old custom-library, hack around it!
(
defmacro
defgroup
(
&rest
args
)
nil
)
(
defmacro
custom-add-option
(
&rest
args
)
nil
)
(
defmacro
defcustom
(
var
value
doc
&rest
args
)
(
`
(
defvar
(
,
var
)
(
,
value
)
(
,
doc
))
))))
(
condition-case
()
(
require
'custom
)
(
error
nil
))
(
if
(
and
(
featurep
'custom
)
(
fboundp
'custom-declare-variable
))
nil
;; We've got what we needed
;; We have the old custom-library, hack around it!
(
defmacro
defgroup
(
&rest
args
)
nil
)
(
defmacro
custom-add-option
(
&rest
args
)
nil
)
(
defmacro
defcustom
(
var
value
doc
&rest
args
)
`
(
defvar
,
var
,
value
,
doc
))))
(
defcustom
checkdoc-autofix-flag
'semiautomatic
"*Non-nil means attempt auto-fixing of doc strings.
...
...
lisp/emacs-lisp/ewoc.el
View file @
8a946354
...
...
@@ -219,14 +219,14 @@ buffer will *not* have been changed.
Return value of last form in FORMS."
(
let
((
old-buffer
(
make-symbol
"old-buffer"
))
(
hnd
(
make-symbol
"ewoc"
)))
(
`
(
let*
(((
,
old-buffer
)
(
current-buffer
))
((
,
hnd
)
(
,
ewoc
)
)
(
dll
(
ewoc--dll
(
,
hnd
)
))
(
,@
varlist
)
)
(
set-buffer
(
ewoc--buffer
(
,
hnd
)
))
(
unwind-protect
(
progn
(
,@
forms
)
)
(
set-buffer
(
,
old-buffer
))
)))))
`
(
let*
((
,
old-buffer
(
current-buffer
))
(
,
hnd
,
ewoc
)
(
dll
(
ewoc--dll
,
hnd
))
,@
varlist
)
(
set-buffer
(
ewoc--buffer
,
hnd
))
(
unwind-protect
(
progn
,@
forms
)
(
set-buffer
,
old-buffer
)))))
(
defmacro
ewoc--set-buffer-bind-dll
(
ewoc
&rest
forms
)
`
(
ewoc--set-buffer-bind-dll-let*
,
ewoc
nil
,@
forms
))
...
...
lisp/emerge.el
View file @
8a946354
...
...
@@ -57,12 +57,12 @@
(
defmacro
emerge-eval-in-buffer
(
buffer
&rest
forms
)
"Macro to switch to BUFFER, evaluate FORMS, returns to original buffer.
Differs from `save-excursion' in that it doesn't save the point and mark."
(
`
(
let
((
StartBuffer
(
current-buffer
)))
`
(
let
((
StartBuffer
(
current-buffer
)))
(
unwind-protect
(
progn
(
set-buffer
(
,
buffer
)
)
(
,@
forms
)
)
(
set-buffer
StartBuffer
))))
)
(
progn
(
set-buffer
,
buffer
)
,@
forms
)
(
set-buffer
StartBuffer
))))
(
defmacro
emerge-defvar-local
(
var
value
doc
)
"Defines SYMBOL as an advertised variable.
...
...
@@ -70,10 +70,10 @@ Performs a defvar, then executes `make-variable-buffer-local' on
the variable. Also sets the `preserved' property, so that
`kill-all-local-variables' (called by major-mode setting commands)
won't destroy Emerge control variables."
(
`
(
progn
(
defvar
(
,
var
)
(
,
value
)
(
,
doc
)
)
(
make-variable-buffer-local
'
(
,
var
)
)
(
put
'
(
,
var
)
'preserved
t
)
)))
`
(
progn
(
defvar
,
var
,
value
,
doc
)
(
make-variable-buffer-local
',var
)
(
put
',var
'preserved
t
)))
;; Add entries to minor-mode-alist so that emerge modes show correctly
(
defvar
emerge-minor-modes-list
...
...
@@ -567,7 +567,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
;;; Setup functions for two-file mode.
(
defun
emerge-files-internal
(
file-A
file-B
&optional
startup-hooks
quit-hooks
output-file
)
output-file
)
(
if
(
not
(
file-readable-p
file-A
))
(
error
"File `%s' does not exist or is not readable"
file-A
))
(
if
(
not
(
file-readable-p
file-B
))
...
...
@@ -587,10 +587,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
if
temp
(
setq
file-A
temp
startup-hooks
(
cons
(
`
(
lambda
()
(
delete-file
(
,
file-A
))
))
(
cons
`
(
lambda
()
(
delete-file
,
file-A
))
startup-hooks
))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
(
emerge-eval-in-buffer
buffer-B
(
widen
)
...
...
@@ -598,10 +598,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
if
temp
(
setq
file-B
temp
startup-hooks
(
cons
(
`
(
lambda
()
(
delete-file
(
,
file-B
))
))
(
cons
`
(
lambda
()
(
delete-file
,
file-B
))
startup-hooks
))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
(
emerge-setup
buffer-A
file-A
buffer-B
file-B
startup-hooks
quit-hooks
output-file
)))
...
...
@@ -741,10 +741,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
if
temp
(
setq
file-A
temp
startup-hooks
(
cons
(
`
(
lambda
()
(
delete-file
(
,
file-A
))
))
(
cons
`
(
lambda
()
(
delete-file
,
file-A
))
startup-hooks
))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
(
emerge-eval-in-buffer
buffer-B
(
widen
)
...
...
@@ -752,10 +752,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
if
temp
(
setq
file-B
temp
startup-hooks
(
cons
(
`
(
lambda
()
(
delete-file
(
,
file-B
))
))
(
cons
`
(
lambda
()
(
delete-file
,
file-B
))
startup-hooks
))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
(
emerge-eval-in-buffer
buffer-ancestor
(
widen
)
...
...
@@ -763,10 +763,10 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
if
temp
(
setq
file-ancestor
temp
startup-hooks
(
cons
(
`
(
lambda
()
(
delete-file
(
,
file-ancestor
))
))
(
cons
`
(
lambda
()
(
delete-file
,
file-ancestor
))
startup-hooks
))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
;; Verify that the file matches the buffer
(
emerge-verify-file-buffer
))))
(
emerge-setup-with-ancestor
buffer-A
file-A
buffer-B
file-B
buffer-ancestor
file-ancestor
startup-hooks
quit-hooks
output-file
)))
...
...
@@ -901,7 +901,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
emerge-read-file-name
"Output file"
emerge-last-dir-output
f
f
nil
)))))
(
if
file-out
(
add-hook
'quit-hooks
(
`
(
lambda
()
(
emerge-files-exit
(
,
file-out
))
))))
(
add-hook
'quit-hooks
`
(
lambda
()
(
emerge-files-exit
,
file-out
))))
(
emerge-files-internal
file-A
file-B
startup-hooks
quit-hooks
...
...
@@ -923,7 +923,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
emerge-read-file-name
"Output file"
emerge-last-dir-output
f
f
nil
)))))
(
if
file-out
(
add-hook
'quit-hooks
(
`
(
lambda
()
(
emerge-files-exit
(
,
file-out
))
))))
(
add-hook
'quit-hooks
`
(
lambda
()
(
emerge-files-exit
,
file-out
))))
(
emerge-files-with-ancestor-internal
file-A
file-B
file-ancestor
startup-hooks
quit-hooks
...
...
@@ -951,17 +951,17 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
write-region
(
point-min
)
(
point-max
)
emerge-file-B
nil
'no-message
))
(
emerge-setup
(
get-buffer
buffer-A
)
emerge-file-A
(
get-buffer
buffer-B
)
emerge-file-B
(
cons
(
`
(
lambda
()
(
delete-file
(
,
emerge-file-A
)
)
(
delete-file
(
,
emerge-file-B
))
))
(
cons
`
(
lambda
()
(
delete-file
,
emerge-file-A
)
(
delete-file
,
emerge-file-B
))
startup-hooks
)
quit-hooks
nil
)))
;;;###autoload
(
defun
emerge-buffers-with-ancestor
(
buffer-A
buffer-B
buffer-ancestor
&optional
startup-hooks
quit-hooks
)
&optional
startup-hooks
quit-hooks
)
"Run Emerge on two buffers, giving another buffer as the ancestor."
(
interactive
"bBuffer A to merge: \nbBuffer B to merge: \nbAncestor buffer: "
)
...
...
@@ -982,11 +982,11 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
get-buffer
buffer-B
)
emerge-file-B
(
get-buffer
buffer-ancestor
)
emerge-file-ancestor
(
cons
(
`
(
lambda
()
(
delete-file
(
,
emerge-file-A
)
)
(
delete-file
(
,
emerge-file-B
)
)
(
delete-file
(
,
emerge-file-ancestor
))
))
(
cons
`
(
lambda
()
(
delete-file
,
emerge-file-A
)
(
delete-file
,
emerge-file-B
)
(
delete-file
,
emerge-file-ancestor
))
startup-hooks
)
quit-hooks
nil
)))
...
...
@@ -1001,7 +1001,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
setq
command-line-args-left
(
nthcdr
3
command-line-args-left
))
(
emerge-files-internal
file-a
file-b
nil
(
list
(
`
(
lambda
()
(
emerge-command-exit
(
,
file-out
))
))))))
(
list
`
(
lambda
()
(
emerge-command-exit
,
file-out
))))))
;;;###autoload
(
defun
emerge-files-with-ancestor-command
()
...
...
@@ -1015,15 +1015,15 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
setq
file-anc
(
nth
1
command-line-args-left
))
(
setq
file-out
(
nth
4
command-line-args-left
))
(
setq
command-line-args-left
(
nthcdr
5
command-line-args-left
)))
;; arguments are "file-a file-b ancestor file-out"
(
setq
file-a
(
nth
0
command-line-args-left
))
(
setq
file-b
(
nth
1
command-line-args-left
))
(
setq
file-anc
(
nth
2
command-line-args-left
))
(
setq
file-out
(
nth
3
command-line-args-left
))
(
setq
command-line-args-left
(
nthcdr
4
command-line-args-left
)))
;; arguments are "file-a file-b ancestor file-out"
(
setq
file-a
(
nth
0
command-line-args-left
))
(
setq
file-b
(
nth
1
command-line-args-left
))
(
setq
file-anc
(
nth
2
command-line-args-left
))
(
setq
file-out
(
nth
3
command-line-args-left
))
(
setq
command-line-args-left
(
nthcdr
4
command-line-args-left
)))
(
emerge-files-with-ancestor-internal
file-a
file-b
file-anc
nil
(
list
(
`
(
lambda
()
(
emerge-command-exit
(
,
file-out
))
))))))
(
list
`
(
lambda
()
(
emerge-command-exit
,
file-out
))))))
(
defun
emerge-command-exit
(
file-out
)
(
emerge-write-and-delete
file-out
)
...
...
@@ -1036,7 +1036,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
setq
emerge-file-out
file-out
)
(
emerge-files-internal
file-a
file-b
nil
(
list
(
`
(
lambda
()
(
emerge-remote-exit
(
,
file-out
)
'
(
,
emerge-exit-func
))
)))
(
list
`
(
lambda
()
(
emerge-remote-exit
,
file-out
',emerge-exit-func
)))
file-out
)
(
throw
'client-wait
nil
))
...
...
@@ -1045,7 +1045,7 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
setq
emerge-file-out
file-out
)
(
emerge-files-with-ancestor-internal
file-a
file-b
file-anc
nil
(
list
(
`
(
lambda
()
(
emerge-remote-exit
(
,
file-out
)
'
(
,
emerge-exit-func
))
)))
(
list
`
(
lambda
()
(
emerge-remote-exit
,
file-out
',emerge-exit-func
)))
file-out
)
(
throw
'client-wait
nil
))
...
...
@@ -1070,17 +1070,17 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
emerge-revisions-internal
file
revision-A
revision-B
startup-hooks
(
if
arg
(
cons
(
`
(
lambda
()
(
shell-command
(
,
(
format
"%s %s"
emerge-rcs-ci-program
file
))
)))
(
cons
`
(
lambda
()
(
shell-command
,
(
format
"%s %s"
emerge-rcs-ci-program
file
)))
quit-hooks
)
quit-hooks
)))
quit-hooks
)))
;;;###autoload
(
defun
emerge-revisions-with-ancestor
(
arg
file
revision-A
revision-B
ancestor
&optional
startup-hooks
quit-hooks
)
revision-B
ancestor
&optional
startup-hooks
quit-hooks
)
"Emerge two RCS revisions of a file, with another revision as ancestor."
(
interactive
(
list
current-prefix-arg
...
...
@@ -1095,14 +1095,14 @@ This is *not* a user option, since Emerge uses it for its own processing.")
file
revision-A
revision-B
ancestor
startup-hooks
(
if
arg
(
let
((
cmd
))
(
cons
(
`
(
lambda
()
(
shell-command
(
,
(
format
"%s %s"
emerge-rcs-ci-program
file
))
)))
(
cons
`
(
lambda
()
(
shell-command
,
(
format
"%s %s"
emerge-rcs-ci-program
file
)))
quit-hooks
))
quit-hooks
)))
quit-hooks
)))
(
defun
emerge-revisions-internal
(
file
revision-A
revision-B
&optional
startup-hooks
quit-hooks
output-file
)
startup-hooks
quit-hooks
output-file
)
(
let
((
buffer-A
(
get-buffer-create
(
format
"%s,%s"
file
revision-A
)))
(
buffer-B
(
get-buffer-create
(
format
"%s,%s"
file
revision-B
)))
(
emerge-file-A
(
emerge-make-temp-file
"A"
))
...
...
@@ -1127,18 +1127,18 @@ This is *not* a user option, since Emerge uses it for its own processing.")
;; Do the merge
(
emerge-setup
buffer-A
emerge-file-A
buffer-B
emerge-file-B
(
cons
(
`
(
lambda
()
(
delete-file
(
,
emerge-file-A
)
)
(
delete-file
(
,
emerge-file-B
))
))
(
cons
`
(
lambda
()
(
delete-file
,
emerge-file-A
)
(
delete-file
,
emerge-file-B
))
startup-hooks
)
(
cons
(
`
(
lambda
()
(
emerge-files-exit
(
,
file
))
))
(
cons
`
(
lambda
()
(
emerge-files-exit
,
file
))
quit-hooks
)
nil
)))
(
defun
emerge-revision-with-ancestor-internal
(
file
revision-A
revision-B
ancestor
&optional
startup-hooks
quit-hooks
output-file
)
ancestor
&optional
startup-hooks
quit-hooks
output-file
)
(
let
((
buffer-A
(
get-buffer-create
(
format
"%s,%s"
file
revision-A
)))
(
buffer-B
(
get-buffer-create
(
format
"%s,%s"
file
revision-B
)))
(
buffer-ancestor
(
get-buffer-create
(
format
"%s,%s"
file
ancestor
)))
...
...
@@ -1175,12 +1175,12 @@ This is *not* a user option, since Emerge uses it for its own processing.")
(
emerge-setup-with-ancestor
buffer-A
emerge-file-A
buffer-B
emerge-file-B
buffer-ancestor
emerge-ancestor
(
cons
(
`
(
lambda
()
(
delete-file
(
,
emerge-file-A
)
)
(
delete-file
(
,
emerge-file-B
)
)
(
delete-file
(
,
emerge-ancestor
))
))
(
cons
`
(
lambda
()
(
delete-file
,
emerge-file-A
)
(
delete-file
,
emerge-file-B
)
(
delete-file
,
emerge-ancestor
))
startup-hooks
)
(
cons
(
`
(
lambda
()
(
emerge-files-exit
(
,
file
))
))
(
cons
`
(
lambda
()
(
emerge-files-exit
,
file
))
quit-hooks
)
output-file
)))
...
...
@@ -1225,26 +1225,26 @@ Otherwise, the A or B file present is copied to the output file."
(
goto-char
(
match-end
0
))
;; Store the filename in the right variable
(
cond
((
string-equal
tag
"a"
)
(
if
file-A
(
error
"This line has two `A' entries"
))
(
setq
file-A
file
))
((
string-equal
tag
"b"
)
(
if
file-B
(
error
"This line has two `B' entries"
))
(
setq
file-B
file
))
((
or
(
string-equal
tag
"anc"
)
(
string-equal
tag
"ancestor"
))
(
if
file-ancestor
(
error
"This line has two `ancestor' entries"
))
(
setq
file-ancestor
file
))
((
or
(
string-equal
tag
"out"
)
(
string-equal
tag
"output"
))
(
if
file-out
(
error
"This line has two `output' entries"
))
(
setq
file-out
file
))
(
t
(
error
"Unrecognized entry"
))))
;; If the match on the entry pattern failed
(
error
"Unparsable entry"
)))
((
string-equal
tag
"a"
)
(
if
file-A
(
error
"This line has two `A' entries"
))
(
setq
file-A
file
))
((
string-equal
tag
"b"
)
(
if
file-B
(
error
"This line has two `B' entries"
))
(
setq
file-B
file
))
((
or
(
string-equal
tag
"anc"
)
(
string-equal
tag
"ancestor"
))
(
if
file-ancestor
(
error
"This line has two `ancestor' entries"
))
(
setq
file-ancestor
file
))
((
or
(
string-equal
tag
"out"
)
(
string-equal
tag
"output"
))
(
if
file-out
(
error
"This line has two `output' entries"
))
(
setq
file-out
file
))
(
t
(
error
"Unrecognized entry"
))))
;; If the match on the entry pattern failed
(
error
"Unparsable entry"
)))
;; Make sure that file-A and file-B are present
(
if
(
not
(
or
(
and
file-A
file-B
)
file-out
))
(
error
"Must have both `A' and `B' entries"
))
...
...
@@ -1255,37 +1255,37 @@ Otherwise, the A or B file present is copied to the output file."
(
beginning-of-line
2
)
;; Execute the correct command
(
cond
;; Merge of two files with ancestor
((
and
file-A
file-B
file-ancestor
)
(
message
"Merging %s and %s..."
file-A
file-B
)
(
emerge-files-with-ancestor
(
not
(
not
file-out
))
file-A
file-B
file-ancestor
file-out
nil
;; When done, return to this buffer.
(
list
(
`
(
lambda
()
(
switch-to-buffer
(
,
(
current-buffer
)
))
(
message
"Merge done."
)
)))))
;; Merge of two files without ancestor
((
and
file-A
file-B
)
(
message
"Merging %s and %s..."
file-A
file-B
)
(
emerge-files
(
not
(
not
file-out
))
file-A
file-B
file-out
nil
;; When done, return to this buffer.
(
list
(
`
(
lambda
()
(
switch-to-buffer
(
,
(
current-buffer
)
))
(
message
"Merge done."
)
)))))
;; There is an output file (or there would have been an error above),
;; but only one input file.
;; The file appears to have been deleted in one version; do nothing.
((
and
file-ancestor
emerge-execute-line-deletions
)
(
message
"No action."
))
;; The file should be copied from the version that contains it
(
t
(
let
((
input-file
(
or
file-A
file-B
)))
(
message
"Copying..."
)
(
copy-file
input-file
file-out
)
(
message
"%s copied to %s."
input-file
file-out
))))))
;; Merge of two files with ancestor
((
and
file-A
file-B
file-ancestor
)
(
message
"Merging %s and %s..."
file-A
file-B
)
(
emerge-files-with-ancestor
(
not
(
not
file-out
))
file-A
file-B
file-ancestor
file-out
nil
;; When done, return to this buffer.
(
list
`
(
lambda
()
(
switch-to-buffer
,
(
current-buffer
))
(
message
"Merge done."
)))))
;; Merge of two files without ancestor
((
and
file-A
file-B
)
(
message
"Merging %s and %s..."
file-A
file-B
)
(
emerge-files
(
not
(
not
file-out
))
file-A
file-B
file-out
nil
;; When done, return to this buffer.