aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2010-08-09 11:31:21 +0900
committerKenichi Handa2010-08-09 11:31:21 +0900
commitfd71e94970ea84d3e4ed8fc5756373e57c1d9378 (patch)
tree52d9737a85d8dd267b2b32ee2b59edad7d611120
parent4360344208820b1363ec42a4ac7aab9281304d0f (diff)
parent1fcf76afe76188b1f555f3e9b619fee70907d4c8 (diff)
downloademacs-fd71e94970ea84d3e4ed8fc5756373e57c1d9378.tar.gz
emacs-fd71e94970ea84d3e4ed8fc5756373e57c1d9378.zip
merge emacs-23
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/isearch.el19
-rw-r--r--lisp/replace.el4
-rw-r--r--lisp/whitespace.el2
4 files changed, 31 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2097f6c1973..0bdb6535045 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
12010-08-09 Geoff Gole <geoffgole@gmail.com> (tiny change)
2
3 * whitespace.el (whitespace-color-off): Remove post-command-hook
4 locally.
5
62010-08-08 Johan Bockgård <bojohan@gnu.org>
7
8 * replace.el (replace-highlight): Bind isearch-forward and
9 isearch-error, ensuring that highlighting is updated if the user
10 switches the search direction (Bug#6808).
11
12 * isearch.el (isearch-lazy-highlight-forward): New var.
13 (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search):
14 (isearch-lazy-highlight-update): Use it.
15
12010-08-06 Kenichi Handa <handa@m17n.org> 162010-08-06 Kenichi Handa <handa@m17n.org>
2 17
3 * international/mule.el (define-charset): Store NAME as :base 18 * international/mule.el (define-charset): Store NAME as :base
diff --git a/lisp/isearch.el b/lisp/isearch.el
index d0ad330c5c0..7071497cbfb 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2574,6 +2574,7 @@ since they have special meaning in a regexp."
2574(defvar isearch-lazy-highlight-case-fold-search nil) 2574(defvar isearch-lazy-highlight-case-fold-search nil)
2575(defvar isearch-lazy-highlight-regexp nil) 2575(defvar isearch-lazy-highlight-regexp nil)
2576(defvar isearch-lazy-highlight-space-regexp nil) 2576(defvar isearch-lazy-highlight-space-regexp nil)
2577(defvar isearch-lazy-highlight-forward nil)
2577 2578
2578(defun lazy-highlight-cleanup (&optional force) 2579(defun lazy-highlight-cleanup (&optional force)
2579 "Stop lazy highlighting and remove extra highlighting from current buffer. 2580 "Stop lazy highlighting and remove extra highlighting from current buffer.
@@ -2613,7 +2614,9 @@ by other Emacs features."
2613 (not (= (window-start) 2614 (not (= (window-start)
2614 isearch-lazy-highlight-window-start)) 2615 isearch-lazy-highlight-window-start))
2615 (not (= (window-end) ; Window may have been split/joined. 2616 (not (= (window-end) ; Window may have been split/joined.
2616 isearch-lazy-highlight-window-end)))) 2617 isearch-lazy-highlight-window-end))
2618 (not (eq isearch-forward
2619 isearch-lazy-highlight-forward))))
2617 ;; something important did indeed change 2620 ;; something important did indeed change
2618 (lazy-highlight-cleanup t) ;kill old loop & remove overlays 2621 (lazy-highlight-cleanup t) ;kill old loop & remove overlays
2619 (when (not isearch-error) 2622 (when (not isearch-error)
@@ -2628,7 +2631,8 @@ by other Emacs features."
2628 isearch-lazy-highlight-case-fold-search isearch-case-fold-search 2631 isearch-lazy-highlight-case-fold-search isearch-case-fold-search
2629 isearch-lazy-highlight-regexp isearch-regexp 2632 isearch-lazy-highlight-regexp isearch-regexp
2630 isearch-lazy-highlight-wrapped nil 2633 isearch-lazy-highlight-wrapped nil
2631 isearch-lazy-highlight-space-regexp search-whitespace-regexp) 2634 isearch-lazy-highlight-space-regexp search-whitespace-regexp
2635 isearch-lazy-highlight-forward isearch-forward)
2632 (unless (equal isearch-string "") 2636 (unless (equal isearch-string "")
2633 (setq isearch-lazy-highlight-timer 2637 (setq isearch-lazy-highlight-timer
2634 (run-with-idle-timer lazy-highlight-initial-delay nil 2638 (run-with-idle-timer lazy-highlight-initial-delay nil
@@ -2644,7 +2648,8 @@ Attempt to do the search exactly the way the pending Isearch would."
2644 (search-invisible nil) ; don't match invisible text 2648 (search-invisible nil) ; don't match invisible text
2645 (retry t) 2649 (retry t)
2646 (success nil) 2650 (success nil)
2647 (bound (if isearch-forward 2651 (isearch-forward isearch-lazy-highlight-forward)
2652 (bound (if isearch-lazy-highlight-forward
2648 (min (or isearch-lazy-highlight-end-limit (point-max)) 2653 (min (or isearch-lazy-highlight-end-limit (point-max))
2649 (if isearch-lazy-highlight-wrapped 2654 (if isearch-lazy-highlight-wrapped
2650 isearch-lazy-highlight-start 2655 isearch-lazy-highlight-start
@@ -2678,7 +2683,7 @@ Attempt to do the search exactly the way the pending Isearch would."
2678 (select-window isearch-lazy-highlight-window)) 2683 (select-window isearch-lazy-highlight-window))
2679 (save-excursion 2684 (save-excursion
2680 (save-match-data 2685 (save-match-data
2681 (goto-char (if isearch-forward 2686 (goto-char (if isearch-lazy-highlight-forward
2682 isearch-lazy-highlight-end 2687 isearch-lazy-highlight-end
2683 isearch-lazy-highlight-start)) 2688 isearch-lazy-highlight-start))
2684 (while looping 2689 (while looping
@@ -2691,7 +2696,7 @@ Attempt to do the search exactly the way the pending Isearch would."
2691 (let ((mb (match-beginning 0)) 2696 (let ((mb (match-beginning 0))
2692 (me (match-end 0))) 2697 (me (match-end 0)))
2693 (if (= mb me) ;zero-length match 2698 (if (= mb me) ;zero-length match
2694 (if isearch-forward 2699 (if isearch-lazy-highlight-forward
2695 (if (= mb (if isearch-lazy-highlight-wrapped 2700 (if (= mb (if isearch-lazy-highlight-wrapped
2696 isearch-lazy-highlight-start 2701 isearch-lazy-highlight-start
2697 (window-end))) 2702 (window-end)))
@@ -2711,7 +2716,7 @@ Attempt to do the search exactly the way the pending Isearch would."
2711 (overlay-put ov 'priority 1000) 2716 (overlay-put ov 'priority 1000)
2712 (overlay-put ov 'face lazy-highlight-face) 2717 (overlay-put ov 'face lazy-highlight-face)
2713 (overlay-put ov 'window (selected-window)))) 2718 (overlay-put ov 'window (selected-window))))
2714 (if isearch-forward 2719 (if isearch-lazy-highlight-forward
2715 (setq isearch-lazy-highlight-end (point)) 2720 (setq isearch-lazy-highlight-end (point))
2716 (setq isearch-lazy-highlight-start (point))))) 2721 (setq isearch-lazy-highlight-start (point)))))
2717 2722
@@ -2721,7 +2726,7 @@ Attempt to do the search exactly the way the pending Isearch would."
2721 (setq looping nil 2726 (setq looping nil
2722 nomore t) 2727 nomore t)
2723 (setq isearch-lazy-highlight-wrapped t) 2728 (setq isearch-lazy-highlight-wrapped t)
2724 (if isearch-forward 2729 (if isearch-lazy-highlight-forward
2725 (progn 2730 (progn
2726 (setq isearch-lazy-highlight-end (window-start)) 2731 (setq isearch-lazy-highlight-end (window-start))
2727 (goto-char (max (or isearch-lazy-highlight-start-limit (point-min)) 2732 (goto-char (max (or isearch-lazy-highlight-start-limit (point-min))
diff --git a/lisp/replace.el b/lisp/replace.el
index 57b29442605..12263cf5aa6 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1893,7 +1893,9 @@ make, or the user didn't cancel the call."
1893 (let ((isearch-string string) 1893 (let ((isearch-string string)
1894 (isearch-regexp regexp) 1894 (isearch-regexp regexp)
1895 (search-whitespace-regexp nil) 1895 (search-whitespace-regexp nil)
1896 (isearch-case-fold-search case-fold)) 1896 (isearch-case-fold-search case-fold)
1897 (isearch-forward t)
1898 (isearch-error nil))
1897 (isearch-lazy-highlight-new-loop range-beg range-end)))) 1899 (isearch-lazy-highlight-new-loop range-beg range-end))))
1898 1900
1899(defun replace-dehighlight () 1901(defun replace-dehighlight ()
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 183698a28f3..5c7d4e95caf 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -2297,7 +2297,7 @@ resultant list will be returned."
2297 ;; turn off font lock 2297 ;; turn off font lock
2298 (when (whitespace-style-face-p) 2298 (when (whitespace-style-face-p)
2299 (font-lock-mode 0) 2299 (font-lock-mode 0)
2300 (remove-hook 'post-command-hook #'whitespace-post-command-hook) 2300 (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
2301 (when whitespace-font-lock 2301 (when whitespace-font-lock
2302 (setq whitespace-font-lock nil 2302 (setq whitespace-font-lock nil
2303 font-lock-keywords whitespace-font-lock-keywords)) 2303 font-lock-keywords whitespace-font-lock-keywords))