;;; The author has placed this file in the public domain.
-;; Author: Dale R. Worley <drw@math.mit.edu>
+;; Author: Dale R. Worley <worley@world.std.com>
;; Version: 5fsf
;; Keywords: unix, tools
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-merge-directories]
- '("Merge Directories ..." . emerge-merge-directories))
+ '("Merge Directories..." . emerge-merge-directories))
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-revisions-with-ancestor]
- '("Revisions with Ancestor ..." . emerge-revisions-with-ancestor))
+ '("Revisions with Ancestor..." . emerge-revisions-with-ancestor))
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-revisions]
- '("Revisions ..." . emerge-revisions))
+ '("Revisions..." . emerge-revisions))
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-files-with-ancestor]
- '("Files with Ancestor ..." . emerge-files-with-ancestor))
+ '("Files with Ancestor..." . emerge-files-with-ancestor))
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-files]
- '("Files ..." . emerge-files))
+ '("Files..." . emerge-files))
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-buffers-with-ancestor]
- '("Buffers with Ancestor ..." . emerge-buffers-with-ancestor))
+ '("Buffers with Ancestor..." . emerge-buffers-with-ancestor))
;;;###autoload
(define-key menu-bar-emerge-menu [emerge-buffers]
- '("Buffers ..." . emerge-buffers))
+ '("Buffers..." . emerge-buffers))
;;; Macros
"*Mode for Emerge temporary files.")
(defvar emerge-combine-versions-template
- "#ifdef NEW\n%b#else /* NEW */\n%a#endif /* NEW */\n"
+ "#ifdef NEW\n%b#else /* not NEW */\n%a#endif /* not NEW */\n"
"*Template for `emerge-combine-versions' to combine the two versions.
The template is inserted as a string, with the following interpolations:
%a the A version of the difference
(and current-prefix-arg
(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))))))
(emerge-files-internal
file-A file-B startup-hooks
- (if file-out
- (cons (` (lambda () (emerge-files-exit (, file-out))))
- quit-hooks)
- quit-hooks)
+ quit-hooks
file-out))
;;;###autoload
(and current-prefix-arg
(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))))))
(emerge-files-with-ancestor-internal
file-A file-B file-ancestor startup-hooks
- (if file-out
- (cons (` (lambda () (emerge-files-exit (, file-out))))
- quit-hooks)
- quit-hooks)
+ quit-hooks
file-out))
;; Write the merge buffer out in place of the file the A buffer is visiting.
;; If there are min-lines lines above and below the region, then don't do
;; anything.
;; If not, recenter the region to make it so.
-;; If that isn't possible, remove context lines balancedly from top and botton
+;; If that isn't possible, remove context lines balancedly from top and bottom
;; so the entire region shows.
;; If that isn't possible, show the top of the region.
;; BEG must be at the beginning of a line.
(setq emerge-fast-mode t)
(setq emerge-edit-mode nil)
(message "Fast mode set")
- ;; force mode line redisplay
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
(defun emerge-edit-mode ()
"Set edit mode, for Emerge.
(setq emerge-fast-mode nil)
(setq emerge-edit-mode t)
(message "Edit mode set")
- ;; force mode line redisplay
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
(defun emerge-auto-advance (arg)
"Toggle Auto-Advance mode, for Emerge.
(message (if emerge-auto-advance
"Auto-advance set"
"Auto-advance cleared"))
- ;; force mode line redisplay
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
(defun emerge-skip-prefers (arg)
"Toggle Skip-Prefers mode, for Emerge.
(message (if emerge-skip-prefers
"Skip-prefers set"
"Skip-prefers cleared"))
- ;; force mode line redisplay
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
(defun emerge-copy-as-kill-A ()
"Put the A variant of this difference in the kill ring."
(prefer-B . " - B*")
(combined . " - comb"))))
""))))
- ;; Force mode-line redisplay
- (set-buffer-modified-p (buffer-modified-p)))
+ (force-mode-line-update))
;; compare two regions in two buffers for containing the same text
(defun emerge-compare-buffers (buffer-x x-begin x-end buffer-y y-begin y-end)
;; a list of variables. The argument is a list of symbols (the names of
;; the variables). A list element can also be a list of two functions,
;; the first of which (when called with no arguments) gets the value, and
-;; the second (when called with a value as an argment) sets the value.
+;; the second (when called with a value as an argument) sets the value.
;; A "function" is anything that funcall can handle as an argument.
(defun emerge-save-variables (vars)