From 904db1a29f0d107e51f294029181ffec8a4be80b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:34:31 +0000 Subject: [PATCH 001/166] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index e58ddb74284..69ad996c465 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-10-04 Kim F. Storm + + * .gdbinit (pp): Shorthand for p ARG + pr. + (ff): New command: flush frame updates (X only). + 2004-10-03 Michael Albinus * fileio.c (auto_save_1) Call Ffile_modes for remote files. From 6c5d0c5224d10720ec3039bf7b4bbe3254d7b228 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:34:59 +0000 Subject: [PATCH 002/166] (pp): Shorthand for p ARG + pr. (ff): New command: flush frame updates (X only). --- src/.gdbinit | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/.gdbinit b/src/.gdbinit index fe9ddf7dbb7..1bcb9f6789b 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -60,6 +60,16 @@ Print the emacs s-expression which is $. Works only when an inferior emacs is executing. end +# Print out s-expressions +define pp + set $tmp = $arg0 + set debug_print ($tmp) +end +document pp +Print the argument as an emacs s-expression +Works only when an inferior emacs is executing. +end + define xtype xgettype $ output $type @@ -429,6 +439,16 @@ document xreload end xreload +# Flush display (X only) +define ff + set x_flush (0) +end +document ff +Flush pending X window display updates to screen. +Works only when an inferior emacs is executing. +end + + define hook-run xreload end From 1ce9f40ad4ecdb669c8c57a6cf3994e7fa9b0474 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:37:01 +0000 Subject: [PATCH 003/166] Mention pp and ff commands. --- etc/DEBUG | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/DEBUG b/etc/DEBUG index bcc0bd84182..6419b3dfd81 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -69,9 +69,11 @@ fatal error, you can use the GDB command `pr'. First print the value in the ordinary way, with the `p' command. Then type `pr' with no arguments. This calls a subroutine which uses the Lisp printer. -Note: It is not a good idea to try `pr' if you know that Emacs is in -deep trouble: its stack smashed (e.g., if it encountered SIGSEGV due -to stack overflow), or crucial data structures, such as `obarray', +You can also use `pp value' to print the emacs value directly. + +Note: It is not a good idea to try `pr' or `pp' if you know that Emacs +is in deep trouble: its stack smashed (e.g., if it encountered SIGSEGV +due to stack overflow), or crucial data structures, such as `obarray', corrupted, etc. In such cases, the Emacs subroutine called by `pr' might make more damage, like overwrite some data that is important for debugging the original problem. @@ -442,6 +444,9 @@ Several more functions for debugging display code are available in Emacs compiled with GLYPH_DEBUG defined; type "C-h f dump- TAB" and "C-h f trace- TAB" to see the full list. +When you debug display problems running emacs under X, you can use +the `ff' command to flush all pending display updates to the screen. + ** Debugging LessTif From 37e34af710e7f1e7accd13c42fd3e6796a7b02ec Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:46:04 +0000 Subject: [PATCH 004/166] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 69ad996c465..c5ac065b132 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2004-10-04 Kim F. Storm + * window.c (coordinates_in_window): Relax check for cursor + on vertial border between mode lines. + (Fset_window_fringes): Do not allow negative widths. + (Fset_window_scroll_bars): Likewise. + * .gdbinit (pp): Shorthand for p ARG + pr. (ff): New command: flush frame updates (X only). From cb639b8f7c64fff917e85d8f96431f95959d969c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:46:19 +0000 Subject: [PATCH 005/166] (coordinates_in_window): Relax check for cursor on vertial border between mode lines. (Fset_window_fringes): Do not allow negative widths. (Fset_window_scroll_bars): Likewise. --- src/window.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/window.c b/src/window.c index c696d7f9e27..11dabdaf964 100644 --- a/src/window.c +++ b/src/window.c @@ -607,9 +607,6 @@ coordinates_in_window (w, x, y) int grabbable_width = ux; int lmargin_width, rmargin_width, text_left, text_right; - if (*x < x0 || *x >= x1) - return ON_NOTHING; - /* In what's below, we subtract 1 when computing right_x because we want the rightmost pixel, which is given by left_pixel+width-1. */ if (w->pseudo_window_p) @@ -659,6 +656,9 @@ coordinates_in_window (w, x, y) return ON_VERTICAL_BORDER; } + if (*x < x0 || *x >= x1) + return ON_NOTHING; + /* Convert X and Y to window relative coordinates. Mode line starts at left edge of window. */ *x -= x0; @@ -673,6 +673,9 @@ coordinates_in_window (w, x, y) goto header_vertical_border_check; } + if (*x < x0 || *x >= x1) + return ON_NOTHING; + /* Outside any interesting column? */ if (*x < left_x || *x > right_x) return ON_SCROLL_BAR; @@ -6034,9 +6037,9 @@ display marginal areas and the text area. */) struct window *w = decode_window (window); if (!NILP (left)) - CHECK_NUMBER (left); + CHECK_NATNUM (left); if (!NILP (right)) - CHECK_NUMBER (right); + CHECK_NATNUM (right); if (!EQ (w->left_fringe_width, left) || !EQ (w->right_fringe_width, right) @@ -6096,7 +6099,7 @@ If TYPE is t, use the frame's scroll-bar type. */) struct window *w = decode_window (window); if (!NILP (width)) - CHECK_NUMBER (width); + CHECK_NATNUM (width); if (XINT (width) == 0) vertical_type = Qnil; From 562020fe6f943c77000fdaa2b3def3ea633fc1b1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:57:13 +0000 Subject: [PATCH 006/166] (define_frame_cursor1): Do not change frame cursor while tracking/dragging mouse. --- src/ChangeLog | 4 ++++ src/xdisp.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c5ac065b132..d6a7624de20 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2004-10-04 Kim F. Storm + * xdisp.c (define_frame_cursor1): Do not change frame cursor + while tracking/dragging mouse. + (x_draw_vertical_border): Do not draw line if frame has scroll bars. + * window.c (coordinates_in_window): Relax check for cursor on vertial border between mode lines. (Fset_window_fringes): Do not allow negative widths. diff --git a/src/xdisp.c b/src/xdisp.c index ddd247b3430..82fa97c5190 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -215,6 +215,8 @@ extern int pending_menu_activation; extern int interrupt_input; extern int command_loop_level; +extern Lisp_Object do_mouse_tracking; + extern int minibuffer_auto_raise; extern Lisp_Object Vminibuffer_list; @@ -20764,6 +20766,10 @@ define_frame_cursor1 (f, cursor, pointer) Cursor cursor; Lisp_Object pointer; { + /* Do not change cursor shape while dragging mouse. */ + if (!NILP (do_mouse_tracking)) + return; + if (!NILP (pointer)) { if (EQ (pointer, Qarrow)) From b55d59bad9fa501202e8eb42a76737ffc6a3ea1d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 13:57:31 +0000 Subject: [PATCH 007/166] (x_draw_vertical_border): Do not draw line if frame has scroll bars. --- src/xdisp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index 82fa97c5190..37a0f9bb9d0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21631,6 +21631,9 @@ x_draw_vertical_border (w) do it for frames with vertical scroll bars because either the right scroll bar of a window, or the left scroll bar of its neighbor will suffice as a border. */ + if (FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (w->frame))) + return; + if (!WINDOW_RIGHTMOST_P (w) && !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) { From 25f7220cc925403112342dd62f566a81e6f62f4f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 14:06:28 +0000 Subject: [PATCH 008/166] *** empty log message *** --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d6a7624de20..bc2de24804f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2004-10-04 Kim F. Storm + * xterm.c (XTset_vertical_scroll_bar): Improve handling of scroll + bars with fractional column width. If scroll bar separates two + windows, move it towards the window it belongs to. Only update + the padding area below the scroll bar widget when necessary, + i.e. when scroll bar widget is created, moved, or resized. + * xdisp.c (define_frame_cursor1): Do not change frame cursor while tracking/dragging mouse. (x_draw_vertical_border): Do not draw line if frame has scroll bars. From 13fcb8896ef7374bd957823f8e526d0ced20f287 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 14:07:06 +0000 Subject: [PATCH 009/166] (XTset_vertical_scroll_bar): Improve handling of scroll bars with fractional column width. If scroll bar separates two windows, move it towards the window it belongs to. Only update the padding area below the scroll bar widget when necessary, i.e. when scroll bar widget is created, moved, or resized. --- src/xterm.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index acbb30ef21b..97e21d1f255 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5046,9 +5046,15 @@ XTset_vertical_scroll_bar (w, portion, whole, position) /* Compute the left edge of the scroll bar. */ #ifdef USE_TOOLKIT_SCROLL_BARS if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) - sb_left = left + width - sb_width - (width - sb_width) / 2; + sb_left = (left + + (WINDOW_RIGHTMOST_P (w) + ? width - sb_width - (width - sb_width) / 2 + : 0)); else - sb_left = left + (width - sb_width) / 2; + sb_left = (left + + (WINDOW_LEFTMOST_P (w) + ? (width - sb_width) / 2 + : width - sb_width)); #else if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) sb_left = left + width - sb_width; @@ -5101,19 +5107,20 @@ XTset_vertical_scroll_bar (w, portion, whole, position) width); #else /* not USE_GTK */ - /* Since toolkit scroll bars are smaller than the space reserved - for them on the frame, we have to clear "under" them. */ - if (width > 0 && height > 0) - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, width, height, False); /* Move/size the scroll bar widget. */ if (mask) + { + /* Since toolkit scroll bars are smaller than the space reserved + for them on the frame, we have to clear "under" them. */ + if (width > 0 && height > 0) + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + left, top, width, height, False); XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, top, sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, max (height, 1), 0); - + } #endif /* not USE_GTK */ #else /* not USE_TOOLKIT_SCROLL_BARS */ From d3848fe90d754861881f185b1bc1445d70fc8cdc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 14:13:18 +0000 Subject: [PATCH 010/166] (Ffringe_bitmaps_at_pos): Change return value from cons to list. Include overlay arrow bitmap in return value. --- src/fringe.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/fringe.c b/src/fringe.c index af2d40b7ee2..71057e1b5cb 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1343,9 +1343,10 @@ DEFUN ("fringe-bitmaps-at-pos", Ffringe_bitmaps_at_pos, Sfringe_bitmaps_at_pos, 0, 2, 0, doc: /* Return fringe bitmaps of row containing position POS in window WINDOW. If WINDOW is nil, use selected window. If POS is nil, use value of point -in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT -are the fringe bitmap numbers for the bitmaps in the left and right fringe, -resp. If left or right fringe is empty, the corresponding element is nil. +in that window. Return value is a list (LEFT RIGHT OV), where LEFT +is the symbol for the bitmap in the left fringe (or nil if no bitmap), +RIGHT is similar for the right fringe, and OV is non-nil if there is an +overlay arrow in the left fringe. Return nil if POS is not visible in WINDOW. */) (pos, window) Lisp_Object pos, window; @@ -1373,8 +1374,9 @@ Return nil if POS is not visible in WINDOW. */) row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); row = row_containing_pos (w, textpos, row, NULL, 0); if (row) - return Fcons (get_fringe_bitmap_name (row->left_fringe_bitmap), - get_fringe_bitmap_name (row->right_fringe_bitmap)); + return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap), + get_fringe_bitmap_name (row->right_fringe_bitmap), + (row->overlay_arrow_p ? Qt : Qnil)); else return Qnil; } From 0207b8ad25094fdcd48660eb29db2991f6462f2a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 4 Oct 2004 14:13:38 +0000 Subject: [PATCH 011/166] *** empty log message *** --- etc/ChangeLog | 4 ++++ src/ChangeLog | 3 +++ 2 files changed, 7 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 981fd88ba3a..29d160da55b 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2004-10-04 Kim F. Storm + + * DEBUG: Mention pp and ff commands. + 2004-09-26 Luc Teirlinck * enriched.doc: `enriched-annotation-alist' is now called diff --git a/src/ChangeLog b/src/ChangeLog index bc2de24804f..8f6b2297692 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2004-10-04 Kim F. Storm + * fringe.c (Ffringe_bitmaps_at_pos): Change return value from cons + to list. Include overlay arrow bitmap in return value. + * xterm.c (XTset_vertical_scroll_bar): Improve handling of scroll bars with fractional column width. If scroll bar separates two windows, move it towards the window it belongs to. Only update From 98fdd1744a9b68f0a62eb84529bc5a4906dae6f7 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 4 Oct 2004 22:32:59 +0000 Subject: [PATCH 012/166] (enriched-mode-map): Give `set-left-margin' and `set-right-margin' bindings that follow the minor mode conventions. --- lisp/textmodes/enriched.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el index c2ed47cb48d..71bb6cf137d 100644 --- a/lisp/textmodes/enriched.el +++ b/lisp/textmodes/enriched.el @@ -258,8 +258,8 @@ Commands: (define-key enriched-mode-map "\M-j" 'facemenu-justification-menu) (define-key enriched-mode-map "\M-S" 'set-justification-center) (define-key enriched-mode-map "\C-x\t" 'increase-left-margin) -(define-key enriched-mode-map "\C-c\C-l" 'set-left-margin) -(define-key enriched-mode-map "\C-c\C-r" 'set-right-margin) +(define-key enriched-mode-map "\C-c[" 'set-left-margin) +(define-key enriched-mode-map "\C-c]" 'set-right-margin) ;;; ;;; Some functions dealing with text-properties, especially indentation From 0c4f5f23b38e90f5d85e61a413dfce5d6bf67661 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 4 Oct 2004 22:38:22 +0000 Subject: [PATCH 013/166] Update for new bindings of `set-left-margin' and `set-right-margin'. --- etc/enriched.doc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/enriched.doc b/etc/enriched.doc index 55e11004f05..122652f005a 100644 --- a/etc/enriched.doc +++ b/etc/enriched.doc @@ -98,8 +98,8 @@ direct request, such as using the return key or the C-o The fill functions also understand margins, which can be set for any region of a document. In addition to the menu items, which increase or decrease the margins, there are two commands for -setting the margins absolutely: C-c C-l (set-left-margin) and C-c -C-r (set-right-margin). +setting the margins absolutely: C-c [ (set-left-margin) and C-c +] (set-right-margin). You can change indentation at any point in a paragraph, which From 5086e75d2a30c6b26f639fc58fb4c992262b2a4c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 4 Oct 2004 23:00:13 +0000 Subject: [PATCH 014/166] *** empty log message *** --- etc/ChangeLog | 5 +++++ etc/NEWS | 5 +++++ lisp/ChangeLog | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 29d160da55b..e410e315417 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2004-10-04 Luc Teirlinck + + * enriched.doc: Update for new bindings of `set-left-margin' and + `set-right-margin'. + 2004-10-04 Kim F. Storm * DEBUG: Mention pp and ff commands. diff --git a/etc/NEWS b/etc/NEWS index 0f3d5b2ce7a..36bc60f7981 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -98,6 +98,11 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 ++++ +** In Enriched mode, `set-left-margin' and `set-right-margin' are now +by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' +and `C-c C-r'. + +++ ** In processing a local variables list, Emacs strips the prefix and suffix are from every line before processing all the lines. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29abaaf21b8..b2572012798 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-04 Luc Teirlinck + + * textmodes/enriched.el (enriched-mode-map): Give + `set-left-margin' and `set-right-margin' bindings that follow the + minor mode conventions. + 2004-10-03 Stefan * textmodes/tex-mode.el (tex-dvi-view-command): Use `yap' on w32. From 7c3bb5a5dbc6476fc864b6bdd5cb3365883a6547 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 4 Oct 2004 23:18:11 +0000 Subject: [PATCH 015/166] * gnus-group.el (gnus-update-group-mark-positions): * gnus-sum.el (gnus-update-summary-mark-positions): * message.el (message-check-news-body-syntax): * gnus-msg.el (gnus-debug): Use `string-as-multibyte' to convert 8-bit unibyte values to a multibyte string for search functions. --- lisp/gnus/ChangeLog | 8 ++++++++ lisp/gnus/gnus-group.el | 3 ++- lisp/gnus/gnus-msg.el | 3 ++- lisp/gnus/gnus-sum.el | 18 +++++++++++------- lisp/gnus/message.el | 4 +++- 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 907ad5f3411..c072a77a807 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2004-10-05 Juri Linkov + + * gnus-group.el (gnus-update-group-mark-positions): + * gnus-sum.el (gnus-update-summary-mark-positions): + * message.el (message-check-news-body-syntax): + * gnus-msg.el (gnus-debug): Use `string-as-multibyte' to convert + 8-bit unibyte values to a multibyte string for search functions. + 2004-10-01 Katsumi Yamaoka * gnus-sum.el (gnus-summary-toggle-header): Make it work even if diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9f7b259e066..abf99cbfd64 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1046,7 +1046,8 @@ The following commands are available: (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) (goto-char (point-min)) (setq gnus-group-mark-positions - (list (cons 'process (and (search-forward "\200" nil t) + (list (cons 'process (and (search-forward + (string-as-multibyte "\200") nil t) (- (point) 2)))))))) (defun gnus-mouse-pick-group (e) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 33531e7f8a4..77395ca5042 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1534,7 +1534,8 @@ The source file has to be in the Emacs load path." ;; Remove any control chars - they seem to cause trouble for some ;; mailers. (Byte-compiled output from the stuff above.) (goto-char point) - (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t) + (while (re-search-forward (string-as-multibyte + "[\000-\010\013-\037\200-\237]") nil t) (replace-match (format "\\%03o" (string-to-char (match-string 0))) t t)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 92ba2346949..abbecbbdff2 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3231,20 +3231,24 @@ buffer that was in action when the last article was fetched." [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil] 0 nil t 128 t nil "" nil 1) (goto-char (point-min)) - (setq pos (list (cons 'unread (and (search-forward "\200" nil t) - (- (point) (point-min) 1))))) + (setq pos (list (cons 'unread + (and (search-forward + (string-as-multibyte "\200") nil t) + (- (point) (point-min) 1))))) (goto-char (point-min)) - (push (cons 'replied (and (search-forward "\201" nil t) + (push (cons 'replied (and (search-forward + (string-as-multibyte "\201") nil t) (- (point) (point-min) 1))) pos) (goto-char (point-min)) - (push (cons 'score (and (search-forward "\202" nil t) + (push (cons 'score (and (search-forward + (string-as-multibyte "\202") nil t) (- (point) (point-min) 1))) pos) (goto-char (point-min)) - (push (cons 'download - (and (search-forward "\203" nil t) - (- (point) (point-min) 1))) + (push (cons 'download (and (search-forward + (string-as-multibyte "\203") nil t) + (- (point) (point-min) 1))) pos))) (setq gnus-summary-mark-positions pos)))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8e5edbc048a..85f918986d5 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4399,7 +4399,9 @@ Otherwise, generate and save a value for `canlock-password' first." nil)))) ;; Check for control characters. (message-check 'control-chars - (if (re-search-forward "[\000-\007\013\015-\032\034-\037\200-\237]" nil t) + (if (re-search-forward + (string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]") + nil t) (y-or-n-p "The article contains control characters. Really post? ") t)) From 6e7d9eaedde065fdc054f2813524b9ac848befb0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Oct 2004 23:32:25 +0000 Subject: [PATCH 016/166] From Emilio C. Lopes : (From Other Calendar): Add calendar-goto-iso-week. --- man/calendar.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man/calendar.texi b/man/calendar.texi index 9e3d3cf9f41..a4eca0513ff 100644 --- a/man/calendar.texi +++ b/man/calendar.texi @@ -754,6 +754,7 @@ other than Mayan; for the Mayan calendar, see the following section. @kindex g @var{char} @r{(Calendar mode)} @findex calendar-goto-iso-date +@findex calendar-goto-iso-week @findex calendar-goto-julian-date @findex calendar-goto-astro-day-number @findex calendar-goto-hebrew-date @@ -767,6 +768,9 @@ other than Mayan; for the Mayan calendar, see the following section. @item g c Move to a date specified in the ISO commercial calendar (@code{calendar-goto-iso-date}). +@item g w +Move to a week specified in the ISO commercial calendar +(@code{calendar-goto-iso-week}). @item g j Move to a date specified in the Julian calendar (@code{calendar-goto-julian-date}). From 554b59cd747c9ce6a8c3f356767dc875f312c105 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Oct 2004 23:34:39 +0000 Subject: [PATCH 017/166] Add entry from Emilio Lopes . --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 36bc60f7981..273886da2d0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1411,6 +1411,11 @@ appointments, paydays or anything else using a sexp. year and day number, and moves to that date. Negative day numbers count backward from the end of the year. ++++ +** The new Calendar function `calendar-goto-iso-week' (g w) +prompts for a year and a week number, and moves to the first +day of that ISO week. + --- ** The functions `holiday-easter-etc' and `holiday-advent' now take arguments, and only report on the specified holiday rather than all. From b76a84cd8644432940235ad5e96482892007a58b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Oct 2004 23:42:37 +0000 Subject: [PATCH 018/166] Update copyright and maintainer. (calendar-iso-read-args): New function, for old interactive spec from calendar-goto-iso-date. (calendar-goto-iso-date): Use it. (calendar-goto-iso-week): New function. Suggested by Emilio C. Lopes . --- lisp/calendar/cal-iso.el | 53 +++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 0d9ad45c7d6..058bdf071d7 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el @@ -1,8 +1,9 @@ ;;; cal-iso.el --- calendar functions for the ISO calendar -;; Copyright (C) 1995, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2004 Free Software Foundation, Inc. ;; Author: Edward M. Reingold +;; Maintainer: Glenn Morris ;; Keywords: calendar ;; Human-Keywords: ISO calendar, calendar, diary @@ -96,27 +97,39 @@ Defaults to today's date if DATE is not given." (message "ISO date: %s" (calendar-iso-date-string (calendar-cursor-to-date t)))) +(defun calendar-iso-read-args (&optional dayflag) + "Interactively read the arguments for an iso date command." + (let* ((today (calendar-current-date)) + (year (calendar-read + "ISO calendar year (>0): " + '(lambda (x) (> x 0)) + (int-to-string (extract-calendar-year today)))) + (no-weeks (extract-calendar-month + (calendar-iso-from-absolute + (1- + (calendar-dayname-on-or-before + 1 (calendar-absolute-from-gregorian + (list 1 4 (1+ year)))))))) + (week (calendar-read + (format "ISO calendar week (1-%d): " no-weeks) + '(lambda (x) (and (> x 0) (<= x no-weeks))))) + (day (if dayflag (calendar-read + "ISO day (1-7): " + '(lambda (x) (and (<= 1 x) (<= x 7)))) + 1))) + (list (list week day year)))) + (defun calendar-goto-iso-date (date &optional noecho) "Move cursor to ISO DATE; echo ISO date unless NOECHO is t." - (interactive - (let* ((today (calendar-current-date)) - (year (calendar-read - "ISO calendar year (>0): " - '(lambda (x) (> x 0)) - (int-to-string (extract-calendar-year today)))) - (no-weeks (extract-calendar-month - (calendar-iso-from-absolute - (1- - (calendar-dayname-on-or-before - 1 (calendar-absolute-from-gregorian - (list 1 4 (1+ year)))))))) - (week (calendar-read - (format "ISO calendar week (1-%d): " no-weeks) - '(lambda (x) (and (> x 0) (<= x no-weeks))))) - (day (calendar-read - "ISO day (1-7): " - '(lambda (x) (and (<= 1 x) (<= x 7)))))) - (list (list week day year)))) + (interactive (calendar-iso-read-args t)) + (calendar-goto-date (calendar-gregorian-from-absolute + (calendar-absolute-from-iso date))) + (or noecho (calendar-print-iso-date))) + +(defun calendar-goto-iso-week (date &optional noecho) + "Move cursor to ISO DATE; echo ISO date unless NOECHO is t. +Interactively, goes to the first day of the specified week." + (interactive (calendar-iso-read-args)) (calendar-goto-date (calendar-gregorian-from-absolute (calendar-absolute-from-iso date))) (or noecho (calendar-print-iso-date))) From 6b8927e31c5fc0716133e5e6f164427bd0ec3a22 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Oct 2004 23:45:06 +0000 Subject: [PATCH 019/166] Update copyright and maintainer. From Emilio C. Lopes : (calendar-mode-map): Add binding for `calendar-goto-iso-week'. --- lisp/calendar/cal-menu.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index a652e7ca768..ceb4c56f7fd 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -1,9 +1,10 @@ ;;; cal-menu.el --- calendar functions for menu bar and popup menu support -;; Copyright (C) 1994, 1995, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: Edward M. Reingold ;; Lara Rios +;; Maintainer: Glenn Morris ;; Keywords: calendar ;; Human-Keywords: calendar, popup menus, menu bar @@ -121,6 +122,8 @@ '("Astronomical Date" . calendar-goto-astro-day-number)) (define-key calendar-mode-map [menu-bar goto iso] '("ISO Date" . calendar-goto-iso-date)) +(define-key calendar-mode-map [menu-bar goto iso-week] + '("ISO Week" . calendar-goto-iso-week)) (define-key calendar-mode-map [menu-bar goto day-of-year] '("Day of Year" . calendar-goto-day-of-year)) (define-key calendar-mode-map [menu-bar goto gregorian] From fb60b3e130f3e8dffa879fdd34f867caf4455657 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Oct 2004 23:46:42 +0000 Subject: [PATCH 020/166] From Emilio C. Lopes : (calendar-goto-iso-week): Add autoload. (calendar-mode-map): Add binding for `calendar-goto-iso-week'. --- lisp/calendar/calendar.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 9d38cde21ce..aa0b3005fad 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1769,6 +1769,10 @@ Driven by the variable `calendar-date-display-form'.") "Move cursor to ISO date." t) +(autoload 'calendar-goto-iso-week "cal-iso" + "Move cursor to start of ISO week." + t) + (autoload 'calendar-print-iso-date "cal-iso" "Show the ISO date equivalents of date." t) @@ -2204,6 +2208,7 @@ the inserted text. Value is always t." (define-key calendar-mode-map "ge" 'calendar-goto-ethiopic-date) (define-key calendar-mode-map "gp" 'calendar-goto-persian-date) (define-key calendar-mode-map "gc" 'calendar-goto-iso-date) + (define-key calendar-mode-map "gw" 'calendar-goto-iso-week) (define-key calendar-mode-map "gf" 'calendar-goto-french-date) (define-key calendar-mode-map "gml" 'calendar-goto-mayan-long-count-date) (define-key calendar-mode-map "gmpc" 'calendar-previous-calendar-round-date) From 80a47b51e7bac79893de13eb5704371eddccee13 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 4 Oct 2004 23:49:32 +0000 Subject: [PATCH 021/166] *** empty log message *** --- lisp/ChangeLog | 14 ++++++++++++++ man/ChangeLog | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2572012798..9385dcc825e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2004-10-05 Emilio C. Lopes : + + * calendar/calendar.el (calendar-goto-iso-week): Add autoload. + (calendar-mode-map): Add binding for `calendar-goto-iso-week'. + * calendar/cal-menu.el (calendar-mode-map): Ditto. + +2004-10-05 Glenn Morris + + * calendar/cal-iso.el (calendar-iso-read-args): New function, + for old interactive spec from calendar-goto-iso-date. + (calendar-goto-iso-date): Use it. + (calendar-goto-iso-week): New function. Suggested by Emilio + C. Lopes . + 2004-10-04 Luc Teirlinck * textmodes/enriched.el (enriched-mode-map): Give diff --git a/man/ChangeLog b/man/ChangeLog index fc0bd61497a..a7457d800de 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2004-10-05 Emilio C. Lopes + + * calendar.texi (From Other Calendar): Add calendar-goto-iso-week. + 2004-09-28 Kim F. Storm * display.texi (Display Custom) : From 071fdd66922f288844c3aa52edfdbd375179d866 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 5 Oct 2004 04:22:41 +0000 Subject: [PATCH 022/166] (isearch-done): Set mark after running hook. Suggested by Drew Adams . --- lisp/isearch.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index 117d1bfdc13..96a3e0e0ac2 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -680,16 +680,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." (if isearch-small-window (goto-char found-point) ;; Exiting the save-window-excursion clobbers window-start; restore it. - (set-window-start (selected-window) found-start t)) - - ;; If there was movement, mark the starting position. - ;; Maybe should test difference between and set mark iff > threshold. - (if (/= (point) isearch-opoint) - (or (and transient-mark-mode mark-active) - (progn - (push-mark isearch-opoint t) - (or executing-kbd-macro (> (minibuffer-depth) 0) - (message "Mark saved where search started")))))) + (set-window-start (selected-window) found-start t))) (setq isearch-mode nil) (if isearch-input-method-local-p @@ -714,6 +705,16 @@ is treated as a regexp. See \\[isearch-forward] for more info." (isearch-update-ring isearch-string isearch-regexp)) (run-hooks 'isearch-mode-end-hook) + + ;; If there was movement, mark the starting position. + ;; Maybe should test difference between and set mark iff > threshold. + (if (/= (point) isearch-opoint) + (or (and transient-mark-mode mark-active) + (progn + (push-mark isearch-opoint t) + (or executing-kbd-macro (> (minibuffer-depth) 0) + (message "Mark saved where search started"))))) + (and (not edit) isearch-recursive-edit (exit-recursive-edit))) (defun isearch-update-ring (string &optional regexp) From ea99d5c8005586f8c99ed495f92be1fa2c01bc26 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 5 Oct 2004 04:23:55 +0000 Subject: [PATCH 023/166] (Info-history, Info-toc): Fix Info headers. (Info-toc): Narrow buffer before Info-fontify-node. (Info-build-toc): Don't check for special Info file names. Set main-file to nil if Info-find-file returns a symbol. --- lisp/ChangeLog | 10 ++++++++++ lisp/info.el | 29 ++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9385dcc825e..94ad045d5bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2004-10-05 Juri Linkov + + * isearch.el (isearch-done): Set mark after running hook. + Suggested by Drew Adams . + + * info.el (Info-history, Info-toc): Fix Info headers. + (Info-toc): Narrow buffer before Info-fontify-node. + (Info-build-toc): Don't check for special Info file names. + Set main-file to nil if Info-find-file returns a symbol. + 2004-10-05 Emilio C. Lopes : * calendar/calendar.el (calendar-goto-iso-week): Add autoload. diff --git a/lisp/info.el b/lisp/info.el index b779bb41ca6..2a20fc4898c 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1729,7 +1729,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." (let ((inhibit-read-only t)) (erase-buffer) (goto-char (point-min)) - (insert "\n\^_\nFile: history Node: Top, Up: (dir)\n\n") + (insert "\n\^_\nFile: history, Node: Top, Up: (dir)\n\n") (insert "Recently Visited Nodes\n**********************\n\n") (insert "* Menu:\n\n") (let ((hl (delete '("history" "Top") Info-history-list))) @@ -1749,26 +1749,31 @@ If SAME-FILE is non-nil, do not move to a different Info file." "Go to a node with table of contents of the current Info file. Table of contents is created from the tree structure of menus." (interactive) - (let ((curr-file Info-current-file) - (curr-node Info-current-node) + (let ((curr-file (substring-no-properties Info-current-file)) + (curr-node (substring-no-properties Info-current-node)) p) (with-current-buffer (get-buffer-create " *info-toc*") (let ((inhibit-read-only t) (node-list (Info-build-toc curr-file))) (erase-buffer) (goto-char (point-min)) - (insert "\n\^_\nFile: toc Node: Top, Up: (dir)\n\n") + (insert "\n\^_\nFile: toc, Node: Top, Up: (dir)\n\n") (insert "Table of Contents\n*****************\n\n") - (insert "*Note Top::\n") + (insert "*Note Top: (" curr-file ")Top.\n") (Info-insert-toc (nth 2 (assoc "Top" node-list)) ; get Top nodes - node-list 0 (substring-no-properties curr-file))) + node-list 0 curr-file)) (if (not (bobp)) (let ((Info-hide-note-references 'hide) (Info-fontify-visited-nodes nil)) (Info-mode) (setq Info-current-file "toc" Info-current-node "Top") - (Info-fontify-node))) + (goto-char (point-min)) + (narrow-to-region (or (re-search-forward "\n[\^_\f]\n" nil t) + (point-min)) + (point-max)) + (Info-fontify-node) + (widen))) (goto-char (point-min)) (if (setq p (search-forward (concat "*Note " curr-node ":") nil t)) (setq p (- p (length curr-node) 2)))) @@ -1789,14 +1794,12 @@ Table of contents is created from the tree structure of menus." (defun Info-build-toc (file) "Build table of contents from menus of Info FILE and its subfiles." - (if (equal file "dir") - (error "Table of contents for Info directory is not supported yet")) (with-temp-buffer - (let* ((default-directory (or (and (stringp file) - (file-name-directory - (setq file (Info-find-file file)))) + (let* ((file (and (stringp file) (Info-find-file file))) + (default-directory (or (and (stringp file) + (file-name-directory file)) default-directory)) - (main-file file) + (main-file (and (stringp file) file)) (sections '(("Top" "Top"))) nodes subfiles) (while (or main-file subfiles) From cf6d43aeca04267649d8507b1ba4bfe8ec2ab4f8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 5 Oct 2004 08:55:12 +0000 Subject: [PATCH 024/166] (Fringe Bitmaps): Update fringe-bitmaps-at-pos. --- lispref/display.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lispref/display.texi b/lispref/display.texi index 00b91fe1fd8..518234ff4f8 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -2655,9 +2655,10 @@ symbols have their own name space. @defun fringe-bitmaps-at-pos &optional pos window This function returns the fringe bitmaps of the display line containing position @var{pos} in window @var{window}. The return -value has the form @code{(@var{left} . @var{right})}, where @var{left} +value has the form @code{(@var{left} @var{right} @var{ov})}, where @var{left} is the symbol for the fringe bitmap in the left fringe (or @code{nil} -if no bitmap), and @var{right} is similar for the right fringe. +if no bitmap), @var{right} is similar for the right fringe, and @var{ov} +is non-@code{nil} if there is an overlay arrow in the left fringe. The value is @code{nil} if @var{pos} is not visible in @var{window}. If @var{window} is @code{nil}, that stands for the selected window. From 35ab48578a02c740b9208a5a8848d7a30f7e6592 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 5 Oct 2004 08:57:14 +0000 Subject: [PATCH 025/166] *** empty log message *** --- etc/NEWS | 5 ++--- lispref/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 273886da2d0..ee94a259b7f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2493,9 +2493,8 @@ symbol identifying a fringe bitmap, either built-in or defined with `define-fringe-bitmap', and FACE is an optional face name to be used for displaying the bitmap. -*** New function `fringe-bitmaps-at-pos' returns a cons (LEFT . RIGHT) -identifying the current fringe bitmaps in the display line at a given -buffer position. A nil value means no bitmap. +*** New function `fringe-bitmaps-at-pos' returns the current fringe +bitmaps in the display line at a given buffer position. ** Multiple overlay arrows can now be defined and managed via the new variable `overlay-arrow-variable-list'. It contains a list of diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b568e99fb58..aef4746eef7 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2004-10-05 Kim F. Storm + + * display.texi (Fringe Bitmaps): Update fringe-bitmaps-at-pos. + 2004-09-29 Kim F. Storm * display.texi (Fringe Bitmaps): Use symbols rather than numbers From b90ee8b5fe3247c345212614877551d41bcbdd98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 5 Oct 2004 10:52:53 +0000 Subject: [PATCH 026/166] * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for a row if Alt or Meta has been found for that row. Also stop scanning for Keysyms for that row. --- src/ChangeLog | 6 ++++++ src/xterm.c | 23 ++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8f6b2297692..b823dbe6f30 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-10-05 Jan Dj,Ad(Brv + + * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for + a row if Alt or Meta has been found for that row. Also stop scanning + for Keysyms for that row. + 2004-10-04 Kim F. Storm * fringe.c (Ffringe_bitmaps_at_pos): Change return value from cons diff --git a/src/xterm.c b/src/xterm.c index 97e21d1f255..4fc9ed71abd 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3383,12 +3383,14 @@ x_find_modifier_meanings (dpyinfo) Alt keysyms are on. */ { int row, col; /* The row and column in the modifier table. */ + int found_alt_or_meta; for (row = 3; row < 8; row++) + { + found_alt_or_meta = 0; for (col = 0; col < mods->max_keypermod; col++) { - KeyCode code - = mods->modifiermap[(row * mods->max_keypermod) + col]; + KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col]; /* Zeroes are used for filler. Skip them. */ if (code == 0) @@ -3406,33 +3408,44 @@ x_find_modifier_meanings (dpyinfo) { case XK_Meta_L: case XK_Meta_R: + found_alt_or_meta = 1; dpyinfo->meta_mod_mask |= (1 << row); break; case XK_Alt_L: case XK_Alt_R: + found_alt_or_meta = 1; dpyinfo->alt_mod_mask |= (1 << row); break; case XK_Hyper_L: case XK_Hyper_R: - dpyinfo->hyper_mod_mask |= (1 << row); + if (!found_alt_or_meta) + dpyinfo->hyper_mod_mask |= (1 << row); + code_col = syms_per_code; + col = mods->max_keypermod; break; case XK_Super_L: case XK_Super_R: - dpyinfo->super_mod_mask |= (1 << row); + if (!found_alt_or_meta) + dpyinfo->super_mod_mask |= (1 << row); + code_col = syms_per_code; + col = mods->max_keypermod; break; case XK_Shift_Lock: /* Ignore this if it's not on the lock modifier. */ - if ((1 << row) == LockMask) + if (!found_alt_or_meta && ((1 << row) == LockMask)) dpyinfo->shift_lock_mask = LockMask; + code_col = syms_per_code; + col = mods->max_keypermod; break; } } } } + } } /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ From 0c8b5b65f11849579a838191065f152a2450ffb4 Mon Sep 17 00:00:00 2001 From: "Robert J. Chassell" Date: Tue, 5 Oct 2004 16:47:54 +0000 Subject: [PATCH 027/166] Add minor footnotes saying ' is an abbreviation for quote. --- lispintro/emacs-lisp-intro.texi | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 2096a60928f..4130eefd2cf 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -1,6 +1,7 @@ -@c \input texinfo @c -*-texinfo-*- +\input texinfo @c -*-texinfo-*- @comment %**start of header @setfilename ../info/eintr +@c setfilename emacs-lisp-intro.info @c sethtmlfilename emacs-lisp-intro.html @settitle Programming in Emacs Lisp @syncodeindex vr cp @@ -21,8 +22,8 @@ @comment %**end of header -@set edition-number 2.12 -@set update-date 2003 Nov 19 +@set edition-number 2.13 +@set update-date 2004 Oct 5 @ignore ## Summary of shell commands to create various output formats: @@ -61,6 +62,8 @@ ## View Info output with standalone reader info emacs-lisp-intro.info + ## popd + @end ignore @c ================ Included Figures ================ @@ -180,7 +183,7 @@ people who are not programmers. Edition @value{edition-number}, @value{update-date} @sp 1 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1997, 2001, -2002, 2003 Free Software Foundation, Inc. +2002, 2003, 2004 Free Software Foundation, Inc. @sp 1 @iftex @@ -1050,13 +1053,16 @@ Robert J. Chassell @chapter List Processing To the untutored eye, Lisp is a strange programming language. In Lisp -code there are parentheses everywhere. Some people even claim that the -name stands for `Lots of Isolated Silly Parentheses'. But the claim is -unwarranted. Lisp stands for LISt Processing, and the programming -language handles @emph{lists} (and lists of lists) by putting them -between parentheses. The parentheses mark the boundaries of the list. -Sometimes a list is preceded by a single apostrophe or quotation mark, -@samp{'}. Lists are the basis of Lisp. +code there are parentheses everywhere. Some people even claim that +the name stands for `Lots of Isolated Silly Parentheses'. But the +claim is unwarranted. Lisp stands for LISt Processing, and the +programming language handles @emph{lists} (and lists of lists) by +putting them between parentheses. The parentheses mark the boundaries +of the list. Sometimes a list is preceded by a single apostrophe or +quotation mark, @samp{'}@footnote{The single apostrophe or quotation +mark is an abbreviation for the function @code{quote}; you need not +think about functions now; functions are defined in @ref{Making +Errors, , Generate an Error Message}.} Lists are the basis of Lisp. @menu * Lisp Lists:: What are lists? @@ -2135,7 +2141,8 @@ Debugger entered--Lisp error: @need 1250 As usual, the error message tries to be helpful and makes sense after you -learn how to read it. +learn how to read it.@footnote{@code{(quote hello)} is an expansion of +the abbreviation @code{'hello}.} The first part of the error message is straightforward; it says @samp{wrong type argument}. Next comes the mysterious jargon word @@ -20638,6 +20645,7 @@ each column." @end smallexample @end ifnottex +@c qqq @ignore Graphing Definitions Re-listed @@ -21137,6 +21145,7 @@ each column." (print-X-axis numbers-list horizontal-step))) @end group @end smallexample +@c qqq @end ignore @page From 4494a266b4b1556948e4f12e33fea380ebfe6fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 5 Oct 2004 20:24:19 +0000 Subject: [PATCH 028/166] * configure.in (HAVE_RANDOM_HEAPSTART): Renamed HAVE_EXECSHIELD. Run test to see if heap start address is random. --- ChangeLog | 5 + configure | 750 ++++++++++++++++++++++++++++++++------------------- configure.in | 67 +++-- 3 files changed, 530 insertions(+), 292 deletions(-) diff --git a/ChangeLog b/ChangeLog index 596fc6023a9..c97ba6e77c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-05 Jan D. + + * configure.in (HAVE_RANDOM_HEAPSTART): Renamed HAVE_EXECSHIELD. + Run test to see if heap start address is random. + 2004-09-29 Miles Bader * configure.in (HAVE_EXECSHIELD): Test correct env variable to see diff --git a/configure b/configure index 817d0fc09d9..7add8b6767b 100755 --- a/configure +++ b/configure @@ -310,7 +310,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP SETARCH LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SETARCH SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -984,7 +984,7 @@ esac else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -3250,7 +3250,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3308,7 +3309,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3424,7 +3426,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3478,7 +3481,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3523,7 +3527,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3567,7 +3572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4200,7 +4206,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4271,91 +4278,6 @@ rm -f conftest* -echo "$as_me:$LINENO: checking for /proc/sys/kernel/exec-shield" >&5 -echo $ECHO_N "checking for /proc/sys/kernel/exec-shield... $ECHO_C" >&6 -if test "${ac_cv_file__proc_sys_kernel_exec_shield+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/proc/sys/kernel/exec-shield"; then - ac_cv_file__proc_sys_kernel_exec_shield=yes -else - ac_cv_file__proc_sys_kernel_exec_shield=no -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_file__proc_sys_kernel_exec_shield" >&5 -echo "${ECHO_T}$ac_cv_file__proc_sys_kernel_exec_shield" >&6 -if test $ac_cv_file__proc_sys_kernel_exec_shield = yes; then - emacs_cv_execshield=1 -else - emacs_cv_execshield=0 -fi - -if test "$emacs_cv_execshield" = 1; then - # Extract the first word of "setarch", so it can be a program name with args. -set dummy setarch; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SETARCH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $SETARCH in - [\\/]* | ?:[\\/]*) - ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no" - ;; -esac -fi -SETARCH=$ac_cv_path_SETARCH - -if test -n "$SETARCH"; then - echo "$as_me:$LINENO: result: $SETARCH" >&5 -echo "${ECHO_T}$SETARCH" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - if test "$SETARCH" != no && test "$machine" = "intel386"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EXECSHIELD 1 -_ACEOF - - else - case "`cat /proc/sys/kernel/exec-shield`" in - 0) ;; - *) - { { echo "$as_me:$LINENO: error: Exec-shield is turned on. -Emacs can not dump itself if exec-shield is turned on. -See \`etc/PROBLEMS' for further information." >&5 -echo "$as_me: error: Exec-shield is turned on. -Emacs can not dump itself if exec-shield is turned on. -See \`etc/PROBLEMS' for further information." >&2;} - { (exit 1); exit 1; }; } - esac - fi -fi #### Extract some information from the operating system and machine files. @@ -4561,7 +4483,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4590,7 +4513,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4660,7 +4584,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4712,7 +4637,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4783,7 +4709,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4835,7 +4762,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4905,7 +4833,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5075,7 +5004,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5144,7 +5074,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5298,7 +5229,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5391,7 +5323,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5594,7 +5527,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5759,7 +5693,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5822,7 +5757,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5895,7 +5831,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5981,7 +5918,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6054,7 +5992,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6124,7 +6063,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6183,7 +6123,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6252,7 +6193,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6313,7 +6255,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6379,7 +6322,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6525,7 +6469,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6589,7 +6534,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6654,7 +6600,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6700,7 +6647,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6774,7 +6722,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6839,7 +6788,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6883,7 +6833,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6954,7 +6905,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7004,7 +6956,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7075,7 +7028,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7125,7 +7079,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7196,7 +7151,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7246,7 +7202,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7317,7 +7274,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7367,7 +7325,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7438,7 +7397,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7488,7 +7448,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7575,7 +7536,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7681,7 +7643,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7741,7 +7704,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7777,6 +7741,130 @@ _ACEOF fi +echo "$as_me:$LINENO: checking whether heap start address is randomized" >&5 +echo $ECHO_N "checking whether heap start address is randomized... $ECHO_C" >&6 +if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x +then + if test "$cross_compiling" = yes; then + emacs_cv_execshield='assuming no' +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +int main (int argc, char *argv[]) +{ + unsigned long old_sbrk = 0; + unsigned long this_sbrk = (unsigned long) sbrk(0); + int nr = 1; + if (argc != 1) { + old_sbrk = strtoul (argv[1], 0, 0); + nr = atoi (argv[2])+1; + } + if (argc == 1 || (old_sbrk == this_sbrk && nr < 3)) + { + char buf1[32], buf2[32]; + sprintf (buf1, "%lu", this_sbrk); + sprintf (buf2, "%d", nr); + execl (argv[0], argv[0], buf1, buf2, 0); + exit (-1); + } + exit (this_sbrk == old_sbrk); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + emacs_cv_execshield=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +emacs_cv_execshield=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +else + emacs_cv_execshield='assuming no' +fi +echo "$as_me:$LINENO: result: $emacs_cv_execshield" >&5 +echo "${ECHO_T}$emacs_cv_execshield" >&6 + +if test "$emacs_cv_execshield" = yes; then + # Extract the first word of "setarch", so it can be a program name with args. +set dummy setarch; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SETARCH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SETARCH in + [\\/]* | ?:[\\/]*) + ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no" + ;; +esac +fi +SETARCH=$ac_cv_path_SETARCH + +if test -n "$SETARCH"; then + echo "$as_me:$LINENO: result: $SETARCH" >&5 +echo "${ECHO_T}$SETARCH" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test "$SETARCH" != no && test "$machine" = "intel386"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RANDOM_HEAPSTART 1 +_ACEOF + + else + { { echo "$as_me:$LINENO: error: Heap start address is randomized and no workaround is known. +Probably exec-shield is turned on. Emacs can not dump itself if this is the +case. Read about exec-shield in \`etc/PROBLEMS' for further information." >&5 +echo "$as_me: error: Heap start address is randomized and no workaround is known. +Probably exec-shield is turned on. Emacs can not dump itself if this is the +case. Read about exec-shield in \`etc/PROBLEMS' for further information." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 @@ -7863,7 +7951,6 @@ fi echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 -ac_path_x_has_been_run=yes # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -7956,7 +8043,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for a specified header file. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8030,7 +8117,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8090,12 +8178,8 @@ else # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - # It might be that x_includes is empty (headers are found in the - # standard search path. Then output the corresponding message - ac_out_x_includes=$x_includes - test "x$x_includes" = x && ac_out_x_includes="in standard search path" - echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6 + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then @@ -8259,7 +8343,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8354,7 +8439,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8413,7 +8499,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8497,7 +8584,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8681,7 +8769,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8933,7 +9022,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9000,7 +9090,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9069,7 +9160,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9154,7 +9246,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9231,7 +9324,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9285,7 +9379,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9354,7 +9449,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9458,7 +9554,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9525,7 +9622,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9595,7 +9693,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9833,7 +9932,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9907,7 +10007,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9979,7 +10080,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10061,7 +10163,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10140,7 +10243,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10214,7 +10318,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10282,7 +10387,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10351,7 +10457,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10475,7 +10582,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10571,7 +10679,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10651,7 +10760,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10719,7 +10829,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10864,7 +10975,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10973,7 +11085,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11118,7 +11231,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11225,7 +11339,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11379,7 +11494,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11454,7 +11570,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11602,7 +11719,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11679,7 +11797,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11826,7 +11945,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11902,7 +12022,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12067,7 +12188,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12212,7 +12334,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12288,7 +12411,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12351,7 +12475,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12432,7 +12557,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12573,7 +12699,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12718,7 +12845,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12794,7 +12922,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12867,7 +12996,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13022,7 +13152,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13088,7 +13219,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13346,7 +13478,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13413,7 +13546,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13565,7 +13699,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13749,7 +13884,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14076,7 +14212,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14177,7 +14314,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14250,7 +14388,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14329,7 +14468,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14398,7 +14538,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14466,7 +14607,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14540,7 +14682,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14644,7 +14787,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14719,7 +14863,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14871,7 +15016,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14939,7 +15085,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15116,7 +15263,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15192,7 +15340,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15346,7 +15495,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15497,7 +15647,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15648,7 +15799,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15790,7 +15942,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15834,7 +15987,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15980,7 +16134,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16024,7 +16179,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16089,7 +16245,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16152,7 +16309,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16254,7 +16412,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16323,7 +16482,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16430,7 +16590,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16533,7 +16694,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16609,7 +16771,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16713,7 +16876,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16805,7 +16969,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16870,7 +17035,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16936,7 +17102,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17046,7 +17213,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17111,7 +17279,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17191,7 +17360,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17264,7 +17434,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17337,7 +17508,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17410,7 +17582,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17484,7 +17657,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17556,7 +17730,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17631,7 +17806,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17703,7 +17879,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17776,7 +17953,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17926,7 +18104,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18072,7 +18251,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18218,7 +18398,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18375,7 +18556,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18521,7 +18703,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18667,7 +18850,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18825,7 +19009,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18983,7 +19168,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19172,7 +19358,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19245,7 +19432,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19313,7 +19501,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19359,7 +19548,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19433,7 +19623,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19497,7 +19688,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19635,7 +19827,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19696,7 +19889,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19841,7 +20035,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19997,7 +20192,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20168,7 +20364,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20236,7 +20433,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20421,7 +20619,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20714,7 +20913,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20779,7 +20979,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20842,7 +21043,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20908,7 +21110,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20949,7 +21152,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21016,7 +21220,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21921,8 +22126,8 @@ s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@INSTALL_INFO@,$INSTALL_INFO,;t t s,@EGREP@,$EGREP,;t t -s,@SETARCH@,$SETARCH,;t t s,@LIBSOUND@,$LIBSOUND,;t t +s,@SETARCH@,$SETARCH,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t @@ -22123,6 +22328,11 @@ esac *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -22161,12 +22371,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;} fi;; esac done` || { (exit 1); exit 1; } - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub diff --git a/configure.in b/configure.in index 1f899a0808c..73c62988fd7 100644 --- a/configure.in +++ b/configure.in @@ -1286,25 +1286,6 @@ AC_LINK_IFELSE([main(){return 0;}], dnl checks for Unix variants AC_AIX -dnl check if exec-shield is present. -AC_CHECK_FILE(/proc/sys/kernel/exec-shield, emacs_cv_execshield=1, - emacs_cv_execshield=0) -if test "$emacs_cv_execshield" = 1; then - AC_PATH_PROG(SETARCH, setarch, no) - AC_SUBST(SETARCH) - if test "$SETARCH" != no && test "$machine" = "intel386"; then - AC_DEFINE(HAVE_EXECSHIELD, 1, - [Define to 1 if this OS has exec shield and we can handle it.]) - else - case "`cat /proc/sys/kernel/exec-shield`" in - 0) ;; - *) - AC_MSG_ERROR([Exec-shield is turned on. -Emacs can not dump itself if exec-shield is turned on. -See `etc/PROBLEMS' for further information.]) - esac - fi -fi #### Extract some information from the operating system and machine files. @@ -1591,6 +1572,54 @@ AH_TEMPLATE(POINTER_TYPE, [Define as `void' if your compiler accepts `void *'; otherwise define as `char'.])dnl +dnl Test if heap start address is randomized (exec-shield does this). +dnl The test program requires unistd.h and stdlib.h. They are present +dnl on the systems that currently have exec-shield. +AC_MSG_CHECKING(whether heap start address is randomized) +if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x +then + AC_TRY_RUN([#include +#include +#include +int main (int argc, char *argv[]) +{ + unsigned long old_sbrk = 0; + unsigned long this_sbrk = (unsigned long) sbrk(0); + int nr = 1; + if (argc != 1) { + old_sbrk = strtoul (argv[1], 0, 0); + nr = atoi (argv[2])+1; + } + if (argc == 1 || (old_sbrk == this_sbrk && nr < 3)) + { + char buf1[32], buf2[32]; + sprintf (buf1, "%lu", this_sbrk); + sprintf (buf2, "%d", nr); + execl (argv[0], argv[0], buf1, buf2, 0); + exit (-1); + } + exit (this_sbrk == old_sbrk); +}], emacs_cv_execshield=yes, emacs_cv_execshield=no, + emacs_cv_execshield='assuming no') +else + emacs_cv_execshield='assuming no' +fi +AC_MSG_RESULT($emacs_cv_execshield) + +if test "$emacs_cv_execshield" = yes; then + AC_PATH_PROG(SETARCH, setarch, no) + AC_SUBST(SETARCH) + if test "$SETARCH" != no && test "$machine" = "intel386"; then + AC_DEFINE(HAVE_RANDOM_HEAPSTART, 1, + [Define to 1 if this OS randomizes the start address of the heap.]) + else + AC_MSG_ERROR([Heap start address is randomized and no workaround is known. +Probably exec-shield is turned on. Emacs can not dump itself if this is the +case. Read about exec-shield in `etc/PROBLEMS' for further information.]) + fi +fi + + dnl This could be used for targets which can have both byte sexes. dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. dnl AC_C_BIGENDIAN From d8b43276ce75e3e8c38f12fdecf01e636b48915a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 5 Oct 2004 20:26:00 +0000 Subject: [PATCH 029/166] * config.in: Regenerate. * Makefile.in (RUN_TEMACS): Check HAVE_RANDOM_HEAPSTART instead of HAVE_EXECSHIELD. --- src/ChangeLog | 7 +++++++ src/Makefile.in | 2 +- src/config.in | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b823dbe6f30..ba6ae2d4777 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2004-10-05 Jan D. + + * config.in: Regenerate. + + * Makefile.in (RUN_TEMACS): Check HAVE_RANDOM_HEAPSTART instead of + HAVE_EXECSHIELD. + 2004-10-05 Jan Dj,Ad(Brv * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for diff --git a/src/Makefile.in b/src/Makefile.in index 9fc7f7e4a9f..f25e0f9d842 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -905,7 +905,7 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \ #define OBJECTS_MACHINE #endif -#ifdef HAVE_EXECSHIELD +#ifdef HAVE_RANDOM_HEAPSTART #undef i386 RUN_TEMACS = @SETARCH@ i386 ./temacs #else diff --git a/src/config.in b/src/config.in index d87d235fe55..cc37606b713 100644 --- a/src/config.in +++ b/src/config.in @@ -136,9 +136,6 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `euidaccess' function. */ #undef HAVE_EUIDACCESS -/* Define to 1 if this OS has exec shield and we can handle it. */ -#undef HAVE_EXECSHIELD - /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H @@ -432,6 +429,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM +/* Define to 1 if this OS randomizes the start address of the heap. */ +#undef HAVE_RANDOM_HEAPSTART + /* Define to 1 if you have the `recvfrom' function. */ #undef HAVE_RECVFROM From 707c20a84afc0f33c7f39b24148556cc9e2a74a5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 5 Oct 2004 22:29:16 +0000 Subject: [PATCH 030/166] New file, from Ulf Jasper . --- lisp/calendar/icalendar.el | 1298 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1298 insertions(+) create mode 100644 lisp/calendar/icalendar.el diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el new file mode 100644 index 00000000000..86a402179dc --- /dev/null +++ b/lisp/calendar/icalendar.el @@ -0,0 +1,1298 @@ +;;; icalendar.el --- iCalendar implementation + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Ulf Jasper +;; Created: August 2002 +;; Keywords: calendar +;; Human-Keywords: calendar, diary, iCalendar, vCalendar + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package is documented in the Emacs Manual. + + +;;; History: + +;; 0.06 Bugfixes regarding icalendar-import-format-*. +;; Fix in icalendar-convert-diary-to-ical -- thanks to Philipp Grau. + +;; 0.05: New import format scheme: Replaced icalendar-import-prefix-*, +;; icalendar-import-ignored-properties, and +;; icalendar-import-separator with icalendar-import-format(-*). +;; icalendar-import-file and icalendar-convert-diary-to-ical +;; have an extra parameter which should prevent them from +;; erasing their target files (untested!). +;; Tested with Emacs 21.3.2 + +;; 0.04: Bugfix: import: double quoted param values did not work +;; Read DURATION property when importing. +;; Added parameter icalendar-duration-correction. + +;; 0.03: Export takes care of european-calendar-style. +;; Tested with Emacs 21.3.2 and XEmacs 21.4.12 + +;; 0.02: Should work in XEmacs now. Thanks to Len Trigg for the +;; XEmacs patches! +;; Added exporting from Emacs diary to ical. +;; Some bugfixes, after testing with calendars from +;; http://icalshare.com. +;; Tested with Emacs 21.3.2 and XEmacs 21.4.12 + +;; 0.01: First published version. Trial version. Alpha version. + +;; ====================================================================== +;; To Do: + +;; * Import from ical: +;; + Need more properties for icalendar-import-format +;; + check vcalendar version +;; + check (unknown) elements +;; + recurring events! +;; + works for european style calendars only! Does it? +;; + alarm +;; + exceptions in recurring events +;; + the parser is too soft +;; + error log is incomplete +;; + nice to have: #include "webcal://foo.com/some-calendar.ics" + +;; * Export into ical +;; + diary-date, diary-float, and self-made sexp entries are not +;; understood +;; + timezones, currently all times are local! + +;; * Other things +;; + defcustom icalendar-import-ignored-properties does not work with +;; XEmacs. +;; + clean up all those date/time parsing functions +;; + Handle todo items? +;; + Check iso 8601 for datetime and period +;; + Which chars to (un)escape? +;; + Time to find out how the profiler works? + + +;;; Code: + +(defconst icalendar-version 0.06 + "Version number of icalendar.el.") + +;; ====================================================================== +;; Customizables +;; ====================================================================== +(defgroup icalendar nil + "Icalendar support." + :prefix "icalendar-" + :group 'calendar) + +(defcustom icalendar-import-format + "%s%d%l%o" + "Format string for importing events from iCalendar into Emacs diary. +This string defines how iCalendar events are inserted into diary +file. Meaning of the specifiers: +%d Description, see `icalendar-import-format-description' +%l Location, see `icalendar-import-format-location' +%o Organizer, see `icalendar-import-format-organizer' +%s Subject, see `icalendar-import-format-subject'" + :type 'string + :group 'icalendar) + +(defcustom icalendar-import-format-subject + "%s" + "Format string defining how the subject element is formatted. +This applies only if the subject is not empty! `%s' is replaced +by the subject." + :type 'string + :group 'icalendar) + +(defcustom icalendar-import-format-description + "\n Desc: %s" + "Format string defining how the description element is formatted. +This applies only if the description is not empty! `%s' is +replaced by the description." + :type 'string + :group 'icalendar) + +(defcustom icalendar-import-format-location + "\n Location: %s" + "Format string defining how the location element is formatted. +This applies only if the location is not empty! `%s' is replaced +by the location." + :type 'string + :group 'icalendar) + +(defcustom icalendar-import-format-organizer + "\n Organizer: %s" + "Format string defining how the organizer element is formatted. +This applies only if the organizer is not empty! `%s' is +replaced by the organizer." + :type 'string + :group 'icalendar) + +(defcustom icalendar-duration-correction + t + "Workaround for all-day events. +If non-nil the length=duration of iCalendar appointments that +have a length of exactly n days is decreased by one day. This +fixes problems with all-day events, which appear to be one day +longer than they are." + :type 'boolean + :group 'icalendar) + + +;; ====================================================================== +;; NO USER SERVICABLE PARTS BELOW THIS LINE +;; ====================================================================== + +(defconst icalendar-weekdayabbrev-table + '(("mon\\(day\\)?" . "MO") + ("tue\\(sday\\)?" . "TU") + ("wed\\(nesday\\)?" . "WE") + ("thu\\(rsday\\)?" . "TH") + ("fri\\(day\\)?" . "FR") + ("sat\\(urday\\)?" . "SA") + ("sun\\(day\\)?" . "SU")) + "Translation table for weekdays.") + +(defconst icalendar-monthnumber-table + '(("^jan\\(uar\\)?y?$" . 1) + ("^feb\\(ruar\\)?y?$" . 2) + ("^mar\\(ch\\)?\\|märz?$" . 3) + ("^apr\\(il\\)?$" . 4) + ("^ma[iy]$" . 5) + ("^jun[ie]?$" . 6) + ("^jul[iy]?$" . 7) + ("^aug\\(ust\\)?$" . 8) + ("^sep\\(tember\\)?$" . 9) + ("^o[ck]t\\(ober\\)?$" . 10) + ("^nov\\(ember\\)?$" . 11) + ("^de[cz]\\(ember\\)?$" . 12)) + "Regular expressions for month names. +Currently this matches only German and English.") + +(defvar icalendar-debug nil ".") + +;; ====================================================================== +;; all the other libs we need +;; ====================================================================== +(require 'calendar) +(require 'appt) + +;; ====================================================================== +;; Core functionality +;; Functions for parsing icalendars, importing and so on +;; ====================================================================== + +(defun icalendar-get-unfolded-buffer (folded-ical-buffer) + "Return a new buffer containing the unfolded contents of a buffer. +Folding is the iCalendar way of wrapping long lines. In the +created buffer all occurrences of CR LF BLANK are replaced by the +empty string. Argument FOLDED-ICAL-BUFFER is the unfolded input +buffer." + (let ((unfolded-buffer (get-buffer-create " *icalendar-work*"))) + (save-current-buffer + (set-buffer unfolded-buffer) + (erase-buffer) + (insert-buffer folded-ical-buffer) + (while (re-search-forward "\r?\n[ \t]" nil t) + (replace-match "" nil nil)) + ) + unfolded-buffer)) + +;; Replace regexp RE with RP in string ST and return the new string. +;; This is here for compatibility with XEmacs. +(defsubst icalendar-rris (re rp st) + ;; XEmacs: + (if (fboundp 'replace-in-string) + (save-match-data ;; apparently XEmacs needs save-match-data + (replace-in-string st re rp)) + ;; Emacs: + (replace-regexp-in-string re rp st))) + +(defun icalendar-read-element (invalue inparams) + "Recursively read the next iCalendar element in the current buffer. +INVALUE gives the current iCalendar element we are reading. +INPARAMS gives the current parameters..... +This function calls itself recursively for each nested calendar element +it finds" + (let (element children line name params param param-name param-value + value + (continue t)) + (setq children '()) + (while (and continue + (re-search-forward "^\\([A-Za-z0-9-]+\\)[;:]" nil t)) + (setq name (intern (match-string 1))) + (backward-char 1) + (setq params '()) + (setq line '()) + (while (looking-at ";") + (re-search-forward ";\\([A-Za-z0-9-]+\\)=" nil nil) + (setq param-name (intern (match-string 1))) + (re-search-forward "\\(\\([^;,:\"]+\\)\\|\"\\([^\"]+\\)\"\\)[;:]" + nil t) + (backward-char 1) + (setq param-value (or (match-string 2) (match-string 3))) + (setq param (list param-name param-value)) + (while (looking-at ",") + (re-search-forward "\\(\\([^;,:]+\\)\\|\"\\([^\"]+\\)\"\\)" + nil t) + (if (match-string 2) + (setq param-value (match-string 2)) + (setq param-value (match-string 3))) + (setq param (append param param-value))) + (setq params (append params param))) + (unless (looking-at ":") + (error "Oops")) + (forward-char 1) + (re-search-forward "\\(.*\\)\\(\r?\n[ \t].*\\)*" nil t) + (setq value (icalendar-rris "\r?\n[ \t]" "" (match-string 0))) + (setq line (list name params value)) + (cond ((eq name 'BEGIN) + (setq children + (append children + (list (icalendar-read-element (intern value) + params))))) + ((eq name 'END) + (setq continue nil)) + (t + (setq element (append element (list line)))))) + (if invalue + (list invalue inparams element children) + children))) + +;; ====================================================================== +;; helper functions for examining events +;; ====================================================================== + +(defsubst icalendar-get-all-event-properties (event) + "Return the list of properties in this EVENT." + (car (cddr event))) + +(defun icalendar-get-event-property (event prop) + "For the given EVENT return the value of the property PROP." + (catch 'found + (let ((props (car (cddr event))) pp) + (while props + (setq pp (car props)) + (if (eq (car pp) prop) + (throw 'found (car (cddr pp)))) + (setq props (cdr props)))) + nil)) + +(defun icalendar-set-event-property (event prop new-value) + "For the given EVENT set the property PROP to the value NEW-VALUE." + (catch 'found + (let ((props (car (cddr event))) pp) + (while props + (setq pp (car props)) + (when (eq (car pp) prop) + (setcdr (cdr pp) new-value) + (throw 'found (car (cddr pp)))) + (setq props (cdr props))) + (setq props (car (cddr event))) + (setcar (cddr event) + (append props (list (list prop nil new-value))))))) + +(defun icalendar-get-children (node name) + "Return all children of the given NODE which have a name NAME. +For instance the VCALENDAR node can have VEVENT children as well as VTODO +children." + (let ((result nil) + (children (cadr (cddr node)))) + (when (eq (car node) name) + (setq result node)) + ;;(message "%s" node) + (when children + (let ((subresult + (delq nil + (mapcar (lambda (n) + (icalendar-get-children n name)) + children)))) + (if subresult + (if result + (setq result (append result subresult)) + (setq result subresult))))) + result)) + +; private +(defun icalendar-all-events (icalendar) + "Return the list of all existing events in the given ICALENDAR." + (interactive "") + (icalendar-get-children (car icalendar) 'VEVENT)) + +(defun icalendar-split-value (value-string) + "Splits VALUE-STRING at ';='." + (let ((result '()) + param-name param-value) + (when value-string + (save-current-buffer + (set-buffer (get-buffer-create " *ical-temp*")) + (set-buffer-modified-p nil) + (erase-buffer) + (insert value-string) + (goto-char (point-min)) + (while + (re-search-forward + "\\([A-Za-z0-9-]+\\)=\\(\\([^;,:]+\\)\\|\"\\([^\"]+\\)\"\\);?" + nil t) + (setq param-name (intern (match-string 1))) + (setq param-value (match-string 2)) + (setq result + (append result (list (list param-name param-value))))))) + result)) + +(defun icalendar-decode-isodatetime (isodatetimestring) + "Return ISODATETIMESTRING in format like `decode-time'. +Converts from ISO-8601 to Emacs representation. If ISODATETIMESTRING +specifies UTC time (trailing letter Z) the decoded time is given in +the local time zone! FIXME: TZID-attributes are ignored....! FIXME: +multiple comma-separated values should be allowed!" + (icalendar-dmsg isodatetimestring) + (if isodatetimestring + ;; day/month/year must be present + (let ((year (read (substring isodatetimestring 0 4))) + (month (read (substring isodatetimestring 4 6))) + (day (read (substring isodatetimestring 6 8))) + (hour 0) + (minute 0) + (second 0)) + (when (> (length isodatetimestring) 12) + ;; hour/minute present + (setq hour (read (substring isodatetimestring 9 11))) + (setq minute (read (substring isodatetimestring 11 13)))) + (when (> (length isodatetimestring) 14) + ;; seconds present + (setq second (read (substring isodatetimestring 13 15)))) + (when (and (> (length isodatetimestring) 15) + ;; UTC specifier present + (char-equal ?Z (aref isodatetimestring 15))) + ;; if not UTC add current-time-zone offset + (setq second (+ (car (current-time-zone)) second))) + ;; create the decoded date-time + ;; FIXME!?! + (condition-case nil + (decode-time (encode-time second minute hour day month year)) + (error + (message "Cannot decode \"%s\"" isodatetimestring) + ;; hope for the best... + (list second minute hour day month year 0 nil 0)))) + ;; isodatetimestring == nil + nil)) + +(defun icalendar-decode-isoduration (isodurationstring) + "Return ISODURATIONSTRING in format like `decode-time'. +Converts from ISO-8601 to Emacs representation. If ISODURATIONSTRING +specifies UTC time (trailing letter Z) the decoded time is given in +the local time zone! FIXME: TZID-attributes are ignored....! FIXME: +multiple comma-separated values should be allowed!" + (if isodurationstring + (save-match-data + (string-match + (concat + "^P[+-]?\\(" + "\\(\\([0-9]+\\)D\\)" ; days only + "\\|" + "\\(\\(\\([0-9]+\\)D\\)?T\\(\\([0-9]+\\)H\\)?" ; opt days + "\\(\\([0-9]+\\)M\\)?\\(\\([0-9]+\\)S\\)?\\)" ; mand. time + "\\|" + "\\(\\([0-9]+\\)W\\)" ; weeks only + "\\)$") isodurationstring) + (let ((seconds 0) + (minutes 0) + (hours 0) + (days 0) + (months 0) + (years 0)) + (cond + ((match-beginning 2) ;days only + (setq days (read (substring isodurationstring + (match-beginning 3) + (match-end 3)))) + (when icalendar-duration-correction + (setq days (1- days)))) + ((match-beginning 4) ;days and time + (if (match-beginning 5) + (setq days (* 7 (read (substring isodurationstring + (match-beginning 6) + (match-end 6)))))) + (if (match-beginning 7) + (setq hours (read (substring isodurationstring + (match-beginning 8) + (match-end 8))))) + (if (match-beginning 9) + (setq minutes (read (substring isodurationstring + (match-beginning 10) + (match-end 10))))) + (if (match-beginning 11) + (setq seconds (read (substring isodurationstring + (match-beginning 12) + (match-end 12))))) + ) + ((match-beginning 13) ;weeks only + (setq days (* 7 (read (substring isodurationstring + (match-beginning 14) + (match-end 14)))))) + ) + (list seconds minutes hours days months years))) + ;; isodatetimestring == nil + nil)) + +(defun icalendar-add-decoded-times (time1 time2) + "Add TIME1 to TIME2. +Both times must be given in decoded form. One of these times must be +valid (year > 1900 or something)." + ;; FIXME: does this function exist already? + (decode-time (encode-time + (+ (nth 0 time1) (nth 0 time2)) + (+ (nth 1 time1) (nth 1 time2)) + (+ (nth 2 time1) (nth 2 time2)) + (+ (nth 3 time1) (nth 3 time2)) + (+ (nth 4 time1) (nth 4 time2)) + (+ (nth 5 time1) (nth 5 time2)) + nil + nil + ;;(or (nth 6 time1) (nth 6 time2)) ;; FIXME? + ))) + +(defun icalendar-datetime-to-noneuropean-date (datetime) + "Convert the decoded DATETIME to non-european-style format. +Non-European format: (month day year)." + (if datetime + (list (nth 4 datetime) ;month + (nth 3 datetime) ;day + (nth 5 datetime));year + ;; datetime == nil + nil)) + +(defun icalendar-datetime-to-european-date (datetime) + "Convert the decoded DATETIME to European format. +European format: (day month year). +FIXME" + (if datetime + (format "%d %d %d" (nth 3 datetime); day + (nth 4 datetime) ;month + (nth 5 datetime));year + ;; datetime == nil + nil)) + +(defun icalendar-datetime-to-colontime (datetime) + "Extract the time part of a decoded DATETIME into 24-hour format. +Note that this silently ignores seconds." + (format "%02d:%02d" (nth 2 datetime) (nth 1 datetime))) + +(defun icalendar-get-month-number (monthname) + "Return the month number for the given MONTHNAME." + (save-match-data + (let ((case-fold-search t)) + (assoc-default monthname icalendar-monthnumber-table + 'string-match)))) + +(defun icalendar-get-weekday-abbrev (weekday) + "Return the abbreviated WEEKDAY." + ;;FIXME: ISO-like(?). + (save-match-data + (let ((case-fold-search t)) + (assoc-default weekday icalendar-weekdayabbrev-table + 'string-match)))) + +(defun icalendar-datestring-to-isodate (datestring &optional day-shift) + "Convert diary-style DATESTRING to iso-style date. +If DAY-SHIFT is non-nil, the result is shifted by DAY-SHIFT days +-- DAY-SHIFT must be either nil or an integer. This function +takes care of european-style." + (let ((day -1) month year) + (save-match-data + (cond (;; numeric date + (string-match (concat "\\s-*" + "0?\\([1-9][0-9]?\\)[ \t/]\\s-*" + "0?\\([1-9][0-9]?\\),?[ \t/]\\s-*" + "\\([0-9]\\{4\\}\\)") + datestring) + (setq day (read (substring datestring (match-beginning 1) + (match-end 1)))) + (setq month (read (substring datestring (match-beginning 2) + (match-end 2)))) + (setq year (read (substring datestring (match-beginning 3) + (match-end 3)))) + (unless european-calendar-style + (let ((x month)) + (setq month day) + (setq day x)))) + (;; date contains month names -- european-style + (and european-calendar-style + (string-match (concat "\\s-*" + "0?\\([123]?[0-9]\\)[ \t/]\\s-*" + "\\([A-Za-z][^ ]+\\)[ \t/]\\s-*" + "\\([0-9]\\{4\\}\\)") + datestring)) + (setq day (read (substring datestring (match-beginning 1) + (match-end 1)))) + (setq month (icalendar-get-month-number + (substring datestring (match-beginning 2) + (match-end 2)))) + (setq year (read (substring datestring (match-beginning 3) + (match-end 3))))) + (;; date contains month names -- non-european-style + (and (not european-calendar-style) + (string-match (concat "\\s-*" + "\\([A-Za-z][^ ]+\\)[ \t/]\\s-*" + "0?\\([123]?[0-9]\\),?[ \t/]\\s-*" + "\\([0-9]\\{4\\}\\)") + datestring)) + (setq day (read (substring datestring (match-beginning 2) + (match-end 2)))) + (setq month (icalendar-get-month-number + (substring datestring (match-beginning 1) + (match-end 1)))) + (setq year (read (substring datestring (match-beginning 3) + (match-end 3))))) + (t + nil))) + (if (> day 0) + (let ((mdy (calendar-gregorian-from-absolute + (+ (calendar-absolute-from-gregorian (list month day year)) + (or day-shift 0))))) + (format "%04d%02d%02d" (nth 2 mdy) (nth 0 mdy) (nth 1 mdy))) + nil))) + +(defun icalendar-dmsg (&rest args) + "Print message ARGS if `icalendar-debug' is non-nil." + (if icalendar-debug + (apply 'message args))) + +(defun icalendar-diarytime-to-isotime (timestring ampmstring) + "Convert a a time like 9:30pm to an iso-conform string like T213000. +In this example the TIMESTRING would be \"9:30\" and the AMPMSTRING +would be \"pm\"." + (if timestring + (let ((starttimenum (read (icalendar-rris ":" "" timestring)))) + ;; take care of am/pm style + (if (and ampmstring (string= "pm" ampmstring)) + (setq starttimenum (+ starttimenum 1200))) + (format "T%04d00" starttimenum)) + nil)) + +(defun icalendar-convert-string-for-export (s) + "Escape comma and other critical characters in string S." + (icalendar-rris "," "\\\\," s)) + +(defun icalendar-convert-for-import (string) + "Remove escape chars for comma, semicolon etc. from STRING." + (icalendar-rris + "\\\\n" "\n " (icalendar-rris + "\\\\\"" "\"" (icalendar-rris + "\\\\;" ";" (icalendar-rris + "\\\\," "," string))))) + +;; ====================================================================== +;; export -- convert emacs-diary to icalendar +;; ====================================================================== + +(defun icalendar-convert-diary-to-ical (diary-filename ical-filename + &optional do-not-clear-diary-file) + "Export diary file to iCalendar format -- erases ical-filename!!!. +Argument DIARY-FILENAME is the input `diary-file'. +Argument ICAL-FILENAME is the output iCalendar file. +If DO-NOT-CLEAR-DIARY-FILE is not nil the target iCalendar file +is not erased." + (interactive "FExport diary data from file: +Finto iCalendar file: ") + (let ((result "") + (start 0) + (entry-main "") + (entry-rest "") + (header "") + (contents) + (oops nil) + (nonmarker (concat "^" (regexp-quote diary-nonmarking-symbol) + "?"))) + (save-current-buffer + (set-buffer (find-file diary-filename)) + (goto-char (point-min)) + (while (re-search-forward + "^\\([^ \t\n].*\\)\\(\n[ \t].*\\)*" nil t) + (setq entry-main (match-string 1)) + (if (match-beginning 2) + (setq entry-rest (match-string 2)) + (setq entry-rest "")) + (setq header (format "\nBEGIN:VEVENT\nUID:emacs%d%d%d" + (car (current-time)) + (cadr (current-time)) + (car (cddr (current-time))))) + (setq oops nil) + (cond + ;; anniversaries + ((string-match + (concat nonmarker + "%%(diary-anniversary \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "diary-anniversary %s" entry-main) + (let* ((datetime (substring entry-main (match-beginning 1) + (match-end 1))) + (summary (icalendar-convert-string-for-export + (substring entry-main (match-beginning 2) + (match-end 2)))) + (startisostring (icalendar-datestring-to-isodate + datetime)) + (endisostring (icalendar-datestring-to-isodate + datetime 1))) + (setq contents + (concat "\nDTSTART;VALUE=DATE:" startisostring + "\nDTEND;VALUE=DATE:" endisostring + "\nSUMMARY:" summary + "\nRRULE:FREQ=YEARLY;INTERVAL=1" + ;; the following is redundant, + ;; but korganizer seems to expect this... ;( + ;; and evolution doesn't understand it... :( + ;; so... who is wrong?! + ";BYMONTH=" (substring startisostring 4 6) + ";BYMONTHDAY=" (substring startisostring 6 8) + ))) + (unless (string= entry-rest "") + (setq contents (concat contents "\nDESCRIPTION:" + (icalendar-convert-string-for-export + entry-rest))))) + ;; cyclic events + ;; %%(diary-cyclic ) + ((string-match + (concat nonmarker + "%%(diary-cyclic \\([^ ]+\\) +" + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "diary-cyclic %s" entry-main) + (let* ((frequency (substring entry-main (match-beginning 1) + (match-end 1))) + (datetime (substring entry-main (match-beginning 2) + (match-end 2))) + (summary (icalendar-convert-string-for-export + (substring entry-main (match-beginning 3) + (match-end 3)))) + (startisostring (icalendar-datestring-to-isodate + datetime)) + (endisostring (icalendar-datestring-to-isodate + datetime 1))) + (setq contents + (concat "\nDTSTART;VALUE=DATE:" startisostring + "\nDTEND;VALUE=DATE:" endisostring + "\nSUMMARY:" summary + "\nRRULE:FREQ=DAILY;INTERVAL=" frequency + ;; strange: korganizer does not expect + ;; BYSOMETHING here... + ))) + (unless (string= entry-rest "") + (setq contents (concat contents "\nDESCRIPTION:" + (icalendar-convert-string-for-export + entry-rest))))) + ;; diary-date -- FIXME + ((string-match + (concat nonmarker + "%%(diary-date \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "diary-date %s" entry-main) + (setq oops t)) + ;; float events -- FIXME + ((string-match + (concat nonmarker + "%%(diary-float \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "diary-float %s" entry-main) + (setq oops t)) + ;; block events + ((string-match + (concat nonmarker + "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\) +" + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "diary-block %s" entry-main) + (let* ((startstring (substring entry-main (match-beginning 1) + (match-end 1))) + (endstring (substring entry-main (match-beginning 2) + (match-end 2))) + (summary (icalendar-convert-string-for-export + (substring entry-main (match-beginning 3) + (match-end 3)))) + (startisostring (icalendar-datestring-to-isodate + startstring)) + (endisostring (icalendar-datestring-to-isodate + endstring 1))) + (setq contents + (concat "\nDTSTART;VALUE=DATE:" startisostring + "\nDTEND;VALUE=DATE:" endisostring + "\nSUMMARY:" summary + )) + (unless (string= entry-rest "") + (setq contents (concat contents "\nDESCRIPTION:" + (icalendar-convert-string-for-export + entry-rest)))))) + ;; other sexp diary entries -- FIXME + ((string-match + (concat nonmarker + "%%(\\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "diary-sexp %s" entry-main) + (setq oops t)) + ;; weekly by day + ;; Monday 8:30 Team meeting + ((and (string-match + (concat nonmarker + "\\([a-z]+\\)\\s-+" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(-0?" + "\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)$") + entry-main) + (icalendar-get-weekday-abbrev + (substring entry-main (match-beginning 1) (match-end 1)))) + (icalendar-dmsg "weekly %s" entry-main) + (let* ((day (icalendar-get-weekday-abbrev + (substring entry-main (match-beginning 1) + (match-end 1)))) + (starttimestring (icalendar-diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar-diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar-convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (when starttimestring + (unless endtimestring + (let ((time (read (icalendar-rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" (+ 10000 time)))))) + (setq contents + (concat "\nDTSTART" + (if starttimestring "" ";VALUE=DATE") + ":19000101" ;; FIXME? Probability that this + ;; is the right day is 1/7 + (or starttimestring "") + "\nDTEND" + (if endtimestring "" ";VALUE=DATE") + ":19000101" ;; FIXME? + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" day + ))) + (unless (string= entry-rest "") + (setq contents (concat contents "\nDESCRIPTION:" + (icalendar-convert-string-for-export + entry-rest))))) + ;; yearly by day + ;; 1 May Tag der Arbeit + ((string-match + (concat nonmarker + (if european-calendar-style + "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" + "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") + "\\*?\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\([^0-9]+.*\\)$"; must not match years + ) + entry-main) + (icalendar-dmsg "yearly %s" entry-main) + (let* ((daypos (if european-calendar-style 1 2)) + (monpos (if european-calendar-style 2 1)) + (day (read (substring entry-main (match-beginning daypos) + (match-end daypos)))) + (month (icalendar-get-month-number + (substring entry-main (match-beginning monpos) + (match-end monpos)))) + (starttimestring (icalendar-diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar-diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar-convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (when starttimestring + (unless endtimestring + (let ((time (read (icalendar-rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" (+ 10000 time)))))) + (setq contents + (concat "\nDTSTART" + (if starttimestring "" ";VALUE=DATE") + (format ":1900%02d%02d" month day) + (or starttimestring "") + "\nDTEND" + (if endtimestring "" ";VALUE=DATE") + (format ":1900%02d%02d" month day) + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" + (format "%2d" month) + ";BYMONTHDAY=" + (format "%2d" day) + ))) + (unless (string= entry-rest "") + (setq contents (concat contents "\nDESCRIPTION:" + (icalendar-convert-string-for-export + entry-rest))))) + ;; "ordinary" events, start and end time given + ;; 1 Feb 2003 Hs Hochzeitsfeier, Dreieich + ((string-match + (concat nonmarker + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-+" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (icalendar-dmsg "ordinary %s" entry-main) + (let* ((datestring (icalendar-datestring-to-isodate + (substring entry-main (match-beginning 1) + (match-end 1)))) + (starttimestring (icalendar-diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar-diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar-convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (when starttimestring + (unless endtimestring + (let ((time (read (icalendar-rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" (+ 10000 time)))))) + (setq contents (format + "\nDTSTART%s:%s%s\nDTEND%s:%s%s\nSUMMARY:%s" + (if starttimestring "" ";VALUE=DATE") + datestring + (or starttimestring "") + (if endtimestring "" + ";VALUE=DATE") + datestring + (or endtimestring "") + summary)) + (unless (string= entry-rest "") + (setq contents (concat contents "\nDESCRIPTION:" + (icalendar-convert-string-for-export + entry-rest)))))) + ;; everything else + (t + ;; Oops! what's that? + (setq oops t))) + (if oops + (message "Cannot export entry on line %d" + (count-lines (point-min) (point))) + (setq result (concat result header contents "\nEND:VEVENT")))) + ;; we're done, insert everything into the file + (let ((coding-system-for-write 'utf8)) + (set-buffer (find-file ical-filename)) + (unless do-not-clear-diary-file + (erase-buffer)) + (insert + "BEGIN:VCALENDAR\nPRODID:-//Emacs//NONSGML icalendar.el//EN") + (insert "\nVERSION:2.0") + (insert result) + (insert "\nEND:VCALENDAR\n"))))) + + +;; ====================================================================== +;; import -- convert icalendar to emacs-diary +;; ====================================================================== + +;; user function +(defun icalendar-import-file (ical-filename diary-filename + &optional non-marking + do-not-clear-diary-file) + "Import a iCalendar file and save to a diary file -- erases diary-file! +Argument ICAL-FILENAME output iCalendar file. +Argument DIARY-FILENAME input `diary-file'. +Optional argument NON-MARKING determines whether events are created as +non-marking or not. +If DO-NOT-CLEAR-DIARY-FILE is not nil the target diary file is +not erased." + (interactive "fImport iCalendar data from file: +Finto diary file (will be erased!): +p") + ;; clean up the diary file + (save-current-buffer + (unless do-not-clear-diary-file + ;; clear the target diary file + (set-buffer (find-file diary-filename)) + (erase-buffer)) + ;; now load and convert from the ical file + (set-buffer (find-file ical-filename)) + (icalendar-extract-ical-from-buffer diary-filename t non-marking))) + +; user function +(defun icalendar-extract-ical-from-buffer (&optional + diary-file do-not-ask + non-marking) + "Extract iCalendar events from current buffer. + +This function searches the current buffer for the first iCalendar +object, reads it and adds all VEVENT elements to the diary +DIARY-FILE. + +It will ask for each appointment whether to add it to the diary +when DO-NOT-ASK is non-nil. When called interactively, +DO-NOT-ASK is set to t, so that you are asked fore each event. + +NON-MARKING determines whether diary events are created as +non-marking. + +This function attempts to notify about problems that occur when +reading, parsing, or converting iCalendar data!" + (interactive) + (save-current-buffer + ;; prepare ical + (message "Preparing icalendar...") + (set-buffer (icalendar-get-unfolded-buffer (current-buffer))) + (goto-char (point-min)) + (message "Preparing icalendar...done") + (if (re-search-forward "^BEGIN:VCALENDAR\\s-*$" nil t) + (let (ical-contents ical-errors) + ;; read ical + (message "Reading icalendar...") + (beginning-of-line) + (setq ical-contents (icalendar-read-element nil nil)) + (message "Reading icalendar...done") + ;; convert ical + (message "Converting icalendar...") + (setq ical-errors (icalendar-convert-ical-to-diary + ical-contents + diary-file do-not-ask non-marking)) + (when diary-file + ;; save the diary file + (save-current-buffer + (set-buffer (find-buffer-visiting diary-file)) + (save-buffer))) + (message "Converting icalendar...done") + (if (and ical-errors (y-or-n-p + (concat "Something went wrong -- " + "do you want to see the " + "error log? "))) + (switch-to-buffer " *icalendar-errors*"))) + (message + "Current buffer does not contain icalendar contents!")))) + +;; ---------------------------------------------------------------------- +;; private area +;; ---------------------------------------------------------------------- +(defun icalendar-format-ical-event (event) + "Create a string representation of an iCalendar EVENT." + (let ((string icalendar-import-format) + (conversion-list + '(("%d" DESCRIPTION icalendar-import-format-description) + ("%s" SUMMARY icalendar-import-format-subject) + ("%l" LOCATION icalendar-import-format-location) + ("%o" ORGANIZER icalendar-import-format-organizer)))) + ;; convert the specifiers in the format string + (mapcar (lambda (i) + (let* ((spec (car i)) + (prop (cadr i)) + (format (car (cddr i))) + (contents (icalendar-get-event-property event prop)) + (formatted-contents "")) + ;;(message "%s" event) + ;;(message "contents%s = %s" prop contents) + (when (and contents (> (length contents) 0)) + (setq formatted-contents + (icalendar-rris "%s" + (icalendar-convert-for-import + contents) + (symbol-value format)))) + (setq string (icalendar-rris spec + formatted-contents + string)))) + conversion-list) + string)) + +(defun icalendar-convert-ical-to-diary (ical-list diary-file + &optional do-not-ask + non-marking) + "Convert an iCalendar file to an Emacs diary file. +Import VEVENTS from the iCalendar object ICAL-LIST and saves them to a +DIARY-FILE. If DO-NOT-ASK is nil the user is asked for each event +whether to actually import it. NON-MARKING determines whether diary +events are created as non-marking. +This function attempts to return t if something goes wrong. In this +case an error string which describes all the errors and problems is +written into the buffer ` *icalendar-errors*'." + (let* ((ev (icalendar-all-events ical-list)) + (error-string "") + (event-ok t) + (found-error nil) + e diary-string) + ;; step through all events/appointments + (while ev + (setq e (car ev)) + (setq ev (cdr ev)) + (setq event-ok nil) + (condition-case error-val + (let* ((dtstart (icalendar-decode-isodatetime + (icalendar-get-event-property e 'DTSTART))) + (start-d (calendar-date-string + (icalendar-datetime-to-noneuropean-date + dtstart) + t t)) + (start-t (icalendar-datetime-to-colontime dtstart)) + (dtend (icalendar-decode-isodatetime + (icalendar-get-event-property e 'DTEND))) + end-d + end-t + (subject (icalendar-convert-for-import + (or (icalendar-get-event-property e 'SUMMARY) + "No Subject"))) + (rrule (icalendar-get-event-property e 'RRULE)) + (rdate (icalendar-get-event-property e 'RDATE)) + (duration (icalendar-get-event-property e 'DURATION))) + (icalendar-dmsg "%s: %s" start-d subject) + (when duration + (let ((dtend2 (icalendar-add-decoded-times + dtstart + (icalendar-decode-isoduration duration)))) + (if (and dtend (not (eq dtend dtend2))) + (message "Inconsistent endtime and duration for %s" + subject)) + (setq dtend dtend2))) + (setq end-d (if dtend + (calendar-date-string + (icalendar-datetime-to-noneuropean-date + dtend) + t t) + start-d)) + (setq end-t (if dtend + (icalendar-datetime-to-colontime dtend) + start-t)) + (icalendar-dmsg "start-d: %s, end-d: %s" start-d end-d) + (cond + ;; recurring event + (rrule + (icalendar-dmsg "recurring event") + (let* ((rrule-props (icalendar-split-value rrule)) + (frequency (car (cdr (assoc 'FREQ rrule-props)))) + (until (car (cdr (assoc 'UNTIL rrule-props)))) + (interval (read (car (cdr (assoc 'INTERVAL + rrule-props)))))) + (cond ((string-equal frequency "WEEKLY") + (if (not start-t) + (progn + ;; weekly and all-day + (icalendar-dmsg "weekly all-day") + (setq diary-string + (format + "%%%%(diary-cyclic %d %s)" + (* interval 7) + (icalendar-datetime-to-european-date + dtstart)))) + ;; weekly and not all-day + (let* ((byday (cadr (assoc 'BYDAY rrule-props))) + (weekday + (cdr (rassoc + byday + icalendar-weekdayabbrev-table)))) + (icalendar-dmsg "weekly not-all-day") + (if weekday + (setq diary-string + (format "%s %s%s%s" weekday + start-t (if end-t "-" "") + (or end-t ""))) + ;; FIXME!!!! + ;; DTSTART;VALUE=DATE-TIME:20030919T090000 + ;; DTEND;VALUE=DATE-TIME:20030919T113000 + (setq diary-string + (format + "%%%%(diary-cyclic %s %s) %s%s%s" + (* interval 7) + (icalendar-datetime-to-european-date + dtstart) + start-t (if end-t "-" "") (or end-t "")))) + (setq event-ok t)))) + ;; yearly + ((string-equal frequency "YEARLY") + (icalendar-dmsg "yearly") + (setq diary-string + (format + "%%%%(diary-anniversary %s)" + (icalendar-datetime-to-european-date dtstart))) + (setq event-ok t)) + ;; FIXME: war auskommentiert: + ((and (string-equal frequency "DAILY") + ;;(not (string= start-d end-d)) + ;;(not start-t) + ;;(not end-t) + ) + (let ((ds (icalendar-datetime-to-noneuropean-date + (icalendar-decode-isodatetime + (icalendar-get-event-property e + 'DTSTART)))) + (de (icalendar-datetime-to-noneuropean-date + (icalendar-decode-isodatetime + until)))) + (setq diary-string + (format + "%%%%(diary-block %d %d %d %d %d %d)" + (nth 1 ds) (nth 0 ds) (nth 2 ds) + (nth 1 de) (nth 0 de) (nth 2 de)))) + (setq event-ok t))) + )) + (rdate + (icalendar-dmsg "rdate event") + (setq diary-string "") + (mapcar (lambda (datestring) + (setq diary-string + (concat diary-string + (format "......")))) + (icalendar-split-value rdate))) + ;; non-recurring event + ;; long event + ((not (string= start-d end-d)) + (icalendar-dmsg "non-recurring event") + (let ((ds (icalendar-datetime-to-noneuropean-date dtstart)) + (de (icalendar-datetime-to-noneuropean-date dtend))) + (setq diary-string + (format "%%%%(diary-block %d %d %d %d %d %d)" + (nth 1 ds) (nth 0 ds) (nth 2 ds) + (nth 1 de) (nth 0 de) (nth 2 de)))) + (setq event-ok t)) + ;; not all-day + ((and start-t (or (not end-t) + (not (string= start-t end-t)))) + (icalendar-dmsg "not all day event") + (cond (end-t + (setq diary-string (format "%s %s-%s" start-d + start-t end-t))) + (t + (setq diary-string (format "%s %s" start-d + start-t)))) + (setq event-ok t)) + ;; all-day event + (t + (icalendar-dmsg "all day event") + (setq diary-string start-d) + (setq event-ok t))) + ;; add all other elements unless the user doesn't want to have + ;; them + (if event-ok + (progn + (setq diary-string + (concat diary-string " " + (icalendar-format-ical-event e))) + (if do-not-ask (setq subject nil)) + (icalendar-add-diary-entry diary-string diary-file + non-marking subject)) + ;; event was not ok + (setq found-error t) + (setq error-string + (format "%s\nCannot handle this event:%s" + error-string e)))) + ;; handle errors + (error + (message "Ignoring event \"%s\"" e) + (setq found-error t) + (setq error-string (format "%s\nCannot handle this event: %s" + error-string e))))) + (if found-error + (save-current-buffer + (set-buffer (get-buffer-create " *icalendar-errors*")) + (erase-buffer) + (insert error-string))) + (message "Converting icalendar...done") + found-error)) + +(defun icalendar-add-diary-entry (string diary-file non-marking + &optional subject) + "Add STRING to the diary file DIARY-FILE. +STRING must be a properly formatted valid diary entry. NON-MARKING +determines whether diary events are created as non-marking. If +SUBJECT is not nil it must be a string that gives the subject of the +entry. In this case the user will be asked whether he wants to insert +the entry." + (when (or (not subject) ; + (y-or-n-p (format "Add appointment for `%s' to diary? " + subject))) + (when subject + (setq non-marking + (y-or-n-p (format "Make appointment non-marking? ")))) + (save-window-excursion + (unless diary-file + (setq diary-file + (read-file-name "Add appointment to this diary file: "))) + (make-diary-entry string non-marking diary-file)))) + +;; ====================================================================== +;; (add-hook 'list-diary-entries-hook 'include-icalendar-files) +;; ====================================================================== +(defun include-icalendar-files () + "Not yet implemented.") + +(provide 'icalendar) + +;;; icalendar.el ends here From 47daea4c260bad3f1700d9ed4d48d95a8e4a7720 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 5 Oct 2004 22:31:35 +0000 Subject: [PATCH 031/166] From Ulf Jasper : (iCalendar): New section for new package. --- man/calendar.texi | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/man/calendar.texi b/man/calendar.texi index a4eca0513ff..f85527ad0ea 100644 --- a/man/calendar.texi +++ b/man/calendar.texi @@ -37,6 +37,7 @@ information about the calendar and diary. * Other Calendars:: Converting dates to other calendar systems. * Diary:: Displaying events from your diary. * Appointments:: Reminders when it's time to do something. +* iCalendar:: Converting diary events to/from iCalendar format. * Daylight Savings:: How to specify when daylight savings time is active. * Time Intervals:: Keeping track of time intervals. @end menu @@ -1383,6 +1384,57 @@ clock. The command @kbd{M-x appt-add} adds entries to the appointment list without affecting your diary file. You delete entries from the appointment list with @kbd{M-x appt-delete}. +@node iCalendar +@section iCalendar +@cindex iCalendar support + + The icalendar package aims at providing an implementation of the +iCalendar standard, as defined in ``RFC 2445 -- Internet Calendaring and +Scheduling Core Object Specification (iCalendar)''. It provides a means +for importing [iv]Calendar data into Emacs diary files and vice versa. + + Importing should work correctly for ``ordinary'', i.e. non-recurring, +events. Recurring events may not be imported correctly, if they are +imported at all. Exporting of diary files into iCalendar files should +work correctly for most diary entries. Please note that +@file{icalendar.el} is work in progress, so usage may evolve in future. + +@subsection Usage + + To activate the package, use @code{(require 'icalendar)}. + +@findex icalendar-extract-ical-from-buffer + The command @code{icalendar-extract-ical-from-buffer} extracts +iCalendar data from the current buffer and adds it to your (default) +diary file. It can be used interactively, or for automatic extraction +of iCalendar data; for example with the VM mail reader one could use: + +@example +(add-hook 'vm-select-new-message-hook 'icalendar-extract-ical-from-buffer) +@end example + +@findex icalendar-import-file + The function @code{icalendar-import-file} can be used +non-interactively to import an iCalendar file. @strong{Caution:} the +contents of the target diary file are @emph{deleted} by default! It is +highly recommended to use a dedicated diary file for importing. For +example: + +@example +(icalendar-import-file "/here/is/calendar.ics" "/there/goes/ical-diary") +@end example + +@noindent +The import file can be added to the diary using an @code{#include} +directive. @xref{Fancy Diary Display,,, elisp, The Emacs Lisp Reference +Manual}. + +@findex icalendar-convert-diary-to-ical + Use @code{icalendar-convert-diary-to-ical} to interactively export an +Emacs diary file to iCalendar format. @strong{Caution:} the contents of +the target file are @emph{deleted} by default! + + @node Daylight Savings @section Daylight Savings Time @cindex daylight savings time From 1698fb36fb35414e407276e3680ba0da29f885af Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 5 Oct 2004 22:37:14 +0000 Subject: [PATCH 032/166] *** empty log message *** --- etc/NEWS | 4 ++++ lisp/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index ee94a259b7f..27521612a9e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1395,6 +1395,10 @@ of the recognized cursor types. controls whether or not the function `make-auto-save-file-name' will attempt to construct a unique auto-save name (e.g. for remote files). ++++ +** There is a new calendar package, icalendar.el, that can be used to +convert Emacs diary entries to/from the iCalendar format. + +++ ** Diary sexp entries can have custom marking in the calendar. Diary sexp functions which only apply to certain days (such as diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94ad045d5bb..16278c0a996 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-10-05 Ulf Jasper + + * calendar/icalendar.el: New file. + 2004-10-05 Juri Linkov * isearch.el (isearch-done): Set mark after running hook. From 304c317325e4b78023fd6d76b63aa15c7c3cd078 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 5 Oct 2004 23:28:59 +0000 Subject: [PATCH 033/166] Various small changes in addition to the following. (Text): Replace xref for autotype with inforef. (Sentences): Explain nil value for `sentence-end'. (Paragraphs): Update default values for `paragraph-start' and `paragraph-separate'. (Text Mode): Correct description of Text mode's effect on the syntax table. (Outline Visibility): `hide-other' does not hide top level headings. `selective-display-ellipses' no longer has an effect on Outline mode. (TeX Misc): Add missing @cindex. Replace xref for RefTeX with inforef. (Requesting Formatted Text): the variable `enriched-fill-after-visiting' no longer exists. (Editing Format Info): Update names of menu items and commands. (Format Faces): Mention special effect of specifying the default face. Describe inheritance of text properties. Correct description of `fixed' face. (Format Indentation): Correct description of effect of setting margins. Mention `set-left-margin' and `set-right-margin'. (Format Justification): Update names of menu items. `set-justification-full' is now bound to `M-j b'. Mention that `default-justification' is a per buffer variable. (Format Properties): Update name of menu item. (Forcing Enriched Mode): `format-decode-buffer' automatically turns on Enriched mode if the buffer is in text/enriched format. --- man/text.texi | 211 +++++++++++++++++++++++++++----------------------- 1 file changed, 112 insertions(+), 99 deletions(-) diff --git a/man/text.texi b/man/text.texi index dbf990a2b57..01405ae525b 100644 --- a/man/text.texi +++ b/man/text.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001, 2002 +@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001, 2002, 2004 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Text, Programs, Indentation, Top @@ -55,7 +55,7 @@ Then the formatting appears on the screen in Emacs while you edit. @cindex autotyping @cindex automatic typing The ``automatic typing'' features may be useful when writing text. -@xref{Top,, Autotyping, autotype, Features for Automatic Typing}. +@inforef{Top,, autotype}. @menu * Words:: Moving over and killing words. @@ -215,10 +215,12 @@ followed by the end of a line or two spaces, with any number of A sentence also begins or ends wherever a paragraph begins or ends. @vindex sentence-end - The variable @code{sentence-end} controls recognition of the end of a -sentence. It is a regexp that matches the last few characters of a -sentence, together with the whitespace following the sentence. Its -normal value is + The variable @code{sentence-end} controls recognition of the end of +a sentence. If non-@code{nil}, it is a regexp that matches the last +few characters of a sentence, together with the whitespace following +the sentence. If the value is @code{nil}, the default, then Emacs +computes the regexp according to various criteria. The result is +normally similar to the following regexp: @example "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" @@ -298,9 +300,10 @@ that either starts or separates paragraphs. The value of that separate paragraphs without being part of any paragraph (for example, blank lines). Lines that start a new paragraph and are contained in it must match only @code{paragraph-start}, not -@code{paragraph-separate}. For example, in Fundamental mode, -@code{paragraph-start} is @w{@code{"[ \t\n\f]"}}, and -@code{paragraph-separate} is @w{@code{"\f\\|[ \t]*$"}}. +@code{paragraph-separate}. Each regular expression must match at the +left margin. For example, in Fundamental mode, @code{paragraph-start} +is @w{@code{"\f\\|[ \t]*$"}}, and @code{paragraph-separate} is +@w{@code{"[ \t\f]*$"}}. Normally it is desirable for page boundaries to separate paragraphs. The default values of these variables recognize the usual separator for @@ -312,9 +315,9 @@ pages. @cindex pages @cindex formfeed Files are often thought of as divided into @dfn{pages} by the -@dfn{formfeed} character (@acronym{ASCII} control-L, octal code 014). When you -print hardcopy for a file, this character forces a page break; thus, -each page of the file goes on a separate page on paper. Most Emacs +@dfn{formfeed} character (@acronym{ASCII} control-L, octal code 014). +When you print hardcopy for a file, this character forces a page break; +thus, each page of the file goes on a separate page on paper. Most Emacs commands treat the page-separator character just like any other character: you can insert it with @kbd{C-q C-l}, and delete it with @key{DEL}. Thus, you are free to paginate your file or not. However, @@ -575,7 +578,7 @@ period. Set the variable @code{sentence-end-without-period} to conditions for where line-breaking is allowed. Its value is either @code{nil} or a Lisp function; the function is called with no arguments, and if it returns a non-@code{nil} value, then point is not -a good place to break the line. The standard functions you can use +a good place to break the line. Two standard functions you can use are @code{fill-single-word-nobreak-p} (don't break after the first word of a sentence or before the last) and @code{fill-french-nobreak-p} (don't break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). @@ -606,11 +609,12 @@ a new paragraph. @kindex C-x . @findex set-fill-prefix - To specify a fill prefix, move to a line that starts with the desired -prefix, put point at the end of the prefix, and give the command -@w{@kbd{C-x .}}@: (@code{set-fill-prefix}). That's a period after the -@kbd{C-x}. To turn off the fill prefix, specify an empty prefix: type -@w{@kbd{C-x .}}@: with point at the beginning of a line.@refill + To specify a fill prefix for the current buffer, move to a line that +starts with the desired prefix, put point at the end of the prefix, +and give the command @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). +That's a period after the @kbd{C-x}. To turn off the fill prefix, +specify an empty prefix: type @w{@kbd{C-x .}}@: with point at the +beginning of a line.@refill When a fill prefix is in effect, the fill commands remove the fill prefix from each line before filling and insert it on each line after @@ -824,14 +828,14 @@ filling determines what indentation to use when filling a paragraph. @kindex TAB @r{(Text mode)} Text mode defines @key{TAB} to run @code{indent-relative} (@pxref{Indentation}), so that you can conveniently indent a line like -the previous line. When the previous line is not indented, -@code{indent-relative} runs @code{tab-to-tab-stop}, which uses Emacs tab -stops that you can set (@pxref{Tab Stops}). +the previous line. Text mode turns off the features concerned with comments except when -you explicitly invoke them. It changes the syntax table so that periods -are not considered part of a word, while apostrophes, backspaces and -underlines are considered part of words. +you explicitly invoke them. It changes the syntax table so that +single-quotes are considered part of words. However, if a word starts +with single-quotes, then these are treated as a prefix for purposes +such as capitalization. That is, @kbd{M-c} will convert +@samp{'hello'} into @samp{'Hello'}, as expected. @cindex Paragraph-Indent Text mode @cindex mode, Paragraph-Indent Text @@ -896,8 +900,8 @@ invisible lines follow). Editing commands that operate on lines, such as @kbd{C-n} and @kbd{C-p}, treat the text of the invisible line as part of the previous -visible line. Killing an entire visible line, including its terminating -newline, really kills all the following invisible lines along with it. +visible line. Killing the ellipsis at the end of a visible line +really kills all the following invisible lines. Outline minor mode provides the same commands as the major mode, Outline mode, but you can use it in conjunction with other major modes. @@ -1137,12 +1141,9 @@ except the top @var{n} levels of heading lines. @findex hide-other @kindex C-c C-o @r{(Outline mode)} The command @kbd{C-c C-o} (@code{hide-other}) hides everything except -the heading or body text that point is in, plus its parents (the headers -leading up from there to top level in the outline). - - You can turn off the use of ellipses at the ends of visible lines by -setting @code{selective-display-ellipses} to @code{nil}. Then there is -no visible indication of the presence of invisible lines. +the heading and body text that point is in, plus its parents (the headers +leading up from there to top level in the outline) and the top level +headings. @findex reveal-mode When incremental search finds text that is hidden by Outline mode, @@ -1180,7 +1181,7 @@ buffers. nested portion of the outline, while hiding its relatives at higher levels. - Consider an Outline mode buffer all the text and subheadings under + Consider an Outline mode buffer with all the text and subheadings under level-1 headings hidden. To look at what is hidden under one of these headings, you could use @kbd{C-c C-e} (@kbd{M-x show-entry}) to expose the body, or @kbd{C-c C-i} to expose the child (level-2) headings. @@ -1215,8 +1216,8 @@ particular chapter or section of your document. To unzoom (exit) a fold, use @kbd{C-c C-x} (@kbd{M-x foldout-exit-fold}). This hides all the text and subheadings under the top-level heading and returns you to the previous view of the buffer. Specifying a numeric -argument exits that many levels of folds. Specifying a zero argument exits all -folds. +argument exits that many levels of folds. Specifying a zero argument +exits all folds. To cancel the narrowing of a fold without hiding the text and subheadings, specify a negative argument. For example, @kbd{M--2 C-c @@ -1633,7 +1634,7 @@ current buffer's file. Generally, you need to do @kbd{C-c C-f} @findex iso-iso2gtex @findex iso-gtex2iso @cindex Latin-1 @TeX{} encoding -@TeX{} encoding +@cindex @TeX{} encoding The commands @kbd{M-x iso-iso2tex}, @kbd{M-x iso-tex2iso}, @kbd{M-x iso-iso2gtex} and @kbd{M-x iso-gtex2iso} can be used to convert between Latin-1 encoded files and @TeX{}-encoded equivalents. @@ -1659,7 +1660,7 @@ required. This is set up for Czech---customize the group @cindex references, La@TeX{} @cindex La@TeX{} references For managing all kinds of references for La@TeX{}, you can use -Ref@TeX{}. @xref{Top, , RefTeX, reftex}. +Ref@TeX{}. @inforef{Top,, reftex}. @node HTML Mode @section SGML, XML, and HTML Modes @@ -1880,16 +1881,6 @@ into the file. When you visit the file again, Emacs will automatically recognize the format, reconvert the text, and turn on Enriched mode again. -@vindex enriched-fill-after-visiting - Normally, after visiting a file in text/enriched format, Emacs refills -each paragraph to fit the specified right margin. You can turn off this -refilling, to save time, by setting the variable -@code{enriched-fill-after-visiting} to @code{nil} or to @code{ask}. - - However, when visiting a file that was saved from Enriched mode, there -is no need for refilling, because Emacs saves the right margin settings -along with the text. - @vindex enriched-translations You can add annotations for saving additional text properties, which Emacs normally does not save, by adding to @code{enriched-translations}. @@ -1951,22 +1942,22 @@ commands directly: @table @code @findex facemenu-remove-face-props @item Remove Face Properties -Delete from the region all the text properties that the Text Properties -menu works with (@code{facemenu-remove-face-props}). +Delete from the region all face and color text properties +(@code{facemenu-remove-face-props}). @findex facemenu-remove-all -@item Remove All +@item Remove Text Properties Delete @emph{all} text properties from the region (@code{facemenu-remove-all}). -@findex describe-text-at +@findex describe-text-properties @cindex text properties of characters @cindex overlays at character position @cindex widgets at buffer position @cindex buttons at buffer position -@item Describe Text +@item Describe Properties List all the text properties, widgets, buttons, and overlays of the -character following point (@code{describe-text-at}). +character following point (@code{describe-text-properties}). @item Display Faces Display a list of all the defined faces (@code{list-faces-display}). @@ -2018,8 +2009,20 @@ Set the region, or the next inserted character, to the face @var{face} If you use these commands with a prefix argument---or, in Transient Mark mode, if the region is not active---then these commands specify a face -to use for your next self-inserting input. @xref{Transient Mark}. This -applies to both the keyboard commands and the menu commands. +to use for any immediately following self-inserting input. +@xref{Transient Mark}. This applies to both the keyboard commands and +the menu commands. + + Specifying the @code{default} face also resets foreground and +background color to their defaults.(@pxref{Format Colors}). + + Any self-inserting character you type inherits, by default, the face +properties (as well as most other text properties) of the preceding +character. Specifying any face property, including foreground or +background color, for your next self-inserting character will prevent +it from inheriting any face properties from the preceding character, +although it will still inherit other text properties. Characters +inserted by yanking do not inherit text properties. Enriched mode defines two additional faces: @code{excerpt} and @code{fixed}. These correspond to codes used in the text/enriched file @@ -2029,20 +2032,17 @@ format. same as @code{italic} unless you customize it (@pxref{Face Customization}). The @code{fixed} face means, ``Use a fixed-width font for this part -of the text.'' This makes a visible difference only if you have -specified a variable-width font in the default face; however, even if -the default font is fixed-width, applying the @code{fixed} face to a -part of the text will cause that part of the text to appear in a -fixed-width font, if the file is ever displayed with a variable-width -default font. This applies to Emacs and to other systems that display -text/enriched format. So if you specifically want a certain part of -the text to use a fixed-width font, you should specify the -@code{fixed} face for that part. +of the text.'' Applying the @code{fixed} face to a part of the text +will cause that part of the text to appear in a fixed-width font, even +if the default font is variable-width. This applies to Emacs and to +other systems that display text/enriched format. So if you +specifically want a certain part of the text to use a fixed-width +font, you should specify the @code{fixed} face for that part. - The @code{fixed} face is normally set up to use a different font -from the default, even if the default face is also fixed-width. -Different systems have different fonts installed, so you may need to -customize this. @xref{Face Customization}. + By default, the @code{fixed} face looks the same as @code{bold}. +This is an attempt to distinguish it from @code{default}. You may +wish to customize @code{fixed} to some other fixed-width medium font. +@xref{Face Customization}. If your terminal cannot display different faces, you will not be able to see them, but you can still edit documents containing faces, @@ -2058,20 +2058,20 @@ text. There is a menu for specifying the foreground color and a menu for specifying the background color. Each color menu lists all the colors that you have used in Enriched mode in the current Emacs session. - If you specify a color with a prefix argument---or, in Transient Mark -mode, if the region is not active---then it applies to your next -self-inserting input. @xref{Transient Mark}. Otherwise, the command -applies to the region. + If you specify a color with a prefix argument---or, in Transient +Mark mode, if the region is not active---then it applies to any +immediately following self-inserting input. @xref{Transient Mark}. +Otherwise, the command applies to the region. Each color menu contains one additional item: @samp{Other}. You can use this item to specify a color that is not listed in the menu; it reads -the color name with the minibuffer. To display list of available colors +the color name with the minibuffer. To display a list of available colors and their names, use the @samp{Display Colors} menu item in the Text Properties menu (@pxref{Editing Format Info}). Any color that you specify in this way, or that is mentioned in a -formatted text file that you read in, is added to both color menus for -the duration of the Emacs session. +formatted text file that you read in, is added to the corresponding +color menu for the duration of the Emacs session. @findex facemenu-set-foreground @findex facemenu-set-background @@ -2113,33 +2113,42 @@ Remove 4 columns of indentation from the right margin. You can use these commands repeatedly to increase or decrease the indentation. - The most common way to use these commands is to change the indentation -of an entire paragraph. However, that is not the only use. You can -change the margins at any point; the new values take effect at the end -of the line (for right margins) or the beginning of the next line (for -left margins). + The most common way to use them is to change the indentation of an +entire paragraph. For other uses, the effects of refilling can be +hard to predict, except in some special cases like the one described +next. - This makes it possible to format paragraphs with @dfn{hanging indents}, -which means that the first line is indented less than subsequent lines. -To set up a hanging indent, increase the indentation of the region -starting after the first word of the paragraph and running until the end -of the paragraph. + The most common other use is to format paragraphs with @dfn{hanging +indents}, which means that the first line is indented less than +subsequent lines. To set up a hanging indent, increase the +indentation of the region starting after the first word of the +paragraph and running until the end of the paragraph. Indenting the first line of a paragraph is easier. Set the margin for the whole paragraph where you want it to be for the body of the paragraph, then indent the first line by inserting extra spaces or tabs. - Sometimes, as a result of editing, the filling of a paragraph becomes -messed up---parts of the paragraph may extend past the left or right -margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to -refill the paragraph. - @vindex standard-indent The variable @code{standard-indent} specifies how many columns these commands should add to or subtract from the indentation. The default value is 4. The overall default right margin for Enriched mode is controlled by the variable @code{fill-column}, as usual. +@kindex C-c [ @r{(Enriched mode)} +@kindex C-c ] @r{(Enriched mode)} +@findex set-left-margin +@findex set-right-margin + There are also two commands for setting the left or right margin of +the region absolutely: @code{set-left-margin} and +@code{set-right-margin}. Enriched mode binds these commands to +@kbd{C-c [} and @kbd{C-c ]}, respectively. You can specify the +margin width either with a numeric argument or in the minibuffer. + + Sometimes, as a result of editing, the filling of a paragraph becomes +messed up---parts of the paragraph may extend past the left or right +margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to +refill the paragraph. + The fill prefix, if any, works in addition to the specified paragraph indentation: @kbd{C-x .} does not include the specified indentation's whitespace in the new value for the fill prefix, and the fill commands @@ -2157,11 +2166,11 @@ affects the Emacs fill commands. the style. The submenu contains five items: @table @code -@item Flush Left +@item Left This is the most common style of justification (at least for English). Lines are aligned at the left margin but left uneven at the right. -@item Flush Right +@item Right This aligns each line with the right margin. Spaces and tabs are added on the left, if necessary, to make lines line up on the right. @@ -2175,7 +2184,7 @@ the width of spaces in a line to achieve elegant justification. @item Center This centers every line between the current margins. -@item None +@item Unfilled This turns off filling entirely. Each line will remain as you wrote it; the fill and auto-fill functions will have no effect on text which has this setting. You can, however, still indent the left margin. In @@ -2195,9 +2204,9 @@ Make the region left-filled (@code{set-justification-left}). @findex set-justification-right @item M-j r Make the region right-filled (@code{set-justification-right}). -@kindex M-j f @r{(Enriched mode)} +@kindex M-j b @r{(Enriched mode)} @findex set-justification-full -@item M-j f +@item M-j b Make the region fully justified (@code{set-justification-full}). @kindex M-j c @r{(Enriched mode)} @kindex M-S @r{(Enriched mode)} @@ -2220,11 +2229,15 @@ region. The default justification style is specified by the variable @code{default-justification}. Its value should be one of the symbols @code{left}, @code{right}, @code{full}, @code{center}, or @code{none}. +This is a per-buffer variable. Setting the variable directly affects +only the current buffer. However, customizing it in a Custom buffer +sets (as always) the default value for buffers that do not override it. +@xref{Locals}, and @ref{Easy Customization}. @node Format Properties @subsection Setting Other Text Properties - The Other Properties menu lets you add or remove three other useful text + The Special Properties menu lets you add or remove three other useful text properties: @code{read-only}, @code{invisible} and @code{intangible}. The @code{intangible} property disallows moving point within the text, the @code{invisible} text property hides text from display, and the @@ -2253,10 +2266,10 @@ When you visit a file that was created with some other editor, Emacs may not recognize the file as being in the text/enriched format. In this case, when you visit the file you will see the formatting commands rather than the formatted text. Type @kbd{M-x format-decode-buffer} to -translate it. +translate it. This also automatically turns on Enriched mode. @item -When you @emph{insert} a file into a buffer, rather than visiting it. +When you @emph{insert} a file into a buffer, rather than visiting it, Emacs does the necessary conversions on the text which you insert, but it does not enable Enriched mode. If you wish to do that, type @kbd{M-x enriched-mode}. @@ -2268,7 +2281,7 @@ to translate from; however, normally you can type just @key{RET}, which tells Emacs to guess the format. @findex format-find-file - If you wish to look at text/enriched file in its raw form, as a + If you wish to look at a text/enriched file in its raw form, as a sequence of characters rather than as formatted text, use the @kbd{M-x find-file-literally} command. This visits a file, like @code{find-file}, but does not do format conversion. It also inhibits From 9e9245cebd5ae09ade1335d3490e972bebdc7151 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 5 Oct 2004 23:39:42 +0000 Subject: [PATCH 034/166] *** empty log message *** --- admin/FOR-RELEASE | 2 +- man/ChangeLog | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 19f06efa4a7..21eb107d093 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -88,7 +88,7 @@ man/rmail.texi man/screen.texi "Luc Teirlinck" man/search.texi "Luc Teirlinck" man/sending.texi -man/text.texi +man/text.texi "Luc Teirlinck" man/trouble.texi man/windows.texi "Luc Teirlinck" man/xresources.texi diff --git a/man/ChangeLog b/man/ChangeLog index a7457d800de..fae7f44bbf0 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,32 @@ +2004-10-05 Luc Teirlinck + + * text.texi: Various small changes in addition to the following. + (Text): Replace xref for autotype with inforef. + (Sentences): Explain nil value for `sentence-end'. + (Paragraphs): Update default values for `paragraph-start' and + `paragraph-separate'. + (Text Mode): Correct description of Text mode's effect on the + syntax table. + (Outline Visibility): `hide-other' does not hide top level headings. + `selective-display-ellipses' no longer has an effect on Outline mode. + (TeX Misc): Add missing @cindex. + Replace xref for RefTeX with inforef. + (Requesting Formatted Text): the variable + `enriched-fill-after-visiting' no longer exists. + (Editing Format Info): Update names of menu items and commands. + (Format Faces): Mention special effect of specifying the default face. + Describe inheritance of text properties. + Correct description of `fixed' face. + (Format Indentation): Correct description of effect of setting + margins. Mention `set-left-margin' and `set-right-margin'. + (Format Justification): Update names of menu items. + `set-justification-full' is now bound to `M-j b'. + Mention that `default-justification' is a per buffer variable. + (Format Properties): Update name of menu item. + (Forcing Enriched Mode): `format-decode-buffer' automatically + turns on Enriched mode if the buffer is in text/enriched format. + + 2004-10-05 Emilio C. Lopes * calendar.texi (From Other Calendar): Add calendar-goto-iso-week. From 399bf6b36bc516fce56dfdc1ad532871c0c70be3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 Oct 2004 00:06:14 +0000 Subject: [PATCH 035/166] typos etc. --- man/ChangeLog | 7 +++++++ man/info.texi | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index fae7f44bbf0..fc10f3d7252 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,10 @@ +2004-10-05 Karl Berry + + * info.texi: consistently use --- throughout, periods at end of + menu descriptions, and a couple typos. + From: Benno Schulenberg , + in bug-texinfo mail. + 2004-10-05 Luc Teirlinck * text.texi: Various small changes in addition to the following. diff --git a/man/info.texi b/man/info.texi index 2e42a0b9edc..7033eb13e8a 100644 --- a/man/info.texi +++ b/man/info.texi @@ -130,15 +130,15 @@ the screen. @end ifnotinfo @menu -* Help-Small-Screen:: Starting Info on a Small Screen -* Help:: How to use Info -* Help-P:: Returning to the Previous node +* Help-Small-Screen:: Starting Info on a Small Screen. +* Help:: How to use Info. +* Help-P:: Returning to the Previous node. * Help-^L:: The Space, DEL, B and ^L commands. * Help-Inv:: Invisible text in Emacs Info. -* Help-M:: Menus -* Help-Xref:: Following cross-references -* Help-Int:: Some intermediate Info commands -* Help-Q:: Quitting Info +* Help-M:: Menus. +* Help-Xref:: Following cross-references. +* Help-Int:: Some intermediate Info commands. +* Help-Q:: Quitting Info. @end menu @node Help-Small-Screen @@ -212,8 +212,8 @@ This is line 59 If you have managed to get here, go back to the beginning with @kbd{DEL} (or @key{BACKSPACE}), and come back here again, then you understand the about the @samp{Space} and @samp{Backspace} keys. So -now type an @kbd{n} ---just one character; don't type the quotes and -don't type the Return key afterward--- to get to the normal start of +now type an @kbd{n}---just one character; don't type the quotes and +don't type the Return key afterward---to get to the normal start of the course. @end ifinfo @@ -243,8 +243,8 @@ well. In Emacs, the header line is duplicated in a special typeface, and the duplicate remains at the top of the window all the time even if you scroll through the node. - Besides a @samp{Next}, a node can have a @samp{Previous} or an -@samp{Up} links, or both. As you can see, this node has all of these + Besides a @samp{Next}, a node can have a @samp{Previous} link, or an +@samp{Up} link, or both. As you can see, this node has all of these links. @kindex n @r{(Info mode)} @@ -375,7 +375,7 @@ scroll beyond the beginning or the end of the current node. @kindex C-l @r{(Info mode)} If your screen is ever garbaged, you can tell Info to display it -again by typing @kbd{C-l} (@kbd{Control-L}, that is---hold down +again by typing @kbd{C-l} (@kbd{Control-L}---that is, hold down @key{CTRL} and type @kbd{L} or @kbd{l}). @format @@ -414,8 +414,8 @@ the list, make it go away by typing a @key{SPC} repeatedly. (If you are using the stand-alone Info reader, type @kbd{C-x 0} to return here, that is---press and hold @key{CTRL}, type an @kbd{x}, -then release @key{CTRL} and @kbd{x}, and press @kbd{0}---a zero, not -the letter ``o''.) +then release @key{CTRL} and @kbd{x}, and press @kbd{0}; that's a zero, +not the letter ``o''.) From now on, you will encounter large nodes without warning, and will be expected to know how to use @key{SPC} and @key{BACKSPACE} to @@ -1061,7 +1061,7 @@ you typed @emph{as a substring}. For each match, Info shows in the echo area the full index entry it found. Often, the text of the full index entry already gives you enough information to decide whether it is relevant to what you are looking for, so we recommend that you read -what Emacs shows in the echo area before looking at the node it +what Info shows in the echo area before looking at the node it displays. Since @kbd{i} looks for a substring, you can search for subjects even @@ -1205,7 +1205,7 @@ reads from the terminal. A menu begins with a line starting with @w{@samp{* Menu:}}. The rest of the line is a comment. After the starting line, every line that begins with a @samp{* } lists a single topic. The name of the -topic--what the user must type at the @kbd{m}'s command prompt to +topic---what the user must type at the @kbd{m}'s command prompt to select this topic---comes right after the star and space, and is followed by a colon, spaces and tabs, and the name of the node which discusses that topic. The node name, like node names following From fcb21188ecffe836c73449a38b45fbd3e7d0f9a4 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 6 Oct 2004 00:48:08 +0000 Subject: [PATCH 036/166] Changelog for xml.el --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16278c0a996..b8023859204 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-05 Mark A. Hershberger + + * xml.el (xml-substitute-special): Return a single string instead + of a list of strings if an entity substitution is made. + 2004-10-05 Ulf Jasper * calendar/icalendar.el: New file. @@ -12,6 +17,7 @@ (Info-build-toc): Don't check for special Info file names. Set main-file to nil if Info-find-file returns a symbol. +>>>>>>> 1.6421 2004-10-05 Emilio C. Lopes : * calendar/calendar.el (calendar-goto-iso-week): Add autoload. From a3110b5ddc17825486b5584c299d9c9ab3ca20e8 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 6 Oct 2004 00:58:29 +0000 Subject: [PATCH 037/166] fix to for xml-substitute-special to produce a single string instead of several if a substitution is made. --- lisp/xml.el | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lisp/xml.el b/lisp/xml.el index 993ef59b276..dd6d5095bc2 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -727,13 +727,13 @@ This follows the rule [28] in the XML specifications." (match-string 1 this-part))))))) (cond ((null children) - (if (stringp expansion) + (if (and (eq (length expansion) 1) + (stringp (cadr expansion))) (setq children (concat prev-part expansion)) - (if (stringp (car (last expansion))) - (progn - (setq children - (list (concat prev-part (car expansion)) - (cdr expansion)))) + (if (stringp (car expansion)) + (setq children + (list (concat prev-part (car expansion)) + (append (cdr expansion)))) (setq children (append expansion prev-part))))) ((stringp children) (if (stringp expansion) @@ -756,11 +756,15 @@ This follows the rule [28] in the XML specifications." (cond ((stringp children) (concat children (substring string point))) ((stringp (car (last children))) - (concat (car children) (substring string point))) + (concat (car (last children)) (substring string point))) ((null children) string) (t - (nreverse children))))) + (concat (mapconcat 'identity + (nreverse children) + "") + (substring string point)))))) + ;;******************************************************************* ;;** ;;** Printing a tree. From a13bc06478c95cec007fb8ec18b1ebb929f2a78b Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 6 Oct 2004 03:45:06 +0000 Subject: [PATCH 038/166] Changes from arch/CVS synchronization --- lisp/calendar/icalendar.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 86a402179dc..e83e8e980b6 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -1295,4 +1295,5 @@ the entry." (provide 'icalendar) +;; arch-tag: 74fdbe8e-0451-4e38-bb61-4416e822f4fc ;;; icalendar.el ends here From 07f7e9aede707c188ec0e88ac3fade20bc3b4725 Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Wed, 6 Oct 2004 06:04:41 +0000 Subject: [PATCH 039/166] (xml-parse-dtd): Fix `error' call. --- lisp/ChangeLog | 5 ++++- lisp/xml.el | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8023859204..b5cfa0640e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-10-06 John Paul Wallington + + * xml.el (xml-parse-dtd): Fix `error' call. + 2004-10-05 Mark A. Hershberger * xml.el (xml-substitute-special): Return a single string instead @@ -17,7 +21,6 @@ (Info-build-toc): Don't check for special Info file names. Set main-file to nil if Info-find-file returns a symbol. ->>>>>>> 1.6421 2004-10-05 Emilio C. Lopes : * calendar/calendar.el (calendar-goto-iso-week): Add autoload. diff --git a/lisp/xml.el b/lisp/xml.el index dd6d5095bc2..f1d8cbb1f00 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -598,8 +598,8 @@ This follows the rule [28] in the XML specifications." nil) (t (if xml-validating-parser - error "XML: (Validity) Invalid element type in the DTD"))) - + (error "XML: (Validity) Invalid element type in the DTD")))) + ;; rule [45]: the element declaration must be unique (if (and (assoc element dtd) xml-validating-parser) From 444ee6d730b2d4506872596e786926bd4db04ef8 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 6 Oct 2004 07:19:04 +0000 Subject: [PATCH 040/166] (Starting GUD): Note that multiple debugging sessions requires `gdb --fullname'. --- man/building.texi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/man/building.texi b/man/building.texi index 972f88abbde..2ec96b0f6bf 100644 --- a/man/building.texi +++ b/man/building.texi @@ -336,11 +336,13 @@ to a particular debugger program. @findex gdb Run GDB as a subprocess of Emacs. If the variable @code{gud-gdb-command-name} is ``gdb --annotate=3'' (the default -value) then GDB starts as for @kbd{M-x gdba} below. If you want to -GDB to start as in Emacs 21.3 and earlier then set -@code{gud-gdb-command-name} to ``gdb --fullname''. In this case, the -command creates a buffer for input and output to GDB, and switches to -it. If a GDB buffer already exists, it just switches to that buffer. +value) then GDB starts as for @kbd{M-x gdba} below. If you want GDB +to start as in Emacs 21.3 and earlier then edit the string in the +minibuffer or set @code{gud-gdb-command-name} to ``gdb --fullname''. +You need to do this if you want to run multiple debugging sessions +within one Emacs session. In this case, the command creates a buffer +for input and output to GDB, and switches to it. If a GDB buffer +already exists, it just switches to that buffer. @item M-x gdba @key{RET} @var{file} @key{RET} Run GDB as a subprocess of Emacs, providing a graphical interface From fb1adf175d0756c7cc77fae2debf6f023556575d Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 6 Oct 2004 07:20:15 +0000 Subject: [PATCH 041/166] *** empty log message *** --- lisp/ChangeLog | 4 ++++ man/ChangeLog | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b5cfa0640e9..ceb72e1eebb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-10-06 Nick Roberts + + * progmodes/gdb-ui.el (gdb-ann3): (Re-)initialise gdb-input-queue. + 2004-10-06 John Paul Wallington * xml.el (xml-parse-dtd): Fix `error' call. diff --git a/man/ChangeLog b/man/ChangeLog index fc10f3d7252..dad0dfaf544 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2004-10-06 Nick Roberts + + * building.texi (Starting GUD): Note that multiple debugging + sessions requires `gdb --fullname'. + 2004-10-05 Karl Berry * info.texi: consistently use --- throughout, periods at end of From 3ef8233466fe2a6e3b5218ac2edbd01a600a7c79 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 6 Oct 2004 07:20:53 +0000 Subject: [PATCH 042/166] (gdb-ann3): (Re-)initialise gdb-input-queue. --- lisp/progmodes/gdb-ui.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 612a2034e00..d8f2cf34867 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -188,6 +188,7 @@ detailed description of this mode. (setq gdb-var-changed nil) (setq gdb-first-prompt nil) (setq gdb-prompting nil) + (setq gdb-input-queue nil) (setq gdb-current-item nil) (setq gdb-pending-triggers nil) (setq gdb-output-sink 'user) From 4cbbf6b72534cc987ac890049820ebe044867227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 6 Oct 2004 07:26:14 +0000 Subject: [PATCH 043/166] * configure.in (HAVE_RANDOM_HEAPSTART): Change AC_MSG_ERROR to AC_MSG_WARN. --- ChangeLog | 7 ++++++- configure | 41 +++++++++++++++++++++++++++-------------- configure.in | 23 +++++++++++++++-------- src/ChangeLog | 2 +- 4 files changed, 49 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index c97ba6e77c5..87efe955d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2004-10-05 Jan D. +2004-10-06 Jan Dj,Ad(Brv + + * configure.in (HAVE_RANDOM_HEAPSTART): Change AC_MSG_ERROR to + AC_MSG_WARN. + +2004-10-05 Jan Dj,Ad(Brv. * configure.in (HAVE_RANDOM_HEAPSTART): Renamed HAVE_EXECSHIELD. Run test to see if heap start address is random. diff --git a/configure b/configure index 7add8b6767b..7f1a82f8dfc 100755 --- a/configure +++ b/configure @@ -7746,7 +7746,7 @@ echo $ECHO_N "checking whether heap start address is randomized... $ECHO_C" >&6 if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x then if test "$cross_compiling" = yes; then - emacs_cv_execshield='assuming no' + emacs_cv_randomheap='assuming no' else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7788,24 +7788,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - emacs_cv_execshield=yes + emacs_cv_randomheap=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -emacs_cv_execshield=no +emacs_cv_randomheap=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else - emacs_cv_execshield='assuming no' + emacs_cv_randomheap='assuming no' fi -echo "$as_me:$LINENO: result: $emacs_cv_execshield" >&5 -echo "${ECHO_T}$emacs_cv_execshield" >&6 +echo "$as_me:$LINENO: result: $emacs_cv_randomheap" >&5 +echo "${ECHO_T}$emacs_cv_randomheap" >&6 -if test "$emacs_cv_execshield" = yes; then +if test "$emacs_cv_randomheap" = yes; then # Extract the first word of "setarch", so it can be a program name with args. set dummy setarch; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -7854,13 +7854,26 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { { echo "$as_me:$LINENO: error: Heap start address is randomized and no workaround is known. -Probably exec-shield is turned on. Emacs can not dump itself if this is the -case. Read about exec-shield in \`etc/PROBLEMS' for further information." >&5 -echo "$as_me: error: Heap start address is randomized and no workaround is known. -Probably exec-shield is turned on. Emacs can not dump itself if this is the -case. Read about exec-shield in \`etc/PROBLEMS' for further information." >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: WARNING: +********************************************************************** + +Heap start address is randomized and no workaround is known. +Emacs will probably dump core when temacs is run in the build phase. +Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' +for further information. + +********************************************************************** +" >&5 +echo "$as_me: WARNING: +********************************************************************** + +Heap start address is randomized and no workaround is known. +Emacs will probably dump core when temacs is run in the build phase. +Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' +for further information. + +********************************************************************** +" >&2;} fi fi diff --git a/configure.in b/configure.in index 73c62988fd7..0bbcb76b262 100644 --- a/configure.in +++ b/configure.in @@ -1599,23 +1599,30 @@ int main (int argc, char *argv[]) exit (-1); } exit (this_sbrk == old_sbrk); -}], emacs_cv_execshield=yes, emacs_cv_execshield=no, - emacs_cv_execshield='assuming no') +}], emacs_cv_randomheap=yes, emacs_cv_randomheap=no, + emacs_cv_randomheap='assuming no') else - emacs_cv_execshield='assuming no' + emacs_cv_randomheap='assuming no' fi -AC_MSG_RESULT($emacs_cv_execshield) +AC_MSG_RESULT($emacs_cv_randomheap) -if test "$emacs_cv_execshield" = yes; then +if test "$emacs_cv_randomheap" = yes; then AC_PATH_PROG(SETARCH, setarch, no) AC_SUBST(SETARCH) if test "$SETARCH" != no && test "$machine" = "intel386"; then AC_DEFINE(HAVE_RANDOM_HEAPSTART, 1, [Define to 1 if this OS randomizes the start address of the heap.]) else - AC_MSG_ERROR([Heap start address is randomized and no workaround is known. -Probably exec-shield is turned on. Emacs can not dump itself if this is the -case. Read about exec-shield in `etc/PROBLEMS' for further information.]) + AC_MSG_WARN([ +********************************************************************** + +Heap start address is randomized and no workaround is known. +Emacs will probably dump core when temacs is run in the build phase. +Maybe exec-shield is turned on. Read about exec-shield in `etc/PROBLEMS' +for further information. + +********************************************************************** +]) fi fi diff --git a/src/ChangeLog b/src/ChangeLog index ba6ae2d4777..b7ff8d45c25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,4 @@ -2004-10-05 Jan D. +2004-10-05 Jan Dj,Ad(Brv. * config.in: Regenerate. From 96fcad045a178e675e6c9be966e6143b75cb056f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 6 Oct 2004 07:29:55 +0000 Subject: [PATCH 044/166] Fix my name and address --- man/ChangeLog | 2 +- nt/ChangeLog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index dad0dfaf544..218cf5b25fa 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -938,7 +938,7 @@ * misc.texi: Section "Saving Emacs Sessions" rewritten. -2003-09-29 Jan D. +2003-09-29 Jan Dj,Ad(Brv. * xresources.texi (GTK names in Emacs): Correct typo. diff --git a/nt/ChangeLog b/nt/ChangeLog index 77c8305b0e5..f91c59a85c5 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -77,7 +77,7 @@ * multi-install-info.bat: New file. -2003-06-27 Jan D. +2003-06-27 Jan Dj,Ad(Brv * config.nt (my_strftime): New define. From 05cf15c600b4131921a51cceb2708a293da70bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 6 Oct 2004 12:28:31 +0000 Subject: [PATCH 045/166] configure.in (HAVE_RANDOM_HEAPSTART): Move output of warning message to end of configure run. --- ChangeLog | 2 +- configure | 44 ++++++++++++++++++++++++-------------------- configure.in | 25 +++++++++++++++---------- 3 files changed, 40 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87efe955d9e..aa5d01c16f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2004-10-06 Jan Dj,Ad(Brv * configure.in (HAVE_RANDOM_HEAPSTART): Change AC_MSG_ERROR to - AC_MSG_WARN. + AC_MSG_WARN. Move output of warning message to end of configure run. 2004-10-05 Jan Dj,Ad(Brv. diff --git a/configure b/configure index 7f1a82f8dfc..83ac957143d 100755 --- a/configure +++ b/configure @@ -7854,26 +7854,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: WARNING: -********************************************************************** - -Heap start address is randomized and no workaround is known. -Emacs will probably dump core when temacs is run in the build phase. -Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' -for further information. - -********************************************************************** -" >&5 -echo "$as_me: WARNING: -********************************************************************** - -Heap start address is randomized and no workaround is known. -Emacs will probably dump core when temacs is run in the build phase. -Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' -for further information. - -********************************************************************** -" >&2;} + emacs_cv_randomheap=warn fi fi @@ -21452,6 +21433,29 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" echo +if test "$emacs_cv_randomheap" = warn; then + { echo "$as_me:$LINENO: WARNING: +********************************************************************** + +Heap start address is randomized and no workaround is known. +Emacs will probably dump core when temacs is run in the build phase. +Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' +for further information. + +********************************************************************** +" >&5 +echo "$as_me: WARNING: +********************************************************************** + +Heap start address is randomized and no workaround is known. +Emacs will probably dump core when temacs is run in the build phase. +Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' +for further information. + +********************************************************************** +" >&2;} +fi + # Remove any trailing slashes in these variables. test "${prefix}" != NONE && prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` diff --git a/configure.in b/configure.in index 0bbcb76b262..4e534a53485 100644 --- a/configure.in +++ b/configure.in @@ -1613,16 +1613,8 @@ if test "$emacs_cv_randomheap" = yes; then AC_DEFINE(HAVE_RANDOM_HEAPSTART, 1, [Define to 1 if this OS randomizes the start address of the heap.]) else - AC_MSG_WARN([ -********************************************************************** - -Heap start address is randomized and no workaround is known. -Emacs will probably dump core when temacs is run in the build phase. -Maybe exec-shield is turned on. Read about exec-shield in `etc/PROBLEMS' -for further information. - -********************************************************************** -]) + dnl We do the warning at the end of the configure run so it is seen. + emacs_cv_randomheap=warn fi fi @@ -3094,6 +3086,19 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" echo +if test "$emacs_cv_randomheap" = warn; then + AC_MSG_WARN([ +********************************************************************** + +Heap start address is randomized and no workaround is known. +Emacs will probably dump core when temacs is run in the build phase. +Maybe exec-shield is turned on. Read about exec-shield in `etc/PROBLEMS' +for further information. + +********************************************************************** +]) +fi + # Remove any trailing slashes in these variables. [test "${prefix}" != NONE && prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` From 811120105c9f33a56f7bb6d0e0ce9f82379cb723 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 6 Oct 2004 13:27:03 +0000 Subject: [PATCH 046/166] New display properties added to manuals. --- admin/FOR-RELEASE | 2 -- 1 file changed, 2 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 21eb107d093..1898cf4dea4 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -28,8 +28,6 @@ isearch faces. ** Finish updating the Emacs Lisp manual. -*** New display properties (KFS to provide input). - ** Update the Emacs manual. *** Update man/info.texi. From bf06c82f4b0fba280db8130b801aa5a455ff7f63 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Wed, 6 Oct 2004 15:38:53 +0000 Subject: [PATCH 047/166] macfns.c (mac_get_window_bounds): Add extern. (x_real_positions): Use mac_get_window_bounds. macmenu.c (update_submenu_strings): Apply 2004-09-07 change for xmenu.c (YAILOM). macterm.c [!MAC_OSX]: Include Windows.h. (front_emacs_window): Rename from mac_front_window. All uses changed. Return the frontmost non-tooltip emacs window. (mac_get_window_bounds): New function. (x_calc_absolute_position): Use the difference of width and height between the inner and outer window. (x_set_offset): Specify window position by the coordinae of the outer window. Adjust the position if the title bar is completely outside the screen. (app_is_suspended, app_sleep_time): Remove unused variables. (do_app_resume, do_app_suspend): Remove their contents because window-activate/deactivate events will do the job. (do_zoom_window): Remove unused variables. Make compliant to the standard way of zooming. Set f->left_pos and f->top_pos. (XTread_socket): Don't use argument `expected'. Don't use FrontWindow to determine the clicked window. Exclude unprocessed mouseUp cases in the early stage. Add parentheses to fix operator precedence. (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area. --- src/ChangeLog | 29 +++++ src/macfns.c | 33 ++---- src/macmenu.c | 4 +- src/macterm.c | 316 ++++++++++++++++++++++++++++---------------------- 4 files changed, 219 insertions(+), 163 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b7ff8d45c25..99be23b4df8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,32 @@ +2004-10-06 YAMAMOTO Mitsuharu + + * macfns.c (mac_get_window_bounds): Add extern. + (x_real_positions): Use mac_get_window_bounds. + + * macmenu.c (update_submenu_strings): Apply 2004-09-07 change for + xmenu.c (YAILOM). + + * macterm.c [!MAC_OSX]: Include Windows.h. + (front_emacs_window): Rename from mac_front_window. All uses + changed. Return the frontmost non-tooltip emacs window. + (mac_get_window_bounds): New function. + (x_calc_absolute_position): Use the difference of width and height + between the inner and outer window. + (x_set_offset): Specify window position by the coordinae of the + outer window. Adjust the position if the title bar is completely + outside the screen. + (app_is_suspended, app_sleep_time): Remove unused variables. + (do_app_resume, do_app_suspend): Remove their contents because + window-activate/deactivate events will do the job. + (do_zoom_window): Remove unused variables. Make compliant to the + standard way of zooming. Set f->left_pos and f->top_pos. + (XTread_socket): Don't use argument `expected'. Don't use + FrontWindow to determine the clicked window. Exclude unprocessed + mouseUp cases in the early stage. Add parentheses to fix operator + precedence. + (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area. + + 2004-10-05 Jan Dj,Ad(Brv. * config.in: Regenerate. diff --git a/src/macfns.c b/src/macfns.c index 3b09b344a55..f7594e9c6c2 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -312,6 +312,9 @@ static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *, Lisp_Object, char *, char *, int)); + +extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); + /* Store the screen positions of frame F into XPTR and YPTR. These are the positions of the containing window manager window, not Emacs's own window. */ @@ -321,33 +324,15 @@ x_real_positions (f, xptr, yptr) FRAME_PTR f; int *xptr, *yptr; { - Point pt; - GrafPtr oldport; + Rect inner, outer; - GetPort (&oldport); - SetPortWindowPort (FRAME_MAC_WINDOW (f)); + mac_get_window_bounds (f, &inner, &outer); -#if TARGET_API_MAC_CARBON - { - Rect r; + f->x_pixels_diff = inner.left - outer.left; + f->y_pixels_diff = inner.top - outer.top; - GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); - SetPt (&pt, r.left, r.top); - } -#else /* not TARGET_API_MAC_CARBON */ - SetPt (&pt, - FRAME_MAC_WINDOW (f)->portRect.left, - FRAME_MAC_WINDOW (f)->portRect.top); -#endif /* not TARGET_API_MAC_CARBON */ - LocalToGlobal (&pt); - SetPort (oldport); - - /* MAC has no frame pixel diff. */ - f->x_pixels_diff = 0; - f->y_pixels_diff = 0; - - *xptr = pt.h; - *yptr = pt.v; + *xptr = outer.left; + *yptr = outer.top; } diff --git a/src/macmenu.c b/src/macmenu.c index 740bda261d8..007fab15eab 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -1322,7 +1322,7 @@ update_submenu_strings (first_wv) for (wv = first_wv; wv; wv = wv->next) { - if (wv->lname && ! NILP (wv->lname)) + if (STRINGP (wv->lname)) { wv->name = SDATA (wv->lname); @@ -1336,7 +1336,7 @@ update_submenu_strings (first_wv) } } - if (wv->lkey && ! NILP (wv->lkey)) + if (STRINGP (wv->lkey)) wv->key = SDATA (wv->lkey); if (wv->contents) diff --git a/src/macterm.c b/src/macterm.c index 0177d57fec8..0587c5d15ba 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #if defined (__MRC__) || (__MSL__ >= 0x6000) #include #endif @@ -3887,18 +3888,21 @@ remember_mouse_glyph (f1, gx, gy) static WindowPtr -mac_front_window () +front_emacs_window () { #if TARGET_API_MAC_CARBON - return GetFrontWindowOfClass (kDocumentWindowClass, true); -#else - WindowPtr front_window = FrontWindow (); + WindowPtr wp = GetFrontWindowOfClass (kDocumentWindowClass, true); - if (tip_window && front_window == tip_window) - return GetNextWindow (front_window); - else - return front_window; + while (wp && !is_emacs_window (wp)) + wp = GetNextWindowOfClass (wp, kDocumentWindowClass, true); +#else + WindowPtr wp = FrontWindow (); + + while (wp && (wp == tip_window || !is_emacs_window (wp))) + wp = GetNextWindow (wp); #endif + + return wp; } #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP) @@ -3934,7 +3938,7 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time) { Point mouse_pos; int ignore1, ignore2; - WindowPtr wp = mac_front_window (); + WindowPtr wp = front_emacs_window (); struct frame *f; Lisp_Object frame, tail; @@ -4551,7 +4555,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) unsigned long *time; { struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); - WindowPtr wp = mac_front_window (); + WindowPtr wp = front_emacs_window (); Point mouse_pos; struct frame *f = mac_window_to_frame (wp); int win_y, top_range; @@ -5036,6 +5040,26 @@ xim_close_dpy (dpyinfo) */ +void +mac_get_window_bounds (f, inner, outer) + struct frame *f; + Rect *inner, *outer; +{ +#if TARGET_API_MAC_CARBON + GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowContentRgn, inner); + GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowStructureRgn, outer); +#else /* not TARGET_API_MAC_CARBON */ + RgnHandle region = NewRgn (); + + GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowContentRgn, region); + *inner = (*region)->rgnBBox; + GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowStructureRgn, region); + *outer = (*region)->rgnBBox; + DisposeRgn (region); +#endif /* not TARGET_API_MAC_CARBON */ +} + + /* Calculate the absolute position in frame F from its current recorded position values and gravity. */ @@ -5043,47 +5067,36 @@ void x_calc_absolute_position (f) struct frame *f; { - Point pt; + int width_diff = 0, height_diff = 0; int flags = f->size_hint_flags; + Rect inner, outer; - pt.h = pt.v = 0; + /* We have nothing to do if the current position + is already for the top-left corner. */ + if (! ((flags & XNegative) || (flags & YNegative))) + return; - /* Find the position of the outside upper-left corner of + /* Find the offsets of the outside upper-left corner of the inner window, with respect to the outer window. */ - if (f->output_data.mac->parent_desc != FRAME_MAC_DISPLAY_INFO (f)->root_window) - { - GrafPtr savePort; - GetPort (&savePort); + mac_get_window_bounds (f, &inner, &outer); - SetPortWindowPort (FRAME_MAC_WINDOW (f)); - -#if TARGET_API_MAC_CARBON - { - Rect r; - - GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); - SetPt(&pt, r.left, r.top); - } -#else /* not TARGET_API_MAC_CARBON */ - SetPt(&pt, FRAME_MAC_WINDOW (f)->portRect.left, FRAME_MAC_WINDOW (f)->portRect.top); -#endif /* not TARGET_API_MAC_CARBON */ - LocalToGlobal (&pt); - SetPort (savePort); - } + width_diff = (outer.right - outer.left) - (inner.right - inner.left); + height_diff = (outer.bottom - outer.top) - (inner.bottom - inner.top); /* Treat negative positions as relative to the leftmost bottommost position that fits on the screen. */ if (flags & XNegative) f->left_pos = (FRAME_MAC_DISPLAY_INFO (f)->width - - 2 * f->border_width - pt.h + - width_diff - FRAME_PIXEL_WIDTH (f) + f->left_pos); - /* NTEMACS_TODO: Subtract menubar height? */ + if (flags & YNegative) f->top_pos = (FRAME_MAC_DISPLAY_INFO (f)->height - - 2 * f->border_width - pt.v + - height_diff - FRAME_PIXEL_HEIGHT (f) + f->top_pos); + /* The left_pos and top_pos are now relative to the top and left screen edges, so the flags should correspond. */ @@ -5102,8 +5115,6 @@ x_set_offset (f, xoff, yoff, change_gravity) register int xoff, yoff; int change_gravity; { - int modified_top, modified_left; - if (change_gravity > 0) { f->top_pos = yoff; @@ -5120,11 +5131,55 @@ x_set_offset (f, xoff, yoff, change_gravity) BLOCK_INPUT; x_wm_set_size_hint (f, (long) 0, 0); - modified_left = f->left_pos; - modified_top = f->top_pos; +#if TARGET_API_MAC_CARBON + MoveWindowStructure (FRAME_MAC_WINDOW (f), f->left_pos, f->top_pos); + /* If the title bar is completely outside the screen, adjust the + position. */ + ConstrainWindowToScreen (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn, + kWindowConstrainMoveRegardlessOfFit + | kWindowConstrainAllowPartial, NULL, NULL); + x_real_positions (f, &f->left_pos, &f->top_pos); +#else + { + Rect inner, outer, screen_rect, dummy; + RgnHandle region = NewRgn (); + + mac_get_window_bounds (f, &inner, &outer); + f->x_pixels_diff = inner.left - outer.left; + f->y_pixels_diff = inner.top - outer.top; + MoveWindow (FRAME_MAC_WINDOW (f), f->left_pos + f->x_pixels_diff, + f->top_pos + f->y_pixels_diff, false); - MoveWindow (FRAME_MAC_WINDOW (f), modified_left + 6, - modified_top + 42, false); + /* If the title bar is completely outside the screen, adjust the + position. The variable `outer' holds the title bar rectangle. + The variable `inner' holds slightly smaller one than `outer', + so that the calculation of overlapping may not become too + strict. */ + GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn, region); + outer = (*region)->rgnBBox; + DisposeRgn (region); + inner = outer; + InsetRect (&inner, 8, 8); + screen_rect = qd.screenBits.bounds; + screen_rect.top += GetMBarHeight (); + + if (!SectRect (&inner, &screen_rect, &dummy)) + { + if (inner.right <= screen_rect.left) + f->left_pos = screen_rect.left; + else if (inner.left >= screen_rect.right) + f->left_pos = screen_rect.right - (outer.right - outer.left); + + if (inner.bottom <= screen_rect.top) + f->top_pos = screen_rect.top; + else if (inner.top >= screen_rect.bottom) + f->top_pos = screen_rect.bottom - (outer.bottom - outer.top); + + MoveWindow (FRAME_MAC_WINDOW (f), f->left_pos + f->x_pixels_diff, + f->top_pos + f->y_pixels_diff, false); + } + } +#endif UNBLOCK_INPUT; } @@ -6900,6 +6955,7 @@ x_find_ccl_program (fontp) /* true when cannot handle any Mac OS events */ static int handling_window_update = 0; +#if 0 /* the flag appl_is_suspended is used both for determining the sleep time to be passed to WaitNextEvent and whether the cursor should be drawn when updating the display. The cursor is turned off when @@ -6909,6 +6965,7 @@ static int handling_window_update = 0; suspended. */ static Boolean app_is_suspended = false; static long app_sleep_time = WNE_SLEEP_AT_RESUME; +#endif #define EXTRA_STACK_ALLOC (256 * 1024) @@ -7235,11 +7292,13 @@ is_emacs_window (WindowPtr win) static void do_app_resume () { + /* Window-activate events will do the job. */ +#if 0 WindowPtr wp; struct frame *f; - wp = mac_front_window (); - if (is_emacs_window (wp)) + wp = front_emacs_window (); + if (wp) { f = mac_window_to_frame (wp); @@ -7252,16 +7311,19 @@ do_app_resume () app_is_suspended = false; app_sleep_time = WNE_SLEEP_AT_RESUME; +#endif } static void do_app_suspend () { + /* Window-deactivate events will do the job. */ +#if 0 WindowPtr wp; struct frame *f; - wp = mac_front_window (); - if (is_emacs_window (wp)) + wp = front_emacs_window (); + if (wp) { f = mac_window_to_frame (wp); @@ -7274,6 +7336,7 @@ do_app_suspend () app_is_suspended = true; app_sleep_time = WNE_SLEEP_AT_SUSPEND; +#endif } @@ -7282,10 +7345,10 @@ do_mouse_moved (mouse_pos, f) Point mouse_pos; FRAME_PTR *f; { - WindowPtr wp = mac_front_window (); + WindowPtr wp = front_emacs_window (); struct x_display_info *dpyinfo; - if (is_emacs_window (wp)) + if (wp) { *f = mac_window_to_frame (wp); dpyinfo = FRAME_MAC_DISPLAY_INFO (*f); @@ -7347,7 +7410,7 @@ do_menu_choice (SInt32 menu_choice) default: { - struct frame *f = mac_window_to_frame (mac_front_window ()); + struct frame *f = mac_window_to_frame (front_emacs_window ()); MenuHandle menu = GetMenuHandle (menu_id); if (menu) { @@ -7400,41 +7463,43 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) GrafPtr save_port; Rect zoom_rect, port_rect; Point top_left; - int w_title_height, columns, rows, width, height, dummy, x, y; + int w_title_height, columns, rows; struct frame *f = mac_window_to_frame (w); +#if TARGET_API_MAC_CARBON + { + Point standard_size; + + standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); + standard_size.v = FRAME_MAC_DISPLAY_INFO (f)->height; + + if (IsWindowInStandardState (w, &standard_size, &zoom_rect)) + zoom_in_or_out = inZoomIn; + else + { + /* Adjust the standard size according to character boundaries. */ + + columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left); + rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); + standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns); + standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); + GetWindowBounds (w, kWindowContentRgn, &port_rect); + if (IsWindowInStandardState (w, &standard_size, &zoom_rect) + && port_rect.left == zoom_rect.left + && port_rect.top == zoom_rect.top) + zoom_in_or_out = inZoomIn; + else + zoom_in_or_out = inZoomOut; + } + + ZoomWindowIdeal (w, zoom_in_or_out, &standard_size); + } +#else /* not TARGET_API_MAC_CARBON */ GetPort (&save_port); SetPortWindowPort (w); /* Clear window to avoid flicker. */ -#if TARGET_API_MAC_CARBON - { - Rect r; - BitMap bm; - - GetWindowPortBounds (w, &r); - EraseRect (&r); - - if (zoom_in_or_out == inZoomOut) - { - /* calculate height of window's title bar (hard card it for now). */ - w_title_height = 20 + GetMBarHeight (); - - /* get maximum height of window into zoom_rect.bottom - - zoom_rect.top */ - GetQDGlobalsScreenBits (&bm); - zoom_rect = bm.bounds; - zoom_rect.top += w_title_height; - InsetRect (&zoom_rect, 8, 4); /* not too tight */ - - zoom_rect.right = zoom_rect.left - + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); - - SetWindowStandardState (w, &zoom_rect); - } - } -#else /* not TARGET_API_MAC_CARBON */ EraseRect (&(w->portRect)); if (zoom_in_or_out == inZoomOut) { @@ -7453,12 +7518,19 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) zoom_rect.right = zoom_rect.left + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); + /* Adjust the standard size according to character boundaries. */ + rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); + zoom_rect.bottom = + zoom_rect.top + FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); + (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState = zoom_rect; } -#endif /* not TARGET_API_MAC_CARBON */ - ZoomWindow (w, zoom_in_or_out, w == mac_front_window ()); + ZoomWindow (w, zoom_in_or_out, w == front_emacs_window ()); + + SetPort (save_port); +#endif /* not TARGET_API_MAC_CARBON */ /* retrieve window size and update application values */ #if TARGET_API_MAC_CARBON @@ -7469,8 +7541,7 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, port_rect.bottom - port_rect.top); columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, port_rect.right - port_rect.left); x_set_window_size (f, 0, columns, rows); - - SetPort (save_port); + x_real_positions (f, &f->left_pos, &f->top_pos); } /* Initialize Drag And Drop to allow files to be dropped onto emacs frames */ @@ -8020,19 +8091,15 @@ XTread_socket (sd, expected, hold_quit) if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) event_mask -= highLevelEventMask; - while (WaitNextEvent (event_mask, &er, - (expected ? app_sleep_time : 0L), NULL)) -#else - while (!ReceiveNextEvent (0, NULL, - (expected ? TicksToEventTime (app_sleep_time) : 0), + while (WaitNextEvent (event_mask, &er, 0L, NULL)) +#else /* USE_CARBON_EVENTS */ + while (!ReceiveNextEvent (0, NULL, kEventDurationNoWait, kEventRemoveFromQueue, &eventRef)) -#endif /* !USE_CARBON_EVENTS */ +#endif /* USE_CARBON_EVENTS */ { int do_help = 0; struct frame *f; - expected = 0; - /* It is necessary to set this (additional) argument slot of an event to nil because keyboard.c protects incompletely processed event from being garbage collected by placing them @@ -8055,13 +8122,7 @@ XTread_socket (sd, expected, hold_quit) NULL, &window_ptr); f = mac_window_to_frame (window_ptr); if (f && !f->async_iconified) - { - int x, y; - - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; - } + x_real_positions (f, &f->left_pos, &f->top_pos); SendEventToEventTarget (eventRef, toolbox_dispatcher); } break; @@ -8070,7 +8131,7 @@ XTread_socket (sd, expected, hold_quit) { SInt32 delta; Point point; - WindowPtr window_ptr = mac_front_window (); + WindowPtr window_ptr = front_emacs_window (); if (!IsValidWindowPtr (window_ptr)) { @@ -8132,33 +8193,28 @@ XTread_socket (sd, expected, hold_quit) } else { - window_ptr = FrontWindow (); + part_code = FindWindow (er.where, &window_ptr); if (tip_window && window_ptr == tip_window) { HideWindow (tip_window); - window_ptr = FrontWindow (); + part_code = FindWindow (er.where, &window_ptr); } - - if (!is_emacs_window (window_ptr)) - break; - - part_code = FindWindow (er.where, &window_ptr); } + if (er.what != mouseDown && part_code != inContent) + break; + switch (part_code) { case inMenuBar: - if (er.what == mouseDown) - { - f = mac_window_to_frame (mac_front_window ()); - saved_menu_event_location = er.where; - inev.kind = MENU_BAR_ACTIVATE_EVENT; - XSETFRAME (inev.frame_or_window, f); - } + f = mac_window_to_frame (front_emacs_window ()); + saved_menu_event_location = er.where; + inev.kind = MENU_BAR_ACTIVATE_EVENT; + XSETFRAME (inev.frame_or_window, f); break; case inContent: - if (window_ptr != mac_front_window ()) + if (window_ptr != front_emacs_window ()) SelectWindow (window_ptr); else { @@ -8255,7 +8311,7 @@ XTread_socket (sd, expected, hold_quit) } else { - if (dpyinfo->grabbed & (1 << inev.code) == 0) + if ((dpyinfo->grabbed & (1 << inev.code)) == 0) /* If a button is released though it was not previously pressed, that would be because of multi-button emulation. */ @@ -8278,27 +8334,16 @@ XTread_socket (sd, expected, hold_quit) case inDrag: #if TARGET_API_MAC_CARBON - if (er.what == mouseDown) - { - BitMap bm; - - GetQDGlobalsScreenBits (&bm); - DragWindow (window_ptr, er.where, &bm.bounds); - } + DragWindow (window_ptr, er.where, NULL); #else /* not TARGET_API_MAC_CARBON */ DragWindow (window_ptr, er.where, &qd.screenBits.bounds); #endif /* not TARGET_API_MAC_CARBON */ /* Update the frame parameters. */ { struct frame *f = mac_window_to_frame (window_ptr); + if (f && !f->async_iconified) - { - int x, y; - - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; - } + x_real_positions (f, &f->left_pos, &f->top_pos); } break; @@ -8313,11 +8358,8 @@ XTread_socket (sd, expected, hold_quit) /* window resize handling added --ben */ case inGrow: - if (er.what == mouseDown) - { - do_grow_window(window_ptr, &er); - break; - } + do_grow_window (window_ptr, &er); + break; /* window zoom handling added --ben */ case inZoomIn: @@ -8460,7 +8502,7 @@ XTread_socket (sd, expected, hold_quit) #endif #if TARGET_API_MAC_CARBON - if (!IsValidWindowPtr (mac_front_window ())) + if (!IsValidWindowPtr (front_emacs_window ())) { SysBeep (1); break; @@ -8564,7 +8606,7 @@ XTread_socket (sd, expected, hold_quit) inev.modifiers = mac_to_emacs_modifiers (er.modifiers); #endif XSETFRAME (inev.frame_or_window, - mac_window_to_frame (mac_front_window ())); + mac_window_to_frame (front_emacs_window ())); inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ break; @@ -8581,16 +8623,16 @@ XTread_socket (sd, expected, hold_quit) WindowPtr wp; Lisp_Object frame; - wp = mac_front_window (); + wp = front_emacs_window (); if (!wp) { struct frame *f = XFRAME (XCAR (Vframe_list)); CollapseWindow (FRAME_MAC_WINDOW (f), false); - wp = mac_front_window (); + wp = front_emacs_window (); } - if (wp && is_emacs_window (wp)) + if (wp) f = mac_window_to_frame (wp); inev.kind = DRAG_N_DROP_EVENT; @@ -9047,7 +9089,7 @@ mac_check_for_quit_char () e.arg = Qnil; e.modifiers = NULL; e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); - XSETFRAME (e.frame_or_window, mac_window_to_frame (mac_front_window ())); + XSETFRAME (e.frame_or_window, mac_window_to_frame (front_emacs_window ())); /* Remove event from queue to prevent looping. */ RemoveEventFromQueue (GetMainEventQueue (), event); ReleaseEvent (event); From b0b6ad00ce4ca0e322ff966c74b6e88953c6f7f6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 6 Oct 2004 15:46:19 +0000 Subject: [PATCH 048/166] (LC_ALL=C): Fix src/Makefile breakage caused by recent (2004-09-24) changes in src/Makefile.in. --- msdos/ChangeLog | 5 +++++ msdos/sed1v2.inp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 1722153dc51..e906a8f4954 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,8 @@ +2004-10-06 Eli Zaretskii + + * sed1v2.inp (LC_ALL=C): Fix src/Makefile breakage caused by + recent (2004-09-24) changes in src/Makefile.in. + 2004-08-14 Eli Zaretskii * sedleim.inp: Remove the lines which say "@true", to avoid diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index dc316819a5d..8edc1616f23 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -20,9 +20,9 @@ s/^#.*// s/^[ \f\t][ \f\t]*$// s/^ / / s/\.h\.in/.h-in/ -/^ LC_ALL=C \.\/temacs/i\ +/^ LC_ALL=C \$(RUN_TEMACS)/i\ stubedit temacs.exe minstack=100k -/^ LC_ALL=C.*temacs/s/LC_ALL=C/set &;/ +/^ LC_ALL=C.*\$(RUN_TEMACS)/s/LC_ALL=C/set &;/ /^MAKE *=/s/^/# / /^SHELL *=/s/^/# / /^srcdir *=/s/@[^@\n]*@/./ From c3bc41c2d82fa7dea41f27e800ca4d9addb6bf89 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 6 Oct 2004 15:51:45 +0000 Subject: [PATCH 049/166] Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-599 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-42 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-43 Merge from emacs--cvs-trunk--0 --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/gnus-sum.el | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c072a77a807..0bdf47226ff 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2004-10-06 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-insert-subject): Remove redundant setq. + 2004-10-05 Juri Linkov * gnus-group.el (gnus-update-group-mark-positions): diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index abbecbbdff2..6c7c0436bc2 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -6013,8 +6013,7 @@ the subject line on." ;; Remove list identifiers from subject. (when gnus-list-identifiers (let ((gnus-newsgroup-headers (list header))) - (gnus-summary-remove-list-identifiers) - (setq header (car gnus-newsgroup-headers)))) + (gnus-summary-remove-list-identifiers))) (when old-header (mail-header-set-number header (mail-header-number old-header))) (setq gnus-newsgroup-sparse From ccd59305b4aedca7ef3daca250408879fa64eabf Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 6 Oct 2004 15:56:41 +0000 Subject: [PATCH 050/166] (url-insert-file-contents): Use the URL to decide the encoding, not the buffer-file-name (which might not even exist). --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-handlers.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 69851ac5046..0da4297bb86 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2004-10-06 Stefan Monnier + + * url-handlers.el (url-insert-file-contents): Use the URL to decide the + encoding, not the buffer-file-name (which might not even exist). + 2004-09-20 Stefan Monnier * url-handlers.el (url-insert-file-contents): Decode contents. diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 56497b00119..18a2e273637 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -208,7 +208,7 @@ accessible." ;; annotation which we could use as a hint of the locale in use ;; at the remote site. Not sure how/if that should be done. --Stef (decode-coding-inserted-region - start (point) buffer-file-name visit beg end replace))) + start (point) url visit beg end replace))) (list url (length data)))) (defun url-file-name-completion (url directory) From 1b3d1d14a097ea57fb1558e4d2ec33a9fc1d9795 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 Oct 2004 21:30:45 +0000 Subject: [PATCH 051/166] consistent -- use --- man/ChangeLog | 5 +++++ man/info.texi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/man/ChangeLog b/man/ChangeLog index 218cf5b25fa..8d35fe1024e 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2004-10-06 Karl Berry + + * info.texi (@kbd{1}--@kbd{9}): no space around --, for + consistency with other uses of dashes. + 2004-10-06 Nick Roberts * building.texi (Starting GUD): Note that multiple debugging diff --git a/man/info.texi b/man/info.texi index 7033eb13e8a..014e9165087 100644 --- a/man/info.texi +++ b/man/info.texi @@ -971,7 +971,7 @@ the node @samp{Top} in the Info file @file{dir}. Likewise, all of the current file by typing @kbd{g*@key{RET}} or all of any other file with @kbd{g(@var{filename})@key{RET}}. -@subheading @kbd{1} -- @kbd{9} choose a menu subtopic by its number +@subheading @kbd{1}--@kbd{9} choose a menu subtopic by its number @kindex 1 @r{through} 9 @r{(Info mode)} @findex Info-nth-menu-item From eb6a2b61401ca737487aa7770389c01c0e962cb0 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 7 Oct 2004 05:53:41 +0000 Subject: [PATCH 052/166] Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-603 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-44 Update from CVS --- lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/gnus-group.el | 2 +- lisp/gnus/gnus-msg.el | 2 +- lisp/gnus/gnus-sum.el | 8 ++++---- lisp/gnus/message.el | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0bdf47226ff..f4b77297867 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,11 @@ 2004-10-06 Katsumi Yamaoka + * gnus-group.el (gnus-update-group-mark-positions): + * gnus-sum.el (gnus-update-summary-mark-positions): + * message.el (message-check-news-body-syntax): + * gnus-msg.el (gnus-debug): Use mm-string-as-multibyte instead + of string-as-multibyte. + * gnus-sum.el (gnus-summary-insert-subject): Remove redundant setq. 2004-10-05 Juri Linkov diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index abf99cbfd64..435acb1d6c2 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1047,7 +1047,7 @@ The following commands are available: (goto-char (point-min)) (setq gnus-group-mark-positions (list (cons 'process (and (search-forward - (string-as-multibyte "\200") nil t) + (mm-string-as-multibyte "\200") nil t) (- (point) 2)))))))) (defun gnus-mouse-pick-group (e) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 77395ca5042..7dcef4b813b 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1534,7 +1534,7 @@ The source file has to be in the Emacs load path." ;; Remove any control chars - they seem to cause trouble for some ;; mailers. (Byte-compiled output from the stuff above.) (goto-char point) - (while (re-search-forward (string-as-multibyte + (while (re-search-forward (mm-string-as-multibyte "[\000-\010\013-\037\200-\237]") nil t) (replace-match (format "\\%03o" (string-to-char (match-string 0))) t t)))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 6c7c0436bc2..84de9c4e1ab 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3233,21 +3233,21 @@ buffer that was in action when the last article was fetched." (goto-char (point-min)) (setq pos (list (cons 'unread (and (search-forward - (string-as-multibyte "\200") nil t) + (mm-string-as-multibyte "\200") nil t) (- (point) (point-min) 1))))) (goto-char (point-min)) (push (cons 'replied (and (search-forward - (string-as-multibyte "\201") nil t) + (mm-string-as-multibyte "\201") nil t) (- (point) (point-min) 1))) pos) (goto-char (point-min)) (push (cons 'score (and (search-forward - (string-as-multibyte "\202") nil t) + (mm-string-as-multibyte "\202") nil t) (- (point) (point-min) 1))) pos) (goto-char (point-min)) (push (cons 'download (and (search-forward - (string-as-multibyte "\203") nil t) + (mm-string-as-multibyte "\203") nil t) (- (point) (point-min) 1))) pos))) (setq gnus-summary-mark-positions pos)))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 85f918986d5..bfaf1675703 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4400,7 +4400,7 @@ Otherwise, generate and save a value for `canlock-password' first." ;; Check for control characters. (message-check 'control-chars (if (re-search-forward - (string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]") + (mm-string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]") nil t) (y-or-n-p "The article contains control characters. Really post? ") From 626f61ac6fbe43e4f121f5f95409b4e8b0c081c3 Mon Sep 17 00:00:00 2001 From: "Robert J. Chassell" Date: Thu, 7 Oct 2004 12:06:59 +0000 Subject: [PATCH 053/166] Add missing backquote. --- lispintro/emacs-lisp-intro.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 4130eefd2cf..b47ff7aa5b1 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -4009,7 +4009,7 @@ the @dfn{else-part}, for the case when the true-or-false-test returns false. When this happens, the second argument or then-part of the overall @code{if} expression is @emph{not} evaluated, but the third or else-part @emph{is} evaluated. You might think of this as the cloudy -day alternative for the decision `if it is warm and sunny, then go to +day alternative for the decision ``if it is warm and sunny, then go to the beach, else read a book!''. The word ``else'' is not written in the Lisp code; the else-part of an From f6caa5dbbf7196801a48f5a7747bd558acb3dab7 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 7 Oct 2004 18:00:17 +0000 Subject: [PATCH 054/166] xml-substitute-special --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ceb72e1eebb..e67c4f1b5da 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-07 Mark A. Hershberger + + * xml.el (xml-substitute-special): Limit handling of external + entities. + 2004-10-06 Nick Roberts * progmodes/gdb-ui.el (gdb-ann3): (Re-)initialise gdb-input-queue. From 8b0d8589d562ed9810e6d6b5a9b33d3a1c86f8fe Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 7 Oct 2004 18:07:53 +0000 Subject: [PATCH 055/166] rms says omit reference --- man/ChangeLog | 2 -- 1 file changed, 2 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 8d35fe1024e..4741aba76fb 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -12,8 +12,6 @@ * info.texi: consistently use --- throughout, periods at end of menu descriptions, and a couple typos. - From: Benno Schulenberg , - in bug-texinfo mail. 2004-10-05 Luc Teirlinck From f0d494374f2efd77e7c4b8aacc5e9ffedc859471 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 7 Oct 2004 18:13:43 +0000 Subject: [PATCH 056/166] 2004-10-07 Mark A. Hershberger * xml.el (xml-substitute-special): Limit handling of external entities. --- lisp/xml.el | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lisp/xml.el b/lisp/xml.el index f1d8cbb1f00..b0d5d45f98d 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -727,14 +727,9 @@ This follows the rule [28] in the XML specifications." (match-string 1 this-part))))))) (cond ((null children) - (if (and (eq (length expansion) 1) - (stringp (cadr expansion))) - (setq children (concat prev-part expansion)) - (if (stringp (car expansion)) - (setq children - (list (concat prev-part (car expansion)) - (append (cdr expansion)))) - (setq children (append expansion prev-part))))) + ;; FIXME: If we have an entity that expands into XML, this won't work. + (setq children + (concat prev-part expansion))) ((stringp children) (if (stringp expansion) (setq children (concat children prev-part expansion)) From 696c94e915a1d42e73083fe5360900de66c88ea6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 7 Oct 2004 21:51:50 +0000 Subject: [PATCH 057/166] Fix spelling errors. --- man/msdog.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/msdog.texi b/man/msdog.texi index 157eba28844..dec258ec672 100644 --- a/man/msdog.texi +++ b/man/msdog.texi @@ -840,7 +840,7 @@ effect of bringing up the Windows menu, it alters the meaning of subsequent commands. Many users find this frustrating. @vindex w32-pass-alt-to-system -You can reenable Windows's default handling of tapping the @key{ALT} key +You can re-enable Windows' default handling of tapping the @key{ALT} key by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. @ignore From 3c7d999a7d9397a7a4d4d268a7f80a71ae80e902 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 7 Oct 2004 21:57:15 +0000 Subject: [PATCH 058/166] *** empty log message *** --- src/ChangeLog | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 99be23b4df8..2777a1b9218 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2004-10-07 Kim F. Storm + + * xdisp.c (redisplay_window): Fix flicker on vertical line between + windows. Update vertical line after drawing window fringes, but + only if actually drawing any bitmaps--or there is no fringe. + + * xterm.c (x_update_window_end): Likewise. + * macterm.c (x_update_window_end): Likewise. + * w32term.c (x_update_window_end): Likewise. + + * fringe.c (draw_window_fringes): Return value now indicates if + any fringe bitmaps were redrawn (or there are no fringes). + + * dispextern.h (draw_window_fringes): Update prototype. + 2004-10-06 YAMAMOTO Mitsuharu * macfns.c (mac_get_window_bounds): Add extern. @@ -5,7 +20,7 @@ * macmenu.c (update_submenu_strings): Apply 2004-09-07 change for xmenu.c (YAILOM). - + * macterm.c [!MAC_OSX]: Include Windows.h. (front_emacs_window): Rename from mac_front_window. All uses changed. Return the frontmost non-tooltip emacs window. From 98c95e4e0dc6fcd44991416dc72c701b4a9c503b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 7 Oct 2004 21:57:40 +0000 Subject: [PATCH 059/166] (draw_window_fringes): Update prototype. --- src/dispextern.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dispextern.h b/src/dispextern.h index 1a35408733d..1e9fa483b27 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2641,7 +2641,7 @@ extern int x_intersect_rectangles P_ ((XRectangle *, XRectangle *, int lookup_fringe_bitmap (Lisp_Object); void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int)); void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); -void draw_window_fringes P_ ((struct window *)); +int draw_window_fringes P_ ((struct window *, int)); int update_window_fringes P_ ((struct window *, int)); void compute_fringe_widths P_ ((struct frame *, int)); From 11491cbb2a3544c16169b7e32b04311a1c22ddd0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 7 Oct 2004 21:57:53 +0000 Subject: [PATCH 060/166] (draw_window_fringes): Return value now indicates if any fringe bitmaps were redrawn (or there are no fringes). --- src/fringe.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/fringe.c b/src/fringe.c index 71057e1b5cb..000095f470a 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -722,19 +722,35 @@ draw_row_fringe_bitmaps (w, row) } /* Draw the fringes of window W. Only fringes for rows marked for - update in redraw_fringe_bitmaps_p are drawn. */ + update in redraw_fringe_bitmaps_p are drawn. -void -draw_window_fringes (w) + Return >0 if left or right fringe was redrawn in any way. + + If NO_FRINGE is non-zero, also return >0 if either fringe has zero width. + + A return value >0 indicates that the vertical line between windows + needs update (as it may be drawn in the fringe). +*/ + +int +draw_window_fringes (w, no_fringe) struct window *w; + int no_fringe; { struct glyph_row *row; int yb = window_text_bottom_y (w); int nrows = w->current_matrix->nrows; int y = 0, rn; + int updated = 0; if (w->pseudo_window_p) - return; + return 0; + + /* Must draw line if no fringe */ + if (no_fringe + && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 + || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)) + updated++; for (y = 0, rn = 0, row = w->current_matrix->rows; y < yb && rn < nrows; @@ -744,7 +760,10 @@ draw_window_fringes (w) continue; draw_row_fringe_bitmaps (w, row); row->redraw_fringe_bitmaps_p = 0; + updated++; } + + return updated; } @@ -950,11 +969,7 @@ update_window_fringes (w, force_p) Typically, we add an equal amount (+/- 1 pixel) to each fringe, but a negative width value is taken literally (after negating it). - We never make the fringes narrower than specified. It is planned - to make fringe bitmaps customizable and expandable, and at that - time, the user will typically specify the minimum number of pixels - needed for his bitmaps, so we shouldn't select anything less than - what is specified. + We never make the fringes narrower than specified. */ void From 0a1527d6b5f2c64829fa21b6441f19f419c84886 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 7 Oct 2004 21:58:16 +0000 Subject: [PATCH 061/166] (redisplay_window): Fix flicker on vertical line between windows. Update vertical line after drawing window fringes, but only if actually drawing any bitmaps--or there is no fringe. --- src/xdisp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 37a0f9bb9d0..b7a24a4364b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12220,7 +12220,8 @@ redisplay_window (window, just_this_one_p) { update_begin (f); BLOCK_INPUT; - draw_window_fringes (w); + if (draw_window_fringes (w, 1)) + x_draw_vertical_border (w); UNBLOCK_INPUT; update_end (f); } From f94a2622a049a633a20147d4f15664c4f09996bd Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 7 Oct 2004 21:59:39 +0000 Subject: [PATCH 062/166] (x_update_window_end): Fix flicker on vertical line between windows. Update vertical line after drawing window fringes, but only if actually drawing any bitmaps--or there is no fringe. --- src/macterm.c | 13 ++++++------- src/w32term.c | 5 ++--- src/xterm.c | 5 ++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index 0587c5d15ba..a5e1de9be08 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -1291,9 +1291,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) output_cursor.vpos, output_cursor.x, output_cursor.y); - x_draw_vertical_border (w); - - draw_window_fringes (w); + if (draw_window_fringes (w, 1)) + x_draw_vertical_border (w); UNBLOCK_INPUT; } @@ -5050,7 +5049,7 @@ mac_get_window_bounds (f, inner, outer) GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowStructureRgn, outer); #else /* not TARGET_API_MAC_CARBON */ RgnHandle region = NewRgn (); - + GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowContentRgn, region); *inner = (*region)->rgnBBox; GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowStructureRgn, region); @@ -5143,7 +5142,7 @@ x_set_offset (f, xoff, yoff, change_gravity) { Rect inner, outer, screen_rect, dummy; RgnHandle region = NewRgn (); - + mac_get_window_bounds (f, &inner, &outer); f->x_pixels_diff = inner.left - outer.left; f->y_pixels_diff = inner.top - outer.top; @@ -8114,7 +8113,7 @@ XTread_socket (sd, expected, hold_quit) switch (GetEventClass (eventRef)) { case kEventClassWindow: - if (GetEventKind (eventRef) == kEventWindowBoundsChanged) + if (GetEventKind (eventRef) == kEventWindowBoundsChanged) { WindowPtr window_ptr; GetEventParameter(eventRef, kEventParamDirectObject, @@ -8431,7 +8430,7 @@ XTread_socket (sd, expected, hold_quit) if (!is_emacs_window (window_ptr)) break; - + f = mac_window_to_frame (window_ptr); if ((er.modifiers & activeFlag) != 0) diff --git a/src/w32term.c b/src/w32term.c index 22d139d9252..3956fd4b261 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -540,9 +540,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) output_cursor.vpos, output_cursor.x, output_cursor.y); - x_draw_vertical_border (w); - - draw_window_fringes (w); + if (draw_window_fringes (w, 1)) + x_draw_vertical_border (w); UNBLOCK_INPUT; } diff --git a/src/xterm.c b/src/xterm.c index 4fc9ed71abd..131753f893c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -571,9 +571,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) output_cursor.vpos, output_cursor.x, output_cursor.y); - x_draw_vertical_border (w); - - draw_window_fringes (w); + if (draw_window_fringes (w, 1)) + x_draw_vertical_border (w); UNBLOCK_INPUT; } From 28fe88fc129ad48101f8ae36f2242d1133c22808 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 7 Oct 2004 22:16:43 +0000 Subject: [PATCH 063/166] (Regexps): The regexp described in the example is no longer stored in the variable `sentence-end'. --- man/ChangeLog | 5 +++++ man/search.texi | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 4741aba76fb..420d6becec9 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2004-10-07 Luc Teirlinck + + * search.texi (Regexps): The regexp described in the example is no + longer stored in the variable `sentence-end'. + 2004-10-06 Karl Berry * info.texi (@kbd{1}--@kbd{9}): no space around --, for diff --git a/man/search.texi b/man/search.texi index 58265341c29..2a5d28a3985 100644 --- a/man/search.texi +++ b/man/search.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000, 2001 +@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000, 2001, 2004 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Search, Fixit, Display, Top @@ -777,13 +777,13 @@ matches any character that does @emph{not} belong to category The constructs that pertain to words and syntax are controlled by the setting of the syntax table (@pxref{Syntax}). - Here is a complicated regexp, stored in @code{sentence-end} and used -by Emacs to recognize the end of a sentence together with any -whitespace that follows. We show its Lisp syntax to distinguish the -spaces from the tab characters. In Lisp syntax, the string constant -begins and ends with a double-quote. @samp{\"} stands for a -double-quote as part of the regexp, @samp{\\} for a backslash as part -of the regexp, @samp{\t} for a tab, and @samp{\n} for a newline. + Here is a complicated regexp. It is a simplified version of the +regexp that Emacs uses, by default, to recognize the end of a sentence +together with any whitespace that follows. We show its Lisp syntax to +distinguish the spaces from the tab characters. In Lisp syntax, the +string constant begins and ends with a double-quote. @samp{\"} stands +for a double-quote as part of the regexp, @samp{\\} for a backslash as +part of the regexp, @samp{\t} for a tab, and @samp{\n} for a newline. @example "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" From 8bc687ff19b2481cabb7a3fdb12e7c9782b02575 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 8 Oct 2004 11:41:56 +0000 Subject: [PATCH 064/166] *** empty log message *** --- man/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 420d6becec9..e796ca03a1f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2004-10-08 Glenn Morris + + * calendar.texi (iCalendar): Style changes. + 2004-10-07 Luc Teirlinck * search.texi (Regexps): The regexp described in the example is no @@ -13,6 +17,10 @@ * building.texi (Starting GUD): Note that multiple debugging sessions requires `gdb --fullname'. +2004-10-05 Ulf Jasper + + * calendar.texi (iCalendar): New section for a new package. + 2004-10-05 Karl Berry * info.texi: consistently use --- throughout, periods at end of From 7d80643917ae0c795cae0d9abd47d935f1f50440 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 8 Oct 2004 11:45:20 +0000 Subject: [PATCH 065/166] (iCalendar): Style changes. --- man/calendar.texi | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/man/calendar.texi b/man/calendar.texi index f85527ad0ea..45b3ed318b3 100644 --- a/man/calendar.texi +++ b/man/calendar.texi @@ -1391,48 +1391,46 @@ appointment list with @kbd{M-x appt-delete}. The icalendar package aims at providing an implementation of the iCalendar standard, as defined in ``RFC 2445 -- Internet Calendaring and Scheduling Core Object Specification (iCalendar)''. It provides a means -for importing [iv]Calendar data into Emacs diary files and vice versa. +for importing iCalendar (and the earlier vCalendar format) data into +Emacs diary files and vice versa. - Importing should work correctly for ``ordinary'', i.e. non-recurring, -events. Recurring events may not be imported correctly, if they are -imported at all. Exporting of diary files into iCalendar files should -work correctly for most diary entries. Please note that -@file{icalendar.el} is work in progress, so usage may evolve in future. - -@subsection Usage + Importing works for ``ordinary'' (i.e. non-recurring) events, but (at +present) may not work correctly (if at all) for recurring events. +Exporting of diary files into iCalendar files should work correctly for +most diary entries. Please note that @file{icalendar.el} is work in +progress, so usage may evolve in future. To activate the package, use @code{(require 'icalendar)}. @findex icalendar-extract-ical-from-buffer The command @code{icalendar-extract-ical-from-buffer} extracts iCalendar data from the current buffer and adds it to your (default) -diary file. It can be used interactively, or for automatic extraction -of iCalendar data; for example with the VM mail reader one could use: +diary file. This function is also suitable for automatic extraction of +iCalendar data; for example with the Rmail mail client one could use: @example -(add-hook 'vm-select-new-message-hook 'icalendar-extract-ical-from-buffer) +(add-hook 'rmail-show-message-hook 'icalendar-extract-ical-from-buffer) @end example @findex icalendar-import-file - The function @code{icalendar-import-file} can be used -non-interactively to import an iCalendar file. @strong{Caution:} the -contents of the target diary file are @emph{deleted} by default! It is -highly recommended to use a dedicated diary file for importing. For -example: + The command @code{icalendar-import-file} imports an iCalendar file. +@strong{Caution:} the contents of the target diary file are +@emph{deleted} by default! It is highly recommended to use a dedicated +diary file for importing. For example: @example (icalendar-import-file "/here/is/calendar.ics" "/there/goes/ical-diary") @end example @noindent -The import file can be added to the diary using an @code{#include} -directive. @xref{Fancy Diary Display,,, elisp, The Emacs Lisp Reference -Manual}. +You can use an @code{#include} directive to add the import file contents +to the diary. @xref{Fancy Diary Display,,, elisp, The Emacs Lisp +Reference Manual}. @findex icalendar-convert-diary-to-ical - Use @code{icalendar-convert-diary-to-ical} to interactively export an -Emacs diary file to iCalendar format. @strong{Caution:} the contents of -the target file are @emph{deleted} by default! + The command @code{icalendar-convert-diary-to-ical} exports an Emacs +diary file to iCalendar format. @strong{Caution:} the contents of the +target file are @emph{deleted} by default! @node Daylight Savings From 7ff2aa3963ec6a11d1789090aea6b0aba763a302 Mon Sep 17 00:00:00 2001 From: "Robert J. Chassell" Date: Fri, 8 Oct 2004 13:07:25 +0000 Subject: [PATCH 066/166] Fix typo: ``the' to ``the''. --- lispintro/emacs-lisp-intro.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index b47ff7aa5b1..385b3537278 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -18025,7 +18025,7 @@ beginning. Sometimes when you you write text, you duplicate words---as with ``you you'' near the beginning of this sentence. I find that most -frequently, I duplicate ``the'; hence, I call the function for +frequently, I duplicate ``the''; hence, I call the function for detecting duplicated words, @code{the-the}. @need 1250 From 9afed9b1fa5aa59623def395f6229e177e0810d0 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 8 Oct 2004 15:50:59 +0000 Subject: [PATCH 067/166] (server-process-filter): Wrap `process-send-region' by `condition-case' to guard the case when the pipe to PROC is closed. --- lisp/ChangeLog | 6 ++++++ lisp/server.el | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e67c4f1b5da..236993fd00b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-09 Masatake YAMATO + + * server.el (server-process-filter): Wrap `process-send-region' + by `condition-case' to guard the case when the pipe to PROC is + closed. + 2004-10-07 Mark A. Hershberger * xml.el (xml-substitute-special): Limit handling of external diff --git a/lisp/server.el b/lisp/server.el index fe2fc0f59f4..3a330f07a3c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -343,7 +343,11 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." (with-temp-buffer (let ((standard-output (current-buffer))) (pp v) - (process-send-region proc (point-min) (point-max)))))) + ;; Suppress the error rose when the pipe to PROC is closed. + (condition-case err + (process-send-region proc (point-min) (point-max)) + (file-error nil)) + )))) ;; ARG is a file name. ;; Collapse multiple slashes to single slashes. (setq arg (command-line-normalize-file-name arg)) From a1883913f882a8a6e32bd08bfd8e6f4754b348db Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:02:16 +0000 Subject: [PATCH 068/166] (isearch-yank-line): C-y yanks to next EOL, not end of current line. --- lisp/ChangeLog | 7 ++++++- lisp/isearch.el | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 236993fd00b..f71d6800846 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,9 @@ -2004-10-09 Masatake YAMATO +2004-10-08 Alan Mackenzie + + * isearch.el (isearch-yank-line): C-y yanks to next EOL, not end + of current line. + +2004-10-08 Masatake YAMATO * server.el (server-process-filter): Wrap `process-send-region' by `condition-case' to guard the case when the pipe to PROC is diff --git a/lisp/isearch.el b/lisp/isearch.el index 96a3e0e0ac2..45ac5b4d286 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1254,8 +1254,8 @@ might return the position of the end of the line." (defun isearch-yank-line () "Pull rest of line from buffer into search string." (interactive) - (isearch-yank-internal 'line-end-position)) - + (isearch-yank-internal + (lambda () (line-end-position (if (eolp) 2 1))))) (defun isearch-search-and-update () ;; Do the search and update the display. From 0b4fe585ef776f2b6172d0404fb0c2984fbf4b3d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:04:58 +0000 Subject: [PATCH 069/166] Update the documentation of C-y in the case that point is already at the end of a line. --- man/search.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/man/search.texi b/man/search.texi index 2a5d28a3985..0f5e871630e 100644 --- a/man/search.texi +++ b/man/search.texi @@ -193,9 +193,11 @@ repeat the search will then search for a string including that character or word. @kbd{C-y} is similar to @kbd{C-w} but copies all the rest of the -current line into the search string. Both @kbd{C-y} and @kbd{C-w} -convert the text they copy to lower case if the search is currently -not case-sensitive; this is so the search remains case-insensitive. +current line into the search string. If point is already at the end +of a line, it grabs the entire next line. Both @kbd{C-y} and +@kbd{C-w} convert the text they copy to lower case if the search is +currently not case-sensitive; this is so the search remains +case-insensitive. @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one character at a time: @kbd{C-M-w} deletes the last character from the From e42d647407c8c0fc5af5ecd635fb27dfa8eaa643 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:14:15 +0000 Subject: [PATCH 070/166] Mention the changes in C-y behavior when at end of line. --- etc/NEWS | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 27521612a9e..1bf66abe225 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1166,12 +1166,23 @@ to new-kill-line, these commands now report: - C-h w and C-h f new-kill-line reports: new-kill-line is on C-k ++++ +** Vertical scrolling is now possible within incremental search. +To enable this feature, customize the new user option +`isearch-allow-scroll'. User written commands which satisfy stringent +constraints can be marked as "scrolling commands". See the Emacs manual +for details. + +++ ** C-w in incremental search now grabs either a character or a word, making the decision in a heuristic way. This new job is done by the command `isearch-yank-word-or-char'. To restore the old behavior, bind C-w to `isearch-yank-word' in `isearch-mode-map'. ++++ +** C-y in incremental search now grabs the next line if point is already +at the end of a line. + +++ ** C-M-w deletes and C-M-y grabs a character in isearch mode. Another method to grab a character is to enter the minibuffer by `M-e' From b4329caaf870b78b09bfbbc0b5e79f3b3296b230 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:23:40 +0000 Subject: [PATCH 071/166] (make-progress-reporter, progress-reporter-update) (progress-reporter-force-update, progress-reporter-do-update) (progress-reporter-done): New functions. --- lisp/ChangeLog | 6 +++ lisp/subr.el | 127 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f71d6800846..a0dd9c28a36 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-08 Paul Pogonyshev + + * subr.el (make-progress-reporter, progress-reporter-update) + (progress-reporter-force-update, progress-reporter-do-update) + (progress-reporter-done): New functions. + 2004-10-08 Alan Mackenzie * isearch.el (isearch-yank-line): C-y yanks to next EOL, not end diff --git a/lisp/subr.el b/lisp/subr.el index 0a01c8982c3..2abf953090a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2652,5 +2652,132 @@ The properties used on SYMBOL are `composefunc', `sendfunc', (put symbol 'abortfunc (or abortfunc 'kill-buffer)) (put symbol 'hookvar (or hookvar 'mail-send-hook))) +;; Standardized progress reporting + +;; Progress reporter has the following structure: +;; +;; (NEXT-UPDATE-VALUE . [NEXT-UPDATE-TIME +;; MIN-VALUE +;; MAX-VALUE +;; MESSAGE +;; MIN-CHANGE +;; MIN-TIME]) +;; +;; This weirdeness is for optimization reasons: we want +;; `progress-reporter-update' to be as fast as possible, so +;; `(car reporter)' is better than `(aref reporter 0)'. +;; +;; NEXT-UPDATE-TIME is a float. While `float-time' loses a couple +;; digits of precision, it doesn't really matter here. On the other +;; hand, it greatly simplifies the code. + +(defun make-progress-reporter (message min-value max-value + &optional current-value + min-change min-time) + "Return an object suitable for reporting operation progress with `progress-reporter-update'. + +MESSAGE is shown in the echo area. When at least 1% of operation +is complete, the exact percentage will be appended to the +MESSAGE. When you call `progress-reporter-done', word \"done\" +is printed after the MESSAGE. You can change MESSAGE of an +existing progress reporter with `progress-reporter-force-update'. + +MIN-VALUE and MAX-VALUE designate starting (0% complete) and +final (100% complete) states of operation. The latter should be +larger; if this is not the case, then simply negate all values. +Optional CURRENT-VALUE specifies the progress by the moment you +call this function. You should omit it or set it to nil in most +cases since it defaults to MIN-VALUE. + +Optional MIN-CHANGE determines the minimal change in percents to +report (default is 1%.) Optional MIN-TIME specifies the minimal +time before echo area updates (default is 0.2 seconds.) If +`float-time' function is not present, then time is not tracked +at all. If OS is not capable of measuring fractions of seconds, +then this parameter is effectively rounded up." + + (unless min-time + (setq min-time 0.2)) + (let ((reporter + (cons min-value ;; Force a call to `message' now + (vector (if (and (fboundp 'float-time) + (>= min-time 0.02)) + (float-time) nil) + min-value + max-value + message + (if min-change (max (min min-change 50) 1) 1) + min-time)))) + (progress-reporter-update reporter (or current-value min-value)) + reporter)) + +(defsubst progress-reporter-update (reporter value) + "Report progress of an operation in the echo area. +However, if the change since last echo area update is too small +or not enough time has passed, then do nothing (see +`make-progress-reporter' for details). + +First parameter, REPORTER, should be the result of a call to +`make-progress-reporter'. Second, VALUE, determines the actual +progress of operation; it must be between MIN-VALUE and MAX-VALUE +as passed to `make-progress-reporter'. + +This function is very inexpensive, you may not bother how often +you call it." + (when (>= value (car reporter)) + (progress-reporter-do-update reporter value))) + +(defun progress-reporter-force-update (reporter value &optional new-message) + "Report progress of an operation in the echo area unconditionally. + +First two parameters are the same as for +`progress-reporter-update'. Optional NEW-MESSAGE allows you to +change the displayed message." + (let ((parameters (cdr reporter))) + (when new-message + (aset parameters 3 new-message)) + (when (aref parameters 0) + (aset parameters 0 (float-time))) + (progress-reporter-do-update reporter value))) + +(defun progress-reporter-do-update (reporter value) + (let* ((parameters (cdr reporter)) + (min-value (aref parameters 1)) + (max-value (aref parameters 2)) + (one-percent (/ (- max-value min-value) 100.0)) + (percentage (truncate (/ (- value min-value) one-percent))) + (update-time (aref parameters 0)) + (current-time (float-time)) + (enough-time-passed + ;; See if enough time has passed since the last update. + (or (not update-time) + (when (>= current-time update-time) + ;; Calculate time for the next update + (aset parameters 0 (+ update-time (aref parameters 5))))))) + ;; + ;; Calculate NEXT-UPDATE-VALUE. If we are not going to print + ;; message this time because not enough time has passed, then use + ;; 1 instead of MIN-CHANGE. This makes delays between echo area + ;; updates closer to MIN-TIME. + (setcar reporter + (min (+ min-value (* (+ percentage + (if enough-time-passed + (aref parameters 4) ;; MIN-CHANGE + 1)) + one-percent)) + max-value)) + (when (integerp value) + (setcar reporter (ceiling (car reporter)))) + ;; + ;; Only print message if enough time has passed + (when enough-time-passed + (if (> percentage 0) + (message "%s%d%%" (aref parameters 3) percentage) + (message "%s" (aref parameters 3)))))) + +(defun progress-reporter-done (reporter) + "Print reporter's message followed by word \"done\" in echo area." + (message "%sdone" (aref (cdr reporter) 3))) + ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here From d0e2accefacb2323db4cf893c425356e8915d4f0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:31:51 +0000 Subject: [PATCH 072/166] (tar-summarize-buffer): Use progress reporter. --- lisp/tar-mode.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 0f0c22cabe1..62686d026c1 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -404,11 +404,11 @@ Place a dired-like listing on the front; then narrow to it, so that only that listing is visible (and the real data of the buffer is hidden)." (set-buffer-multibyte nil) - (message "Parsing tar file...") (let* ((result '()) (pos (point-min)) - (bs (max 1 (- (buffer-size) 1024))) ; always 2+ empty blocks at end. - (bs100 (max 1 (/ bs 100))) + (progress-reporter + (make-progress-reporter "Parsing tar file..." + (point-min) (max 1 (- (buffer-size) 1024)))) tokens) (while (and (<= (+ pos 512) (point-max)) (not (eq 'empty-tar-block @@ -416,10 +416,7 @@ is visible (and the real data of the buffer is hidden)." (tar-header-block-tokenize (buffer-substring pos (+ pos 512))))))) (setq pos (+ pos 512)) - (message "Parsing tar file...%d%%" - ;(/ (* pos 100) bs) ; this gets round-off lossage - (/ pos bs100) ; this doesn't - ) + (progress-reporter-update progress-reporter pos) (if (eq (tar-header-link-type tokens) 20) ;; Foo. There's an extra empty block after these. (setq pos (+ pos 512))) @@ -446,7 +443,7 @@ is visible (and the real data of the buffer is hidden)." ;; A tar file should end with a block or two of nulls, ;; but let's not get a fatal error if it doesn't. (if (eq tokens 'empty-tar-block) - (message "Parsing tar file...done") + (progress-reporter-done progress-reporter) (message "Warning: premature EOF parsing tar file"))) (save-excursion (goto-char (point-min)) From 4f124fb5287c38e0f8e507a2b8a5edd4d0cfb42c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:34:01 +0000 Subject: [PATCH 073/166] (etags-tags-completion-table): Use progress reporter. (etags-tags-apropos): Likewise. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/etags.el | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0dd9c28a36..5f6bdb7f99c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,12 @@ (progress-reporter-force-update, progress-reporter-do-update) (progress-reporter-done): New functions. + * tar-mode.el (tar-summarize-buffer): Use progress reporter. + + * progmodes/etags.el (etags-tags-completion-table): Use progress + reporter. + (etags-tags-apropos): Likewise. + 2004-10-08 Alan Mackenzie * isearch.el (isearch-yank-line): C-y yanks to next EOL, not end diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index ddbd2ce6f35..0569d26db61 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1229,10 +1229,10 @@ where they were found." (defun etags-tags-completion-table () (let ((table (make-vector 511 0)) - (point-max (/ (float (point-max)) 100.0)) - (msg-fmt (format - "Making tags completion table for %s...%%d%%%%" - buffer-file-name))) + (progress-reporter + (make-progress-reporter + (format "Making tags completion table for %s..." buffer-file-name) + (point-min) (point-max)))) (save-excursion (goto-char (point-min)) ;; This monster regexp matches an etags tag line. @@ -1253,7 +1253,7 @@ where they were found." (buffer-substring (match-beginning 5) (match-end 5)) ;; No explicit tag name. Best guess. (buffer-substring (match-beginning 3) (match-end 3))) - (message msg-fmt (/ (point) point-max))) + (progress-reporter-update progress-reporter (point))) table))) table)) @@ -1433,11 +1433,12 @@ where they were found." (tags-with-face 'highlight (princ buffer-file-name)) (princ "':\n\n")) (goto-char (point-min)) - (let ((point-max (/ (float (point-max)) 100.0))) + (let ((progress-reporter (make-progress-reporter + (format "Making tags apropos buffer for `%s'..." + string) + (point-min) (point-max)))) (while (re-search-forward string nil t) - (message "Making tags apropos buffer for `%s'...%d%%" - string - (/ (point) point-max)) + (progress-reporter-update progress-reporter (point)) (beginning-of-line) (let* ( ;; Get the local value in the tags table From 276dd8a8c76b987171a258b9fbb23151cba69647 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:35:47 +0000 Subject: [PATCH 074/166] (Progress): New node. --- lispref/display.texi | 99 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/lispref/display.texi b/lispref/display.texi index 518234ff4f8..d7e1303abad 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -16,6 +16,7 @@ that Emacs presents to the user. * Truncation:: Folding or wrapping long text lines. * The Echo Area:: Where messages are displayed. * Warnings:: Displaying warning messages for the user. +* Progress:: Informing user about progress of a long operation. * Invisible Text:: Hiding part of the buffer text. * Selective Display:: Hiding part of the buffer text (the old way). * Overlay Arrow:: Display of an arrow to indicate position. @@ -533,6 +534,104 @@ symbols. If it matches the first few elements in a warning type, then that warning is not logged. @end defopt +@node Progress +@section Reporting Operation Progress +@cindex progress reporting + +When an operation can take a while to finish, you should inform the +user about the progress it makes. This way the user can estimate +remaining time and clearly see that Emacs is busy working, not hung. + +Functions listed in this section provide simple and efficient way of +reporting operation progress. Here is a working example that does +nothing useful: + +@example +(let ((progress-reporter + (make-progress-reporter "Collecting some mana for Emacs..." + 0 500))) + (dotimes (k 500) + (sit-for 0.01) + (progress-reporter-update progress-reporter k)) + (progress-reporter-done progress-reporter)) +@end example + +@defun make-progress-reporter message min-value max-value &optional current-value min-change min-time +This function creates a progress reporter---the object you will use as +an argument for all other functions listed here. The idea is to +precompute as much data as possible to make progress reporting very +fast. + +The @var{message} will be displayed in the echo area, followed by +progress percentage. @var{message} is treated as a simple string. If +you need it to depend on a filename, for instance, use @code{format} +before calling this function. + +@var{min-value} and @var{max-value} arguments stand for starting and +final states of your operation. For instance, if you scan a buffer, +they should be the results of @code{point-min} and @code{point-max} +correspondingly. It is required that @var{max-value} is greater than +@var{min-value}. If you create progress reporter when some part of +the operation has already been completed, then specify +@var{current-value} argument. But normally you should omit it or set +it to @code{nil}---it will default to @var{min-value} then. + +Remaining arguments control the rate of echo area updates. Progress +reporter will wait for at least @var{min-change} more percents of the +operation to be completed before printing next message. +@var{min-time} specifies the minimum time in seconds to pass between +successive prints. It can be fractional. Depending on Emacs and +system capabilities, progress reporter may or may not respect this +last argument or do it with varying precision. Default value for +@var{min-change} is 1 (one percent), for @var{min-time}---0.2 +(seconds.) + +This function calls @code{progress-reporter-update}, so the first +message is printed immediately. +@end defun + +@defun progress-reporter-update reporter value +This function does the main work of reporting progress of your +operation. It print the message of @var{reporter} followed by +progress percentage determined by @var{value}. If percentage is zero, +then it is not printed at all. + +@var{reporter} must be the result of a call to +@code{make-progress-reporter}. @var{value} specifies the current +state of your operation and must be between @var{min-value} and +@var{max-value} (inclusive) as passed to +@code{make-progress-reporter}. For instance, if you scan a buffer, +then @var{value} should be the result of a call to @code{point}. + +This function respects @var{min-change} and @var{min-time} as passed +to @code{make-progress-reporter} and so does not output new messages +on every invocation. It is thus very fast and normally you should not +try to reduce the number of calls to it: resulting overhead will most +likely negate your effort. +@end defun + +@defun progress-reporter-force-update reporter value &optional new-message +This function is similar to @code{progress-reporter-update} except +that it prints a message in the echo area unconditionally. + +The first two arguments have the same meaning as for +@code{progress-reporter-update}. Optional @var{new-message} allows +you to change the message of the @var{reporter}. Since this functions +always updates the echo area, such a change will be immediately +presented to the user. +@end defun + +@defun progress-reporter-done reporter +This function should be called when the operation is finished. It +prints the message of @var{reporter} followed by word ``done'' in the +echo area. + +You should always call this function and not hope for +@code{progress-reporter-update} to print ``100%.'' Firstly, it may +never print it, there are many good reasons for this not to happen. +Secondly, ``done'' is more explicit. +@end defun + @node Invisible Text @section Invisible Text From 010864eabd4d9c8101843ab3687c8e5f19ee49b1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:42:15 +0000 Subject: [PATCH 075/166] Document the new Progress Mode. --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 1bf66abe225..ccbf5f0e236 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -98,6 +98,11 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 ++++ +** New functions `make-progress-reporter', `progress-reporter-update', +`progress-reporter-force-update' and `progress-reporter-done' provide +a simple and efficient way of printing progress messages to the user. + +++ ** In Enriched mode, `set-left-margin' and `set-right-margin' are now by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' From 67e61e164db888e1357cb509b327d100167012a0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:53:18 +0000 Subject: [PATCH 076/166] (mail-extr-ignore-realname-equals-mailbox-name): New defcustom. (extract-address-components): Use it. --- lisp/ChangeLog | 6 ++++++ lisp/mail/mail-extr.el | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5f6bdb7f99c..99e32010afd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-08 Sebastien Kirche (tiny change) + + * mail/mail-extr.el (mail-extr-ignore-realname-equals-mailbox-name): + New defcustom. + (extract-address-components): Use it. + 2004-10-08 Paul Pogonyshev * subr.el (make-progress-reporter, progress-reporter-update) diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 675444d7ba4..b7521ad8e91 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -234,6 +234,13 @@ we will act as though we couldn't find a full name in the address." :version "21.4" :group 'mail-extr) +(defcustom mail-extr-ignore-realname-equals-mailbox-name t +"*Whether to ignore a name that is equal to the mailbox name. +If true, then when the address is like \"Single \" +we will act as though we couldn't find a full name in the address." + :type 'boolean + :group 'mail-extr) + ;; Matches a leading title that is not part of the name (does not ;; contribute to uniquely identifying the person). (defcustom mail-extr-full-name-prefixes @@ -694,7 +701,7 @@ Unless NO-REPLACE is true, at each of the positions in LIST-SYMBOL "Given an RFC-822 address ADDRESS, extract full name and canonical address. Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). If no name can be extracted, FULL-NAME will be nil. Also see -`mail-extr-ignore-single-names'. +`mail-extr-ignore-single-names' and `mail-extr-ignore-realname-equals-mailbox-name'. If the optional argument ALL is non-nil, then ADDRESS can contain zero or more recipients, separated by commas, and we return a list of @@ -1404,8 +1411,9 @@ consing a string.)" (setq names-match-flag nil)) (setq i (1+ i))) (delete-region (+ (point-min) buffer-length) (point-max)) - (if names-match-flag - (narrow-to-region (point) (point))))) + (and names-match-flag + mail-extr-ignore-realname-equals-mailbox-name + (narrow-to-region (point) (point))))) ;; Nuke name if it's just one word. (goto-char (point-min)) From e8a4208ec898d1285cb1cead459a0b01f9ad8ddf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 17:54:43 +0000 Subject: [PATCH 077/166] (lisp-fill-paragraph): Change paragraph-start regexp so we don't fill code starting with #'( --- lisp/emacs-lisp/lisp-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 700fc5f80a8..da249076b91 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1182,7 +1182,7 @@ and initial semicolons." ;; The `fill-column' is temporarily bound to ;; `emacs-lisp-docstring-fill-column' if that value is an integer. (let ((paragraph-start (concat paragraph-start - "\\|\\s-*\\([\(;:\"]\\|`\(\\)")) + "\\|\\s-*\\([\(;:\"]\\|`\(\\|#'\(\\)")) (paragraph-separate (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) (fill-column (if (integerp emacs-lisp-docstring-fill-column) From 4f533cc56a881e9914c198d8249ca61c01c79a8d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 18:10:51 +0000 Subject: [PATCH 078/166] Fix wording. --- etc/TUTORIAL.fr | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/etc/TUTORIAL.fr b/etc/TUTORIAL.fr index ae88ff4a242..38853c608b9 100644 --- a/etc/TUTORIAL.fr +++ b/etc/TUTORIAL.fr @@ -17,7 +17,7 @@ Tapez C-x C-c (deux caract Dans ce didacticiel, les caractères ">>" en marge gauche indiquent les directions à suivre pour essayer une commande. Ainsi : <> -[Centre de page deliberéement vide. Le texte continue ci-dessous.] +[Centre de page delibérément vide. Le texte continue ci-dessous.] >> Tapez C-v (Voir l'écran suivant) pour passer à l'écran suivant (faites-le, pressez la touche CTRL tout en pressant la touche v). À partir de maintenant, vous devrez le faire à chaque fois que @@ -36,7 +36,7 @@ touche META, EDIT ou ALT). >> Faites M-v, puis C-v plusieurs fois. Si votre terminal en dispose, vous pouvez également utiliser les -touches PgUp et PgDn pour monter ou descendre d'un écran, bien les +touches PgUp et PgDn pour monter ou descendre d'un écran, bien que les combinaisons C-v et M-v soient plus efficaces. * RÉSUMÉ @@ -347,7 +347,7 @@ avant la position courante du curseur. Lorsqu'une ligne de texte devient trop longue pour tenir sur une seule ligne de l'écran, elle se « continue » sur une deuxième ligne d'écran. Une barre de fraction inverse (« \ ») ou, si vous utilisez un -environnement grapgique, une petite flèche recourbée, sur la marge +environnement graphique, une petite flèche recourbée, sur la marge droite indique une ligne qui se poursuit sur la ligne suivante. >> Insérez du texte jusqu'à atteindre la marge droite et continuez @@ -423,7 +423,7 @@ espaces, les effacent (vous ne pouvez donc pas r Notez qu'un simple C-k supprime le contenu de la ligne et qu'un second détruit la ligne elle-même, ce qui fait remonter toutes les lignes suivantes. C-k traite son paramètre numérique d'une façon spéciale : -il détruit ce nombre de lignes ET leurs contenus. Ce n'est pas une +il détruit ce nombre de lignes ET leur contenu. Ce n'est pas une simple répétition : C-u 2 C-k détruit deux lignes et leurs Newlines alors que taper deux fois C-k n'aurait pas le même effet. @@ -523,7 +523,7 @@ sauvegardez, Emacs garde le fichier original sous un nom modifi cas où vous décideriez ensuite d'annuler vos modifications. Si vous examinez le bas de l'écran, vous verrez une ligne qui commence -et finit par des tirets et débute par « --:-- TUTORIAL.fr » ou quelque +et finit par des tirets et débute par « -1:-- TUTORIAL.fr » ou quelque chose comme ça. Cette partie de l'écran montre normalement le nom du fichier que vous êtes en train de visiter. Pour l'instant, vous visitez un fichier appelé « TUTORIAL.fr », qui est votre copie @@ -584,7 +584,7 @@ l' encore. C'est ainsi que l'on crée un fichier avec Emacs : on trouve le fichier, qui démarre vide, puis on insère du texte. Lorsque l'on demande à « sauvegarder » le fichier, Emacs crée alors vraiment le -fichier avec le texte que l'on a inséré. À partir de ce moment là, +fichier avec le texte que l'on a inséré. À partir de ce moment-là, vous pouvez considérer que vous éditez un fichier déjà existant. @@ -666,10 +666,10 @@ non. * EXTENSION DU JEU DE COMMANDES ------------------------------- -Il y bien plus de commandes Emacs qu'il ne serait possible d'en créer -avec tous les caractères de contrôle et les caractères Meta. Emacs -contourne ce problème à l'aide de la commande X (eXtension). Celle-ci -se présente sous deux déclinaisons : +Il y a bien plus de commandes Emacs qu'il ne serait possible d'en +créer avec tous les caractères de contrôle et Meta. Emacs contourne ce +problème à l'aide de la commande X (eXtension). Celle-ci se présente +sous deux déclinaisons : C-x eXtension caractère, suivie d'un seul caractère. M-x eXtension d'une commande nommée, suivie d'un nom long. @@ -742,7 +742,7 @@ param Lorsque vous avez modifié un fichier, mais que vous ne l'avez pas encore sauvegardé, ces modifications pourraient être perdues si votre -système se plantait. Pour vous protéger ce de problème, Emacs écrit +système se plantait. Pour vous protéger de ce problème, Emacs écrit périodiquement un fichier de « sauvegarde automatique » pour chaque fichier en cours d'édition. Le nom de ce fichier commence et se termine par un # : si, par exemple, votre fichier s'appelle @@ -772,14 +772,14 @@ zone d' La ligne placée immédiatement au dessus de la zone d'écho s'appelle la « ligne de mode ». Elle affiche quelque chose comme ça : ---:** TUTORIAL.fr (Fundamental)--L752--67%---------------- +-1:** TUTORIAL.fr (Fundamental)--L752--67%---------------- Cette ligne donne des informations sur l'état d'Emacs et sur le texte que vous êtes en train d'éditer. Vous savez déjà ce que signifie le nom de fichier -- c'est celui que vous avez chargé. -NN%-- indique votre position actuelle dans le -texte ; cela signifie que NN pourcent du texte se trouve au dessus du +texte ; cela signifie que NN pour cent du texte se trouve au dessus du sommet de l'écran. Si le début du fichier est sur l'écran, il s'affichera --Top-- et non --00%--. Si le bas du texte est sur l'écran, il s'affichera --Bot--. Si tout le texte tient dans l'écran, @@ -802,7 +802,7 @@ Emacs poss prévus pour éditer différents langages et/ou types de texte (mode Lisp, mode Text, etc). À tout instant, il n'y a qu'un seul mode majeur actif et son nom se trouve toujours dans la ligne de mode, à l'endroit -ou « Fundamental » se trouve actuellement. +où « Fundamental » se trouve actuellement. Chaque mode majeur modifie le comportement de quelques commandes. Il existe, par exemple, des commandes pour créer des commentaires dans un @@ -940,7 +940,7 @@ haut dans le texte, faites plut C-s s'applique également à C-r, sauf que la direction de la recherche est inversée. -* FENETRES MULTIPLES +* FENÊTRES MULTIPLES -------------------- L'une des caractéristiques les plus agréables d'Emacs est que vous From 657f0f9c4e2b7089fcae999a22ac29beeea5914b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Oct 2004 18:15:14 +0000 Subject: [PATCH 079/166] *** empty log message *** --- etc/ChangeLog | 4 ++++ lisp/ChangeLog | 5 +++++ lispref/ChangeLog | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index e410e315417..08e72c60c2f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2004-10-08 Fr,Ai(Bd,Ai(Bric Bothamy (tiny change) + + * TUTORIAL.fr: Minor wording fix. + 2004-10-04 Luc Teirlinck * enriched.doc: Update for new bindings of `set-left-margin' and diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99e32010afd..28e2b936d31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-08 Peter Seibel (tiny change) + + * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Change + paragraph-start regexp so we don't fill code starting with #'( + 2004-10-08 Sebastien Kirche (tiny change) * mail/mail-extr.el (mail-extr-ignore-realname-equals-mailbox-name): diff --git a/lispref/ChangeLog b/lispref/ChangeLog index aef4746eef7..e941967e76b 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2004-10-08 Paul Pogonyshev + + * display.texi (Progress): New node. + 2004-10-05 Kim F. Storm * display.texi (Fringe Bitmaps): Update fringe-bitmaps-at-pos. From cef11da29920a67e534b01241c47ee379926210e Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Fri, 8 Oct 2004 18:36:47 +0000 Subject: [PATCH 080/166] configure.in (HAVE_MALLOC_MALLOC_H): Test for malloc/malloc.h configure: Rebuild --- ChangeLog | 5 ++ configure | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 3 ++ 3 files changed, 155 insertions(+) diff --git a/ChangeLog b/ChangeLog index aa5d01c16f5..3d2545f9056 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-08 Steven Tamm + + * configure.in (HAVE_MALLOC_MALLOC_H): Test for malloc/malloc.h + * configure: Rebuild + 2004-10-06 Jan Dj,Ad(Brv * configure.in (HAVE_RANDOM_HEAPSTART): Change AC_MSG_ERROR to diff --git a/configure b/configure index 83ac957143d..1f01796bb60 100755 --- a/configure +++ b/configure @@ -12130,6 +12130,153 @@ fi fi +if test "${ac_cv_header_malloc_malloc_h+set}" = set; then + echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 +echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5 +echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5 +echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 +echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_malloc_malloc_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6 + +fi +if test $ac_cv_header_malloc_malloc_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC_MALLOC_H 1 +_ACEOF + +fi + + + if test "${HAVE_CARBON}" = "yes"; then cat >>confdefs.h <<\_ACEOF diff --git a/configure.in b/configure.in index 4e534a53485..519f826f270 100644 --- a/configure.in +++ b/configure.in @@ -2313,6 +2313,9 @@ if test "${with_carbon}" != "no"; then AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes) fi +dnl Check for malloc/malloc.h on darwin +AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])) + if test "${HAVE_CARBON}" = "yes"; then AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) window_system=mac From f7f3a65fc0ce84e01d404230782619edc2bc590a Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Fri, 8 Oct 2004 18:38:17 +0000 Subject: [PATCH 081/166] config.in (HAVE_MALLOC_MALLOC_H): Regenerate macterm.c (mac_check_for_quit_char): Remove warning for using NULL where 0 should be used unexmacosx.c: Use malloc/malloc.h on Tiger instead of objc/malloc.h mac.c: Include time.h for Tiger compatibility --- src/ChangeLog | 9 +++++++++ src/config.in | 9 ++++++--- src/mac.c | 1 + src/unexmacosx.c | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2777a1b9218..131586c4e8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2004-10-08 Steven Tamm + + * config.in (HAVE_MALLOC_MALLOC_H): Regenerate + * macterm.c (mac_check_for_quit_char): Remove warning for using + NULL where 0 should be used + * unexmacosx.c: Use malloc/malloc.h on Tiger instead of + objc/malloc.h + * mac.c: Include time.h for Tiger compatibility + 2004-10-07 Kim F. Storm * xdisp.c (redisplay_window): Fix flicker on vertical line between diff --git a/src/config.in b/src/config.in index cc37606b713..49095ca4e5a 100644 --- a/src/config.in +++ b/src/config.in @@ -352,6 +352,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the header file. */ #undef HAVE_MAILLOCK_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_MALLOC_H + /* Define to 1 if you have the `mblen' function. */ #undef HAVE_MBLEN @@ -754,9 +757,9 @@ Boston, MA 02111-1307, USA. */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ diff --git a/src/mac.c b/src/mac.c index 9740b3bf3f4..f7e96b9c146 100644 --- a/src/mac.c +++ b/src/mac.c @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #include #include +#include #include #include #include diff --git a/src/unexmacosx.c b/src/unexmacosx.c index b41c586d2e0..1f2b4c96620 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -99,7 +99,12 @@ Boston, MA 02111-1307, USA. */ #if defined (__ppc__) #include #endif +#if defined (HAVE_MALLOC_MALLOC_H) +#include +#else #include +#endif + #define VERBOSE 1 From 8762f451cf3077a3babf2a5d55e8cca475f92f1b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 8 Oct 2004 20:58:54 +0000 Subject: [PATCH 082/166] (Default Simplifications): Add missing ). --- man/calc.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/calc.texi b/man/calc.texi index 8c3a3c5f92c..3f5c40979ab 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -21981,7 +21981,7 @@ back on. The most basic default simplification is the evaluation of functions. For example, @cite{2 + 3} is evaluated to @cite{5}, and @cite{@t{sqrt}(9)} is evaluated to @cite{3}. Evaluation does not occur if the arguments -to a function are somehow of the wrong type (@cite{@t{tan}([2,3,4])}, +to a function are somehow of the wrong type (@cite{@t{tan}([2,3,4])}), range (@cite{@t{tan}(90)}), or number (@cite{@t{tan}(3,5)}), or if the function name is not recognized (@cite{@t{f}(5)}), or if ``symbolic'' mode (@pxref{Symbolic Mode}) prevents evaluation (@cite{@t{sqrt}(2)}). From e7378ac300cd607786228df71b8b6fdd193938ab Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 8 Oct 2004 22:19:18 +0000 Subject: [PATCH 083/166] (Fancy Mail Splitting): Remove backslash in the example of nnmail-split-fancy. --- man/gnus.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/gnus.texi b/man/gnus.texi index c94845c7a8b..576877cb861 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -14002,7 +14002,7 @@ Let's look at an example value of this variable first: ;; @r{the bugs- list, but allow cross-posting when the} ;; @r{message was really cross-posted.} (any "bugs-mypackage@@somewhere" "mypkg.bugs") - (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list") + (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list") ;; @r{People@dots{}} (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen")) ;; @r{Unmatched mail goes to the catch all group.} From a682a2d38f52a4234551139ac49da8ea0b323f4d Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 8 Oct 2004 22:21:17 +0000 Subject: [PATCH 084/166] * gnus.texi (Fancy Mail Splitting): Remove backslash in the example of nnmail-split-fancy. --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index e796ca03a1f..c17108b12cd 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2004-10-09 Juri Linkov + + * gnus.texi (Fancy Mail Splitting): Remove backslash in the + example of nnmail-split-fancy. + 2004-10-08 Glenn Morris * calendar.texi (iCalendar): Style changes. From cd9d956124848da72b19da969ea37553c7dce970 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 9 Oct 2004 14:28:12 +0000 Subject: [PATCH 085/166] (lisp-fill-paragraph): Fix backslashes. --- lisp/emacs-lisp/lisp-mode.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index da249076b91..f4364c38e8d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1,6 +1,7 @@ ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands -;; Copyright (C) 1985,86,1999,2000,01,03,2004 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003, 2004 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: lisp, languages @@ -1153,7 +1154,8 @@ paragraph of it that point is in, preserving the comment's indentation and initial semicolons." (interactive "P") (or (fill-comment-paragraph justify) - ;; Point is on a program line (a line no comment); we are interested + ;; Since fill-comment-paragraph returned nil, that means we're not in + ;; a comment: Point is on a program line; we are interested ;; particularly in docstring lines. ;; ;; We bind `paragraph-start' and `paragraph-separate' temporarily. They @@ -1182,7 +1184,7 @@ and initial semicolons." ;; The `fill-column' is temporarily bound to ;; `emacs-lisp-docstring-fill-column' if that value is an integer. (let ((paragraph-start (concat paragraph-start - "\\|\\s-*\\([\(;:\"]\\|`\(\\|#'\(\\)")) + "\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)")) (paragraph-separate (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) (fill-column (if (integerp emacs-lisp-docstring-fill-column) @@ -1227,5 +1229,5 @@ means don't indent that line." (provide 'lisp-mode) -;;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf +;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf ;;; lisp-mode.el ends here From 6cae76c29157856e6392ecc47764fe6eab6f2e1c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 9 Oct 2004 18:33:33 +0000 Subject: [PATCH 086/166] (Filling): Add anchor for definition of `sentence-end-double-space'. --- lispref/text.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lispref/text.texi b/lispref/text.texi index caa3f21b7b1..00aa235f513 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -1,6 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, +@c 2000, 2001, 2004 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/text @@ -1448,6 +1449,7 @@ the text around point. @end defun @defopt sentence-end-double-space +@anchor{Definition of sentence-end-double-space} If this variable is non-@code{nil}, a period followed by just one space does not count as the end of a sentence, and the filling functions avoid breaking the line at such a place. From 45fa30b2ffeff0b52fab027547d0c48510b3a9c0 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 9 Oct 2004 18:35:38 +0000 Subject: [PATCH 087/166] (Regexp Example): Update description of how Emacs currently recognizes the end of a sentence. (Standard Regexps): Update definition of the variable `sentence-end'. Add definition of the function `sentence-end'. --- lispref/searching.texi | 44 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/lispref/searching.texi b/lispref/searching.texi index 93a152fbbe1..ee6cb06b1e1 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/searching @@ -694,9 +694,9 @@ an @code{invalid-regexp} error is signaled. Here is a complicated regexp which was formerly used by Emacs to recognize the end of a sentence together with any whitespace that -follows. It was used as the variable @code{sentence-end}. (Its value -nowadays contains alternatives for @samp{.}, @samp{?} and @samp{!} in -other character sets.) +follows. (Nowadays Emacs uses a similar but more complex default +regexp constructed by the function @code{sentence-end}. +@xref{Standard Regexps}.) First, we show the regexp as a string in Lisp syntax to distinguish spaces from tab characters. The string constant begins and ends with a @@ -730,9 +730,9 @@ deciphered as follows: The first part of the pattern is a character alternative that matches any one of three characters: period, question mark, and exclamation mark. The match must begin with one of these three characters. (This -is the one point where the new value of @code{sentence-end} differs -from the old. The new value also lists sentence ending -non-@acronym{ASCII} characters.) +is one point where the new default regexp used by Emacs differs from +the old. The new value also allows some non-@acronym{ASCII} +characters that end a sentence without any following whitespace.) @item []\"')@}]* The second part of the pattern matches any closing braces and quotation @@ -1698,23 +1698,25 @@ whitespace or starting with a form feed (after its left margin). @end defvar @defvar sentence-end -This is the regular expression describing the end of a sentence. (All -paragraph boundaries also end sentences, regardless.) The (slightly -simplified) default value is: +If non-@code{nil}, the value should be a regular expression describing +the end of a sentence, including the whitespace following the +sentence. (All paragraph boundaries also end sentences, regardless.) -@example -"[.?!][]\"')@}]*\\($\\| $\\|\t\\|@ @ \\)[ \t\n]*" -@end example - -This means a period, question mark or exclamation mark (the actual -default value also lists their alternatives in other character sets), -followed optionally by closing parenthetical characters, followed by -tabs, spaces or new lines. - -For a detailed explanation of this regular expression, see @ref{Regexp -Example}. +If the value is @code{nil}, the default, then the function +@code{sentence-end} has to construct the regexp. That is why you +should always call the function @code{sentence-end} to obtain the +regexp to be used to recognize the end of a sentence. @end defvar +@defun sentence-end +This function returns the value of the variable @code{sentence-end}, +if non-@code{nil}. Otherwise it returns a default value based on the +values of the variables @code{sentence-end-double-space} +(@pxref{Definition of sentence-end-double-space}), +@code{sentence-end-without-period} and +@code{sentence-end-without-space}. +@end defun + @ignore arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f @end ignore From 2e3c33de207c47e5a2c95d51862be3c4ef72a6a9 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 9 Oct 2004 18:41:18 +0000 Subject: [PATCH 088/166] (Misc File Ops): View mode is a minor mode. --- man/files.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/files.texi b/man/files.texi index b5ebf7cf820..4e36c2ab2fa 100644 --- a/man/files.texi +++ b/man/files.texi @@ -2858,7 +2858,7 @@ or @key{DEL} to scroll backward. Various other commands are provided for moving around in the file, but none for changing it; type @kbd{?} while viewing for a list of them. They are mostly the same as normal Emacs cursor motion commands. To exit from viewing, type @kbd{q}. -The commands for viewing are defined by a special major mode called View +The commands for viewing are defined by a special minor mode called View mode. A related command, @kbd{M-x view-buffer}, views a buffer already present From 51d7369eb8e6bdb1310789c72266f2842af5fb24 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 9 Oct 2004 18:49:01 +0000 Subject: [PATCH 089/166] (sentence-end-double-space) (sentence-end-without-period, sentence-end-without-space) (sentence-end): Doc fixes. --- lisp/textmodes/paragraphs.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 868dcb2d107..206f7a42f78 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el @@ -1,6 +1,6 @@ ;;; paragraphs.el --- paragraph and sentence parsing -;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999, 2000, 2001 +;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999, 2000, 2001, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -122,8 +122,8 @@ This is relevant for filling. See also `sentence-end-without-period' and `colon-double-space'. This value is used by the function `sentence-end' to construct the -regexp describing the end of a sentence, in case when the value of -the variable `sentence-end' is nil. See Info node `Sentences'." +regexp describing the end of a sentence, when the value of the variable +`sentence-end' is nil. See Info node `(elisp)Standard Regexps'." :type 'boolean :group 'fill) @@ -133,18 +133,18 @@ For example, a sentence in Thai text ends with double space but without a period. This value is used by the function `sentence-end' to construct the -regexp describing the end of a sentence, in case when the value of -the variable `sentence-end' is nil. See Info node `Sentences'." +regexp describing the end of a sentence, when the value of the variable +`sentence-end' is nil. See Info node `(elisp)Standard Regexps'." :type 'boolean :group 'fill) (defcustom sentence-end-without-space "$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B" - "*String containing characters that end sentence without following spaces. + "*String of characters that end sentence without following spaces. This value is used by the function `sentence-end' to construct the -regexp describing the end of a sentence, in case when the value of -the variable `sentence-end' is nil. See Info node `Sentences'." +regexp describing the end of a sentence, when the value of the variable +`sentence-end' is nil. See Info node `(elisp)Standard Regexps'." :group 'paragraphs :type 'string) @@ -169,7 +169,7 @@ and `sentence-end-without-space'. The default value specifies that in order to be recognized as the end of a sentence, the ending period, question mark, or exclamation point must be followed by two spaces, unless it's inside some sort of quotes or -parenthesis. See Info node `Sentences'." +parenthesis. See Info node `(elisp)Standard Regexps'." (or sentence-end (concat (if sentence-end-without-period "\\w \\|") "\\([.?!][]\"'\xd0c9\x5397d)}]*" From 9f4b6e738feccb3ca6b9e65e0a3745fe5767af19 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 9 Oct 2004 18:57:48 +0000 Subject: [PATCH 090/166] *** empty log message *** --- etc/NEWS | 2 ++ lisp/ChangeLog | 12 +++++++++--- lispref/ChangeLog | 10 ++++++++++ man/ChangeLog | 4 ++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index ccbf5f0e236..63c4ec3e3a1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2533,10 +2533,12 @@ If either property is not set, the default `overlay-arrow-string' or line in current buffer, or if optional buffer position is given, line number of corresponding line in current buffer. ++++ ** The default value of `sentence-end' is now defined using the new variable `sentence-end-without-space' which contains such characters that end a sentence without following spaces. ++++ ** The function `sentence-end' should be used to obtain the value of the variable `sentence-end'. If the variable `sentence-end' is nil, then this function returns the regexp constructed from the variables diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28e2b936d31..d615c4c9723 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,14 @@ +2004-10-09 Luc Teirlinck + + * textmodes/paragraphs.el (sentence-end-double-space) + (sentence-end-without-period, sentence-end-without-space) + (sentence-end): Doc fixes. + 2004-10-08 Peter Seibel (tiny change) * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Change paragraph-start regexp so we don't fill code starting with #'( - + 2004-10-08 Sebastien Kirche (tiny change) * mail/mail-extr.el (mail-extr-ignore-realname-equals-mailbox-name): @@ -28,8 +34,8 @@ 2004-10-08 Masatake YAMATO - * server.el (server-process-filter): Wrap `process-send-region' - by `condition-case' to guard the case when the pipe to PROC is + * server.el (server-process-filter): Wrap `process-send-region' + by `condition-case' to guard the case when the pipe to PROC is closed. 2004-10-07 Mark A. Hershberger diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e941967e76b..c33e49ca773 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,13 @@ +2004-10-09 Luc Teirlinck + + * text.texi (Filling): Add anchor for definition of + `sentence-end-double-space'. + + * searching.texi (Regexp Example): Update description of how + Emacs currently recognizes the end of a sentence. + (Standard Regexps): Update definition of the variable + `sentence-end'. Add definition of the function `sentence-end'. + 2004-10-08 Paul Pogonyshev * display.texi (Progress): New node. diff --git a/man/ChangeLog b/man/ChangeLog index c17108b12cd..2a31de4ba34 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2004-10-09 Luc Teirlinck + + * files.texi (Misc File Ops): View mode is a minor mode. + 2004-10-09 Juri Linkov * gnus.texi (Fancy Mail Splitting): Remove backslash in the From c2b4a97bbbd0c3afbac295b6c95d7d7ac42a1ac2 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 9 Oct 2004 21:50:38 +0000 Subject: [PATCH 091/166] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d615c4c9723..881af1a4a74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-09 Kim F. Storm + + * subr.el (progress-reporter-update): Define before first usage. + (make-progress-reporter): Doc fix. + 2004-10-09 Luc Teirlinck * textmodes/paragraphs.el (sentence-end-double-space) From c85152fceba4bc9aca0423d7f0a88d185202e87c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 9 Oct 2004 21:50:57 +0000 Subject: [PATCH 092/166] (progress-reporter-update): Define before first usage. (make-progress-reporter): Doc fix. --- lisp/subr.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 2abf953090a..17f8bc81ccc 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2671,10 +2671,26 @@ The properties used on SYMBOL are `composefunc', `sendfunc', ;; digits of precision, it doesn't really matter here. On the other ;; hand, it greatly simplifies the code. +(defsubst progress-reporter-update (reporter value) + "Report progress of an operation in the echo area. +However, if the change since last echo area update is too small +or not enough time has passed, then do nothing (see +`make-progress-reporter' for details). + +First parameter, REPORTER, should be the result of a call to +`make-progress-reporter'. Second, VALUE, determines the actual +progress of operation; it must be between MIN-VALUE and MAX-VALUE +as passed to `make-progress-reporter'. + +This function is very inexpensive, you may not bother how often +you call it." + (when (>= value (car reporter)) + (progress-reporter-do-update reporter value))) + (defun make-progress-reporter (message min-value max-value &optional current-value min-change min-time) - "Return an object suitable for reporting operation progress with `progress-reporter-update'. + "Return progress reporter object usage with `progress-reporter-update'. MESSAGE is shown in the echo area. When at least 1% of operation is complete, the exact percentage will be appended to the @@ -2711,22 +2727,6 @@ then this parameter is effectively rounded up." (progress-reporter-update reporter (or current-value min-value)) reporter)) -(defsubst progress-reporter-update (reporter value) - "Report progress of an operation in the echo area. -However, if the change since last echo area update is too small -or not enough time has passed, then do nothing (see -`make-progress-reporter' for details). - -First parameter, REPORTER, should be the result of a call to -`make-progress-reporter'. Second, VALUE, determines the actual -progress of operation; it must be between MIN-VALUE and MAX-VALUE -as passed to `make-progress-reporter'. - -This function is very inexpensive, you may not bother how often -you call it." - (when (>= value (car reporter)) - (progress-reporter-do-update reporter value))) - (defun progress-reporter-force-update (reporter value &optional new-message) "Report progress of an operation in the echo area unconditionally. From 9688f9eb3a5f08a6742ec68b3cd993d14a9571b4 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 9 Oct 2004 23:24:31 +0000 Subject: [PATCH 093/166] *** empty log message *** --- src/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 131586c4e8d..f77876b007a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2004-10-10 Kim F. Storm + + * keyboard.c (timer_resume_idle): New function to resume idle + timer without resetting timers on the idle list. + (read_char): Use timer_resume_idle. Remove local var last_idle_start. + (timer_start_idle, timer_stop_idle): Declare static. + (read_key_sequence): Use timer_resume_idle instead of timer_start_idle. + + * keyboard.h (timer_start_idle, timer_stop_idle): Remove prototypes. + 2004-10-08 Steven Tamm * config.in (HAVE_MALLOC_MALLOC_H): Regenerate From 5c12e63f92556f30b3cb182c2dbfa0a0d7046545 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 9 Oct 2004 23:24:49 +0000 Subject: [PATCH 094/166] (timer_resume_idle): New function to resume idle timer without resetting timers on the idle list. (read_char): Use timer_resume_idle. Remove local var last_idle_start. (timer_start_idle, timer_stop_idle): Declare static. (read_key_sequence): Use timer_resume_idle instead of timer_start_idle. --- src/keyboard.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 78e7498287e..ba9db5b6e94 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -676,6 +676,9 @@ static Lisp_Object apply_modifiers P_ ((int, Lisp_Object)); static void clear_event P_ ((struct input_event *)); static void any_kboard_state P_ ((void)); static SIGTYPE interrupt_signal P_ ((int signalnum)); +static void timer_start_idle P_ ((void)); +static void timer_stop_idle P_ ((void)); +static void timer_resume_idle P_ ((void)); /* Nonzero means don't try to suspend even if the operating system seems to support it. */ @@ -2387,7 +2390,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) volatile Lisp_Object also_record; volatile int reread; struct gcpro gcpro1, gcpro2; - EMACS_TIME last_idle_start; int polling_stopped_here = 0; also_record = Qnil; @@ -2894,9 +2896,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) non_reread: - /* Record the last idle start time so that we can reset it - should the next event read be a help-echo. */ - last_idle_start = timer_idleness_start_time; timer_stop_idle (); RESUME_POLLING; @@ -2936,7 +2935,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) prevents automatic window selection (under mouse_autoselect_window from acting as a real input event, for example banishing the mouse under mouse-avoidance-mode. */ - timer_idleness_start_time = last_idle_start; + timer_resume_idle (); /* Resume allowing input from any kboard, if that was true before. */ if (!was_locked) @@ -3135,7 +3134,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) show_help_echo (help, window, object, position, 0); /* We stopped being idle for this event; undo that. */ - timer_idleness_start_time = last_idle_start; + timer_resume_idle (); goto retry; } @@ -4252,7 +4251,7 @@ swallow_events (do_display) /* Record the start of when Emacs is idle, for the sake of running idle-time timers. */ -void +static void timer_start_idle () { Lisp_Object timers; @@ -4280,12 +4279,23 @@ timer_start_idle () /* Record that Emacs is no longer idle, so stop running idle-time timers. */ -void +static void timer_stop_idle () { EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); } +/* Resume idle timer from last idle start time. */ + +static void +timer_resume_idle () +{ + if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) + return; + + timer_idleness_start_time = timer_last_idleness_start_time; +} + /* This is only for debugging. */ struct input_event last_timer_event; @@ -8847,14 +8857,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, keymap may have changed, so replay the sequence. */ if (BUFFERP (key)) { - EMACS_TIME initial_idleness_start_time; - EMACS_SET_SECS_USECS (initial_idleness_start_time, - EMACS_SECS (timer_last_idleness_start_time), - EMACS_USECS (timer_last_idleness_start_time)); - - /* Resume idle state, using the same start-time as before. */ - timer_start_idle (); - timer_idleness_start_time = initial_idleness_start_time; + timer_resume_idle (); mock_input = t; /* Reset the current buffer from the selected window From 6db372644954f222879658b242f3eb35dc11a514 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 9 Oct 2004 23:25:00 +0000 Subject: [PATCH 095/166] (timer_start_idle, timer_stop_idle): Remove prototypes. --- src/keyboard.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/keyboard.h b/src/keyboard.h index 4e14257359f..08cb934d3fe 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -326,8 +326,6 @@ extern void swallow_events P_ ((int)); extern int help_char_p P_ ((Lisp_Object)); extern void quit_throw_to_read_char P_ ((void)) NO_RETURN; extern void cmd_error_internal P_ ((Lisp_Object, char *)); -extern void timer_start_idle P_ ((void)); -extern void timer_stop_idle P_ ((void)); extern int lucid_event_type_list_p P_ ((Lisp_Object)); extern void kbd_buffer_store_event P_ ((struct input_event *)); extern void kbd_buffer_store_event_hold P_ ((struct input_event *, From 6fa0c1a1d92d9de9b4ae16aff4875b709216f06a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 10 Oct 2004 01:12:19 +0000 Subject: [PATCH 096/166] sc-preferred-attribution-alist -> sc-preferred-attribution-list --- man/sc.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/sc.texi b/man/sc.texi index 5e911e2df72..11ae3d139ce 100644 --- a/man/sc.texi +++ b/man/sc.texi @@ -1565,7 +1565,7 @@ incorrectly. @vindex sc-use-only-preference-p @vindex use-only-preference-p (sc-) Also, if the preferred attribution, which you specified in your -@code{sc-preferred-attribution-alist} variable cannot be found, a +@code{sc-preferred-attribution-list} variable cannot be found, a secondary method can be employed to find a valid attribution string. The variable @code{sc-use-only-preference-p} controls what happens in this case. If the variable's value is non-@code{nil}, then From fdbc4dea48258bbb7b5d38877fbeaf911deea454 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 10 Oct 2004 01:17:27 +0000 Subject: [PATCH 097/166] (Top, Marking Articles): Join two menus in one node because a node can have only one menu. --- man/ChangeLog | 5 +++++ man/gnus.texi | 26 ++++++++++---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 2a31de4ba34..c996722b444 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2004-10-10 Juri Linkov + + * gnus.texi (Top, Marking Articles): Join two menus in one node + because a node can have only one menu. + 2004-10-09 Luc Teirlinck * files.texi (Misc File Ops): View mode is a minor mode. diff --git a/man/gnus.texi b/man/gnus.texi index 576877cb861..a62e9bcf149 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -535,12 +535,9 @@ Marking Articles * Unread Articles:: Marks for unread articles. * Read Articles:: Marks for read articles. * Other Marks:: Marks that do not affect readedness. - -Marking Articles - -* Setting Marks:: How to set and remove marks. -* Generic Marking Commands:: How to customize the marking. -* Setting Process Marks:: How to mark articles for later processing. +* Setting Marks:: How to set and remove marks. +* Generic Marking Commands:: How to customize the marking. +* Setting Process Marks:: How to mark articles for later processing. Threading @@ -5686,20 +5683,17 @@ neologism ohoy!) of the article. Alphabetic marks generally mean In addition, you also have marks that do not affect readedness. +@ifinfo +There's a plethora of commands for manipulating these marks. +@end ifinfo + @menu * Unread Articles:: Marks for unread articles. * Read Articles:: Marks for read articles. * Other Marks:: Marks that do not affect readedness. -@end menu - -@ifinfo -There's a plethora of commands for manipulating these marks: -@end ifinfo - -@menu -* Setting Marks:: How to set and remove marks. -* Generic Marking Commands:: How to customize the marking. -* Setting Process Marks:: How to mark articles for later processing. +* Setting Marks:: How to set and remove marks. +* Generic Marking Commands:: How to customize the marking. +* Setting Process Marks:: How to mark articles for later processing. @end menu From 1f4cc034320bca5b4a8e6e69da8553ba33d36a8d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Oct 2004 01:51:34 +0000 Subject: [PATCH 098/166] (tex-font-lock-append-prop): New fun. (tex-font-lock-keywords-2): Use it. (tex-font-lock-syntactic-keywords): Fix the `verbatim' treatment. --- lisp/textmodes/tex-mode.el | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 2a9059e2f56..ddcaaa0bf4f 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -500,6 +500,11 @@ An alternative value is \" . \", if you use a font with a narrow period." 1 font-lock-function-name-face)))) "Subdued expressions to highlight in TeX modes.") +(defun tex-font-lock-append-prop (prop) + (unless (memq (get-text-property (match-end 1) 'face) + '(font-lock-comment-face tex-verbatim-face)) + prop)) + (defconst tex-font-lock-keywords-2 (append tex-font-lock-keywords-1 (eval-when-compile @@ -553,16 +558,19 @@ An alternative value is \" . \", if you use a font with a narrow period." ;; ;; Font environments. It seems a bit dubious to use `bold' etc. faces ;; since we might not be able to display those fonts. - (list (concat slash bold " *" arg) 2 '(quote bold) 'append) - (list (concat slash italic " *" arg) 2 '(quote italic) 'append) + (list (concat slash bold " *" arg) 2 + '(tex-font-lock-append-prop 'bold) 'append) + (list (concat slash italic " *" arg) 2 + '(tex-font-lock-append-prop 'italic) 'append) ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append) ;; ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables. (list (concat "\\\\\\(em\\|it\\|sl\\)\\>" args) - 2 '(quote italic) 'append) + 2 '(tex-font-lock-append-prop 'italic) 'append) ;; This is separate from the previous one because of cases like ;; {\em foo {\bf bar} bla} where both match. - (list (concat "\\\\bf\\>" args) 1 '(quote bold) 'append))))) + (list (concat "\\\\\\(bf\\)\\>" args) + 2 '(tex-font-lock-append-prop 'bold) 'append))))) "Gaudy expressions to highlight in TeX modes.") (defun tex-font-lock-suscript (pos) @@ -604,11 +612,14 @@ An alternative value is \" . \", if you use a font with a narrow period." (defvar tex-font-lock-syntactic-keywords (let ((verbs (regexp-opt tex-verbatim-environments t))) `((,(concat "^\\\\begin *{" verbs "}.*\\(\n\\)") 2 "|") - (,(concat "^\\\\end *{" verbs "}\\(.?\\)") 2 - (unless (<= (match-beginning 0) (point-min)) - (put-text-property (1- (match-beginning 0)) (match-beginning 0) - 'syntax-table (string-to-syntax "|")) - "<")) + ;; Technically, we'd like to put the "|" property on the \n preceding + ;; the \end, but this would have 2 disadvantages: + ;; 1 - it's wrong if the verbatim env is empty (the same \n is used to + ;; start and end the fenced-string). + ;; 2 - font-lock considers the preceding \n as being part of the + ;; preceding line, so things gets screwed every time the previous + ;; line is re-font-locked on its own. + (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") ("\\\\verb\\**\\([^a-z@*]\\)" 1 "\"")))) From 6b7f34912cd54750971e410dd596fb8b4df7953c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Oct 2004 01:54:12 +0000 Subject: [PATCH 099/166] (font-lock-apply-highlight): Explicitly check the case where the face expression evals to nil. --- lisp/font-lock.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 052e92391af..56a4005a41c 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1324,6 +1324,12 @@ HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'." (add-text-properties start end (cddr val)) (setq val (cadr val))) (cond + ((not val) + ;; If `val' is nil, don't do anything. It is important to do it + ;; explicitly, because when adding nil via things like + ;; font-lock-append-text-property, the property is actually + ;; changed from to () which is undesirable. --Stef + nil) ((not override) ;; Cannot override existing fontification. (or (text-property-not-all start end 'face nil) From bfbc9ea9e083a9d8f72d00595f92e1074c14e86f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Oct 2004 03:17:52 +0000 Subject: [PATCH 100/166] (imenu--completion-buffer): Don't return t for rescan. (imenu-choose-buffer-index): Check here for rescan instead. --- lisp/imenu.el | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/lisp/imenu.el b/lisp/imenu.el index 1c82fcacf34..6859c0c74c7 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -317,9 +317,12 @@ The function in this variable is called when selecting a normal index-item.") ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Return the current/previous sexp and the location of the sexp (its -;; beginning) without moving the point. +;; FIXME: This is the only imenu-example-* definition that's actually used, +;; and it seems to only be used by cperl-mode.el. We should just move it to +;; cperl-mode.el and remove the rest. (defun imenu-example--name-and-position () + "Return the current/previous sexp and its (beginning) location. +Don't move point." (save-excursion (forward-sexp -1) ;; [ydi] modified for imenu-use-markers @@ -549,12 +552,10 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") (cond ((consp (cdr item)) (imenu--truncate-items (cdr item))) - (t - ;; truncate if necessary - (if (and (numberp imenu-max-item-length) - (> (length (car item)) imenu-max-item-length)) - (setcar item (substring (car item) 0 - imenu-max-item-length))))))) + ;; truncate if necessary + ((and (numberp imenu-max-item-length) + (> (length (car item)) imenu-max-item-length)) + (setcar item (substring (car item) 0 imenu-max-item-length)))))) menulist)) @@ -854,7 +855,7 @@ depending on PATTERNS." (defun imenu--completion-buffer (index-alist &optional prompt) "Let the user select from INDEX-ALIST in a completion buffer with PROMPT. -Returns t for rescan and otherwise a position number." +Return one of the entries in index-alist or nil." ;; Create a list for this buffer only when needed. (let ((name (thing-at-point 'symbol)) choice @@ -880,13 +881,11 @@ Returns t for rescan and otherwise a position number." prepared-index-alist nil t nil 'imenu--history-list name))) - (cond ((not (stringp name)) nil) - ((string= name (car imenu--rescan-item)) t) - (t - (setq choice (assoc name prepared-index-alist)) - (if (imenu--subalist-p choice) - (imenu--completion-buffer (cdr choice) prompt) - choice))))) + (when (stringp name) + (setq choice (assoc name prepared-index-alist)) + (if (imenu--subalist-p choice) + (imenu--completion-buffer (cdr choice) prompt) + choice)))) (defun imenu--mouse-menu (index-alist event &optional title) "Let the user select from a buffer index from a mouse menu. @@ -937,9 +936,9 @@ The returned value is of the form (INDEX-NAME . INDEX-POSITION)." (or (eq imenu-use-popup-menu t) mouse-triggered)) (imenu--mouse-menu index-alist last-nonmenu-event) (imenu--completion-buffer index-alist prompt))) - (and (eq result t) + (and (equal result imenu--rescan-item) (imenu--cleanup) - (setq imenu--index-alist nil))) + (setq result t imenu--index-alist nil))) result)) ;;;###autoload @@ -1014,7 +1013,7 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook." nil)) (defun imenu-default-goto-function (name position &optional rest) - "Move the point to the given position. + "Move to the given position. NAME is ignored. POSITION is where to move. REST is also ignored. The ignored args just make this function have the same interface as a @@ -1054,5 +1053,5 @@ for more information." (provide 'imenu) -;;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 +;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 ;;; imenu.el ends here From 4f8150654e0b719e33bb809eb10a2c2c6fac3abe Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Oct 2004 04:08:43 +0000 Subject: [PATCH 101/166] (diff-current-defun): Fix 2004-06-13's change. --- lisp/diff-mode.el | 49 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 0a7f1a1950a..c945a6a7221 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1,6 +1,7 @@ ;;; diff-mode.el --- a mode for viewing/editing context diffs -;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: convenience patch diff @@ -171,75 +172,73 @@ when editing big diffs)." (defface diff-header-face '((((class color) (min-colors 88) (background light)) - (:background "grey85")) + :background "grey85") (((class color) (min-colors 88) (background dark)) - (:background "grey45")) + :background "grey45") (((class color) (background light)) - (:foreground "blue1" :weight bold)) + :foreground "blue1" :weight bold) (((class color) (background dark)) - (:foreground "green" :weight bold)) - (t (:weight bold))) + :foreground "green" :weight bold) + (t :weight bold)) "`diff-mode' face inherited by hunk and index header faces.") (defvar diff-header-face 'diff-header-face) (defface diff-file-header-face '((((class color) (min-colors 88) (background light)) - (:background "grey70" :weight bold)) + :background "grey70" :weight bold) (((class color) (min-colors 88) (background dark)) - (:background "grey60" :weight bold)) + :background "grey60" :weight bold) (((class color) (background light)) - (:foreground "yellow" :weight bold)) + :foreground "yellow" :weight bold) (((class color) (background dark)) - (:foreground "cyan" :weight bold)) - (t (:weight bold))) ; :height 1.3 + :foreground "cyan" :weight bold) + (t :weight bold)) ; :height 1.3 "`diff-mode' face used to highlight file header lines.") (defvar diff-file-header-face 'diff-file-header-face) (defface diff-index-face - '((t (:inherit diff-file-header-face))) + '((t :inherit diff-file-header-face)) "`diff-mode' face used to highlight index header lines.") (defvar diff-index-face 'diff-index-face) (defface diff-hunk-header-face - '((t (:inherit diff-header-face))) + '((t :inherit diff-header-face)) "`diff-mode' face used to highlight hunk header lines.") (defvar diff-hunk-header-face 'diff-hunk-header-face) (defface diff-removed-face - '((t (:inherit diff-changed-face))) + '((t :inherit diff-changed-face)) "`diff-mode' face used to highlight removed lines.") (defvar diff-removed-face 'diff-removed-face) (defface diff-added-face - '((t (:inherit diff-changed-face))) + '((t :inherit diff-changed-face)) "`diff-mode' face used to highlight added lines.") (defvar diff-added-face 'diff-added-face) (defface diff-changed-face '((((type tty pc) (class color) (background light)) - (:foreground "magenta" :weight bold :slant italic)) + :foreground "magenta" :weight bold :slant italic) (((type tty pc) (class color) (background dark)) - (:foreground "yellow" :weight bold :slant italic)) - (t ())) + :foreground "yellow" :weight bold :slant italic)) "`diff-mode' face used to highlight changed lines.") (defvar diff-changed-face 'diff-changed-face) (defface diff-function-face - '((t (:inherit diff-context-face))) + '((t :inherit diff-context-face)) "`diff-mode' face used to highlight function names produced by \"diff -p\".") (defvar diff-function-face 'diff-function-face) (defface diff-context-face '((((class color) (background light)) - (:foreground "grey50")) + :foreground "grey50") (((class color) (background dark)) - (:foreground "grey70")) - (t )) + :foreground "grey70")) "`diff-mode' face used to highlight context and other side-information.") (defvar diff-context-face 'diff-context-face) (defface diff-nonexistent-face - '((t (:inherit diff-file-header-face))) + '((t :inherit diff-file-header-face)) "`diff-mode' face used to highlight nonexistent files in recursive diffs.") (defvar diff-nonexistent-face 'diff-nonexistent-face) @@ -1255,7 +1254,7 @@ For use in `add-log-current-defun-function'." (save-excursion (when (looking-at diff-hunk-header-re) (forward-line 1) - (while (and (looking-at " ") (not (zerop (forward-line 1)))))) + (re-search-forward "^[^ ]" nil t)) (destructuring-bind (buf line-offset pos src dst &optional switched) (diff-find-source-location) (beginning-of-line) @@ -1355,5 +1354,5 @@ For use in `add-log-current-defun-function'." ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. ;; -;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 +;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 ;;; diff-mode.el ends here From 72fcca06da625a5e23415e1c0dbad488e58ca348 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Oct 2004 04:29:21 +0000 Subject: [PATCH 102/166] (comint-mouse-insert-input): Remove. (comint-insert-input): Make it work for mouse bindings. (comint-mode-map): Move defs into the declaration. --- lisp/comint.el | 255 +++++++++++++++++++++++-------------------------- 1 file changed, 119 insertions(+), 136 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index 8b5a107c7d7..f5c53687fa9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1,7 +1,7 @@ ;;; comint.el --- general command interpreter in a window stuff -;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,03,2004 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Olin Shivers ;; Simon Marshall @@ -185,10 +185,10 @@ the remaining prompts will be accidentally messed up. You may wish to put something like the following in your `.emacs' file: \(add-hook 'comint-mode-hook - '(lambda () - (define-key comint-mode-map \"\C-w\" 'comint-kill-region) - (define-key comint-mode-map [C-S-backspace] - 'comint-kill-whole-line))) + (lambda () + (define-key comint-mode-map \"\C-w\" 'comint-kill-region) + (define-key comint-mode-map [C-S-backspace] + 'comint-kill-whole-line))) If you sometimes use comint-mode on text-only terminals or with `emacs-nw', you might wish to use another binding for `comint-kill-whole-line'." @@ -369,11 +369,8 @@ Takes one argument, the input. If non-nil, the input may be saved on the input history list. Default is to save anything that isn't all whitespace.") (defvar comint-input-filter-functions '() - "Functions to call before input is sent to the process. -These functions get one argument, a string containing the text to send. - -You can use `add-hook' to add functions to this list -either globally or locally.") + "Special hook run before input is sent to the process. +These functions get one argument, a string containing the text to send.") (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom) "Functions to call after output is inserted into the buffer. @@ -411,7 +408,7 @@ See `comint-send-input'." (defcustom comint-use-prompt-regexp-instead-of-fields nil "*If non-nil, use `comint-prompt-regexp' to distinguish prompts from user-input. If nil, then program output and user-input are given different `field' -properties, which emacs commands can use to distinguish them (in +properties, which Emacs commands can use to distinguish them (in particular, common movement commands such as begining-of-line respect field boundaries in a natural way)." :type 'boolean @@ -432,7 +429,106 @@ executed once when the buffer is created." :type 'hook :group 'comint) -(defvar comint-mode-map nil) +(defvar comint-mode-map + (let ((map (make-sparse-keymap))) + ;; Keys: + (define-key map "\ep" 'comint-previous-input) + (define-key map "\en" 'comint-next-input) + (define-key map [C-up] 'comint-previous-input) + (define-key map [C-down] 'comint-next-input) + (define-key map "\er" 'comint-previous-matching-input) + (define-key map "\es" 'comint-next-matching-input) + (define-key map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input) + (define-key map [?\C-c ?\M-s] 'comint-next-matching-input-from-input) + (define-key map "\e\C-l" 'comint-show-output) + (define-key map "\C-m" 'comint-send-input) + (define-key map "\C-d" 'comint-delchar-or-maybe-eof) + (define-key map "\C-c " 'comint-accumulate) + (define-key map "\C-c\C-x" 'comint-get-next-from-history) + (define-key map "\C-c\C-a" 'comint-bol-or-process-mark) + (define-key map "\C-c\C-u" 'comint-kill-input) + (define-key map "\C-c\C-w" 'backward-kill-word) + (define-key map "\C-c\C-c" 'comint-interrupt-subjob) + (define-key map "\C-c\C-z" 'comint-stop-subjob) + (define-key map "\C-c\C-\\" 'comint-quit-subjob) + (define-key map "\C-c\C-m" 'comint-insert-input) + (define-key map "\C-c\C-o" 'comint-delete-output) + (define-key map "\C-c\C-r" 'comint-show-output) + (define-key map "\C-c\C-e" 'comint-show-maximum-output) + (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) + (define-key map "\C-c\C-n" 'comint-next-prompt) + (define-key map "\C-c\C-p" 'comint-previous-prompt) + (define-key map "\C-c\C-d" 'comint-send-eof) + (define-key map "\C-c\C-s" 'comint-write-output) + (define-key map "\C-c." 'comint-insert-previous-argument) + ;; Mouse Buttons: + (define-key map [mouse-2] 'comint-insert-input) + ;; Menu bars: + ;; completion: + (define-key map [menu-bar completion] + (cons "Complete" (make-sparse-keymap "Complete"))) + (define-key map [menu-bar completion complete-expand] + '("Expand File Name" . comint-replace-by-expanded-filename)) + (define-key map [menu-bar completion complete-listing] + '("File Completion Listing" . comint-dynamic-list-filename-completions)) + (define-key map [menu-bar completion complete-file] + '("Complete File Name" . comint-dynamic-complete-filename)) + (define-key map [menu-bar completion complete] + '("Complete Before Point" . comint-dynamic-complete)) + ;; Input history: + (define-key map [menu-bar inout] + (cons "In/Out" (make-sparse-keymap "In/Out"))) + (define-key map [menu-bar inout delete-output] + '("Delete Current Output Group" . comint-delete-output)) + (define-key map [menu-bar inout append-output-to-file] + '("Append Current Output Group to File" . comint-append-output-to-file)) + (define-key map [menu-bar inout write-output] + '("Write Current Output Group to File" . comint-write-output)) + (define-key map [menu-bar inout next-prompt] + '("Forward Output Group" . comint-next-prompt)) + (define-key map [menu-bar inout previous-prompt] + '("Backward Output Group" . comint-previous-prompt)) + (define-key map [menu-bar inout show-maximum-output] + '("Show Maximum Output" . comint-show-maximum-output)) + (define-key map [menu-bar inout show-output] + '("Show Current Output Group" . comint-show-output)) + (define-key map [menu-bar inout kill-input] + '("Kill Current Input" . comint-kill-input)) + (define-key map [menu-bar inout copy-input] + '("Copy Old Input" . comint-insert-input)) + (define-key map [menu-bar inout forward-matching-history] + '("Forward Matching Input..." . comint-forward-matching-input)) + (define-key map [menu-bar inout backward-matching-history] + '("Backward Matching Input..." . comint-backward-matching-input)) + (define-key map [menu-bar inout next-matching-history] + '("Next Matching Input..." . comint-next-matching-input)) + (define-key map [menu-bar inout previous-matching-history] + '("Previous Matching Input..." . comint-previous-matching-input)) + (define-key map [menu-bar inout next-matching-history-from-input] + '("Next Matching Current Input" . comint-next-matching-input-from-input)) + (define-key map [menu-bar inout previous-matching-history-from-input] + '("Previous Matching Current Input" . comint-previous-matching-input-from-input)) + (define-key map [menu-bar inout next-history] + '("Next Input" . comint-next-input)) + (define-key map [menu-bar inout previous-history] + '("Previous Input" . comint-previous-input)) + (define-key map [menu-bar inout list-history] + '("List Input History" . comint-dynamic-list-input-ring)) + (define-key map [menu-bar inout expand-history] + '("Expand History Before Point" . comint-replace-by-expanded-history)) + ;; Signals + (let ((signals-map (make-sparse-keymap "Signals"))) + (define-key map [menu-bar signals] (cons "Signals" signals-map)) + (define-key signals-map [eof] '("EOF" . comint-send-eof)) + (define-key signals-map [kill] '("KILL" . comint-kill-subjob)) + (define-key signals-map [quit] '("QUIT" . comint-quit-subjob)) + (define-key signals-map [cont] '("CONT" . comint-continue-subjob)) + (define-key signals-map [stop] '("STOP" . comint-stop-subjob)) + (define-key signals-map [break] '("BREAK" . comint-interrupt-subjob))) + ;; Put them in the menu bar: + (setq menu-bar-final-items (append '(completion inout signals) + menu-bar-final-items)) + map)) ;; Fixme: Is this still relevant? (defvar comint-ptyp t @@ -548,114 +644,6 @@ Entry to this mode runs the hooks on `comint-mode-hook'." ;; This behavior is not useful in comint buffers, and is annoying (set (make-local-variable 'next-line-add-newlines) nil)) -(if comint-mode-map - nil - ;; Keys: - (setq comint-mode-map (make-sparse-keymap)) - (define-key comint-mode-map "\ep" 'comint-previous-input) - (define-key comint-mode-map "\en" 'comint-next-input) - (define-key comint-mode-map [C-up] 'comint-previous-input) - (define-key comint-mode-map [C-down] 'comint-next-input) - (define-key comint-mode-map "\er" 'comint-previous-matching-input) - (define-key comint-mode-map "\es" 'comint-next-matching-input) - (define-key comint-mode-map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input) - (define-key comint-mode-map [?\C-c ?\M-s] 'comint-next-matching-input-from-input) - (define-key comint-mode-map "\e\C-l" 'comint-show-output) - (define-key comint-mode-map "\C-m" 'comint-send-input) - (define-key comint-mode-map "\C-d" 'comint-delchar-or-maybe-eof) - (define-key comint-mode-map "\C-c " 'comint-accumulate) - (define-key comint-mode-map "\C-c\C-x" 'comint-get-next-from-history) - (define-key comint-mode-map "\C-c\C-a" 'comint-bol-or-process-mark) - (define-key comint-mode-map "\C-c\C-u" 'comint-kill-input) - (define-key comint-mode-map "\C-c\C-w" 'backward-kill-word) - (define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob) - (define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob) - (define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob) - (define-key comint-mode-map "\C-c\C-m" 'comint-insert-input) - (define-key comint-mode-map "\C-c\C-o" 'comint-delete-output) - (define-key comint-mode-map "\C-c\C-r" 'comint-show-output) - (define-key comint-mode-map "\C-c\C-e" 'comint-show-maximum-output) - (define-key comint-mode-map "\C-c\C-l" 'comint-dynamic-list-input-ring) - (define-key comint-mode-map "\C-c\C-n" 'comint-next-prompt) - (define-key comint-mode-map "\C-c\C-p" 'comint-previous-prompt) - (define-key comint-mode-map "\C-c\C-d" 'comint-send-eof) - (define-key comint-mode-map "\C-c\C-s" 'comint-write-output) - (define-key comint-mode-map "\C-c." 'comint-insert-previous-argument) - ;; Mouse Buttons: - (define-key comint-mode-map [mouse-2] 'comint-mouse-insert-input) - ;; Menu bars: - ;; completion: - (define-key comint-mode-map [menu-bar completion] - (cons "Complete" (make-sparse-keymap "Complete"))) - (define-key comint-mode-map [menu-bar completion complete-expand] - '("Expand File Name" . comint-replace-by-expanded-filename)) - (define-key comint-mode-map [menu-bar completion complete-listing] - '("File Completion Listing" . comint-dynamic-list-filename-completions)) - (define-key comint-mode-map [menu-bar completion complete-file] - '("Complete File Name" . comint-dynamic-complete-filename)) - (define-key comint-mode-map [menu-bar completion complete] - '("Complete Before Point" . comint-dynamic-complete)) - ;; Input history: - (define-key comint-mode-map [menu-bar inout] - (cons "In/Out" (make-sparse-keymap "In/Out"))) - (define-key comint-mode-map [menu-bar inout delete-output] - '("Delete Current Output Group" . comint-delete-output)) - (define-key comint-mode-map [menu-bar inout append-output-to-file] - '("Append Current Output Group to File" . comint-append-output-to-file)) - (define-key comint-mode-map [menu-bar inout write-output] - '("Write Current Output Group to File" . comint-write-output)) - (define-key comint-mode-map [menu-bar inout next-prompt] - '("Forward Output Group" . comint-next-prompt)) - (define-key comint-mode-map [menu-bar inout previous-prompt] - '("Backward Output Group" . comint-previous-prompt)) - (define-key comint-mode-map [menu-bar inout show-maximum-output] - '("Show Maximum Output" . comint-show-maximum-output)) - (define-key comint-mode-map [menu-bar inout show-output] - '("Show Current Output Group" . comint-show-output)) - (define-key comint-mode-map [menu-bar inout kill-input] - '("Kill Current Input" . comint-kill-input)) - (define-key comint-mode-map [menu-bar inout copy-input] - '("Copy Old Input" . comint-insert-input)) - (define-key comint-mode-map [menu-bar inout forward-matching-history] - '("Forward Matching Input..." . comint-forward-matching-input)) - (define-key comint-mode-map [menu-bar inout backward-matching-history] - '("Backward Matching Input..." . comint-backward-matching-input)) - (define-key comint-mode-map [menu-bar inout next-matching-history] - '("Next Matching Input..." . comint-next-matching-input)) - (define-key comint-mode-map [menu-bar inout previous-matching-history] - '("Previous Matching Input..." . comint-previous-matching-input)) - (define-key comint-mode-map [menu-bar inout next-matching-history-from-input] - '("Next Matching Current Input" . comint-next-matching-input-from-input)) - (define-key comint-mode-map [menu-bar inout previous-matching-history-from-input] - '("Previous Matching Current Input" . comint-previous-matching-input-from-input)) - (define-key comint-mode-map [menu-bar inout next-history] - '("Next Input" . comint-next-input)) - (define-key comint-mode-map [menu-bar inout previous-history] - '("Previous Input" . comint-previous-input)) - (define-key comint-mode-map [menu-bar inout list-history] - '("List Input History" . comint-dynamic-list-input-ring)) - (define-key comint-mode-map [menu-bar inout expand-history] - '("Expand History Before Point" . comint-replace-by-expanded-history)) - ;; Signals - (define-key comint-mode-map [menu-bar signals] - (cons "Signals" (make-sparse-keymap "Signals"))) - (define-key comint-mode-map [menu-bar signals eof] - '("EOF" . comint-send-eof)) - (define-key comint-mode-map [menu-bar signals kill] - '("KILL" . comint-kill-subjob)) - (define-key comint-mode-map [menu-bar signals quit] - '("QUIT" . comint-quit-subjob)) - (define-key comint-mode-map [menu-bar signals cont] - '("CONT" . comint-continue-subjob)) - (define-key comint-mode-map [menu-bar signals stop] - '("STOP" . comint-stop-subjob)) - (define-key comint-mode-map [menu-bar signals break] - '("BREAK" . comint-interrupt-subjob)) - ;; Put them in the menu bar: - (setq menu-bar-final-items (append '(completion inout signals) - menu-bar-final-items)) - ) - (defun comint-check-proc (buffer) "Return t if there is a living process associated w/buffer BUFFER. Living means the status is `open', `run', or `stop'. @@ -798,9 +786,10 @@ buffer. The hook `comint-exec-hook' is run after each exec." (set-process-coding-system proc decoding encoding)) proc)) -(defun comint-insert-input () +(defun comint-insert-input (&optional event) "In a Comint buffer, set the current input to the previous input at point." - (interactive) + (interactive (list last-input-event)) + (if event (mouse-set-point event)) (let ((pos (point))) (if (not (eq (get-char-property pos 'field) 'input)) ;; No input at POS, fall back to the global definition. @@ -818,13 +807,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." ;; Insert the input at point (insert (buffer-substring-no-properties (previous-single-char-property-change (1+ pos) 'field) - (next-single-char-property-change pos 'field)))))) - -(defun comint-mouse-insert-input (event) - "In a Comint buffer, set the current input to the previous input you click on." - (interactive "e") - (mouse-set-point event) - (comint-insert-input)) + (next-single-char-property-change pos 'field)))))) ;; Input history processing in a buffer @@ -2136,8 +2119,8 @@ This command also kills the pending input between the process mark and point. WARNING: if there is no current subjob, you can end up suspending -the top-level process running in the buffer. If you accidentally do -this, use \\[comint-continue-subjob] to resume the process. (This +the top-level process running in the buffer. If you accidentally do +this, use \\[comint-continue-subjob] to resume the process. (This is not a problem with most shells, since they ignore this signal.)" (interactive) (comint-skip-input) @@ -2357,9 +2340,9 @@ preceding newline is removed." (defun comint-kill-whole-line (&optional arg) "Kill current line, ignoring read-only and field properties. -With prefix arg, kill that many lines starting from the current line. +With prefix ARG, kill that many lines starting from the current line. If arg is negative, kill backward. Also kill the preceding newline, -instead of the trailing one. \(This is meant to make C-x z work well +instead of the trailing one. \(This is meant to make \\[repeat] work well with negative arguments.) If arg is zero, kill current line but exclude the trailing newline. The read-only status of newlines is updated with `comint-update-fence', @@ -2505,7 +2488,7 @@ Provides a default, if there is one, and returns the result filename. See `comint-source-default' for more on determining defaults. -PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair +PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair from the last source processing command. SOURCE-MODES is a list of major modes used to determine what file buffers contain source files. (These two arguments are used for determining defaults). If MUSTMATCH-P is true, @@ -3503,5 +3486,5 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." (provide 'comint) -;;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164 +;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164 ;;; comint.el ends here From 10fc26633bb7cb094822dcc9d2f62982a6e84fc2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Oct 2004 05:06:47 +0000 Subject: [PATCH 103/166] (comint-output-filter): Typo. --- lisp/comint.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index f5c53687fa9..8b2c779ecd3 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1717,7 +1717,7 @@ Make backspaces delete the previous character." (1- prompt-start) prompt-start 'read-only 'fence)) (add-text-properties prompt-start (point) - '(read-only t rear-non-sticky t front-sticky (read-only)))) + '(read-only t rear-nonsticky t front-sticky (read-only)))) (unless (and (bolp) (null comint-last-prompt-overlay)) ;; Need to create or move the prompt overlay (in the case ;; where there is no prompt ((bolp) == t), we still do From fb34883fdfb24a7fedff2d61db18e876cc601ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 10 Oct 2004 09:23:11 +0000 Subject: [PATCH 104/166] (vc-annotate-mode): Remove variable. (vc-annotate-display-select): Only call vc-annotate-mode if we're not in that mode already. --- lisp/vc.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/vc.el b/lisp/vc.el index 663c45fd466..3f562905280 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -646,9 +646,6 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." :group 'vc) ;; vc-annotate functionality (CVS only). -(defvar vc-annotate-mode nil - "Variable indicating if VC-Annotate mode is active.") - (defvar vc-annotate-mode-map (let ((m (make-sparse-keymap))) (define-key m [menu-bar] (make-sparse-keymap "VC-Annotate")) @@ -3004,7 +3001,7 @@ use; you may override this using the second optional arg MODE." (when buffer (set-buffer buffer) (display-buffer buffer)) - (if (not vc-annotate-mode) ; Turn on vc-annotate-mode if not done + (if (not vc-annotate-parent-ref) (vc-annotate-mode)) (cond ((null vc-annotate-display-mode) (vc-annotate-display-default vc-annotate-ratio)) From fd1cf0a0c32ed37caf8f3d4ae98b769ec833cc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 10 Oct 2004 09:31:46 +0000 Subject: [PATCH 105/166] # --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 881af1a4a74..38184d5435d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-10 Benjamin Rutt + + * vc.el (vc-annotate-mode): Remove variable. + (vc-annotate-display-select): Only call vc-annotate-mode + if we're not in that mode already. + 2004-10-09 Kim F. Storm * subr.el (progress-reporter-update): Define before first usage. From af61a97dd60eb470adcd5ccc0ef91107832dd6b1 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 10 Oct 2004 14:28:19 +0000 Subject: [PATCH 106/166] (byte-optimize-backward-word): Optimize `(backward-word)' to `(forward-word -1)', not `(forward-char -1)'. --- lisp/emacs-lisp/byte-opt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index da8e7583438..e00bebc91d5 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1152,7 +1152,7 @@ of FORM by signalling the error at compile-time." (numberp (nth 1 form))) (list 'forward-word (eval (- (nth 1 form))))) ((= 1 (safe-length form)) - '(forward-char -1)) + '(forward-word -1)) (t form))) (put 'char-before 'byte-optimizer 'byte-optimize-char-before) From af8c54774fa9b48755d28bee1d095e4a7eb83c2f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 10 Oct 2004 14:29:43 +0000 Subject: [PATCH 107/166] . --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38184d5435d..ccc2a8b63d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-10 Andreas Schwab + + * emacs-lisp/byte-opt.el (byte-optimize-backward-word): Optimize + `(backward-word)' to `(forward-word -1)', not `(forward-char -1)'. + Reported by . + 2004-10-10 Benjamin Rutt * vc.el (vc-annotate-mode): Remove variable. From c3f4c690b66558c159f98b9ab5d9164c2fa0bfb7 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 10 Oct 2004 16:56:21 +0000 Subject: [PATCH 108/166] macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow (x_lower_frame): Add BLOCK_INPUT around SendBehind (make_mac_frame): Add BLOCK_INPUT around the making of a terminal frame (mac_initialize): Add BLOCK_INPUT around carbon initialization macgui.h (mktime): Use emacs_mktime macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code. Make a cancel file-open dialog be like C-g. mac.c (mktime): Use emacs_mktime (Fdo_applescript): Add BLOCK_INPUT around do_applescript (Fmac_paste_function): Add better error handling for carbon cut/paste --- src/ChangeLog | 15 +++++++++++++++ src/mac.c | 47 +++++++++++++++++++++++++++++------------------ src/macfns.c | 8 +++----- src/macgui.h | 2 ++ src/macterm.c | 18 ++++++++++++++---- 5 files changed, 63 insertions(+), 27 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f77876b007a..16cf5a216e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2004-10-10 YAMAMOTO Mitsuharu + + * macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow + (x_lower_frame): Add BLOCK_INPUT around SendBehind + (make_mac_frame): Add BLOCK_INPUT around the making of a + terminal frame + (mac_initialize): Add BLOCK_INPUT around carbon initialization + * macgui.h (mktime): Use emacs_mktime + * macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code. + Make a cancel file-open dialog be like C-g. + * mac.c (mktime): Use emacs_mktime + (Fdo_applescript): Add BLOCK_INPUT around do_applescript + (Fmac_paste_function): Add better error handling for carbon + cut/paste + 2004-10-10 Kim F. Storm * keyboard.c (timer_resume_idle): New function to resume idle diff --git a/src/mac.c b/src/mac.c index f7e96b9c146..91d07372578 100644 --- a/src/mac.c +++ b/src/mac.c @@ -47,6 +47,8 @@ Boston, MA 02111-1307, USA. */ #undef realloc #undef init_process #include +#undef mktime +#define mktime emacs_mktime #undef free #define free unexec_free #undef malloc @@ -73,6 +75,7 @@ Boston, MA 02111-1307, USA. */ #include "process.h" #include "sysselect.h" #include "systime.h" +#include "blockinput.h" Lisp_Object QCLIPBOARD; @@ -2548,7 +2551,9 @@ component. */) CHECK_STRING (script); + BLOCK_INPUT; status = do_applescript (SDATA (script), &result); + UNBLOCK_INPUT; if (status) { if (!result) @@ -2618,26 +2623,23 @@ DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0, () { #if TARGET_API_MAC_CARBON + OSStatus err; ScrapRef scrap; ScrapFlavorFlags sff; Size s; int i; char *data; - if (GetCurrentScrap (&scrap) != noErr) - return Qnil; - - if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) != noErr) - return Qnil; - - if (GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s) != noErr) - return Qnil; - - if ((data = (char*) alloca (s)) == NULL) - return Qnil; - - if (GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data) != noErr - || s == 0) + BLOCK_INPUT; + err = GetCurrentScrap (&scrap); + if (err == noErr) + err = GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff); + if (err == noErr) + err = GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s); + if (err == noErr && (data = (char*) alloca (s))) + err = GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data); + UNBLOCK_INPUT; + if (err != noErr || s == 0) return Qnil; /* Emacs expects clipboard contents have Unix-style eol's */ @@ -2702,13 +2704,22 @@ DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0, #if TARGET_API_MAC_CARBON { ScrapRef scrap; + + BLOCK_INPUT; ClearCurrentScrap (); if (GetCurrentScrap (&scrap) != noErr) - error ("cannot get current scrap"); + { + UNBLOCK_INPUT; + error ("cannot get current scrap"); + } if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len, buf) != noErr) - error ("cannot put to scrap"); + { + UNBLOCK_INPUT; + error ("cannot put to scrap"); + } + UNBLOCK_INPUT; } #else /* not TARGET_API_MAC_CARBON */ ZeroScrap (); @@ -2743,9 +2754,11 @@ and t is the same as `SECONDARY'. */) ScrapRef scrap; ScrapFlavorFlags sff; + BLOCK_INPUT; if (GetCurrentScrap (&scrap) == noErr) if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr) val = Qt; + UNBLOCK_INPUT; #else /* not TARGET_API_MAC_CARBON */ Handle my_handle; long rc, scrap_offset; @@ -2770,8 +2783,6 @@ and t is the same as `SECONDARY'. */) extern int inhibit_window_system; extern int noninteractive; -#include "blockinput.h" - /* When Emacs is started from the Finder, SELECT always immediately returns as if input is present when file descriptor 0 is polled for input. Strangely, when Emacs is run as a GUI application from the diff --git a/src/macfns.c b/src/macfns.c index f7594e9c6c2..88f975a65c8 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -4247,6 +4247,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) NavUserAction userAction; CFStringRef message=NULL, client=NULL, saveName = NULL; + BLOCK_INPUT; /* No need for a callback function because we are modal */ NavGetDefaultDialogCreationOptions(&options); options.modality = kWindowModalityAppModal; @@ -4317,9 +4318,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) AEDisposeDesc(&defLocAed); } - BLOCK_INPUT; status = NavDialogRun(dialogRef); - UNBLOCK_INPUT; } if (saveName) CFRelease(saveName); @@ -4332,9 +4331,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) { case kNavUserActionNone: case kNavUserActionCancel: - NavDialogDispose(dialogRef); - Fsignal (Qquit, Qnil); /* Treat cancel like C-g */ - return; + break; /* Treat cancel like C-g */ case kNavUserActionOpen: case kNavUserActionChoose: case kNavUserActionSaveAs: @@ -4369,6 +4366,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) dir, mustmatch, dir, Qfile_name_history, default_filename, Qnil); } + UNBLOCK_INPUT; } UNGCPRO; diff --git a/src/macgui.h b/src/macgui.h index 58081df52b4..e5ea665ac15 100644 --- a/src/macgui.h +++ b/src/macgui.h @@ -42,6 +42,8 @@ typedef unsigned long Time; #undef min #undef init_process #include +#undef mktime +#define mktime emacs_mktime #undef Z #define Z (current_buffer->text->z) #undef free diff --git a/src/macterm.c b/src/macterm.c index a5e1de9be08..3616ac95672 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -5317,7 +5317,11 @@ x_raise_frame (f) struct frame *f; { if (f->async_visible) - SelectWindow (FRAME_MAC_WINDOW (f)); + { + BLOCK_INPUT; + SelectWindow (FRAME_MAC_WINDOW (f)); + UNBLOCK_INPUT; + } } /* Lower frame F. */ @@ -5326,7 +5330,11 @@ x_lower_frame (f) struct frame *f; { if (f->async_visible) - SendBehind (FRAME_MAC_WINDOW (f), nil); + { + BLOCK_INPUT; + SendBehind (FRAME_MAC_WINDOW (f), nil); + UNBLOCK_INPUT; + } } static void @@ -8757,6 +8765,7 @@ make_mac_frame (FRAME_PTR fp) mwp = fp->output_data.mac; + BLOCK_INPUT; if (making_terminal_window) { if (!(mwp->mWP = GetNewCWindow (TERM_WINDOW_RESOURCE, NULL, @@ -8784,9 +8793,8 @@ make_mac_frame (FRAME_PTR fp) /* so that update events can find this mac_output struct */ mwp->mFP = fp; /* point back to emacs frame */ - SetPortWindowPort (mwp->mWP); - SizeWindow (mwp->mWP, FRAME_PIXEL_WIDTH (fp), FRAME_PIXEL_HEIGHT (fp), false); + UNBLOCK_INPUT; } @@ -9209,6 +9217,7 @@ mac_initialize () signal (SIGPIPE, x_connection_signal); #endif + BLOCK_INPUT; mac_initialize_display_info (); #if TARGET_API_MAC_CARBON @@ -9227,6 +9236,7 @@ mac_initialize () if (!inhibit_window_system) MakeMeTheFrontProcess (); #endif + UNBLOCK_INPUT; } From 97e810ff4113f1ef57c321c511ee01de10f10ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20Gro=C3=9Fjohann?= Date: Sun, 10 Oct 2004 19:53:24 +0000 Subject: [PATCH 109/166] (ange-ftp-remote-shell): Remove variable. (ange-ftp-call-chmod): Reference remote-shell-program instead of ange-ftp-remote-shell. --- lisp/ChangeLog | 6 ++++++ lisp/net/ange-ftp.el | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ccc2a8b63d3..267307ed395 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-10 Kai Grossjohann + + * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable. + (ange-ftp-call-chmod): Reference remote-shell-program instead of + ange-ftp-remote-shell. + 2004-10-10 Andreas Schwab * emacs-lisp/byte-opt.el (byte-optimize-backward-word): Optimize diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index c1f3c0a8d52..16a4826b8ae 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4514,9 +4514,6 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") 1)) (apply 'call-process program nil (not discard) nil arguments))) -(defvar ange-ftp-remote-shell "rsh" - "Remote shell to use for chmod, if FTP server rejects the `chmod' command.") - ;; Handle an attempt to run chmod on a remote file ;; by using the ftp chmod command. (defun ange-ftp-call-chmod (args) @@ -4541,7 +4538,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") abbr)))) (or (car result) (call-process - ange-ftp-remote-shell + remote-shell-program nil t nil host dired-chmod-program mode name)))))) rest)) (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. From df41da5eda96abc75512d77cbaf2cdb982b21f0e Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Sun, 10 Oct 2004 20:40:21 +0000 Subject: [PATCH 110/166] Fix copyright notice. --- lisp/url/ChangeLog | 40 ++++++++++++++++++++++++++++++++++++++++ lisp/url/url-auth.el | 1 - lisp/url/url-cache.el | 1 - lisp/url/url-cookie.el | 1 - lisp/url/url-dired.el | 1 - lisp/url/url-file.el | 1 - lisp/url/url-ftp.el | 1 - lisp/url/url-handlers.el | 1 - lisp/url/url-history.el | 1 - lisp/url/url-irc.el | 1 - lisp/url/url-mailto.el | 1 - lisp/url/url-methods.el | 3 +-- lisp/url/url-misc.el | 3 +-- lisp/url/url-news.el | 1 - lisp/url/url-nfs.el | 3 +-- lisp/url/url-parse.el | 3 +-- lisp/url/url-privacy.el | 1 - lisp/url/url-util.el | 3 +-- lisp/url/url-vars.el | 3 +-- lisp/url/url.el | 3 +-- 20 files changed, 47 insertions(+), 26 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 0da4297bb86..c441dc37d7a 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,43 @@ +2004-10-10 Lars Hansen + + * url-auth.el: Fix copyright notice. + + * url-cache.el: Fix copyright notice. + + * url-cookie.el: Fix copyright notice. + + * url-dired.el: Fix copyright notice. + + * url-file.el: Fix copyright notice. + + * url-ftp.el: Fix copyright notice. + + * url-handlers.el: Fix copyright notice. + + * url-history.el: Fix copyright notice. + + * url-irc.el: Fix copyright notice. + + * url-mailto.el: Fix copyright notice. + + * url-methods.el: Fix copyright notice. + + * url-misc.el: Fix copyright notice. + + * url-news.el: Fix copyright notice. + + * url-nfs.el: Fix copyright notice. + + * url-parse.el: Fix copyright notice. + + * url-privacy.el: Fix copyright notice. + + * url-vars.el: Fix copyright notice. + + * url.el: Fix copyright notice. + + * url-util.el: Fix copyright notice. + 2004-10-06 Stefan Monnier * url-handlers.el (url-insert-file-contents): Use the URL to decide the diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 5d9b9ab945c..39bb730bebc 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -2,7 +2,6 @@ ;; Keywords: comm, data, processes, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index d279a88951d..1e3374639e1 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el @@ -2,7 +2,6 @@ ;; Keywords: comm, data, processes, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 997c203069c..9f7db867597 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -1,7 +1,6 @@ ;;; url-cookie.el --- Netscape Cookie support ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. -;; Copyright (c) 1996 by William M. Perry ;; Keywords: comm, data, processes, hypermedia diff --git a/lisp/url/url-dired.el b/lisp/url/url-dired.el index da22ddc9a78..73307412e1e 100644 --- a/lisp/url/url-dired.el +++ b/lisp/url/url-dired.el @@ -2,7 +2,6 @@ ;; Keywords: comm, files ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 77c2e74555f..0aa23acc0ec 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -1,7 +1,6 @@ ;;; url-file.el --- File retrieval code ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry ;; Keywords: comm, data, processes diff --git a/lisp/url/url-ftp.el b/lisp/url/url-ftp.el index 925a6fb5238..4346f3910b1 100644 --- a/lisp/url/url-ftp.el +++ b/lisp/url/url-ftp.el @@ -2,7 +2,6 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 18a2e273637..db961b9c27e 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -1,7 +1,6 @@ ;;; url-handlers.el --- file-name-handler stuff for URL loading ;; Copyright (c) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry ;; Keywords: comm, data, processes, hypermedia diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el index 1d5153ff327..6a2d87cfbc1 100644 --- a/lisp/url/url-history.el +++ b/lisp/url/url-history.el @@ -1,7 +1,6 @@ ;;; url-history.el --- Global history tracking for URL package ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry ;; Keywords: comm, data, processes, hypermedia diff --git a/lisp/url/url-irc.el b/lisp/url/url-irc.el index 6b62761d97a..a4b195f253f 100644 --- a/lisp/url/url-irc.el +++ b/lisp/url/url-irc.el @@ -2,7 +2,6 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index c2b35051c31..bcb6bad4179 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el @@ -1,7 +1,6 @@ ;;; url-mail.el --- Mail Uniform Resource Locator retrieval code ;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry ;; Keywords: comm, data, processes diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index 49329264e63..75d746f3e3f 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -1,7 +1,6 @@ ;;; url-methods.el --- Load URL schemes as needed -;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry +;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el index f6962f4fdee..ff2f1282137 100644 --- a/lisp/url/url-misc.el +++ b/lisp/url/url-misc.el @@ -2,8 +2,7 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry -;;; Copyright (c) 1996, 97, 98, 99, 2002 Free Software Foundation, Inc. +;;; Copyright (c) 1996,1997,1998,1999,2002 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. ;;; diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el index c56fe83e77e..a426f09b1ca 100644 --- a/lisp/url/url-news.el +++ b/lisp/url/url-news.el @@ -2,7 +2,6 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el index d068341b1c2..3b834bba75f 100644 --- a/lisp/url/url-nfs.el +++ b/lisp/url/url-nfs.el @@ -1,7 +1,6 @@ ;;; url-nfs.el --- NFS URL interface -;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. -;; Copyright (c) 1996 by William M. Perry +;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc. ;; Keywords: comm, data, processes diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index 9a2a45e9710..97348ab5db2 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el @@ -1,7 +1,6 @@ ;;; url-parse.el --- Uniform Resource Locator parser -;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry +;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc. ;; Keywords: comm, data, processes diff --git a/lisp/url/url-privacy.el b/lisp/url/url-privacy.el index 9fcfe8f04a3..cb64cfbd4fc 100644 --- a/lisp/url/url-privacy.el +++ b/lisp/url/url-privacy.el @@ -2,7 +2,6 @@ ;; Keywords: comm, data, processes, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index d4a3733eab5..5d1f73e0d5d 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -1,7 +1,6 @@ ;;; url-util.el --- Miscellaneous helper routines for URL library -;; Copyright (c) 1996,97,98,99,2001,2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry +;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. ;; Author: Bill Perry ;; Keywords: comm, data, processes diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 68076e7d3db..4328c34b6fa 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -2,8 +2,7 @@ ;; Keywords: comm, data, processes, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993 - 1996 by William M. Perry -;;; Copyright (c) 1996, 97, 98, 99, 2001 Free Software Foundation, Inc. +;;; Copyright (c) 1996,1997,1998,1999,2001 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. ;;; diff --git a/lisp/url/url.el b/lisp/url/url.el index 1f8f3c930ff..f7b1b717681 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -1,7 +1,6 @@ ;;; url.el --- Uniform Resource Locator retrieval tool -;; Copyright (c) 1996,97,98,99,2001,2004 Free Software Foundation, Inc. -;; Copyright (c) 1993 - 1996 by William M. Perry +;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. ;; Author: Bill Perry ;; Keywords: comm, data, processes, hypermedia From 9d3c486a7ef07f9e2ef394623f9df3e7067db232 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 11 Oct 2004 03:25:09 +0000 Subject: [PATCH 111/166] Added `calc-info-goto-node' to autoloads. --- lisp/calc/calc.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 5c7e24ed646..c17449a8450 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -942,7 +942,8 @@ If nil, selections displayed but ignored.") calcDigit-algebraic calcDigit-edit) ("calc-misc" another-calc calc-big-or-small calc-dispatch-help - calc-help calc-info calc-info-summary calc-inv calc-last-args-stub + calc-help calc-info calc-info-goto-node calc-info-summary calc-inv + calc-last-args-stub calc-missing-key calc-mod calc-other-window calc-over calc-percent calc-pop-above calc-power calc-roll-down calc-roll-up calc-shift-Y-prefix-help calc-tutorial calcDigit-letter From 65ce291b9c10b634e82552c0bd53d87283665b39 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 11 Oct 2004 03:27:24 +0000 Subject: [PATCH 112/166] (calc-info-goto-node): New function. (calc-tutorial, calc-info-summary): Go to appropriate Calc info node in one step. --- lisp/calc/calc-misc.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 772b39ffed4..c01d37e6848 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -160,21 +160,25 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)." (select-window (get-largest-window)) (info "Calc")) +(defun calc-info-goto-node (node) + "Go to a node in the Calculator info documentation." + (interactive) + (select-window (get-largest-window)) + (Info-goto-node (concat "(Calc)" node))) + (defun calc-tutorial () "Run the Emacs Info system on the Calculator Tutorial." (interactive) (if (get-buffer-window "*Calculator*") (calc-quit)) - (calc-info) - (Info-goto-node "Interactive Tutorial") + (calc-info-goto-node "Interactive Tutorial") (calc-other-window) (message "Welcome to the Calc Tutorial!")) (defun calc-info-summary () "Run the Emacs Info system on the Calculator Summary." (interactive) - (calc-info) - (Info-goto-node "Summary")) + (calc-info-goto-node "Summary")) (defun calc-help () (interactive) From 749dadb57d149fc5ca708e404e8d806ee25dddb6 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 11 Oct 2004 03:29:45 +0000 Subject: [PATCH 113/166] (calc-describe-copying, calc-describe-distribution, calc-describe-thing, calc-describe-no-warranty, calc-describe-key): Go to appropriate info node in one step. --- lisp/calc/calc-help.el | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index e66f50bd40c..32f86d6f750 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -93,18 +93,15 @@ C-w Describe how there is no warranty for Calc." (defun calc-describe-copying () (interactive) - (calc-info) - (Info-goto-node "Copying")) + (calc-info-goto-node "Copying")) (defun calc-describe-distribution () (interactive) - (calc-info) - (Info-goto-node "Reporting Bugs")) + (calc-info-goto-node "Reporting Bugs")) (defun calc-describe-no-warranty () (interactive) - (calc-info) - (Info-goto-node "Copying") + (calc-info-goto-node "Copying") (let ((case-fold-search nil)) (search-forward " NO WARRANTY")) (beginning-of-line) @@ -190,13 +187,13 @@ C-w Describe how there is no warranty for Calc." (message "Reading Calc summary from manual...") (save-window-excursion (save-excursion - (calc-info) - (Info-goto-node "Summary") + (calc-info-goto-node "Summary") (goto-char (point-min)) (forward-line 1) (copy-to-buffer "*Calc Summary*" (point) (point-max)) - (Info-last))) + (if Info-history + (Info-last)))) (setq case-fold-search nil) (re-search-forward "^\\(.*\\)\\[\\.\\. a b") (setq calc-summary-indentation @@ -326,8 +323,7 @@ C-w Describe how there is no warranty for Calc." (defun calc-describe-thing (thing where &optional target not-quoted) (message "Looking for `%s' in %s..." thing where) (let ((savewin (current-window-configuration))) - (calc-info) - (Info-goto-node where) + (calc-info-goto-node where) (or (let ((case-fold-search nil)) (re-search-forward (format "\n\\* +%s: \\(.*\\)\\." (regexp-quote thing)) @@ -338,7 +334,8 @@ C-w Describe how there is no warranty for Calc." nil t) (setq thing (format "%s9" (substring thing 0 -1)))) (progn - (Info-last) + (if Info-history + (Info-last)) (set-window-configuration savewin) (error "Can't find `%s' in %s" thing where))) (let (Info-history) From 29fabd8cee50416f35fee189822f48b9d9ea19de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 11 Oct 2004 10:50:00 +0000 Subject: [PATCH 114/166] * xfns.c (syms_of_xfns): defsubr x-file-dialog for GTK also. --- src/ChangeLog | 4 ++++ src/xfns.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 16cf5a216e1..7ef3c5d9180 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-10-11 Jan Dj,Ad(Brv + + * xfns.c (syms_of_xfns): defsubr x-file-dialog for GTK also. + 2004-10-10 YAMAMOTO Mitsuharu * macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow diff --git a/src/xfns.c b/src/xfns.c index 5ebdeca97d5..de95a59112a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5566,7 +5566,7 @@ Chinese, Japanese, and Korean. */); last_show_tip_args = Qnil; staticpro (&last_show_tip_args); -#ifdef USE_MOTIF +#if defined (USE_MOTIF) || defined (USE_GTK) defsubr (&Sx_file_dialog); #endif } From a5f48305f15e30fd99159b15a551f98ed446c030 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 11 Oct 2004 14:56:50 +0000 Subject: [PATCH 115/166] (font-lock-apply-highlight): Fix last change. --- lisp/font-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 56a4005a41c..83b7516604d 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1324,7 +1324,7 @@ HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'." (add-text-properties start end (cddr val)) (setq val (cadr val))) (cond - ((not val) + ((not (or val (eq override t))) ;; If `val' is nil, don't do anything. It is important to do it ;; explicitly, because when adding nil via things like ;; font-lock-append-text-property, the property is actually From 98337d2babdd7d13e02a5cc66ee2e727b6f42b4e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 11 Oct 2004 14:58:54 +0000 Subject: [PATCH 116/166] (pcl-cvs-load-hook): Remove unused var. --- lisp/pcvs-defs.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 16e2ff82553..cd379afab77 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el @@ -1,7 +1,7 @@ ;;; pcvs-defs.el --- variable definitions for PCL-CVS -;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 03, 2004 -;; Free Software Foundation, Inc. +;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +;; 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs @@ -249,9 +249,6 @@ Output from cvs is placed here for asynchronous commands.") :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge)) (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge)))) -(defvar pcl-cvs-load-hook nil - "Run after loading pcl-cvs.") - (defvar cvs-mode-hook nil "Run after `cvs-mode' was setup.") @@ -510,5 +507,5 @@ message and replace it with a message tell you to change this variable.") ;; (provide 'pcvs-defs) -;;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e +;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e ;;; pcvs-defs.el ends here From e8620cb6ee95b0649794ce977d65d1fb6b5d136a Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 11 Oct 2004 18:42:18 +0000 Subject: [PATCH 117/166] (smtpmail-open-stream): Look for starttls-gnutls-program instead of starttls-program iff starttls-use-gnutls is non-nil. (smtpmail-open-stream): Don't overwrite user settings of starttls-extra-arguments and starttls-extra-args. --- lisp/ChangeLog | 8 ++++++++ lisp/mail/smtpmail.el | 32 +++++++++++++++++++------------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 267307ed395..c050e2cd682 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-10-11 Simon Josefsson + + * mail/smtpmail.el (smtpmail-open-stream): Look for + starttls-gnutls-program instead of starttls-program iff + starttls-use-gnutls is non-nil. + (smtpmail-open-stream): Don't overwrite user settings of + starttls-extra-arguments and starttls-extra-args. + 2004-10-10 Kai Grossjohann * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable. diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 84a61350145..d356979ea26 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -471,26 +471,32 @@ This is relative to `smtpmail-queue-dir'.") (if (null (and cred (condition-case () (progn (require 'starttls) - (call-process starttls-program)) + (call-process (if starttls-use-gnutls + starttls-gnutls-program + starttls-program))) (error nil)))) ;; The normal case. (open-network-stream "SMTP" process-buffer host port) (let* ((cred-key (smtpmail-cred-key cred)) (cred-cert (smtpmail-cred-cert cred)) (starttls-extra-args - (when (and (stringp cred-key) (stringp cred-cert) - (file-regular-p - (setq cred-key (expand-file-name cred-key))) - (file-regular-p - (setq cred-cert (expand-file-name cred-cert)))) - (list "--key-file" cred-key "--cert-file" cred-cert))) + (append + starttls-extra-args + (when (and (stringp cred-key) (stringp cred-cert) + (file-regular-p + (setq cred-key (expand-file-name cred-key))) + (file-regular-p + (setq cred-cert (expand-file-name cred-cert)))) + (list "--key-file" cred-key "--cert-file" cred-cert)))) (starttls-extra-arguments - (when (and (stringp cred-key) (stringp cred-cert) - (file-regular-p - (setq cred-key (expand-file-name cred-key))) - (file-regular-p - (setq cred-cert (expand-file-name cred-cert)))) - (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))) + (append + starttls-extra-arguments + (when (and (stringp cred-key) (stringp cred-cert) + (file-regular-p + (setq cred-key (expand-file-name cred-key))) + (file-regular-p + (setq cred-cert (expand-file-name cred-cert)))) + (list "--x509keyfile" cred-key "--x509certfile" cred-cert))))) (starttls-open-stream "SMTP" process-buffer host port))))) (defun smtpmail-try-auth-methods (process supported-extensions host port) From 5a484642e5f86a02ed8d574f7697579fd68b1ee5 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 11 Oct 2004 22:01:28 +0000 Subject: [PATCH 118/166] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c050e2cd682..1a8e2ebcbe4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-11 Kim F. Storm + + * subr.el (substitute-key-definition): Mention command remapping + in doc string. + 2004-10-11 Simon Josefsson * mail/smtpmail.el (smtpmail-open-stream): Look for From 18c2e7918851db603d60a4d77b2716a49cda624b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 11 Oct 2004 22:02:16 +0000 Subject: [PATCH 119/166] (substitute-key-definition): Mention command remapping in doc string. --- lisp/subr.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 17f8bc81ccc..3c4f870918e 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -383,7 +383,10 @@ but optional second arg NODIGITS non-nil treats them like other chars." "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. In other words, OLDDEF is replaced with NEWDEF where ever it appears. Alternatively, if optional fourth argument OLDMAP is specified, we redefine -in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." +in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP. + +For most uses, it is simpler and safer to use command remappping like this: + \(define-key KEYMAP [remap OLDDEF] NEWDEF)" ;; Don't document PREFIX in the doc string because we don't want to ;; advertise it. It's meant for recursive calls only. Here's its ;; meaning From 52996e8c2f6bce18dd48ac5a23a3c83666951ccc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 11 Oct 2004 22:13:20 +0000 Subject: [PATCH 120/166] (kmacro-insert-counter, kmacro-add-counter): Use and reset kmacro-initial-counter-value if set. (kmacro-set-counter): Only set kmacro-counter if defining or executing macro. Set kmacro-initial-counter-value otherwise. Never set both. (kmacro-display): Show macro counter if non-zero. --- lisp/kmacro.el | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lisp/kmacro.el b/lisp/kmacro.el index b2226d4a895..2b4cbcaf323 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -248,7 +248,9 @@ macro to be executed before appending to it." "Insert macro counter and increment with ARG or 1 if missing. With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)." (interactive "P") - (setq kmacro-initial-counter-value nil) + (if kmacro-initial-counter-value + (setq kmacro-counter kmacro-initial-counter-value + kmacro-initial-counter-value nil)) (if (and arg (listp arg)) (insert (format kmacro-counter-format kmacro-last-counter)) (insert (format kmacro-counter-format kmacro-counter)) @@ -275,23 +277,23 @@ With \\[universal-argument], insert previous kmacro-counter (but do not modify c "Set kmacro-counter to ARG or prompt if missing. With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." (interactive "NMacro counter value: ") - (setq kmacro-last-counter kmacro-counter - kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) - kmacro-counter-value-start - arg)) - ;; setup initial macro counter value if we are not executing a macro. - (setq kmacro-initial-counter-value - (and (not (or defining-kbd-macro executing-kbd-macro)) - kmacro-counter)) - (unless executing-kbd-macro - (kmacro-display-counter))) + (if (not (or defining-kbd-macro executing-kbd-macro)) + (kmacro-display-counter (setq kmacro-initial-counter-value arg)) + (setq kmacro-last-counter kmacro-counter + kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) + kmacro-counter-value-start + arg)) + (unless executing-kbd-macro + (kmacro-display-counter)))) (defun kmacro-add-counter (arg) "Add numeric prefix arg (prompt if missing) to macro counter. With \\[universal-argument], restore previous counter value." (interactive "NAdd to macro counter: ") - (setq kmacro-initial-counter-value nil) + (if kmacro-initial-counter-value + (setq kmacro-counter kmacro-initial-counter-value + kmacro-initial-counter-value nil)) (let ((last kmacro-last-counter)) (setq kmacro-last-counter kmacro-counter kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) @@ -394,7 +396,10 @@ Optional arg EMPTY is message to print if no macros are defined." (m (format-kbd-macro macro)) (l (length m)) (z (and nil trunc (> l x)))) - (message (format "%s: %s%s" (or descr "Macro") + (message (format "%s%s: %s%s" (or descr "Macro") + (if (= kmacro-counter 0) "" + (format " [%s]" + (format kmacro-counter-format-start kmacro-counter))) (if z (substring m 0 (1- x)) m) (if z "..." "")))) (message (or empty "No keyboard macros defined")))) From b583964c159599312e90e47d330dab9330a23dda Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 11 Oct 2004 22:36:16 +0000 Subject: [PATCH 121/166] *** empty log message *** --- lisp/ChangeLog | 8 +++++++- src/ChangeLog | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1a8e2ebcbe4..eb028c98a25 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,10 @@ -2004-10-11 Kim F. Storm +2004-10-12 Kim F. Storm + + * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and + reset kmacro-initial-counter-value if set. + (kmacro-set-counter): Only set kmacro-counter if defining or executing + macro. Set kmacro-initial-counter-value otherwise. Never set both. + (kmacro-display): Show macro counter if non-zero. * subr.el (substitute-key-definition): Mention command remapping in doc string. diff --git a/src/ChangeLog b/src/ChangeLog index 7ef3c5d9180..1a513d0194e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-10-12 Kim F. Storm + + * doc.c (Fsubstitute_command_keys): Ignore remappings unless there + are no ordinary bindings. + 2004-10-11 Jan Dj,Ad(Brv * xfns.c (syms_of_xfns): defsubr x-file-dialog for GTK also. @@ -15,7 +20,7 @@ * mac.c (mktime): Use emacs_mktime (Fdo_applescript): Add BLOCK_INPUT around do_applescript (Fmac_paste_function): Add better error handling for carbon - cut/paste + cut/paste 2004-10-10 Kim F. Storm From 332e51c15c33e5033344932424f4f7af99607ffd Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 11 Oct 2004 22:36:35 +0000 Subject: [PATCH 122/166] (Fsubstitute_command_keys): Ignore remappings unless there are no ordinary bindings. --- src/doc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/doc.c b/src/doc.c index 120d35767b2..e6914d24038 100644 --- a/src/doc.c +++ b/src/doc.c @@ -776,9 +776,13 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int idx = strp - SDATA (string); tem = Fintern (make_string (start, length_byte), Qnil); + /* Ignore remappings unless there are no ordinary bindings. */ + tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qt); + if (NILP (tem)) + tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil); + /* Note the Fwhere_is_internal can GC, so we have to take relocation of string contents into account. */ - tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil); strp = SDATA (string) + idx; start = SDATA (string) + start_idx; From e62e7654ac785834b72bfb8784ff34d203d3190f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 12 Oct 2004 02:25:56 +0000 Subject: [PATCH 123/166] Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-610 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-45 Update from CVS --- lisp/gnus/ChangeLog | 23 ++++++++++ lisp/gnus/gnus-sum.el | 3 ++ lisp/gnus/gnus.el | 1 + lisp/gnus/imap.el | 10 ++-- lisp/gnus/mml.el | 3 +- lisp/gnus/nnheader.el | 10 +++- lisp/gnus/pop3.el | 104 ++++++++++++++++++++++++------------------ 7 files changed, 102 insertions(+), 52 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index f4b77297867..782c2a260a6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,26 @@ +2004-10-10 Reiner Steib + + * gnus-sum.el: Mention that multibyte characters don't work as marks. + + * gnus.el (message-y-or-n-p): Autoload. + + * pop3.el (pop3-maildrop, pop3-mailhost, pop3-port) + (pop3-password-required, pop3-authentication-scheme) + (pop3-leave-mail-on-server): Made customizable. + (pop3): New custom group. + (pop3-retr): Remove `sleep-for' statements. + Suggested by Dave Love . + + * nnheader.el (nnheader-read-timeout): Explain 1.0 timeout for + Windows/DOS. + + * imap.el (imap-parse-flag-list, imap-parse-body-extension) + (imap-parse-body): Fix incorrect use of `assert'. Suggested by + Dave Love . + + * mml.el (mml-minibuffer-read-disposition): Require match. + Suggested by Dave Love . + 2004-10-06 Katsumi Yamaoka * gnus-group.el (gnus-update-group-mark-positions): diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 84de9c4e1ab..6f6f728720b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -428,6 +428,9 @@ this variable specifies group names." (cons :value ("" "") regexp (repeat string)) (sexp :value nil)))) +;; FIXME: Although the custom type is `character' for the following variables, +;; using multibyte characters (Latin-1, UTF-8) doesn't work. -- rs + (defcustom gnus-unread-mark ? ;Whitespace "*Mark used for unread articles." :group 'gnus-summary-marks diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 979ee2a7c24..bff1c3bba2f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -34,6 +34,7 @@ (require 'wid-edit) (require 'mm-util) (require 'nnheader) +(autoload 'message-y-or-n-p "message" nil nil 'macro) (defgroup gnus nil "The coffee-brewing, all singing, all dancing, kitchen sink newsreader." diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index 754473fa8ec..326c998c5d9 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -2421,7 +2421,7 @@ Return nil if no complete line has arrived." (defun imap-parse-flag-list () (let (flag-list start) - (assert (eq (char-after) ?\() t "In imap-parse-flag-list") + (assert (eq (char-after) ?\() nil "In imap-parse-flag-list") (while (and (not (eq (char-after) ?\))) (setq start (progn (imap-forward) @@ -2430,7 +2430,7 @@ Return nil if no complete line has arrived." (point))) (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0)) (push (buffer-substring start (point)) flag-list)) - (assert (eq (char-after) ?\)) t "In imap-parse-flag-list") + (assert (eq (char-after) ?\)) nil "In imap-parse-flag-list") (imap-forward) (nreverse flag-list))) @@ -2515,7 +2515,7 @@ Return nil if no complete line has arrived." (while (eq (char-after) ?\ ) (imap-forward) (push (imap-parse-body-extension) b-e)) - (assert (eq (char-after) ?\)) t "In imap-parse-body-extension") + (assert (eq (char-after) ?\)) nil "In imap-parse-body-extension") (imap-forward) (nreverse b-e)) (or (imap-parse-number) @@ -2641,7 +2641,7 @@ Return nil if no complete line has arrived." (push (and (imap-parse-nil) nil) body)) (setq body (append (imap-parse-body-ext) body))) ;; body-ext-... - (assert (eq (char-after) ?\)) t "In imap-parse-body") + (assert (eq (char-after) ?\)) nil "In imap-parse-body") (imap-forward) (nreverse body)) @@ -2701,7 +2701,7 @@ Return nil if no complete line has arrived." (push (imap-parse-nstring) body) ;; body-fld-md5 (setq body (append (imap-parse-body-ext) body))) ;; body-ext-1part.. - (assert (eq (char-after) ?\)) t "In imap-parse-body 2") + (assert (eq (char-after) ?\)) nil "In imap-parse-body 2") (imap-forward) (nreverse body))))) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index c2c5bbf91e3..2deb69fe36c 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -946,8 +946,7 @@ See Info node `(emacs-mime)Composing'. "attachment"))) (disposition (completing-read "Disposition: " '(("attachment") ("inline") ("")) - nil - nil))) + nil t))) (if (not (equal disposition "")) disposition default))) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 1b6ec636734..7df5ecae205 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -74,7 +74,15 @@ Integer values will in effect be rounded up to the nearest multiple of (defvar nnheader-read-timeout (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin" (symbol-name system-type)) - 1.0 ; why? + ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de + ;; + ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS. + ;; + ;; There should probably be a runtime test to determine the timing + ;; resolution, or a primitive to report it. I don't know off-hand + ;; what's possible. Perhaps better, maybe the Windows/DOS primitive + ;; could round up non-zero timeouts to a minimum of 1.0? + 1.0 0.1) "How long nntp should wait between checking for the end of output. Shorter values mean quicker response, but are more CPU intensive.") diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 567ab24e004..e288f6cace2 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -37,25 +37,56 @@ (require 'mail-utils) -(defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil) - "*POP3 maildrop.") -(defvar pop3-mailhost (or (getenv "MAILHOST") nil) - "*POP3 mailhost.") -(defvar pop3-port 110 - "*POP3 port.") +(defgroup pop3 nil + "Post Office Protocol" + :group 'mail + :group 'mail-source) -(defvar pop3-password-required t - "*Non-nil if a password is required when connecting to POP server.") +(defcustom pop3-maildrop (or (user-login-name) + (getenv "LOGNAME") + (getenv "USER")) + "*POP3 maildrop." + :version "21.4" ;; Oort Gnus + :type 'string + :group 'pop3) + +(defcustom pop3-mailhost (or (getenv "MAILHOST") ;; nil -> mismatch + "pop3") + "*POP3 mailhost." + :version "21.4" ;; Oort Gnus + :type 'string + :group 'pop3) + +(defcustom pop3-port 110 + "*POP3 port." + :version "21.4" ;; Oort Gnus + :type 'number + :group 'pop3) + +(defcustom pop3-password-required t + "*Non-nil if a password is required when connecting to POP server." + :version "21.4" ;; Oort Gnus + :type 'boolean + :group 'pop3) + +;; Should this be customizable? (defvar pop3-password nil "*Password to use when connecting to POP server.") -(defvar pop3-authentication-scheme 'pass +(defcustom pop3-authentication-scheme 'pass "*POP3 authentication scheme. Defaults to 'pass, for the standard USER/PASS authentication. Other valid -values are 'apop.") +values are 'apop." + :version "21.4" ;; Oort Gnus + :type '(choice (const :tag "USER/PASS" pass) + (const :tag "APOP" apop)) + :group 'pop3) -(defvar pop3-leave-mail-on-server nil - "*Non-nil if the mail is to be left on the POP server after fetching.") +(defcustom pop3-leave-mail-on-server nil + "*Non-nil if the mail is to be left on the POP server after fetching." + :version "21.4" ;; Oort Gnus + :type 'boolean + :group 'pop3) (defvar pop3-timestamp nil "Timestamp returned when initially connected to the POP server. @@ -71,8 +102,7 @@ Used for APOP authentication.") (crashbuf (get-buffer-create " *pop3-retr*")) (n 1) message-count - (pop3-password pop3-password) - ) + (pop3-password pop3-password)) ;; for debugging only (if pop3-debug (switch-to-buffer (process-buffer process))) ;; query for password @@ -114,8 +144,7 @@ Used for APOP authentication.") "Return the number of messages in the maildrop." (let* ((process (pop3-open-server pop3-mailhost pop3-port)) message-count - (pop3-password pop3-password) - ) + (pop3-password pop3-password)) ;; for debugging only (if pop3-debug (switch-to-buffer (process-buffer process))) ;; query for password @@ -159,15 +188,14 @@ Returns the process associated with the connection." (insert output))) (defun pop3-send-command (process command) - (set-buffer (process-buffer process)) - (goto-char (point-max)) -;; (if (= (aref command 0) ?P) -;; (insert "PASS \r\n") -;; (insert command "\r\n")) - (setq pop3-read-point (point)) - (goto-char (point-max)) - (process-send-string process (concat command "\r\n")) - ) + (set-buffer (process-buffer process)) + (goto-char (point-max)) + ;; (if (= (aref command 0) ?P) + ;; (insert "PASS \r\n") + ;; (insert command "\r\n")) + (setq pop3-read-point (point)) + (goto-char (point-max)) + (process-send-string process (concat command "\r\n"))) (defun pop3-read-response (process &optional return) "Read the response from the server. @@ -355,27 +383,15 @@ This function currently does nothing.") (while (not (re-search-forward "^\\.\r\n" nil t)) ;; Fixme: Shouldn't depend on nnheader. (nnheader-accept-process-output process) - ;; bill@att.com ... to save wear and tear on the heap - ;; uncommented because the condensed version below is a problem for - ;; some. - (if (> (buffer-size) 20000) (sleep-for 1)) - (if (> (buffer-size) 50000) (sleep-for 1)) - (if (> (buffer-size) 100000) (sleep-for 1)) - (if (> (buffer-size) 200000) (sleep-for 1)) - (if (> (buffer-size) 500000) (sleep-for 1)) - ;; bill@att.com - ;; condensed into: - ;; (sometimes causes problems for really large messages.) -; (if (> (buffer-size) 20000) (sleep-for (/ (buffer-size) 20000))) (goto-char start)) (setq pop3-read-point (point-marker)) -;; this code does not seem to work for some POP servers... -;; and I cannot figure out why not. -; (goto-char (match-beginning 0)) -; (backward-char 2) -; (if (not (looking-at "\r\n")) -; (insert "\r\n")) -; (re-search-forward "\\.\r\n") + ;; this code does not seem to work for some POP servers... + ;; and I cannot figure out why not. + ;; (goto-char (match-beginning 0)) + ;; (backward-char 2) + ;; (if (not (looking-at "\r\n")) + ;; (insert "\r\n")) + ;; (re-search-forward "\\.\r\n") (goto-char (match-beginning 0)) (setq end (point-marker)) (pop3-clean-region start end) From ffce76c02568e51f9ab94a68109f3707cdeccbf8 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 12 Oct 2004 05:24:14 +0000 Subject: [PATCH 124/166] (coding-system-equal): Moved to mule.el. --- lisp/international/mule-util.el | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 1d1fe539116..1700c315187 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -314,19 +314,6 @@ Optional 3rd argument NIL-FOR-TOO-LONG non-nil means return nil "Return the value of CODING-SYSTEM's `translation-table-for-encode' property." (coding-system-get coding-system 'translation-table-for-encode)) -;;;###autoload -(defun coding-system-equal (coding-system-1 coding-system-2) - "Return t if and only if CODING-SYSTEM-1 and CODING-SYSTEM-2 are identical. -Two coding systems are identical if two symbols are equal -or one is an alias of the other." - (or (eq coding-system-1 coding-system-2) - (and (equal (coding-system-spec coding-system-1) - (coding-system-spec coding-system-2)) - (let ((eol-type-1 (coding-system-eol-type coding-system-1)) - (eol-type-2 (coding-system-eol-type coding-system-2))) - (or (eq eol-type-1 eol-type-2) - (and (vectorp eol-type-1) (vectorp eol-type-2))))))) - ;;;###autoload (defmacro detect-coding-with-priority (from to priority-list) "Detect a coding system of the text between FROM and TO with PRIORITY-LIST. From 5e2e859aeefcc823f0ae7c60091b4c09156a2da0 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 12 Oct 2004 05:26:29 +0000 Subject: [PATCH 125/166] (coding-system-equal): Moved from mule-util.el. --- lisp/ChangeLog | 8 ++++++++ lisp/international/mule.el | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb028c98a25..4738fb4812f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-10-12 Kenichi Handa + + * international/mule.el (coding-system-equal): Moved from + mule-util.el. + + * international/mule-util.el (coding-system-equal): Moved to + mule.el. + 2004-10-12 Kim F. Storm * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 8b4ba9b2ce3..840dd67087f 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -535,6 +535,18 @@ coding system whose eol-type is N." (and (not (> (downcase c1) (downcase c2))) (< c1 c2))))))) +(defun coding-system-equal (coding-system-1 coding-system-2) + "Return t if and only if CODING-SYSTEM-1 and CODING-SYSTEM-2 are identical. +Two coding systems are identical if two symbols are equal +or one is an alias of the other." + (or (eq coding-system-1 coding-system-2) + (and (equal (coding-system-spec coding-system-1) + (coding-system-spec coding-system-2)) + (let ((eol-type-1 (coding-system-eol-type coding-system-1)) + (eol-type-2 (coding-system-eol-type coding-system-2))) + (or (eq eol-type-1 eol-type-2) + (and (vectorp eol-type-1) (vectorp eol-type-2))))))) + (defun add-to-coding-system-list (coding-system) "Add CODING-SYSTEM to `coding-system-list' while keeping it sorted." (if (or (null coding-system-list) From 170b174caeef3b0660938c63f6a0373cc7d5b6c3 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 12 Oct 2004 07:37:37 +0000 Subject: [PATCH 126/166] (get_next_display_element): If unibyte_display_via_language_environment is zero, display 8-bit chars in octal in unibyte buffer. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1a513d0194e..1cc8be73541 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-10-12 Kenichi Handa + + * xdisp.c (get_next_display_element): If + unibyte_display_via_language_environment is zero, display 8-bit + chars in octal in unibyte buffer. + 2004-10-12 Kim F. Storm * doc.c (Fsubstitute_command_keys): Ignore remappings unless there diff --git a/src/xdisp.c b/src/xdisp.c index b7a24a4364b..1c479aee4e8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4897,7 +4897,8 @@ get_next_display_element (it) && it->len == 1) || !CHAR_PRINTABLE_P (it->c)) : (it->c >= 127 - && it->c == unibyte_char_to_multibyte (it->c)))) + && (!unibyte_display_via_language_environment + || it->c == unibyte_char_to_multibyte (it->c))))) { /* IT->c is a control character which must be displayed either as '\003' or as `^C' where the '\\' and '^' From 18965008d19ace53d4adea3eec5ea1168a7e3942 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 12 Oct 2004 09:40:45 +0000 Subject: [PATCH 127/166] (tls-certtool-program): New variable. (tls-certificate-information): New function, based on ssl-certificate-information. --- lisp/net/tls.el | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lisp/net/tls.el b/lisp/net/tls.el index d7c8a47a2c0..5f57c084f9b 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -1,6 +1,6 @@ ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS -;; Copyright (C) 2003 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2003, 2004 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: comm, tls, gnutls, ssl @@ -76,6 +76,35 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." :type 'regexp :group 'tls) +(defcustom tls-certtool-program (executable-find "certtool") + "Name of GnuTLS certtool. +Used by `tls-certificate-information'." + :type '(repeat string) + :group 'tls) + +(defun tls-certificate-information (der) + "Parse X.509 certificate in DER format into an assoc list." + (let ((certificate (concat "-----BEGIN CERTIFICATE-----\n" + (base64-encode-string der) + "\n-----END CERTIFICATE-----\n")) + (exit-code 0)) + (with-current-buffer (get-buffer-create " *certtool*") + (erase-buffer) + (insert certificate) + (setq exit-code (condition-case () + (call-process-region (point-min) (point-max) + tls-certtool-program + t (list (current-buffer) nil) t + "--certificate-info") + (error -1))) + (if (/= exit-code 0) + nil + (let ((vals nil)) + (goto-char (point-min)) + (while (re-search-forward "^\\([^:]+\\): \\(.*\\)" nil t) + (push (cons (match-string 1) (match-string 2)) vals)) + (nreverse vals)))))) + (defun open-tls-stream (name buffer host service) "Open a TLS connection for a service to a host. Returns a subprocess-object to represent the connection. From 5bbb0eb9eaf5304206dbbe39c0b35f756cd77482 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 12 Oct 2004 09:55:08 +0000 Subject: [PATCH 128/166] url-vars.el (url-gateway-method): Add new method `tls'. url-news.el (url-snews): Use nntp-open-tls-stream if url-gateway-method is tls. url-ldap.el (url-ldap-certificate-formatter): Use tls-certificate-information if ssl.el is not available. url-https.el (url-https-create-secure-wrapper): Use tls if ssl is not available. url-gw.el (url-open-stream): Support tls url-gateway-method. (url-open-stream): Likewise. --- lisp/url/url-gw.el | 6 +++++- lisp/url/url-https.el | 14 +++++++------- lisp/url/url-ldap.el | 4 +++- lisp/url/url-news.el | 6 ++++-- lisp/url/url-vars.el | 8 +++++--- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 538d607d327..608827d7cee 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -3,7 +3,7 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1997, 1998 Free Software Foundation, Inc. +;;; Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. ;;; @@ -29,6 +29,7 @@ (autoload 'socks-open-network-stream "socks") (autoload 'open-ssl-stream "ssl") +(autoload 'open-tls-stream "tls") (defgroup url-gateway nil "URL gateway variables" @@ -212,6 +213,7 @@ Args per `open-network-stream'. Will not make a connexion if `url-gateway-unplugged' is non-nil." (unless url-gateway-unplugged (let ((gw-method (if (and url-gateway-local-host-regexp + (not (eq 'tls url-gateway-method)) (not (eq 'ssl url-gateway-method)) (string-match url-gateway-local-host-regexp @@ -242,6 +244,8 @@ Will not make a connexion if `url-gateway-unplugged' is non-nil." (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary)) (setq conn (case gw-method + (tls + (open-tls-stream name buffer host service)) (ssl (open-ssl-stream name buffer host service)) ((native) diff --git a/lisp/url/url-https.el b/lisp/url/url-https.el index 11b2593ea80..9631aeb18e4 100644 --- a/lisp/url/url-https.el +++ b/lisp/url/url-https.el @@ -1,4 +1,4 @@ -;;; url-https.el --- HTTP over SSL routines +;;; url-https.el --- HTTP over SSL/TLS routines ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. @@ -30,6 +30,7 @@ (require 'url-parse) (require 'url-cookie) (require 'url-http) +(require 'tls) (defconst url-https-default-port 443 "Default HTTPS port.") (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") @@ -38,12 +39,11 @@ (defmacro url-https-create-secure-wrapper (method args) `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) - (condition-case () - (require 'ssl) - (error - (error "HTTPS support could not find `ssl' library"))) - (let ((url-gateway-method 'ssl)) - ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args)))))) + (let ((url-gateway-method (condition-case () + (require 'ssl) + (error 'tls)))) + (,(intern (format (if method "url-http-%s" "url-http") method)) + ,@(remove '&rest (remove '&optional args)))))) (url-https-create-secure-wrapper nil (url callback cbargs)) (url-https-create-secure-wrapper file-exists-p (url)) diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el index 27cbb8ad1e3..24a3ade4922 100644 --- a/lisp/url/url-ldap.el +++ b/lisp/url/url-ldap.el @@ -28,6 +28,7 @@ (require 'url-parse) (require 'url-util) (require 'ldap) +(autoload 'tls-certificate-information "tls") ;; This has been implemented from RFC2255 'The LDAP URL Format' (Dec 1997) ;; @@ -96,7 +97,8 @@ (require 'ssl) (error nil)) (let ((vals (if (fboundp 'ssl-certificate-information) - (ssl-certificate-information data)))) + (ssl-certificate-information data) + (tls-certificate-information data)))) (if (not vals) "Unable to parse certificate" (concat "\n" diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el index a426f09b1ca..59364c9ccd0 100644 --- a/lisp/url/url-news.el +++ b/lisp/url/url-news.el @@ -2,7 +2,7 @@ ;; Keywords: comm, data, processes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. +;;; Copyright (c) 1996 - 1999, 2004 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. ;;; @@ -125,7 +125,9 @@ ;;;###autoload (defun url-snews (url) - (let ((nntp-open-connection-function 'nntp-open-ssl-stream)) + (let ((nntp-open-connection-function (if (eq 'tls url-gateway-method) + nntp-open-tls-stream + nntp-open-ssl-stream))) (url-news url))) (provide 'url-news) diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 4328c34b6fa..a33d8ba43e3 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -2,7 +2,7 @@ ;; Keywords: comm, data, processes, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996,1997,1998,1999,2001 Free Software Foundation, Inc. +;;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. ;;; ;;; This file is part of GNU Emacs. ;;; @@ -368,12 +368,14 @@ Currently supported methods: `telnet': Run telnet in a subprocess to connect; `rlogin': Rlogin to another machine to connect; `socks': Connect through a socks server; -`ssl': Connect with SSL; +`tls': Connect with TLS; +`ssl': Connect with SSL (deprecated, use `tls' instead); `native': Connect directy." :type '(radio (const :tag "Telnet to gateway host" :value telnet) (const :tag "Rlogin to gateway host" :value rlogin) (const :tag "Use SOCKS proxy" :value socks) - (const :tag "Use SSL for all connections" :value ssl) + (const :tag "Use SSL/TLS for all connections" :value tls) + (const :tag "Use SSL for all connections (obsolete)" :value ssl) (const :tag "Direct connection" :value native)) :group 'url-hairy) From 3bb53a84deecdb5e6405f6353c332c6e0e2db79e Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 12 Oct 2004 09:55:20 +0000 Subject: [PATCH 129/166] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ lisp/url/ChangeLog | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4738fb4812f..0fe85f0d221 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-12 Simon Josefsson + + * net/tls.el (tls-certtool-program): New variable. + (tls-certificate-information): New function, based on + ssl-certificate-information. + 2004-10-12 Kenichi Handa * international/mule.el (coding-system-equal): Moved from diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index c441dc37d7a..91a6c869a21 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,19 @@ +2004-10-12 Simon Josefsson + + * url-vars.el (url-gateway-method): Add new method `tls'. + + * url-news.el (url-snews): Use nntp-open-tls-stream if + url-gateway-method is tls. + + * url-ldap.el (url-ldap-certificate-formatter): Use + tls-certificate-information if ssl.el is not available. + + * url-https.el (url-https-create-secure-wrapper): Use tls if ssl + is not available. + + * url-gw.el (url-open-stream): Support tls url-gateway-method. + (url-open-stream): Likewise. + 2004-10-10 Lars Hansen * url-auth.el: Fix copyright notice. From 828621905948b2a56fa4424f599b8eab724be7d2 Mon Sep 17 00:00:00 2001 From: David Ponce Date: Tue, 12 Oct 2004 10:19:10 +0000 Subject: [PATCH 130/166] (recentf-edit-list): Update the menu when the recentf list has been modified. --- lisp/ChangeLog | 5 +++++ lisp/recentf.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fe85f0d221..dbc13ea927b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-12 David Ponce + + * recentf.el (recentf-edit-list): Update the menu when the recentf + list has been modified. + 2004-10-12 Simon Josefsson * net/tls.el (tls-certtool-program): New variable. diff --git a/lisp/recentf.el b/lisp/recentf.el index efe4ebc63a4..4ef55d4e1bf 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1032,7 +1032,8 @@ Click on Cancel or type \"q\" to quit.\n") (dolist (e recentf-edit-selected-items) (setq recentf-list (delq e recentf-list) i (1+ i))) - (message "%S file(s) removed from the list" i)) + (message "%S file(s) removed from the list" i) + (recentf-clear-data)) (message "No file selected"))) "Ok") (widget-insert " ") From 1c8dec6aac19d74c45b7e44d1849c988f94654fa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 12 Oct 2004 14:13:48 +0000 Subject: [PATCH 131/166] *** empty log message *** --- src/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 1cc8be73541..ac8e091eced 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2004-10-12 Kim F. Storm + + * xdisp.c (redisplay_preserve_echo_area): Flush display in case + caller, such as call-process, is not going to poll for input. + (calc_line_height_property): Handle case where it->object is nil. + + * xterm.c (x_redisplay_interface): Fix flush_display_optional. + 2004-10-12 Kenichi Handa * xdisp.c (get_next_display_element): If From 61087d3fd64d11574f98e94c9413ef56b69c9919 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 12 Oct 2004 14:14:07 +0000 Subject: [PATCH 132/166] (x_redisplay_interface): Fix flush_display_optional. --- src/xterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 131753f893c..8aa52b658c8 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10758,7 +10758,7 @@ static struct redisplay_interface x_redisplay_interface = x_update_window_end, x_cursor_to, x_flush, -#ifndef XFlush +#ifdef XFlush x_flush, #else 0, /* flush_display_optional */ From 16fe48b4248cd1e38a545ef35c5e9ffe9a49adb4 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 12 Oct 2004 14:14:35 +0000 Subject: [PATCH 133/166] (redisplay_preserve_echo_area): Flush display in case caller, such as call-process, is not going to poll for input. (calc_line_height_property): Handle case where it->object is nil. --- src/xdisp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 1c479aee4e8..fa4ddc3eb4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10407,6 +10407,9 @@ redisplay_preserve_echo_area (from_where) } else redisplay_internal (1); + + if (rif->flush_display_optional) + rif->flush_display_optional (NULL); } @@ -18696,8 +18699,10 @@ calc_line_height_property (it, prop, font, boff, total) if (STRINGP (it->object)) position = make_number (IT_STRING_CHARPOS (*it)); - else + else if (BUFFERP (it->object)) position = make_number (IT_CHARPOS (*it)); + else + return Qnil; val = Fget_char_property (position, prop, it->object); From 6fb690e298b9e1bbf6a767c5e7e830030ae30646 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 12 Oct 2004 15:47:32 +0000 Subject: [PATCH 134/166] (calc-help-function-list, calc-help-variable-list): New variables. (calc-help-index-entries): New function. (calc-describe-function): Use calc-help-function-list instead of obarray for completion. (calc-describe-variable): Use calc-help-variable-list instead of obarray for completion. --- lisp/calc/calc-help.el | 56 +++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 32f86d6f750..c24a13b91d7 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -296,29 +296,57 @@ C-w Describe how there is no warranty for Calc." (calc-describe-thing desc "Key Index" nil (string-match "[A-Z][A-Z][A-Z]" desc)))))) +(defvar calc-help-function-list nil + "List of functions provided by Calc.") + +(defvar calc-help-variable-list nil + "List of variables provided by Calc.") + +(defun calc-help-index-entries (&rest indices) + "Create a list of entries from the INDICES in the Calc info manual." + (let ((entrylist '()) + entry) + (require 'info nil t) + (while indices + (condition-case nil + (with-temp-buffer + (Info-mode) + (Info-goto-node (concat "(Calc)" (car indices) " Index")) + (goto-char (point-min)) + (while (re-search-forward "\n\\* \\(.*\\): " nil t) + (setq entry (match-string 1)) + (if (and (not (string-match "<[1-9]+>" entry)) + (not (string-match "(.*)" entry)) + (not (string= entry "Menu"))) + (unless (assoc entry entrylist) + (setq entrylist (cons entry entrylist)))))) + (error nil)) + (setq indices (cdr indices))) + entrylist)) + (defun calc-describe-function (&optional func) (interactive) + (unless calc-help-function-list + (setq calc-help-function-list + (calc-help-index-entries "Function" "Command"))) (or func - (setq func (intern (completing-read "Describe function: " - obarray nil t "calcFunc-")))) - (setq func (symbol-name func)) + (setq func (completing-read "Describe function: " + calc-help-function-list + nil t))) (if (string-match "\\`calc-." func) (calc-describe-thing func "Command Index") - (calc-describe-thing (if (string-match "\\`calcFunc-." func) - (substring func 9) - func) - "Function Index"))) + (calc-describe-thing func "Function Index"))) (defun calc-describe-variable (&optional var) (interactive) + (unless calc-help-variable-list + (setq calc-help-variable-list + (calc-help-index-entries "Variable"))) (or var - (setq var (intern (completing-read "Describe variable: " - obarray nil t "var-")))) - (setq var (symbol-name var)) - (calc-describe-thing var "Variable Index" - (if (string-match "\\`var-." var) - (substring var 4) - var))) + (setq var (completing-read "Describe variable: " + calc-help-variable-list + nil t))) + (calc-describe-thing var "Variable Index")) (defun calc-describe-thing (thing where &optional target not-quoted) (message "Looking for `%s' in %s..." thing where) From 3610d3c96272affc89eb64f50d801aeabf54dd34 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 12 Oct 2004 16:05:55 +0000 Subject: [PATCH 135/166] (mark-sexp): Preserve direction when repeating. --- lisp/emacs-lisp/lisp.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 63d9f759ceb..87b3fcff96c 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -75,17 +75,19 @@ The place mark goes is the same place \\[forward-sexp] would move to with the same argument. If this command is repeated, it marks the next ARG sexps after the ones already marked." - (interactive "p") + (interactive "P") (cond ((and (eq last-command this-command) (mark t)) + (setq arg (if arg (prefix-numeric-value arg) + (if (> (mark) (point)) 1 -1))) (set-mark (save-excursion (goto-char (mark)) - (forward-sexp (or arg 1)) + (forward-sexp arg) (point)))) (t (push-mark (save-excursion - (forward-sexp (or arg 1)) + (forward-sexp (prefix-numeric-value arg)) (point)) nil t)))) From b18480066e4ea30fdf71689b9b25d6d1fa7beeda Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 12 Oct 2004 16:40:38 +0000 Subject: [PATCH 136/166] (Help Commands): Changed the descriptions of calc-describe-function and calc-describe-variable to match their current behavior. --- man/calc.texi | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 3f5c40979ab..a77ba4eb266 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -10026,19 +10026,17 @@ additional notes from the summary that apply to this command. @kindex h f @pindex calc-describe-function The @kbd{h f} (@code{calc-describe-function}) command looks up an -algebraic function or a command name in the Calc manual. The -prompt initially contains @samp{calcFunc-}; follow this with an +algebraic function or a command name in the Calc manual. Enter an algebraic function name to look up that function in the Function -Index. Or, backspace and enter a command name beginning with -@samp{calc-} to look it up in the Command Index. This command -will also look up operator symbols that can appear in algebraic -formulas, like @samp{%} and @samp{=>}. +Index or enter a command name beginning with @samp{calc-} to look it +up in the Command Index. This command will also look up operator +symbols that can appear in algebraic formulas, like @samp{%} and +@samp{=>}. @kindex h v @pindex calc-describe-variable The @kbd{h v} (@code{calc-describe-variable}) command looks up a -variable in the Calc manual. The prompt initially contains the -@samp{var-} prefix; just add a variable name like @code{pi} or +variable in the Calc manual. Enter a variable name like @code{pi} or @code{PlotRejects}. @kindex h b From c203e4ef6307712698661846e60fb7dd9db443c6 Mon Sep 17 00:00:00 2001 From: "Robert J. Chassell" Date: Tue, 12 Oct 2004 17:15:06 +0000 Subject: [PATCH 137/166] (files-in-below-directory): remove unneeded `or' expression that looks at both . and .. since argument to `substring' specifies just one character. --- lispintro/emacs-lisp-intro.texi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 385b3537278..7f9d2185721 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -14930,11 +14930,11 @@ Here is the function: ;; check whether filename is that of a directory ((eq t (car (cdr (car current-directory-list)))) ;; decide whether to skip or recurse - (if - (equal (or "." "..") + (if + (equal "." (substring (car (car current-directory-list)) -1)) - ;; then do nothing if filename is that of - ;; current directory or parent + ;; then do nothing since filename is that of + ;; current directory or parent, "." or ".." () @end group @group From 107c4fccf53967c396af9333c6e433feee724f17 Mon Sep 17 00:00:00 2001 From: "Robert J. Chassell" Date: Tue, 12 Oct 2004 17:18:53 +0000 Subject: [PATCH 138/166] Remove trailing whitespace from file. --- lispintro/emacs-lisp-intro.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 7f9d2185721..514c7a62ad0 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -14930,7 +14930,7 @@ Here is the function: ;; check whether filename is that of a directory ((eq t (car (cdr (car current-directory-list)))) ;; decide whether to skip or recurse - (if + (if (equal "." (substring (car (car current-directory-list)) -1)) ;; then do nothing since filename is that of @@ -17125,7 +17125,7 @@ problem recently.) @item Ignore case when using `grep'@* @samp{-n}@w{ } Prefix each line of output with line number@* @samp{-i}@w{ } Ignore case distinctions@* -@samp{-e}@w{ } Protect patterns beginning with a hyphen character, @samp{-} +@samp{-e}@w{ } Protect patterns beginning with a hyphen character, @samp{-} @smallexample (setq grep-command "grep -n -i -e ") @@ -17166,7 +17166,7 @@ If you want to write with Chinese `GB' characters, set this instead: @end itemize @subsubheading Fixing Unpleasant Key Bindings -@cindex Key bindings, fixing +@cindex Key bindings, fixing @cindex Bindings, key, fixing unpleasant Some systems bind keys unpleasantly. Sometimes, for example, the From c443a57b9c410da47a0478937fce717e06856261 Mon Sep 17 00:00:00 2001 From: "Robert J. Chassell" Date: Tue, 12 Oct 2004 17:23:25 +0000 Subject: [PATCH 139/166] Remember to update edition number and update-date.... --- lispintro/emacs-lisp-intro.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 514c7a62ad0..3714e010d18 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -22,8 +22,8 @@ @comment %**end of header -@set edition-number 2.13 -@set update-date 2004 Oct 5 +@set edition-number 2.14 +@set update-date 2004 Oct 12 @ignore ## Summary of shell commands to create various output formats: From 3a4653dc58c53ecc4639957e1c9c70b2c1345a55 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 12 Oct 2004 18:01:36 +0000 Subject: [PATCH 140/166] (cvs-parse-commit): Fix parsing for new commit message. --- lisp/pcvs-parse.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el index 84dbf218581..7ab6c53b4a0 100644 --- a/lisp/pcvs-parse.el +++ b/lisp/pcvs-parse.el @@ -511,15 +511,19 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$" (subtype 'COMMITTED) (base-rev 1))) (cvs-or (cvs-match "done$") t) + ;; In cvs-1.12.9 commit messages have been changed and became + ;; ambiguous. More specifically, the `path' above is not given. + ;; We assume here that in future releases the corresponding info will + ;; be put into `file'. (progn ;; Try to remove the temp files used by VC. - (vc-delete-automatic-version-backups (expand-file-name path)) + (vc-delete-automatic-version-backups (expand-file-name (or path file))) ;; it's important here not to rely on the default directory management ;; because `cvs commit' might begin by a series of Examining messages ;; so the processing of the actual checkin messages might begin with ;; a `current-dir' set to something different from "" (cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) - (or path file) (if path 'trust) + (or path file) 'trust :base-rev base-rev))) ;; useless message added before the actual addition: ignored From 414da5abebe397a6c86ae7eeb9287036760dd808 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 12 Oct 2004 21:02:43 +0000 Subject: [PATCH 141/166] Sync with Tramp 2.0.45. --- lisp/ChangeLog | 20 ++++++++++++++++++++ lisp/net/tramp-smb.el | 9 ++++++++- lisp/net/tramp.el | 32 +++++++++++++++++++++++++++++++- lisp/net/trampver.el | 2 +- man/ChangeLog | 8 ++++++++ man/tramp.texi | 3 +++ man/trampver.texi | 2 +- 7 files changed, 72 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dbc13ea927b..06b7ebd0d49 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2004-10-12 Michael Albinus + + Sync with Tramp 2.0.45. + + * net/tramp.el (top): Apply `def-edebug-spec' only if function is + defined. This is not the case for XEmacs without package + "edebug". + (tramp-set-auto-save-file-modes): Set permissions of autosaved + remote files to the permissions of the original file. This is not + the case for Emacs < 21.3.50 and XEmacs < 21.5. Add function to + `auto-save-hook'. Reported by Thomas Prokosch . + (tramp-perl-decode): Fixed an error in Perl implementation. + $pending must be cleared every loop. Reported by Benjamin Place + + + * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Don't + activate advice during definition. This is done later on, + depending on test result of `substitute-in-file-name'. Suggested + by Stefan Monnier . + 2004-10-12 David Ponce * recentf.el (recentf-edit-list): Update the menu when the recentf diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 6a888d9d75d..4628af88178 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1087,7 +1087,7 @@ Return the difference in the format of a time value." ;; `PC-do-completion' touches the returning "$$" by `substitute-in-file-name'. ;; Must be corrected. -(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion activate) +(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion) "Changes \"$\" back to \"$$\" in minibuffer." (if (funcall PC-completion-as-file-name-predicate) @@ -1123,6 +1123,13 @@ Return the difference in the format of a time value." ;; No file names. Behave unchanged. ad-do-it)) +;; Activate advice. Recent Emacsen don't need that. +(when (functionp 'PC-do-completion) + (condition-case nil + (substitute-in-file-name "C$/") + (error + (ad-activate 'PC-do-completion)))) + (provide 'tramp-smb) ;;; TODO: diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cda0d41fd8d..a30280dbd4f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1668,6 +1668,7 @@ while (my $data = ) { my $len = length($pending); my $chunk = substr($pending, 0, $len & ~3); + $pending = substr($pending, $len & ~3 + 1); # Easy method: translate from chars to (pregenerated) six-bit packets, join, # split in 8-bit chunks and convert back to char. @@ -1883,7 +1884,11 @@ If VAR is nil, then we bind `v' to the structure and `multi-method', (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) ;; To be activated for debugging containing this macro -(def-edebug-spec with-parsed-tramp-file-name t) +;; It works only when VAR is nil. Otherwise, it can be deactivated by +;; (def-edebug-spec with-parsed-tramp-file-name 0) +;; I'm too stupid to write a precise SPEC for it. +(if (functionp 'def-edebug-spec) + (def-edebug-spec with-parsed-tramp-file-name t)) (defmacro tramp-let-maybe (variable value &rest body) "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. @@ -6731,6 +6736,31 @@ as default." (tramp-make-auto-save-file-name (buffer-file-name))) ad-do-it)) +;; In Emacs < 21.4 and XEmacs < 21.5 autosaved remote files have +;; permission 666 minus umask. This is a security threat. + +(defun tramp-set-auto-save-file-modes () + "Set permissions of autosaved remote files to the original permissions." + (let ((bfn (buffer-file-name))) + (when (and (stringp bfn) + (tramp-tramp-file-p bfn) + (stringp buffer-auto-save-file-name) + (not (equal bfn buffer-auto-save-file-name)) + (not (file-exists-p buffer-auto-save-file-name))) + (write-region "" nil buffer-auto-save-file-name) + (set-file-modes buffer-auto-save-file-name (file-modes bfn))))) + +(unless (or (> emacs-major-version 21) + (and (featurep 'xemacs) + (= emacs-major-version 21) + (> emacs-minor-version 4)) + (and (not (featurep 'xemacs)) + (= emacs-major-version 21) + (or (> emacs-minor-version 3) + (and (string-match "^21\\.3\\.\\([0-9]+\\)" emacs-version) + (>= (string-to-int (match-string 1 emacs-version)) 50))))) + (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes)) + (defun tramp-subst-strs-in-string (alist string) "Replace all occurrences of the string FROM with TO in STRING. ALIST is of the form ((FROM . TO) ...)." diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 46b33b2d50f..7456bc1660f 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.44" +(defconst tramp-version "2.0.45" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" diff --git a/man/ChangeLog b/man/ChangeLog index c996722b444..09308d99ba6 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,11 @@ +2004-10-12 Michael Albinus + + Sync with Tramp 2.0.45. + + * tramp.texi (Frequently Asked Questions): Comment paragraph about + plink link. The URL is outdated. Originator contacted for + clarification. + 2004-10-10 Juri Linkov * gnus.texi (Top, Marking Articles): Join two menus in one node diff --git a/man/tramp.texi b/man/tramp.texi index ebba03d6260..e8577af4982 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -1952,9 +1952,12 @@ There is some informations on @value{tramp} on NT at the following URL; many thanks to Joe Stoy for providing the information: @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/} +@c The link is broken. I've contacted Tom for clarification. Michael. +@ignore The above mostly contains patches to old ssh versions; Tom Roche has a Web page with instructions: @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html} +@end ignore ??? Is the XEmacs info correct? diff --git a/man/trampver.texi b/man/trampver.texi index a5cc874b3fb..743b49388f7 100644 --- a/man/trampver.texi +++ b/man/trampver.texi @@ -4,7 +4,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.0.44 +@set trampver 2.0.45 @c Other flags from configuration @set prefix /usr/local From adc182c8af3500b3c4fe37f8ecd1438e87351995 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 12 Oct 2004 22:55:48 +0000 Subject: [PATCH 142/166] *** empty log message *** --- lisp/ChangeLog | 69 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06b7ebd0d49..58d04cf1d6f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,20 +3,25 @@ Sync with Tramp 2.0.45. * net/tramp.el (top): Apply `def-edebug-spec' only if function is - defined. This is not the case for XEmacs without package - "edebug". + defined. This is not the case for XEmacs without package "edebug". (tramp-set-auto-save-file-modes): Set permissions of autosaved remote files to the permissions of the original file. This is not the case for Emacs < 21.3.50 and XEmacs < 21.5. Add function to `auto-save-hook'. Reported by Thomas Prokosch . - (tramp-perl-decode): Fixed an error in Perl implementation. + (tramp-perl-decode): Fix an error in Perl implementation. $pending must be cleared every loop. Reported by Benjamin Place - * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Don't - activate advice during definition. This is done later on, - depending on test result of `substitute-in-file-name'. Suggested - by Stefan Monnier . + * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): + Don't activate advice during definition. This is done later on, + depending on test result of `substitute-in-file-name'. + Suggested by Stefan Monnier . + +2004-10-12 Stefan Monnier + + * pcvs-parse.el (cvs-parse-commit): Fix parsing for new commit message. + + * emacs-lisp/lisp.el (mark-sexp): Preserve direction when repeating. 2004-10-12 David Ponce @@ -31,11 +36,9 @@ 2004-10-12 Kenichi Handa - * international/mule.el (coding-system-equal): Moved from - mule-util.el. + * international/mule.el (coding-system-equal): Move from mule-util.el. - * international/mule-util.el (coding-system-equal): Moved to - mule.el. + * international/mule-util.el (coding-system-equal): Move to mule.el. 2004-10-12 Kim F. Storm @@ -48,6 +51,12 @@ * subr.el (substitute-key-definition): Mention command remapping in doc string. +2004-10-11 Stefan + + * pcvs-defs.el (pcl-cvs-load-hook): Remove unused var. + + * font-lock.el (font-lock-apply-highlight): Fix last change. + 2004-10-11 Simon Josefsson * mail/smtpmail.el (smtpmail-open-stream): Look for @@ -56,6 +65,15 @@ (smtpmail-open-stream): Don't overwrite user settings of starttls-extra-arguments and starttls-extra-args. +2004-10-10 Stefan + + * comint.el (comint-mouse-insert-input): Remove. + (comint-insert-input): Make it work for mouse bindings. + (comint-mode-map): Move defs into the declaration. + (comint-output-filter): Typo. + + * diff-mode.el (diff-current-defun): Fix 2004-06-13's change. + 2004-10-10 Kai Grossjohann * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable. @@ -74,6 +92,20 @@ (vc-annotate-display-select): Only call vc-annotate-mode if we're not in that mode already. +2004-10-09 Stefan Monnier + + * imenu.el (imenu--completion-buffer): Don't return t for rescan. + (imenu-choose-buffer-index): Check here for rescan instead. + + * font-lock.el (font-lock-apply-highlight): Explicitly check the case + where the face expression evals to nil. + + * textmodes/tex-mode.el (tex-font-lock-append-prop): New fun. + (tex-font-lock-keywords-2): Use it. + (tex-font-lock-syntactic-keywords): Fix the `verbatim' treatment. + + * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix backslashes. + 2004-10-09 Kim F. Storm * subr.el (progress-reporter-update): Define before first usage. @@ -87,8 +119,8 @@ 2004-10-08 Peter Seibel (tiny change) - * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Change - paragraph-start regexp so we don't fill code starting with #'( + * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): + Change paragraph-start regexp so we don't fill code starting with #'(. 2004-10-08 Sebastien Kirche (tiny change) @@ -116,13 +148,11 @@ 2004-10-08 Masatake YAMATO * server.el (server-process-filter): Wrap `process-send-region' - by `condition-case' to guard the case when the pipe to PROC is - closed. + by `condition-case' to guard the case when the pipe to PROC is closed. 2004-10-07 Mark A. Hershberger - * xml.el (xml-substitute-special): Limit handling of external - entities. + * xml.el (xml-substitute-special): Limit handling of external entities. 2004-10-06 Nick Roberts @@ -167,9 +197,8 @@ 2004-10-04 Luc Teirlinck - * textmodes/enriched.el (enriched-mode-map): Give - `set-left-margin' and `set-right-margin' bindings that follow the - minor mode conventions. + * textmodes/enriched.el (enriched-mode-map): Give `set-left-margin' and + `set-right-margin' bindings that follow the minor mode conventions. 2004-10-03 Stefan From 25c42a303af132dfdd9935ccf748798ac01471c1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Oct 2004 01:55:20 +0000 Subject: [PATCH 143/166] Fix typo. --- etc/CENSORSHIP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/CENSORSHIP b/etc/CENSORSHIP index 24bca114790..ca949aa6b6e 100644 --- a/etc/CENSORSHIP +++ b/etc/CENSORSHIP @@ -54,7 +54,7 @@ rules. Of course, I'm making an assumption about just what "indecent" means. I have to do this, because nobody knows for sure. The most obvious -possibile meaning is the meaning it has for television, so I'm using +possible meaning is the meaning it has for television, so I'm using that as a tentative assumption. However, there is a good chance that our courts will reject that interpretation of the law as unconstitutional. From 6ca1c497293cf362cc92ccc598b783c63908dc69 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Oct 2004 01:55:57 +0000 Subject: [PATCH 144/166] *** empty log message *** --- etc/TODO | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/TODO b/etc/TODO index 532c2b5e366..defc43892c2 100644 --- a/etc/TODO +++ b/etc/TODO @@ -34,6 +34,9 @@ to the FSF. ** Implement a smoother vertical scroll facility, one that allows C-v to scroll through a tall image. +** Implement intelligent search/replace, going beyond query-replace + (see http://graphics.csail.mit.edu/~rcm/chi04.pdf). + ** Implement other text formatting properties. *** Footnotes that can appear either in place or at the end of the page. *** text property that says "don't break line in middle of this". From 3bfb0bff7b4a247d46ddc362d0c1dd27b9644179 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Oct 2004 01:58:45 +0000 Subject: [PATCH 145/166] Mention looking-back. --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 63c4ec3e3a1..19f81601b7a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -98,6 +98,11 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 ++++ +** New function `looking-back' whether a regular expression matches +the text before point. Specifying the LIMIT argument bounds how far +back the match can start; this is a way to keep it from taking too long. + +++ ** New functions `make-progress-reporter', `progress-reporter-update', `progress-reporter-force-update' and `progress-reporter-done' provide From cc3f6c32b9ec83fb5bada972ca8cf16f58b3d49c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Oct 2004 02:09:57 +0000 Subject: [PATCH 146/166] (info-xref): Add underlining. (info): Add info-file property. (Info-find-emacs-command-nodes): Specify case-sensitive search. --- lisp/info.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 2a20fc4898c..386f5b612ec 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -79,8 +79,8 @@ The Lisp code is executed when the node is selected.") :group 'info) (defface info-xref - '((((class color) (background light)) :foreground "blue") - (((class color) (background dark)) :foreground "cyan") + '((((class color) (background light)) :foreground "blue" :underline t) + (((class color) (background dark)) :foreground "cyan" :underline t) (t :underline t)) "Face for Info cross-references." :group 'info) @@ -455,6 +455,7 @@ Do the right thing if the file has been compressed or zipped." ;;;###autoload (add-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)") +;;;###autoload (put 'info 'info-file "emacs") ;;;###autoload (defun info (&optional file buffer) "Enter Info, the documentation browser. @@ -3261,6 +3262,7 @@ The locations are of the format used in `Info-history', i.e. (car elt) elt)) (file (if (consp elt) (cdr elt) elt)) + (case-fold-search nil) (regexp (concat "\\`" (regexp-quote name) "\\(\\'\\|-\\)"))) (if (string-match regexp (symbol-name command)) From 99400b3e524ebd4d7dbf1cb2340dc5afc6eef085 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Oct 2004 02:11:05 +0000 Subject: [PATCH 147/166] (info-lookup-file): Add info-file property. (info-lookup-symbol): Likewise. --- lisp/info-look.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/info-look.el b/lisp/info-look.el index 644ee3d6c20..3f3ea7c2fd4 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -245,6 +245,7 @@ system." (interactive) (setq info-lookup-cache nil)) +;;;###autoload (put 'info-lookup-symbol 'info-file "emacs") ;;;###autoload (defun info-lookup-symbol (symbol &optional mode) "Display the definition of SYMBOL, as found in the relevant manual. @@ -258,6 +259,7 @@ With prefix arg a query for the symbol help mode is offered." (info-lookup-interactive-arguments 'symbol current-prefix-arg)) (info-lookup 'symbol symbol mode)) +;;;###autoload (put 'info-lookup-file 'info-file "emacs") ;;;###autoload (defun info-lookup-file (file &optional mode) "Display the documentation of a file. From 4440e3ca6e7d8f460b2a4a6a21caca011ac9248c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 09:06:59 +0000 Subject: [PATCH 148/166] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ac8e091eced..0eef0f1f87e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-10-13 Kim F. Storm + + * xdisp.c (redisplay_preserve_echo_area): Fix last change. + 2004-10-12 Kim F. Storm * xdisp.c (redisplay_preserve_echo_area): Flush display in case From 777f4146f8941d06fda31993ff6d517c7ec419ff Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 09:07:17 +0000 Subject: [PATCH 149/166] (redisplay_preserve_echo_area): Fix last change. --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index fa4ddc3eb4d..cea16dcbcb5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10408,7 +10408,7 @@ redisplay_preserve_echo_area (from_where) else redisplay_internal (1); - if (rif->flush_display_optional) + if (rif != NULL && rif->flush_display_optional) rif->flush_display_optional (NULL); } From 7cfdabde5fa5a9df23dbc391bde79f70c137db1c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 09:50:15 +0000 Subject: [PATCH 150/166] *** empty log message *** --- src/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 0eef0f1f87e..d607ff5b76e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2004-10-13 Kim F. Storm + * callproc.c (Fcall_process): Simplify handling of display arg. + Resume `display_on_the_fly' once a coding system is determined. + * xdisp.c (redisplay_preserve_echo_area): Fix last change. 2004-10-12 Kim F. Storm From 0aa2630fac731241c383caa14eec3df5f93d6d94 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 09:50:36 +0000 Subject: [PATCH 151/166] (Fcall_process): Simplify handling of display arg. Resume `display_on_the_fly' once a coding system is determined. --- src/callproc.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/callproc.c b/src/callproc.c index effd7ecbb14..5d7447d94f2 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -216,7 +216,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int nargs; register Lisp_Object *args; { - Lisp_Object infile, buffer, current_dir, display, path; + Lisp_Object infile, buffer, current_dir, path; + int display_p; int fd[2]; int filefd; register int pid; @@ -372,7 +373,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) UNGCPRO; } - display = nargs >= 4 ? args[3] : Qnil; + display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); filefd = emacs_open (SDATA (infile), O_RDONLY, 0); if (filefd < 0) @@ -747,7 +748,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int first = 1; int total_read = 0; int carryover = 0; - int display_on_the_fly = !NILP (display) && INTERACTIVE; + int display_on_the_fly = display_p; struct coding_system saved_coding; int pt_orig = PT, pt_byte_orig = PT_BYTE; int inserted; @@ -823,12 +824,15 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) { /* We have detected some coding system. But, there's a possibility that the detection was - done by insufficient data. So, we give up - displaying on the fly. */ + done by insufficient data. So, we try the code + detection again with more data. */ xfree (decoding_buf); display_on_the_fly = 0; process_coding = saved_coding; carryover = nread; + /* This is to make the above condition always + fails in the future. */ + saved_coding.type = coding_type_no_conversion; continue; } @@ -929,12 +933,16 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) bufptr = tempptr; } - if (!NILP (display) && INTERACTIVE) + if (display_p) { if (first) prepare_menu_bars (); first = 0; redisplay_preserve_echo_area (1); + /* This variable might have been set to 0 for code + detection. In that case, we set it back to 1 because + we should have already detected a coding system. */ + display_on_the_fly = 1; } immediate_quit = 1; QUIT; From 31e931a5d1c8b9ff1a5e8df909e57dec8050516e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 09:53:09 +0000 Subject: [PATCH 152/166] typo. --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 19f81601b7a..9381dfdbb35 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -99,7 +99,7 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +++ -** New function `looking-back' whether a regular expression matches +** New function `looking-back' checks whether a regular expression matches the text before point. Specifying the LIMIT argument bounds how far back the match can start; this is a way to keep it from taking too long. From f38e574844abce22100fc41315c70fb7ebb88c60 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 12:18:37 +0000 Subject: [PATCH 153/166] Fix comment for it->object; it may also be nil. --- src/dispextern.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 1e9fa483b27..d6c93cb270e 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1967,8 +1967,8 @@ struct it /* Object and position where the current display element came from. Object can be a Lisp string in case the current display element - comes from an overlay string, or it is buffer. Position is - a position in object. */ + comes from an overlay string, or it is buffer. It may also be nil + during mode-line update. Position is a position in object. */ Lisp_Object object; struct text_pos position; From e375517fdad3f03d36249207b447fa35588dd966 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Wed, 13 Oct 2004 16:32:42 +0000 Subject: [PATCH 154/166] * progmodes/gud.el (gdb-script-beginning-of-defun): New function. (gdb-script-end-of-defun): New function. (gdb-script-mode): Use `gdb-script-beginning-of-defun' and `gdb-script-end-of-defun' as *-of-defun-function. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/gud.el | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 58d04cf1d6f..dd331c1c457 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-10-14 Masatake YAMATO + + * progmodes/gud.el (gdb-script-beginning-of-defun): New function. + (gdb-script-end-of-defun): New function. + (gdb-script-mode): Use `gdb-script-beginning-of-defun' and + `gdb-script-end-of-defun' as *-of-defun-function. + 2004-10-12 Michael Albinus Sync with Tramp 2.0.45. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4ea4fcb6ea2..37fe13ce585 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3027,6 +3027,27 @@ class of the file (using s to separate nested class ids)." (save-excursion (indent-line-to indent)) (indent-line-to indent))))) +;; Derived from cfengine.el. +(defun gdb-script-beginning-of-defun () + "`beginning-of-defun' function for Gdb script mode. +Treats actions as defuns." + (unless (<= (current-column) (current-indentation)) + (end-of-line)) + (if (re-search-backward "^define \\|^document " nil t) + (beginning-of-line) + (goto-char (point-min))) + t) + +;; Derived from cfengine.el. +(defun gdb-script-end-of-defun () + "`end-of-defun' function for Gdb script mode. +Treats actions as defuns." + (end-of-line) + (if (re-search-forward "^end" nil t) + (beginning-of-line) + (goto-char (point-max))) + t) + ;;;###autoload (add-to-list 'auto-mode-alist '("/\\.gdbinit" . gdb-script-mode)) @@ -3039,6 +3060,10 @@ class of the file (using s to separate nested class ids)." (set (make-local-variable 'imenu-generic-expression) '((nil "^define[ \t]+\\(\\w+\\)" 1))) (set (make-local-variable 'indent-line-function) 'gdb-script-indent-line) + (set (make-local-variable 'beginning-of-defun-function) + #'gdb-script-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) + #'gdb-script-end-of-defun) (set (make-local-variable 'font-lock-defaults) '(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil (font-lock-syntactic-keywords From 98ebf86079d11bc7e6c4345f407f228300a94c82 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Oct 2004 16:58:45 +0000 Subject: [PATCH 155/166] (syms_of_textprop): Add `syntax-table' to the nonsticky props. --- src/textprop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/textprop.c b/src/textprop.c index c8ec008dcbd..317f8fa6aa3 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1,5 +1,5 @@ /* Interface code for dealing with text properties. - Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2233,7 +2233,9 @@ If a character in a buffer has PROPERTY, new text inserted adjacent to the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, inherits it if NONSTICKINESS is nil. The front-sticky and rear-nonsticky properties of the character overrides NONSTICKINESS. */); - Vtext_property_default_nonsticky = Qnil; + /* Text property `syntax-table' should be nonsticky by default. */ + Vtext_property_default_nonsticky + = Fcons (Fcons (intern ("syntax-table"), Qt), Qnil); staticpro (&interval_insert_behind_hooks); staticpro (&interval_insert_in_front_hooks); From 9ce78f7c7b5f790289266e205282d3ea3c26dda9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Oct 2004 17:00:13 +0000 Subject: [PATCH 156/166] (get_keymap): An autoload form is not a keymap. --- src/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/keymap.c b/src/keymap.c index 92cb6902a1e..105a5b95793 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -267,7 +267,8 @@ get_keymap (object, error, autoload) /* Should we do an autoload? Autoload forms for keymaps have Qkeymap as their fifth element. */ - if ((autoload || !error) && EQ (XCAR (tem), Qautoload)) + if ((autoload || !error) && EQ (XCAR (tem), Qautoload) + && SYMBOLP (object)) { Lisp_Object tail; From 865c5d7658a9ac03c2a2be1fca1d2f53a471c178 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Oct 2004 17:04:45 +0000 Subject: [PATCH 157/166] (vc-annotate-display-select): Fix typo. --- lisp/vc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc.el b/lisp/vc.el index 3f562905280..a0d3d1cd4be 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -3001,7 +3001,7 @@ use; you may override this using the second optional arg MODE." (when buffer (set-buffer buffer) (display-buffer buffer)) - (if (not vc-annotate-parent-ref) + (if (not vc-annotate-parent-rev) (vc-annotate-mode)) (cond ((null vc-annotate-display-mode) (vc-annotate-display-default vc-annotate-ratio)) From 9166dbf6ae43e72693350070c48630a7feb98a3a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Oct 2004 17:05:55 +0000 Subject: [PATCH 158/166] (substitute-key-definition-key): New function. (substitute-key-definition): Use it with map-keymap. (event-modifiers): Use push. (mouse-movement-p, with-temp-buffer): Simplify. --- lisp/subr.el | 187 ++++++++++++++------------------------------------- 1 file changed, 52 insertions(+), 135 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 3c4f870918e..60e0694e55a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -367,15 +367,6 @@ but optional second arg NODIGITS non-nil treats them like other chars." (define-key map (char-to-string loop) 'digit-argument) (setq loop (1+ loop)))))) -;Moved to keymap.c -;(defun copy-keymap (keymap) -; "Return a copy of KEYMAP" -; (while (not (keymapp keymap)) -; (setq keymap (signal 'wrong-type-argument (list 'keymapp keymap)))) -; (if (vectorp keymap) -; (copy-sequence keymap) -; (copy-alist keymap))) - (defvar key-substitution-in-progress nil "Used internally by substitute-key-definition.") @@ -396,126 +387,54 @@ For most uses, it is simpler and safer to use command remappping like this: ;; original key, with PREFIX added at the front. (or prefix (setq prefix "")) (let* ((scan (or oldmap keymap)) - (vec1 (vector nil)) - (prefix1 (vconcat prefix vec1)) + (prefix1 (vconcat prefix [nil])) (key-substitution-in-progress (cons scan key-substitution-in-progress))) ;; Scan OLDMAP, finding each char or event-symbol that ;; has any definition, and act on it with hack-key. - (while (consp scan) - (if (consp (car scan)) - (let ((char (car (car scan))) - (defn (cdr (car scan)))) - ;; The inside of this let duplicates exactly - ;; the inside of the following let that handles array elements. - (aset vec1 0 char) - (aset prefix1 (length prefix) char) - (let (inner-def skipped) - ;; Skip past menu-prompt. - (while (stringp (car-safe defn)) - (setq skipped (cons (car defn) skipped)) - (setq defn (cdr defn))) - ;; Skip past cached key-equivalence data for menu items. - (and (consp defn) (consp (car defn)) - (setq defn (cdr defn))) - (setq inner-def defn) - ;; Look past a symbol that names a keymap. - (while (and (symbolp inner-def) - (fboundp inner-def)) - (setq inner-def (symbol-function inner-def))) - (if (or (eq defn olddef) - ;; Compare with equal if definition is a key sequence. - ;; That is useful for operating on function-key-map. - (and (or (stringp defn) (vectorp defn)) - (equal defn olddef))) - (define-key keymap prefix1 (nconc (nreverse skipped) newdef)) - (if (and (keymapp defn) - ;; Avoid recursively scanning - ;; where KEYMAP does not have a submap. - (let ((elt (lookup-key keymap prefix1))) - (or (null elt) - (keymapp elt))) - ;; Avoid recursively rescanning keymap being scanned. - (not (memq inner-def - key-substitution-in-progress))) - ;; If this one isn't being scanned already, - ;; scan it now. - (substitute-key-definition olddef newdef keymap - inner-def - prefix1))))) - (if (vectorp (car scan)) - (let* ((array (car scan)) - (len (length array)) - (i 0)) - (while (< i len) - (let ((char i) (defn (aref array i))) - ;; The inside of this let duplicates exactly - ;; the inside of the previous let. - (aset vec1 0 char) - (aset prefix1 (length prefix) char) - (let (inner-def skipped) - ;; Skip past menu-prompt. - (while (stringp (car-safe defn)) - (setq skipped (cons (car defn) skipped)) - (setq defn (cdr defn))) - (and (consp defn) (consp (car defn)) - (setq defn (cdr defn))) - (setq inner-def defn) - (while (and (symbolp inner-def) - (fboundp inner-def)) - (setq inner-def (symbol-function inner-def))) - (if (or (eq defn olddef) - (and (or (stringp defn) (vectorp defn)) - (equal defn olddef))) - (define-key keymap prefix1 - (nconc (nreverse skipped) newdef)) - (if (and (keymapp defn) - (let ((elt (lookup-key keymap prefix1))) - (or (null elt) - (keymapp elt))) - (not (memq inner-def - key-substitution-in-progress))) - (substitute-key-definition olddef newdef keymap - inner-def - prefix1))))) - (setq i (1+ i)))) - (if (char-table-p (car scan)) - (map-char-table - (function (lambda (char defn) - (let () - ;; The inside of this let duplicates exactly - ;; the inside of the previous let, - ;; except that it uses set-char-table-range - ;; instead of define-key. - (aset vec1 0 char) - (aset prefix1 (length prefix) char) - (let (inner-def skipped) - ;; Skip past menu-prompt. - (while (stringp (car-safe defn)) - (setq skipped (cons (car defn) skipped)) - (setq defn (cdr defn))) - (and (consp defn) (consp (car defn)) - (setq defn (cdr defn))) - (setq inner-def defn) - (while (and (symbolp inner-def) - (fboundp inner-def)) - (setq inner-def (symbol-function inner-def))) - (if (or (eq defn olddef) - (and (or (stringp defn) (vectorp defn)) - (equal defn olddef))) - (define-key keymap prefix1 - (nconc (nreverse skipped) newdef)) - (if (and (keymapp defn) - (let ((elt (lookup-key keymap prefix1))) - (or (null elt) - (keymapp elt))) - (not (memq inner-def - key-substitution-in-progress))) - (substitute-key-definition olddef newdef keymap - inner-def - prefix1))))))) - (car scan))))) - (setq scan (cdr scan))))) + (map-keymap + (lambda (char defn) + (aset prefix1 (length prefix) char) + (substitute-key-definition-key defn olddef newdef prefix1 keymap)) + scan))) + +(defun substitute-key-definition-key (defn olddef newdef prefix keymap) + (let (inner-def skipped menu-item) + ;; Find the actual command name within the binding. + (if (eq (car-safe defn) 'menu-item) + (setq menu-item defn defn (nth 2 defn)) + ;; Skip past menu-prompt. + (while (stringp (car-safe defn)) + (push (pop defn) skipped)) + ;; Skip past cached key-equivalence data for menu items. + (if (consp (car-safe defn)) + (setq defn (cdr defn)))) + (if (or (eq defn olddef) + ;; Compare with equal if definition is a key sequence. + ;; That is useful for operating on function-key-map. + (and (or (stringp defn) (vectorp defn)) + (equal defn olddef))) + (define-key keymap prefix + (if menu-item + (let ((copy (copy-sequence menu-item))) + (setcar (nthcdr 2 copy) newdef) + copy) + (nconc (nreverse skipped) newdef))) + ;; Look past a symbol that names a keymap. + (setq inner-def + (condition-case nil (indirect-function defn) (error defn))) + ;; For nested keymaps, we use `inner-def' rather than `defn' so as to + ;; avoid autoloading a keymap. This is mostly done to preserve the + ;; original non-autoloading behavior of pre-map-keymap times. + (if (and (keymapp inner-def) + ;; Avoid recursively scanning + ;; where KEYMAP does not have a submap. + (let ((elt (lookup-key keymap prefix))) + (or (null elt) (natnump elt) (keymapp elt))) + ;; Avoid recursively rescanning keymap being scanned. + (not (memq inner-def key-substitution-in-progress))) + ;; If this one isn't being scanned already, scan it now. + (substitute-key-definition olddef newdef keymap inner-def prefix))))) (defun define-key-after (keymap key definition &optional after) "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding. @@ -661,19 +580,19 @@ even when EVENT actually has modifiers." (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ ?\H-\^@ ?\s-\^@ ?\A-\^@))))) (if (not (zerop (logand type ?\M-\^@))) - (setq list (cons 'meta list))) + (push 'meta list)) (if (or (not (zerop (logand type ?\C-\^@))) (< char 32)) - (setq list (cons 'control list))) + (push 'control list)) (if (or (not (zerop (logand type ?\S-\^@))) (/= char (downcase char))) - (setq list (cons 'shift list))) + (push 'shift list)) (or (zerop (logand type ?\H-\^@)) - (setq list (cons 'hyper list))) + (push 'hyper list)) (or (zerop (logand type ?\s-\^@)) - (setq list (cons 'super list))) + (push 'super list)) (or (zerop (logand type ?\A-\^@)) - (setq list (cons 'alt list))) + (push 'alt list)) list)))) (defun event-basic-type (event) @@ -691,8 +610,7 @@ in the current Emacs session, then this function may return nil." (defsubst mouse-movement-p (object) "Return non-nil if OBJECT is a mouse movement event." - (and (consp object) - (eq (car object) 'mouse-movement))) + (eq (car-safe object) 'mouse-movement)) (defsubst event-start (event) "Return the starting position of EVENT. @@ -1883,8 +1801,7 @@ Use a MESSAGE of \"\" to temporarily clear the echo area." See also `with-temp-file' and `with-output-to-string'." (declare (indent 0) (debug t)) (let ((temp-buffer (make-symbol "temp-buffer"))) - `(let ((,temp-buffer - (get-buffer-create (generate-new-buffer-name " *temp*")))) + `(let ((,temp-buffer (generate-new-buffer " *temp*"))) (unwind-protect (with-current-buffer ,temp-buffer ,@body) From 9238467da9d261930ccbab57b33c9c52d86a47ba Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Oct 2004 17:07:58 +0000 Subject: [PATCH 159/166] *** empty log message *** --- lisp/ChangeLog | 23 ++++++++++++------ src/ChangeLog | 64 +++++++++++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 37 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd331c1c457..034c874de2c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,15 @@ (gdb-script-mode): Use `gdb-script-beginning-of-defun' and `gdb-script-end-of-defun' as *-of-defun-function. +2004-10-13 Stefan Monnier + + * vc.el (vc-annotate-display-select): Fix typo. + + * subr.el (substitute-key-definition-key): New function. + (substitute-key-definition): Use it with map-keymap. + (event-modifiers): Use push. + (mouse-movement-p, with-temp-buffer): Simplify. + 2004-10-12 Michael Albinus Sync with Tramp 2.0.45. @@ -58,7 +67,7 @@ * subr.el (substitute-key-definition): Mention command remapping in doc string. -2004-10-11 Stefan +2004-10-11 Stefan Monnier * pcvs-defs.el (pcl-cvs-load-hook): Remove unused var. @@ -72,7 +81,7 @@ (smtpmail-open-stream): Don't overwrite user settings of starttls-extra-arguments and starttls-extra-args. -2004-10-10 Stefan +2004-10-10 Stefan Monnier * comint.el (comint-mouse-insert-input): Remove. (comint-insert-input): Make it work for mouse bindings. @@ -207,7 +216,7 @@ * textmodes/enriched.el (enriched-mode-map): Give `set-left-margin' and `set-right-margin' bindings that follow the minor mode conventions. -2004-10-03 Stefan +2004-10-03 Stefan Monnier * textmodes/tex-mode.el (tex-dvi-view-command): Use `yap' on w32. (tex-font-lock-keywords-1): Add url and nolinkurl for args with `_'. @@ -271,7 +280,7 @@ * diff-mode.el (diff-file-header-re): Tighten up regexp a tiny bit. (diff-fixup-modifs): Catch unified-diff file-headers. -2004-09-28 Stefan +2004-09-28 Stefan Monnier * dired.el (dired-view-command-alist): Use more efficient regexps. Remove dubious arguments. @@ -311,7 +320,7 @@ (pr-delete-file): Check if file exists before deleting it. Reported by Lennart Borgman . -2004-09-26 Stefan +2004-09-26 Stefan Monnier * term.el (term-display-table): New variable. (term-mode): Use it. @@ -335,7 +344,7 @@ (term-stop-output-log): Rename from `term-stop-photo'. (term-switch-to-alternate-sub-buffer): Comment out, unused. -2004-09-25 Stefan +2004-09-25 Stefan Monnier * dired.el (dired-move-to-filename): Don't output a message if raise-error is non-nil. Fix return position and value. @@ -479,7 +488,7 @@ * progmodes/sh-script.el (sh-mode-default-syntax-table): Set syntax of = to "." (punctuation). -2004-09-19 Stefan +2004-09-19 Stefan Monnier * subr.el (event-basic-type): Fix mask (extend to 22bits). diff --git a/src/ChangeLog b/src/ChangeLog index d607ff5b76e..7fc1c1688ab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-10-13 Stefan Monnier + + * keymap.c (get_keymap): An autoload form is not a keymap. + + * textprop.c (syms_of_textprop): Make `syntax-table' nonsticky. + 2004-10-13 Kim F. Storm * callproc.c (Fcall_process): Simplify handling of display arg. @@ -15,8 +21,8 @@ 2004-10-12 Kenichi Handa - * xdisp.c (get_next_display_element): If - unibyte_display_via_language_environment is zero, display 8-bit + * xdisp.c (get_next_display_element): + If unibyte_display_via_language_environment is zero, display 8-bit chars in octal in unibyte buffer. 2004-10-12 Kim F. Storm @@ -26,22 +32,21 @@ 2004-10-11 Jan Dj,Ad(Brv - * xfns.c (syms_of_xfns): defsubr x-file-dialog for GTK also. + * xfns.c (syms_of_xfns): Defsubr x-file-dialog for GTK also. 2004-10-10 YAMAMOTO Mitsuharu - * macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow - (x_lower_frame): Add BLOCK_INPUT around SendBehind + * macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow. + (x_lower_frame): Add BLOCK_INPUT around SendBehind. (make_mac_frame): Add BLOCK_INPUT around the making of a - terminal frame - (mac_initialize): Add BLOCK_INPUT around carbon initialization - * macgui.h (mktime): Use emacs_mktime + terminal frame. + (mac_initialize): Add BLOCK_INPUT around carbon initialization. + * macgui.h (mktime): Use emacs_mktime. * macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code. Make a cancel file-open dialog be like C-g. - * mac.c (mktime): Use emacs_mktime - (Fdo_applescript): Add BLOCK_INPUT around do_applescript - (Fmac_paste_function): Add better error handling for carbon - cut/paste + * mac.c (mktime): Use emacs_mktime. + (Fdo_applescript): Add BLOCK_INPUT around do_applescript. + (Fmac_paste_function): Add better error handling for carbon cut/paste. 2004-10-10 Kim F. Storm @@ -55,12 +60,12 @@ 2004-10-08 Steven Tamm - * config.in (HAVE_MALLOC_MALLOC_H): Regenerate + * config.in (HAVE_MALLOC_MALLOC_H): Regenerate. * macterm.c (mac_check_for_quit_char): Remove warning for using - NULL where 0 should be used + NULL where 0 should be used. * unexmacosx.c: Use malloc/malloc.h on Tiger instead of objc/malloc.h - * mac.c: Include time.h for Tiger compatibility + * mac.c: Include time.h for Tiger compatibility. 2004-10-07 Kim F. Storm @@ -206,8 +211,8 @@ Change arg to Lisp_Object and fail if not an integer. (get_fringe_bitmap_name, resolve_fringe_bitmap) (destroy_fringe_bitmap): New functions. - (Fdestroy_fringe_bitmap): Change arg to bitmap symbol. Use - destroy_fringe_bitmap. Remove symbol from Vfringe_bitmaps and + (Fdestroy_fringe_bitmap): Change arg to bitmap symbol. + Use destroy_fringe_bitmap. Remove symbol from Vfringe_bitmaps and clear its fringe property. (init_fringe_bitmap): Use destroy_fringe_bitmap instead of Fdestroy_fringe_bitmap. @@ -232,7 +237,7 @@ 2004-09-25 Jan Dj,Ad(Brv - * config.in: Rebuild + * config.in: Rebuild. 2004-09-24 Jan Dj,Ad(Brv @@ -252,7 +257,7 @@ Handle the case where we reach the old displayed text, out of sync with the old line boundary. -2004-09-14 Stefan +2004-09-14 Stefan Monnier * fileio.c (Finsert_file_contents): Fix case of replacement in a narrowed buffer. @@ -274,7 +279,7 @@ (Fbyte_code): Remove dead code after `wrong_type_argument'. * alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl - before doing the mark_stack_check_gcpros since they are not on the stack. + before doing the mark_stack_check_gcpros since they're not on the stack. 2004-09-12 Kim F. Storm @@ -293,8 +298,7 @@ blockinput.h. (dosfns.o): Depend on blockinput.h, window.h, dispextern.h, charset.h, and coding.h - (w16select.o): Depend on buffer.h, charset.h, coding.h, and - composite.h. + (w16select.o): Depend on buffer.h, charset.h, coding.h, and composite.h. (term.o): Depend on window.h and keymap.h. (abbrev.o): Depend on syntax.h. (callint.o): Depend on keymap.h. @@ -327,8 +331,8 @@ (lread.o): Depend on $(INTERVALS_SRC), termhooks.h, and coding.h. (intervals.o): Depend on keymap.h. - * msdos.c (msdos_set_cursor_shape, IT_display_cursor): Add - debugging print-out to termscript. + * msdos.c (msdos_set_cursor_shape, IT_display_cursor): + Add debugging print-out to termscript. 2004-09-09 Richard M. Stallman @@ -354,8 +358,8 @@ 2004-09-07 Luc Teirlinck * buffer.h (struct buffer): Add auto_save_file_format field. - * buffer.c (reset_buffer, init_buffer_once): Handle - auto_save_file_format field. + * buffer.c (reset_buffer, init_buffer_once): + Handle auto_save_file_format field. (syms_of_buffer): Add DEFVAR_PER_BUFFER for `buffer-auto-save-file-format'. * fileio.c: Delete declaration for removed Vauto_save_file_format. @@ -368,15 +372,15 @@ * w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c. - * w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: Handle - Unicode menu titles. + * w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: + Handle Unicode menu titles. 2004-09-07 Kim F. Storm * xdisp.c (set_cursor_from_row): Fix last change. Only use 'cursor' property from text property or overlay strings at point. -2004-09-07 Stefan +2004-09-07 Stefan Monnier * xmenu.c (update_submenu_strings): YAILOM. (set_frame_menubar): Make sure last_i is initialized. @@ -865,7 +869,7 @@ * w32select.c (Fw32_set_clipboard_data): Update `nbytes' correctly after getting a new string by pre-write-conversion. -2004-06-30 Stefan +2004-06-30 Stefan Monnier * xterm.c (x_detect_focus_change): Remove unused var `nr_events'. (x_calc_absolute_position): Remove unused var `child'. From 91244343b5a5d459656f9eb7f7619a9811016f0c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 13 Oct 2004 18:40:03 +0000 Subject: [PATCH 160/166] (map_char_table): Add missing gcpros. --- src/fns.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fns.c b/src/fns.c index 06d04781789..814babae7d8 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2705,6 +2705,9 @@ map_char_table (c_function, function, table, subtable, arg, depth, indices) int depth; { int i, to; + struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; + + GCPRO4 (arg, table, subtable, function); if (depth == 0) { @@ -2724,7 +2727,10 @@ map_char_table (c_function, function, table, subtable, arg, depth, indices) #if 0 /* If the char table has entries for higher characters, we should report them. */ if (NILP (current_buffer->enable_multibyte_characters)) - return; + { + UNGCPRO; + return; + } #endif to = CHAR_TABLE_ORDINARY_SLOTS; } @@ -2777,6 +2783,7 @@ map_char_table (c_function, function, table, subtable, arg, depth, indices) call2 (function, make_number (c), elt); } } + UNGCPRO; } static void void_call2 P_ ((Lisp_Object a, Lisp_Object b, Lisp_Object c)); From bea55b5bbe11dcb91e5d99f2312d2ab728530a56 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Wed, 13 Oct 2004 18:52:52 +0000 Subject: [PATCH 161/166] (button-activate): Allow a marker to display as an action. --- lisp/button.el | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/button.el b/lisp/button.el index 35905b9e1e4..dcd26846d10 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -78,6 +78,7 @@ Mode-specific keymaps may want to use this as their parent keymap.") (put 'default-button 'mouse-face 'highlight) (put 'default-button 'keymap button-map) (put 'default-button 'type 'button) +;; action may be either a function to call, or a marker to go to (put 'default-button 'action 'ignore) (put 'default-button 'help-echo "mouse-2, RET: Push this button") ;; Make overlay buttons go away if their underlying text is deleted. @@ -217,9 +218,14 @@ changes to a supertype are not reflected in its subtypes)." If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action instead of its normal action; if the button has no mouse-action, the normal action is used instead." - (funcall (or (and use-mouse-action (button-get button 'mouse-action)) - (button-get button 'action)) - button)) + (let ((action (or (and use-mouse-action (button-get button 'mouse-action)) + (button-get button 'action)))) + (if (markerp action) + (save-selected-window + (select-window (display-buffer (marker-buffer action))) + (goto-char action) + (recenter 0)) + (funcall action button)))) (defun button-label (button) "Return BUTTON's text label." @@ -373,10 +379,11 @@ instead of starting at the next button." (defun push-button (&optional pos use-mouse-action) "Perform the action specified by a button at location POS. -POS may be either a buffer position or a mouse-event. -If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action +POS may be either a buffer position or a mouse-event. If +USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action instead of its normal action; if the button has no mouse-action, -the normal action is used instead. +the normal action is used instead. The action may be either a +function to call or a marker to display. POS defaults to point, except when `push-button' is invoked interactively as the result of a mouse-event, in which case, the mouse event is used. From cb32aefcd40eef863c52c25462fd1c0b90e45393 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Wed, 13 Oct 2004 18:54:21 +0000 Subject: [PATCH 162/166] (describe-variable): Use it to make "below" a hyperlink. --- lisp/help-fns.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d193ad344f5..57b0b39767e 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -552,9 +552,15 @@ it is displayed along with the global value." (forward-line 1) (forward-sexp 1) (delete-region (point) (progn (end-of-line) (point))) - (insert " value is shown below.\n\n") (save-excursion - (insert "\n\nValue:")))) + (insert "\n\nValue:") + (set (make-local-variable 'help-button-cache) + (point-marker))) + (insert " value is shown ") + (insert-button "below" + 'action help-button-cache + 'help-echo "mouse-2, RET: show value") + (insert ".\n\n"))) ;; Add a note for variables that have been make-var-buffer-local. (when (and (local-variable-if-set-p variable) (or (not (local-variable-p variable)) From e25e90b4b14db2a4443b614d9b6e2b0968f666f6 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Wed, 13 Oct 2004 19:01:01 +0000 Subject: [PATCH 163/166] (describe-mode): Use marker buttons to make minor mode list into hyperlinks. --- lisp/ChangeLog | 11 ++++++++++ lisp/help.el | 57 +++++++++++++++++++++++++++++++------------------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 034c874de2c..41606eb7e93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2004-10-13 Daniel Pfeiffer + + * button.el (button-activate): Allow a marker to display as an + action. + + * help-fns.el (describe-variable): Use it to make "below" a + hyperlink. + + * help.el (describe-mode): Use it to make minor mode list into + hyperlinks. + 2004-10-14 Masatake YAMATO * progmodes/gud.el (gdb-script-beginning-of-defun): New function. diff --git a/lisp/help.el b/lisp/help.el index bf0df4358a7..5a2867bdc18 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -111,6 +111,9 @@ (define-key help-map "q" 'help-quit) +;; insert-button makes the action nil if it is not store somewhere +(defvar help-button-cache nil) + (defun help-quit () "Just exit from the Help command's command loop." @@ -655,32 +658,42 @@ whose documentation describes the minor mode." (lambda (a b) (string-lessp (car a) (car b))))) (when minor-modes (princ "Summary of minor modes:\n") - (dolist (mode minor-modes) - (let ((pretty-minor-mode (nth 0 mode)) - (indicator (nth 2 mode))) - (princ (format " %s minor mode (%s):\n" - pretty-minor-mode - (if indicator - (format "indicator%s" indicator) - "no indicator"))))) + (make-local-variable 'help-button-cache) + (with-current-buffer standard-output + (dolist (mode minor-modes) + (let ((pretty-minor-mode (nth 0 mode)) + (mode-function (nth 1 mode)) + (indicator (nth 2 mode))) + (add-text-properties 0 (length pretty-minor-mode) + '(face bold) pretty-minor-mode) + (save-excursion + (goto-char (point-max)) + (princ "\n\f\n") + (push (point-marker) help-button-cache) + ;; Document the minor modes fully. + (insert pretty-minor-mode) + (princ (format " minor mode (%s):\n" + (if indicator + (format "indicator%s" indicator) + "no indicator"))) + (princ (documentation mode-function))) + (princ " ") + (insert-button pretty-minor-mode + 'action (car help-button-cache) + 'help-echo "mouse-2, RET: show full information") + (princ (format " minor mode (%s):\n" + (if indicator + (format "indicator%s" indicator) + "no indicator")))))) (princ "\n(Full information about these minor modes follows the description of the major mode.)\n\n")) ;; Document the major mode. - (princ mode-name) + (let ((mode mode-name)) + (with-current-buffer standard-output + (insert mode) + (add-text-properties (- (point) (length mode)) (point) '(face bold)))) (princ " mode:\n") - (princ (documentation major-mode)) - ;; Document the minor modes fully. - (dolist (mode minor-modes) - (let ((pretty-minor-mode (nth 0 mode)) - (mode-function (nth 1 mode)) - (indicator (nth 2 mode))) - (princ "\n\f\n") - (princ (format "%s minor mode (%s):\n" - pretty-minor-mode - (if indicator - (format "indicator%s" indicator) - "no indicator"))) - (princ (documentation mode-function))))) + (princ (documentation major-mode))) (print-help-return-message)))) From 329a7be22c90266a5655490418389a9f2d3f1d8c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 22:05:12 +0000 Subject: [PATCH 164/166] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 7fc1c1688ab..9fedb52f42c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-10-14 Kim F. Storm + + * xterm.h: Include Xutil.h after keysym.h to work around bug + (incorrectly recognising AltGr key) in some X versions. + 2004-10-13 Stefan Monnier * keymap.c (get_keymap): An autoload form is not a keymap. From 7ba426fb285aa6abc6f6657ad8d02a8e55907715 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 13 Oct 2004 22:05:40 +0000 Subject: [PATCH 165/166] Include Xutil.h after keysym.h to work around bug (incorrectly recognising AltGr key) in some X versions. --- src/xterm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xterm.h b/src/xterm.h index 1ff0201928d..ad5374ace6f 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA. */ #include #include -#include #include +#include #include #include From ebbeed623cb9902e520fc67d6d271e222e16867f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 14 Oct 2004 07:33:19 +0000 Subject: [PATCH 166/166] Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-46 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-47 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-48 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-49 Add {arch}/=commit-merge-make-log * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-50 {arch}/=commit-merge-make-log: Don't die if there are no ChangeLog changes --- lisp/gnus/ChangeLog | 11 +++++++++++ lisp/gnus/message.el | 4 ++-- man/ChangeLog | 4 ++++ man/gnus-faq.texi | 11 +++++++---- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 782c2a260a6..292d36ce9e1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,14 @@ +2004-10-13 Katsumi Yamaoka + + * message.el (message-tokenize-header): Fix 2004-09-06 change + which used point-min in the wrong place. + +2004-10-12 Simon Josefsson + + * net/tls.el (tls-certtool-program): New variable. + (tls-certificate-information): New function, based on + ssl-certificate-information. + 2004-10-10 Reiner Steib * gnus-sum.el: Mention that multibyte characters don't work as marks. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bfaf1675703..c9d05d1a0fe 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1615,11 +1615,11 @@ is used by default." (if (not header) nil (let ((regexp (format "[%s]+" (or separator ","))) - (beg (point-min)) (first t) - quoted elems paren) + beg quoted elems paren) (with-temp-buffer (mm-enable-multibyte) + (setq beg (point-min)) (insert header) (goto-char (point-min)) (while (not (eobp)) diff --git a/man/ChangeLog b/man/ChangeLog index 09308d99ba6..8aec01712ef 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2004-10-12 Reiner Steib + + * gnus-faq.texi ([5.9]): Improve code for reply-in-news. + 2004-10-12 Michael Albinus Sync with Tramp 2.0.45. diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi index 6f0fddc5562..5d243f8a02e 100644 --- a/man/gnus-faq.texi +++ b/man/gnus-faq.texi @@ -1776,11 +1776,14 @@ Answer: @example -(defadvice gnus-summary-reply (around reply-in-news activate) +(eval-after-load "gnus-msg" + '(unless (boundp 'gnus-confirm-mail-reply-to-news) + (defadvice gnus-summary-reply (around reply-in-news activate) + "Request confirmation when replying to news." (interactive) - (when (or (not (gnus-news-group-p gnus-newsgroup-name)) - (y-or-n-p "Really reply? ")) - ad-do-it)) + (when (or (not (gnus-news-group-p gnus-newsgroup-name)) + (y-or-n-p "Really reply by mail to article author? ")) + ad-do-it)))) @end example @ifnottex