diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-05-21 18:45:05 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-05-21 18:45:05 +0000 |
commit | e8a1ed310de6f0d7ad270c4a805d1b4f66dfa6ef (patch) | |
tree | d5478e2865d3cdfc9c23adb38c7d29cb7aacbc32 /lisp/diff-mode.el | |
parent | cb1fa3f52cd352571de47de705ec790e8775880a (diff) | |
download | emacs-e8a1ed310de6f0d7ad270c4a805d1b4f66dfa6ef.tar.gz emacs-e8a1ed310de6f0d7ad270c4a805d1b4f66dfa6ef.tar.bz2 emacs-e8a1ed310de6f0d7ad270c4a805d1b4f66dfa6ef.zip |
(diff-jump-to-old-file, diff-update-on-the-fly):
Renamed by removing the silly `-flag' suffix.
(diff-mode, diff-minor-mode, diff-find-source-location): Update.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index f83b5f78d46..f2498532ba6 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -69,13 +69,13 @@ :group 'tools :group 'diff) -(defcustom diff-jump-to-old-file-flag nil +(defcustom diff-jump-to-old-file nil "*Non-nil means `diff-goto-source' jumps to the old file. Else, it jumps to the new file." :group 'diff-mode :type '(boolean)) -(defcustom diff-update-on-the-fly-flag t +(defcustom diff-update-on-the-fly t "*Non-nil means hunk headers are kept up-to-date on-the-fly. When editing a diff file, the line numbers in the hunk headers need to be kept consistent with the actual diff. This can @@ -894,7 +894,7 @@ This mode runs `diff-mode-hook'. ;; setup change hooks (toggle-read-only t) - (if (not diff-update-on-the-fly-flag) + (if (not diff-update-on-the-fly) (add-hook 'write-contents-hooks 'diff-write-contents-hooks) (make-local-variable 'diff-unhandled-changes) (add-hook 'after-change-functions 'diff-after-change-function nil t) @@ -915,7 +915,7 @@ This mode runs `diff-mode-hook'. nil " Diff" nil ;; FIXME: setup font-lock ;; setup change hooks - (if (not diff-update-on-the-fly-flag) + (if (not diff-update-on-the-fly) (add-hook 'write-contents-hooks 'diff-write-contents-hooks) (make-local-variable 'diff-unhandled-changes) (add-hook 'after-change-functions 'diff-after-change-function nil t) @@ -1038,7 +1038,7 @@ If TEXT isn't found, nil is returned." (defun diff-find-source-location (&optional other-file reverse) "Find out (BUF LINE-OFFSET POS SRC DST SWITCHED)." (save-excursion - (let* ((other (diff-xor other-file diff-jump-to-old-file-flag)) + (let* ((other (diff-xor other-file diff-jump-to-old-file)) (char-offset (- (point) (progn (diff-beginning-of-hunk) (point)))) (hunk (buffer-substring (point) (save-excursion (diff-end-of-hunk) (point)))) @@ -1056,7 +1056,7 @@ If TEXT isn't found, nil is returned." (buf (find-file-noselect file))) ;; Update the user preference if he so wished. (when (> (prefix-numeric-value other-file) 8) - (setq diff-jump-to-old-file-flag other)) + (setq diff-jump-to-old-file other)) (with-current-buffer buf (goto-line (string-to-number line)) (let* ((orig-pos (point)) @@ -1084,7 +1084,7 @@ If TEXT isn't found, nil is returned." (defun diff-apply-hunk (&optional reverse) "Apply the current hunk to the source file and go to the next. By default, the new source file is patched, but if the variable -`diff-jump-to-old-file-flag' is non-nil, then the old source file is +`diff-jump-to-old-file' is non-nil, then the old source file is patched instead (some commands, such as `diff-goto-source' can change the value of this variable when given an appropriate prefix argument). @@ -1130,10 +1130,10 @@ With a prefix argument, try to REVERSE the hunk." (defun diff-goto-source (&optional other-file) "Jump to the corresponding source line. -`diff-jump-to-old-file-flag' (or its opposite if the OTHER-FILE prefix arg +`diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg is given) determines whether to jump to the old or the new file. If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) - then `diff-jump-to-old-file-flag' is also set, for the next invocations." + then `diff-jump-to-old-file' is also set, for the next invocations." (interactive "P") ;; When pointing at a removal line, we probably want to jump to ;; the old location, and else to the new (i.e. as if reverting). |