aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2005-04-19 13:33:31 +0000
committerKaroly Lorentey <[email protected]>2005-04-19 13:33:31 +0000
commit8d6f9bce72ee94ed6c297b79a181eac3f5beca74 (patch)
tree36cf3b6a5923171e371f9236eab36ad7de742b48
parent774a8da14bb2520b6adad223ab13f0b64f002872 (diff)
parentcd01ded928a8d082b9dbed6e9747c3d31b337b71 (diff)
Merged from [email protected] (patch 66, 266-268)
Patches applied: * [email protected]/emacs--cvs-trunk--0--patch-266 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-267 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-268 Merge from gnus--rel--5.10 * [email protected]/gnus--rel--5.10--patch-66 Update from CVS git-archimport-id: [email protected]/emacs--multi-tty--0--patch-330
-rw-r--r--lisp/ChangeLog30
-rw-r--r--lisp/desktop.el7
-rw-r--r--lisp/emulation/cua-base.el18
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/qp.el11
-rw-r--r--lisp/isearch.el63
-rw-r--r--lisp/tooltip.el20
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url.el26
-rw-r--r--lispref/ChangeLog5
-rw-r--r--lispref/customize.texi13
-rw-r--r--man/ChangeLog5
-rw-r--r--man/misc.texi3
-rw-r--r--src/ChangeLog53
-rw-r--r--src/dispextern.h8
-rw-r--r--src/dispnew.c6
-rw-r--r--src/fns.c4
-rw-r--r--src/fringe.c16
-rw-r--r--src/lread.c6
-rw-r--r--src/macterm.c6
-rw-r--r--src/window.c1
-rw-r--r--src/window.h3
-rw-r--r--src/xdisp.c52
-rw-r--r--src/xfaces.c5
-rw-r--r--src/xmenu.c10
25 files changed, 225 insertions, 155 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b97c774aa..4d8e8c6dd5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,33 @@
+2005-04-18 Stefan Monnier <[email protected]>
+
+ * isearch.el (isearch-edit-string): Make the search-ring available for
+ minibuffer history commands.
+ (minibuffer-local-isearch-map): Remove bindings for M-p and M-n,
+ the default history commands now work just as well.
+ (isearch-ring-retreat-edit, isearch-ring-advance-edit): Remove.
+
+2005-04-18 Kim F. Storm <[email protected]>
+
+ * emulation/cua-base.el (cua--pre-command-handler): Add more
+ elaborate check for shift modifier on non-window systems.
+
+2005-04-18 Lars Hansen <[email protected]>
+
+ * desktop.el: Make "--no-desktop" turn off `desktop-save-mode'.
+
+2005-04-18 Kim F. Storm <[email protected]>
+
+ * tooltip.el (tooltip-show): Change second arg to USE-ECHO-AREA
+ and make it optional. Don't test tooltip-gud-echo-area here.
+ (tooltip-gud-process-output, gdb-tooltip-print):
+ Pass tooltip-gud-echo-area to tooltip-show.
+ (tooltip-help-tips): Remove second optional arg to tooltip-show.
+
+2005-04-18 YAMAMOTO Mitsuharu <[email protected]>
+
+ * tooltip.el (tooltip-mode): `emacs-quick-startup' and
+ `display-graphic-p' may not be bound yet.
+
2005-04-17 Luc Teirlinck <[email protected]>
* startup.el (command-line): No longer enable Xterm Mouse mode by
diff --git a/lisp/desktop.el b/lisp/desktop.el
index ed663d375d..8e81e8826f 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1030,9 +1030,10 @@ If there are no buffers left to create, kill the timer."
'after-init-hook
'(lambda ()
(let ((key "--no-desktop"))
- (if (member key command-line-args)
- (delete key command-line-args)
- (when desktop-save-mode (desktop-read))))))
+ (when (member key command-line-args)
+ (setq command-line-args (delete key command-line-args))
+ (setq desktop-save-mode nil)))
+ (when desktop-save-mode (desktop-read))))
(provide 'desktop)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 77e8f63693..6aeb4bab5a 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1066,10 +1066,20 @@ If ARG is the atom `-', scroll upward by nearly full screen."
;; If rectangle is active, expand rectangle in specified direction and ignore the movement.
(if movement
(cond
- ((memq 'shift (event-modifiers
- (aref (if window-system
- (this-single-command-raw-keys)
- (this-single-command-keys)) 0)))
+ ((if window-system
+ (memq 'shift (event-modifiers
+ (aref (this-single-command-raw-keys) 0)))
+ (or
+ (memq 'shift (event-modifiers
+ (aref (this-single-command-keys) 0)))
+ ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home.
+ (and (boundp 'function-key-map)
+ function-key-map
+ (let ((ev (lookup-key function-key-map
+ (this-single-command-raw-keys))))
+ (and (vector ev)
+ (symbolp (setq ev (aref ev 0)))
+ (string-match "S-" (symbol-name ev)))))))
(unless mark-active
(push-mark-command nil t))
(setq cua--last-region-shifted t)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2ec1e0bc62..f08f21fadb 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-18 Katsumi Yamaoka <[email protected]>
+
+ * qp.el (quoted-printable-encode-region): Save excursion.
+
2005-04-13 Katsumi Yamaoka <[email protected]>
* gnus-art.el (gnus-mime-inline-part): Use mm-string-to-multibyte.
diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el
index 3789e0efda..1004abeb02 100644
--- a/lisp/gnus/qp.el
+++ b/lisp/gnus/qp.el
@@ -1,6 +1,7 @@
;;; qp.el --- Quoted-Printable functions
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <[email protected]>
;; Keywords: mail, extensions
@@ -100,15 +101,15 @@ You should probably avoid non-ASCII characters in this arg.
If `mm-use-ultra-safe-encoding' is set, fold lines unconditionally and
encode lines starting with \"From\"."
(interactive "r")
- (goto-char from)
- (if (re-search-forward (mm-string-to-multibyte "[^\x0-\x7f\x80-\xff]")
- to t)
- (error "Multibyte character in QP encoding region"))
(unless class
;; Avoid using 8bit characters. = is \075.
;; Equivalent to "^\000-\007\013\015-\037\200-\377="
(setq class "\010-\012\014\040-\074\076-\177"))
(save-excursion
+ (goto-char from)
+ (if (re-search-forward (mm-string-to-multibyte "[^\x0-\x7f\x80-\xff]")
+ to t)
+ (error "Multibyte character in QP encoding region"))
(save-restriction
(narrow-to-region from to)
;; Encode all the non-ascii and control characters.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index dfd50b2a8a..e01f2c0c0e 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -405,12 +405,6 @@ A value of nil means highlight all matches."
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(define-key map "\r" 'isearch-nonincremental-exit-minibuffer)
- (define-key map "\M-n" 'isearch-ring-advance-edit)
- (define-key map [next] 'isearch-ring-advance-edit)
- (define-key map [down] 'isearch-ring-advance-edit)
- (define-key map "\M-p" 'isearch-ring-retreat-edit)
- (define-key map [prior] 'isearch-ring-retreat-edit)
- (define-key map [up] 'isearch-ring-retreat-edit)
(define-key map "\M-\t" 'isearch-complete-edit)
(define-key map "\C-s" 'isearch-forward-exit-minibuffer)
(define-key map "\C-r" 'isearch-reverse-exit-minibuffer)
@@ -937,8 +931,6 @@ The following additional command keys are active while editing.
\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search.
\\[isearch-forward-exit-minibuffer] to resume isearching forward.
\\[isearch-reverse-exit-minibuffer] to resume isearching backward.
-\\[isearch-ring-advance-edit] to replace the search string with the next item in the search ring.
-\\[isearch-ring-retreat-edit] to replace the search string with the previous item in the search ring.
\\[isearch-complete-edit] to complete the search string using the search ring.
\\<isearch-mode-map>
If first char entered is \\[isearch-yank-word-or-char], then do word search instead."
@@ -1024,12 +1016,12 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
(isearch-unread e))
(setq cursor-in-echo-area nil)
(setq isearch-new-string
- (let (junk-ring)
- (read-from-minibuffer
- (isearch-message-prefix nil nil isearch-nonincremental)
- isearch-string
- minibuffer-local-isearch-map nil
- 'junk-ring nil t))
+ (read-from-minibuffer
+ (isearch-message-prefix nil nil isearch-nonincremental)
+ isearch-string
+ minibuffer-local-isearch-map nil
+ (if isearch-regexp 'regexp-search-ring 'search-ring)
+ nil t)
isearch-new-message
(mapconcat 'isearch-text-char-description
isearch-new-string "")))
@@ -1860,49 +1852,6 @@ Obsolete."
(interactive)
(isearch-ring-adjust nil))
-(defun isearch-ring-advance-edit (n)
- "Insert the next element of the search history into the minibuffer.
-With prefix arg N, insert the Nth element."
- (interactive "p")
- (let* ((yank-pointer-name (if isearch-regexp
- 'regexp-search-ring-yank-pointer
- 'search-ring-yank-pointer))
- (yank-pointer (eval yank-pointer-name))
- (ring (if isearch-regexp regexp-search-ring search-ring))
- (length (length ring)))
- (if (zerop length)
- ()
- (set yank-pointer-name
- (setq yank-pointer
- (mod (- (or yank-pointer 0) n)
- length)))
-
- (delete-field)
- (insert (nth yank-pointer ring))
- (goto-char (point-max)))))
-
-(defun isearch-ring-retreat-edit (n)
- "Insert the previous element of the search history into the minibuffer.
-With prefix arg N, insert the Nth element."
- (interactive "p")
- (isearch-ring-advance-edit (- n)))
-
-;;(defun isearch-ring-adjust-edit (advance)
-;; "Use the next or previous search string in the ring while in minibuffer."
-;; (isearch-ring-adjust1 advance)
-;; (erase-buffer)
-;; (insert isearch-string))
-
-;;(defun isearch-ring-advance-edit ()
-;; (interactive)
-;; (isearch-ring-adjust-edit 'advance))
-
-;;(defun isearch-ring-retreat-edit ()
-;; "Retreat to the previous search string in the ring while in the minibuffer."
-;; (interactive)
-;; (isearch-ring-adjust-edit nil))
-
-
(defun isearch-complete1 ()
;; Helper for isearch-complete and isearch-complete-edit
;; Return t if completion OK, nil if no completion exists.
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index c903dbac52..d70e20e5b6 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -188,8 +188,9 @@ With ARG, turn tooltip mode on if and only if ARG is positive."
;; If you change the :init-value below, you also need to change the
;; corresponding code in startup.el.
:init-value (not (or noninteractive
- emacs-quick-startup
- (not (display-graphic-p))
+ (and (boundp 'emacs-quick-startup) emacs-quick-startup)
+ (not (and (fboundp 'display-graphic-p)
+ (display-graphic-p)))
(not (fboundp 'x-show-tip))))
:group 'tooltip
(unless (or (null tooltip-mode) (fboundp 'x-show-tip))
@@ -289,7 +290,7 @@ change the existing association. Value is the resulting alist."
(push (cons key value) alist))
alist))
-(defun tooltip-show (text gud-tip)
+(defun tooltip-show (text &optional use-echo-area)
"Show a tooltip window displaying TEXT.
Text larger than `x-max-tooltip-size' is clipped.
@@ -300,8 +301,9 @@ is displayed. Otherwise, the tooltip pops at offsets specified by
`tooltip-x-offset' and `tooltip-y-offset' from the current mouse
position.
-GUD-TIP is t if the tooltip is from a GUD session and nil otherwise."
- (if (and gud-tip tooltip-gud-echo-area)
+Optional second arg USE-ECHO-AREA non-nil means to show tooltip
+in echo area."
+ (if use-echo-area
(message "%s" text)
(condition-case error
(let ((params (copy-sequence tooltip-frame-parameters))
@@ -417,7 +419,8 @@ This event can be examined by forms in TOOLTIP-GUD-DISPLAY.")
(defun tooltip-gud-process-output (process output)
"Process debugger output and show it in a tooltip window."
(set-process-filter process tooltip-gud-original-filter)
- (tooltip-show (tooltip-strip-prompt process output) t))
+ (tooltip-show (tooltip-strip-prompt process output)
+ tooltip-gud-echo-area))
(defun tooltip-gud-print-command (expr)
"Return a suitable command to print the expression EXPR.
@@ -464,7 +467,8 @@ This function must return nil if it doesn't handle EVENT."
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
(let ((string (buffer-string)))
;; remove newline for tooltip-gud-echo-area
- (substring string 0 (- (length string) 1)))) t))
+ (substring string 0 (- (length string) 1))))
+ tooltip-gud-echo-area))
;;; Tooltip help.
@@ -497,7 +501,7 @@ This is installed on the hook `tooltip-hook', which is run when
the timer with ID `tooltip-timeout-id' fires.
Value is non-nil if this function handled the tip."
(when (stringp tooltip-help-message)
- (tooltip-show tooltip-help-message nil)
+ (tooltip-show tooltip-help-message)
t))
(provide 'tooltip)
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 82b7f64dc0..a023bdf18c 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-18 Stefan Monnier <[email protected]>
+
+ * url.el (url-retrieve-synchronously): Work around the fact that
+ url-http sometimes doesn't call the callback.
+
2005-04-04 Lute Kamstra <[email protected]>
* url-handlers.el (url-handler-mode): Specify :group.
diff --git a/lisp/url/url.el b/lisp/url/url.el
index a9fd46bc23..05ef85c930 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -180,15 +180,23 @@ no further processing). URL is either a string or a parsed URL."
(url-debug 'retrieval
"Spinning in url-retrieve-synchronously: %S (%S)"
retrieval-done asynch-buffer)
- ;; We used to use `sit-for' here, but in some cases it wouldn't
- ;; work because apparently pending keyboard input would always
- ;; interrupt it before it got a chance to handle process input.
- ;; `sleep-for' was tried but it lead to other forms of
- ;; hanging. --Stef
- (unless (accept-process-output proc)
- ;; accept-process-output returned nil, maybe because the process
- ;; exited (and may have been replaced with another).
- (setq proc (get-buffer-process asynch-buffer)))))
+ (if (memq (process-status proc) '(closed exit signal failed))
+ ;; FIXME: It's not clear whether url-retrieve's callback is
+ ;; guaranteed to be called or not. It seems that url-http
+ ;; decides sometimes consciously not to call it, so it's not
+ ;; clear that it's a bug, but even if we need to decide how
+ ;; url-http can then warn us that the download has completed.
+ ;; In the mean time, we use this here workaround.
+ (setq retrieval-done t)
+ ;; We used to use `sit-for' here, but in some cases it wouldn't
+ ;; work because apparently pending keyboard input would always
+ ;; interrupt it before it got a chance to handle process input.
+ ;; `sleep-for' was tried but it lead to other forms of
+ ;; hanging. --Stef
+ (unless (accept-process-output proc)
+ ;; accept-process-output returned nil, maybe because the process
+ ;; exited (and may have been replaced with another).
+ (setq proc (get-buffer-process asynch-buffer))))))
asynch-buffer)))
(defun url-mm-callback (&rest ignored)
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 39bcba57c4..14be868090 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-18 Nick Roberts <[email protected]>
+
+ * customize.texi (Variable Definitions): Replace tooltip-mode
+ example with save-place.
+
2005-04-17 Richard M. Stallman <[email protected]>
* buffers.texi (Indirect Buffers): Clarify.
diff --git a/lispref/customize.texi b/lispref/customize.texi
index a1a61ab6b0..10911cea16 100644
--- a/lispref/customize.texi
+++ b/lispref/customize.texi
@@ -283,17 +283,14 @@ those other variables already have their intended values.
operation of a certain feature. Assuming that the package is coded to
check the value of the option, you still need to arrange for the package
to be loaded. You can do that with @code{:require}. @xref{Common
-Keywords}. Here is an example, from the library @file{tooltip.el}:
+Keywords}. Here is an example, from the library @file{saveplace.el}:
@example
-(defcustom tooltip-mode nil
- "Non-nil if Tooltip mode is enabled..."
- :set (lambda (symbol value)
- (tooltip-mode (or value 0)))
- :initialize 'custom-initialize-default
+(defcustom save-place nil
+ "*Non-nil means automatically save place in each file..."
:type 'boolean
- :require 'tooltip
- :group 'tooltip)
+ :require 'saveplace
+ :group 'save-place)
@end example
If a customization item has a type such as @code{hook} or @code{alist},
diff --git a/man/ChangeLog b/man/ChangeLog
index eccaa607db..694196c47b 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-18 Lars Hansen <[email protected]>
+
+ * misc.texi (Saving Emacs Sessions): Add that "--no-desktop" now
+ turns off desktop-save-mode.
+
2005-04-17 Luc Teirlinck <[email protected]>
* frames.texi (XTerm Mouse): Xterm Mouse mode is no longer enabled
diff --git a/man/misc.texi b/man/misc.texi
index f1e05cae89..f54bb3a79e 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -1937,7 +1937,8 @@ another directory by typing @kbd{M-x desktop-change-dir}. Typing
@kbd{M-x desktop-revert} reverts to the desktop previously reloaded.
Specify the option @samp{--no-desktop} on the command line when you
-don't want it to reload any saved desktop.
+don't want it to reload any saved desktop. This turns off
+@code{desktop-save-mode} for the current session.
@vindex desktop-restore-eager
By default, all the buffers in the desktop are restored at one go.
diff --git a/src/ChangeLog b/src/ChangeLog
index 3483a2c590..ac7d5fb07f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,55 @@
+2005-04-18 Kim F. Storm <[email protected]>
+
+ * dispextern.h (struct glyph_row): New member overlay_arrow_bitmap.
+ It replaces the corresponding member from struct window, as a
+ window may now show multiple overlay arrows.
+ Remove member overlay_arrow_p, superseeded by overlay_arrow_bitmap.
+
+ * dispnew.c (row_equal_p, update_window_line, scrolling_window):
+ Compare overlay_arrow_bitmap than overlay_arrow_p members.
+
+ * fringe.c (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
+ rather than from window.
+ (update_window_fringes): Compare overlay_arrow_bitmap rather than
+ overlay_arrow_p members.
+ (Ffringe_bitmaps_at_pos): Return fringe overlay_arrow_bitmap name
+ if not default.
+
+ * window.h (struct window): Remove member overlay_arrow_bitmap.
+
+ * window.c (make_window): Don't initialize overlay_arrow_bitmap.
+
+ * xdisp.c (overlay_arrow_string_or_property): Remove PBITMAP arg.
+ Calls changed. Don't check for overlay-arrow-bitmap property here.
+ (overlay_arrow_at_row): Remove PBITMAP arg. Instead, if left
+ fringe is present, return Lisp integer for bitmap (or -1 for default).
+ Fix value of overlay-arrow-bitmap property to be a symbol, use
+ lookup_fringe_bitmap to parse it.
+ (display_line): Change call to overlay_arrow_at_row. Store integer
+ return value as overlay bitmap in row rather than window.
+ Only show overlay arrow if row displays text, or if no other overlay
+ arrow is seen in window (if overlay marker is at point-max).
+
+2005-04-18 Thien-Thi Nguyen <[email protected]>
+
+ * xfaces.c (realize_x_face) [!HAVE_WINDOW_SYSTEM]: Return NULL.
+
+2005-04-18 Lute Kamstra <[email protected]>
+
+ * lread.c (Vloads_in_progress): Static.
+ * fns.c (Vloads_in_progress): Remove extern.
+ (load_in_progress): Add extern.
+ (Frequire): Use load_in_progress instead of Vloads_in_progress.
+
+2005-04-18 Thien-Thi Nguyen <[email protected]>
+
+ * xmenu.c (Fx_popup_menu): Initialize error_name to NULL.
+
+2005-04-18 YAMAMOTO Mitsuharu <[email protected]>
+
+ * macterm.c (XTread_socket): Don't beep on keyboard input even if
+ no frame is visible.
+
2005-04-16 Dan Nicolaescu <[email protected]>
* term.c (struct keys): Add support for shifted keys.
@@ -110,7 +162,6 @@
into "(any string)".
* lread.c (Vloads_in_progress): Not static.
-
* fns.c (Vloads_in_progress): Add extern.
(Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil.
diff --git a/src/dispextern.h b/src/dispextern.h
index fbc816865b..abcda4fc73 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -726,6 +726,11 @@ struct glyph_row
position of the next row. */
struct display_pos end;
+ /* Non-zero means the overlay arrow bitmap is on this line.
+ -1 means use default overlay arrow bitmap, else
+ it specifies actual fringe bitmap number. */
+ int overlay_arrow_bitmap;
+
/* Left fringe bitmap number (enum fringe_bitmap_type). */
unsigned left_user_fringe_bitmap : FRINGE_ID_BITS;
@@ -764,9 +769,6 @@ struct glyph_row
unsigned truncated_on_left_p : 1;
unsigned truncated_on_right_p : 1;
- /* 1 means the overlay arrow is on this line. */
- unsigned overlay_arrow_p : 1;
-
/* 1 means that this row displays a continued line, i.e. it has a
continuation mark at the right side. */
unsigned continued_p : 1;
diff --git a/src/dispnew.c b/src/dispnew.c
index f549a8dde9..d7b5590c53 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1506,7 +1506,7 @@ row_equal_p (w, a, b, mouse_face_p)
|| a->left_fringe_face_id != b->left_fringe_face_id
|| a->right_fringe_bitmap != b->right_fringe_bitmap
|| a->right_fringe_face_id != b->right_fringe_face_id
- || a->overlay_arrow_p != b->overlay_arrow_p
+ || a->overlay_arrow_bitmap != b->overlay_arrow_bitmap
|| a->exact_window_width_line_p != b->exact_window_width_line_p
|| a->overlapped_p != b->overlapped_p
|| (MATRIX_ROW_CONTINUATION_LINE_P (a)
@@ -4539,7 +4539,7 @@ update_window_line (w, vpos, mouse_face_overwritten_p)
|| desired_row->y != current_row->y
|| desired_row->visible_height != current_row->visible_height
|| desired_row->cursor_in_fringe_p != current_row->cursor_in_fringe_p
- || desired_row->overlay_arrow_p != current_row->overlay_arrow_p
+ || desired_row->overlay_arrow_bitmap != current_row->overlay_arrow_bitmap
|| current_row->redraw_fringe_bitmaps_p
|| desired_row->mode_line_p != current_row->mode_line_p
|| desired_row->exact_window_width_line_p != current_row->exact_window_width_line_p
@@ -5051,7 +5051,7 @@ scrolling_window (w, header_line_p)
|| to->right_fringe_bitmap != from->right_fringe_bitmap
|| to->left_fringe_face_id != from->left_fringe_face_id
|| to->right_fringe_face_id != from->right_fringe_face_id
- || to->overlay_arrow_p != from->overlay_arrow_p))
+ || to->overlay_arrow_bitmap != from->overlay_arrow_bitmap))
from->redraw_fringe_bitmaps_p = 1;
assign_row (to, from);
to->enabled_p = 1, from->enabled_p = 0;
diff --git a/src/fns.c b/src/fns.c
index e921579f79..daa9e10c46 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -66,7 +66,7 @@ int use_file_dialog;
extern int minibuffer_auto_raise;
extern Lisp_Object minibuf_window;
extern Lisp_Object Vlocale_coding_system;
-extern Lisp_Object Vloads_in_progress;
+extern int load_in_progress;
Lisp_Object Qstring_lessp, Qprovide, Qrequire;
Lisp_Object Qyes_or_no_p_history;
@@ -3460,7 +3460,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */)
even if the feature specified is already loaded.
But not more than once in any file,
and not when we aren't loading a file. */
- if (! NILP (Vloads_in_progress))
+ if (load_in_progress)
{
tem = Fcons (Qrequire, feature);
if (NILP (Fmember (tem, Vcurrent_load_list)))
diff --git a/src/fringe.c b/src/fringe.c
index 39479dfed2..19e6e60d11 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -700,11 +700,11 @@ draw_fringe_bitmap (w, row, left_p)
draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP);
- if (left_p && row->overlay_arrow_p)
+ if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP)
draw_fringe_bitmap_1 (w, row, 1, 1,
- (w->overlay_arrow_bitmap
- ? w->overlay_arrow_bitmap
- : OVERLAY_ARROW_BITMAP));
+ (row->overlay_arrow_bitmap < 0
+ ? OVERLAY_ARROW_BITMAP
+ : row->overlay_arrow_bitmap));
}
@@ -960,10 +960,10 @@ update_window_fringes (w, force_p)
cur->right_fringe_face_id = right_face_id;
}
- if (row->overlay_arrow_p != cur->overlay_arrow_p)
+ if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
{
redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
- cur->overlay_arrow_p = row->overlay_arrow_p;
+ cur->overlay_arrow_bitmap = row->overlay_arrow_bitmap;
}
row->left_fringe_bitmap = left;
@@ -1414,7 +1414,9 @@ Return nil if POS is not visible in WINDOW. */)
if (row)
return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap),
get_fringe_bitmap_name (row->right_fringe_bitmap),
- (row->overlay_arrow_p ? Qt : Qnil));
+ (row->overlay_arrow_bitmap == 0 ? Qnil
+ : row->overlay_arrow_bitmap < 0 ? Qt
+ : get_fringe_bitmap_name (row->overlay_arrow_bitmap)));
else
return Qnil;
}
diff --git a/src/lread.c b/src/lread.c
index d36d45c8c7..869e95a00e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1,6 +1,6 @@
/* Lisp parsing and input streams.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -90,7 +90,7 @@ Lisp_Object Qinhibit_file_name_operation;
extern Lisp_Object Qevent_symbol_element_mask;
extern Lisp_Object Qfile_exists_p;
-/* non-zero if inside `load' */
+/* non-zero iff inside `load' */
int load_in_progress;
/* Directory in which the sources were found. */
@@ -194,7 +194,7 @@ static int new_backquote_flag;
/* A list of file names for files being loaded in Fload. Used to
check for recursive loads. */
-Lisp_Object Vloads_in_progress;
+static Lisp_Object Vloads_in_progress;
/* Non-zero means load dangerous compiled Lisp files. */
diff --git a/src/macterm.c b/src/macterm.c
index 5aab6ec536..7bef378b59 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -8590,13 +8590,15 @@ XTread_socket (sd, expected, hold_quit)
struct frame *f = mac_focus_frame (dpyinfo);
WindowPtr window_ptr;
- if (!f)
+#if 0
+ if (dpyinfo->x_focus_frame == NULL)
{
/* Beep if wheel move occurs when all the frames
are invisible. */
SysBeep(1);
break;
}
+#endif
GetEventParameter(eventRef, kEventParamMouseWheelDelta,
typeSInt32, NULL, sizeof (SInt32),
@@ -9011,6 +9013,7 @@ XTread_socket (sd, expected, hold_quit)
break;
#endif
+#if 0
if (dpyinfo->x_focus_frame == NULL)
{
/* Beep if keyboard input occurs when all the frames
@@ -9018,6 +9021,7 @@ XTread_socket (sd, expected, hold_quit)
SysBeep (1);
break;
}
+#endif
{
static SInt16 last_key_script = -1;
diff --git a/src/window.c b/src/window.c
index a1b3c879bb..86c16ff571 100644
--- a/src/window.c
+++ b/src/window.c
@@ -288,7 +288,6 @@ make_window ()
p->fringes_outside_margins = Qnil;
p->scroll_bar_width = Qnil;
p->vertical_scroll_bar_type = Qt;
- p->overlay_arrow_bitmap = 0;
Vwindow_list = Qnil;
return val;
diff --git a/src/window.h b/src/window.h
index 8df0b6bb3e..493b5aa948 100644
--- a/src/window.h
+++ b/src/window.h
@@ -259,9 +259,6 @@ struct window
/* This is handy for undrawing the cursor. */
int phys_cursor_ascent, phys_cursor_height;
- /* Alternate overlay-arrow-bitmap in this window. */
- int overlay_arrow_bitmap;
-
/* Non-zero means the cursor is currently displayed. This can be
set to zero by functions overpainting the cursor image. */
unsigned phys_cursor_on_p : 1;
diff --git a/src/xdisp.c b/src/xdisp.c
index c832f1fa5e..12ee4fef7d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9638,22 +9638,14 @@ redisplay ()
static Lisp_Object
-overlay_arrow_string_or_property (var, pbitmap)
+overlay_arrow_string_or_property (var)
Lisp_Object var;
- int *pbitmap;
{
- Lisp_Object pstr = Fget (var, Qoverlay_arrow_string);
- Lisp_Object bitmap;
+ Lisp_Object val;
- if (pbitmap)
- {
- *pbitmap = 0;
- if (bitmap = Fget (var, Qoverlay_arrow_bitmap), INTEGERP (bitmap))
- *pbitmap = XINT (bitmap);
- }
+ if (val = Fget (var, Qoverlay_arrow_string), STRINGP (val))
+ return val;
- if (!NILP (pstr))
- return pstr;
return Voverlay_arrow_string;
}
@@ -9703,7 +9695,7 @@ overlay_arrows_changed_p ()
continue;
if (! EQ (COERCE_MARKER (val),
Fget (var, Qlast_arrow_position))
- || ! (pstr = overlay_arrow_string_or_property (var, 0),
+ || ! (pstr = overlay_arrow_string_or_property (var),
EQ (pstr, Fget (var, Qlast_arrow_string))))
return 1;
}
@@ -9733,7 +9725,7 @@ update_overlay_arrows (up_to_date)
Fput (var, Qlast_arrow_position,
COERCE_MARKER (val));
Fput (var, Qlast_arrow_string,
- overlay_arrow_string_or_property (var, 0));
+ overlay_arrow_string_or_property (var));
}
else if (up_to_date < 0
|| !NILP (Fget (var, Qlast_arrow_position)))
@@ -9746,14 +9738,13 @@ update_overlay_arrows (up_to_date)
/* Return overlay arrow string to display at row.
- Return t if display as bitmap in left fringe.
+ Return integer (bitmap number) for arrow bitmap in left fringe.
Return nil if no overlay arrow. */
static Lisp_Object
-overlay_arrow_at_row (it, row, pbitmap)
+overlay_arrow_at_row (it, row)
struct it *it;
struct glyph_row *row;
- int *pbitmap;
{
Lisp_Object vlist;
@@ -9773,17 +9764,21 @@ overlay_arrow_at_row (it, row, pbitmap)
&& current_buffer == XMARKER (val)->buffer
&& (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
{
- val = overlay_arrow_string_or_property (var, pbitmap);
if (FRAME_WINDOW_P (it->f)
&& WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
- return Qt;
- if (STRINGP (val))
- return val;
- break;
+ {
+ if (val = Fget (var, Qoverlay_arrow_bitmap), SYMBOLP (val))
+ {
+ int fringe_bitmap;
+ if ((fringe_bitmap = lookup_fringe_bitmap (val)) != 0)
+ return make_number (fringe_bitmap);
+ }
+ return make_number (-1); /* Use default arrow bitmap */
+ }
+ return overlay_arrow_string_or_property (var);
}
}
- *pbitmap = 0;
return Qnil;
}
@@ -14847,7 +14842,6 @@ display_line (it)
struct it *it;
{
struct glyph_row *row = it->glyph_row;
- int overlay_arrow_bitmap;
Lisp_Object overlay_arrow_string;
/* We always start displaying at hpos zero even if hscrolled. */
@@ -15255,9 +15249,9 @@ display_line (it)
mark this glyph row as the one containing the overlay arrow.
This is clearly a mess with variable size fonts. It would be
better to let it be displayed like cursors under X. */
- if ((overlay_arrow_string
- = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap),
- !NILP (overlay_arrow_string)))
+ if ((row->displays_text_p || !overlay_arrow_seen)
+ && (overlay_arrow_string = overlay_arrow_at_row (it, row),
+ !NILP (overlay_arrow_string)))
{
/* Overlay arrow in window redisplay is a fringe bitmap. */
if (STRINGP (overlay_arrow_string))
@@ -15287,8 +15281,8 @@ display_line (it)
}
else
{
- it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;
- row->overlay_arrow_p = 1;
+ xassert (INTEGERP (overlay_arrow_string));
+ row->overlay_arrow_bitmap = XINT (overlay_arrow_string);
}
overlay_arrow_seen = 1;
}
diff --git a/src/xfaces.c b/src/xfaces.c
index 51dcfb144d..89267c8f7f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -7115,8 +7115,9 @@ realize_x_face (cache, attrs, c, base_face)
int c;
struct face *base_face;
{
+ struct face *face = NULL;
#ifdef HAVE_WINDOW_SYSTEM
- struct face *face, *default_face;
+ struct face *default_face;
struct frame *f;
Lisp_Object stipple, overline, strike_through, box;
@@ -7312,8 +7313,8 @@ realize_x_face (cache, attrs, c, base_face)
face->stipple = load_pixmap (f, stipple, &face->pixmap_w, &face->pixmap_h);
xassert (FACE_SUITABLE_FOR_CHAR_P (face, c));
- return face;
#endif /* HAVE_WINDOW_SYSTEM */
+ return face;
}
diff --git a/src/xmenu.c b/src/xmenu.c
index b29b74b6e4..f32074c2f6 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -771,7 +771,7 @@ cached information about equivalent key sequences. */)
Lisp_Object keymap, tem;
int xpos = 0, ypos = 0;
Lisp_Object title;
- char *error_name;
+ char *error_name = NULL;
Lisp_Object selection;
FRAME_PTR f = NULL;
Lisp_Object x, y, window;
@@ -2483,7 +2483,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
break;
}
-
+
/* Display the menu. */
gtk_widget_show_all (menu);
gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
@@ -2601,7 +2601,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
/* Display the menu. */
lw_popup_menu (menu, (XEvent *) &dummy);
popup_activated_flag = 1;
-
+
{
int fact = 4 * sizeof (LWLIB_ID);
int specpdl_count = SPECPDL_INDEX ();
@@ -3225,7 +3225,7 @@ pop_down_menu (arg)
{
struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
-
+
FRAME_PTR f = p1->pointer;
XMenu *menu = p2->pointer;
@@ -3459,7 +3459,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
#ifndef MSDOS
XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f));
#endif
-
+
record_unwind_protect (pop_down_menu,
Fcons (make_save_value (f, 0),
make_save_value (menu, 0)));