aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-03-10 23:36:47 +0000
committerMiles Bader2005-03-10 23:36:47 +0000
commit4a670293279d61e9bdf88d9a86caefc6de4e60e3 (patch)
tree29d376c4c602d6ecac1d7d31d56030dc9e8087ca
parent8ab43fb27aa9d02d0ed06e0080f9b4f6e76b94ae (diff)
parent14f56b66c3b1641c90d1390a1381bc27aa91c0e1 (diff)
downloademacs-4a670293279d61e9bdf88d9a86caefc6de4e60e3.tar.gz
emacs-4a670293279d61e9bdf88d9a86caefc6de4e60e3.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-24
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 166-172) - Update from CVS - Tweak obsolete function/variable warning message - Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 38) - Update from CVS
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure1
-rw-r--r--configure.in1
-rw-r--r--etc/ChangeLog8
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/ChangeLog80
-rw-r--r--lisp/bindings.el3
-rw-r--r--lisp/calc/calc-embed.el8
-rw-r--r--lisp/calendar/calendar.el42
-rw-r--r--lisp/calendar/diary-lib.el6
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
-rw-r--r--lisp/emacs-lisp/debug.el39
-rw-r--r--lisp/gnus/ChangeLog18
-rw-r--r--lisp/gnus/nnimap.el2
-rw-r--r--lisp/help.el42
-rw-r--r--lisp/net/browse-url.el5
-rw-r--r--lisp/play/animate.el6
-rw-r--r--lisp/progmodes/gdb-ui.el11
-rw-r--r--lisp/textmodes/ispell.el14
-rw-r--r--lisp/tooltip.el71
-rw-r--r--src/ChangeLog16
-rw-r--r--src/dispextern.h1
-rw-r--r--src/gtkutil.c9
-rw-r--r--src/keyboard.c18
-rw-r--r--src/xdisp.c30
-rw-r--r--src/xfns.c8
26 files changed, 288 insertions, 166 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d9259e9369..2462370b170 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * configure.in: Only add XASSERTS to cppflags.
4 * configure: Regenerate.
5
12005-03-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 62005-03-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 7
3 * configure.in: Added --enable-asserts. 8 * configure.in: Added --enable-asserts.
diff --git a/configure b/configure
index eaa3396e826..d5efd286ff0 100755
--- a/configure
+++ b/configure
@@ -21987,7 +21987,6 @@ echo
21987 21987
21988if test $USE_XASSERTS = yes; then 21988if test $USE_XASSERTS = yes; then
21989 echo " Compiling with asserts turned on." 21989 echo " Compiling with asserts turned on."
21990 CFLAGS="$CFLAGS -DXASSERTS=1"
21991 CPPFLAGS="$CPPFLAGS -DXASSERTS=1" 21990 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
21992 echo 21991 echo
21993fi 21992fi
diff --git a/configure.in b/configure.in
index a23b28f0cf8..291ae9a9c08 100644
--- a/configure.in
+++ b/configure.in
@@ -3103,7 +3103,6 @@ echo
3103 3103
3104if test $USE_XASSERTS = yes; then 3104if test $USE_XASSERTS = yes; then
3105 echo " Compiling with asserts turned on." 3105 echo " Compiling with asserts turned on."
3106 CFLAGS="$CFLAGS -DXASSERTS=1"
3107 CPPFLAGS="$CPPFLAGS -DXASSERTS=1" 3106 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
3108 echo 3107 echo
3109fi 3108fi
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 3636682432a..92667a1afff 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,7 +1,11 @@
12005-03-10 Michael Albinus <michael.albinus@gmx.de>
2
3 * NEWS: Explain how to default Tramp to FTP.
4
12005-03-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 52005-03-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 6
3 * NEWS: Mention Carbon build on Mac OS 9. 7 * NEWS: Mention Carbon build on Mac OS 9.
4 8
52005-03-01 David Kastrup <dak@gnu.org> 92005-03-01 David Kastrup <dak@gnu.org>
6 10
7 * DEBUG: Add information about `-fno-crossjumping' for GCC. 11 * DEBUG: Add information about `-fno-crossjumping' for GCC.
@@ -49,7 +53,7 @@
492005-01-13 Cheng Gao <chenggao@gmail.com> 532005-01-13 Cheng Gao <chenggao@gmail.com>
50 54
51 * MORE.STUFF: Add entries of some well known and widely used packages. 55 * MORE.STUFF: Add entries of some well known and widely used packages.
52 56
532005-01-07 Lars Hansen <larsh@math.ku.dk> 572005-01-07 Lars Hansen <larsh@math.ku.dk>
54 58
55 * NEWS: Describe desktop package lazy restore feature. 59 * NEWS: Describe desktop package lazy restore feature.
diff --git a/etc/NEWS b/etc/NEWS
index e28e7988b85..34a05ff49f8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2520,7 +2520,11 @@ connection using base64 or uu encoding) and the `out-of-band' methods
2520`rsync' to do the copying). 2520`rsync' to do the copying).
2521 2521
2522Shell connections can be acquired via `rsh', `ssh', `telnet' and also 2522Shell connections can be acquired via `rsh', `ssh', `telnet' and also
2523`su' and `sudo'. 2523`su' and `sudo'. Ange-FTP is still supported via the `ftp' method.
2524
2525If you want to disable Tramp you should set
2526
2527 (setq tramp-default-method "ftp")
2524 2528
2525--- 2529---
2526** The new global minor mode `file-name-shadow-mode' modifies the way 2530** The new global minor mode `file-name-shadow-mode' modifies the way
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 48592e71a70..b2bd4a197b9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,80 @@
12005-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * help.el (describe-mode): Properly handle non-trivial lighters.
4 Don't ignore minor modes that are not listed in minor-mode-list.
5
6 * tooltip.el (tooltip-mode): Don't complain that you can't turn the
7 feature ON when the user requests to turn it OFF.
8
92005-03-10 Lute Kamstra <lute@gnu.org>
10
11 * emacs-lisp/debug.el (debug-entry-code): Delete it.
12 (implement-debug-on-entry): New function to replace debug-entry-code.
13 (debug-on-entry-1): Use implement-debug-on-entry. Delete the
14 second argument as the 2005-03-07 change makes it obsolete.
15 (debug-on-entry, cancel-debug-on-entry): Update call to
16 debug-on-entry-1.
17 (debug, debugger-setup-buffer): Comment update.
18 (debugger-frame-number): Update to work with implement-debug-on-entry.
19
202005-03-10 Jay Belanger <belanger@truman.edu>
21
22 * calc/calc-embed.el (math-ms-args): Declare it.
23 (calc-embedded-eval-expr, calc-embedded-eval-get-var): Use variable
24 math-ms-args.
25 (calc-embedded-subst): Use math-multi-subst-rec to substitute
26 variables.
27
282005-03-10 Nick Roberts <nickrob@snap.net.nz>
29
30 * progmodes/gdb-ui.el (gdb-var-create-handler, gdb-get-location):
31 Use message-box.
32
33 * tooltip.el (tooltip-mode): Use define-minor-mode and simplify.
34 (tooltip-activate-mouse-motions-if-enabled): Use dolist.
35 (tooltip-gud-tips): Simplify.
36 (tooltip-gud-tips-p): Remove superflouous :set.
37 (tooltip-gud-modes): Add fortran-mode.
38 (gdb-tooltip-print): Remove newline for tooltip-use-echo-area.
39
40 * bindings.el (mode-line-mode-menu): Add tooltip-mode to mode-line.
41
422005-03-09 Kim F. Storm <storm@cua.dk>
43
44 * play/animate.el (animate-place-char): Use forward-line instead
45 of next-line to improve performance.
46
472005-03-09 Simon Josefsson <jas@extundo.com>
48
49 * net/browse-url.el (browse-url-default-browser): Doc fix.
50
512005-03-09 Miles Bader <miles@gnu.org>
52
53 * emacs-lisp/bytecomp.el (byte-compile-variable-ref)
54 (byte-compile-obsolete): Change " since VER" to " (as of Emacs VER)".
55
562005-03-09 Kenichi Handa <handa@m17n.org>
57
58 * international/latin-1.el: Set case and syntax for 255 only if
59 set-case-syntax-set-multibyte is nil.
60
61 * textmodes/ispell.el (ispell-insert-word): New function.
62 (ispell-word): Use ispell-insert-word to insert a new word.
63 (ispell-process-line): Likewise.
64 (ispell-complete-word): Likewise.
65
662005-03-09 Glenn Morris <gmorris@ast.cam.ac.uk>
67
68 * calendar/calendar.el (redraw-calendar): Preserve point.
69 Reported by Matt Hodges <MPHodges@member.fsf.org>.
70 (calendar-week-start-day): Move after definition of
71 redraw-calendar. Delete buffer test, since redraw-calendar has
72 that now.
73
74 * calendar/diary-lib.el (mark-diary-entries): Only call
75 redraw-calendar in the first of any recursive calls.
76 Reported by Alan Shutko <ats@acm.org>.
77
12005-03-08 Juri Linkov <juri@jurta.org> 782005-03-08 Juri Linkov <juri@jurta.org>
2 79
3 * textmodes/sgml-mode.el (sgml-tag, html-tag-alist) 80 * textmodes/sgml-mode.el (sgml-tag, html-tag-alist)
@@ -249,8 +326,7 @@
249 that debug-entry-code can be safely removed from a function while 326 that debug-entry-code can be safely removed from a function while
250 this code is being evaluated. Revert the 2005-02-27 change as the 327 this code is being evaluated. Revert the 2005-02-27 change as the
251 new implementation no longer requires it. Make sure that a 328 new implementation no longer requires it. Make sure that a
252 function body containing just a string is not mistaken for a 329 function body containing just a string is not mistaken for a docstring.
253 docstring.
254 (debug): Skip one more frame in case of debug on entry. 330 (debug): Skip one more frame in case of debug on entry.
255 (debugger-setup-buffer): Delete one more frame line in case of 331 (debugger-setup-buffer): Delete one more frame line in case of
256 debug on entry. 332 debug on entry.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 2676f3ab1bf..dc3fce4e009 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -392,6 +392,9 @@ Menu of mode operations in the mode line.")
392 "Return the value of symbol VAR if it is bound, else nil." 392 "Return the value of symbol VAR if it is bound, else nil."
393 `(and (boundp (quote ,var)) ,var)) 393 `(and (boundp (quote ,var)) ,var))
394 394
395(define-key mode-line-mode-menu [tooltip-mode]
396 `(menu-item ,(purecopy "Tooltip") tooltip-mode
397 :button (:toggle . tooltip-mode)))
395(define-key mode-line-mode-menu [overwrite-mode] 398(define-key mode-line-mode-menu [overwrite-mode]
396 `(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode 399 `(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode
397 :button (:toggle . overwrite-mode))) 400 :button (:toggle . overwrite-mode)))
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index b05d6225036..3ad42037b50 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -881,13 +881,13 @@ The command \\[yank] can retrieve it from there."
881 (while (setq x (cdr x)) 881 (while (setq x (cdr x))
882 (calc-embedded-find-vars (car x)))))) 882 (calc-embedded-find-vars (car x))))))
883 883
884 884(defvar math-ms-args)
885(defun calc-embedded-evaluate-expr (x) 885(defun calc-embedded-evaluate-expr (x)
886 (let ((calc-embed-vars-used (aref calc-embedded-info 10))) 886 (let ((calc-embed-vars-used (aref calc-embedded-info 10)))
887 (or calc-embed-vars-used (calc-embedded-find-vars x)) 887 (or calc-embed-vars-used (calc-embedded-find-vars x))
888 (if calc-embed-vars-used 888 (if calc-embed-vars-used
889 (let ((active (assq (aref calc-embedded-info 0) calc-embedded-active)) 889 (let ((active (assq (aref calc-embedded-info 0) calc-embedded-active))
890 (args nil)) 890 (math-ms-args nil))
891 (save-excursion 891 (save-excursion
892 (calc-embedded-original-buffer t) 892 (calc-embedded-original-buffer t)
893 (or active 893 (or active
@@ -911,7 +911,7 @@ The command \\[yank] can retrieve it from there."
911 (list 'calcFunc-assign 911 (list 'calcFunc-assign
912 (nth 1 x) 912 (nth 1 x)
913 (calc-embedded-subst (nth 2 x))) 913 (calc-embedded-subst (nth 2 x)))
914 (calc-normalize (math-evaluate-expr-rec (math-multi-subst x nil nil)))))) 914 (calc-normalize (math-evaluate-expr-rec (math-multi-subst-rec x))))))
915 915
916(defun calc-embedded-eval-get-var (var base) 916(defun calc-embedded-eval-get-var (var base)
917 (let ((entry base) 917 (let ((entry base)
@@ -938,7 +938,7 @@ The command \\[yank] can retrieve it from there."
938 (setq val (nth 2 val))) 938 (setq val (nth 2 val)))
939 (if (eq (car-safe val) 'calcFunc-assign) 939 (if (eq (car-safe val) 'calcFunc-assign)
940 (setq val (nth 2 val))) 940 (setq val (nth 2 val)))
941 (setq args (cons (cons var val) args))) 941 (setq math-ms-args (cons (cons var val) math-ms-args)))
942 (calc-embedded-activate) 942 (calc-embedded-activate)
943 (calc-embedded-eval-get-var var base)))))) 943 (calc-embedded-eval-get-var var base))))))
944 944
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 66ee1875a23..7c6aad07d37 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -145,24 +145,6 @@
145 "Name of the buffer used for the calendar.") 145 "Name of the buffer used for the calendar.")
146 146
147;;;###autoload 147;;;###autoload
148(defcustom calendar-week-start-day 0
149 "*The day of the week on which a week in the calendar begins.
1500 means Sunday (default), 1 means Monday, and so on.
151
152If you change this variable directly (without using customize)
153after starting `calendar', you should call `redraw-calendar' to
154update the calendar display to reflect the change, otherwise
155movement commands will not work correctly."
156 :type 'integer
157 :set (lambda (sym val)
158 (set sym val)
159 (let ((buffer (get-buffer calendar-buffer)))
160 (when (buffer-live-p buffer)
161 (with-current-buffer buffer
162 (redraw-calendar)))))
163 :group 'calendar)
164
165;;;###autoload
166(defcustom calendar-offset 0 148(defcustom calendar-offset 0
167 "*The offset of the principal month from the center of the calendar window. 149 "*The offset of the principal month from the center of the calendar window.
1680 means the principal month is in the center (default), -1 means on the left, 1500 means the principal month is in the center (default), -1 means on the left,
@@ -2172,10 +2154,26 @@ the inserted text. Value is always t."
2172 "Redraw the calendar display, if `calendar-buffer' is live." 2154 "Redraw the calendar display, if `calendar-buffer' is live."
2173 (interactive) 2155 (interactive)
2174 (if (get-buffer calendar-buffer) 2156 (if (get-buffer calendar-buffer)
2175 (with-current-buffer calendar-buffer 2157 (save-excursion
2176 (let ((cursor-date (calendar-cursor-to-nearest-date))) 2158 (with-current-buffer calendar-buffer
2177 (generate-calendar-window displayed-month displayed-year) 2159 (let ((cursor-date (calendar-cursor-to-nearest-date)))
2178 (calendar-cursor-to-visible-date cursor-date))))) 2160 (generate-calendar-window displayed-month displayed-year)
2161 (calendar-cursor-to-visible-date cursor-date))))))
2162
2163;;;###autoload
2164(defcustom calendar-week-start-day 0
2165 "*The day of the week on which a week in the calendar begins.
21660 means Sunday (default), 1 means Monday, and so on.
2167
2168If you change this variable directly (without using customize)
2169after starting `calendar', you should call `redraw-calendar' to
2170update the calendar display to reflect the change, otherwise
2171movement commands will not work correctly."
2172 :type 'integer
2173 :set (lambda (sym val)
2174 (set sym val)
2175 (redraw-calendar))
2176 :group 'calendar)
2179 2177
2180(defcustom calendar-debug-sexp nil 2178(defcustom calendar-debug-sexp nil
2181 "*Turn debugging on when evaluating a sexp in the diary or holiday list." 2179 "*Turn debugging on when evaluating a sexp in the diary or holiday list."
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 97dc1dd0a71..d682a3f1cc5 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -842,7 +842,11 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and
842`mark-diary-entries-hook' are run." 842`mark-diary-entries-hook' are run."
843 (interactive) 843 (interactive)
844 ;; To remove any deleted diary entries. 844 ;; To remove any deleted diary entries.
845 (when mark-diary-entries-in-calendar 845 (when (and mark-diary-entries-in-calendar
846 ;; Avoid redrawing when called recursively, eg through
847 ;; mark-diary-entries-hook for #include's, else only get
848 ;; the last set of diary marks.
849 (not marking-diary-entries))
846 (setq mark-diary-entries-in-calendar nil) 850 (setq mark-diary-entries-in-calendar nil)
847 (redraw-calendar)) 851 (redraw-calendar))
848 (let ((marking-diary-entries t) 852 (let ((marking-diary-entries t)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 3c5a1d14d72..950193463f7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1039,7 +1039,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1039 (byte-compile-set-symbol-position (car form)) 1039 (byte-compile-set-symbol-position (car form))
1040 (if (memq 'obsolete byte-compile-warnings) 1040 (if (memq 'obsolete byte-compile-warnings)
1041 (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form) 1041 (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form)
1042 (if when (concat " since " when) "") 1042 (if when (concat " (as of Emacs " when ")") "")
1043 (if (stringp (car new)) 1043 (if (stringp (car new))
1044 (car new) 1044 (car new)
1045 (format "use `%s' instead." (car new))))) 1045 (format "use `%s' instead." (car new)))))
@@ -2779,7 +2779,7 @@ That command is designed for interactive use only" fn))
2779 (let* ((ob (get var 'byte-obsolete-variable)) 2779 (let* ((ob (get var 'byte-obsolete-variable))
2780 (when (cdr ob))) 2780 (when (cdr ob)))
2781 (byte-compile-warn "`%s' is an obsolete variable%s; %s" var 2781 (byte-compile-warn "`%s' is an obsolete variable%s; %s" var
2782 (if when (concat " since " when) "") 2782 (if when (concat " (as of Emacs " when ")") "")
2783 (if (stringp (car ob)) 2783 (if (stringp (car ob))
2784 (car ob) 2784 (car ob)
2785 (format "use `%s' instead." (car ob)))))) 2785 (format "use `%s' instead." (car ob))))))
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index fc665cb973f..668157fc52a 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -97,14 +97,6 @@ This is to optimize `debugger-make-xrefs'.")
97This variable is used by `debugger-jump', `debugger-step-through', 97This variable is used by `debugger-jump', `debugger-step-through',
98and `debugger-reenable' to temporarily disable debug-on-entry.") 98and `debugger-reenable' to temporarily disable debug-on-entry.")
99 99
100;; When you change this, you may also need to change the number of
101;; frames that the debugger skips.
102(defconst debug-entry-code
103 '(if (or inhibit-debug-on-entry debugger-jumping-flag)
104 nil
105 (debug 'debug))
106 "Code added to a function to cause it to call the debugger upon entry.")
107
108;;;###autoload 100;;;###autoload
109(setq debugger 'debug) 101(setq debugger 'debug)
110;;;###autoload 102;;;###autoload
@@ -200,7 +192,7 @@ first will be printed into the backtrace buffer."
200 (kill-emacs)) 192 (kill-emacs))
201 (if (eq (car debugger-args) 'debug) 193 (if (eq (car debugger-args) 'debug)
202 ;; Skip the frames for backtrace-debug, byte-code, 194 ;; Skip the frames for backtrace-debug, byte-code,
203 ;; and debug-entry-code. 195 ;; and implement-debug-on-entry.
204 (backtrace-debug 4 t)) 196 (backtrace-debug 4 t))
205 (message "") 197 (message "")
206 (let ((standard-output nil) 198 (let ((standard-output nil)
@@ -264,7 +256,7 @@ That buffer should be current already."
264 (progn 256 (progn
265 (search-forward "\n debug(") 257 (search-forward "\n debug(")
266 (forward-line (if (eq (car debugger-args) 'debug) 258 (forward-line (if (eq (car debugger-args) 'debug)
267 2 ; Remove debug-entry-code frame. 259 2 ; Remove implement-debug-on-entry frame.
268 1)) 260 1))
269 (point))) 261 (point)))
270 (insert "Debugger entered") 262 (insert "Debugger entered")
@@ -432,8 +424,8 @@ removes itself from that hook."
432 (count 0)) 424 (count 0))
433 (while (not (eq (cadr (backtrace-frame count)) 'debug)) 425 (while (not (eq (cadr (backtrace-frame count)) 'debug))
434 (setq count (1+ count))) 426 (setq count (1+ count)))
435 ;; Skip debug-entry-code frame. 427 ;; Skip implement-debug-on-entry frame.
436 (when (member '(debug (quote debug)) (cdr (backtrace-frame (1+ count)))) 428 (when (eq 'implement-debug-on-entry (cadr (backtrace-frame (1+ count))))
437 (setq count (1+ count))) 429 (setq count (1+ count)))
438 (goto-char (point-min)) 430 (goto-char (point-min))
439 (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") 431 (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):")
@@ -623,6 +615,16 @@ Complete list of commands:
623 (use-local-map debugger-mode-map) 615 (use-local-map debugger-mode-map)
624 (run-mode-hooks 'debugger-mode-hook)) 616 (run-mode-hooks 'debugger-mode-hook))
625 617
618;; When you change this, you may also need to change the number of
619;; frames that the debugger skips.
620(defun implement-debug-on-entry ()
621 "Conditionally call the debugger.
622A call to this function is inserted by `debug-on-entry' to cause
623functions to break on entry."
624 (if (or inhibit-debug-on-entry debugger-jumping-flag)
625 nil
626 (funcall debugger 'debug)))
627
626;;;###autoload 628;;;###autoload
627(defun debug-on-entry (function) 629(defun debug-on-entry (function)
628 "Request FUNCTION to invoke debugger each time it is called. 630 "Request FUNCTION to invoke debugger each time it is called.
@@ -647,7 +649,7 @@ Redefining FUNCTION also cancels it."
647 (debug-convert-byte-code function)) 649 (debug-convert-byte-code function))
648 (or (consp (symbol-function function)) 650 (or (consp (symbol-function function))
649 (error "Definition of %s is not a list" function)) 651 (error "Definition of %s is not a list" function))
650 (fset function (debug-on-entry-1 function (symbol-function function) t)) 652 (fset function (debug-on-entry-1 function t))
651 (or (memq function debug-function-list) 653 (or (memq function debug-function-list)
652 (push function debug-function-list)) 654 (push function debug-function-list))
653 function) 655 function)
@@ -664,7 +666,7 @@ If argument is nil or an empty string, cancel for all functions."
664 (if name (intern name))))) 666 (if name (intern name)))))
665 (if (and function (not (string= function ""))) 667 (if (and function (not (string= function "")))
666 (progn 668 (progn
667 (let ((f (debug-on-entry-1 function (symbol-function function) nil))) 669 (let ((f (debug-on-entry-1 function nil)))
668 (condition-case nil 670 (condition-case nil
669 (if (and (equal (nth 1 f) '(&rest debug-on-entry-args)) 671 (if (and (equal (nth 1 f) '(&rest debug-on-entry-args))
670 (eq (car (nth 3 f)) 'apply)) 672 (eq (car (nth 3 f)) 'apply))
@@ -695,8 +697,9 @@ If argument is nil or an empty string, cancel for all functions."
695 (setq body (cons (documentation function) body))) 697 (setq body (cons (documentation function) body)))
696 (fset function (cons 'lambda (cons (car contents) body))))))) 698 (fset function (cons 'lambda (cons (car contents) body)))))))
697 699
698(defun debug-on-entry-1 (function defn flag) 700(defun debug-on-entry-1 (function flag)
699 (let ((tail defn)) 701 (let* ((defn (symbol-function function))
702 (tail defn))
700 (if (subrp tail) 703 (if (subrp tail)
701 (error "%s is a built-in function" function) 704 (error "%s is a built-in function" function)
702 (if (eq (car tail) 'macro) (setq tail (cdr tail))) 705 (if (eq (car tail) 'macro) (setq tail (cdr tail)))
@@ -708,10 +711,10 @@ If argument is nil or an empty string, cancel for all functions."
708 ;; Skip the interactive form. 711 ;; Skip the interactive form.
709 (when (eq 'interactive (car-safe (cadr tail))) 712 (when (eq 'interactive (car-safe (cadr tail)))
710 (setq tail (cdr tail))) 713 (setq tail (cdr tail)))
711 (unless (eq flag (equal (cadr tail) debug-entry-code)) 714 (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry)))
712 ;; Add/remove debug statement as needed. 715 ;; Add/remove debug statement as needed.
713 (if flag 716 (if flag
714 (setcdr tail (cons debug-entry-code (cdr tail))) 717 (setcdr tail (cons '(implement-debug-on-entry) (cdr tail)))
715 (setcdr tail (cddr tail)))) 718 (setcdr tail (cddr tail))))
716 defn))) 719 defn)))
717 720
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 651877e0240..9213b44170c 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
12005-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * nnimap.el (nnimap-retrieve-headers-from-server): Fix last change.
4
52005-03-10 Arne J,Ax(Brgensen <arne@arnested.dk> (tiny change)
6
7 * nnimap.el (nnimap-retrieve-headers-from-server): Fix off-by-one
8 flaw.
9
12005-03-08 Bjorn Solberg <bjorn_ding@hekneby.org> (tiny change) 102005-03-08 Bjorn Solberg <bjorn_ding@hekneby.org> (tiny change)
2 11
3 * nnimap.el (nnimap-retrieve-headers-from-server): Sort NOV 12 * nnimap.el (nnimap-retrieve-headers-from-server): Sort NOV
@@ -7,14 +16,13 @@
72005-03-04 Reiner Steib <Reiner.Steib@gmx.de> 162005-03-04 Reiner Steib <Reiner.Steib@gmx.de>
8 17
9 * message.el: Don't autoload former message-utils variables. 18 * message.el: Don't autoload former message-utils variables.
10 (message-strip-subject-trailing-was): Changed doc string. 19 (message-strip-subject-trailing-was): Change doc string.
11 20
12 * nnweb.el: Fixes for `gnus-group-make-web-group'. 21 * nnweb.el: Fixes for `gnus-group-make-web-group'.
13 (nnweb-type-definition): Don't add "hl=en" in `address'. Added 22 (nnweb-type-definition): Don't add "hl=en" in `address'. Add `base'.
14 `base'.
15 (nnweb-google-search): Add "hl=en" here. 23 (nnweb-google-search): Add "hl=en" here.
16 (nnweb-google-parse-1, nnweb-google-create-mapping): Don't 24 (nnweb-google-parse-1, nnweb-google-create-mapping):
17 hardcode URL. 25 Don't hardcode URL.
18 26
192005-03-03 Reiner Steib <Reiner.Steib@gmx.de> 272005-03-03 Reiner Steib <Reiner.Steib@gmx.de>
20 28
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index bd75f8576ff..09d9aef6f31 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -666,7 +666,7 @@ If EXAMINE is non-nil the group is selected read-only."
666 (format "BODY.PEEK[HEADER.FIELDS %s])" headers) 666 (format "BODY.PEEK[HEADER.FIELDS %s])" headers)
667 (format "RFC822.HEADER.LINES %s)" headers))))) 667 (format "RFC822.HEADER.LINES %s)" headers)))))
668 (with-current-buffer nntp-server-buffer 668 (with-current-buffer nntp-server-buffer
669 (sort-numeric-fields 1 1 (buffer-size))) 669 (sort-numeric-fields 1 (point-min) (point-max)))
670 (and (numberp nnmail-large-newsgroup) 670 (and (numberp nnmail-large-newsgroup)
671 (> nnimap-length nnmail-large-newsgroup) 671 (> nnimap-length nnmail-large-newsgroup)
672 (nnheader-message 6 "nnimap: Retrieving headers...done"))))) 672 (nnheader-message 6 "nnimap: Retrieving headers...done")))))
diff --git a/lisp/help.el b/lisp/help.el
index de5ac093dd5..22d383559a1 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1,7 +1,7 @@
1;;; help.el --- help commands for Emacs 1;;; help.el --- help commands for Emacs
2 2
3;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004 3;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004,
4;; Free Software Foundation, Inc. 4;; 2005 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Keywords: help, internal 7;; Keywords: help, internal
@@ -685,34 +685,35 @@ For this to work correctly for a minor mode, the mode's indicator
685variable \(listed in `minor-mode-alist') must also be a function 685variable \(listed in `minor-mode-alist') must also be a function
686whose documentation describes the minor mode." 686whose documentation describes the minor mode."
687 (interactive) 687 (interactive)
688 (help-setup-xref (list #'describe-mode (or buffer (current-buffer))) 688 (unless buffer (setq buffer (current-buffer)))
689 (help-setup-xref (list #'describe-mode buffer)
689 (interactive-p)) 690 (interactive-p))
690 ;; For the sake of help-do-xref and help-xref-go-back, 691 ;; For the sake of help-do-xref and help-xref-go-back,
691 ;; don't switch buffers before calling `help-buffer'. 692 ;; don't switch buffers before calling `help-buffer'.
692 (with-output-to-temp-buffer (help-buffer) 693 (with-output-to-temp-buffer (help-buffer)
693 (save-excursion 694 (with-current-buffer buffer
694 (when buffer (set-buffer buffer))
695 (let (minor-modes) 695 (let (minor-modes)
696 ;; Older packages do not register in minor-mode-list but only in
697 ;; minor-mode-alist.
698 (dolist (x minor-mode-alist)
699 (setq x (car x))
700 (unless (memq x minor-mode-list)
701 (push x minor-mode-list)))
696 ;; Find enabled minor mode we will want to mention. 702 ;; Find enabled minor mode we will want to mention.
697 (dolist (mode minor-mode-list) 703 (dolist (mode minor-mode-list)
698 ;; Document a minor mode if it is listed in minor-mode-alist, 704 ;; Document a minor mode if it is listed in minor-mode-alist,
699 ;; non-nil, and has a function definition. 705 ;; non-nil, and has a function definition.
700 (and (boundp mode) (symbol-value mode) 706 (and (boundp mode) (symbol-value mode)
701 (fboundp mode) 707 (fboundp mode)
702 (let ((pretty-minor-mode mode) 708 (let ((pretty-minor-mode mode))
703 indicator)
704 (if (string-match "\\(-minor\\)?-mode\\'" 709 (if (string-match "\\(-minor\\)?-mode\\'"
705 (symbol-name mode)) 710 (symbol-name mode))
706 (setq pretty-minor-mode 711 (setq pretty-minor-mode
707 (capitalize 712 (capitalize
708 (substring (symbol-name mode) 713 (substring (symbol-name mode)
709 0 (match-beginning 0))))) 714 0 (match-beginning 0)))))
710 (setq indicator (cadr (assq mode minor-mode-alist))) 715 (push (list pretty-minor-mode mode
711 (while (and indicator (symbolp indicator) 716 (format-mode-line (assq mode minor-mode-alist)))
712 (boundp indicator)
713 (not (eq indicator (symbol-value indicator))))
714 (setq indicator (symbol-value indicator)))
715 (push (list pretty-minor-mode mode indicator)
716 minor-modes)))) 717 minor-modes))))
717 (if auto-fill-function 718 (if auto-fill-function
718 ;; copy pure string so we can add face property to it below. 719 ;; copy pure string so we can add face property to it below.
@@ -729,6 +730,9 @@ whose documentation describes the minor mode."
729 (let ((pretty-minor-mode (nth 0 mode)) 730 (let ((pretty-minor-mode (nth 0 mode))
730 (mode-function (nth 1 mode)) 731 (mode-function (nth 1 mode))
731 (indicator (nth 2 mode))) 732 (indicator (nth 2 mode)))
733 (setq indicator (if (zerop (length indicator))
734 "no indicator"
735 (format "indicator%s" indicator)))
732 (add-text-properties 0 (length pretty-minor-mode) 736 (add-text-properties 0 (length pretty-minor-mode)
733 '(face bold) pretty-minor-mode) 737 '(face bold) pretty-minor-mode)
734 (save-excursion 738 (save-excursion
@@ -737,20 +741,14 @@ whose documentation describes the minor mode."
737 (push (point-marker) help-button-cache) 741 (push (point-marker) help-button-cache)
738 ;; Document the minor modes fully. 742 ;; Document the minor modes fully.
739 (insert pretty-minor-mode) 743 (insert pretty-minor-mode)
740 (princ (format " minor mode (%s):\n" 744 (princ (format " minor mode (%s):\n" indicator))
741 (if indicator
742 (format "indicator%s" indicator)
743 "no indicator")))
744 (princ (documentation mode-function))) 745 (princ (documentation mode-function)))
745 (princ " ") 746 (princ " ")
746 (insert-button pretty-minor-mode 747 (insert-button pretty-minor-mode
747 'action (car help-button-cache) 748 'action (car help-button-cache)
748 'follow-link t 749 'follow-link t
749 'help-echo "mouse-2, RET: show full information") 750 'help-echo "mouse-2, RET: show full information")
750 (princ (format " minor mode (%s):\n" 751 (princ (format " minor mode (%s):\n" indicator)))))
751 (if indicator
752 (format "indicator%s" indicator)
753 "no indicator"))))))
754 (princ "\n(Full information about these minor modes 752 (princ "\n(Full information about these minor modes
755follows the description of the major mode.)\n\n")) 753follows the description of the major mode.)\n\n"))
756 ;; Document the major mode. 754 ;; Document the major mode.
@@ -896,5 +894,5 @@ out of view."
896;; defcustoms which require 'help'. 894;; defcustoms which require 'help'.
897(provide 'help) 895(provide 'help)
898 896
899;;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 897;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423
900;;; help.el ends here 898;;; help.el ends here
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 78c8e976269..9b5708d6503 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -815,8 +815,9 @@ the effect of `browse-url-new-window-flag'.
815When called non-interactively, optional second argument NEW-WINDOW is 815When called non-interactively, optional second argument NEW-WINDOW is
816used instead of `browse-url-new-window-flag'. 816used instead of `browse-url-new-window-flag'.
817 817
818The order attempted is gnome-moz-remote, Mozilla, Galeon, Netscape, 818The order attempted is gnome-moz-remote, Mozilla, Galeon,
819Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3." 819Konqueror, Netscape, Mosaic, IXI Mosaic, Lynx in an xterm, MMM,
820and then W3."
820 (apply 821 (apply
821 (cond 822 (cond
822 ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) 823 ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 23e7939f47a..dcbf3bc2610 100644
--- a/lisp/play/animate.el
+++ b/lisp/play/animate.el
@@ -80,9 +80,11 @@
80;;; Place the character CHAR at position VPOS, HPOS in the current buffer. 80;;; Place the character CHAR at position VPOS, HPOS in the current buffer.
81(defun animate-place-char (char vpos hpos) 81(defun animate-place-char (char vpos hpos)
82 (goto-char (window-start)) 82 (goto-char (window-start))
83 (let ((next-line-add-newlines t)) 83 (let (abbrev-mode)
84 (dotimes (i vpos) 84 (dotimes (i vpos)
85 (next-line 1))) 85 (end-of-line)
86 (if (= (forward-line 1) 1)
87 (insert "\n"))))
86 (beginning-of-line) 88 (beginning-of-line)
87 (move-to-column (floor hpos) t) 89 (move-to-column (floor hpos) t)
88 (unless (eolp) (delete-char 1)) 90 (unless (eolp) (delete-char 1))
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index a040395acb9..fea1bbce69a 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -351,7 +351,7 @@ detailed description of this mode.
351 ,(nth 1 var) nil)))) 351 ,(nth 1 var) nil))))
352 (setq gdb-var-changed t))) 352 (setq gdb-var-changed t)))
353 (if (re-search-forward "Undefined command" nil t) 353 (if (re-search-forward "Undefined command" nil t)
354 (message "Watching expressions requires gdb 6.0 onwards") 354 (message-box "Watching expressions requires gdb 6.0 onwards")
355 (message "No symbol %s in current context." expr))))) 355 (message "No symbol %s in current context." expr)))))
356 356
357(defun gdb-var-evaluate-expression-handler (varnum changed) 357(defun gdb-var-evaluate-expression-handler (varnum changed)
@@ -2119,13 +2119,8 @@ Put in buffer and place breakpoint icon."
2119 (push (cons bptno (match-string 0)) gdb-location-list)) 2119 (push (cons bptno (match-string 0)) gdb-location-list))
2120 (gdb-resync) 2120 (gdb-resync)
2121 (push (cons bptno "File not found") gdb-location-list) 2121 (push (cons bptno "File not found") gdb-location-list)
2122 (if (eq window-system 'x) 2122 (message-box "Cannot find source file for breakpoint location.\n\
2123 (x-popup-dialog 2123Add directory to search path for source files using the GDB command, dir.")
2124 t '("Cannot find source file for breakpoint location.\n\
2125Add directory to search path for source files using the GDB command, dir."
2126 ("Ok" . nil)))
2127 (message "Cannot find source file for breakpoint location.\n\
2128Add directory to search path for source files using the GDB command, dir."))
2129 (throw 'file-not-found nil)) 2124 (throw 'file-not-found nil))
2130 (with-current-buffer 2125 (with-current-buffer
2131 (find-file-noselect (match-string 0)) 2126 (find-file-noselect (match-string 0))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 3c0097f0651..6ef33e9580d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1376,6 +1376,14 @@ This allows it to improve the suggestion list based on actual mispellings."
1376 (setq more-lines (= 0 (forward-line)))))))))))))) 1376 (setq more-lines (= 0 (forward-line))))))))))))))
1377 1377
1378 1378
1379;; Insert WORD while translating Latin characters to the equivalent
1380;; characters that is supported by buffer-file-coding-system.
1381
1382(defun ispell-insert-word (word)
1383 (let ((pos (point)))
1384 (insert word)
1385 (if (char-table-p translation-table-for-input)
1386 (translate-region pos (point) translation-table-for-input))))
1379 1387
1380;;;###autoload 1388;;;###autoload
1381(defun ispell-word (&optional following quietly continue) 1389(defun ispell-word (&optional following quietly continue)
@@ -1474,7 +1482,7 @@ quit spell session exited."
1474 (progn 1482 (progn
1475 (delete-region start end) 1483 (delete-region start end)
1476 (setq start (point)) 1484 (setq start (point))
1477 (insert new-word) 1485 (ispell-insert-word new-word)
1478 (setq end (point)))) 1486 (setq end (point))))
1479 (if (not (atom replace)) ;recheck spelling of replacement 1487 (if (not (atom replace)) ;recheck spelling of replacement
1480 (progn 1488 (progn
@@ -2853,7 +2861,7 @@ Returns the sum shift due to changes in word replacements."
2853 (delete-region (point) (+ word-len (point))) 2861 (delete-region (point) (+ word-len (point)))
2854 (if (not (listp replace)) 2862 (if (not (listp replace))
2855 (progn 2863 (progn
2856 (insert replace) ; insert dictionary word 2864 (ispell-insert-word replace) ; insert dictionary word
2857 (ispell-send-replacement (car poss) replace) 2865 (ispell-send-replacement (car poss) replace)
2858 (setq accept-list (cons replace accept-list))) 2866 (setq accept-list (cons replace accept-list)))
2859 (let ((replace-word (car replace))) 2867 (let ((replace-word (car replace)))
@@ -3022,7 +3030,7 @@ Standard ispell choices are then available."
3022 (setq word (if (atom replacement) replacement (car replacement)) 3030 (setq word (if (atom replacement) replacement (car replacement))
3023 cursor-location (+ (- (length word) (- end start)) 3031 cursor-location (+ (- (length word) (- end start))
3024 cursor-location)) 3032 cursor-location))
3025 (insert word) 3033 (ispell-insert-word word)
3026 (if (not (atom replacement)) ; recheck spelling of replacement. 3034 (if (not (atom replacement)) ; recheck spelling of replacement.
3027 (progn 3035 (progn
3028 (goto-char cursor-location) 3036 (goto-char cursor-location)
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index c4ac57eac95..e4cab1beba1 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -1,6 +1,6 @@
1;;; tooltip.el --- show tooltip windows 1;;; tooltip.el --- show tooltip windows
2 2
3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Gerd Moellmann <gerd@acm.org> 6;; Author: Gerd Moellmann <gerd@acm.org>
@@ -41,8 +41,6 @@
41 :version "21.1" 41 :version "21.1"
42 :tag "Tool Tips") 42 :tag "Tool Tips")
43 43
44(defvar tooltip-mode)
45
46(defcustom tooltip-delay 0.7 44(defcustom tooltip-delay 0.7
47 "Seconds to wait before displaying a tooltip the first time." 45 "Seconds to wait before displaying a tooltip the first time."
48 :tag "Delay" 46 :tag "Delay"
@@ -122,11 +120,9 @@ position to pop up the tooltip."
122 "*Non-nil means show tooltips in GUD sessions." 120 "*Non-nil means show tooltips in GUD sessions."
123 :type 'boolean 121 :type 'boolean
124 :tag "GUD" 122 :tag "GUD"
125 :set #'(lambda (symbol on)
126 (setq tooltip-gud-tips-p on))
127 :group 'tooltip) 123 :group 'tooltip)
128 124
129(defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode) 125(defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode fortran-mode)
130 "List of modes for which to enable GUD tips." 126 "List of modes for which to enable GUD tips."
131 :type 'sexp 127 :type 'sexp
132 :tag "GUD modes" 128 :tag "GUD modes"
@@ -187,26 +183,23 @@ This might return nil if the event did not occur over a buffer."
187;; would be accompanied by a full redisplay. 183;; would be accompanied by a full redisplay.
188 184
189;;;###autoload 185;;;###autoload
190(defun tooltip-mode (&optional arg) 186(define-minor-mode tooltip-mode
191 "Mode for tooltip display. 187 "Toggle Tooltip display.
192With ARG, turn tooltip mode on if and only if ARG is positive." 188With ARG, turn tooltip mode on if and only if ARG is positive."
193 (interactive "P") 189 :global t
194 (unless (fboundp 'x-show-tip) 190 :group 'tooltip
191 (unless (or (null tooltip-mode) (fboundp 'x-show-tip))
195 (error "Sorry, tooltips are not yet available on this system")) 192 (error "Sorry, tooltips are not yet available on this system"))
196 (let* ((on (if arg 193 (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook)))
197 (> (prefix-numeric-value arg) 0)
198 (not tooltip-mode)))
199 (hook-fn (if on 'add-hook 'remove-hook)))
200 (setq tooltip-mode on)
201 (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode) 194 (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode)
202 (tooltip-activate-mouse-motions-if-enabled) 195 (tooltip-activate-mouse-motions-if-enabled)
203 (funcall hook-fn 'pre-command-hook 'tooltip-hide) 196 (funcall hook-fn 'pre-command-hook 'tooltip-hide)
204 (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips) 197 (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips)
205 (funcall hook-fn 'tooltip-hook 'tooltip-help-tips) 198 (funcall hook-fn 'tooltip-hook 'tooltip-help-tips)
206 (setq show-help-function (if on 'tooltip-show-help-function nil)) 199 (setq show-help-function (if tooltip-mode 'tooltip-show-help-function nil))
207 ;; `ignore' is the default binding for mouse movements. 200 ;; `ignore' is the default binding for mouse movements.
208 (define-key global-map [mouse-movement] 201 (define-key global-map [mouse-movement]
209 (if on 'tooltip-mouse-motion 'ignore)))) 202 (if tooltip-mode 'tooltip-mouse-motion 'ignore))))
210 203
211 204
212;;; Timeout for tooltip display 205;;; Timeout for tooltip display
@@ -246,16 +239,14 @@ With ARG, turn tooltip mode on if and only if ARG is positive."
246(defun tooltip-activate-mouse-motions-if-enabled () 239(defun tooltip-activate-mouse-motions-if-enabled ()
247 "Reconsider for all buffers whether mouse motion events are desired." 240 "Reconsider for all buffers whether mouse motion events are desired."
248 (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled) 241 (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled)
249 (let ((buffers (buffer-list))) 242 (dolist (buffer (buffer-list))
250 (save-excursion 243 (save-excursion
251 (while buffers 244 (set-buffer buffer)
252 (set-buffer (car buffers)) 245 (if (and tooltip-mode
253 (if (and tooltip-mode 246 tooltip-gud-tips-p
254 tooltip-gud-tips-p 247 (memq major-mode tooltip-gud-modes))
255 (memq major-mode tooltip-gud-modes)) 248 (tooltip-activate-mouse-motions t)
256 (tooltip-activate-mouse-motions t) 249 (tooltip-activate-mouse-motions nil)))))
257 (tooltip-activate-mouse-motions nil))
258 (setq buffers (cdr buffers))))))
259 250
260(defvar tooltip-mouse-motions-active nil 251(defvar tooltip-mouse-motions-active nil
261 "Locally t in a buffer if tooltip processing of mouse motion is enabled.") 252 "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
@@ -441,12 +432,11 @@ region for the tip window to be shown. If tooltip-gud-dereference is t,
441add a `*' in front of the printed expression. 432add a `*' in front of the printed expression.
442 433
443This function must return nil if it doesn't handle EVENT." 434This function must return nil if it doesn't handle EVENT."
444 (let (gud-buffer process) 435 (let (process)
445 (when (and (eventp event) 436 (when (and (eventp event)
446 tooltip-gud-tips-p 437 tooltip-gud-tips-p
447 (boundp 'gud-comint-buffer) 438 (boundp 'gud-comint-buffer)
448 (setq gud-buffer gud-comint-buffer) 439 (setq process (get-buffer-process gud-comint-buffer))
449 (setq process (get-buffer-process gud-buffer))
450 (posn-point (event-end event)) 440 (posn-point (event-end event))
451 (progn (setq tooltip-gud-event event) 441 (progn (setq tooltip-gud-event event)
452 (eval (cons 'and tooltip-gud-display)))) 442 (eval (cons 'and tooltip-gud-display))))
@@ -464,9 +454,11 @@ This function must return nil if it doesn't handle EVENT."
464 expr))))))) 454 expr)))))))
465 455
466(defun gdb-tooltip-print () 456(defun gdb-tooltip-print ()
467 (tooltip-show 457 (tooltip-show
468 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) 458 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
469 (buffer-string)))) 459 (let ((string (buffer-string)))
460 ;; remove newline for tooltip-use-echo-area
461 (substring string 0 (- (length string) 1))))))
470 462
471 463
472;;; Tooltip help. 464;;; Tooltip help.
@@ -520,23 +512,6 @@ Value is non-nil if this function handled the tip."
520 (tooltip-show tooltip-help-message) 512 (tooltip-show tooltip-help-message)
521 t)) 513 t))
522 514
523
524;;; Do this after all functions have been defined that are called from
525;;; `tooltip-mode'. The actual default value of `tooltip-mode' is set
526;;; in startup.el.
527
528;;;###autoload
529(defcustom tooltip-mode nil
530 "Non-nil if Tooltip mode is enabled.
531Setting this variable directly does not take effect;
532use either \\[customize] or the function `tooltip-mode'."
533 :set (lambda (symbol value)
534 (tooltip-mode (or value 0)))
535 :initialize 'custom-initialize-default
536 :type 'boolean
537 :require 'tooltip
538 :group 'tooltip)
539
540(provide 'tooltip) 515(provide 'tooltip)
541 516
542;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f 517;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f
diff --git a/src/ChangeLog b/src/ChangeLog
index 34ef6c228bb..24db3a9c55a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * xfns.c (hourglass_started): New function.
4
5 * dispextern.h: Declare hourglass_started.
6
7 * keyboard.c (Fexecute_extended_command): Restart hourglass
8 after call to Fcompleting_read if already started.
9
10 * gtkutil.c (xg_update_scrollbar_pos): Call x_sync so that the
11 GTK main loop is entered in xterm.c, thus doing the redraw.
12
132005-03-10 Kim F. Storm <storm@cua.dk>
14
15 * xdisp.c (pos_visible_p): Fix X value in last line of buffer.
16
12005-03-08 Kenichi Handa <handa@m17n.org> 172005-03-08 Kenichi Handa <handa@m17n.org>
2 18
3 * frame.c (x_set_font): Call set_default_ascii_font if an 19 * frame.c (x_set_font): Call set_default_ascii_font if an
diff --git a/src/dispextern.h b/src/dispextern.h
index feeae776149..b69f56d27b5 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2817,6 +2817,7 @@ EXFUN (Fx_show_tip, 6);
2817EXFUN (Fx_hide_tip, 0); 2817EXFUN (Fx_hide_tip, 0);
2818extern void start_hourglass P_ ((void)); 2818extern void start_hourglass P_ ((void));
2819extern void cancel_hourglass P_ ((void)); 2819extern void cancel_hourglass P_ ((void));
2820extern int hourglass_started P_ ((void));
2820extern int display_hourglass_p; 2821extern int display_hourglass_p;
2821 2822
2822/* Returns the background color of IMG, calculating one heuristically if 2823/* Returns the background color of IMG, calculating one heuristically if
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 6dcba3036c0..8bd83e40043 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2999,9 +2999,14 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height)
2999 GtkWidget *wparent = gtk_widget_get_parent (wscroll); 2999 GtkWidget *wparent = gtk_widget_get_parent (wscroll);
3000 3000
3001 /* Move and resize to new values. */ 3001 /* Move and resize to new values. */
3002 gtk_widget_set_size_request (wscroll, width, height);
3003 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); 3002 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
3004 3003 gtk_widget_set_size_request (wscroll, width, height);
3004 gtk_widget_queue_draw (wparent);
3005 gdk_window_process_all_updates ();
3006 /* GTK does not redraw until the main loop is entered again, but
3007 if there are no X events pending we will not enter it. So we sync
3008 here to get some events. */
3009 x_sync (f);
3005 SET_FRAME_GARBAGED (f); 3010 SET_FRAME_GARBAGED (f);
3006 cancel_mouse_face (f); 3011 cancel_mouse_face (f);
3007 } 3012 }
diff --git a/src/keyboard.c b/src/keyboard.c
index 525958020af..77e7cf48139 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1350,6 +1350,11 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",
1350 cancel_hourglass (); 1350 cancel_hourglass ();
1351#endif 1351#endif
1352 1352
1353 /* Unblock input if we enter with input blocked. This may happen if
1354 redisplay traps e.g. during tool-bar update with input blocked. */
1355 while (INPUT_BLOCKED_P)
1356 UNBLOCK_INPUT;
1357
1353 return Fthrow (Qtop_level, Qnil); 1358 return Fthrow (Qtop_level, Qnil);
1354} 1359}
1355 1360
@@ -9709,6 +9714,15 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
9709 Lisp_Object saved_keys, saved_last_point_position_buffer; 9714 Lisp_Object saved_keys, saved_last_point_position_buffer;
9710 Lisp_Object bindings, value; 9715 Lisp_Object bindings, value;
9711 struct gcpro gcpro1, gcpro2, gcpro3; 9716 struct gcpro gcpro1, gcpro2, gcpro3;
9717#ifdef HAVE_X_WINDOWS
9718 /* The call to Fcompleting_read wil start and cancel the hourglass,
9719 but if the hourglass was already scheduled, this means that no
9720 hourglass will be shown for the actual M-x command itself.
9721 So we restart it if it is already scheduled. Note that checking
9722 hourglass_shown_p is not enough, normally the hourglass is not shown,
9723 just scheduled to be shown. */
9724 int hstarted = hourglass_started ();
9725#endif
9712 9726
9713 saved_keys = Fvector (this_command_key_count, 9727 saved_keys = Fvector (this_command_key_count,
9714 XVECTOR (this_command_keys)->contents); 9728 XVECTOR (this_command_keys)->contents);
@@ -9740,6 +9754,10 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
9740 Qt, Qnil, Qextended_command_history, Qnil, 9754 Qt, Qnil, Qextended_command_history, Qnil,
9741 Qnil); 9755 Qnil);
9742 9756
9757#ifdef HAVE_X_WINDOWS
9758 if (hstarted) start_hourglass ();
9759#endif
9760
9743 if (STRINGP (function) && SCHARS (function) == 0) 9761 if (STRINGP (function) && SCHARS (function) == 0)
9744 error ("No command name given"); 9762 error ("No command name given");
9745 9763
diff --git a/src/xdisp.c b/src/xdisp.c
index 3499e95d383..b9ef2830959 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1301,6 +1301,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1301 /* Note that we may overshoot because of invisible text. */ 1301 /* Note that we may overshoot because of invisible text. */
1302 if (IT_CHARPOS (it) >= charpos) 1302 if (IT_CHARPOS (it) >= charpos)
1303 { 1303 {
1304 int top_x = it.current_x;
1304 int top_y = it.current_y; 1305 int top_y = it.current_y;
1305 int bottom_y = (last_height = 0, line_bottom_y (&it)); 1306 int bottom_y = (last_height = 0, line_bottom_y (&it));
1306 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); 1307 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
@@ -1309,15 +1310,12 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1309 visible_p = bottom_y > window_top_y; 1310 visible_p = bottom_y > window_top_y;
1310 else if (top_y < it.last_visible_y) 1311 else if (top_y < it.last_visible_y)
1311 visible_p = 1; 1312 visible_p = 1;
1312 if (visible_p && x) 1313 if (visible_p)
1313 { 1314 {
1314 *x = it.current_x; 1315 *x = top_x;
1315 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); 1316 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
1316 if (rtop) 1317 *rtop = max (0, window_top_y - top_y);
1317 { 1318 *rbot = max (0, bottom_y - it.last_visible_y);
1318 *rtop = max (0, window_top_y - top_y);
1319 *rbot = max (0, bottom_y - it.last_visible_y);
1320 }
1321 } 1319 }
1322 } 1320 }
1323 else 1321 else
@@ -1330,18 +1328,12 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1330 if (charpos < IT_CHARPOS (it)) 1328 if (charpos < IT_CHARPOS (it))
1331 { 1329 {
1332 visible_p = 1; 1330 visible_p = 1;
1333 if (x) 1331 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
1334 { 1332 *x = it2.current_x;
1335 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); 1333 *y = it2.current_y + it2.max_ascent - it2.ascent;
1336 *x = it2.current_x; 1334 *rtop = max (0, -it2.current_y);
1337 *y = it2.current_y + it2.max_ascent - it2.ascent; 1335 *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent)
1338 if (rtop) 1336 - it.last_visible_y));
1339 {
1340 *rtop = max (0, -it2.current_y);
1341 *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent)
1342 - it.last_visible_y));
1343 }
1344 }
1345 } 1337 }
1346 } 1338 }
1347 1339
diff --git a/src/xfns.c b/src/xfns.c
index 8267709767f..c45845e00ce 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4275,6 +4275,14 @@ static Lisp_Object Vhourglass_delay;
4275static void show_hourglass P_ ((struct atimer *)); 4275static void show_hourglass P_ ((struct atimer *));
4276static void hide_hourglass P_ ((void)); 4276static void hide_hourglass P_ ((void));
4277 4277
4278/* Return non-zero if houglass timer has been started or hourglass is shown. */
4279
4280int
4281hourglass_started ()
4282{
4283 return hourglass_shown_p || hourglass_atimer != NULL;
4284}
4285
4278 4286
4279/* Cancel a currently active hourglass timer, and start a new one. */ 4287/* Cancel a currently active hourglass timer, and start a new one. */
4280 4288