aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/diff-mode.el14
-rw-r--r--lisp/smerge-mode.el9
4 files changed, 22 insertions, 15 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 859a37b0c8f..a507af05777 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -579,7 +579,7 @@ set a variable's `safe-local-variable' and `risky-local-variable' property.
579 579
580*** diff-refine-hunk highlights word-level details of changes in a diff hunk. 580*** diff-refine-hunk highlights word-level details of changes in a diff hunk.
581It's used automatically as you move through hunks, see 581It's used automatically as you move through hunks, see
582diff-auto-refine. It is bound to `C-c C-b'. 582diff-auto-refine-mode. It is bound to `C-c C-b'.
583 583
584*** diff-add-change-log-entries-other-window iterates through the diff 584*** diff-add-change-log-entries-other-window iterates through the diff
585buffer and tries to create ChangeLog entries for each change. 585buffer and tries to create ChangeLog entries for each change.
@@ -784,7 +784,8 @@ It is used to configure wireless interfaces.
784*** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs. 784*** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs.
785 785
786*** smerge-refine highlights word-level details of changes in conflict. 786*** smerge-refine highlights word-level details of changes in conflict.
787It's used automatically as you move through conflicts, see smerge-auto-refine. 787It's used automatically as you move through conflicts, see
788smerge-auto-refine-mode.
788 789
789*** talk.el has been extended for multiple tty support. 790*** talk.el has been extended for multiple tty support.
790 791
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f3f2bb12e5d..59760e276c3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12008-07-21 Thien-Thi Nguyen <ttn@gnuvola.org>
2
3 * diff-mode.el (diff-auto-refine): Delete defcustom.
4 (diff-auto-refine-mode): New func/var via define-minor-mode.
5 Update var ref to use diff-auto-refine-mode.
6 * smerge-mode.el (diff-mode): Require when compiling.
7 (smerge-auto-refine): Delete defcustom.
8 Update smerge-auto-refine ref to use diff-auto-refine-mode.
9
12008-07-21 Chong Yidong <cyd@stupidchicken.com> 102008-07-21 Chong Yidong <cyd@stupidchicken.com>
2 11
3 * simple.el (visual-line): New custom group. 12 * simple.el (visual-line): New custom group.
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 864d74b4e30..da1cd30198f 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -91,11 +91,6 @@ when editing big diffs)."
91 :type 'boolean 91 :type 'boolean
92 :group 'diff-mode) 92 :group 'diff-mode)
93 93
94(defcustom diff-auto-refine t
95 "Automatically highlight changes in detail as the user visits hunks."
96 :type 'boolean
97 :group 'diff-mode)
98
99(defcustom diff-mode-hook nil 94(defcustom diff-mode-hook nil
100 "Run after setting up the `diff-mode' major mode." 95 "Run after setting up the `diff-mode' major mode."
101 :type 'hook 96 :type 'hook
@@ -220,6 +215,13 @@ when editing big diffs)."
220 `((,diff-minor-mode-prefix . ,diff-mode-shared-map)) 215 `((,diff-minor-mode-prefix . ,diff-mode-shared-map))
221 "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.") 216 "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.")
222 217
218(define-minor-mode diff-auto-refine-mode
219 "Automatically highlight changes in detail as the user visits hunks.
220When transitioning from disabled to enabled,
221try to refine the current hunk, as well."
222 :group 'diff-mode :init-value t :lighter " Auto-Refine"
223 (when diff-auto-refine-mode
224 (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
223 225
224;;;; 226;;;;
225;;;; font-lock support 227;;;; font-lock support
@@ -528,7 +530,7 @@ but in the file header instead, in which case move forward to the first hunk."
528;; Define diff-{hunk,file}-{prev,next} 530;; Define diff-{hunk,file}-{prev,next}
529(easy-mmode-define-navigation 531(easy-mmode-define-navigation
530 diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view 532 diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
531 (if diff-auto-refine 533 (if diff-auto-refine-mode
532 (condition-case-no-debug nil (diff-refine-hunk) (error nil)))) 534 (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
533 535
534(easy-mmode-define-navigation 536(easy-mmode-define-navigation
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el
index 6489133e127..169f5008269 100644
--- a/lisp/smerge-mode.el
+++ b/lisp/smerge-mode.el
@@ -44,7 +44,7 @@
44 44
45;;; Code: 45;;; Code:
46 46
47(eval-when-compile (require 'cl)) 47(eval-when-compile (require 'cl) (require 'diff-mode))
48 48
49 49
50;;; The real definition comes later. 50;;; The real definition comes later.
@@ -77,11 +77,6 @@ Used in `smerge-diff-base-mine' and related functions."
77 :group 'smerge 77 :group 'smerge
78 :type 'boolean) 78 :type 'boolean)
79 79
80(defcustom smerge-auto-refine t
81 "Automatically highlight changes in detail as the user visits conflicts."
82 :group 'smerge
83 :type 'boolean)
84
85(defface smerge-mine 80(defface smerge-mine
86 '((((min-colors 88) (background light)) 81 '((((min-colors 88) (background light))
87 (:foreground "blue1")) 82 (:foreground "blue1"))
@@ -259,7 +254,7 @@ Can be nil if the style is undecided, or else:
259 254
260;; Define smerge-next and smerge-prev 255;; Define smerge-next and smerge-prev
261(easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil 256(easy-mmode-define-navigation smerge smerge-begin-re "conflict" nil nil
262 (if smerge-auto-refine 257 (if diff-auto-refine-mode
263 (condition-case nil (smerge-refine) (error nil)))) 258 (condition-case nil (smerge-refine) (error nil))))
264 259
265(defconst smerge-match-names ["conflict" "mine" "base" "other"]) 260(defconst smerge-match-names ["conflict" "mine" "base" "other"])