aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-03-16 16:03:44 +0000
committerKaroly Lorentey2005-03-16 16:03:44 +0000
commit38d2de214077b4e600d9f9d20d7ec81e1f1c8908 (patch)
treefe3d42c04fd616f8e567e27331134d9b55c63dd9
parenta810eaf92838985d9648acb470dc3c8d26847c15 (diff)
parent418b505281d03c422860a5116c328c91455724d2 (diff)
downloademacs-38d2de214077b4e600d9f9d20d7ec81e1f1c8908.tar.gz
emacs-38d2de214077b4e600d9f9d20d7ec81e1f1c8908.zip
Merged from miles@gnu.org--gnu-2005 (patch 160-161)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-160 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-161 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-308
-rw-r--r--lisp/ChangeLog38
-rw-r--r--lisp/apropos.el13
-rw-r--r--lisp/bindings.el1
-rw-r--r--lisp/emacs-lisp/debug.el37
-rw-r--r--lisp/emulation/cua-base.el1
-rw-r--r--lisp/progmodes/gdb-ui.el23
-rw-r--r--lisp/reveal.el5
-rw-r--r--lisp/simple.el27
-rw-r--r--man/glossary.texi2
-rw-r--r--man/mini.texi2
-rw-r--r--man/rmail.texi2
-rw-r--r--man/sending.texi4
-rw-r--r--src/ChangeLog16
-rw-r--r--src/blockinput.h8
-rw-r--r--src/xdisp.c53
15 files changed, 164 insertions, 68 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a3826bf9a4b..df930a970d7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,31 @@
12005-03-07 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/debug.el (debug-on-entry-1): Fix handling of macros.
4
52005-03-07 Kim F. Storm <storm@cua.dk>
6
7 * simple.el (move-beginning-of-line): New command.
8
9 * bindings.el (global-map): Bind C-a to move-beginning-of-line.
10
11 * reveal.el (reveal-mode-map): Bind C-a to beginning-of-line.
12
13 * emulation/cua-base.el: Put CUA move property on move-end-of-line
14 and move-beginning-of-line.
15
16 * apropos.el (apropos-print): Omit command from M-x ... RET.
17
182005-03-07 Nick Roberts <nickrob@snap.net.nz>
19
20 * progmodes/gdb-ui.el (gdb-var-create-handler): Handle just MI case.
21 (gdb-send, gdb-send-item): Log items sent from gdb-send too.
22
232005-03-06 Richard M. Stallman <rms@gnu.org>
24
25 * bindings.el (esc-map): Bind M-g to goto-line.
26
27 * facemenu.el (global-map): Bind M-o, not M-g.
28
12005-03-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 292005-03-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 30
3 * menu-bar.el (menu-bar-file-menu): Add the same :enable to 31 * menu-bar.el (menu-bar-file-menu): Add the same :enable to
@@ -26,7 +54,7 @@
26 54
272005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change) 552005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change)
28 56
29 * progmodes/which-func.el (which-function): 57 * progmodes/which-func.el (which-function):
30 Specify NOERROR when calling imenu--make-index-alist. 58 Specify NOERROR when calling imenu--make-index-alist.
31 59
322005-03-05 Stefan Monnier <monnier@iro.umontreal.ca> 602005-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -76,14 +104,12 @@
76 104
77 * calendar/icalendar.el (icalendar-version): Increase to 0.11. 105 * calendar/icalendar.el (icalendar-version): Increase to 0.11.
78 (icalendar-export-file, icalendar-export-region) 106 (icalendar-export-file, icalendar-export-region)
79 (icalendar-import-file, icalendar-import-buffer): Add autoload 107 (icalendar-import-file, icalendar-import-buffer): Add autoload cookies.
80 cookies.
81 (icalendar--convert-ical-to-diary): Fix problem with DURATION. 108 (icalendar--convert-ical-to-diary): Fix problem with DURATION.
82 109
832005-03-04 Lute Kamstra <lute@gnu.org> 1102005-03-04 Lute Kamstra <lute@gnu.org>
84 111
85 * emacs-lisp/debug.el (debugger-step-after-exit): Make it a 112 * emacs-lisp/debug.el (debugger-step-after-exit): Make it a defvar.
86 defvar.
87 (debug-function-list): Ditto. 113 (debug-function-list): Ditto.
88 114
892005-03-04 Robert J. Chassell <bob@rattlesnake.com> 1152005-03-04 Robert J. Chassell <bob@rattlesnake.com>
@@ -93,7 +119,7 @@
93 is not appended by replacing a search for `@refill\\|@bye' with 119 is not appended by replacing a search for `@refill\\|@bye' with
94 `@refill\\|^[ \t]*@'. The intent is to solve both the `@end 120 `@refill\\|^[ \t]*@'. The intent is to solve both the `@end
95 itemize@refill' bug and the unfilled long lines bug. 121 itemize@refill' bug and the unfilled long lines bug.
96 (texinfmt-version): update number and date. 122 (texinfmt-version): Update number and date.
97 123
982005-03-04 Reiner Steib <Reiner.Steib@gmx.de> 1242005-03-04 Reiner Steib <Reiner.Steib@gmx.de>
99 125
diff --git a/lisp/apropos.el b/lisp/apropos.el
index ae8a4ad628c..b9d7e3ff41d 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -860,13 +860,12 @@ If non-nil TEXT is a string that will be printed as a heading."
860 key)) 860 key))
861 key) 861 key)
862 item ", ")) 862 item ", "))
863 (insert "M-x") 863 (insert "M-x ... RET")
864 (put-text-property (- (point) 3) (point) 864 (when apropos-keybinding-face
865 'face apropos-keybinding-face) 865 (put-text-property (- (point) 11) (- (point) 8)
866 (insert " " (symbol-name symbol) " ") 866 'face apropos-keybinding-face)
867 (insert "RET") 867 (put-text-property (- (point) 3) (point)
868 (put-text-property (- (point) 3) (point) 868 'face apropos-keybinding-face))))
869 'face apropos-keybinding-face)))
870 (terpri) 869 (terpri)
871 (apropos-print-doc 2 870 (apropos-print-doc 2
872 (if (commandp symbol) 871 (if (commandp symbol)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index a581027993c..98b10f20ce2 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -700,6 +700,7 @@ language you are using."
700(define-key global-map "\C-n" 'next-line) 700(define-key global-map "\C-n" 'next-line)
701(define-key global-map "\C-p" 'previous-line) 701(define-key global-map "\C-p" 'previous-line)
702(define-key ctl-x-map "\C-n" 'set-goal-column) 702(define-key ctl-x-map "\C-n" 'set-goal-column)
703(define-key global-map "\C-a" 'move-beginning-of-line)
703(define-key global-map "\C-e" 'move-end-of-line) 704(define-key global-map "\C-e" 'move-end-of-line)
704(define-key esc-map "g" 'goto-line) 705(define-key esc-map "g" 'goto-line)
705 706
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index ab197e8e119..67836215da3 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -693,25 +693,24 @@ If argument is nil or an empty string, cancel for all functions."
693 (fset function (cons 'lambda (cons (car contents) body))))))) 693 (fset function (cons 'lambda (cons (car contents) body)))))))
694 694
695(defun debug-on-entry-1 (function defn flag) 695(defun debug-on-entry-1 (function defn flag)
696 (if (subrp defn) 696 (let ((tail defn))
697 (error "%s is a built-in function" function) 697 (if (subrp tail)
698 (if (eq (car defn) 'macro) 698 (error "%s is a built-in function" function)
699 (debug-on-entry-1 function (cdr defn) flag) 699 (if (eq (car tail) 'macro) (setq tail (cdr tail)))
700 (or (eq (car defn) 'lambda) 700 (if (eq (car tail) 'lambda) (setq tail (cdr tail))
701 (error "%s not user-defined Lisp function" function)) 701 (error "%s not user-defined Lisp function" function))
702 (let ((tail (cdr defn))) 702 ;; Skip the docstring.
703 ;; Skip the docstring. 703 (when (and (stringp (cadr tail)) (cddr tail))
704 (when (and (stringp (cadr tail)) (cddr tail)) 704 (setq tail (cdr tail)))
705 (setq tail (cdr tail))) 705 ;; Skip the interactive form.
706 ;; Skip the interactive form. 706 (when (eq 'interactive (car-safe (cadr tail)))
707 (when (eq 'interactive (car-safe (cadr tail))) 707 (setq tail (cdr tail)))
708 (setq tail (cdr tail))) 708 (unless (eq flag (equal (cadr tail) debug-entry-code))
709 (unless (eq flag (equal (cadr tail) debug-entry-code)) 709 ;; Add/remove debug statement as needed.
710 ;; Add/remove debug statement as needed. 710 (if flag
711 (if flag 711 (setcdr tail (cons debug-entry-code (cdr tail)))
712 (setcdr tail (cons debug-entry-code (cdr tail))) 712 (setcdr tail (cddr tail))))
713 (setcdr tail (cddr tail)))) 713 defn)))
714 defn))))
715 714
716(defun debugger-list-functions () 715(defun debugger-list-functions ()
717 "Display a list of all the functions now set to debug on entry." 716 "Display a list of all the functions now set to debug on entry."
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 76c0f860a00..d72dc91ad2b 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1284,6 +1284,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1284 next-line previous-line 1284 next-line previous-line
1285 forward-word backward-word 1285 forward-word backward-word
1286 end-of-line beginning-of-line 1286 end-of-line beginning-of-line
1287 move-end-of-line move-beginning-of-line
1287 end-of-buffer beginning-of-buffer 1288 end-of-buffer beginning-of-buffer
1288 scroll-up scroll-down 1289 scroll-up scroll-down
1289 forward-sentence backward-sentence 1290 forward-sentence backward-sentence
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 00da2e70dd7..4fc259cae51 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -341,8 +341,12 @@ detailed description of this mode.
341 (speedbar 1) 341 (speedbar 1)
342 (if (equal (nth 2 var) "0") 342 (if (equal (nth 2 var) "0")
343 (gdb-enqueue-input 343 (gdb-enqueue-input
344 (list (concat "server interpreter mi \"-var-evaluate-expression " 344 (list
345 (nth 1 var) "\"\n") 345 (if (with-current-buffer
346 gud-comint-buffer (eq gud-minor-mode 'gdba))
347 (concat "server interpreter mi \"-var-evaluate-expression "
348 (nth 1 var) "\"\n")
349 (concat "-var-evaluate-expression " (nth 1 var) "\n"))
346 `(lambda () (gdb-var-evaluate-expression-handler 350 `(lambda () (gdb-var-evaluate-expression-handler
347 ,(nth 1 var) nil)))) 351 ,(nth 1 var) nil))))
348 (setq gdb-var-changed t))) 352 (setq gdb-var-changed t)))
@@ -368,8 +372,8 @@ detailed description of this mode.
368 372
369(defun gdb-var-list-children (varnum) 373(defun gdb-var-list-children (varnum)
370 (gdb-enqueue-input 374 (gdb-enqueue-input
371 (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n") 375 (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n")
372 `(lambda () (gdb-var-list-children-handler ,varnum))))) 376 `(lambda () (gdb-var-list-children-handler ,varnum)))))
373 377
374(defconst gdb-var-list-children-regexp 378(defconst gdb-var-list-children-regexp
375 "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"") 379 "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"")
@@ -674,9 +678,12 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
674(defun gdb-send (proc string) 678(defun gdb-send (proc string)
675 "A comint send filter for gdb. 679 "A comint send filter for gdb.
676This filter may simply queue input for a later time." 680This filter may simply queue input for a later time."
677 (if gud-running 681 (let ((item (concat string "\n")))
678 (process-send-string proc (concat string "\n")) 682 (if gud-running
679 (gdb-enqueue-input (concat string "\n")))) 683 (progn
684 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
685 (process-send-string proc item))
686 (gdb-enqueue-input item))))
680 687
681;; Note: Stuff enqueued here will be sent to the next prompt, even if it 688;; Note: Stuff enqueued here will be sent to the next prompt, even if it
682;; is a query, or other non-top-level prompt. 689;; is a query, or other non-top-level prompt.
@@ -697,7 +704,7 @@ This filter may simply queue input for a later time."
697 704
698(defun gdb-send-item (item) 705(defun gdb-send-item (item)
699 (setq gdb-flush-pending-output nil) 706 (setq gdb-flush-pending-output nil)
700 (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) 707 (if gdb-enable-debug-log (push (cons 'send-item item) gdb-debug-log))
701 (setq gdb-current-item item) 708 (setq gdb-current-item item)
702 (with-current-buffer gud-comint-buffer 709 (with-current-buffer gud-comint-buffer
703 (if (eq gud-minor-mode 'gdba) 710 (if (eq gud-minor-mode 'gdba)
diff --git a/lisp/reveal.el b/lisp/reveal.el
index 4d2742a4810..eb6b4519f38 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -161,8 +161,9 @@
161 161
162(defvar reveal-mode-map 162(defvar reveal-mode-map
163 (let ((map (make-sparse-keymap))) 163 (let ((map (make-sparse-keymap)))
164 ;; Override the default move-end-of-line which skips valuable 164 ;; Override the default move-beginning-of-line and move-end-of-line
165 ;; invisible text. 165 ;; which skips valuable invisible text.
166 (define-key map [?\C-a] 'beginning-of-line)
166 (define-key map [?\C-e] 'end-of-line) 167 (define-key map [?\C-e] 'end-of-line)
167 map)) 168 map))
168 169
diff --git a/lisp/simple.el b/lisp/simple.el
index 50a727aa15f..d0d5f9f0170 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3521,6 +3521,33 @@ boundaries bind `inhibit-field-text-motion' to t."
3521 (setq arg 1) 3521 (setq arg 1)
3522 (setq done t))))))) 3522 (setq done t)))))))
3523 3523
3524(defun move-beginning-of-line (arg)
3525 "Move point to beginning of current display line.
3526With argument ARG not nil or 1, move forward ARG - 1 lines first.
3527If point reaches the beginning or end of buffer, it stops there.
3528To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
3529
3530This command does not move point across a field boundary unless doing so
3531would move beyond there to a different line; if ARG is nil or 1, and
3532point starts at a field boundary, point does not move. To ignore field
3533boundaries bind `inhibit-field-text-motion' to t."
3534 (interactive "p")
3535 (or arg (setq arg 1))
3536 (if (/= arg 1)
3537 (line-move (1- arg) t))
3538 (let (done pos)
3539 (while (not done)
3540 (beginning-of-line 1)
3541 ;; (not bolp) means that it stopped at a field boundary.
3542 (if (or (bobp) (not (bolp)))
3543 (setq done t)
3544 (sit-for 0)
3545 (if (and (consp (setq pos (pos-visible-in-window-p (point) nil t)))
3546 (= (car pos) 0))
3547 (setq done t)
3548 (backward-char 1))))))
3549
3550
3524;;; Many people have said they rarely use this feature, and often type 3551;;; Many people have said they rarely use this feature, and often type
3525;;; it by accident. Maybe it shouldn't even be on a key. 3552;;; it by accident. Maybe it shouldn't even be on a key.
3526(put 'set-goal-column 'disabled t) 3553(put 'set-goal-column 'disabled t)
diff --git a/man/glossary.texi b/man/glossary.texi
index c9dbcc952cf..f75ba725a18 100644
--- a/man/glossary.texi
+++ b/man/glossary.texi
@@ -1077,7 +1077,7 @@ The selected frame is the one your input currently operates on.
1077 1077
1078@item Selected Window 1078@item Selected Window
1079The selected frame is the one your input currently operates on. 1079The selected frame is the one your input currently operates on.
1080@xref{Basic Windows}. 1080@xref{Basic Window}.
1081 1081
1082@item Selecting a Buffer 1082@item Selecting a Buffer
1083Selecting a buffer means making it the current (q.v.@:) buffer. 1083Selecting a buffer means making it the current (q.v.@:) buffer.
diff --git a/man/mini.texi b/man/mini.texi
index 844fcbf686c..cef1df70741 100644
--- a/man/mini.texi
+++ b/man/mini.texi
@@ -401,7 +401,7 @@ partial-completion-mode}, or customize the variable
401@code{partial-completion-mode}. This binds the partial completion 401@code{partial-completion-mode}. This binds the partial completion
402commands to @key{TAB}, @key{SPC}, @key{RET}, and @kbd{?}. The usual 402commands to @key{TAB}, @key{SPC}, @key{RET}, and @kbd{?}. The usual
403completion commands are available on @kbd{M-@key{TAB}} (or 403completion commands are available on @kbd{M-@key{TAB}} (or
404@mbd{C-M-i}), @kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}. 404@kbd{C-M-i}), @kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}.
405 405
406@vindex PC-include-file-path 406@vindex PC-include-file-path
407@vindex PC-disable-includes 407@vindex PC-disable-includes
diff --git a/man/rmail.texi b/man/rmail.texi
index ad72b94c3b2..ed5a9cac13b 100644
--- a/man/rmail.texi
+++ b/man/rmail.texi
@@ -1193,7 +1193,7 @@ which applies the code when displaying the text.
1193@code{movemail} program and determine its version. There are two 1193@code{movemail} program and determine its version. There are two
1194versions of @code{movemail} program: the native one, shipped with GNU 1194versions of @code{movemail} program: the native one, shipped with GNU
1195Emacs (the ``emacs version'') and the one included in GNU mailutils 1195Emacs (the ``emacs version'') and the one included in GNU mailutils
1196(the ``mailutils version'', @[xref{movemail,,,mailutils,GNU 1196(the ``mailutils version'', @pxref{movemail,,,mailutils,GNU
1197mailutils}). They support the same command line syntax and the same 1197mailutils}). They support the same command line syntax and the same
1198basic subset of options. However, the @samp{mailutils} version offers 1198basic subset of options. However, the @samp{mailutils} version offers
1199additional features. 1199additional features.
diff --git a/man/sending.texi b/man/sending.texi
index fb00f80a683..e63e5bb9c4c 100644
--- a/man/sending.texi
+++ b/man/sending.texi
@@ -296,12 +296,12 @@ include doublequotes around parts of the address, such as the person's
296full name. Emacs puts them in if they are needed. For example, 296full name. Emacs puts them in if they are needed. For example,
297 297
298@example 298@example
299alias chief-torturer "George W. Bush <bush@whitehouse.gov>" 299alias chief-torturer "George W. Bush <bush@@whitehouse.gov>"
300@end example 300@end example
301 301
302@noindent 302@noindent
303is correct. Emacs will insert the address as @samp{"George W. Bush" 303is correct. Emacs will insert the address as @samp{"George W. Bush"
304<bush@whitehouse.gov>}. 304<bush@@whitehouse.gov>}.
305 305
306 Emacs also recognizes ``include'' commands in @samp{.mailrc} files. 306 Emacs also recognizes ``include'' commands in @samp{.mailrc} files.
307They look like this: 307They look like this:
diff --git a/src/ChangeLog b/src/ChangeLog
index fc2ded6ce94..854a8673458 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12005-03-07 Kim F. Storm <storm@cua.dk>
2
3 * xdisp.c (CLEAR_IMAGE_CACHE_COUNT): New const.
4 (clear_image_cache_count): New var.
5 (redisplay_internal): Don't clear face and image caches in the
6 middle of redisplay; do it afterwards.
7
8 * blockinput.h (TOTALLY_UNBLOCK_INPUT): Avoid dangling else.
9
10 * xdisp.c (notice_overwritten_cursor): Check that phys_cursor.vpos
11 is valid. If not, clear phys_cursor_on_p and return.
12
132005-03-07 Andreas Schwab <schwab@suse.de>
14
15 * blockinput.h (UNBLOCK_INPUT_TO): Always call UNBLOCK_INPUT.
16
12005-03-06 Richard M. Stallman <rms@gnu.org> 172005-03-06 Richard M. Stallman <rms@gnu.org>
2 18
3 * keyboard.c (Ftop_level): Let Fthrow deal with UNBLOCK_INPUT. 19 * keyboard.c (Ftop_level): Let Fthrow deal with UNBLOCK_INPUT.
diff --git a/src/blockinput.h b/src/blockinput.h
index a3b50d2a0f2..6aa865ea9be 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -98,12 +98,12 @@ extern int pending_atimers;
98 and also reinvoke any pending signal. */ 98 and also reinvoke any pending signal. */
99 99
100#define TOTALLY_UNBLOCK_INPUT \ 100#define TOTALLY_UNBLOCK_INPUT \
101 if (interrupt_input_blocked != 0) \ 101 do if (interrupt_input_blocked != 0) \
102 { \ 102 { \
103 interrupt_input_blocked = 1; \ 103 interrupt_input_blocked = 1; \
104 UNBLOCK_INPUT; \ 104 UNBLOCK_INPUT; \
105 } \ 105 } \
106 else 106 while (0)
107 107
108/* Undo any number of BLOCK_INPUT calls down to level LEVEL, 108/* Undo any number of BLOCK_INPUT calls down to level LEVEL,
109 and also (if the level is now 0) reinvoke any pending signal. */ 109 and also (if the level is now 0) reinvoke any pending signal. */
@@ -111,10 +111,8 @@ extern int pending_atimers;
111#define UNBLOCK_INPUT_TO(LEVEL) \ 111#define UNBLOCK_INPUT_TO(LEVEL) \
112 do \ 112 do \
113 { \ 113 { \
114 int oldlevel = interrupt_input_blocked; \
115 interrupt_input_blocked = (LEVEL) + 1; \ 114 interrupt_input_blocked = (LEVEL) + 1; \
116 if (interrupt_input_blocked != oldlevel + 1) \ 115 UNBLOCK_INPUT; \
117 UNBLOCK_INPUT; \
118 } \ 116 } \
119 while (0) 117 while (0)
120 118
diff --git a/src/xdisp.c b/src/xdisp.c
index 2b69e885954..7f7e60e81b8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -781,6 +781,13 @@ enum move_it_result
781#define CLEAR_FACE_CACHE_COUNT 500 781#define CLEAR_FACE_CACHE_COUNT 500
782static int clear_face_cache_count; 782static int clear_face_cache_count;
783 783
784/* Similarly for the image cache. */
785
786#ifdef HAVE_WINDOW_SYSTEM
787#define CLEAR_IMAGE_CACHE_COUNT 101
788static int clear_image_cache_count;
789#endif
790
784/* Non-zero while redisplay_internal is in progress. */ 791/* Non-zero while redisplay_internal is in progress. */
785 792
786int redisplaying_p; 793int redisplaying_p;
@@ -10360,7 +10367,9 @@ redisplay_internal (preserve_echo_area)
10360 CHARPOS (this_line_start_pos) = 0; 10367 CHARPOS (this_line_start_pos) = 0;
10361 consider_all_windows_p |= buffer_shared > 1; 10368 consider_all_windows_p |= buffer_shared > 1;
10362 ++clear_face_cache_count; 10369 ++clear_face_cache_count;
10363 10370#ifdef HAVE_WINDOW_SYSTEM
10371 ++clear_image_cache_count;
10372#endif
10364 10373
10365 /* Build desired matrices, and update the display. If 10374 /* Build desired matrices, and update the display. If
10366 consider_all_windows_p is non-zero, do it for all windows on all 10375 consider_all_windows_p is non-zero, do it for all windows on all
@@ -10373,13 +10382,6 @@ redisplay_internal (preserve_echo_area)
10373 struct frame **updated 10382 struct frame **updated
10374 = (struct frame **) alloca (size * sizeof *updated); 10383 = (struct frame **) alloca (size * sizeof *updated);
10375 10384
10376 /* Clear the face cache eventually. */
10377 if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
10378 {
10379 clear_face_cache (0);
10380 clear_face_cache_count = 0;
10381 }
10382
10383 /* Recompute # windows showing selected buffer. This will be 10385 /* Recompute # windows showing selected buffer. This will be
10384 incremented each time such a window is displayed. */ 10386 incremented each time such a window is displayed. */
10385 buffer_shared = 0; 10387 buffer_shared = 0;
@@ -10395,12 +10397,6 @@ redisplay_internal (preserve_echo_area)
10395 variables. */ 10397 variables. */
10396 select_frame_for_redisplay (frame); 10398 select_frame_for_redisplay (frame);
10397 10399
10398#ifdef HAVE_WINDOW_SYSTEM
10399 if (clear_face_cache_count % 50 == 0
10400 && FRAME_WINDOW_P (f))
10401 clear_image_cache (f, 0);
10402#endif /* HAVE_WINDOW_SYSTEM */
10403
10404 /* Mark all the scroll bars to be removed; we'll redeem 10400 /* Mark all the scroll bars to be removed; we'll redeem
10405 the ones we want when we redisplay their windows. */ 10401 the ones we want when we redisplay their windows. */
10406 if (FRAME_DISPLAY (f)->condemn_scroll_bars_hook) 10402 if (FRAME_DISPLAY (f)->condemn_scroll_bars_hook)
@@ -10604,6 +10600,29 @@ redisplay_internal (preserve_echo_area)
10604 if (windows_or_buffers_changed && !pause) 10600 if (windows_or_buffers_changed && !pause)
10605 goto retry; 10601 goto retry;
10606 10602
10603 /* Clear the face cache eventually. */
10604 if (consider_all_windows_p)
10605 {
10606 if (clear_face_cache_count > CLEAR_FACE_CACHE_COUNT)
10607 {
10608 clear_face_cache (0);
10609 clear_face_cache_count = 0;
10610 }
10611#ifdef HAVE_WINDOW_SYSTEM
10612 if (clear_image_cache_count > CLEAR_IMAGE_CACHE_COUNT)
10613 {
10614 Lisp_Object tail, frame;
10615 FOR_EACH_FRAME (tail, frame)
10616 {
10617 struct frame *f = XFRAME (frame);
10618 if (FRAME_WINDOW_P (f))
10619 clear_image_cache (f, 0);
10620 }
10621 clear_image_cache_count = 0;
10622 }
10623#endif /* HAVE_WINDOW_SYSTEM */
10624 }
10625
10607 end_of_redisplay: 10626 end_of_redisplay:
10608 unbind_to (count, Qnil); 10627 unbind_to (count, Qnil);
10609 RESUME_POLLING; 10628 RESUME_POLLING;
@@ -20202,8 +20221,10 @@ notice_overwritten_cursor (w, area, x0, x1, y0, y1)
20202 if (area != TEXT_AREA) 20221 if (area != TEXT_AREA)
20203 return; 20222 return;
20204 20223
20205 row = w->current_matrix->rows + w->phys_cursor.vpos; 20224 if (w->phys_cursor.vpos < 0
20206 if (!row->displays_text_p) 20225 || w->phys_cursor.vpos >= w->current_matrix->nrows
20226 || (row = w->current_matrix->rows + w->phys_cursor.vpos,
20227 !(row->enabled_p && row->displays_text_p)))
20207 return; 20228 return;
20208 20229
20209 if (row->cursor_in_fringe_p) 20230 if (row->cursor_in_fringe_p)