From 5b631efcca1d76407a069e63f703339505dd01bc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 14 Dec 2004 12:17:04 +0000 Subject: [PATCH 001/104] *** empty log message *** --- lisp/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b9412582379..535c48393f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2004-12-14 Kim F. Storm + + * simple.el (inhibit-mark-movement): Remove defvar. + (beginning-of-buffer, end-of-buffer): Don't use it. + + * emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): Don't + use inhibit-mark-movement. + + * emulation/cua-base.el (cua--preserve-mark-commands): Remove. + (cua--undo-push-mark): Remove. + (cua--pre-command-handler, cua--post-command-handler): Don't + fiddle with inhibit-mark-movement. + 2004-12-14 Juri Linkov * buff-menu.el (list-buffers-noselect): Collect internal info From 24199fe75aa6e8842fd68d02b0f766bb5a67dd44 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 14 Dec 2004 12:17:43 +0000 Subject: [PATCH 002/104] (inhibit-mark-movement): Remove defvar. (beginning-of-buffer, end-of-buffer): Don't use it. --- lisp/simple.el | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 3a55d5f27ca..3c9e8c72428 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -645,10 +645,6 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point." (skip-chars-forward " \t") (constrain-to-field nil orig-pos t))))) -(defvar inhibit-mark-movement nil - "If non-nil, movement commands, such as \\[beginning-of-buffer], \ -do not set the mark.") - (defun beginning-of-buffer (&optional arg) "Move point to the beginning of the buffer; leave mark at previous position. With \\[universal-argument] prefix, do not set mark at previous position. @@ -660,8 +656,7 @@ of the accessible part of the buffer. Don't use this command in Lisp programs! \(goto-char (point-min)) is faster and avoids clobbering the mark." (interactive "P") - (or inhibit-mark-movement - (consp arg) + (or (consp arg) (and transient-mark-mode mark-active) (push-mark)) (let ((size (- (point-max) (point-min)))) @@ -686,8 +681,7 @@ of the accessible part of the buffer. Don't use this command in Lisp programs! \(goto-char (point-max)) is faster and avoids clobbering the mark." (interactive "P") - (or inhibit-mark-movement - (consp arg) + (or (consp arg) (and transient-mark-mode mark-active) (push-mark)) (let ((size (- (point-max) (point-min)))) From 90c08845dffc0f558ea9feab08c4af5091141a71 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 14 Dec 2004 12:18:11 +0000 Subject: [PATCH 003/104] (beginning-of-defun, end-of-defun): Don't use inhibit-mark-movement. --- lisp/emacs-lisp/lisp.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 090f793c700..82882d6c2b7 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -192,8 +192,7 @@ open-parenthesis, and point ends up at the beginning of the line. If variable `beginning-of-defun-function' is non-nil, its value is called as a function to find the defun's beginning." (interactive "p") - (or inhibit-mark-movement - (not (eq this-command 'beginning-of-defun)) + (or (not (eq this-command 'beginning-of-defun)) (eq last-command 'beginning-of-defun) (and transient-mark-mode mark-active) (push-mark)) @@ -245,8 +244,7 @@ matches the open-parenthesis that starts a defun; see function If variable `end-of-defun-function' is non-nil, its value is called as a function to find the defun's end." (interactive "p") - (or inhibit-mark-movement - (not (eq this-command 'end-of-defun)) + (or (not (eq this-command 'end-of-defun)) (eq last-command 'end-of-defun) (and transient-mark-mode mark-active) (push-mark)) From 5acfef08ad2824e06abf75b7d271e9b97547b6c5 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 14 Dec 2004 12:18:30 +0000 Subject: [PATCH 004/104] (cua--preserve-mark-commands): Remove. (cua--undo-push-mark): Remove. (cua--pre-command-handler, cua--post-command-handler): Don't fiddle with inhibit-mark-movement. --- lisp/emulation/cua-base.el | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 523a07d26de..24adae30040 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1003,14 +1003,6 @@ Extra commands should be added to `cua-movement-commands'") (defvar cua-movement-commands nil "User may add additional movement commands to this list.") -(defvar cua--preserve-mark-commands - '(end-of-buffer beginning-of-buffer) - "List of movement commands that move the mark. -CUA will preserve the previous mark position if a mark is already -active before one of these commands is executed.") - -(defvar cua--undo-push-mark nil) - ;;; Scrolling commands which does not signal errors at top/bottom ;;; of buffer at first key-press (instead moves to top/bottom ;;; of buffer). @@ -1100,11 +1092,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." (aref (if window-system (this-single-command-raw-keys) (this-single-command-keys)) 0))) - (if mark-active - (if (and (memq this-command cua--preserve-mark-commands) - (not inhibit-mark-movement)) - (setq cua--undo-push-mark t - inhibit-mark-movement t)) + (unless mark-active (push-mark-command nil t)) (setq cua--last-region-shifted t) (setq cua--explicit-region-start nil)) @@ -1151,9 +1139,6 @@ If ARG is the atom `-', scroll upward by nearly full screen." (defun cua--post-command-handler () (condition-case nil (progn - (when cua--undo-push-mark - (setq cua--undo-push-mark nil - inhibit-mark-movement nil)) (when cua--global-mark-active (cua--global-mark-post-command)) (when (fboundp 'cua--rectangle-post-command) From b8217ea67a9d935db5f1f5387ae3f05ba16222d9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 14 Dec 2004 14:20:44 +0000 Subject: [PATCH 005/104] *** empty log message *** --- src/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ChangeLog b/src/ChangeLog index 7e21c345192..f377cad5e74 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -143,6 +143,7 @@ * eval.c (Fcalled_interactively_p): Don't check INTERACTIVE. (interactive_p): Skip Scalled_interactively_p frames like Sinteractive_p frames. + (unwind_to_catch): Clear handling_signal. * data.c (Fmake_variable_buffer_local): Doc fix. (Fmake_local_variable): Doc fix. From 2a84c6da58ee6b4519a0b7167d0cc978dc51c4b2 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 15 Dec 2004 00:06:46 +0000 Subject: [PATCH 006/104] (Vthrow_on_input): New variable. (syms_of_keyboard): Defvar and initialize it. (kbd_buffer_store_event_hold): Handle Vthrow_on_input. --- src/ChangeLog | 5 +++++ src/keyboard.c | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index f377cad5e74..84955d3b0ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-14 Kim F. Storm + + * keyboard.c (read_char): Save and restore echo_string when + handling input method. + 2004-12-13 Richard M. Stallman * eval.c (syms_of_eval) : Doc fix. diff --git a/src/keyboard.c b/src/keyboard.c index 4203619863b..b1f8a55507d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3580,6 +3580,9 @@ event_to_kboard (event) } #endif + +Lisp_Object Vthrow_on_input; + /* Store an event obtained at interrupt level into kbd_buffer, fifo */ void @@ -3705,6 +3708,14 @@ kbd_buffer_store_event_hold (event, hold_quit) *kbd_store_ptr = *event; ++kbd_store_ptr; } + + /* If we're in a section that requested to be interrupted as soon + as input comes, then set quit-flag to cause an interrupt. */ + if (!NILP (Vthrow_on_input) + && event->kind != FOCUS_IN_EVENT + && event->kind != HELP_EVENT + && event->kind != DEICONIFY_EVENT) + Vquit_flag = Vthrow_on_input; } @@ -11377,6 +11388,12 @@ Used during Emacs' startup. */); doc: /* *How long to display an echo-area message when the minibuffer is active. If the value is not a number, such messages don't time out. */); Vminibuffer_message_timeout = make_number (2); + + DEFVAR_LISP ("throw-on-input", &Vthrow_on_input, + doc: /* If non-nil, any keyboard input throws to this symbol. +The value of that variable is passed to `quit-flag' and later causes a +peculiar kind of quitting. */); + Vthrow_on_input = Qnil; } void From dc29116a4bcba415123375ff64a21999f246fef2 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 15 Dec 2004 00:07:15 +0000 Subject: [PATCH 007/104] (read_char): Save and restore echo_string when handling input method. --- src/keyboard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index b1f8a55507d..95de9c2c6ad 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3044,6 +3044,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) /* Save the echo status. */ int saved_immediate_echo = current_kboard->immediate_echo; struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause; + Lisp_Object saved_echo_string = current_kboard->echo_string; int saved_echo_after_prompt = current_kboard->echo_after_prompt; #if 0 @@ -3098,6 +3099,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) cancel_echoing (); ok_to_echo_at_next_pause = saved_ok_to_echo; + current_kboard->echo_string = saved_echo_string; current_kboard->echo_after_prompt = saved_echo_after_prompt; if (saved_immediate_echo) echo_now (); From d3d89631eb9fb420668d8a7b2c0c67492a773018 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 15 Dec 2004 01:26:57 +0000 Subject: [PATCH 008/104] *** empty log message *** --- etc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 23401937003..c148f1a37a0 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2004-12-15 Nick Roberts + + * DEBUG: Change printing example to break on a procedure name. + 2004-12-11 Dan Nicolaescu * e/eterm.ti: Add rs1. From aa1f38cdfb6bb5094ed872a891e057258175374b Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 15 Dec 2004 01:27:48 +0000 Subject: [PATCH 009/104] Change printing example to break on a procedure name. --- etc/DEBUG | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/etc/DEBUG b/etc/DEBUG index 6419b3dfd81..abb49143a05 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -107,36 +107,32 @@ objects which you can examine in turn with the x... commands. Even with a live process, these x... commands are useful for examining the fields in a buffer, window, process, frame or marker. Here's an example using concepts explained in the node "Value History" -of the GDB manual to print the variable frame from this line in -xmenu.c: - - buf.frame_or_window = frame; - -First, use these commands: +of the GDB manual to print values associated with the variable +called frame. First, use these commands: cd src gdb emacs - b xmenu.c:1296 + b set_frame_buffer_list r -q -Then type C-x 5 2 to create a new frame, and it hits the breakpoint: +Then when Emacs it hits the breakpoint: (gdb) p frame - $1 = 1077872640 + $1 = 139854428 (gdb) xtype Lisp_Vectorlike PVEC_FRAME (gdb) xframe - $2 = (struct frame *) 0x3f0800 + $2 = (struct frame *) 0x8560258 (gdb) p *$ $3 = { - size = 536871989, - next = 0x366240, - name = 809661752, + size = 1073742931, + next = 0x85dfe58, + name = 140615219, [...] } (gdb) p $3->name - $4 = 809661752 + $4 = 140615219 Now we can use `pr' to print the name of the frame: From 07ce2eb3f84f2ffd798fa711efc5d3cf8c74a62d Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 15 Dec 2004 06:33:24 +0000 Subject: [PATCH 010/104] Consistently capitalized all mode names. (Answers to Exercises): Mention that an answer can be a fraction when in Fraction mode. --- man/calc.texi | 440 +++++++++++++++++++++++++------------------------- 1 file changed, 220 insertions(+), 220 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 16447e4e953..8dfa75c6ded 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -463,7 +463,7 @@ Algebraic manipulation features, including symbolic calculus. Moving data to and from regular editing buffers. @item -``Embedded mode'' for manipulating Calc formulas and data directly +Embedded mode for manipulating Calc formulas and data directly inside any editing buffer. @item @@ -766,7 +766,7 @@ To exit from Calc, press @kbd{q} or @kbd{M-# c} again. @noindent Calc has several user interfaces that are specialized for different kinds of tasks. As well as Calc's standard interface, -there are Quick Mode, Keypad Mode, and Embedded Mode. +there are Quick mode, Keypad mode, and Embedded mode. @menu * Starting Calc:: @@ -801,7 +801,7 @@ doesn't matter for @kbd{M-#}) that says which Calc interface you want to use. To get Calc's standard interface, type @kbd{M-# c}. To get -Keypad Mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief +Keypad mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief list of the available options, and type a second @kbd{?} to get a complete list. @@ -814,7 +814,7 @@ function key twice is just like hitting @kbd{M-# M-#}.) If @kbd{M-#} doesn't work for you, you can always type explicit commands like @kbd{M-x calc} (for the standard user interface) or -@w{@kbd{M-x calc-keypad}} (for Keypad Mode). First type @kbd{M-x} +@w{@kbd{M-x calc-keypad}} (for Keypad mode). First type @kbd{M-x} (that's Meta with the letter @kbd{x}), then, at the prompt, type the full command (like @kbd{calc-keypad}) and press Return. @@ -917,11 +917,11 @@ way to switch out of Calc momentarily to edit your file; type @subsection Quick Mode (Overview) @noindent -@dfn{Quick Mode} is a quick way to use Calc when you don't need the +@dfn{Quick mode} is a quick way to use Calc when you don't need the full complexity of the stack and trail. To use it, type @kbd{M-# q} (@code{quick-calc}) in any regular editing buffer. -Quick Mode is very simple: It prompts you to type any formula in +Quick mode is very simple: It prompts you to type any formula in standard algebraic notation (like @samp{4 - 2/3}) and then displays the result at the bottom of the Emacs screen (@mathit{3.33333333333} in this case). You are then back in the same editing buffer you @@ -930,7 +930,7 @@ again to do another quick calculation. The result of the calculation will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command at this point will yank the result into your editing buffer. -Calc mode settings affect Quick Mode, too, though you will have to +Calc mode settings affect Quick mode, too, though you will have to go into regular Calc (with @kbd{M-# c}) to change the mode settings. @c [fix-ref Quick Calculator mode] @@ -940,12 +940,12 @@ go into regular Calc (with @kbd{M-# c}) to change the mode settings. @subsection Keypad Mode (Overview) @noindent -@dfn{Keypad Mode} is a mouse-based interface to the Calculator. +@dfn{Keypad mode} is a mouse-based interface to the Calculator. It is designed for use with terminals that support a mouse. If you -don't have a mouse, you will have to operate keypad mode with your +don't have a mouse, you will have to operate Keypad mode with your arrow keys (which is probably more trouble than it's worth). -Type @kbd{M-# k} to turn Keypad Mode on or off. Once again you +Type @kbd{M-# k} to turn Keypad mode on or off. Once again you get two new windows, this time on the righthand side of the screen instead of at the bottom. The upper window is the familiar Calc Stack; the lower window is a picture of a typical calculator keypad. @@ -981,12 +981,12 @@ Stack; the lower window is a picture of a typical calculator keypad. |-----+-----+-----+-----+-----+ @end smallexample -Keypad Mode is much easier for beginners to learn, because there +Keypad mode is much easier for beginners to learn, because there is no need to memorize lots of obscure key sequences. But not all commands in regular Calc are available on the Keypad. You can always switch the cursor into the Calc stack window to use standard Calc commands if you need. Serious Calc users, though, -often find they prefer the standard interface over Keypad Mode. +often find they prefer the standard interface over Keypad mode. To operate the Calculator, just click on the ``buttons'' of the keypad using your left mouse button. To enter the two numbers @@ -999,13 +999,13 @@ keypad change to show other sets of commands, such as advanced math functions, vector operations, and operations on binary numbers. -Because Keypad Mode doesn't use the regular keyboard, Calc leaves +Because Keypad mode doesn't use the regular keyboard, Calc leaves the cursor in your original editing buffer. You can type in this buffer in the usual way while also clicking on the Calculator -keypad. One advantage of Keypad Mode is that you don't need an +keypad. One advantage of Keypad mode is that you don't need an explicit command to switch between editing and calculating. -If you press @kbd{M-# b} first, you get a full-screen Keypad Mode +If you press @kbd{M-# b} first, you get a full-screen Keypad mode (@code{full-calc-keypad}) with three windows: The keypad in the lower left, the stack in the lower right, and the trail on top. @@ -1043,7 +1043,7 @@ itself. @subsection Embedded Mode (Overview) @noindent -@dfn{Embedded Mode} is a way to use Calc directly from inside an +@dfn{Embedded mode} is a way to use Calc directly from inside an editing buffer. Suppose you have a formula written as part of a document like this: @@ -1060,7 +1060,7 @@ is @noindent and you wish to have Calc compute and format the derivative for you and store this derivative in the buffer automatically. To -do this with Embedded Mode, first copy the formula down to where +do this with Embedded mode, first copy the formula down to where you want the result to be: @smallexample @@ -1099,7 +1099,7 @@ is @end smallexample To make this look nicer, you might want to press @kbd{d =} to center -the formula, and even @kbd{d B} to use ``big'' display mode. +the formula, and even @kbd{d B} to use Big display mode. @smallexample @group @@ -1139,7 +1139,7 @@ righthand label: Type @kbd{d @} (1) @key{RET}}. @end group @end smallexample -To leave Embedded Mode, type @kbd{M-# e} again. The mode line +To leave Embedded mode, type @kbd{M-# e} again. The mode line and keyboard will revert to the way they were before. (If you have actually been trying this as you read along, you'll want to press @kbd{M-# 0} [with the digit zero] now to reset the modes you changed.) @@ -1154,7 +1154,7 @@ A slope of one-third corresponds to an angle of 1 degrees. @end smallexample Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable -Embedded Mode on that number. Now type @kbd{3 /} (to get one-third), +Embedded mode on that number. Now type @kbd{3 /} (to get one-third), and @kbd{I T} (the Inverse Tangent converts a slope into an angle), then @w{@kbd{M-# w}} again to exit Embedded mode. @@ -1221,7 +1221,7 @@ move it out of that window. Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen. @item Q -Use Quick Mode for a single short calculation. +Use Quick mode for a single short calculation. @item K Turn Calc Keypad mode on or off. @@ -1270,7 +1270,7 @@ Yank a value from the Calculator into the current editing buffer. @end iftex @noindent -Commands for use with Embedded Mode: +Commands for use with Embedded mode: @table @kbd @item A @@ -1478,9 +1478,9 @@ to skip on to the rest of this manual. @c [fix-ref Embedded Mode] This tutorial describes the standard user interface of Calc only. -The ``Quick Mode'' and ``Keypad Mode'' interfaces are fairly +The Quick mode and Keypad mode interfaces are fairly self-explanatory. @xref{Embedded Mode}, for a description of -the ``Embedded Mode'' interface. +the Embedded mode interface. @ifinfo The easiest way to read this tutorial on-line is to have two windows on @@ -1940,8 +1940,8 @@ entire stack.) @noindent If you are not used to RPN notation, you may prefer to operate the -Calculator in ``algebraic mode,'' which is closer to the way -non-RPN calculators work. In algebraic mode, you enter formulas +Calculator in Algebraic mode, which is closer to the way +non-RPN calculators work. In Algebraic mode, you enter formulas in traditional @expr{2+3} notation. You don't really need any special ``mode'' to enter algebraic formulas. @@ -2005,15 +2005,15 @@ that @samp{^} is evaluated from right to left. Thus, @samp{2-3-4} is equivalent to @samp{(2-3)-4} or @mathit{-5}, whereas @samp{2^3^4} is equivalent to @samp{2^(3^4)} (a very large integer; try it!). -If you tire of typing the apostrophe all the time, there is an -``algebraic mode'' you can select in which Calc automatically senses +If you tire of typing the apostrophe all the time, there is +Algebraic mode, where Calc automatically senses when you are about to type an algebraic expression. To enter this mode, press the two letters @w{@kbd{m a}}. (An @samp{Alg} indicator should appear in the Calc window's mode line.) Press @kbd{m a}, then @kbd{2+3+4} with no apostrophe, then @key{RET}. -In algebraic mode, when you press any key that would normally begin +In Algebraic mode, when you press any key that would normally begin entering a number (such as a digit, a decimal point, or the @kbd{_} key), or if you press @kbd{(} or @kbd{[}, Calc automatically begins an algebraic entry. @@ -2028,7 +2028,7 @@ Press the apostrophe, then type @kbd{sqrt(5*2) - 3}. The result should be @expr{0.16227766017}. Note that if the formula begins with a function name, you need to use -the apostrophe even if you are in algebraic mode. If you type @kbd{arcsin} +the apostrophe even if you are in Algebraic mode. If you type @kbd{arcsin} out of the blue, the @kbd{a r} will be taken as an Algebraic Rewrite command, and the @kbd{csin} will be taken as the name of the rewrite rule to use! @@ -2037,7 +2037,7 @@ Some people prefer to enter complex numbers and vectors in algebraic form because they find RPN entry with incomplete objects to be too distracting, even though they otherwise use Calc as an RPN calculator. -Still in algebraic mode, type: +Still in Algebraic mode, type: @smallexample @group @@ -2053,15 +2053,15 @@ Algebraic mode allows us to enter complex numbers without pressing an apostrophe first, but it also means we need to press @key{RET} after every entry, even for a simple number like @expr{1}. -(You can type @kbd{C-u m a} to enable a special ``incomplete algebraic -mode'' in which the @kbd{(} and @kbd{[} keys use algebraic entry even +(You can type @kbd{C-u m a} to enable a special Incomplete Algebraic +mode in which the @kbd{(} and @kbd{[} keys use algebraic entry even though regular numeric keys still use RPN numeric entry. There is also -a ``total algebraic mode,'' started by typing @kbd{m t}, in which all +Total Algebraic mode, started by typing @kbd{m t}, in which all normal keys begin algebraic entry. You must then use the @key{META} key -to type Calc commands: @kbd{M-m t} to get back out of total algebraic +to type Calc commands: @kbd{M-m t} to get back out of Total Algebraic mode, @kbd{M-q} to quit, etc.) -If you're still in algebraic mode, press @kbd{m a} again to turn it off. +If you're still in Algebraic mode, press @kbd{m a} again to turn it off. Actual non-RPN calculators use a mixture of algebraic and RPN styles. In general, operators of two numbers (like @kbd{+} and @kbd{*}) @@ -2376,7 +2376,7 @@ during entry of a number or algebraic formula. @noindent Calc has many types of @dfn{modes} that affect the way it interprets your commands or the way it displays data. We have already seen one -mode, namely algebraic mode. There are many others, too; we'll +mode, namely Algebraic mode. There are many others, too; we'll try some of the most common ones here. Perhaps the most fundamental mode in Calc is the current @dfn{precision}. @@ -2795,7 +2795,7 @@ and vice-versa. @end group @end smallexample -Another interesting mode is @dfn{fraction mode}. Normally, +Another interesting mode is @dfn{Fraction mode}. Normally, dividing two integers produces a floating-point result if the quotient can't be expressed as an exact integer. Fraction mode causes integer division to produce a fraction, i.e., a rational @@ -2819,7 +2819,7 @@ You can enter a fraction at any time using @kbd{:} notation. (Calc uses @kbd{:} instead of @kbd{/} as the fraction separator because @kbd{/} is already used to divide the top two stack elements.) Calculations involving fractions will always -produce exact fractional results; fraction mode only says +produce exact fractional results; Fraction mode only says what to do when dividing two integers. @cindex Fractions vs. floats @@ -2830,7 +2830,7 @@ why would you ever use floating-point numbers instead? Typing @kbd{m f} doesn't change any existing values in the stack. In the above example, we had to Undo the division and do it over -again when we changed to fraction mode. But if you use the +again when we changed to Fraction mode. But if you use the evaluates-to operator you can get commands like @kbd{m f} to recompute for you. @@ -2846,7 +2846,7 @@ recompute for you. @noindent In this example, the righthand side of the @samp{=>} operator on the stack is recomputed when we change the precision, then -again when we change to fraction mode. All @samp{=>} expressions +again when we change to Fraction mode. All @samp{=>} expressions on the stack are recomputed every time you change any mode that might affect their values. @@ -4530,7 +4530,7 @@ with the symbol @code{nan} (for Not A Number). Dividing by zero is normally treated as an error, but you can get Calc to write an answer in terms of infinity by pressing @kbd{m i} -to turn on ``infinite mode.'' +to turn on Infinite mode. @smallexample @group @@ -4960,7 +4960,7 @@ formulas. @subsection Basic Algebra @noindent -If you enter a formula in algebraic mode that refers to variables, +If you enter a formula in Algebraic mode that refers to variables, the formula itself is pushed onto the stack. You can manipulate formulas as regular data objects. @@ -5181,7 +5181,7 @@ polynomial? (The answer will be unique to within a constant multiple; choose the solution where the leading coefficient is one.) @xref{Algebra Answer 2, 2}. (@bullet{}) -The @kbd{m s} command enables ``symbolic mode,'' in which formulas +The @kbd{m s} command enables Symbolic mode, in which formulas like @samp{sqrt(5)} that can't be evaluated exactly are left in symbolic form rather than giving a floating-point approximate answer. Fraction mode (@kbd{m f}) is also useful when doing algebra. @@ -5196,7 +5196,7 @@ Fraction mode (@kbd{m f}) is also useful when doing algebra. @end group @end smallexample -One more mode that makes reading formulas easier is ``Big mode.'' +One more mode that makes reading formulas easier is Big mode. @smallexample @group @@ -5344,7 +5344,7 @@ also have used plain @kbd{v x} as follows: @kbd{v x 10 @key{RET} 9 + .1 *}.) @noindent (If you got wildly different results, did you remember to switch -to radians mode?) +to Radians mode?) Here we have divided the curve into ten segments of equal width; approximating these segments as rectangular boxes (i.e., assuming @@ -5600,7 +5600,7 @@ only once and stores the compiled form along with the variable. That's another good reason to store your rules in variables rather than entering them on the fly. -(@bullet{}) @strong{Exercise 1.} Type @kbd{m s} to get symbolic +(@bullet{}) @strong{Exercise 1.} Type @kbd{m s} to get Symbolic mode, then enter the formula @samp{@w{(2 + sqrt(2))} / @w{(1 + sqrt(2))}}. Using a rewrite rule, simplify this formula by multiplying both sides by the conjugate @w{@samp{1 - sqrt(2)}}. The result will have @@ -5859,11 +5859,11 @@ so that @expr{2 - 3 (x + y) + x y} is a sum of three terms.) @xref{Rewrites Answer 5, 5}. (@bullet{}) (@bullet{}) @strong{Exercise 6.} Calc considers the form @expr{0^0} -to be ``indeterminate,'' and leaves it unevaluated (assuming infinite +to be ``indeterminate,'' and leaves it unevaluated (assuming Infinite mode is not enabled). Some people prefer to define @expr{0^0 = 1}, so that the identity @expr{x^0 = 1} can safely be used for all @expr{x}. Find a way to make Calc follow this convention. What happens if you -now type @kbd{m i} to turn on infinite mode? +now type @kbd{m i} to turn on Infinite mode? @xref{Rewrites Answer 6, 6}. (@bullet{}) (@bullet{}) @strong{Exercise 7.} A Taylor series for a function is an @@ -6838,7 +6838,7 @@ the result will be zero because Calc uses the general rule that ``zero times anything is zero.'' @c [fix-ref Infinities] -The @kbd{m i} command enables an @dfn{infinite mode} in which @expr{1 / 0} +The @kbd{m i} command enables an @dfn{Infinite mode} in which @expr{1 / 0} results in a special symbol that represents ``infinity.'' If you multiply infinity by zero, Calc uses another special new symbol to show that the answer is ``indeterminate.'' @xref{Infinities}, for @@ -7002,7 +7002,7 @@ The result, when converted to an integer, will be off by 106. Here are two solutions: Raise the precision enough that the floating-point round-off error is strictly to the right of the -decimal point. Or, convert to fraction mode so that @expr{123456789 / 2} +decimal point. Or, convert to Fraction mode so that @expr{123456789 / 2} produces the exact fraction @expr{123456789:2}, which can be rounded down by the @kbd{F} command without ever switching to floating-point format. @@ -7015,9 +7015,9 @@ format. does a floating-point calculation instead and produces @expr{1.5}. Calc will find an exact result for a logarithm if the result is an integer -or the reciprocal of an integer. But there is no efficient way to search -the space of all possible rational numbers for an exact answer, so Calc -doesn't try. +or (when in Fraction mode) the reciprocal of an integer. But there is +no efficient way to search the space of all possible rational numbers +for an exact answer, so Calc doesn't try. @node Vector Answer 1, Vector Answer 2, Arithmetic Answer 2, Answers to Exercises @subsection Vector Tutorial Exercise 1 @@ -7089,7 +7089,7 @@ matrix as usual. @end group @end smallexample -This can be made more readable using @kbd{d B} to enable ``big'' display +This can be made more readable using @kbd{d B} to enable Big display mode: @smallexample @@ -7100,7 +7100,7 @@ mode: @end group @end smallexample -Type @kbd{d N} to return to ``normal'' display mode afterwards. +Type @kbd{d N} to return to Normal display mode afterwards. @node Matrix Answer 3, List Answer 1, Matrix Answer 2, Answers to Exercises @subsection Matrix Tutorial Exercise 3 @@ -8247,7 +8247,7 @@ so it settles for the conservative answer @code{uinf}. @samp{ln(0) = -inf}. Here we have an infinite answer to a finite input. As in the @expr{1 / 0} case, Calc will only use infinities -here if you have turned on ``infinite'' mode. Otherwise, it will +here if you have turned on Infinite mode. Otherwise, it will treat @samp{ln(0)} as an error. @node Types Answer 3, Types Answer 4, Types Answer 2, Answers to Exercises @@ -8461,7 +8461,7 @@ Calc normally treats division by zero as an error, so that the formula @w{@samp{1 / [0 .. 10]}}, also (potentially) divides by zero because zero is now a member of the interval. So Calc leaves this one unevaluated, too. -If you turn on ``infinite'' mode by pressing @kbd{m i}, you will +If you turn on Infinite mode by pressing @kbd{m i}, you will instead get the answer @samp{[0.1 .. inf]}, which includes infinity as a possible value. @@ -9124,7 +9124,7 @@ But then: @end group @end smallexample -Perhaps more surprisingly, this rule still works with infinite mode +Perhaps more surprisingly, this rule still works with Infinite mode turned on. Calc tries @code{EvalRules} before any built-in rules for a function. This allows you to override the default behavior of any Calc feature: Even though Calc now wants to evaluate @expr{0^0} to @@ -9889,10 +9889,10 @@ By default this creates a pair of small windows, @samp{*Calculator*} and @samp{*Calc Trail*}. The former displays the contents of the Calculator stack and is manipulated exclusively through Calc commands. It is possible (though not usually necessary) to create several Calc -Mode buffers each of which has an independent stack, undo list, and +mode buffers each of which has an independent stack, undo list, and mode settings. There is exactly one Calc Trail buffer; it records a list of the results of all calculations that have been done. The -Calc Trail buffer uses a variant of Calc Mode, so Calculator commands +Calc Trail buffer uses a variant of Calc mode, so Calculator commands still work when the trail buffer's window is selected. It is possible to turn the trail window off, but the @samp{*Calc Trail*} buffer itself still exists and is updated silently. @xref{Trail Commands}. @@ -9906,7 +9906,7 @@ still exists and is updated silently. @xref{Trail Commands}. In most installations, the @kbd{M-# c} key sequence is a more convenient way to start the Calculator. Also, @kbd{M-# M-#} and @kbd{M-# #} are synonyms for @kbd{M-# c} unless you last used Calc -in its ``keypad'' mode. +in its Keypad mode. @kindex x @kindex M-x @@ -9978,7 +9978,7 @@ the keys with the mouse to operate the calculator. @xref{Keypad Mode}. @pindex calc-quit @cindex Quitting the Calculator @cindex Exiting the Calculator -The @kbd{q} key (@code{calc-quit}) exits Calc Mode and closes the +The @kbd{q} key (@code{calc-quit}) exits Calc mode and closes the Calculator's window(s). It does not delete the Calculator buffers. If you type @kbd{M-x calc} again, the Calculator will reappear with the contents of the stack intact. Typing @kbd{M-# c} or @kbd{M-# M-#} @@ -10278,7 +10278,7 @@ expressions in this way. You may want to use @key{DEL} every so often to clear previous results off the stack. You can press the apostrophe key during normal numeric entry to switch -the half-entered number into algebraic entry mode. One reason to do this +the half-entered number into Algebraic entry mode. One reason to do this would be to use the full Emacs cursor motion and editing keys, which are available during algebraic entry but not during numeric entry. @@ -10289,7 +10289,7 @@ you complete your half-finished entry in a separate buffer. @kindex m a @pindex calc-algebraic-mode -@cindex Algebraic mode +@cindex Algebraic Mode If you prefer algebraic entry, you can use the command @kbd{m a} (@code{calc-algebraic-mode}) to set Algebraic mode. In this mode, digits and other keys that would normally start numeric entry instead @@ -10300,7 +10300,7 @@ but you will have to press @key{RET} to terminate every number: @kbd{2 @key{RET} 3 @key{RET} * 4 @key{RET} +} would accomplish the same thing as @kbd{2*3+4 @key{RET}}. -@cindex Incomplete algebraic mode +@cindex Incomplete Algebraic Mode If you give a numeric prefix argument like @kbd{C-u} to the @kbd{m a} command, it enables Incomplete Algebraic mode; this is like regular Algebraic mode except that it applies to the @kbd{(} and @kbd{[} keys @@ -10308,15 +10308,15 @@ only. Numeric keys still begin a numeric entry in this mode. @kindex m t @pindex calc-total-algebraic-mode -@cindex Total algebraic mode +@cindex Total Algebraic Mode The @kbd{m t} (@code{calc-total-algebraic-mode}) gives you an even stronger algebraic-entry mode, in which @emph{all} regular letter and punctuation keys begin algebraic entry. Use this if you prefer typing @w{@kbd{sqrt( )}} instead of @kbd{Q}, @w{@kbd{factor( )}} instead of @kbd{a f}, and so on. To type regular Calc commands when you are in -``total'' algebraic mode, hold down the @key{META} key. Thus @kbd{M-q} +Total Algebraic mode, hold down the @key{META} key. Thus @kbd{M-q} is the command to quit Calc, @kbd{M-p} sets the precision, and -@kbd{M-m t} (or @kbd{M-m M-t}, if you prefer) turns total algebraic +@kbd{M-m t} (or @kbd{M-m M-t}, if you prefer) turns Total Algebraic mode back off again. Meta keys also terminate algebraic entry, so that @kbd{2+3 M-S} is equivalent to @kbd{2+3 @key{RET} M-S}. The symbol @samp{Alg*} will appear in the mode line whenever you are in this mode. @@ -10577,7 +10577,7 @@ that you must always press @kbd{w} yourself to see the messages). @noindent @pindex another-calc -It is possible to have any number of Calc Mode buffers at once. +It is possible to have any number of Calc mode buffers at once. Usually this is done by executing @kbd{M-x another-calc}, which is similar to @kbd{M-# c} except that if a @samp{*Calculator*} buffer already exists, a new, independent one with a name of the @@ -10792,7 +10792,7 @@ The Calculator stores integers to arbitrary precision. Addition, subtraction, and multiplication of integers always yields an exact integer result. (If the result of a division or exponentiation of integers is not an integer, it is expressed in fractional or -floating-point form according to the current Fraction Mode. +floating-point form according to the current Fraction mode. @xref{Fraction Mode}.) A decimal integer is represented as an optional sign followed by a @@ -10818,7 +10818,7 @@ A @dfn{fraction} is a ratio of two integers. Fractions are traditionally written ``2/3'' but Calc uses the notation @samp{2:3}. (The @kbd{/} key performs RPN division; the following two sequences push the number @samp{2:3} on the stack: @kbd{2 :@: 3 @key{RET}}, or @kbd{2 @key{RET} 3 /} -assuming Fraction Mode has been enabled.) +assuming Fraction mode has been enabled.) When the Calculator produces a fractional result it always reduces it to simplest form, which may in fact be an integer. @@ -10932,7 +10932,7 @@ Complex numbers are entered in stages using incomplete objects. Operations on rectangular complex numbers yield rectangular complex results, and similarly for polar complex numbers. Where the two types are mixed, or where new complex numbers arise (as for the square root of -a negative real), the current @dfn{Polar Mode} is used to determine the +a negative real), the current @dfn{Polar mode} is used to determine the type. @xref{Polar Mode}. A complex result in which the imaginary part is zero (or the phase angle @@ -11020,7 +11020,7 @@ infinity, it's just that @emph{which} number it stands for cannot be determined.) In Calc's notation, @samp{0 * inf = nan} and @samp{inf / inf = nan}. A few other common indeterminate expressions are @samp{inf - inf} and @samp{inf ^ 0}. Also, -@samp{0 / 0 = nan} if you have turned on ``infinite mode'' +@samp{0 / 0 = nan} if you have turned on Infinite mode (as described above). Infinities are especially useful as parts of @dfn{intervals}. @@ -11586,10 +11586,10 @@ rather than @samp{1 ..@: 0.1e2}. Add spaces or zeros if you want to get the other interpretation. If you omit the lower or upper limit, a default of @samp{-inf} or @samp{inf} (respectively) is furnished. -``Infinite mode'' also affects operations on intervals +Infinite mode also affects operations on intervals (@pxref{Infinities}). Calc will always introduce an open infinity, as in @samp{1 / (0 .. 2] = [0.5 .. inf)}. But closed infinities, -@w{@samp{1 / [0 .. 2] = [0.5 .. inf]}}, arise only in infinite mode; +@w{@samp{1 / [0 .. 2] = [0.5 .. inf]}}, arise only in Infinite mode; otherwise they are left unevaluated. Note that the ``direction'' of a zero is not an issue in this case since the zero is always assumed to be continuous with the rest of the interval. For intervals that @@ -11904,7 +11904,7 @@ Commands that interpret (``parse'') text as algebraic formulas include algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse the contents of the editing buffer when you finish, the @kbd{M-# g} and @w{@kbd{M-# r}} commands, the @kbd{C-y} command, the X window system -``paste'' mouse operation, and Embedded Mode. All of these operations +``paste'' mouse operation, and Embedded mode. All of these operations use the same rules for parsing formulas; in particular, language modes (@pxref{Language Modes}) affect them all in the same way. @@ -12313,7 +12313,7 @@ Otherwise, the new mode information is appended to the end of the file. @pindex calc-mode-record-mode The @kbd{m R} (@code{calc-mode-record-mode}) command tells Calc to record the new mode settings (as if by pressing @kbd{m m}) every -time a mode setting changes. If Embedded Mode is enabled, other +time a mode setting changes. If Embedded mode is enabled, other options are available; @pxref{Mode Settings in Embedded Mode}. @kindex m F @@ -12494,7 +12494,7 @@ Functions that compute angles produce a number in radians, a number in degrees, or an HMS form depending on the current angular mode. If the result is a complex number and the current mode is HMS, the number is instead expressed in degrees. (Complex-number calculations would -normally be done in radians mode, though. Complex numbers are converted +normally be done in Radians mode, though. Complex numbers are converted to degrees by calculating the complex result in radians and then multiplying by 180 over @cpi{}.) @@ -12507,7 +12507,7 @@ multiplying by 180 over @cpi{}.) The @kbd{m r} (@code{calc-radians-mode}), @kbd{m d} (@code{calc-degrees-mode}), and @kbd{m h} (@code{calc-hms-mode}) commands control the angular mode. The current angular mode is displayed on the Emacs mode line. -The default angular mode is degrees. +The default angular mode is Degrees. @node Polar Mode, Fraction Mode, Angular Modes, Calculation Modes @subsection Polar Mode @@ -12523,7 +12523,7 @@ number, or by entering @kbd{( 2 @key{SPC} 3 )}. @kindex m p @pindex calc-polar-mode The @kbd{m p} (@code{calc-polar-mode}) command toggles complex-number -preference between rectangular and polar forms. In polar mode, all +preference between rectangular and polar forms. In Polar mode, all of the above example situations would produce polar complex numbers. @node Fraction Mode, Infinite Mode, Polar Mode, Calculation Modes @@ -12543,8 +12543,8 @@ even though @kbd{6 @key{RET} 4 /} produces @expr{1.5}. To set the Calculator to produce fractional results for normal integer divisions, use the @kbd{m f} (@code{calc-frac-mode}) command. For example, @expr{8/4} produces @expr{2} in either mode, -but @expr{6/4} produces @expr{3:2} in Fraction Mode, @expr{1.5} in -Float Mode. +but @expr{6/4} produces @expr{3:2} in Fraction mode, @expr{1.5} in +Float mode. At any time you can use @kbd{c f} (@code{calc-float}) to convert a fraction to a float, or @kbd{c F} (@code{calc-fraction}) to convert a @@ -12567,25 +12567,25 @@ on and off. When the mode is off, infinities do not arise except in calculations that already had infinities as inputs. (One exception is that infinite open intervals like @samp{[0 .. inf)} can be generated; however, intervals closed at infinity (@samp{[0 .. inf]}) -will not be generated when infinite mode is off.) +will not be generated when Infinite mode is off.) -With infinite mode turned on, @samp{1 / 0} will generate @code{uinf}, +With Infinite mode turned on, @samp{1 / 0} will generate @code{uinf}, an undirected infinity. @xref{Infinities}, for a discussion of the difference between @code{inf} and @code{uinf}. Also, @expr{0 / 0} evaluates to @code{nan}, the ``indeterminate'' symbol. Various other functions can also return infinities in this mode; for example, @samp{ln(0) = -inf}, and @samp{gamma(-7) = uinf}. Once again, -note that @samp{exp(inf) = inf} regardless of infinite mode because +note that @samp{exp(inf) = inf} regardless of Infinite mode because this calculation has infinity as an input. -@cindex Positive infinite mode +@cindex Positive Infinite mode The @kbd{m i} command with a numeric prefix argument of zero, -i.e., @kbd{C-u 0 m i}, turns on a ``positive infinite mode'' in +i.e., @kbd{C-u 0 m i}, turns on a Positive Infinite mode in which zero is treated as positive instead of being directionless. Thus, @samp{1 / 0 = inf} and @samp{-1 / 0 = -inf} in this mode. Note that zero never actually has a sign in Calc; there are no separate representations for @mathit{+0} and @mathit{-0}. Positive -infinite mode merely changes the interpretation given to the +Infinite mode merely changes the interpretation given to the single symbol, @samp{0}. One consequence of this is that, while you might expect @samp{1 / -0 = -inf}, actually @samp{1 / -0} is equivalent to @samp{1 / 0}, which is equal to positive @code{inf}. @@ -12604,7 +12604,7 @@ number or a symbolic expression if the argument is an expression: @kindex m s @pindex calc-symbolic-mode -In @dfn{symbolic mode}, controlled by the @kbd{m s} (@code{calc-symbolic-mode}) +In @dfn{Symbolic mode}, controlled by the @kbd{m s} (@code{calc-symbolic-mode}) command, functions which would produce inexact, irrational results are left in symbolic form. Thus @kbd{16 Q} pushes 4, but @kbd{2 Q} pushes @samp{sqrt(2)}. @@ -12631,12 +12631,12 @@ variables.) @cindex Scalar mode Calc sometimes makes assumptions during algebraic manipulation that are awkward or incorrect when vectors and matrices are involved. -Calc has two modes, @dfn{matrix mode} and @dfn{scalar mode}, which +Calc has two modes, @dfn{Matrix mode} and @dfn{Scalar mode}, which modify its behavior around vectors in useful ways. @kindex m v @pindex calc-matrix-mode -Press @kbd{m v} (@code{calc-matrix-mode}) once to enter matrix mode. +Press @kbd{m v} (@code{calc-matrix-mode}) once to enter Matrix mode. In this mode, all objects are assumed to be matrices unless provably otherwise. One major effect is that Calc will no longer consider multiplication to be commutative. (Recall that in matrix arithmetic, @@ -12655,18 +12655,18 @@ a true identity matrix of the appropriate size. On the other hand, if it is combined with a scalar (as in @samp{idn(1) + 2}), Calc will assume it really was a scalar after all and produce, e.g., 3. -Press @kbd{m v} a second time to get scalar mode. Here, objects are +Press @kbd{m v} a second time to get Scalar mode. Here, objects are assumed @emph{not} to be vectors or matrices unless provably so. For example, normally adding a variable to a vector, as in @samp{[x, y, z] + a}, will leave the sum in symbolic form because as far as Calc knows, @samp{a} could represent either a number or -another 3-vector. In scalar mode, @samp{a} is assumed to be a +another 3-vector. In Scalar mode, @samp{a} is assumed to be a non-vector, and the addition is evaluated to @samp{[x+a, y+a, z+a]}. Press @kbd{m v} a third time to return to the normal mode of operation. If you press @kbd{m v} with a numeric prefix argument @var{n}, you -get a special ``dimensioned matrix mode'' in which matrices of +get a special ``dimensioned'' Matrix mode in which matrices of unknown size are assumed to be @var{n}x@var{n} square matrices. Then, the function call @samp{idn(1)} will expand into an actual matrix rather than representing a ``generic'' matrix. @@ -12687,11 +12687,11 @@ for @samp{[x, y, z] + [1, 2, 3]}, but that's because you have broken your earlier promise to Calc that @samp{a} would be scalar. Another way to mix scalars and matrices is to use selections -(@pxref{Selecting Subformulas}). Use matrix mode when operating on -your formula normally; then, to apply scalar mode to a certain part +(@pxref{Selecting Subformulas}). Use Matrix mode when operating on +your formula normally; then, to apply Scalar mode to a certain part of the formula without affecting the rest just select that part, -change into scalar mode and press @kbd{=} to resimplify the part -under this mode, then change back to matrix mode before deselecting. +change into Scalar mode and press @kbd{=} to resimplify the part +under this mode, then change back to Matrix mode before deselecting. @node Automatic Recomputation, Working Message, Matrix Mode, Calculation Modes @subsection Automatic Recomputation @@ -12707,7 +12707,7 @@ are changed. @xref{Evaluates-To Operator}. The @kbd{m C} (@code{calc-auto-recompute}) command turns this automatic recomputation on and off. If you turn it off, Calc will not update @samp{=>} operators on the stack (nor those in the -attached Embedded Mode buffer, if there is one). They will not +attached Embedded mode buffer, if there is one). They will not be updated unless you explicitly do so by pressing @kbd{=} or until you press @kbd{m C} to turn recomputation back on. (While automatic recomputation is off, you can think of @kbd{m C m C} as a command @@ -12828,7 +12828,7 @@ A common technique is to set the simplification mode down to the lowest amount of simplification you will allow to be applied automatically, then use manual commands like @kbd{a s} and @kbd{c c} (@code{calc-clean}) to perform higher types of simplifications on demand. @xref{Algebraic -Definitions}, for another sample use of no-simplification mode. +Definitions}, for another sample use of No-Simplification mode. @node Declarations, Display Modes, Simplification Modes, Mode Settings @section Declarations @@ -13075,8 +13075,8 @@ and @code{y} are known to be vectors or matrices. (Calc currently never distinguishes between @code{vector} and @code{matrix} declarations.) -@xref{Matrix Mode}, for a discussion of ``matrix mode'' and -``scalar mode,'' which are similar to declaring @samp{[All, matrix]} +@xref{Matrix Mode}, for a discussion of Matrix mode and +Scalar mode, which are similar to declaring @samp{[All, matrix]} or @samp{[All, scalar]} but much more convenient. One more type symbol that is recognized is used with the @kbd{H a d} @@ -13228,8 +13228,8 @@ remains unevaluated. @tindex dscalar The @code{dscalar} function returns 1 if its argument is provably scalar, or 0 if its argument is provably non-scalar. It is left -unevaluated if this cannot be determined. (If matrix mode or scalar -mode are in effect, this function returns 1 or 0, respectively, +unevaluated if this cannot be determined. (If Matrix mode or Scalar +mode is in effect, this function returns 1 or 0, respectively, if it has no other information.) When Calc interprets a condition (say, in a rewrite rule) it considers an unevaluated formula to be ``false.'' Thus, @samp{dscalar(a)} is ``true'' only if @code{a} is @@ -13338,7 +13338,7 @@ entirety.) @cindex Digit grouping Long numbers can be hard to read if they have too many digits. For example, the factorial of 30 is 33 digits long! Press @kbd{d g} -(@code{calc-group-digits}) to enable @dfn{grouping} mode, in which digits +(@code{calc-group-digits}) to enable @dfn{Grouping} mode, in which digits are displayed in clumps of 3 or 4 (depending on the current radix) separated by commas. @@ -13884,7 +13884,7 @@ line at a time (or several lines with a prefix argument). Values on the stack are normally left-justified in the window. You can control this arrangement by typing @kbd{d <} (@code{calc-left-justify}), @kbd{d >} (@code{calc-right-justify}), or @kbd{d =} -(@code{calc-center-justify}). For example, in right-justification mode, +(@code{calc-center-justify}). For example, in Right-Justification mode, stack entries are displayed flush-right against the right edge of the window. @@ -13905,20 +13905,20 @@ breaking lines are given below. Notice that the interaction between origin and line width is slightly different in each justification mode. -In left-justified mode, the line is indented by a number of spaces +In Left-Justified mode, the line is indented by a number of spaces given by the origin (default zero). If the result is longer than the maximum line width, if given, or too wide to fit in the Calc window otherwise, then it is broken into lines which will fit; each broken line is indented to the origin. -In right-justified mode, lines are shifted right so that the rightmost +In Right-Justified mode, lines are shifted right so that the rightmost character is just before the origin, or just before the current window width if no origin was specified. If the line is too long for this, then it is broken; the current line width is used, if specified, or else the origin is used as a width if that is specified, or else the line is broken to fit in the window. -In centering mode, the origin is the column number of the center of +In Centering mode, the origin is the column number of the center of each stack entry. If a line width is specified, lines will not be allowed to go past that width; Calc will either indent less or break the lines if necessary. If no origin is specified, half the @@ -13953,13 +13953,13 @@ Give a blank string (with @kbd{d @{ @key{RET}}) to turn the label off. The @kbd{d @}} (@code{calc-right-label}) command similarly adds a label on the righthand side. It does not affect positioning of the stack entries unless they are right-justified. Also, if both -a line width and an origin are given in right-justified mode, the +a line width and an origin are given in Right-Justified mode, the stack entry is justified to the origin and the righthand label is justified to the line width. One application of labels would be to add equation numbers to formulas you are manipulating in Calc and then copying into a -document (possibly using Embedded Mode). The equations would +document (possibly using Embedded mode). The equations would typically be centered, and the equation numbers would be on the left or right as you prefer. @@ -14061,7 +14061,7 @@ such as powers, quotients, and square roots: @noindent in place of @samp{sqrt((a+1)/b + c^2)}. -Subscripts like @samp{a_i} are displayed as actual subscripts in ``big'' +Subscripts like @samp{a_i} are displayed as actual subscripts in Big mode. Double subscripts, @samp{a_i_j} (@samp{subscr(subscr(a, i), j)}) are displayed as @samp{a} with subscripts separated by commas: @samp{i, j}. They must still be entered in the usual underscore @@ -14134,12 +14134,12 @@ In C mode, vectors and matrices use curly braces instead of brackets. Octal and hexadecimal values are written with leading @samp{0} or @samp{0x} rather than using the @samp{#} symbol. Array subscripting is translated into @code{subscr} calls, so that @samp{a[i]} in C -mode is the same as @samp{a_i} in normal mode. Assignments +mode is the same as @samp{a_i} in Normal mode. Assignments turn into the @code{assign} function, which Calc normally displays using the @samp{:=} symbol. The variables @code{var-pi} and @code{var-e} would be displayed @samp{pi} -and @samp{e} in normal mode, but in C mode they are displayed as +and @samp{e} in Normal mode, but in C mode they are displayed as @samp{M_PI} and @samp{M_E}, corresponding to the names of constants typically provided in the @file{} header. Functions whose names are different in C are translated automatically for entry and @@ -14181,7 +14181,7 @@ function!). Underscores are allowed in variable and function names in all of these language modes. The underscore here is equivalent to the @samp{#} in -normal mode, or to hyphens in the underlying Emacs Lisp variable names. +Normal mode, or to hyphens in the underlying Emacs Lisp variable names. FORTRAN and Pascal modes normally do not adjust the case of letters in formulas. Most built-in Calc names use lower-case letters. If you use a @@ -14823,7 +14823,7 @@ object. @tindex choriz The @code{choriz} function takes a vector of objects and composes them horizontally. For example, @samp{choriz([17, a b/c, d])} formats -as @w{@samp{17a b / cd}} in normal language mode, or as +as @w{@samp{17a b / cd}} in Normal language mode, or as @example @group @@ -15086,7 +15086,7 @@ then return a certain measurement of the composition as an integer. @tindex cwidth The @code{cwidth} function measures the width, in characters, of a composition. For example, @samp{cwidth(a + b)} is 5, and -@samp{cwidth(a / b)} is 5 in normal mode, 1 in Big mode, and 11 in +@samp{cwidth(a / b)} is 5 in Normal mode, 1 in Big mode, and 11 in @TeX{} mode (for @samp{@{a \over b@}}). The argument may involve the composition functions described in this section. @@ -15262,7 +15262,7 @@ unrelated to the syntax tables described in the Emacs manual.) @pindex calc-edit-user-syntax The @kbd{Z S} (@code{calc-edit-user-syntax}) command edits the syntax table for the current language mode. If you want your -syntax to work in any language, define it in the normal language +syntax to work in any language, define it in the Normal language mode. Type @kbd{M-# M-#} to finish editing the syntax table, or @kbd{M-# x} to cancel the edit. The @kbd{m m} command saves all the syntax tables along with the other mode settings; @@ -15293,7 +15293,7 @@ zero or more expressions separated by commas, and @samp{)}.'' A @dfn{syntax table} is a list of user-defined @dfn{syntax rules}, which allow you to specify new patterns to define your own favorite input notations. Calc's parser always checks the syntax -table for the current language mode, then the table for the normal +table for the current language mode, then the table for the Normal language mode, before it uses its built-in rules to parse an algebraic formula you have entered. Each syntax rule should go on its own line; it consists of a @dfn{pattern}, a @samp{:=} symbol, @@ -15648,7 +15648,7 @@ In this approach, we allow @samp{#2} to equal the whole expression @samp{i=1..10}. Then, we use @code{matches} to break it apart into its components. If the expression turns out not to match the pattern, the syntax rule will fail. Note that @kbd{Z S} always uses Calc's -normal language mode for editing expressions in syntax rules, so we +Normal language mode for editing expressions in syntax rules, so we must use regular Calc notation for the interval @samp{[b..c]} that will correspond to the Maple mode interval @samp{1..10}. @@ -15721,11 +15721,11 @@ Polar mode. Value is 0 (rectangular) or 1 (polar); default is 0. Command is @kbd{m p}. @item -Matrix/scalar mode. Default value is @mathit{-1}. Value is 0 for scalar -mode, @mathit{-2} for matrix mode, or @var{N} for +Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar +mode, @mathit{-2} for Matrix mode, or @var{N} for @texline @math{N\times N} @infoline @var{N}x@var{N} -matrix mode. Command is @kbd{m v}. +Matrix mode. Command is @kbd{m v}. @item Simplification mode. Default is 1. Value is @mathit{-1} for off (@kbd{m O}), @@ -15760,7 +15760,7 @@ programming commands. @xref{Conditionals in Macros}.) @cindex Mode line indicators This section is a summary of all symbols that can appear on the Calc mode line, the highlighted bar that appears under the Calc -stack window (or under an editing window in Embedded Mode). +stack window (or under an editing window in Embedded mode). The basic mode line format is: @@ -15772,7 +15772,7 @@ The @samp{%%} is the Emacs symbol for ``read-only''; it shows that regular Emacs commands are not allowed to edit the stack buffer as if it were text. -The word @samp{Calc:} changes to @samp{CalcEmbed:} if Embedded Mode +The word @samp{Calc:} changes to @samp{CalcEmbed:} if Embedded mode is enabled. The words after this describe the various Calc modes that are in effect. @@ -15800,7 +15800,7 @@ Symbolic mode (@kbd{m s}; @pxref{Symbolic Mode}). Matrix mode (@kbd{m v}; @pxref{Matrix Mode}). @item Matrix@var{n} -Dimensioned matrix mode (@kbd{C-u @var{n} m v}). +Dimensioned Matrix mode (@kbd{C-u @var{n} m v}). @item Scalar Scalar mode (@kbd{m v}; @pxref{Matrix Mode}). @@ -15815,7 +15815,7 @@ Fraction mode (@kbd{m f}; @pxref{Fraction Mode}). Infinite mode (@kbd{m i}; @pxref{Infinite Mode}). @item +Inf -Positive infinite mode (@kbd{C-u 0 m i}). +Positive Infinite mode (@kbd{C-u 0 m i}). @item NoSimp Default simplifications off (@kbd{m O}; @pxref{Simplification Modes}). @@ -16023,14 +16023,14 @@ to every element of a vector. If either argument of @kbd{+} is a complex number, the result will in general be complex. If one argument is in rectangular form and the other polar, -the current Polar Mode determines the form of the result. If Symbolic -Mode is enabled, the sum may be left as a formula if the necessary +the current Polar mode determines the form of the result. If Symbolic +mode is enabled, the sum may be left as a formula if the necessary conversions for polar addition are non-trivial. If both arguments of @kbd{+} are HMS forms, the forms are added according to the usual conventions of hours-minutes-seconds notation. If one argument is an HMS form and the other is a number, that number is converted from -degrees or radians (depending on the current Angular Mode) to HMS format +degrees or radians (depending on the current Angular mode) to HMS format and then the two HMS forms are added. If one argument of @kbd{+} is a date form, the other can be either a @@ -16182,7 +16182,7 @@ must be positive real number. @tindex fdiv The @kbd{:} (@code{calc-fdiv}) command [@code{fdiv} function in a formula] divides the two integers on the top of the stack to produce a fractional -result. This is a convenient shorthand for enabling Fraction Mode (with +result. This is a convenient shorthand for enabling Fraction mode (with @kbd{m f}) temporarily and using @samp{/}. Note that during numeric entry the @kbd{:} key is interpreted as a fraction separator, so to divide 8 by 6 you would have to type @kbd{8 @key{RET} 6 @key{RET} :}. (Of course, in @@ -16236,7 +16236,7 @@ matrix, it computes the inverse of that matrix. @tindex sqrt The @kbd{Q} (@code{calc-sqrt}) [@code{sqrt}] command computes the square root of a number. For a negative real argument, the result will be a -complex number whose form is determined by the current Polar Mode. +complex number whose form is determined by the current Polar mode. @kindex f h @pindex calc-hypot @@ -16298,7 +16298,7 @@ The @kbd{f S} (@code{calc-scale-float}) [@code{scf}] function scales a number by a given power of ten. Thus, @samp{scf(mant(x), xpon(x)) = x} for any real @samp{x}. The second argument must be an integer, but the first may actually be any numeric value. For example, @samp{scf(5,-2) = 0.05} -or @samp{1:20} depending on the current Fraction Mode. +or @samp{1:20} depending on the current Fraction mode. @kindex f [ @kindex f ] @@ -16482,7 +16482,7 @@ be in the range @mathit{-180} degrees (exclusive) to @mathit{+180} degrees The @code{calc-imaginary} command multiplies the number on the top of the stack by the imaginary number @expr{i = (0,1)}. This command is not normally bound to a key in Calc, but it is available -on the @key{IMAG} button in Keypad Mode. +on the @key{IMAG} button in Keypad mode. @kindex f r @pindex calc-re @@ -17761,7 +17761,7 @@ formulas below for symbolic arguments only when you use the @kbd{a "} integrals or solving equations involving the functions. @ifinfo -These formulas are shown using the conventions of ``Big'' display +These formulas are shown using the conventions of Big display mode (@kbd{d B}); for example, the formula for @code{fv} written linearly is @samp{pmt * ((1 + rate)^n) - 1) / rate}. @@ -18217,7 +18217,7 @@ to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since @infoline @expr{2^10 = 1024}. In certain cases like @samp{log(3,9)}, the result will be either @expr{1:2} or @expr{0.5} depending on the current Fraction -Mode setting. With the Inverse flag [@code{alog}], this command is +mode setting. With the Inverse flag [@code{alog}], this command is similar to @kbd{^} except that the order of the arguments is reversed. @kindex f I @@ -18273,7 +18273,7 @@ of the current angular mode. @xref{Basic Operations on Units}. Also, the symbolic variable @code{pi} is not ordinarily recognized in arguments to trigonometric functions, as in @samp{sin(3 pi / 4)}, but the @kbd{a s} (@code{calc-simplify}) command recognizes many such -formulas when the current angular mode is radians @emph{and} symbolic +formulas when the current angular mode is Radians @emph{and} Symbolic mode is enabled; this example would be replaced by @samp{sqrt(2) / 2}. @xref{Symbolic Mode}. Beware, this simplification occurs even if you have stored a different value in the variable @samp{pi}; this is one @@ -18282,7 +18282,7 @@ the form @expr{x} plus a multiple of @cpiover{2} are also simplified. Calc includes similar formulas for @code{cos} and @code{tan}. The @kbd{a s} command knows all angles which are integer multiples of -@cpiover{12}, @cpiover{10}, or @cpiover{8} radians. In degrees mode, +@cpiover{12}, @cpiover{10}, or @cpiover{8} radians. In Degrees mode, analogous simplifications occur for integer multiples of 15 or 18 degrees, and for arguments plus multiples of 90 degrees. @@ -18633,7 +18633,7 @@ For @samp{arctanh(z)}: This is defined by @samp{(ln(1+z) - ln(1-z)) / 2}. The branch cuts are on the real axis, less than @mathit{-1} and greater than 1. The following tables for @code{arcsin}, @code{arccos}, and -@code{arctan} assume the current angular mode is radians. The +@code{arctan} assume the current angular mode is Radians. The hyperbolic functions operate independently of the angular mode. @smallexample @@ -19478,7 +19478,7 @@ Note that the prefix argument can have an effect even when the input is not a vector. For example, if the input is the number @mathit{-5}, then @kbd{c-u -1 v u} yields @mathit{-5} and 0 (the components of @mathit{-5} when viewed as a rectangular complex number); @kbd{C-u -2 v u} yields 5 -and 180 (assuming degrees mode); and @kbd{C-u -10 v u} yields @mathit{-5} +and 180 (assuming Degrees mode); and @kbd{C-u -10 v u} yields @mathit{-5} and 1 (the numerator and denominator of @mathit{-5}, viewed as a rational number). Plain @kbd{v u} with this input would complain that the input is not a composite object. @@ -19608,7 +19608,7 @@ such generic identity matrices, and if one is combined with a matrix whose size is known, it is converted automatically to an identity matrix of a suitable matching size. The @kbd{v i} command with an argument of zero creates a generic identity matrix, @samp{idn(1)}. -Note that in dimensioned matrix mode (@pxref{Matrix Mode}), generic +Note that in dimensioned Matrix mode (@pxref{Matrix Mode}), generic identity matrices are immediately expanded to the current default dimensions. @@ -21265,11 +21265,11 @@ for anything else'') prefix. using regular Emacs editing commands. When doing algebraic work, you may find several of the Calculator's -modes to be helpful, including algebraic-simplification mode (@kbd{m A}) -or no-simplification mode (@kbd{m O}), -algebraic-entry mode (@kbd{m a}), fraction mode (@kbd{m f}), and -symbolic mode (@kbd{m s}). @xref{Mode Settings}, for discussions -of these modes. You may also wish to select ``big'' display mode (@kbd{d B}). +modes to be helpful, including Algebraic Simplification mode (@kbd{m A}) +or No-Simplification mode (@kbd{m O}), +Algebraic entry mode (@kbd{m a}), Fraction mode (@kbd{m f}), and +Symbolic mode (@kbd{m s}). @xref{Mode Settings}, for discussions +of these modes. You may also wish to select Big display mode (@kbd{d B}). @xref{Normal Language Modes}. @menu @@ -21323,7 +21323,7 @@ sub-formula, and press @w{@kbd{j s}} (@code{calc-select-here}). Calc will highlight the smallest portion of the formula that contains that character. By default the sub-formula is highlighted by blanking out all of the rest of the formula with dots. Selection works in any -display mode but is perhaps easiest in ``big'' (@kbd{d B}) mode. +display mode but is perhaps easiest in Big mode (@kbd{d B}). Suppose you enter the following formula: @smallexample @@ -21353,7 +21353,7 @@ to Every character not part of the sub-formula @samp{b} has been changed to a dot. The @samp{*} next to the line number is to remind you that the formula has a portion of it selected. (In this case, it's very -obvious, but it might not always be. If Embedded Mode is enabled, +obvious, but it might not always be. If Embedded mode is enabled, the word @samp{Sel} also appears in the mode line because the stack may not be visible. @pxref{Embedded Mode}.) @@ -22003,9 +22003,9 @@ but which also substitutes stored values for variables in the formula. Use @kbd{a v} if you want the variables to ignore their stored values. If you give a numeric prefix argument of 2 to @kbd{a v}, it simplifies -as if in algebraic simplification mode. This is equivalent to typing +as if in Algebraic Simplification mode. This is equivalent to typing @kbd{a s}; @pxref{Simplifying Formulas}. If you give a numeric prefix -of 3 or more, it uses extended simplification mode (@kbd{a e}). +of 3 or more, it uses Extended Simplification mode (@kbd{a e}). If you give a negative prefix argument @mathit{-1}, @mathit{-2}, or @mathit{-3}, it simplifies in the corresponding mode but only works on the top-level @@ -22013,7 +22013,7 @@ function call of the formula. For example, @samp{(2 + 3) * (2 + 3)} will simplify to @samp{(2 + 3)^2}, without simplifying the sub-formulas @samp{2 + 3}. As another example, typing @kbd{V R +} to sum the vector @samp{[1, 2, 3, 4]} produces the formula @samp{reduce(add, [1, 2, 3, 4])} -in no-simplify mode. Using @kbd{a v} will evaluate this all the way to +in No-Simplify mode. Using @kbd{a v} will evaluate this all the way to 10; using @kbd{C-u - a v} will evaluate it only to @samp{1 + 2 + 3 + 4}. (@xref{Reducing and Mapping}.) @@ -22021,7 +22021,7 @@ in no-simplify mode. Using @kbd{a v} will evaluate this all the way to @tindex evalvn The @kbd{=} command corresponds to the @code{evalv} function, and the related @kbd{N} command, which is like @kbd{=} but temporarily -disables symbolic (@kbd{m s}) mode during the evaluation, corresponds +disables Symbolic mode (@kbd{m s}) during the evaluation, corresponds to the @code{evalvn} function. (These commands interpret their prefix arguments differently than @kbd{a v}; @kbd{=} treats the prefix as the number of stack elements to evaluate at once, and @kbd{N} treats @@ -22196,7 +22196,7 @@ is evaluated to @expr{3}. Evaluation does not occur if the arguments to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}), range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), or if the function name is not recognized (@expr{@t{f}(5)}), or if -``symbolic'' mode (@pxref{Symbolic Mode}) prevents evaluation +Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation (@expr{@t{sqrt}(2)}). Calc simplifies (evaluates) the arguments to a function before it @@ -22304,7 +22304,7 @@ to @expr{-a}. The products @expr{1 a} and @expr{a 1} are simplified to @expr{a}; @expr{(-1) a} and @expr{a (-1)} are simplified to @expr{-a}; @expr{0 a} and @expr{a 0} are simplified to @expr{0}, except that -in matrix mode where @expr{a} is not provably scalar the result +in Matrix mode where @expr{a} is not provably scalar the result is the generic zero matrix @samp{idn(0)}, and that if @expr{a} is infinite the result is @samp{nan}. @@ -22330,18 +22330,18 @@ or the implicit one-half of @expr{@t{sqrt}(x)}, and similarly for @expr{b}. The result is written using @samp{sqrt} or @samp{1/sqrt} if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively. If the sum of the powers is zero, the product is simplified to -@expr{1} or to @samp{idn(1)} if matrix mode is enabled. +@expr{1} or to @samp{idn(1)} if Matrix mode is enabled. The product of a negative power times anything but another negative power is changed to use division: @texline @math{x^{-2} y} @infoline @expr{x^(-2) y} -goes to @expr{y / x^2} unless matrix mode is +goes to @expr{y / x^2} unless Matrix mode is in effect and neither @expr{x} nor @expr{y} are scalar (in which case it is considered unsafe to rearrange the order of the terms). Finally, @expr{a (b/c)} is rewritten to @expr{(a b)/c}, and also -@expr{(a/b) c} is changed to @expr{(a c)/b} unless in matrix mode. +@expr{(a/b) c} is changed to @expr{(a c)/b} unless in Matrix mode. @tex \bigskip @@ -22368,7 +22368,7 @@ for any power @expr{c}. Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; @expr{(a/b) / c} goes to @expr{a / (b c)}; and @expr{a / (b/c)} -goes to @expr{(a c) / b} unless matrix mode prevents this +goes to @expr{(a c) / b} unless Matrix mode prevents this rearrangement. Similarly, @expr{a / (b:c)} is simplified to @expr{(c:b) a} for any fraction @expr{b:c}. @@ -22392,7 +22392,7 @@ to @expr{a / (c - b)}, and @expr{(a - b) / (-c)} to @expr{(b - a) / c}. @end tex The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} -in matrix mode. The formula @expr{0^x} is simplified to @expr{0} +in Matrix mode. The formula @expr{0^x} is simplified to @expr{0} unless @expr{x} is a negative number or complex number, in which case the result is an infinity or an unsimplified formula according to the current infinite mode. Note that @expr{0^0} is an @@ -22568,7 +22568,7 @@ property that real-valued numbers, interval forms and infinities come first, and are sorted into increasing order. The @kbd{V S} command uses the same ordering when sorting a vector. -Sorting of terms of products is inhibited when matrix mode is +Sorting of terms of products is inhibited when Matrix mode is turned on; in this case, Calc will never exchange the order of two terms unless it knows at least one of the terms is a scalar. @@ -23176,7 +23176,7 @@ With a numeric prefix argument @var{n}, this command computes the @var{n}th derivative. When working with trigonometric functions, it is best to switch to -radians mode first (with @w{@kbd{m r}}). The derivative of @samp{sin(x)} +Radians mode first (with @w{@kbd{m r}}). The derivative of @samp{sin(x)} in degrees is @samp{(pi/180) cos(x)}, probably not the expected answer! @@ -23267,7 +23267,7 @@ due to a different choice of constant of integration. The Calculator remembers all the integrals it has done. If conditions change in a way that would invalidate the old integrals, say, a switch -from degrees to radians mode, then they will be thrown out. If you +from Degrees to Radians mode, then they will be thrown out. If you suspect this is not happening when it should, use the @code{calc-flush-caches} command; @pxref{Caches}. @@ -23626,10 +23626,10 @@ which can be solved for @expr{x^3} using the quadratic equation, and then for @expr{x} by taking cube roots. But in many cases, like @expr{x^6 + x + 1}, Calc does not know how to rewrite the polynomial into a form it can solve. The @kbd{a P} command can still deliver a -list of numerical roots, however, provided that symbolic mode (@kbd{m s}) -is not turned on. (If you work with symbolic mode on, recall that the +list of numerical roots, however, provided that Symbolic mode (@kbd{m s}) +is not turned on. (If you work with Symbolic mode on, recall that the @kbd{N} (@code{calc-eval-num}) key is a handy way to reevaluate the -formula on the stack with symbolic mode temporarily off.) Naturally, +formula on the stack with Symbolic mode temporarily off.) Naturally, @kbd{a P} can only provide numerical roots if the polynomial coefficients are all numbers (real or complex). @@ -24244,9 +24244,9 @@ Note that since the constant and linear terms are enough to fit the data exactly, it's no surprise that Calc chose a tiny contribution for @expr{x^2}. (The fact that it's not exactly zero is due only to roundoff error. Since our data are exact integers, we could get -an exact answer by typing @kbd{m f} first to get fraction mode. +an exact answer by typing @kbd{m f} first to get Fraction mode. Then the @expr{x^2} term would vanish altogether. Usually, though, -the data being fitted will be approximate floats so fraction mode +the data being fitted will be approximate floats so Fraction mode won't help.) Doing the @kbd{a F 2} fit on the data set with 14 instead of 13 @@ -24271,7 +24271,7 @@ The actual coefficients we get with a precision of 12, like @expr{0.0416666663588}, clearly suffer from loss of precision. It is a good idea to increase the working precision to several digits beyond what you need when you do a fitting operation. -Or, if your data are exact, use fraction mode to get exact +Or, if your data are exact, use Fraction mode to get exact results. You can type @kbd{i} instead of a digit at the model prompt to fit @@ -25942,12 +25942,12 @@ like @samp{(x + y) + (z - w)}, are not tried. Note that @samp{*} is not commutative when applied to matrices, but rewrite rules pretend that it is. If you type @kbd{m v} to enable -matrix mode (@pxref{Matrix Mode}), rewrite rules will match @samp{*} +Matrix mode (@pxref{Matrix Mode}), rewrite rules will match @samp{*} literally, ignoring its usual commutativity property. (In the current implementation, the associativity also vanishes---it is as if the pattern had been enclosed in a @code{plain} marker; see below.) If you are applying rewrites to formulas with matrices, it's best to -enable matrix mode first to prevent algebraically incorrect rewrites +enable Matrix mode first to prevent algebraically incorrect rewrites from occurring. The pattern @samp{-x} will actually match any expression. For example, @@ -26424,8 +26424,8 @@ You must use @code{apply} for meta-variables with function names on both sides of a rewrite rule: @samp{apply(f, [x]) := f(x+1)} is @emph{not} correct, because it rewrites @samp{spam(6)} into @samp{f(7)}. The righthand side should be @samp{apply(f, [x+1])}. -Also note that you will have to use no-simplify (@kbd{m O}) -mode when entering this rule so that the @code{apply} isn't +Also note that you will have to use No-Simplify mode (@kbd{m O}) +when entering this rule so that the @code{apply} isn't evaluated immediately to get the new rule @samp{f(x) := f(x+1)}. Or, use @kbd{s e} to enter the rule without going through the stack, or enter the rule as @samp{apply(f, [x]) := apply(f, [x+1]) @w{:: 1}}. @@ -27160,7 +27160,7 @@ To apply these manually, you could put them in a variable called to expand trig functions. But if instead you store them in the variable @code{EvalRules}, they will automatically be applied to all sines and cosines of sums. Then, with @samp{2 x} and @samp{45} on -the stack, typing @kbd{+ S} will (assuming degrees mode) result in +the stack, typing @kbd{+ S} will (assuming Degrees mode) result in @samp{0.7071 sin(2 x) + 0.7071 cos(2 x)} automatically. As each level of a formula is evaluated, the rules from @@ -27236,11 +27236,11 @@ number @expr{(2, 3)}, Calc computes @samp{sqrt(2*2 + 3*3)} by calling the multiplication, addition, and square root functions directly rather than applying the default simplifications to this formula. So an @code{EvalRules} rule that (perversely) rewrites @samp{sqrt(13) := 6} -would not apply. (However, if you put Calc into symbolic mode so that +would not apply. (However, if you put Calc into Symbolic mode so that @samp{sqrt(13)} will be left in symbolic form by the built-in square root function, your rule will be able to apply. But if the complex number were @expr{(3,4)}, so that @samp{sqrt(25)} must be calculated, -then symbolic mode will not help because @samp{sqrt(25)} can be +then Symbolic mode will not help because @samp{sqrt(25)} can be evaluated exactly to 5.) One subtle restriction that normally only manifests itself with @@ -27347,7 +27347,7 @@ A surprisingly useful rewrite rule is @samp{a/(b-c) := a*(b+c)/(b^2-c^2)}. This will simplify the formula whenever @expr{b} and/or @expr{c} can be made simpler by squaring. For example, applying this rule to @samp{2 / (sqrt(2) + 3)} yields @samp{6:7 - 2:7 sqrt(2)} (assuming -Symbolic Mode has been enabled to keep the square root from being +Symbolic mode has been enabled to keep the square root from being evaluated to a floating-point approximation). This rule is also useful when working with symbolic complex numbers, e.g., @samp{(a + b i) / (c + d i)}. @@ -27457,7 +27457,7 @@ formula @samp{1 mm} is ``simplified'' to @samp{mm}. This is only a display anomaly, however; @samp{mm} will work just fine as a representation of one millimeter. -You may find that Algebraic Mode (@pxref{Algebraic Entry}) makes working +You may find that Algebraic mode (@pxref{Algebraic Entry}) makes working with units expressions easier. Otherwise, you will have to remember to hit the apostrophe key every time you wish to enter units. @@ -28346,11 +28346,11 @@ including the current simplification mode. Recall that the formula @samp{x + y + x} is not handled by Calc's default simplifications, but the @kbd{a s} command will reduce it to the simpler form @samp{y + 2 x}. You can also type @kbd{m A} -to enable an algebraic-simplification mode in which the +to enable an Algebraic Simplification mode in which the equivalent of @kbd{a s} is used on all of Calc's results. If you enter @samp{x + y + x =>} normally, the result will be @samp{x + y + x => x + y + x}. If you change to -algebraic-simplification mode, the result will be +Algebraic Simplification mode, the result will be @samp{x + y + x => y + 2 x}. However, just pressing @kbd{a s} once will have no effect on @samp{x + y + x => x + y + x}, because the righthand side depends only on the lefthand side @@ -28389,13 +28389,13 @@ side effects. @pindex calc-assign @tindex assign @tindex := -Embedded Mode also uses @samp{=>} operators. In embedded mode, +Embedded mode also uses @samp{=>} operators. In Embedded mode, the lefthand side of an @samp{=>} operator can refer to variables assigned elsewhere in the file by @samp{:=} operators. The assignment operator @samp{a := 17} does not actually do anything -by itself. But Embedded Mode recognizes it and marks it as a sort +by itself. But Embedded mode recognizes it and marks it as a sort of file-local definition of the variable. You can enter @samp{:=} -operators in algebraic mode, or by using the @kbd{s :} +operators in Algebraic mode, or by using the @kbd{s :} (@code{calc-assign}) [@code{assign}] command which takes a variable and value from the stack and replaces them with an assignment. @@ -29096,7 +29096,7 @@ killing GNUPLOT because you think it has gotten stuck. The commands in this chapter move information between the Calculator and other Emacs editing buffers. -In many cases Embedded Mode is an easier and more natural way to +In many cases Embedded mode is an easier and more natural way to work with Calc from a regular editing buffer. @xref{Embedded Mode}. @menu @@ -29367,7 +29367,7 @@ just by double-clicking on it in the shell, then middle-clicking in the Calc window. @node Keypad Mode, Embedded Mode, Kill and Yank, Introduction -@chapter ``Keypad'' Mode +@chapter Keypad Mode @noindent @kindex M-# k @@ -29376,7 +29376,7 @@ The @kbd{M-# k} (@code{calc-keypad}) command starts the Calculator and displays a picture of a calculator-style keypad. If you are using the X window system, you can click on any of the ``keys'' in the keypad using the left mouse button to operate the calculator. -The original window remains the selected window; in keypad mode +The original window remains the selected window; in Keypad mode you can type in your file while simultaneously performing calculations with the mouse. @@ -29392,11 +29392,11 @@ the @samp{*Calc Keypad*} window, place the cursor on the desired ``key,'' and type @key{SPC} or @key{RET}. If you think this is easier than using Calc normally, go right ahead. -Calc commands are more or less the same in keypad mode. Certain +Calc commands are more or less the same in Keypad mode. Certain keypad keys differ slightly from the corresponding normal Calc keystrokes; all such deviations are described below. -Keypad Mode includes many more commands than will fit on the keypad +Keypad mode includes many more commands than will fit on the keypad at once. Click the right mouse button [@code{calc-keypad-menu}] to switch to the next menu. The bottom five rows of the keypad stay the same; the top three rows change to a new set of commands. @@ -29444,7 +29444,7 @@ original buffer. @end smallexample @noindent -This is the menu that appears the first time you start Keypad Mode. +This is the menu that appears the first time you start Keypad mode. It will show up in a vertical window on the right side of your screen. Above this menu is the traditional Calc stack display. On a 24-line screen you will be able to see the top three stack entries. @@ -29461,7 +29461,7 @@ At other times it changes the sign of the number on the top of the stack. The @key{INV} and @key{HYP} keys modify other keys. As well as -having the effects described elsewhere in this manual, Keypad Mode +having the effects described elsewhere in this manual, Keypad mode defines several other ``inverse'' operations. These are described below and in the following sections. @@ -29481,7 +29481,7 @@ The @key{EXEC} key prompts you to enter any keystroke sequence that would normally work in Calc mode. This can include a numeric prefix if you wish. It is also possible simply to switch into the Calc window and type commands in it; there is -nothing ``magic'' about this window when Keypad Mode is active. +nothing ``magic'' about this window when Keypad mode is active. The other keys in this display perform their obvious calculator functions. @key{CLN2} rounds the top-of-stack by temporarily @@ -29760,16 +29760,16 @@ The @key{OVER} key duplicates the second-to-top stack element. The @key{STO} and @key{RCL} keys are analogous to @kbd{s t} and @kbd{s r} in regular Calc. @xref{Store and Recall}. Click the @key{STO} or @key{RCL} key, then one of the ten digits. (Named -variables are not available in Keypad Mode.) You can also use, +variables are not available in Keypad mode.) You can also use, for example, @kbd{STO + 3} to add to register 3. @node Embedded Mode, Programming, Keypad Mode, Top @chapter Embedded Mode @noindent -Embedded Mode in Calc provides an alternative to copying numbers +Embedded mode in Calc provides an alternative to copying numbers and formulas back and forth between editing buffers and the Calc -stack. In Embedded Mode, your editing buffer becomes temporarily +stack. In Embedded mode, your editing buffer becomes temporarily linked to the stack and this copying is taken care of automatically. @menu @@ -29794,7 +29794,7 @@ are visiting your own files. Calc normally scans backward and forward in the buffer for the nearest opening and closing @dfn{formula delimiters}. The simplest -delimiters are blank lines. Other delimiters that Embedded Mode +delimiters are blank lines. Other delimiters that Embedded mode understands are: @enumerate @@ -30352,15 +30352,15 @@ use @kbd{M-# u} to update the buffer by hand. @section Mode Settings in Embedded Mode @noindent -Embedded Mode has a rather complicated mechanism for handling mode +Embedded mode has a rather complicated mechanism for handling mode settings in Embedded formulas. It is possible to put annotations in the file that specify mode settings either global to the entire file or local to a particular formula or formulas. In the latter case, different modes can be specified for use when a formula -is the enabled Embedded Mode formula. +is the enabled Embedded mode formula. -When you give any mode-setting command, like @kbd{m f} (for fraction -mode) or @kbd{d s} (for scientific notation), Embedded Mode adds +When you give any mode-setting command, like @kbd{m f} (for Fraction +mode) or @kbd{d s} (for scientific notation), Embedded mode adds a line like the following one to the file just before the opening delimiter of the formula. @@ -30413,7 +30413,7 @@ sure the value is of a legal type or range; if you write an annotation by hand, be sure to give a proper value or results will be unpredictable. Mode-setting annotations are case-sensitive. -While Embedded Mode is enabled, the word @code{Local} appears in +While Embedded mode is enabled, the word @code{Local} appears in the mode line. This is to show that mode setting commands generate annotations that are ``local'' to the current formula or set of formulas. The @kbd{m R} (@code{calc-mode-record-mode}) command @@ -30429,7 +30429,7 @@ that look like this, respectively: @end example The first kind of annotation will be used only while a formula -is enabled in Embedded Mode. The second kind will be used only +is enabled in Embedded mode. The second kind will be used only when the formula is @emph{not} enabled. (Whether the formula is ``active'' or not, i.e., whether Calc has seen this formula yet, is not relevant here.) @@ -30471,21 +30471,21 @@ We would have to go down to the other formula and press @kbd{M-# u} on it in order to get it to notice the new annotation. Two more mode-recording modes selectable by @kbd{m R} are @code{Save} -(which works even outside of Embedded Mode), in which mode settings +(which works even outside of Embedded mode), in which mode settings are recorded permanently in your Emacs startup file @file{~/.emacs} rather than by annotating the current document, and no-recording mode (where there is no symbol like @code{Save} or @code{Local} in the mode line), in which mode-changing commands do not leave any annotations at all. -When Embedded Mode is not enabled, mode-recording modes except +When Embedded mode is not enabled, mode-recording modes except for @code{Save} have no effect. @node Customizing Embedded Mode, , Mode Settings in Embedded Mode, Embedded Mode @section Customizing Embedded Mode @noindent -You can modify Embedded Mode's behavior by setting various Lisp +You can modify Embedded mode's behavior by setting various Lisp variables described here. Use @kbd{M-x set-variable} or @kbd{M-x edit-options} to adjust a variable on the fly, or put a suitable @code{setq} statement in your @file{~/.emacs} @@ -30495,7 +30495,7 @@ file; @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) While none of these variables will be buffer-local by default, you -can make any of them local to any embedded-mode buffer. (Their +can make any of them local to any Embedded mode buffer. (Their values in the @samp{*Calculator*} buffer are never used.) @vindex calc-embedded-open-formula @@ -30584,7 +30584,7 @@ The default string is @code{"%%% "} (note the trailing space). @vindex calc-embedded-close-plain The @code{calc-embedded-close-plain} variable is a string which ends a ``plain'' formula. The default is @code{" %%%\n"}. Without -the trailing newline here, the first line of a ``big'' mode formula +the trailing newline here, the first line of a Big mode formula that followed might be shifted over with respect to the other lines. @vindex calc-embedded-open-new-formula @@ -31045,7 +31045,7 @@ conditional and looping commands. @cindex Restoring saved modes Keyboard macros sometimes want to operate under known conditions without affecting surrounding conditions. For example, a keyboard -macro may wish to turn on Fraction Mode, or set a particular +macro may wish to turn on Fraction mode, or set a particular precision, independent of the user's normal setting for those modes. @@ -31094,7 +31094,7 @@ for all mode-setting commands inside the macro. In fact, @kbd{C-u Z `} is like @kbd{Z `} except that it sets the modes listed above to their default values. As usual, the matching @kbd{Z '} will restore the modes to their settings from before the @kbd{C-u Z `}. -Also, @w{@kbd{Z `}} with a negative prefix argument resets algebraic mode +Also, @w{@kbd{Z `}} with a negative prefix argument resets the algebraic mode to its default (off) but leaves the other modes the same as they were outside the construct. @@ -32166,7 +32166,7 @@ If the first argument to @code{calc-eval} is a list whose first element is a formula string, then @code{calc-eval} sets all the various Calc modes to their default values while the formula is evaluated and formatted. For example, the precision is set to 12 -digits, digit grouping is turned off, and the normal language +digits, digit grouping is turned off, and the Normal language mode is used. This same principle applies to the other options discussed below. @@ -32189,7 +32189,7 @@ It's usually best to use this form of @code{calc-eval} unless your program actually considers the interaction with Calc's mode settings to be a feature. This will avoid all sorts of potential ``gotchas''; consider what happens with @samp{(calc-eval "sqrt(2)" 'num)} -when the user has left Calc in symbolic mode or no-simplify mode. +when the user has left Calc in Symbolic mode or No-Simplify mode. As another example, @samp{(equal (calc-eval '("$<$$") nil a b) "1")} checks if the number in string @expr{a} is less than the one in @@ -32765,7 +32765,7 @@ will be used. This function takes a Calc object and ``normalizes'' it. At the very least this involves re-rounding floating-point values according to the current precision and other similar jobs. Also, unless the user has -selected no-simplify mode (@pxref{Simplification Modes}), this involves +selected No-Simplify mode (@pxref{Simplification Modes}), this involves actually evaluating a formula object by executing the function calls it contains, and possibly also doing algebraic simplification, etc. @end defun @@ -33127,13 +33127,13 @@ function call which led here will be left in symbolic form. @end defun @defun inexact-value -If Symbolic Mode is enabled, this will signal an error that causes +If Symbolic mode is enabled, this will signal an error that causes @code{normalize} to leave the formula in symbolic form, with the message -``Inexact result.'' (This function has no effect when not in Symbolic Mode.) -Note that if your function calls @samp{(sin 5)} in Symbolic Mode, the +``Inexact result.'' (This function has no effect when not in Symbolic mode.) +Note that if your function calls @samp{(sin 5)} in Symbolic mode, the @code{sin} function will call @code{inexact-value}, which will cause your function to be left unsimplified. You may instead wish to call -@samp{(normalize (list 'calcFunc-sin 5))}, which in Symbolic Mode will +@samp{(normalize (list 'calcFunc-sin 5))}, which in Symbolic mode will return the formula @samp{sin(5)} to your function. @end defun @@ -33179,9 +33179,9 @@ number of parameters, or because it returns @code{nil} or calls @code{reject-arg} or @code{inexact-result}, @code{normalize} returns the formula still in symbolic form. -If the current Simplification Mode is ``none'' or ``numeric arguments +If the current simplification mode is ``none'' or ``numeric arguments only,'' @code{normalize} will act appropriately. However, the more -powerful simplification modes (like algebraic simplification) are +powerful simplification modes (like Algebraic Simplification) are not handled by @code{normalize}. They are handled by @code{calc-normalize}, which calls @code{normalize} and possibly some other routines, such as @code{simplify} or @code{simplify-units}. Programs generally will @@ -33369,7 +33369,7 @@ again to 30 digits for use in the present request. If the current angular mode is Degrees or HMS, this function returns the integer 360. In Radians mode, this function returns either the corresponding value in radians to the current precision, or the formula -@samp{2*pi}, depending on the Symbolic Mode. There are also similar +@samp{2*pi}, depending on the Symbolic mode. There are also similar function @code{half-circle} and @code{quarter-circle}. @end defun @@ -33427,12 +33427,12 @@ If @var{a} is a formula, this returns the formula @samp{deg(@var{a})}. @end defun @defun to-radians-2 a -Like @code{to-radians}, except that in Symbolic Mode a degrees to +Like @code{to-radians}, except that in Symbolic mode a degrees to radians conversion yields a formula like @samp{@var{a}*pi/180}. @end defun @defun from-radians-2 a -Like @code{from-radians}, except that in Symbolic Mode a radians to +Like @code{from-radians}, except that in Symbolic mode a radians to degrees conversion yields a formula like @samp{@var{a}*180/pi}. @end defun From 6d4ebd71ee75278bd653cfc936d861d676e4995b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 15 Dec 2004 06:39:29 +0000 Subject: [PATCH 011/104] *** empty log message *** --- man/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index b251dc8e912..7aa7b79e4ce 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2004-12-15 Jay Belanger + + * calc.texi: Consistently capitalized all mode names. + (Answers to Exercises): Mention that an answer can be a fraction + when in Fraction mode. + 2004-12-13 Jay Belanger * calc.texi: Fix some TeX definitions. From da79720c9e2256e62b9dfb1436e8d83b40ab5045 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 15 Dec 2004 10:08:51 +0000 Subject: [PATCH 012/104] (isearch-update): Test isearch-lazy-highlight before calling isearch-lazy-highlight-new-loop. (isearch-lazy-highlight-new-loop): Don't test isearch-lazy-highlight. --- lisp/isearch.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index 9ee9b4d8521..f94590ded2d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -653,7 +653,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." (setq ;; quit-flag nil not for isearch-mode isearch-adjusted nil isearch-yank-flag nil) - (isearch-lazy-highlight-new-loop) + (if isearch-lazy-highlight (isearch-lazy-highlight-new-loop)) ;; We must prevent the point moving to the end of composition when a ;; part of the composition has just been searched. (setq disable-point-adjustment t)) @@ -2333,8 +2333,7 @@ is nil. This function is called when exiting an incremental search if "Cleanup any previous `isearch-lazy-highlight' loop and begin a new one. This happens when `isearch-update' is invoked (which can cause the search string to change or the window to scroll)." - (when (and isearch-lazy-highlight - (null executing-kbd-macro) + (when (and (null executing-kbd-macro) (sit-for 0) ;make sure (window-start) is credible (or (not (equal isearch-string isearch-lazy-highlight-last-string)) From ccec9764dcf01131e1d10c2b525a3ba68ac4c227 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 15 Dec 2004 10:10:54 +0000 Subject: [PATCH 013/104] (perform-replace): Add isearch-case-fold-search. Use delimited-flag for isearch-regexp. Reset isearch-lazy-highlight-last-string to force lazy highlighting when called from isearch mode. (query-replace-highlight): Revert defcustom type to boolean. (query-replace-lazy-highlight): New defcustom. (query-replace): New face. (perform-replace, replace-highlight, replace-dehighlight): Test query-replace-lazy-highlight instead of special value `isearch' of query-replace-highlight. (replace-dehighlight): Don't call isearch-dehighlight. (replace-highlight): Don't call isearch-highlight. Use face `query-replace' unconditionally. --- lisp/replace.el | 84 ++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 36 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 646f693cd7f..6ba2e7e9aa8 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1283,6 +1283,7 @@ make, or the user didn't cancel the call." (isearch-string isearch-string) (isearch-regexp isearch-regexp) + (isearch-case-fold-search isearch-case-fold-search) (message (if query-flag (substitute-command-keys @@ -1315,9 +1316,11 @@ make, or the user didn't cancel the call." (if regexp-flag from-string (regexp-quote from-string)) "\\b"))) - (if (eq query-replace-highlight 'isearch) - (setq isearch-string search-string - isearch-regexp regexp-flag)) + (when query-replace-lazy-highlight + (setq isearch-string search-string + isearch-regexp (or delimited-flag regexp-flag) + isearch-case-fold-search case-fold-search + isearch-lazy-highlight-last-string nil)) (push-mark) (undo-boundary) @@ -1535,13 +1538,15 @@ make, or the user didn't cancel the call." (append (listify-key-sequence key) unread-command-events)) (setq done t))) - (when (eq query-replace-highlight 'isearch) - ;; Force isearch rehighlighting - (if (not (memq def '(skip backup))) - (setq isearch-lazy-highlight-last-string nil)) - ;; Restore isearch data in case of isearching during edit + (when query-replace-lazy-highlight + ;; Restore isearch data for lazy highlighting + ;; in case of isearching during recursive edit (setq isearch-string search-string - isearch-regexp regexp-flag))) + isearch-regexp (or delimited-flag regexp-flag) + isearch-case-fold-search case-fold-search) + ;; Force lazy rehighlighting only after replacements + (if (not (memq def '(skip backup))) + (setq isearch-lazy-highlight-last-string nil)))) ;; Record previous position for ^ when we move on. ;; Change markers to numbers in the match data ;; since lots of markers slow down editing. @@ -1576,38 +1581,45 @@ make, or the user didn't cancel the call." (if (= replace-count 1) "" "s"))) (and keep-going stack))) -(defcustom query-replace-highlight - (if (and search-highlight isearch-lazy-highlight) 'isearch t) - "*Non-nil means to highlight words during query replacement. -If `isearch', use isearch highlighting for query replacement." - :type '(choice (const :tag "Highlight" t) - (const :tag "No highlighting" nil) - (const :tag "Isearch highlighting" 'isearch)) +(defcustom query-replace-highlight t + "*Non-nil means to highlight matches during query replacement." + :type 'boolean :group 'matching) +(defcustom query-replace-lazy-highlight t + "*Controls the lazy-highlighting during query replacements. +When non-nil, all text in the buffer matching the current match +is highlighted lazily using isearch lazy highlighting (see +`isearch-lazy-highlight-initial-delay' and +`isearch-lazy-highlight-interval')." + :type 'boolean + :group 'matching + :version "21.4") + +(defface query-replace + '((t (:inherit isearch))) + "Face for highlighting query replacement matches." + :group 'matching + :version "21.4") + (defvar replace-overlay nil) -(defun replace-dehighlight () - (cond ((eq query-replace-highlight 'isearch) - (isearch-dehighlight t) - (isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup) - (setq isearch-lazy-highlight-last-string nil)) - (query-replace-highlight - (when replace-overlay - (delete-overlay replace-overlay) - (setq replace-overlay nil))))) +(defun replace-highlight (beg end) + (if query-replace-highlight + (if replace-overlay + (move-overlay replace-overlay beg end (current-buffer)) + (setq replace-overlay (make-overlay beg end)) + (overlay-put replace-overlay 'priority 1) ;higher than lazy overlays + (overlay-put replace-overlay 'face 'query-replace))) + (if query-replace-lazy-highlight + (isearch-lazy-highlight-new-loop))) -(defun replace-highlight (start end) - (cond ((eq query-replace-highlight 'isearch) - (isearch-highlight start end) - (isearch-lazy-highlight-new-loop)) - (query-replace-highlight - (if replace-overlay - (move-overlay replace-overlay start end (current-buffer)) - (setq replace-overlay (make-overlay start end)) - (overlay-put replace-overlay 'face - (if (facep 'query-replace) - 'query-replace 'region)))))) +(defun replace-dehighlight () + (when replace-overlay + (delete-overlay replace-overlay)) + (when query-replace-lazy-highlight + (isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup) + (setq isearch-lazy-highlight-last-string nil))) ;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 ;;; replace.el ends here From 93e8fd61330394143dc422b70270ca62d8f59bee Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 15 Dec 2004 10:22:26 +0000 Subject: [PATCH 014/104] (Transient Mark, Mark Ring): M-< and other movement commands don't set mark in Transient Mark mode if mark is active. --- man/mark.texi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/mark.texi b/man/mark.texi index 4f1c8a6d4d9..c37bd7857e0 100644 --- a/man/mark.texi +++ b/man/mark.texi @@ -191,7 +191,9 @@ You can activate the new region by executing @kbd{C-x C-x} (@code{exchange-point-and-mark}). @item -@kbd{C-s} when the mark is active does not alter the mark. +Commands that normally set the mark before moving long distances (like +@kbd{M-<} and @kbd{C-s}) do not alter the mark in Transient Mark mode +when the mark is active. @item Some commands operate on the region if a region is active. For @@ -384,9 +386,10 @@ the same buffer. Many commands that can move long distances, such as @kbd{M-<} (@code{beginning-of-buffer}), start by setting the mark and saving the old mark on the mark ring. This is to make it easier for you to move -back later. Searches set the mark if they move point. You can tell -when a command sets the mark because it displays @samp{Mark set} in the -echo area. +back later. Searches set the mark if they move point. However, in +Transient Mark mode, these commands do not set the mark when the mark +is already active. You can tell when a command sets the mark because +it displays @samp{Mark set} in the echo area. If you want to move back to the same place over and over, the mark ring may not be convenient enough. If so, you can record the position From a31a30b5bb7491d9083ecf018df6166af12a9918 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 15 Dec 2004 10:27:25 +0000 Subject: [PATCH 015/104] *** empty log message *** --- etc/NEWS | 13 +++++++------ lisp/ChangeLog | 21 +++++++++++++++++++++ man/ChangeLog | 6 ++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 224082587c1..21895dd1d63 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1085,9 +1085,11 @@ All regular expression replacement commands now allow `\?' in the replacement string to specify a position where the replacement string can be edited for each replacement. -** query-replace uses isearch highlighting with lazy highlighting -when the user option `query-replace-highlight' is set to `isearch'. -If it is t, it uses old query-replace highlighting method. +** query-replace uses isearch lazy highlighting when the new user option +`query-replace-lazy-highlight' is non-nil. + +** The current match in query-replace is highlighted in new face +`query-replace' which by default inherits from isearch face. +++ ** Emacs normally highlights mouse sensitive text whenever the mouse @@ -1422,9 +1424,8 @@ previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. ** Movement commands `beginning-of-buffer', `end-of-buffer', -`beginning-of-defun', `end-of-defun' do not set the mark if the new -option `inhibit-mark-movement' is non-nil, or if the mark is already -active in Transient Mark mode. +`beginning-of-defun', `end-of-defun' do not set the mark if the mark +is already active in Transient Mark mode. +++ ** In the *Occur* buffer, `o' switches to it in another window, and diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 535c48393f5..f647f1a456d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2004-12-15 Juri Linkov + + * isearch.el (isearch-update): Test isearch-lazy-highlight + before calling isearch-lazy-highlight-new-loop. + (isearch-lazy-highlight-new-loop): + Don't test isearch-lazy-highlight. + + * replace.el (perform-replace): Add isearch-case-fold-search. + Use delimited-flag for isearch-regexp. + Reset isearch-lazy-highlight-last-string to force lazy + highlighting when called from isearch mode. + (query-replace-highlight): Revert defcustom type to boolean. + (query-replace-lazy-highlight): New defcustom. + (query-replace): New face. + (perform-replace, replace-highlight, replace-dehighlight): + Test query-replace-lazy-highlight instead of special value + `isearch' of query-replace-highlight. + (replace-dehighlight): Don't call isearch-dehighlight. + (replace-highlight): Don't call isearch-highlight. + Use face `query-replace' unconditionally. + 2004-12-14 Kim F. Storm * simple.el (inhibit-mark-movement): Remove defvar. diff --git a/man/ChangeLog b/man/ChangeLog index 7aa7b79e4ce..d4e6e7fbd20 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2004-12-15 Juri Linkov + + * mark.texi (Transient Mark, Mark Ring): M-< and other + movement commands don't set mark in Transient Mark mode + if mark is active. + 2004-12-15 Jay Belanger * calc.texi: Consistently capitalized all mode names. From 1bb3da3814817a1ac12b2e54f3a1258b39ae0dd7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 15 Dec 2004 13:23:25 +0000 Subject: [PATCH 016/104] (main): Fix typo in conversion of LONG_OPTIONS from preprocessing to compile time constant. --- lib-src/ChangeLog | 5 +++++ lib-src/etags.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 994102f5a87..d913fbaf2c9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-15 Andreas Schwab + + * etags.c (main): Fix typo in conversion of LONG_OPTIONS from + preprocessing to compile time constant. + 2004-11-17 Kim F. Storm * etags.c: Undo last change. diff --git a/lib-src/etags.c b/lib-src/etags.c index a6004a048a9..a06d29bfd11 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -1,5 +1,5 @@ /* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*- - Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002 + Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002, 2004 Free Software Foundation, Inc. and Ken Arnold This file is not considered part of GNU Emacs. @@ -1183,7 +1183,7 @@ main (argc, argv) #ifdef ETAGS_REGEXPS optstring = "-r:Rc:"; #endif /* ETAGS_REGEXPS */ - if (LONG_OPTIONS) + if (!LONG_OPTIONS) optstring += 1; optstring = concat (optstring, "Cf:Il:o:SVhH", From 3ef8085247089b62a44c019d65f8a300ddf3a790 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 15 Dec 2004 13:53:58 +0000 Subject: [PATCH 017/104] (zone): Set `truncate-lines'. Also, init `tab-width' with value from original buffer. (zone-shift-up): Rewrite for speed. (zone-shift-down, zone-shift-left, zone-shift-right): Likewise. (zone-pgm-jitter): Remove redundant entries from ops vector. (zone-exploding-remove): Reduce iteration count. (zone-cpos): Convert to defsubst. (zone-replace-char): New defsubst. (zone-park/sit-for): Likewise. (zone-fret): Take window-start arg. Update callers. Use `zone-park/sit-for'. (zone-fill-out-screen): Rewrite. (zone-fall-through-ws): Likewise. Update callers. (zone-pgm-drip): Use `zone-replace-char'. Move var inits before while-loop. Use `zone-park/sit-for'. (zone-pgm-random-life): Handle empty initial field. Use `zone-replace-char' and `zone-park/sit-for'. --- lisp/play/zone.el | 243 +++++++++++++++++++++++----------------------- 1 file changed, 120 insertions(+), 123 deletions(-) diff --git a/lisp/play/zone.el b/lisp/play/zone.el index e073e343f02..2116e0c78b6 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -140,12 +140,13 @@ If the element is a function or a list of a function and a number, (window-start))))) (put 'zone 'orig-buffer (current-buffer)) (put 'zone 'modeline-hidden-level 0) - (set-buffer outbuf) + (switch-to-buffer outbuf) (setq mode-name "Zone") (erase-buffer) + (setq buffer-undo-list t + truncate-lines t + tab-width (zone-orig tab-width)) (insert text) - (switch-to-buffer outbuf) - (setq buffer-undo-list t) (untabify (point-min) (point-max)) (set-window-start (selected-window) (point-min)) (set-window-point (selected-window) wp) @@ -195,13 +196,11 @@ If the element is a function or a list of a function and a number, (message "I won't zone out any more")) -;;;; zone-pgm-jitter +;;;; jittering (defun zone-shift-up () (let* ((b (point)) - (e (progn - (end-of-line) - (if (looking-at "\n") (1+ (point)) (point)))) + (e (progn (forward-line 1) (point))) (s (buffer-substring b e))) (delete-region b e) (goto-char (point-max)) @@ -209,48 +208,40 @@ If the element is a function or a list of a function and a number, (defun zone-shift-down () (goto-char (point-max)) - (forward-line -1) - (beginning-of-line) (let* ((b (point)) - (e (progn - (end-of-line) - (if (looking-at "\n") (1+ (point)) (point)))) + (e (progn (forward-line -1) (point))) (s (buffer-substring b e))) (delete-region b e) (goto-char (point-min)) (insert s))) (defun zone-shift-left () - (while (not (eobp)) - (or (eolp) - (let ((c (following-char))) - (delete-char 1) - (end-of-line) - (insert c))) - (forward-line 1))) + (let (s) + (while (not (eobp)) + (unless (eolp) + (setq s (buffer-substring (point) (1+ (point)))) + (delete-char 1) + (end-of-line) + (insert s)) + (forward-char 1)))) (defun zone-shift-right () - (while (not (eobp)) - (end-of-line) - (or (bolp) - (let ((c (preceding-char))) - (delete-backward-char 1) - (beginning-of-line) - (insert c))) - (forward-line 1))) + (goto-char (point-max)) + (end-of-line) + (let (s) + (while (not (bobp)) + (unless (bolp) + (setq s (buffer-substring (1- (point)) (point))) + (delete-char -1) + (beginning-of-line) + (insert s)) + (end-of-line 0)))) (defun zone-pgm-jitter () (let ((ops [ - zone-shift-left - zone-shift-left - zone-shift-left zone-shift-left zone-shift-right zone-shift-down - zone-shift-down - zone-shift-down - zone-shift-down - zone-shift-down zone-shift-up ])) (goto-char (point-min)) @@ -260,7 +251,7 @@ If the element is a function or a list of a function and a number, (sit-for 0 10)))) -;;;; zone-pgm-whack-chars +;;;; whacking chars (defun zone-pgm-whack-chars () (let ((tbl (copy-sequence (get 'zone-pgm-whack-chars 'wc-tbl)))) @@ -280,7 +271,7 @@ If the element is a function or a list of a function and a number, (setq i (1+ i))) tbl)) -;;;; zone-pgm-dissolve +;;;; dissolving (defun zone-remove-text () (let ((working t)) @@ -305,11 +296,11 @@ If the element is a function or a list of a function and a number, (zone-pgm-jitter)) -;;;; zone-pgm-explode +;;;; exploding (defun zone-exploding-remove () (let ((i 0)) - (while (< i 20) + (while (< i 5) (save-excursion (goto-char (point-min)) (while (not (eobp)) @@ -328,7 +319,7 @@ If the element is a function or a list of a function and a number, (zone-pgm-jitter)) -;;;; zone-pgm-putz-with-case +;;;; putzing w/ case ;; Faster than `zone-pgm-putz-with-case', but not as good: all ;; instances of the same letter have the same case, which produces a @@ -377,7 +368,7 @@ If the element is a function or a list of a function and a number, (sit-for 0 2))) -;;;; zone-pgm-rotate +;;;; rotating (defun zone-line-specs () (let (ret) @@ -439,12 +430,23 @@ If the element is a function or a list of a function and a number, (zone-pgm-rotate (lambda () (1- (- (random 3)))))) -;;;; zone-pgm-drip +;;;; dripping -(defun zone-cpos (pos) +(defsubst zone-cpos (pos) (buffer-substring pos (1+ pos))) -(defun zone-fret (pos) +(defsubst zone-replace-char (direction char-as-string new-value) + (delete-char direction) + (aset char-as-string 0 new-value) + (insert char-as-string)) + +(defsubst zone-park/sit-for (pos seconds) + (let ((p (point))) + (goto-char pos) + (prog1 (sit-for seconds) + (goto-char p)))) + +(defun zone-fret (wbeg pos) (let* ((case-fold-search nil) (c-string (zone-cpos pos)) (hmm (cond @@ -457,48 +459,45 @@ If the element is a function or a list of a function and a number, (goto-char pos) (delete-char 1) (insert (if (= 0 (% i 2)) hmm c-string)) - (sit-for wait)) + (zone-park/sit-for wbeg wait)) (delete-char -1) (insert c-string))) (defun zone-fill-out-screen (width height) - (save-excursion - (goto-char (point-min)) + (let ((start (window-start)) + (line (make-string width 32))) + (goto-char start) ;; fill out rectangular ws block - (while (not (eobp)) - (end-of-line) - (let ((cc (current-column))) - (if (< cc width) - (insert (make-string (- width cc) 32)) - (delete-char (- width cc)))) - (unless (eobp) - (forward-char 1))) + (while (progn (end-of-line) + (let ((cc (current-column))) + (if (< cc width) + (insert (substring line cc)) + (delete-char (- width cc))) + (cond ((eobp) (insert "\n") nil) + (t (forward-char 1) t))))) ;; pad ws past bottom of screen (let ((nl (- height (count-lines (point-min) (point))))) (when (> nl 0) - (let ((line (concat (make-string (1- width) ? ) "\n"))) - (do ((i 0 (1+ i))) - ((= i nl)) - (insert line))))))) + (setq line (concat line "\n")) + (do ((i 0 (1+ i))) + ((= i nl)) + (insert line)))) + (goto-char start) + (recenter 0) + (sit-for 0))) -(defun zone-fall-through-ws (c col wend) +(defun zone-fall-through-ws (c ww wbeg wend) (let ((fall-p nil) ; todo: move outward - (wait 0.15) - (o (point)) ; for terminals w/o cursor hiding - (p (point))) - (while (progn - (forward-line 1) - (move-to-column col) - (looking-at " ")) - (setq fall-p t) - (delete-char 1) - (insert (if (< (point) wend) c " ")) - (save-excursion - (goto-char p) - (delete-char 1) - (insert " ") - (goto-char o) - (sit-for (setq wait (* wait 0.8)))) - (setq p (1- (point)))) + (wait 0.15)) + (while (when (= 32 (char-after (+ (point) ww 1))) + (setq fall-p t) + (delete-char 1) + (insert " ") + (forward-char ww) + (when (< (point) wend) + (delete-char 1) + (insert c) + (forward-char -1) + (zone-park/sit-for wbeg (setq wait (* wait 0.8)))))) fall-p)) (defun zone-pgm-drip (&optional fret-p pancake-p) @@ -506,41 +505,36 @@ If the element is a function or a list of a function and a number, (wh (window-height)) (mc 0) ; miss count (total (* ww wh)) - (fall-p nil)) + (fall-p nil) + wbeg wend c) (zone-fill-out-screen ww wh) + (setq wbeg (window-start) + wend (window-end)) (catch 'done (while (not (input-pending-p)) - (let ((wbeg (window-start)) - (wend (window-end))) - (setq mc 0) - ;; select non-ws character, but don't miss too much - (goto-char (+ wbeg (random (- wend wbeg)))) - (while (looking-at "[ \n\f]") - (if (= total (setq mc (1+ mc))) - (throw 'done 'sel) - (goto-char (+ wbeg (random (- wend wbeg)))))) - ;; character animation sequence - (let ((p (point))) - (when fret-p (zone-fret p)) - (goto-char p) - (setq fall-p (zone-fall-through-ws - (zone-cpos p) (current-column) wend)))) + (setq mc 0) + ;; select non-ws character, but don't miss too much + (goto-char (+ wbeg (random (- wend wbeg)))) + (while (looking-at "[ \n\f]") + (if (= total (setq mc (1+ mc))) + (throw 'done 'sel) + (goto-char (+ wbeg (random (- wend wbeg)))))) + ;; character animation sequence + (let ((p (point))) + (when fret-p (zone-fret wbeg p)) + (goto-char p) + (setq c (zone-cpos p) + fall-p (zone-fall-through-ws c ww wbeg wend))) ;; assuming current-column has not changed... (when (and pancake-p fall-p (< (count-lines (point-min) (point)) wh)) - (previous-line 1) - (forward-char 1) - (sit-for 0.137) - (delete-char -1) - (insert "@") - (sit-for 0.137) - (delete-char -1) - (insert "*") - (sit-for 0.137) - (delete-char -1) - (insert "_")))))) + (zone-replace-char 1 c ?@) + (zone-park/sit-for wbeg 0.137) + (zone-replace-char -1 c ?*) + (zone-park/sit-for wbeg 0.137) + (zone-replace-char -1 c ?_)))))) (defun zone-pgm-drip-fretfully () (zone-pgm-drip t)) @@ -552,7 +546,7 @@ If the element is a function or a list of a function and a number, (zone-pgm-drip t t)) -;;;; zone-pgm-paragraph-spaz +;;;; paragraph spazzing (for textish modes) (defun zone-pgm-paragraph-spaz () (if (memq (zone-orig major-mode) @@ -633,30 +627,28 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") (rtc (- (frame-width) 11)) (min (window-start)) (max (1- (window-end))) - c col) + s c col) (delete-region max (point-max)) - (while (progn (goto-char (+ min (random max))) - (and (sit-for 0.005) + (while (and (progn (goto-char min) (sit-for 0.05)) + (progn (goto-char (+ min (random max))) (or (progn (skip-chars-forward " @\n" max) (not (= max (point)))) (unless (or (= 0 (skip-chars-backward " @\n" min)) (= min (point))) (forward-char -1) t)))) - (setq c (char-after)) - (unless (or (not c) (= ?\n c)) - (forward-char 1) - (insert-and-inherit ; keep colors - (cond ((or (> top (point)) - (< bot (point)) - (or (> 11 (setq col (current-column))) - (< rtc col))) - 32) - ((and (<= ?a c) (>= ?z c)) (+ c (- ?A ?a))) - ((and (<= ?A c) (>= ?Z c)) ?*) - (t ?@))) - (forward-char -1) - (delete-char -1))) + (unless (or (eolp) (eobp)) + (setq s (zone-cpos (point)) + c (aref s 0)) + (zone-replace-char + 1 s (cond ((or (> top (point)) + (< bot (point)) + (or (> 11 (setq col (current-column))) + (< rtc col))) + 32) + ((and (<= ?a c) (>= ?z c)) (+ c (- ?A ?a))) + ((and (<= ?A c) (>= ?Z c)) ?*) + (t ?@))))) (sit-for 3) (setq col nil) (goto-char bot) @@ -666,8 +658,13 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") (setq col (cons (buffer-substring (point) c) col)) (end-of-line 0) (forward-char -10)) - (let ((life-patterns (vector (cons (make-string (length (car col)) 32) - col)))) + (let ((life-patterns (vector + (if (and col (re-search-forward "[^ ]" max t)) + (cons (make-string (length (car col)) 32) col) + (list (mapconcat 'identity + (make-list (/ (- rtc 11) 15) + (make-string 5 ?@)) + (make-string 10 32))))))) (life (or zone-pgm-random-life-wait (random 4))) (kill-buffer nil)))) From 6f5546a98c4c0790fc729c8bc35de1835c6a123b Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 15 Dec 2004 13:59:17 +0000 Subject: [PATCH 018/104] Add to THANKS in Commentary; nfc. --- lisp/ChangeLog | 20 ++++++++++++++++++++ lisp/play/zone.el | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f647f1a456d..b99750e938d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2004-12-15 Thien-Thi Nguyen + + * play/zone.el (zone): Set `truncate-lines'. + Also, init `tab-width' with value from original buffer. + (zone-shift-up): Rewrite for speed. + (zone-shift-down, zone-shift-left, zone-shift-right): Likewise. + (zone-pgm-jitter): Remove redundant entries from ops vector. + (zone-exploding-remove): Reduce iteration count. + (zone-cpos): Convert to defsubst. + (zone-replace-char): New defsubst. + (zone-park/sit-for): Likewise. + (zone-fret): Take window-start arg. + Update callers. Use `zone-park/sit-for'. + (zone-fill-out-screen): Rewrite. + (zone-fall-through-ws): Likewise. Update callers. + (zone-pgm-drip): Use `zone-replace-char'. + Move var inits before while-loop. Use `zone-park/sit-for'. + (zone-pgm-random-life): Handle empty initial field. + Use `zone-replace-char' and `zone-park/sit-for'. + 2004-12-15 Juri Linkov * isearch.el (isearch-update): Test isearch-lazy-highlight diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 2116e0c78b6..b47a287701d 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -36,7 +36,7 @@ ;; computers as slow as mine. ;; THANKS: Christopher Mayer, Scott Flinchbaugh, Rachel Kalmar, -;; Max Froumentin. +;; Max Froumentin, Juri Linkov, Luigi Panzeri. ;;; Code: From 6b75c9afcc8373613a8af2408a08c990260ffe32 Mon Sep 17 00:00:00 2001 From: "J.D. Smith" Date: Wed, 15 Dec 2004 19:06:11 +0000 Subject: [PATCH 019/104] Check for && when skipping multiple commands on a line. --- lisp/progmodes/idlwave.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 45694b57b99..a17ba3e844f 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -2571,7 +2571,9 @@ If not in a statement just moves to end of line. Returns position." (let ((save-point (point))) (when (re-search-forward ".*&" lim t) (goto-char (match-end 0)) - (if (idlwave-quoted) (goto-char save-point))) + (if (idlwave-quoted) + (goto-char save-point) + (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) (point))) (defun idlwave-skip-label-or-case () From b66d0e6bded32dd56565a4b51dcb0506d8540950 Mon Sep 17 00:00:00 2001 From: "J.D. Smith" Date: Wed, 15 Dec 2004 19:51:51 +0000 Subject: [PATCH 020/104] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b99750e938d..37d6f4bf207 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-15 J.D. Smith + + * progmodes/idlwave.el (idlwave-skip-multi-commands): Don't match + `&&' when skipping multiple statements on a line. + 2004-12-15 Thien-Thi Nguyen * play/zone.el (zone): Set `truncate-lines'. From 78f617dde40a5eeee768162ffaa266c19c1bed73 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Wed, 15 Dec 2004 21:28:02 +0000 Subject: [PATCH 021/104] (executable-interpret): Eliminate obsolete compile-internal, and switch to comint for interaction. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/executable.el | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37d6f4bf207..a086e276835 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-15 Daniel Pfeiffer + + * progmodes/executable.el (executable-interpret): Eliminate + obsolete compile-internal, and switch to comint for interaction. + 2004-12-15 J.D. Smith * progmodes/idlwave.el (idlwave-skip-multi-commands): Don't match diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index a5d401a5f5e..0eb53771019 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -199,20 +199,20 @@ non-executable files." (file-modes buffer-file-name))))))) +;;;###autoload (defun executable-interpret (command) "Run script with user-specified args, and collect output in a buffer. -While script runs asynchronously, you can use the \\[next-error] command -to find the next error." +While script runs asynchronously, you can use the \\[next-error] +command to find the next error. The buffer is also in `comint-mode' and +`compilation-shell-minor-mode', so that you can answer any prompts." (interactive (list (read-string "Run script: " (or executable-command buffer-file-name)))) (require 'compile) (save-some-buffers (not compilation-ask-about-save)) - (make-local-variable 'executable-command) - (compile-internal (setq executable-command command) - "No more errors." "Interpretation" - ;; Give it a simpler regexp to match. - nil executable-error-regexp-alist)) + (set (make-local-variable 'executable-command) command) + (let ((compilation-error-regexp-alist executable-error-regexp-alist)) + (compilation-start command t (lambda (x) "*interpretation*")))) From fecad3f6597e12724d2329354905a99450347d0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 15 Dec 2004 21:34:14 +0000 Subject: [PATCH 022/104] * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before returning when xg_ignore_gtk_scrollbar is true. --- src/ChangeLog | 5 +++++ src/xterm.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 84955d3b0ff..abeef641313 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-15 Jan Dj,Ad(Brv + + * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before + returning when xg_ignore_gtk_scrollbar is true. + 2004-12-14 Kim F. Storm * keyboard.c (read_char): Save and restore echo_string when diff --git a/src/xterm.c b/src/xterm.c index d4841f75c28..0f78ba66efa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4283,8 +4283,6 @@ xg_scroll_callback (widget, data) int part = -1, whole = 0, portion = 0; GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (widget)); - if (xg_ignore_gtk_scrollbar) return; - position = gtk_adjustment_get_value (adj); p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); @@ -4298,6 +4296,8 @@ xg_scroll_callback (widget, data) previous = *p; *p = position; + if (xg_ignore_gtk_scrollbar) return; + diff = (int) (position - previous); if (diff == (int) adj->step_increment) @@ -4329,7 +4329,7 @@ xg_scroll_callback (widget, data) } if (part >= 0) - { + { window_being_scrolled = bar->window; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, portion, whole); From 333f1b6f78ea3923fd49c8bb7f4d4aef39549591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 15 Dec 2004 21:40:41 +0000 Subject: [PATCH 023/104] * syssignal.h: Declare main_thread. (SIGNAL_THREAD_CHECK): New macro. * keyboard.c (input_available_signal): Move thread checking code to macro SIGNAL_THREAD_CHECK and call that macro. (interrupt_signal): Call SIGNAL_THREAD_CHECK. * alloc.c (uninterrupt_malloc): Move main_thread to emacs.c. * emacs.c: Define main_thread. (main): Initialize main_thread. (handle_USR1_signal, handle_USR2_signal, fatal_error_signal) (memory_warning_signal): Call SIGNAL_THREAD_CHECK. * floatfns.c (float_error): Call SIGNAL_THREAD_CHECK. * dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK. * sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK. * process.c (send_process_trap, sigchld_handler): Call SIGNAL_THREAD_CHECK. * data.c (arith_error): Call SIGNAL_THREAD_CHECK. * atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK. --- src/ChangeLog | 27 +++++++++++++++++++++++++++ src/alloc.c | 5 +---- src/atimer.c | 2 ++ src/data.c | 1 + src/dispnew.c | 4 +++- src/emacs.c | 16 ++++++++++++++++ src/floatfns.c | 1 + src/keyboard.c | 19 ++----------------- src/process.c | 3 +++ src/sysdep.c | 1 + src/syssignal.h | 27 +++++++++++++++++++++++++++ 11 files changed, 84 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index abeef641313..63f0fe42a37 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,32 @@ 2004-12-15 Jan Dj,Ad(Brv + * syssignal.h: Declare main_thread. + (SIGNAL_THREAD_CHECK): New macro. + + * keyboard.c (input_available_signal): Move thread checking code + to macro SIGNAL_THREAD_CHECK and call that macro. + (interrupt_signal): Call SIGNAL_THREAD_CHECK. + + * alloc.c (uninterrupt_malloc): Move main_thread to emacs.c. + + * emacs.c: Define main_thread. + (main): Initialize main_thread. + (handle_USR1_signal, handle_USR2_signal, fatal_error_signal) + (memory_warning_signal): Call SIGNAL_THREAD_CHECK. + + * floatfns.c (float_error): Call SIGNAL_THREAD_CHECK. + + * dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK. + + * sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK. + + * process.c (send_process_trap, sigchld_handler): Call + SIGNAL_THREAD_CHECK. + + * data.c (arith_error): Call SIGNAL_THREAD_CHECK. + + * atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK. + * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before returning when xg_ignore_gtk_scrollbar is true. diff --git a/src/alloc.c b/src/alloc.c index 0ea389117ba..5038fdfce10 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -99,7 +99,7 @@ extern __malloc_size_t __malloc_extra_blocks; If Emacs sets malloc hooks (! SYSTEM_MALLOC) and the emacs_blocked_* functions below are called from malloc, there is a chance that one of these threads preempts the Emacs main thread and the hook variables - end up in a inconsistent state. So we have a mutex to prevent that (note + end up in an inconsistent state. So we have a mutex to prevent that (note that the backend handles concurrent access to malloc within its own threads but Emacs code running in the main thread is not included in that control). @@ -109,7 +109,6 @@ extern __malloc_size_t __malloc_extra_blocks; To prevent that, we only call BLOCK/UNBLOCK from the main thread. */ static pthread_mutex_t alloc_mutex; -pthread_t main_thread; #define BLOCK_INPUT_ALLOC \ do \ @@ -1310,8 +1309,6 @@ uninterrupt_malloc () pthread_mutexattr_init (&attr); pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init (&alloc_mutex, &attr); - - main_thread = pthread_self (); #endif /* HAVE_GTK_AND_PTHREAD */ if (__free_hook != emacs_blocked_free) diff --git a/src/atimer.c b/src/atimer.c index 7410cad0244..ff5b8faaf36 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -364,6 +364,8 @@ alarm_signal_handler (signo) { EMACS_TIME now; + SIGNAL_THREAD_CHECK (signo); + EMACS_GET_TIME (now); pending_atimers = 0; diff --git a/src/data.c b/src/data.c index afbca80181d..811619b58b3 100644 --- a/src/data.c +++ b/src/data.c @@ -3366,6 +3366,7 @@ arith_error (signo) sigsetmask (SIGEMPTYMASK); #endif /* not BSD4_1 */ + SIGNAL_THREAD_CHECK (signo); Fsignal (Qarith_error, Qnil); } diff --git a/src/dispnew.c b/src/dispnew.c index 69e495d8d8b..78ca0e39109 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5994,6 +5994,9 @@ window_change_signal (signalnum) /* If we don't have an argument, */ #endif int old_errno = errno; + signal (SIGWINCH, window_change_signal); + SIGNAL_THREAD_CHECK (signalnum); + get_frame_size (&width, &height); /* The frame size change obviously applies to a termcap-controlled @@ -6016,7 +6019,6 @@ window_change_signal (signalnum) /* If we don't have an argument, */ } } - signal (SIGWINCH, window_change_signal); errno = old_errno; } #endif /* SIGWINCH */ diff --git a/src/emacs.c b/src/emacs.c index 9fde3a6ed42..791e13dd6d0 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -342,6 +342,14 @@ int fatal_error_in_progress; void (*fatal_error_signal_hook) P_ ((void)); +#ifdef HAVE_GTK_AND_PTHREAD +/* When compiled with GTK and running under Gnome, multiple threads meay be + created. Keep track of our main thread to make sure signals are delivered + to it (see syssignal.h). */ + +pthread_t main_thread; +#endif + #ifdef SIGUSR1 SIGTYPE @@ -350,6 +358,7 @@ handle_USR1_signal (sig) { struct input_event buf; + SIGNAL_THREAD_CHECK (sig); bzero (&buf, sizeof buf); buf.kind = USER_SIGNAL_EVENT; buf.frame_or_window = selected_frame; @@ -365,6 +374,7 @@ handle_USR2_signal (sig) { struct input_event buf; + SIGNAL_THREAD_CHECK (sig); bzero (&buf, sizeof buf); buf.kind = USER_SIGNAL_EVENT; buf.code = 1; @@ -379,6 +389,7 @@ SIGTYPE fatal_error_signal (sig) int sig; { + SIGNAL_THREAD_CHECK (sig); fatal_error_code = sig; signal (sig, SIG_DFL); @@ -418,6 +429,7 @@ memory_warning_signal (sig) int sig; { signal (sig, memory_warning_signal); + SIGNAL_THREAD_CHECK (sig); malloc_warning ("Operating system warns that virtual memory is running low.\n"); @@ -1029,6 +1041,10 @@ main (argc, argv # endif /* not SYNC_INPUT */ #endif /* not SYSTEM_MALLOC */ +#ifdef HAVE_GTK_AND_PTHREAD + main_thread = pthread_self (); +#endif /* HAVE_GTK_AND_PTHREAD */ + #if defined (MSDOS) || defined (WINDOWSNT) /* We do all file input/output as binary files. When we need to translate newlines, we do that manually. */ diff --git a/src/floatfns.c b/src/floatfns.c index 61879eabe39..8cd08106ef2 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -981,6 +981,7 @@ float_error (signo) signal (SIGILL, float_error); #endif /* BSD_SYSTEM */ + SIGNAL_THREAD_CHECK (signo); in_float = 0; Fsignal (Qarith_error, Fcons (float_error_arg, Qnil)); diff --git a/src/keyboard.c b/src/keyboard.c index 95de9c2c6ad..ffd36acb335 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6838,23 +6838,7 @@ input_available_signal (signo) interrupt_input_pending = 1; #else -# if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) - extern pthread_t main_thread; - if (pthread_self () != main_thread) - { - /* POSIX says any thread can receive the signal. On GNU/Linux that is - not true, but for other systems (FreeBSD at least) it is. So direct - the signal to the correct thread and block it from this thread. */ - sigset_t new_mask; - - sigemptyset (&new_mask); - sigaddset (&new_mask, SIGIO); - pthread_sigmask (SIG_BLOCK, &new_mask, 0); - pthread_kill (main_thread, SIGIO); - return; - } -# endif /* HAVE_GTK_AND_PTHREAD */ - + SIGNAL_THREAD_CHECK (signo); handle_async_input (); #endif @@ -10270,6 +10254,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */ } #endif /* USG */ + SIGNAL_THREAD_CHECK (signalnum); cancel_echoing (); if (!NILP (Vquit_flag) diff --git a/src/process.c b/src/process.c index ec07e95c34a..ad4cf8f8546 100644 --- a/src/process.c +++ b/src/process.c @@ -5104,6 +5104,7 @@ Lisp_Object process_sent_to; SIGTYPE send_process_trap () { + SIGNAL_THREAD_CHECK (SIGPIPE); #ifdef BSD4_1 sigrelse (SIGPIPE); sigrelse (SIGALRM); @@ -6146,6 +6147,8 @@ sigchld_handler (signo) register struct Lisp_Process *p; extern EMACS_TIME *input_available_clear_time; + SIGNAL_THREAD_CHECK (signo); + #ifdef BSD4_1 extern int sigheld; sigheld |= sigbit (SIGCHLD); diff --git a/src/sysdep.c b/src/sysdep.c index 6284774d092..1884c0ccffa 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2472,6 +2472,7 @@ select_alarm () #else /* not BSD4_1 */ signal (SIGALRM, SIG_IGN); #endif /* not BSD4_1 */ + SIGNAL_THREAD_CHECK (SIGALRM); if (read_alarm_should_throw) longjmp (read_alarm_throw, 1); } diff --git a/src/syssignal.h b/src/syssignal.h index cef71f7459a..04e84df1a3a 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -20,6 +20,11 @@ Boston, MA 02111-1307, USA. */ extern void init_signals P_ ((void)); +#ifdef HAVE_GTK_AND_PTHREAD +#include +extern pthread_t main_thread; +#endif + #ifdef POSIX_SIGNALS /* Don't #include . That header should always be #included @@ -198,5 +203,27 @@ extern SIGMASKTYPE sigprocmask_set; char *strsignal (); #endif +#ifdef HAVE_GTK_AND_PTHREAD +#define SIGNAL_THREAD_CHECK(signo) \ + do { \ + if (pthread_self () != main_thread) \ + { \ + /* POSIX says any thread can receive the signal. On GNU/Linux \ + that is not true, but for other systems (FreeBSD at least) \ + it is. So direct the signal to the correct thread and block \ + it from this thread. */ \ + sigset_t new_mask; \ + \ + sigemptyset (&new_mask); \ + sigaddset (&new_mask, signo); \ + pthread_sigmask (SIG_BLOCK, &new_mask, 0); \ + pthread_kill (main_thread, signo); \ + return; \ + } \ + } while (0) + +#else /* not HAVE_GTK_AND_PTHREAD */ +#define SIGNAL_THREAD_CHECK(signo) +#endif /* not HAVE_GTK_AND_PTHREAD */ /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 (do not change this comment) */ From aaaecfcda1d58125879a1111e1f338e3866ee655 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 07:16:17 +0000 Subject: [PATCH 024/104] (match): New face. (list-matching-lines-face): Change default from `bold' to `match'. --- lisp/replace.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/replace.el b/lisp/replace.el index 6ba2e7e9aa8..872e5e290a8 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -752,6 +752,20 @@ Compatibility function for \\[next-error] invocations." (set-window-point (get-buffer-window (current-buffer)) (point)) (occur-mode-goto-occurrence))) +(defface match + '((((class color) (min-colors 88) (background light)) + :background "Tan") + (((class color) (min-colors 88) (background dark)) + :background "RoyalBlue4") + (((class color) (min-colors 8)) + :background "blue" :foreground "white") + (((type tty) (class mono)) + :inverse-video t) + (t :background "gray")) + "Face used to highlight matches permanently." + :group 'matching + :version "21.4") + (defcustom list-matching-lines-default-context-lines 0 "*Default number of context lines included around `list-matching-lines' matches. A negative number means to include that many lines before the match. @@ -761,7 +775,7 @@ A positive number means to include that many lines both before and after." (defalias 'list-matching-lines 'occur) -(defcustom list-matching-lines-face 'bold +(defcustom list-matching-lines-face 'match "*Face used by \\[list-matching-lines] to show the text that matches. If the value is nil, don't highlight the matching portions specially." :type 'face From f30c45e10511ae3818725fe621ab526e70037787 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 07:16:44 +0000 Subject: [PATCH 025/104] (grep-match-face): New defvar. (grep-mode-font-lock-keywords): Use grep-match-face instead of compilation-column-face to highlight grep matches. --- lisp/progmodes/grep.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index fd4b716ae4b..04fcae78ea6 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -275,6 +275,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (defvar grep-error-face compilation-error-face "Face name to use for grep error messages.") +(defvar grep-match-face 'match + "Face name to use for grep matches.") + (defvar grep-mode-font-lock-keywords '(;; Command output lines. ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face) @@ -291,7 +294,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (2 compilation-line-face)) ;; Highlight grep matches and delete markers ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" - (2 compilation-column-face) + (2 grep-match-face) ((lambda (p)) (progn ;; Delete markers with `replace-match' because it updates From 5248b3e332d7ee1fdc9fbffe485d444d3014b1d9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 07:16:58 +0000 Subject: [PATCH 026/104] (apropos-match-face): Change default from `secondary-selection' to `match'. --- lisp/apropos.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/apropos.el b/lisp/apropos.el index 8bfaa3ad592..7b37a49d087 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -96,7 +96,7 @@ turns off mouse highlighting." :group 'apropos :type 'face) -(defcustom apropos-match-face 'secondary-selection +(defcustom apropos-match-face 'match "*Face for matching text in Apropos documentation/value, or nil for none. This applies when you look for matches in the documentation or variable value for the regexp; the part that matches gets displayed in this font." From 8270a848c898e19a5f46eb2ea79b71645562e0cd Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 07:19:20 +0000 Subject: [PATCH 027/104] (info-lookup-highlight-face): Change default from `highlight' to `match'. --- lisp/ChangeLog | 15 +++++++++++++++ lisp/info-look.el | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a086e276835..f86107456e3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2004-12-15 Juri Linkov + + * replace.el (match): New face. + (list-matching-lines-face): Change default from `bold' to `match'. + + * progmodes/grep.el (grep-match-face): New defvar. + (grep-mode-font-lock-keywords): Use grep-match-face instead of + compilation-column-face to highlight grep matches. + + * apropos.el (apropos-match-face): Change default from + `secondary-selection' to `match'. + + * info-look.el (info-lookup-highlight-face): Change default from + `highlight' to `match'. + 2004-12-15 Daniel Pfeiffer * progmodes/executable.el (executable-interpret): Eliminate diff --git a/lisp/info-look.el b/lisp/info-look.el index 388415ec8c1..bc886f0320c 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -47,7 +47,7 @@ Automatically becomes buffer local when set in any fashion.") "Non-nil means pop up the Info buffer in another window." :group 'info-lookup :type 'boolean) -(defcustom info-lookup-highlight-face 'highlight +(defcustom info-lookup-highlight-face 'match "Face for highlighting looked up help items. Setting this variable to nil disables highlighting." :group 'info-lookup :type 'face) From 918f2e56d9ab0bf94ea260aec9d224a20c80c44f Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 13:05:37 +0000 Subject: [PATCH 028/104] * help.el (function-called-at-point): As a last resort try striping non-word prefixes and suffixes. --- lisp/help.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/help.el b/lisp/help.el index 5ec9b1f5299..992a9b85f4b 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -267,8 +267,13 @@ If that doesn't give a function, return nil." (and (symbolp obj) (fboundp obj) obj)))) (error nil)))) (let* ((str (find-tag-default)) - (obj (if str (intern str)))) - (and (symbolp obj) (fboundp obj) obj)))) + (sym (if str (intern-soft str)))) + (if (and sym (fboundp sym)) + sym + (save-match-data + (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) + (setq sym (intern-soft (match-string 1 str))) + (and (fboundp sym) sym))))))) ;;; `User' help functions From f507d6a15348caaba4eac96182f6ca74a089659b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 13:06:05 +0000 Subject: [PATCH 029/104] * help-fns.el (variable-at-point): As a last resort try striping non-word prefixes and suffixes. --- lisp/help-fns.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c06a7b1ee73..125b18614a2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -478,8 +478,13 @@ Return 0 if there is no such symbol." (and (symbolp obj) (boundp obj) obj)))) (error nil)) (let* ((str (find-tag-default)) - (obj (if str (intern str)))) - (and (symbolp obj) (boundp obj) obj)) + (sym (if str (intern-soft str)))) + (if (and sym (boundp sym)) + sym + (save-match-data + (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) + (setq sym (intern-soft (match-string 1 str))) + (and (boundp sym) sym))))) 0)) ;;;###autoload From 8b18fb8fff58f0063ae8500a62eafb09434676c3 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 13:09:48 +0000 Subject: [PATCH 030/104] (describe-property-list): Don't treat syntax-table specially. Use describe-text-sexp which inserts [show] button for large objects and handles printing errors. Sort properties by names in alphabetical order instead of by value sizes. Add `mouse-face' to list of properties for `describe-face' widget. (describe-char): Mask out face-id from 19 bits of character. Print face-id separately. --- lisp/descr-text.el | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 49b9b12154a..726d3e6e5d8 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -104,24 +104,11 @@ The `category', `face' and `font-lock-face' properties are made into widget buttons that call `describe-text-category' or `describe-face' when pushed." ;; Sort the properties by the size of their value. - (dolist (elt (sort (let ((ret nil) - (key nil) - (val nil) - (len nil)) + (dolist (elt (sort (let (ret) (while properties - (setq key (pop properties) - val (pop properties) - len 0) - (unless (or (memq key '(category face font-lock-face - syntax-table)) - (widgetp val)) - (setq val (pp-to-string val) - len (length val))) - (push (list key val len) ret)) + (push (list (pop properties) (pop properties)) ret)) ret) - (lambda (a b) - (< (nth 2 a) - (nth 2 b))))) + (lambda (a b) (string< (nth 0 a) (nth 0 b))))) (let ((key (nth 0 elt)) (value (nth 1 elt))) (widget-insert (propertize (format " %-20s " key) @@ -131,23 +118,15 @@ into widget buttons that call `describe-text-category' or :notify `(lambda (&rest ignore) (describe-text-category ',value)) (format "%S" value))) - ((memq key '(face font-lock-face)) + ((memq key '(face font-lock-face mouse-face)) (widget-create 'link :notify `(lambda (&rest ignore) (describe-face ',value)) (format "%S" value))) - ((eq key 'syntax-table) - (widget-create 'push-button - :tag "show" - :action (lambda (widget &optional event) - (with-output-to-temp-buffer - "*Pp Eval Output*" - (pp (widget-get widget :value)))) - value)) ((widgetp value) (describe-text-widget value)) (t - (widget-insert value)))) + (describe-text-sexp value)))) (widget-insert "\n"))) ;;; Describe-Text Commands. @@ -552,10 +531,17 @@ as well as widgets, buttons, overlays, and text properties." (dotimes (i (length disp-vector)) (setq char (aref disp-vector i)) (aset disp-vector i - (cons char (describe-char-display pos char)))) + (cons char (describe-char-display + pos (logand char #x7ffff))))) (format "by display table entry [%s] (see below)" - (mapconcat #'(lambda (x) (format "?%c" (car x))) - disp-vector " "))) + (mapconcat + #'(lambda (x) + (if (> (car x) #x7ffff) + (format "?%c" + (logand (car x) #x7ffff) + (lsh (car x) -19)) + (format "?%c" (car x)))) + disp-vector " "))) (composition (let ((from (car composition)) (to (nth 1 composition)) @@ -627,7 +613,7 @@ as well as widgets, buttons, overlays, and text properties." (progn (insert "these fonts (glyph codes):\n") (dotimes (i (length disp-vector)) - (insert (car (aref disp-vector i)) ?: + (insert (logand (car (aref disp-vector i)) #x7ffff) ?: (propertize " " 'display '(space :align-to 5)) (if (cdr (aref disp-vector i)) (format "%s (0x%02X)" (cadr (aref disp-vector i)) From f1f007dc5b598aae3dec020a26afb94c2b2d3fd2 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 13:17:32 +0000 Subject: [PATCH 031/104] (occur-accumulate-lines, occur-engine): Fontify unfontified matching lines in the source buffer before copying them. (occur-engine): Don't put mouse-face on context lines. (occur-next-error): Set point to line beginning/end before searching for prev/next property to skip multiple matches on a line (not supported by occur engine). Remove redundant prefix-numeric-value. --- lisp/ChangeLog | 23 +++++++++++++++++ lisp/replace.el | 66 +++++++++++++++++++++++++++---------------------- 2 files changed, 59 insertions(+), 30 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f86107456e3..5108650871d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2004-12-16 Juri Linkov + + * help.el (function-called-at-point): + * help-fns.el (variable-at-point): As a last resort try striping + non-word prefixes and suffixes. + + * descr-text.el (describe-property-list): Don't treat syntax-table + specially. Use describe-text-sexp which inserts [show] button + for large objects and handles printing errors. Sort properties + by names in alphabetical order instead of by value sizes. + Add `mouse-face' to list of properties for `describe-face' widget. + (describe-char): Mask out face-id from 19 bits of character. + Print face-id separately. + + * replace.el (occur-accumulate-lines, occur-engine): + Fontify unfontified matching lines in the source buffer + before copying them. + (occur-engine): Don't put mouse-face on context lines. + (occur-next-error): Set point to line beginning/end + before searching for prev/next property to skip multiple + matches on a line (not supported by occur engine). + Remove redundant prefix-numeric-value. + 2004-12-15 Juri Linkov * replace.el (match): New face. diff --git a/lisp/replace.el b/lisp/replace.el index 872e5e290a8..8f81a53bf7e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -735,16 +735,17 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. Compatibility function for \\[next-error] invocations." (interactive "p") ;; we need to run occur-find-match from within the Occur buffer - (with-current-buffer + (with-current-buffer (if (next-error-buffer-p (current-buffer)) (current-buffer) (next-error-find-buffer nil nil (lambda() (eq major-mode 'occur-mode)))) - - (when reset - (goto-char (point-min))) + + (goto-char (cond (reset (point-min)) + ((< argp 0) (line-beginning-position)) + ((line-end-position)))) (occur-find-match - (abs (prefix-numeric-value argp)) - (if (> 0 (prefix-numeric-value argp)) + (abs argp) + (if (> 0 argp) #'previous-single-property-change #'next-single-property-change) "No more matches") @@ -790,18 +791,22 @@ If the value is nil, don't highlight the buffer names specially." (defun occur-accumulate-lines (count &optional keep-props) (save-excursion (let ((forwardp (> count 0)) - (result nil)) + result beg end) (while (not (or (zerop count) (if forwardp (eobp) (bobp)))) (setq count (+ count (if forwardp -1 1))) + (setq beg (line-beginning-position) + end (line-end-position)) + (if (and keep-props font-lock-mode + (text-property-not-all beg end 'fontified t)) + (font-lock-fontify-region beg end)) (push (funcall (if keep-props #'buffer-substring #'buffer-substring-no-properties) - (line-beginning-position) - (line-end-position)) + beg end) result) (forward-line (if forwardp 1 -1))) (nreverse result)))) @@ -996,14 +1001,17 @@ See also `multi-occur'." (when (setq endpt (re-search-forward regexp nil t)) (setq matches (1+ matches)) ;; increment match count (setq matchbeg (match-beginning 0)) - (setq begpt (save-excursion - (goto-char matchbeg) - (line-beginning-position))) (setq lines (+ lines (1- (count-lines origpt endpt)))) + (save-excursion + (goto-char matchbeg) + (setq begpt (line-beginning-position) + endpt (line-end-position))) (setq marker (make-marker)) (set-marker marker matchbeg) - (setq curstring (buffer-substring begpt - (line-end-position))) + (if (and keep-props font-lock-mode + (text-property-not-all begpt endpt 'fontified t)) + (font-lock-fontify-region begpt endpt)) + (setq curstring (buffer-substring begpt endpt)) ;; Depropertize the string, and maybe ;; highlight the matches (let ((len (length curstring)) @@ -1012,17 +1020,15 @@ See also `multi-occur'." (set-text-properties 0 len nil curstring)) (while (and (< start len) (string-match regexp curstring start)) - (add-text-properties (match-beginning 0) - (match-end 0) - (append - `(occur-match t) - (when match-face - ;; Use `face' rather than - ;; `font-lock-face' here - ;; so as to override faces - ;; copied from the buffer. - `(face ,match-face))) - curstring) + (add-text-properties + (match-beginning 0) (match-end 0) + (append + `(occur-match t) + (when match-face + ;; Use `face' rather than `font-lock-face' here + ;; so as to override faces copied from the buffer. + `(face ,match-face))) + curstring) (setq start (match-end 0)))) ;; Generate the string to insert for this match (let* ((out-line @@ -1033,7 +1039,10 @@ See also `multi-occur'." (when prefix-face `(font-lock-face prefix-face)) '(occur-prefix t))) - curstring + ;; We don't put `mouse-face' on the newline, + ;; because that loses. And don't put it + ;; on context lines to reduce flicker. + (propertize curstring 'mouse-face 'highlight) "\n")) (data (if (= nlines 0) @@ -1057,10 +1066,7 @@ See also `multi-occur'." (insert "-------\n")) (add-text-properties beg end - `(occur-target ,marker help-echo "mouse-2: go to this occurrence")) - ;; We don't put `mouse-face' on the newline, - ;; because that loses. - (add-text-properties beg (1- end) '(mouse-face highlight))))) + `(occur-target ,marker help-echo "mouse-2: go to this occurrence"))))) (goto-char endpt)) (if endpt (progn From 32c544b576558829aa80e90063ccf522d5837bd9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 16 Dec 2004 15:26:39 +0000 Subject: [PATCH 032/104] *** empty log message *** --- admin/FOR-RELEASE | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index ca0e16bdec9..e00c40b0871 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -57,7 +57,7 @@ Trying 192.87.102.36... Connected to ftp.nluug.nl. Ange-ftp chokes on the `No route to host' message and doesn't look any -further. +further. I think in the near future we will see more of this problem, so it might be time to make anfe-ftp more intelligent. @@ -112,6 +112,28 @@ we come to mark the http buffers as dead. * REDISPLAY RELATED BUGS +** Strange text scrolling with Emacs + GTK + +> I could reproduce the problem with the latest CVS. +> +> % emacs -Q +> M-x info RET +> M-> +> C-l +> C-x ( C-u - 1 C-v C-x ) +> C-x e e e e ... +> +> I see the problem around "CC mode" and "Forms". + +It is not specific for the first line of a buffer. + +Rather it happens for lines which are indented but the +indentation is controlled by a display property and +the newline is part of that display property -- in +that case, the indentation is not recognized for the +first display line. + + ** Avoid unbreakable loops in redisplay. Redisplay may loop if there is an error in some display property, e.g. From 8b000fc3b126bf3417b7daa109c08aa8e7bcd3b4 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 16 Dec 2004 17:11:15 +0000 Subject: [PATCH 033/104] (zone): Fix omission bug: Use a self-disabling one-shot thunk for uniform (error, quit, normal) recovery. (zone-pgm-random-life): Fix bug: Recognize empty initial field by lack of "@" chars. --- lisp/ChangeLog | 8 ++++++++ lisp/play/zone.el | 22 ++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5108650871d..1d9cc171e92 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-12-16 Thien-Thi Nguyen + + * play/zone.el (zone): Fix omission bug: Use a self-disabling + one-shot thunk for uniform (error, quit, normal) recovery. + Reported by John Paul Wallington. + (zone-pgm-random-life): Fix bug: + Recognize empty initial field by lack of "@" chars. + 2004-12-16 Juri Linkov * help.el (function-called-at-point): diff --git a/lisp/play/zone.el b/lisp/play/zone.el index b47a287701d..9338834d6da 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -152,8 +152,15 @@ If the element is a function or a list of a function and a number, (set-window-point (selected-window) wp) (sit-for 0 500) (let ((pgm (elt zone-programs (random (length zone-programs)))) - (ct (and f (frame-parameter f 'cursor-type)))) - (when ct (modify-frame-parameters f '((cursor-type . (bar . 0))))) + (ct (and f (frame-parameter f 'cursor-type))) + (restore (list '(kill-buffer outbuf)))) + (when ct + (modify-frame-parameters f '((cursor-type . (bar . 0)))) + (setq restore (cons '(modify-frame-parameters + f (list (cons 'cursor-type ct))) + restore))) + ;; Make `restore' a self-disabling one-shot thunk. + (setq restore `(lambda () ,@restore (setq restore nil))) (condition-case nil (progn (message "Zoning... (%s)" pgm) @@ -167,14 +174,17 @@ If the element is a function or a list of a function and a number, (zone-call pgm) (message "Zoning...sorry")) (error + (funcall restore) (while (not (input-pending-p)) (message (format "We were zoning when we wrote %s..." pgm)) (sit-for 3) (message "...here's hoping we didn't hose your buffer!") (sit-for 3))) - (quit (ding) (message "Zoning...sorry"))) - (when ct (modify-frame-parameters f (list (cons 'cursor-type ct))))) - (kill-buffer outbuf))) + (quit + (funcall restore) + (ding) + (message "Zoning...sorry"))) + (when restore (funcall restore))))) ;;;; Zone when idle, or not. @@ -659,7 +669,7 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") (end-of-line 0) (forward-char -10)) (let ((life-patterns (vector - (if (and col (re-search-forward "[^ ]" max t)) + (if (and col (search-forward "@" max t)) (cons (make-string (length (car col)) 32) col) (list (mapconcat 'identity (make-list (/ (- rtc 11) 15) From 3cc2b29c6ae596534ffae6d9c9ad4f67dd52fb1d Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 16 Dec 2004 17:13:22 +0000 Subject: [PATCH 034/104] Commentary munging; nfc. --- lisp/play/zone.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 9338834d6da..6aa746c040c 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -33,10 +33,11 @@ ;; `zone-programs'. See `zone-call' for higher-ordered zoning. ;; WARNING: Not appropriate for Emacs sessions over modems or -;; computers as slow as mine. +;; computers as slow as mine. -;; THANKS: Christopher Mayer, Scott Flinchbaugh, Rachel Kalmar, -;; Max Froumentin, Juri Linkov, Luigi Panzeri. +;; THANKS: Christopher Mayer, Scott Flinchbaugh, +;; Rachel Kalmar, Max Froumentin, Juri Linkov, +;; Luigi Panzeri, John Paul Wallington. ;;; Code: From 2d3da38b67b30129be20c34eac4514cf3c5109ef Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 16 Dec 2004 22:56:08 +0000 Subject: [PATCH 035/104] (math-random-digit): Call math-init-random-base if var-RandSeed is nil. --- lisp/calc/calc-comb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 24e3e5f182e..262db6c9bda 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -601,7 +601,7 @@ ;;; Shuffling algorithm from Numerical Recipes, section 7.1. (defun math-random-digit () (let (i math-random-last) - (or (eq var-RandSeed math-last-RandSeed) + (or (and var-RandSeed (eq var-RandSeed math-last-RandSeed)) (math-init-random-base)) (or math-random-cache (progn From a17e377e86e6799637bbd2fb108c8bb942ff396f Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 03:14:07 +0000 Subject: [PATCH 036/104] Delete trailing whitespace. --- man/url.texi | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/man/url.texi b/man/url.texi index 5f36826d926..a42cad58efa 100644 --- a/man/url.texi +++ b/man/url.texi @@ -27,7 +27,7 @@ Copyright (C) 1993, 1994, 1995, 1996 William M. Perry Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being +Invariant Sections being ``GNU GENERAL PUBLIC LICENSE''. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' @@ -74,9 +74,9 @@ License.'' * General Facilities:: URLs can be cached, accessed via a gateway and tracked in a history list. * Customization:: Variables you can alter. -* Function Index:: -* Variable Index:: -* Concept Index:: +* Function Index:: +* Variable Index:: +* Concept Index:: @end menu @node Getting Started @@ -115,7 +115,7 @@ The meaning of the @var{path} component depends on the service. @menu -* Configuration:: +* Configuration:: * Parsed URLs:: URLs are parsed into vector structures. @end menu @@ -222,7 +222,7 @@ load into, or @var{nil} if the process has already completed. @menu * http/https:: Hypertext Transfer Protocol. -* file/ftp:: Local files and FTP archives. +* file/ftp:: Local files and FTP archives. * info:: Emacs `Info' pages. * mailto:: Sending email. * news/nntp/snews:: Usenet news. @@ -235,7 +235,7 @@ load into, or @var{nil} if the process has already completed. @c * netrek:: @c * prospero:: * cid:: Content-ID. -* about:: +* about:: * ldap:: Lightweight Directory Access Protocol * imap:: IMAP mailboxes. * man:: Unix man pages. @@ -273,10 +273,10 @@ otherwise the user will be asked on each request. @menu -* Cookies:: -* HTTP language/coding:: -* HTTP URL Options:: -* Dealing with HTTP documents:: +* Cookies:: +* HTTP language/coding:: +* HTTP URL Options:: +* Dealing with HTTP documents:: @end menu @node Cookies @@ -451,7 +451,7 @@ Info URLs are not officially defined. They invoke @cindex email A mailto URL will send an email message to the address in the URL, for example @samp{mailto:foo@@bar.com} would compose a -message to @samp{foo@@bar.com}. +message to @samp{foo@@bar.com}. @defopt url-mail-command @vindex mail-user-agent @@ -493,11 +493,11 @@ fields may be included in news URLs though they are properly only allowed for nntp an snews. @table @samp -@item news:@var{newsgroup} +@item news:@var{newsgroup} Retrieves a list of messages in @var{newsgroup}; @item news:@var{message-id} Retrieves the message with the given @var{message-id}; -@item news:* +@item news:* Retrieves a list of all available newsgroups; @item nntp://@var{host}:@var{port}/@var{newsgroup} @itemx nntp://@var{host}:@var{port}/@var{message-id} @@ -550,9 +550,9 @@ Well-known ports are used if the URL does not specify a port. @cindex IRC @cindex Internet Relay Chat @cindex ZEN IRC -@c Fixme: reference (was http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt) +@c Fixme: reference (was http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt) @dfn{Internet Relay Chat} (IRC) is handled by handing off the @sc{irc} -session to a function named in @code{url-irc-function}. +session to a function named in @code{url-irc-function}. @defopt url-irc-function A function to actually open an IRC connection. @@ -582,7 +582,7 @@ including parameters. It defaults to @samp{text/plain;charset=US-ASCII}. The @samp{text/plain} can be omitted but the charset parameter supplied. If @samp{;base64} is present, the @var{data} are base64-encoded. - + @node nfs @section nfs @cindex NFS @@ -658,11 +658,11 @@ the Lisp @code{man} function. @chapter Defining New URLs @menu -* Naming conventions:: -* Required functions:: -* Optional functions:: -* Asynchronous fetching:: -* Supporting file-name-handlers:: +* Naming conventions:: +* Required functions:: +* Optional functions:: +* Asynchronous fetching:: +* Supporting file-name-handlers:: @end menu @node Naming conventions @@ -684,10 +684,10 @@ the Lisp @code{man} function. @chapter General Facilities @menu -* Disk Caching:: -* Proxies:: -* Gateways in general:: -* History:: +* Disk Caching:: +* Proxies:: +* Gateways in general:: +* History:: @end menu @node Disk Caching @@ -761,7 +761,7 @@ more likely to conflict with other files. @end smallexample @end defun -@c Fixme: never actually used currently? +@c Fixme: never actually used currently? @c @defopt url-standalone-mode @c @cindex Relying on cache @c @cindex Cache only mode @@ -783,7 +783,7 @@ more likely to conflict with other files. @node Proxies @section Proxies and Gatewaying -@c fixme: check/document url-ns stuff +@c fixme: check/document url-ns stuff @cindex proxy servers @cindex proxies @cindex environment variables @@ -815,7 +815,7 @@ NO_PROXY="*.aventail.com,home.com,.seanet.com" @noindent says to contact all machines in the @samp{aventail.com} and @samp{seanet.com} domains directly, as well as the machine named @samp{home.com}. If @code{NO_PROXY} isn't defined, @code{no_PROXY} -and @code{no_proxy} are also tried, in that order. +and @code{no_proxy} are also tried, in that order. Proxies may also be specified directly in Lisp. @@ -980,9 +980,9 @@ This the @samp{nslookup} program. It is @code{"nslookup"} by default. @end defopt @menu -* Suppressing network connexions:: +* Suppressing network connexions:: @end menu -@c * Broken hostname resolution:: +@c * Broken hostname resolution:: @node Suppressing network connexions @subsection Suppressing Network Connexions @@ -1144,7 +1144,7 @@ function taking a single argument (the prompt) and returning @code{t} only if an affirmative answer is given. @end defopt @defopt url-gateway-method -@c fixme: describe gatewaying +@c fixme: describe gatewaying A symbol specifying the type of gateway support to use fro connexions from the local machine. The supported methods are: From df2f79eeb7b59fdebaa06355345090bd651c9377 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 03:22:06 +0000 Subject: [PATCH 037/104] Correct typos. --- man/url.texi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/man/url.texi b/man/url.texi index a42cad58efa..c1422bfc253 100644 --- a/man/url.texi +++ b/man/url.texi @@ -414,8 +414,8 @@ file://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file} @end example These schemes are defined in RFC 1808. -@samp{ftp:} and @samp{file:} are synonomous in this library. They -allow reading arbitary files from hosts. Either @samp{ange-ftp} +@samp{ftp:} and @samp{file:} are synonymous in this library. They +allow reading arbitrary files from hosts. Either @samp{ange-ftp} (Emacs) or @samp{efs} (XEmacs) is used to retrieve them from remote hosts. Local files are accessed directly. @@ -468,7 +468,7 @@ The form of a mailto URL is @example @samp{mailto:@var{mailbox}[?@var{header}=@var{contents}[&@var{header}=@var{contents}]]} @end example -@noindent where an arbitary number of @var{header}s can be added. If the +@noindent where an arbitrary number of @var{header}s can be added. If the @var{header} is @samp{body}, then @var{contents} is put in the body otherwise a @var{header} header field is created with @var{contents} as its contents. Note that the URL library does not consider any @@ -510,7 +510,7 @@ Similar to the @samp{news} versions. @samp{snews} is the same as @samp{nntp} except that the default port is :563. @cindex SSL -(It is tunnelled through SSL.) +(It is tunneled through SSL.) An @samp{nntp} URL is the same as a news URL, except that the URL may specify an article by its number. @@ -940,7 +940,7 @@ This specifies the default server, it takes the form where @var{version} can be either 4 or 5. @end defopt @defvar socks-password -If this is @code{nil} then you will be asked for the passward, +If this is @code{nil} then you will be asked for the password, otherwise it will be used as the password for authenticating you to the @sc{socks} server. @end defvar @@ -1010,7 +1010,7 @@ opened by the URL library. @c @cindex resolver, hostname @c Some C libraries do not include the hostname resolver routines in @c their static libraries. If Emacs was linked statically, and was not -@c linked with the resolver libraries, it wil not be able to get to any +@c linked with the resolver libraries, it will not be able to get to any @c machines off the local network. This is characterized by being able @c to reach someplace with a raw ip number, but not its hostname @c (@url{http://129.79.254.191/} works, but @@ -1052,8 +1052,8 @@ The history `list' is actually a hash table, strings. The times are in the format returned by @code{current-time}. @defun url-history-update-url url time -This function updates the hsitory table with an entry for @var{url} -accessed at the gievn @var{time}. +This function updates the history table with an entry for @var{url} +accessed at the given @var{time}. @end defun @defopt url-history-track From ac091f3d12402ecd9670068ebeb095b10015a921 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 03:36:29 +0000 Subject: [PATCH 038/104] (Retrieving URLs, Retrieving URLs): @var{nil}->@code{nil}. --- man/url.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/url.texi b/man/url.texi index c1422bfc253..f2cc88bfca3 100644 --- a/man/url.texi +++ b/man/url.texi @@ -204,7 +204,7 @@ Recreates a URL string from the parsed @var{url}. @defun url-retrieve-synchronously url Retrieve @var{url} synchronously and return a buffer containing the data. @var{url} is either a string or a parsed URL structure. Return -@var{nil} if there are no data associated with it (the case for dired, +@code{nil} if there are no data associated with it (the case for dired, info, or mailto URLs that need no further processing). @end defun @@ -214,7 +214,7 @@ Retrieve @var{url} asynchronously and call @var{callback} with args has been completely retrieved, with the current buffer containing the object and any MIME headers associated with it. @var{url} is either a string or a parsed URL structure. Returns the buffer @var{url} will -load into, or @var{nil} if the process has already completed. +load into, or @code{nil} if the process has already completed. @end defun @node Supported URL Types From 15594861662cfaa51fc6049038b9d4512abe606b Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 04:38:26 +0000 Subject: [PATCH 039/104] (HTTP language/coding, mailto): Replace "GNU Emacs manual" with the standard "The GNU Emacs manual" in fifth argument of @xref's. (Dealing with HTTP documents): @inforef->@xref. --- man/url.texi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/man/url.texi b/man/url.texi index f2cc88bfca3..f5c15e2dff5 100644 --- a/man/url.texi +++ b/man/url.texi @@ -330,7 +330,7 @@ preferred character set encodings, e.g.@: Latin-9 or Big5, and these can be weighted. In Emacs 21 this list is generated automatically from the list of defined coding systems which have associated MIME types. These are sorted by coding priority. @xref{Recognize Coding, -, Recognizing Coding Systems, emacs, GNU Emacs Manual}. +, Recognizing Coding Systems, emacs, The GNU Emacs Manual}. @end defopt @defopt url-mime-language-string @@ -384,9 +384,9 @@ Currently this is just the raw header contents. HTTP URLs are retrieved into a buffer containing the HTTP headers followed by the body. Since the headers are quasi-MIME, they may be -processed using the MIME library. @inforef{Top, The MIME library, -emacs-mime}. The URL package provides a function to do this in -general: +processed using the MIME library. @xref{Top,, Emacs MIME, +emacs-mime, The Emacs MIME Manual}. The URL package provides a +function to do this in general: @defun url-decode-text-part handle &optional coding This function decodes charset-encoded text in the current buffer. In @@ -457,7 +457,7 @@ message to @samp{foo@@bar.com}. @vindex mail-user-agent The function called whenever url needs to send mail. This should normally be left to default from @var{mail-user-agent}. @xref{Mail -Methods, , Mail-Composition Methods, emacs, GNU Emacs Manual}. +Methods, , Mail-Composition Methods, emacs, The GNU Emacs Manual}. @end defopt An @samp{X-Url-From} header field containing the URL of the document From 2484a0a2cad8aee9fca92cae10e0ab45ae564b31 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 04:49:11 +0000 Subject: [PATCH 040/104] *** empty log message *** --- man/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index d4e6e7fbd20..65b4259e64c 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,11 @@ +2004-12-16 Luc Teirlinck + + * url.texi: Correct typos. + (Retrieving URLs, Retrieving URLs): @var{nil}->@code{nil}. + (HTTP language/coding, mailto): Replace "GNU Emacs Manual" with + the standard "The GNU Emacs Manual" in fifth argument of @xref's. + (Dealing with HTTP documents): @inforef->@xref. + 2004-12-15 Juri Linkov * mark.texi (Transient Mark, Mark Ring): M-< and other From d1178128f874238abdff1fc4e4942f9d2faf357f Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 05:02:20 +0000 Subject: [PATCH 041/104] *** empty log message *** --- man/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ChangeLog b/man/ChangeLog index 65b4259e64c..abca281559a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,7 +1,7 @@ 2004-12-16 Luc Teirlinck * url.texi: Correct typos. - (Retrieving URLs, Retrieving URLs): @var{nil}->@code{nil}. + (Retrieving URLs): @var{nil}->@code{nil}. (HTTP language/coding, mailto): Replace "GNU Emacs Manual" with the standard "The GNU Emacs Manual" in fifth argument of @xref's. (Dealing with HTTP documents): @inforef->@xref. From a59a16878f6b78c4966d621cd792a16a0dbfe758 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 17 Dec 2004 05:26:18 +0000 Subject: [PATCH 042/104] (math-random-last): Declare it. (math-random-digit): Undo last change. Don't make math-random-last local. (var-RandSeed): Don't initially bind it. (math-init-random-base, math-random-digit): Check to see if var-RandSeed is bound. --- lisp/calc/calc-comb.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 262db6c9bda..adb8fcecce6 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -540,12 +540,12 @@ ;;; Produce a random 10-bit integer, with (random) if no seed provided, ;;; or else with Numerical Recipes algorithm ran3 / Knuth 3.2.2-A. -(defvar var-RandSeed nil) +(defvar var-RandSeed) (defvar math-random-cache nil) (defvar math-gaussian-cache nil) (defun math-init-random-base () - (if var-RandSeed + (if (and (boundp 'var-RandSeed) var-RandSeed) (if (eq (car-safe var-RandSeed) 'vec) nil (if (Math-integerp var-RandSeed) @@ -599,9 +599,10 @@ ;;; Produce a random digit in the range 0..999. ;;; Avoid various pitfalls that may lurk in the built-in (random) function! ;;; Shuffling algorithm from Numerical Recipes, section 7.1. +(defvar math-random-last) (defun math-random-digit () - (let (i math-random-last) - (or (and var-RandSeed (eq var-RandSeed math-last-RandSeed)) + (let (i) + (or (and (boundp 'var-RandSeed) (eq var-RandSeed math-last-RandSeed)) (math-init-random-base)) (or math-random-cache (progn From 0e0803f7585a67aba05c7acf76b80096f9197189 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 17 Dec 2004 05:38:12 +0000 Subject: [PATCH 043/104] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d9cc171e92..ea9f263fae3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-12-16 Jay Belanger + + * calc/calc-comb.el (var-RandSeed): Don't initially bind it. + (math-init-random-base, math-random-digit): Check to see if + var-RandSeed is bound. + (math-random-last): Declare it. + (math-random-digit): Don't make math-random-last local. + 2004-12-16 Thien-Thi Nguyen * play/zone.el (zone): Fix omission bug: Use a self-disabling From 54ebae283f2dfdc5995161245dde09f2166e3bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Fri, 17 Dec 2004 10:48:53 +0000 Subject: [PATCH 044/104] (vc-default-update-changelog): Use insert-file-contents, rather than insert-file. --- lisp/vc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc.el b/lisp/vc.el index 63e9be651d9..64de0351922 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -2836,7 +2836,7 @@ Uses `rcs2log' which only works for RCS and CVS." (pop-to-buffer (set-buffer (get-buffer-create "*vc*"))) (erase-buffer) - (insert-file tempfile) + (insert-file-contents tempfile) "failed")) (setq default-directory (file-name-directory changelog)) (delete-file tempfile))))) From a296137853e34c0d27e3a8720f0d57783ef353ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Fri, 17 Dec 2004 10:53:03 +0000 Subject: [PATCH 045/104] # --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea9f263fae3..03651cf32c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-17 Andre Spiegel + + * vc.el (vc-default-update-changelog): Use insert-file-contents, + rather than insert-file. + 2004-12-16 Jay Belanger * calc/calc-comb.el (var-RandSeed): Don't initially bind it. From e3fa1c11789420e6a72b7d34c85867ae91317b56 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 17 Dec 2004 11:48:56 +0000 Subject: [PATCH 046/104] (zone): Init `line-spacing' from orig buffer. (zone-replace-char): Take `count' and `del-count' instead of `direction'. Update callers. When `del-count' is non-nil, delete that many characters, otherwise `count' characters backwards. Insert the newly-replaced string `count' times. (zone-fret): Handle chars w/ width greater than one. (zone-fall-through-ws): No longer take window width `ww'. Update callers. Add handling for `char-width' greater than one. (zone-pgm-drip): Update var holding window-end position every cycle. --- lisp/ChangeLog | 12 +++++++++++ lisp/play/zone.el | 51 ++++++++++++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 03651cf32c2..7e19ddff5d7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2004-12-17 Thien-Thi Nguyen + + * play/zone.el (zone): Init `line-spacing' from orig buffer. + (zone-replace-char): Take `count' and `del-count' + instead of `direction'. Update callers. When `del-count' is + non-nil, delete that many characters, otherwise `count' characters + backwards. Insert the newly-replaced string `count' times. + (zone-fret): Handle chars w/ width greater than one. + (zone-fall-through-ws): No longer take window width `ww'. + Update callers. Add handling for `char-width' greater than one. + (zone-pgm-drip): Update var holding window-end position every cycle. + 2004-12-17 Andre Spiegel * vc.el (vc-default-update-changelog): Use insert-file-contents, diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 6aa746c040c..9fc4ad6bf89 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -146,7 +146,8 @@ If the element is a function or a list of a function and a number, (erase-buffer) (setq buffer-undo-list t truncate-lines t - tab-width (zone-orig tab-width)) + tab-width (zone-orig tab-width) + line-spacing (zone-orig line-spacing)) (insert text) (untabify (point-min) (point-max)) (set-window-start (selected-window) (point-min)) @@ -446,10 +447,10 @@ If the element is a function or a list of a function and a number, (defsubst zone-cpos (pos) (buffer-substring pos (1+ pos))) -(defsubst zone-replace-char (direction char-as-string new-value) - (delete-char direction) +(defsubst zone-replace-char (count del-count char-as-string new-value) + (delete-char (or del-count (- count))) (aset char-as-string 0 new-value) - (insert char-as-string)) + (dotimes (i count) (insert char-as-string))) (defsubst zone-park/sit-for (pos seconds) (let ((p (point))) @@ -460,10 +461,11 @@ If the element is a function or a list of a function and a number, (defun zone-fret (wbeg pos) (let* ((case-fold-search nil) (c-string (zone-cpos pos)) + (cw-ceil (ceiling (char-width (aref c-string 0)))) (hmm (cond ((string-match "[a-z]" c-string) (upcase c-string)) ((string-match "[A-Z]" c-string) (downcase c-string)) - (t " ")))) + (t (propertize " " 'display `(space :width ,cw-ceil)))))) (do ((i 0 (1+ i)) (wait 0.5 (* wait 0.8))) ((= i 20)) @@ -496,16 +498,25 @@ If the element is a function or a list of a function and a number, (recenter 0) (sit-for 0))) -(defun zone-fall-through-ws (c ww wbeg wend) - (let ((fall-p nil) ; todo: move outward - (wait 0.15)) - (while (when (= 32 (char-after (+ (point) ww 1))) +(defun zone-fall-through-ws (c wbeg wend) + (let* ((cw-ceil (ceiling (char-width (aref c 0)))) + (spaces (make-string cw-ceil 32)) + (col (current-column)) + (wait 0.15) + newpos fall-p) + (while (when (save-excursion + (next-line 1) + (and (= col (current-column)) + (setq newpos (point)) + (string= spaces (buffer-substring-no-properties + newpos (+ newpos cw-ceil))) + (setq newpos (+ newpos (1- cw-ceil))))) (setq fall-p t) (delete-char 1) - (insert " ") - (forward-char ww) + (insert spaces) + (goto-char newpos) (when (< (point) wend) - (delete-char 1) + (delete-char cw-ceil) (insert c) (forward-char -1) (zone-park/sit-for wbeg (setq wait (* wait 0.8)))))) @@ -523,7 +534,7 @@ If the element is a function or a list of a function and a number, wend (window-end)) (catch 'done (while (not (input-pending-p)) - (setq mc 0) + (setq mc 0 wend (window-end)) ;; select non-ws character, but don't miss too much (goto-char (+ wbeg (random (- wend wbeg)))) (while (looking-at "[ \n\f]") @@ -535,17 +546,16 @@ If the element is a function or a list of a function and a number, (when fret-p (zone-fret wbeg p)) (goto-char p) (setq c (zone-cpos p) - fall-p (zone-fall-through-ws c ww wbeg wend))) + fall-p (zone-fall-through-ws c wbeg wend))) ;; assuming current-column has not changed... (when (and pancake-p fall-p (< (count-lines (point-min) (point)) wh)) - (zone-replace-char 1 c ?@) - (zone-park/sit-for wbeg 0.137) - (zone-replace-char -1 c ?*) - (zone-park/sit-for wbeg 0.137) - (zone-replace-char -1 c ?_)))))) + (let ((cw (ceiling (char-width (aref c 0))))) + (zone-replace-char cw 1 c ?@) (zone-park/sit-for wbeg 0.137) + (zone-replace-char cw nil c ?*) (zone-park/sit-for wbeg 0.137) + (zone-replace-char cw nil c ?_))))))) (defun zone-pgm-drip-fretfully () (zone-pgm-drip t)) @@ -652,7 +662,8 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") (setq s (zone-cpos (point)) c (aref s 0)) (zone-replace-char - 1 s (cond ((or (> top (point)) + (char-width c) + t s (cond ((or (> top (point)) (< bot (point)) (or (> 11 (setq col (current-column))) (< rtc col))) From fc866a94f1814663e41d7ba5c92ffcc7d229cb1f Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 17 Dec 2004 11:58:21 +0000 Subject: [PATCH 047/104] (zone-pgm-random-life): Fix typo. --- lisp/play/zone.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 9fc4ad6bf89..80d0760bed2 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -663,7 +663,7 @@ If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") c (aref s 0)) (zone-replace-char (char-width c) - t s (cond ((or (> top (point)) + 1 s (cond ((or (> top (point)) (< bot (point)) (or (> 11 (setq col (current-column))) (< rtc col))) From 65f765817d67622ee7802f5bad8c7b18782f8937 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:16:18 +0000 Subject: [PATCH 048/104] (mouse-1-click-follows-link): New defcustom. (mouse-on-link-p): New function. (mouse-drag-region-1): Implement mouse-1-click-follows-link functionality. Map a mouse-1 click event into a mouse-2 (or other) event when position is inside a link. --- lisp/mouse.el | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/lisp/mouse.el b/lisp/mouse.el index b2fa71dde24..e525c9921e2 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -49,6 +49,39 @@ :version "21.4" :group 'mouse) +(defcustom mouse-1-click-follows-link 350 + "Non-nil means that clicking mouse-1 on a link follows the link. + +With the default setting, an ordinary mouse-1 click on a link +performs the same action as mouse-2 on that link, while a longer +mouse-1 click \(hold down the mouse-1 button for more than 350 +milliseconds) performs the original mouse-1 binding \(which +typically sets point where you click the mouse). + +If value is an integer, the time elapsed between pressing and +releasing the mouse button determines whether to follow the link +or perform the normal mouse-1 action (typically set point). +The absolute numeric value specifices the maximum duration of a +\"short click\" in milliseconds. A positive value means that a +short click follows the link, and a longer click performs the +normal action. A negative value gives the opposite behaviour. + +If value is `double', a double click follows the link. + +Otherwise, a single mouse-1 click unconditionally follows the link. + +Note that dragging the mouse never follows the link. + +This feature only works in modes that specifically identify +clickable text as links, so it may not work with some external +packages. See `mouse-on-link-p' for details." + :version "21.4" + :type '(choice (const :tag "Disabled" nil) + (const :tag "Double click" double) + (number :tag "Single click time limit" :value 350) + (other :tag "Single click" t)) + :group 'mouse) + ;; Provide a mode-specific menu on a mouse button. @@ -733,6 +766,51 @@ If the click is in the echo area, display the `*Messages*' buffer." (run-hooks 'mouse-leave-buffer-hook) (mouse-drag-region-1 start-event)))) + +(defun mouse-on-link-p (pos) + "Return non-nil if POS is on a link in the current buffer. + +A clickable link is identified by one of the following methods: + +1) If the character at POS has a non-nil `follow-link' text or +overlay property, the value of that property is returned. + +2) If there is a local key-binding or a keybinding at position +POS for the `follow-link' event, the binding of that event +determines whether POS is inside a link: + +- If the binding is `mouse-face', POS is inside a link if there +is a non-nil `mouse-face' property at POS. Return t in this case. + +- If the binding is a function, FUNC, POS is inside a link if +the call \(FUNC POS) returns non-nil. Return the return value +from that call. + +- Otherwise, return the binding of the `follow-link' binding. + +The return value is interpreted as follows: + +- If it is a string, the mouse-1 event is translated into the +first character of the string, i.e. the action of the mouse-1 +click is the local or global binding of that character. + +- If it is a vector, the mouse-1 event is translated into the +first element of that vector, i.e. the action of the mouse-1 +click is the local or global binding of that event. + +- Otherwise, the mouse-1 event is translated into a mouse-2 event +at the same position." + (or (get-char-property pos 'follow-link) + (save-excursion + (goto-char pos) + (let ((b (key-binding [follow-link] nil t))) + (cond + ((eq b 'mouse-face) + (and (get-char-property pos 'mouse-face) t)) + ((functionp b) + (funcall b pos)) + (t b)))))) + (defun mouse-drag-region-1 (start-event) (mouse-minibuffer-check start-event) (let* ((echo-keystrokes 0) @@ -749,6 +827,7 @@ If the click is in the echo area, display the `*Messages*' buffer." (nth 3 bounds) ;; Don't count the mode line. (1- (nth 3 bounds)))) + on-link remap-double-click (click-count (1- (event-click-count start-event)))) (setq mouse-selection-click-count click-count) (setq mouse-selection-click-count-buffer (current-buffer)) @@ -758,6 +837,13 @@ If the click is in the echo area, display the `*Messages*' buffer." (if (< (point) start-point) (goto-char start-point)) (setq start-point (point)) + (setq on-link (and mouse-1-click-follows-link + (mouse-on-link-p start-point))) + (setq remap-double-click (and on-link + (eq mouse-1-click-follows-link 'double) + (= click-count 1))) + (if remap-double-click ;; Don't expand mouse overlay in links + (setq click-count 0)) (let ((range (mouse-start-end start-point start-point click-count))) (move-overlay mouse-drag-overlay (car range) (nth 1 range) (window-buffer start-window)) @@ -880,6 +966,28 @@ If the click is in the echo area, display the `*Messages*' buffer." (or end-point (= (window-start start-window) start-window-start))) + (if (and on-link + (not end-point) + (consp event) + (or remap-double-click + (and + (not (eq mouse-1-click-follows-link 'double)) + (= click-count 0) + (= (event-click-count event) 1) + (not (input-pending-p)) + (or (not (integerp mouse-1-click-follows-link)) + (let ((t0 (posn-timestamp (event-start start-event))) + (t1 (posn-timestamp (event-end event)))) + (and (integerp t0) (integerp t1) + (if (> mouse-1-click-follows-link 0) + (<= (- t1 t0) mouse-1-click-follows-link) + (< (- t0 t1) mouse-1-click-follows-link))))) + (or (not double-click-time) + (sit-for 0 (if (integerp double-click-time) + double-click-time 500) t))))) + (if (or (vectorp on-link) (stringp on-link)) + (setq event (aref on-link 0)) + (setcar event 'mouse-2))) (setq unread-command-events (cons event unread-command-events))))) (delete-overlay mouse-drag-overlay))))) From f2a1c81bb16eb803e757cc77c8a1272028483363 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:16:33 +0000 Subject: [PATCH 049/104] (tooltip-show-help-function): Replace "mouse-2" prefix in tooltip text with "mouse-1" when this is a link recognized by mouse-1-click-follows-link functionality. --- lisp/tooltip.el | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 5bcb28dde52..2e60df02459 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -1,6 +1,7 @@ ;;; tooltip.el --- show tooltip windows -;; Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: Gerd Moellmann ;; Keywords: help c mouse tools @@ -476,7 +477,25 @@ This function must return nil if it doesn't handle EVENT." (defun tooltip-show-help-function (msg) "Function installed as `show-help-function'. MSG is either a help string to display, or nil to cancel the display." - (let ((previous-help tooltip-help-message)) + (let ((previous-help tooltip-help-message) + mp pos) + (if (and mouse-1-click-follows-link + (stringp msg) + (save-match-data + (string-match "^mouse-2" msg)) + (setq mp (mouse-pixel-position)) + (consp (setq pos (cdr mp))) + (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp))) + (windowp (posn-window pos))) + (with-current-buffer (window-buffer (posn-window pos)) + (if (mouse-on-link-p (posn-point pos)) + (setq msg (concat + (cond + ((eq mouse-1-click-follows-link 'double) "double-") + ((and (integerp mouse-1-click-follows-link) + (< mouse-1-click-follows-link 0)) "Long ") + (t "")) + "mouse-1" (substring msg 7)))))) (setq tooltip-help-message msg) (cond ((null msg) ;; Cancel display. This also cancels a delayed tip, if From 72b64ad5bae01aae2bd8c7d012cb392bafaf80a1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:16:46 +0000 Subject: [PATCH 050/104] (describe-key): Report effective and original binding for mouse-1 when clicked on a link. (describe-mode): Add follow-link property to "minor-mode" button. --- lisp/help.el | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/lisp/help.el b/lisp/help.el index 992a9b85f4b..f5831c9ab3f 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -614,17 +614,58 @@ the last key hit are used." (princ "\n which is ") (describe-function-1 defn) (when up-event - (let ((defn (or (string-key-binding up-event) (key-binding up-event)))) + (let ((ev (aref up-event 0)) + (descr (key-description up-event)) + (hdr "\n\n-------------- up event ---------------\n\n") + defn + mouse-1-tricky mouse-1-remapped) + (when (and (consp ev) + (eq (car ev) 'mouse-1) + (windowp window) + mouse-1-click-follows-link + (not (eq mouse-1-click-follows-link 'double)) + (with-current-buffer (window-buffer window) + (mouse-on-link-p (posn-point (event-start ev))))) + (setq mouse-1-tricky (integerp mouse-1-click-follows-link) + mouse-1-remapped (or (not mouse-1-tricky) + (> mouse-1-click-follows-link 0))) + (if mouse-1-remapped + (setcar ev 'mouse-2))) + (setq defn (or (string-key-binding up-event) (key-binding up-event))) (unless (or (null defn) (integerp defn) (equal defn 'undefined)) - (princ "\n\n-------------- up event ---------------\n\n") - (princ (key-description up-event)) + (princ (if mouse-1-tricky + "\n\n----------------- up-event (short click) ----------------\n\n" + hdr)) + (setq hdr nil) + (princ descr) (if (windowp window) (princ " at that spot")) + (if mouse-1-remapped + (princ " is remapped to \n which" )) (princ " runs the command ") (prin1 defn) (princ "\n which is ") - (describe-function-1 defn)))) - (print-help-return-message))))))) + (describe-function-1 defn)) + (when mouse-1-tricky + (setcar ev + (if (> mouse-1-click-follows-link 0) 'mouse-1 'mouse-2)) + (setq defn (or (string-key-binding up-event) (key-binding up-event))) + (unless (or (null defn) (integerp defn) (equal defn 'undefined)) + (princ (or hdr + "\n\n----------------- up-event (long click) ----------------\n\n")) + (princ "Pressing ") + (princ descr) + (if (windowp window) + (princ " at that spot")) + (princ (format " for longer than %d milli-seconds\n" + (abs mouse-1-click-follows-link))) + (if (not mouse-1-remapped) + (princ " remaps it to which" )) + (princ " runs the command ") + (prin1 defn) + (princ "\n which is ") + (describe-function-1 defn)))) + (print-help-return-message)))))))) (defun describe-mode (&optional buffer) @@ -697,6 +738,7 @@ whose documentation describes the minor mode." (princ " ") (insert-button pretty-minor-mode 'action (car help-button-cache) + 'follow-link t 'help-echo "mouse-2, RET: show full information") (princ (format " minor mode (%s):\n" (if indicator From e9e50b12cd273bd9c6602ead79124eb26f492601 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:17:02 +0000 Subject: [PATCH 051/104] (describe-variable): Add follow-link property to "below" button. --- lisp/help-fns.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 125b18614a2..f799fbd9be7 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -569,6 +569,7 @@ it is displayed along with the global value." (insert " value is shown ") (insert-button "below" 'action help-button-cache + 'follow-link t 'help-echo "mouse-2, RET: show value") (insert ".\n\n"))) ;; Add a note for variables that have been make-var-buffer-local. From 54d761b35a5d44ba690a43de961e28dc77ed3246 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:17:12 +0000 Subject: [PATCH 052/104] (help-xref): Add follow-link property. --- lisp/help-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index a2dcdf91ed8..e9d3561d251 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -68,6 +68,7 @@ The format is (FUNCTION ARGS...).") ;; Button types used by help (define-button-type 'help-xref + 'follow-link t 'action #'help-button-action) (defun help-button-action (button) From d8fac8010349730e6c2afa6f45fa4aab4ca8471f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:17:22 +0000 Subject: [PATCH 053/104] (apropos-symbol, apropos-function, apropos-macro) (apropos-command, apropos-variable, apropos-face, apropos-group) (apropos-widget, apropos-plist): Add follow-link property. --- lisp/apropos.el | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/apropos.el b/lisp/apropos.el index 7b37a49d087..1befefe8814 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -163,6 +163,7 @@ term, and the rest of the words are alternative terms.") (define-button-type 'apropos-symbol 'face apropos-symbol-face 'help-echo "mouse-2, RET: Display more help on this symbol" + 'follow-link t 'action #'apropos-symbol-button-display-help 'skip t) @@ -174,19 +175,24 @@ term, and the rest of the words are alternative terms.") (define-button-type 'apropos-function 'apropos-label "Function" + 'help-echo "mouse-2, RET: Display more help on this function" + 'follow-link t 'action (lambda (button) - (describe-function (button-get button 'apropos-symbol))) - 'help-echo "mouse-2, RET: Display more help on this function") + (describe-function (button-get button 'apropos-symbol)))) + (define-button-type 'apropos-macro 'apropos-label "Macro" + 'help-echo "mouse-2, RET: Display more help on this macro" + 'follow-link t 'action (lambda (button) - (describe-function (button-get button 'apropos-symbol))) - 'help-echo "mouse-2, RET: Display more help on this macro") + (describe-function (button-get button 'apropos-symbol)))) + (define-button-type 'apropos-command 'apropos-label "Command" + 'help-echo "mouse-2, RET: Display more help on this command" + 'follow-link t 'action (lambda (button) - (describe-function (button-get button 'apropos-symbol))) - 'help-echo "mouse-2, RET: Display more help on this command") + (describe-function (button-get button 'apropos-symbol)))) ;; We used to use `customize-variable-other-window' instead for a ;; customizable variable, but that is slow. It is better to show an @@ -196,18 +202,21 @@ term, and the rest of the words are alternative terms.") (define-button-type 'apropos-variable 'apropos-label "Variable" 'help-echo "mouse-2, RET: Display more help on this variable" + 'follow-link t 'action (lambda (button) (describe-variable (button-get button 'apropos-symbol)))) (define-button-type 'apropos-face 'apropos-label "Face" 'help-echo "mouse-2, RET: Display more help on this face" + 'follow-link t 'action (lambda (button) (describe-face (button-get button 'apropos-symbol)))) (define-button-type 'apropos-group 'apropos-label "Group" 'help-echo "mouse-2, RET: Display more help on this group" + 'follow-link t 'action (lambda (button) (customize-group-other-window (button-get button 'apropos-symbol)))) @@ -215,12 +224,14 @@ term, and the rest of the words are alternative terms.") (define-button-type 'apropos-widget 'apropos-label "Widget" 'help-echo "mouse-2, RET: Display more help on this widget" + 'follow-link t 'action (lambda (button) (widget-browse-other-window (button-get button 'apropos-symbol)))) (define-button-type 'apropos-plist 'apropos-label "Plist" 'help-echo "mouse-2, RET: Display more help on this plist" + 'follow-link t 'action (lambda (button) (apropos-describe-plist (button-get button 'apropos-symbol)))) From d086b1a2491d8da73f65ae6dbfe11146e226a9dc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:17:35 +0000 Subject: [PATCH 054/104] (cvs-mode-map): Map follow-link to a function which checks if position is in a filename, rather than some other clickable item. Function looks for cvs-filename-face at position. --- lisp/pcvs-defs.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 6bdd6bb6dd8..27629c5ddc6 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el @@ -380,6 +380,8 @@ This variable is buffer local and only used in the *cvs* buffer.") ("+" . cvs-mode-tree) ;; mouse bindings ([mouse-2] . cvs-mode-find-file) + ([follow-link] . (lambda (pos) + (if (eq (get-char-property pos 'face) 'cvs-filename-face) t))) ([(down-mouse-3)] . cvs-menu) ;; dired-like bindings ("\C-o" . cvs-mode-display-file) From 0fa42821c9bbd07ece353a747ae7f86b03b36148 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:17:47 +0000 Subject: [PATCH 055/104] (widget-specify-field, widget-specify-button): Map a :follow-link keyword into a follow-link property. (link): Add :follow-link keyword, map to RET binding. --- lisp/wid-edit.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 4888bf478df..c782e4262b8 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -327,6 +327,7 @@ new value.") (let ((keymap (widget-get widget :keymap)) (face (or (widget-get widget :value-face) 'widget-field-face)) (help-echo (widget-get widget :help-echo)) + (follow-link (widget-get widget :follow-link)) (rear-sticky (or (not widget-field-add-space) (widget-get widget :size)))) (if (functionp help-echo) @@ -345,6 +346,7 @@ new value.") ;; works in the field when, say, Custom uses `suppress-keymap'. (overlay-put overlay 'local-map keymap) (overlay-put overlay 'face face) + (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo)) (setq to (1- to)) (setq rear-sticky t)) @@ -354,6 +356,7 @@ new value.") (overlay-put overlay 'field widget) (overlay-put overlay 'local-map keymap) (overlay-put overlay 'face face) + (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo))) (widget-specify-secret widget)) @@ -378,6 +381,7 @@ new value.") (defun widget-specify-button (widget from to) "Specify button for WIDGET between FROM and TO." (let ((overlay (make-overlay from to nil t nil)) + (follow-link (widget-get widget :follow-link)) (help-echo (widget-get widget :help-echo))) (widget-put widget :button-overlay overlay) (if (functionp help-echo) @@ -389,6 +393,7 @@ new value.") (unless (widget-get widget :suppress-face) (overlay-put overlay 'face (widget-apply widget :button-face-get))) (overlay-put overlay 'pointer 'hand) + (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo))) (defun widget-mouse-help (window overlay point) @@ -1705,6 +1710,7 @@ If END is omitted, it defaults to the length of LIST." "An embedded link." :button-prefix 'widget-link-prefix :button-suffix 'widget-link-suffix + :follow-link "\C-m" :help-echo "Follow the link." :format "%[%t%]") From bb87fbc3eeeeacdaed7780c5a349509f4dcc1541 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:18:02 +0000 Subject: [PATCH 056/104] (dired-mode-map): Map follow-link to mouse-face. --- lisp/dired.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/dired.el b/lisp/dired.el index 19ea0768e2b..037bf282eda 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1104,6 +1104,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (let ((map (make-keymap))) (suppress-keymap map) (define-key map [mouse-2] 'dired-mouse-find-file-other-window) + (define-key map [follow-link] 'mouse-face) ;; Commands to mark or flag certain categories of files (define-key map "#" 'dired-flag-auto-save-files) (define-key map "." 'dired-clean-directory) From 0ac804df7985219cf795d11fc8a5cc760619f787 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:18:39 +0000 Subject: [PATCH 057/104] (compilation-minor-mode-map) (compilation-button-map, compilation-mode-map): Map follow-link to mouse-face. --- lisp/progmodes/compile.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f2750ec8ff4..9c7e8fe1560 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1044,6 +1044,7 @@ exited abnormally with code %d\n" (defvar compilation-minor-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] 'compile-goto-error) + (define-key map [follow-link] 'mouse-face) (define-key map "\C-c\C-c" 'compile-goto-error) (define-key map "\C-m" 'compile-goto-error) (define-key map "\C-c\C-k" 'kill-compilation) @@ -1073,6 +1074,7 @@ exited abnormally with code %d\n" (defvar compilation-button-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] 'compile-goto-error) + (define-key map [follow-link] 'mouse-face) (define-key map "\C-m" 'compile-goto-error) map) "Keymap for compilation-message buttons.") @@ -1084,6 +1086,7 @@ exited abnormally with code %d\n" ;; because that introduces a menu bar item we don't want. ;; That confuses C-down-mouse-3. (define-key map [mouse-2] 'compile-goto-error) + (define-key map [follow-link] 'mouse-face) (define-key map "\C-c\C-c" 'compile-goto-error) (define-key map "\C-m" 'compile-goto-error) (define-key map "\C-c\C-k" 'kill-compilation) From c44edf72cd01cb86d5527a9ba09860459aeba1e5 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:19:33 +0000 Subject: [PATCH 058/104] Implement context-sentitive dual behaviour for mouse-1 click. --- etc/NEWS | 33 +++++++++++++++++++++++++++++++++ lisp/ChangeLog | 38 ++++++++++++++++++++++++++++++++++++++ lisp/gnus/ChangeLog | 8 +++++++- 3 files changed, 78 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 21895dd1d63..1ac6aba6de5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -98,6 +98,35 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +** You can now follow links by clicking mouse-1 on the link. + +Traditionally, Emacs uses a mouse-1 click to set point and a mouse-2 +click to follow a link, whereas most other applications use a mouse-1 +click for both purposes, depending on whether you click outside or +inside a link. With release 21.4, the behaviour of a mouse-1 click +has been changed to match this context-sentitive dual behaviour. + +Depending on the current mode, a mouse-2 click in Emacs may do much +more than just follow a link, so the new mouse-1 behaviour is only +activated for modes which explicitly mark a clickable text as a "link" +(see the new function `mouse-on-link-p' for details). The lisp +packages that are included in release 21.4 have been adapted to do +this, but external packages may not yet support this. However, there +is no risk in using such packages, as the worst thing that could +happen is that you get the original mouse-1 behaviour when you click +on a link, which typically means that you set point where you click. + +If you want to get the original mouse-1 action also inside a link, you +just need to press the mouse-1 button a little longer than a normal +click (i.e. press and hold the mouse-1 button for half a second before +you release it). + +Dragging the mouse-1 inside a link still performs the original +drag-mouse-1 action, typically copy the text. + +You can customize the new mouse-1 behaviour via the new user option +`mouse-1-click-follows-link'. + ** line-move-ignore-invisible now defaults to t. ** In Outline mode, hide-body no longer hides lines at the top @@ -2372,6 +2401,10 @@ configuration files. * Lisp Changes in Emacs 21.4 +** Lisp code can now test if a given buffer position is inside a +clickable link with the new function `mouse-on-link-p'. This is the +function used by the new `mouse-1-click-follows-link' functionality. + ** (while-no-input BODY...) runs BODY, but only so long as no input arrives. If the user types or clicks anything, BODY stops as if a quit had occurred. while-no-input returns the value of BODY, if BODY diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e19ddff5d7..e973b48e814 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,41 @@ +2004-12-17 Kim F. Storm + + * mouse.el (mouse-1-click-follows-link): New defcustom. + (mouse-on-link-p): New function. + (mouse-drag-region-1): Implement mouse-1-click-follows-link + functionality. Map a mouse-1 click event into a mouse-2 (or + other) event when position is inside a link. + + * tooltip.el (tooltip-show-help-function): Replace "mouse-2" + prefix in tooltip text with "mouse-1" when this is a link + recognized by mouse-1-click-follows-link functionality. + + * help.el (describe-key): Report effective and original binding + for mouse-1 when clicked on a link. + (describe-mode): Add follow-link property to "minor-mode" button. + + * help-fns.el (describe-variable): Add follow-link property to + "below" button. + + * help-mode.el (help-xref): Add follow-link property. + + * apropos.el (apropos-symbol, apropos-function, apropos-macro) + (apropos-command, apropos-variable, apropos-face, apropos-group) + (apropos-widget, apropos-plist): Add follow-link property. + + * pcvs-defs.el (cvs-mode-map): Map follow-link to a function which + checks if position is in a filename, rather than some other + clickable item. Function looks for cvs-filename-face at position. + + * wid-edit.el (widget-specify-field, widget-specify-button): + Map a :follow-link keyword into a follow-link property. + (link): Add :follow-link keyword, map to RET binding. + + * dired.el (dired-mode-map): Map follow-link to mouse-face. + + * progmodes/compile.el (compilation-minor-mode-map) + (compilation-button-map, compilation-mode-map): Likewise. + 2004-12-17 Thien-Thi Nguyen * play/zone.el (zone): Init `line-spacing' from orig buffer. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 518a9903085..bb7b8337f4c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2004-12-17 Kim F. Storm + + * gnus-group.el (gnus-group-mode-map): Map follow-link to mouse-face. + + * gnus-sum.el (gnus-summary-mode-map): Likewise. + 2004-12-08 Stefan Monnier * gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min. @@ -905,7 +911,7 @@ * gnus-delay.el (gnus-delay-default-hour): Add :version. * gnus-cite.el (gnus-cite-blank-line-after-header) - (gnus-article-boring-faces): + (gnus-article-boring-faces): * gnus-art.el (gnus-buttonized-mime-types) (gnus-inhibit-mime-unbuttonizing) From 1c4976249b4116dc1fce6ac00fc2cc81ea2f7214 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:19:52 +0000 Subject: [PATCH 059/104] (gnus-group-mode-map): Map follow-link to mouse-face. --- lisp/gnus/gnus-group.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index b7d0cf9eef4..336b635a6a0 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -591,6 +591,7 @@ simple manner.") "\M-e" gnus-group-edit-group-method "^" gnus-group-enter-server-mode gnus-mouse-2 gnus-mouse-pick-group + [follow-link] mouse-face "<" beginning-of-buffer ">" end-of-buffer "\C-c\C-b" gnus-bug From 132cf96dff182358577c15bcd401eb3cd9bd6f4a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 17 Dec 2004 15:20:06 +0000 Subject: [PATCH 060/104] (gnus-summary-mode-map): Map follow-link to mouse-face. --- lisp/gnus/gnus-sum.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 03e1624237e..c4f320e888b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1703,6 +1703,7 @@ increase the score of each group you read." "Q" gnus-summary-exit-no-update "\C-c\C-i" gnus-info-find-node gnus-mouse-2 gnus-mouse-pick-article + [follow-link] mouse-face "m" gnus-summary-mail-other-window "a" gnus-summary-post-news "i" gnus-summary-news-other-window @@ -5096,7 +5097,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (when gnus-agent (gnus-agent-possibly-alter-active group (gnus-active group) info) - + (setq gnus-summary-use-undownloaded-faces (gnus-agent-find-parameter group @@ -7044,7 +7045,7 @@ If optional argument UNREAD is non-nil, only unread article is selected." (gnus-summary-goto-subject article t))) (gnus-summary-limit (append articles gnus-newsgroup-limit)) (gnus-summary-position-point)) - + (defun gnus-summary-goto-subject (article &optional force silent) "Go the subject line of ARTICLE. If FORCE, also allow jumping to articles not currently shown." @@ -9140,7 +9141,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." ;;;!!!Why is this necessary? (set-buffer gnus-summary-buffer) - + (gnus-summary-goto-subject article) (when (eq action 'move) (gnus-summary-mark-article article gnus-canceled-mark)))) From 2c13e47b067f1a59d485c74c2b7b18d52ea29bc6 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 17 Dec 2004 16:58:54 +0000 Subject: [PATCH 061/104] (occur-accumulate-lines, occur-engine): Make forcing deferred font-lock fontification jit-specific. --- lisp/ChangeLog | 5 +++++ lisp/replace.el | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e973b48e814..48efe0b4f25 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-17 Juri Linkov + + * replace.el (occur-accumulate-lines, occur-engine): + Make forcing deferred font-lock fontification jit-specific. + 2004-12-17 Kim F. Storm * mouse.el (mouse-1-click-follows-link): New defcustom. diff --git a/lisp/replace.el b/lisp/replace.el index 8f81a53bf7e..775ad0ffb05 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -799,9 +799,9 @@ If the value is nil, don't highlight the buffer names specially." (setq count (+ count (if forwardp -1 1))) (setq beg (line-beginning-position) end (line-end-position)) - (if (and keep-props font-lock-mode + (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode (text-property-not-all beg end 'fontified t)) - (font-lock-fontify-region beg end)) + (jit-lock-fontify-now beg end)) (push (funcall (if keep-props #'buffer-substring @@ -1008,9 +1008,9 @@ See also `multi-occur'." endpt (line-end-position))) (setq marker (make-marker)) (set-marker marker matchbeg) - (if (and keep-props font-lock-mode + (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode (text-property-not-all begpt endpt 'fontified t)) - (font-lock-fontify-region begpt endpt)) + (jit-lock-fontify-now begpt endpt)) (setq curstring (buffer-substring begpt endpt)) ;; Depropertize the string, and maybe ;; highlight the matches From c08e6004ef8d8d639ed6caf8e81164727293c0b7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 17 Dec 2004 19:35:45 +0000 Subject: [PATCH 062/104] Sync with Tramp 2.0.46. --- configure | 543 +++++++++++++++--------------------------- lisp/ChangeLog | 19 ++ lisp/net/tramp-smb.el | 8 +- lisp/net/tramp.el | 128 +++++----- lisp/net/trampver.el | 2 +- man/ChangeLog | 6 + man/trampver.texi | 2 +- 7 files changed, 289 insertions(+), 419 deletions(-) diff --git a/configure b/configure index 4ae0be0ae95..e80559cce4d 100755 --- a/configure +++ b/configure @@ -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,8 +3250,7 @@ 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=$? @@ -3309,8 +3308,7 @@ 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=$? @@ -3426,8 +3424,7 @@ 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=$? @@ -3481,8 +3478,7 @@ 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=$? @@ -3527,8 +3523,7 @@ 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=$? @@ -3572,8 +3567,7 @@ 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=$? @@ -4206,8 +4200,7 @@ 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=$? @@ -4483,8 +4476,7 @@ 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=$? @@ -4513,8 +4505,7 @@ 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=$? @@ -4584,8 +4575,7 @@ 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=$? @@ -4637,8 +4627,7 @@ 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=$? @@ -4709,8 +4698,7 @@ 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=$? @@ -4762,8 +4750,7 @@ 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=$? @@ -4833,8 +4820,7 @@ 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=$? @@ -5004,8 +4990,7 @@ 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=$? @@ -5074,8 +5059,7 @@ 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=$? @@ -5229,8 +5213,7 @@ 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=$? @@ -5323,8 +5306,7 @@ 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=$? @@ -5466,8 +5448,7 @@ 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=$? @@ -5586,8 +5567,7 @@ 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=$? @@ -5752,8 +5732,7 @@ 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=$? @@ -5816,8 +5795,7 @@ 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=$? @@ -5890,8 +5868,7 @@ 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=$? @@ -5977,8 +5954,7 @@ 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=$? @@ -6051,8 +6027,7 @@ 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=$? @@ -6122,8 +6097,7 @@ 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=$? @@ -6182,8 +6156,7 @@ 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,8 +6225,7 @@ 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=$? @@ -6314,8 +6286,7 @@ 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=$? @@ -6381,8 +6352,7 @@ 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=$? @@ -6528,8 +6498,7 @@ 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=$? @@ -6593,8 +6562,7 @@ 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=$? @@ -6659,8 +6627,7 @@ 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=$? @@ -6706,8 +6673,7 @@ 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=$? @@ -6781,8 +6747,7 @@ 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=$? @@ -6847,8 +6812,7 @@ 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=$? @@ -6892,8 +6856,7 @@ 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=$? @@ -6964,8 +6927,7 @@ 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=$? @@ -7015,8 +6977,7 @@ 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=$? @@ -7087,8 +7048,7 @@ 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=$? @@ -7138,8 +7098,7 @@ 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=$? @@ -7210,8 +7169,7 @@ 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=$? @@ -7261,8 +7219,7 @@ 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=$? @@ -7333,8 +7290,7 @@ 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=$? @@ -7384,8 +7340,7 @@ 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=$? @@ -7456,8 +7411,7 @@ 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=$? @@ -7507,8 +7461,7 @@ 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=$? @@ -7595,8 +7548,7 @@ 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=$? @@ -7702,8 +7654,7 @@ 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=$? @@ -7763,8 +7714,7 @@ 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=$? @@ -7888,6 +7838,7 @@ 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 @@ -7980,7 +7931,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 Intrinsic.h. + # Guess where to find include files, by looking for a specified header file. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8054,8 +8005,7 @@ 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=$? @@ -8115,8 +8065,12 @@ 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" - echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 + # 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 fi if test "$no_x" = yes; then @@ -8280,8 +8234,7 @@ 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=$? @@ -8376,8 +8329,7 @@ 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=$? @@ -8436,8 +8388,7 @@ 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=$? @@ -8521,8 +8472,7 @@ 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=$? @@ -8706,8 +8656,7 @@ 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=$? @@ -8959,8 +8908,7 @@ 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=$? @@ -9027,8 +8975,7 @@ 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=$? @@ -9097,8 +9044,7 @@ 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=$? @@ -9183,8 +9129,7 @@ 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=$? @@ -9261,8 +9206,7 @@ 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=$? @@ -9316,8 +9260,7 @@ 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=$? @@ -9386,8 +9329,7 @@ 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=$? @@ -9491,8 +9433,7 @@ 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=$? @@ -9559,8 +9500,7 @@ 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=$? @@ -9630,8 +9570,7 @@ 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=$? @@ -9871,8 +9810,7 @@ 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=$? @@ -10394,8 +10332,7 @@ 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=$? @@ -10467,8 +10404,7 @@ 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=$? @@ -10550,8 +10486,7 @@ 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=$? @@ -10630,8 +10565,7 @@ 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=$? @@ -10705,8 +10639,7 @@ 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=$? @@ -10774,8 +10707,7 @@ 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=$? @@ -10844,8 +10776,7 @@ 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=$? @@ -10969,8 +10900,7 @@ 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=$? @@ -11066,8 +10996,7 @@ 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=$? @@ -11147,8 +11076,7 @@ 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=$? @@ -11216,8 +11144,7 @@ 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=$? @@ -11362,8 +11289,7 @@ 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=$? @@ -11472,8 +11398,7 @@ 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=$? @@ -11618,8 +11543,7 @@ 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=$? @@ -11726,8 +11650,7 @@ 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=$? @@ -11881,8 +11804,7 @@ 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=$? @@ -11957,8 +11879,7 @@ 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=$? @@ -12106,8 +12027,7 @@ 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=$? @@ -12184,8 +12104,7 @@ 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=$? @@ -12332,8 +12251,7 @@ 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=$? @@ -12409,8 +12327,7 @@ 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=$? @@ -12553,8 +12470,7 @@ 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=$? @@ -12722,8 +12638,7 @@ 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=$? @@ -12868,8 +12783,7 @@ 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=$? @@ -12945,8 +12859,7 @@ 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=$? @@ -13009,8 +12922,7 @@ 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=$? @@ -13091,8 +13003,7 @@ 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=$? @@ -13233,8 +13144,7 @@ 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=$? @@ -13379,8 +13289,7 @@ 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=$? @@ -13456,8 +13365,7 @@ 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=$? @@ -13530,8 +13438,7 @@ 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=$? @@ -13686,8 +13593,7 @@ 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=$? @@ -13753,8 +13659,7 @@ 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=$? @@ -14013,8 +13918,7 @@ 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=$? @@ -14081,8 +13985,7 @@ 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=$? @@ -14234,8 +14137,7 @@ 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=$? @@ -14419,8 +14321,7 @@ 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=$? @@ -14747,8 +14648,7 @@ 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=$? @@ -14849,8 +14749,7 @@ 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=$? @@ -14923,8 +14822,7 @@ 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=$? @@ -15003,8 +14901,7 @@ 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=$? @@ -15073,8 +14970,7 @@ 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=$? @@ -15142,8 +15038,7 @@ 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=$? @@ -15217,8 +15112,7 @@ 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=$? @@ -15322,8 +15216,7 @@ 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=$? @@ -15398,8 +15291,7 @@ 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=$? @@ -15551,8 +15443,7 @@ 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=$? @@ -15620,8 +15511,7 @@ 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=$? @@ -15798,8 +15688,7 @@ 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=$? @@ -15875,8 +15764,7 @@ 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=$? @@ -16030,8 +15918,7 @@ 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=$? @@ -16182,8 +16069,7 @@ 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=$? @@ -16334,8 +16220,7 @@ 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=$? @@ -16477,8 +16362,7 @@ 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=$? @@ -16522,8 +16406,7 @@ 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=$? @@ -16669,8 +16552,7 @@ 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=$? @@ -16714,8 +16596,7 @@ 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=$? @@ -16780,8 +16661,7 @@ 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=$? @@ -16844,8 +16724,7 @@ 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=$? @@ -16947,8 +16826,7 @@ 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=$? @@ -17017,8 +16895,7 @@ 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=$? @@ -17125,8 +17002,7 @@ 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=$? @@ -17229,8 +17105,7 @@ 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=$? @@ -17306,8 +17181,7 @@ 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=$? @@ -17411,8 +17285,7 @@ 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=$? @@ -17504,8 +17377,7 @@ 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=$? @@ -17570,8 +17442,7 @@ 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=$? @@ -17637,8 +17508,7 @@ 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=$? @@ -17748,8 +17618,7 @@ 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=$? @@ -17814,8 +17683,7 @@ 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=$? @@ -17895,8 +17763,7 @@ 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=$? @@ -17969,8 +17836,7 @@ 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=$? @@ -18043,8 +17909,7 @@ 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=$? @@ -18117,8 +17982,7 @@ 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=$? @@ -18192,8 +18056,7 @@ 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=$? @@ -18265,8 +18128,7 @@ 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=$? @@ -18341,8 +18203,7 @@ 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=$? @@ -18414,8 +18275,7 @@ 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=$? @@ -18488,8 +18348,7 @@ 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=$? @@ -18639,8 +18498,7 @@ 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=$? @@ -18786,8 +18644,7 @@ 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=$? @@ -18933,8 +18790,7 @@ 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=$? @@ -19091,8 +18947,7 @@ 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=$? @@ -19238,8 +19093,7 @@ 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=$? @@ -19385,8 +19239,7 @@ 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=$? @@ -19544,8 +19397,7 @@ 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=$? @@ -19703,8 +19555,7 @@ 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=$? @@ -19893,8 +19744,7 @@ 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=$? @@ -19967,8 +19817,7 @@ 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=$? @@ -20036,8 +19885,7 @@ 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=$? @@ -20083,8 +19931,7 @@ 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=$? @@ -20158,8 +20005,7 @@ 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=$? @@ -20223,8 +20069,7 @@ 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=$? @@ -20362,8 +20207,7 @@ 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=$? @@ -20424,8 +20268,7 @@ 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=$? @@ -20570,8 +20413,7 @@ 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=$? @@ -20727,8 +20569,7 @@ 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=$? @@ -20899,8 +20740,7 @@ 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=$? @@ -20968,8 +20808,7 @@ 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=$? @@ -21154,8 +20993,7 @@ 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=$? @@ -21448,8 +21286,7 @@ 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=$? @@ -21514,8 +21351,7 @@ 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=$? @@ -21578,8 +21414,7 @@ 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=$? @@ -21645,8 +21480,7 @@ 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=$? @@ -21687,8 +21521,7 @@ 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=$? @@ -21755,8 +21588,7 @@ 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=$? @@ -22885,11 +22717,6 @@ 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. */ @@ -22928,6 +22755,12 @@ 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/lisp/ChangeLog b/lisp/ChangeLog index 48efe0b4f25..33a3d65fe02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2004-12-17 Michael Albinus + + Sync with Tramp 2.0.46. + + * net/tramp.el (tramp-maybe-send-perl-script): Change order of + parameters wrt Tramp convention. + (tramp-handle-file-attributes-with-perl) + (tramp-handle-directory-files-and-attributes): Apply it. + (tramp-do-copy-or-rename-file-out-of-band): Check for existence of + `copy-program'. Reported by Zack Weinberg + . + (top): Set `edebug-form-spec' property directly rather than + calling `def-edebug-spec'. + + * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Make the + advice less fragile. Surround temporary redefinition of + `substitute-in-file-name' with `unwind-protect'. Suggested by + Matt Hodges . + 2004-12-17 Juri Linkov * replace.el (occur-accumulate-lines, occur-engine): diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 4628af88178..d0a7cf7b65f 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1105,9 +1105,11 @@ Return the difference in the format of a time value." ;; Do `PC-do-completion' without substitution (let* (save) (fset 'save (symbol-function 'substitute-in-file-name)) - (fset 'substitute-in-file-name (symbol-function 'identity)) - ad-do-it - (fset 'substitute-in-file-name (symbol-function 'save))) + (unwind-protect + (progn + (fset 'substitute-in-file-name (symbol-function 'identity)) + ad-do-it) + (fset 'substitute-in-file-name (symbol-function 'save)))) ;; Expand "$" (let* ((beg (or (and (functionp 'minibuffer-prompt-end) ; Emacs 21 diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b0448fd25e9..34572e98674 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -34,7 +34,7 @@ ;; ;; Notes: ;; ----- -;; +;; ;; This package only works for Emacs 20 and higher, and for XEmacs 21 ;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs ;; 19 is reported to have other problems. For XEmacs 21, you need the @@ -205,7 +205,7 @@ file name, the backup directory is prepended with Tramp file name prefix gives the same backup policy for Tramp files on their hosts like the policy for local files." - :type '(repeat + :type '(repeat (list (regexp :tag "File regexp") (string :tag "Backup Dir") (set :inline t @@ -506,7 +506,7 @@ This variable defaults to the value of `tramp-encoding-shell'." (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line "xy")) ;see docstring for "xy" - ("fcp" + ("fcp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "fsh") (tramp-copy-program "fcp") @@ -633,7 +633,7 @@ variable `tramp-methods'." ("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") ("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n") ("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") - ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") + ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") ("su" tramp-multi-connect-su "su - %u%n") ("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n")) "*List of connection functions for multi-hop methods. @@ -777,7 +777,7 @@ the info pages.") "sudo" tramp-completion-function-alist-su) (tramp-set-completion-function "multi" nil) - (tramp-set-completion-function + (tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh) (tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh) @@ -1536,9 +1536,9 @@ cat /tmp/tramp.$$ rm -f /tmp/tramp.$$ }" "Shell function to implement `uudecode' to standard output. -Many systems support `uudecode -o /dev/stdout' for this or -`uudecode -o -' or `uudecode -p', but some systems don't, and for -them we have this shell function.") +Many systems support `uudecode -o /dev/stdout' or `uudecode -o -' +for this or `uudecode -p', but some systems don't, and for them +we have this shell function.") ;; Perl script to implement `file-attributes' in a Lisp `read'able ;; output. If you are hacking on this, note that you get *no* output @@ -1960,10 +1960,9 @@ 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 ;; It works only when VAR is nil. Otherwise, it can be deactivated by -;; (def-edebug-spec with-parsed-tramp-file-name 0) +;; (put 'with-parsed-tramp-file-name 'edebug-form-spec 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)) +(put 'with-parsed-tramp-file-name 'edebug-form-spec t) (defmacro tramp-let-maybe (variable value &rest body) "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. @@ -2056,7 +2055,7 @@ target of the symlink differ." (setq filename (tramp-file-name-localname (tramp-dissect-file-name (expand-file-name filename))))) - + ;; Right, they are on the same host, regardless of user, method, etc. ;; We now make the link on the remote machine. This will occur as the user ;; that FILENAME belongs to. @@ -2065,7 +2064,7 @@ target of the symlink differ." l-multi-method l-method l-user l-host (format "cd %s && %s -sf %s %s" cwd ln - filename + filename l-localname) t))))) @@ -2347,9 +2346,9 @@ target of the symlink differ." "file attributes with perl: %s" (tramp-make-tramp-file-name multi-method method user host localname)) - (tramp-maybe-send-perl-script tramp-perl-file-attributes - "tramp_file_attributes" - multi-method method user host) + (tramp-maybe-send-perl-script multi-method method user host + tramp-perl-file-attributes + "tramp_file_attributes") (tramp-send-command multi-method method user host (format "tramp_file_attributes %s %s" (tramp-shell-quote-argument localname) id-format)) @@ -2394,7 +2393,12 @@ target of the symlink differ." ;; This function makes the same assumption as ;; `tramp-handle-set-visited-file-modtime'. (defun tramp-handle-verify-visited-file-modtime (buf) - "Like `verify-visited-file-modtime' for tramp files." + "Like `verify-visited-file-modtime' for tramp files. +At the time `verify-visited-file-modtime' calls this function, we +already know that the buffer is visiting a file and that +`visited-file-modtime' does not return 0. Do not call this +function directly, unless those two cases are already taken care +of." (with-current-buffer buf ;; There is no file visiting the buffer, or the buffer has no ;; recorded last modification time. @@ -2406,7 +2410,7 @@ target of the symlink differ." (let* ((attr (file-attributes f)) (modtime (nth 5 attr)) (mt (visited-file-modtime))) - + (cond ;; file exists, and has a known modtime. ((and attr (not (equal modtime '(0 0)))) @@ -2689,9 +2693,9 @@ if the remote host can't provide the modtime." (save-excursion (setq directory (tramp-handle-expand-file-name directory)) (with-parsed-tramp-file-name directory nil - (tramp-maybe-send-perl-script tramp-perl-directory-files-and-attributes - "tramp_directory_files_and_attributes" - multi-method method user host) + (tramp-maybe-send-perl-script multi-method method user host + tramp-perl-directory-files-and-attributes + "tramp_directory_files_and_attributes") (tramp-send-command multi-method method user host (format "tramp_directory_files_and_attributes %s %s" (tramp-shell-quote-argument localname) @@ -2753,7 +2757,7 @@ if the remote host can't provide the modtime." (push (buffer-substring (point) (tramp-line-end-position)) result)) - + (tramp-send-command multi-method method user host "cd") (tramp-wait-for-output) @@ -3096,6 +3100,12 @@ be a local filename. The method used must be an out-of-band method." ;; Use an asynchronous process. By this, password can be handled. (save-excursion + + ;; Check for program. + (when (and (fboundp 'executable-find) + (not (executable-find copy-program))) + (error "Cannot find copy program: %s" copy-program)) + (set-buffer trampbuf) (setq tramp-current-multi-method multi-method tramp-current-method method @@ -3170,15 +3180,15 @@ This is like `dired-recursive-delete-directory' for tramp files." 'file-error (list "Removing old file name" "no such directory" filename))) ;; Which is better, -r or -R? (-r works for me ) - (tramp-send-command multi-method method user host + (tramp-send-command multi-method method user host (format "rm -r %s" (tramp-shell-quote-argument localname))) ;; Wait for the remote system to return to us... ;; This might take a while, allow it plenty of time. (tramp-wait-for-output 120) ;; Make sure that it worked... (and (file-exists-p filename) - (error "Failed to recusively delete %s" filename)))) - + (error "Failed to recursively delete %s" filename)))) + (defun tramp-handle-dired-call-process (program discard &rest arguments) "Like `dired-call-process' for tramp files." (with-parsed-tramp-file-name default-directory nil @@ -3200,7 +3210,7 @@ This is like `dired-recursive-delete-directory' for tramp files." (tramp-send-command-and-check multi-method method user host nil) (tramp-send-command multi-method method user host "cd") (tramp-wait-for-output))))) - + (defun tramp-handle-dired-compress-file (file &rest ok-flag) "Like `dired-compress-file' for tramp files." ;; OK-FLAG is valid for XEmacs only, but not implemented. @@ -3568,7 +3578,7 @@ This will break if COMMAND prints a newline, followed by the value of (when (and (numberp buffer) (zerop buffer)) (error "Implementation does not handle immediate return")) (when (consp buffer) (error "Implementation does not handle error files")) - (shell-command + (shell-command (mapconcat 'tramp-shell-quote-argument (cons program args) " ") @@ -4250,7 +4260,7 @@ necessary anymore." ;; `tramp-completion-file-name-regexp-unified' aren't different. ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'. -;; Using `last-input-event' is a little bit risky, because completing a file +;; Using `last-input-event' is a little bit risky, because completing a file ;; might require loading other files, like "~/.netrc", and for them it ;; shouldn't be decided based on that variable. On the other hand, those files ;; shouldn't have partial tramp file name syntax. Maybe another variable should @@ -4354,7 +4364,7 @@ necessary anymore." (funcall (nth 0 x) (nth 1 x))))) (tramp-get-completion-function m)) - (setq result (append result + (setq result (append result (mapcar (lambda (x) (tramp-get-completion-user-host @@ -4395,7 +4405,7 @@ necessary anymore." ;; [nil nil "x" nil nil] ;; [nil "x" nil nil nil] -;; "/x:" "/x:y" "/x:y:" +;; "/x:" "/x:y" "/x:y:" ;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""] ;; "/[x/" "/[x/y" ;; [nil "x" nil "" nil] [nil "x" nil "y" nil] @@ -4769,7 +4779,7 @@ User may be nil." ;;; Internal Functions: -(defun tramp-maybe-send-perl-script (script name multi-method method user host) +(defun tramp-maybe-send-perl-script (multi-method method user host script name) "Define in remote shell function NAME implemented as perl SCRIPT. Only send the definition if it has not already been done. Function may have 0-3 parameters." @@ -4864,7 +4874,7 @@ TIME is an Emacs internal time value as returned by `current-time'." "touch" nil (current-buffer) nil "-t" touch-time file)) (pop-to-buffer (current-buffer)) (error "tramp-touch: touch failed")))))) - + (defun tramp-buffer-name (multi-method method user host) "A name for the connection buffer for USER at HOST using METHOD." (if multi-method @@ -5022,7 +5032,7 @@ file exists and nonzero exit status otherwise." (file-exists-p existing) (not (file-exists-p nonexisting)))) (error "Couldn't find command to check if file exists.")))) - + ;; CCC test ksh or bash found for tilde expansion? (defun tramp-find-shell (multi-method method user host) @@ -5121,9 +5131,9 @@ Returns nil if none was found, else the command is returned." (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path) (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path))) -;; ------------------------------------------------------------ -;; -- Functions for establishing connection -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- Functions for establishing connection -- +;; ------------------------------------------------------------ ;; The following functions are actions to be taken when seeing certain ;; prompts from the remote host. See the variable @@ -5364,7 +5374,7 @@ Maybe the different regular expressions need to be tuned. (when multi-method (error "Cannot multi-connect using telnet connection method")) (tramp-pre-connection multi-method method user host) - (tramp-message 7 "Opening connection for %s@%s using %s..." + (tramp-message 7 "Opening connection for %s@%s using %s..." (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) @@ -5398,7 +5408,7 @@ Maybe the different regular expressions need to be tuned. p multi-method method user host) (tramp-post-connection multi-method method user host))))) - + (defun tramp-open-connection-rsh (multi-method method user host) "Open a connection using an rsh METHOD. This starts the command `rsh HOST -l USER'[*], then waits for a remote @@ -5423,7 +5433,7 @@ arguments, and xx will be used as the host name to connect to. (error "Cannot multi-connect using rsh connection method")) (tramp-pre-connection multi-method method user host) (if (and user (not (string= user ""))) - (tramp-message 7 "Opening connection for %s@%s using %s..." + (tramp-message 7 "Opening connection for %s@%s using %s..." user host method) (tramp-message 7 "Opening connection at %s using %s..." host method)) (let ((process-environment (copy-sequence process-environment)) @@ -5452,9 +5462,9 @@ arguments, and xx will be used as the host name to connect to. (> emacs-major-version 20)) tramp-dos-coding-system)) (p (if (and user (not (string= user ""))) - (apply #'start-process bufnam buf login-program + (apply #'start-process bufnam buf login-program real-host "-l" user login-args) - (apply #'start-process bufnam buf login-program + (apply #'start-process bufnam buf login-program real-host login-args))) (found nil)) (tramp-set-process-query-on-exit-flag p nil) @@ -5524,10 +5534,10 @@ prompt than you do, so it is not at all unlikely that the variable tramp-actions-before-shell) (tramp-open-connection-setup-interactive-shell p multi-method method user host) - (tramp-post-connection multi-method method + (tramp-post-connection multi-method method user host))))) -;; HHH: Not Changed. Multi method. It is not clear to me how this can +;; HHH: Not Changed. Multi method. It is not clear to me how this can ;; handle not giving a user name in the "file name". ;; ;; This is more difficult than for the single-hop method. In the @@ -5597,7 +5607,7 @@ log in as u2 to h2." (tramp-post-connection multi-method method user host))))) ;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-telnet (p method user host command) @@ -5619,8 +5629,8 @@ If USER is nil, uses the return value of (user-login-name) instead." (tramp-process-multi-actions p method user host tramp-multi-actions))) -;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; HHH: Changed. Multi method. Don't know how to handle this in the case +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-rlogin (p method user host command) @@ -5645,8 +5655,8 @@ If USER is nil, uses the return value of (user-login-name) instead." (tramp-process-multi-actions p method user host tramp-multi-actions))) -;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; HHH: Changed. Multi method. Don't know how to handle this in the case +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-su (p method user host command) @@ -6276,7 +6286,7 @@ Sends COMMAND, then waits 30 seconds for shell prompt." (tramp-barf-if-no-shell-prompt nil 30 "Couldn't `%s', see buffer `%s'" command (buffer-name))) - + (defun tramp-wait-for-output (&optional timeout) "Wait for output from remote rsh command." (let ((proc (get-buffer-process (current-buffer))) @@ -6609,9 +6619,9 @@ Not actually used. Use `(format \"%o\" i)' instead?" "")) -;; ------------------------------------------------------------ -;; -- TRAMP file names -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- TRAMP file names -- +;; ------------------------------------------------------------ ;; Conversion functions between external representation and ;; internal data structure. Convenience functions for internal ;; data structure. @@ -6622,7 +6632,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" "Return t iff NAME is a tramp file." (save-match-data (string-match tramp-file-name-regexp name))) - + ;; HHH: Changed. Used to assign the return value of (user-login-name) ;; to the `user' part of the structure if a user name was not ;; provided, now it assigns nil. @@ -6675,7 +6685,7 @@ This is MULTI-METHOD, if non-nil. Otherwise, it is METHOD, if non-nil. If both MULTI-METHOD and METHOD are nil, do a lookup in `tramp-default-method-alist'." (or multi-method method (tramp-find-default-method user host))) - + ;; HHH: Not Changed. Multi method. Will probably not handle the case where ;; a user name is not provided in the "file name" very well. (defun tramp-dissect-multi-file-name (name) @@ -6847,7 +6857,7 @@ as default." (if entry (second entry) (symbol-value param)))) - + ;; Auto saving to a special directory. @@ -7039,9 +7049,9 @@ exiting if process is running." process flag))) -;; ------------------------------------------------------------ -;; -- Kludges section -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- Kludges section -- +;; ------------------------------------------------------------ ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' ;; does not deal well with newline characters. Newline is replaced by @@ -7304,7 +7314,7 @@ report. ;; strange when doing zerop, we should kill the process and start ;; again. (Greg Stark) ;; * Add caching for filename completion. (Greg Stark) -;; Of course, this has issues with usability (stale cache bites) +;; Of course, this has issues with usability (stale cache bites) ;; -- ;; * Provide a local cache of old versions of remote files for the rsync ;; transfer method to use. (Greg Stark) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 7456bc1660f..866d6e5647d 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.45" +(defconst tramp-version "2.0.46" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" diff --git a/man/ChangeLog b/man/ChangeLog index abca281559a..d39b9922b35 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2004-12-17 Michael Albinus + + Sync with Tramp 2.0.46. + + * tramp.texi (bottom): Add arch-tag. It was lost, somehow. + 2004-12-16 Luc Teirlinck * url.texi: Correct typos. diff --git a/man/trampver.texi b/man/trampver.texi index 743b49388f7..45cbefb72ac 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.45 +@set trampver 2.0.46 @c Other flags from configuration @set prefix /usr/local From c138633412ded34ddb448cca51f52cdf7a3edbab Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 17 Dec 2004 23:53:23 +0000 Subject: [PATCH 063/104] (Text Filling and Line Breaking): Put period after @xref. (Font Locking): Avoid @strong{Note:}. --- man/ChangeLog | 6 ++++++ man/cc-mode.texi | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index d39b9922b35..b96026759a1 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2004-12-17 Luc Teirlinck + + * cc-mode.texi (Text Filling and Line Breaking): Put period after + @xref. + (Font Locking): Avoid @strong{Note:}. + 2004-12-17 Michael Albinus Sync with Tramp 2.0.46. diff --git a/man/cc-mode.texi b/man/cc-mode.texi index 2c0933a5335..89e49d67442 100644 --- a/man/cc-mode.texi +++ b/man/cc-mode.texi @@ -1420,7 +1420,7 @@ then as the comment prefix. It defaults to @samp{* @code{c-block-comment-prefix} typically gets overriden by the default style @code{gnu}, which sets it to blank. You can see the line splitting effect described here by setting a different style, -e.g. @code{k&r} @xref{Choosing a Style}}, which makes a comment +e.g. @code{k&r} @xref{Choosing a Style}.}, which makes a comment @example /* Got O(n^2) here, which is a Bad Thing. */ @@ -1643,7 +1643,7 @@ trailing backslashes. @cindex font locking @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@strong{Note:} The font locking in AWK mode is currently not integrated +@strong{Please note:} The font locking in AWK mode is currently not integrated with the rest of @ccmode{}, so this section does not apply there. @xref{AWK Mode Font Locking}, instead. From fbe6152fad0cd271a9bb766f16a70a8fa988d992 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sat, 18 Dec 2004 16:36:31 +0000 Subject: [PATCH 064/104] * term/mac-win.el (encoding-vector, mac-font-encoder-list) (ccl-encode-mac-centraleurroman-font): Use centraleurroman instead of centraleuropean as the name * macterm.c (endif, x_font_name_to_mac_font_name): Use maccentraleurroman instead of maccentraleuropean (mac_c_string_match, mac_do_list_fonts): Speed up font search by quickly finding a specific font without needing regexps. --- lisp/ChangeLog | 6 +++ lisp/term/mac-win.el | 18 ++++---- src/ChangeLog | 7 +++ src/macterm.c | 104 +++++++++++++++++++++++++++++++++---------- 4 files changed, 103 insertions(+), 32 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33a3d65fe02..40a11a935cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-12-18 YAMAMOTO Mitsuharu + + * term/mac-win.el (encoding-vector, mac-font-encoder-list) + (ccl-encode-mac-centraleurroman-font): Use centraleurroman + instead of centraleuropean as the name + 2004-12-17 Michael Albinus Sync with Tramp 2.0.46. diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 5032135da21..2b5c4d2a994 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -199,7 +199,7 @@ Switch to a buffer editing the last file dropped." (let ((encoding-vector (make-vector 256 nil)) (i 0) - (vec ;; mac-centraleuropean (128..255) -> UCS mapping + (vec ;; mac-centraleurroman (128..255) -> UCS mapping [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS #x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON #x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON @@ -339,8 +339,8 @@ Switch to a buffer editing the last file dropped." (setq i (1+ i))) (setq translation-table (make-translation-table-from-vector encoding-vector)) -;; (define-translation-table 'mac-centraleuropean-decoder translation-table) - (define-translation-table 'mac-centraleuropean-encoder +;; (define-translation-table 'mac-centraleurroman-decoder translation-table) + (define-translation-table 'mac-centraleurroman-encoder (char-table-extra-slot translation-table 0))) (let @@ -493,8 +493,8 @@ Switch to a buffer editing the last file dropped." (defvar mac-font-encoder-list '(("mac-roman" mac-roman-encoder ccl-encode-mac-roman-font "%s") - ("mac-centraleuropean" mac-centraleuropean-encoder - ccl-encode-mac-centraleuropean-font "%s ce") + ("mac-centraleurroman" mac-centraleurroman-encoder + ccl-encode-mac-centraleurroman-font "%s ce") ("mac-cyrillic" mac-cyrillic-encoder ccl-encode-mac-cyrillic-font "%s cy"))) @@ -515,15 +515,15 @@ Switch to a buffer editing the last file dropped." (if mac-encoded (aset table c mac-encoded)))))))) -(define-ccl-program ccl-encode-mac-centraleuropean-font +(define-ccl-program ccl-encode-mac-centraleurroman-font `(0 (if (r0 != ,(charset-id 'ascii)) (if (r0 <= ?\x8f) - (translate-character mac-centraleuropean-encoder r0 r1) + (translate-character mac-centraleurroman-encoder r0 r1) ((r1 <<= 7) (r1 |= r2) - (translate-character mac-centraleuropean-encoder r0 r1))))) - "CCL program for Mac Central European font") + (translate-character mac-centraleurroman-encoder r0 r1))))) + "CCL program for Mac Central European Roman font") (define-ccl-program ccl-encode-mac-cyrillic-font `(0 diff --git a/src/ChangeLog b/src/ChangeLog index 63f0fe42a37..1d4c964a45c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2004-12-18 YAMAMOTO Mitsuharu + + * macterm.c (endif, x_font_name_to_mac_font_name): Use + maccentraleurroman instead of maccentraleuropean + (mac_c_string_match, mac_do_list_fonts): Speed up font search by + quickly finding a specific font without needing regexps. + 2004-12-15 Jan Dj,Ad(Brv * syssignal.h: Declare main_thread. diff --git a/src/macterm.c b/src/macterm.c index 4e3b0ae1b65..ca15d3c4965 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -5976,7 +5976,7 @@ mac_to_x_fontname (name, size, style, scriptcode, encoding_base) strcpy(cs, "mac-cyrillic"); break; case kTextEncodingMacCentralEurRoman: - strcpy(cs, "mac-centraleuropean"); + strcpy(cs, "mac-centraleurroman"); break; case kTextEncodingMacSymbol: case kTextEncodingMacDingbats: @@ -6034,7 +6034,7 @@ x_font_name_to_mac_font_name (char *xf, char *mf) coding_system = Qeuc_kr; else if (strcmp (cs, "mac-roman") == 0 || strcmp (cs, "mac-cyrillic") == 0 - || strcmp (cs, "mac-centraleuropean") == 0 + || strcmp (cs, "mac-centraleurroman") == 0 || strcmp (cs, "adobe-fontspecific") == 0) strcpy (mf, family); else @@ -6275,6 +6275,28 @@ static int xlfd_scalable_fields[] = -1 }; +static Lisp_Object +mac_c_string_match (regexp, string, nonspecial, exact) + Lisp_Object regexp; + const char *string, *nonspecial; + int exact; +{ + if (exact) + { + if (strcmp (string, nonspecial) == 0) + return build_string (string); + } + else if (strstr (string, nonspecial)) + { + Lisp_Object str = build_string (string); + + if (fast_string_match (regexp, str) >= 0) + return str; + } + + return Qnil; +} + static Lisp_Object mac_do_list_fonts (pattern, maxnames) char *pattern; @@ -6286,6 +6308,8 @@ mac_do_list_fonts (pattern, maxnames) char scaled[256]; char *ptr; int scl_val[XLFD_SCL_LAST], *field, *val; + char *longest_start, *cur_start, *nonspecial; + int longest_len, cur_len, exact; for (i = 0; i < XLFD_SCL_LAST; i++) scl_val[i] = -1; @@ -6343,34 +6367,66 @@ mac_do_list_fonts (pattern, maxnames) ptr = regex; *ptr++ = '^'; - /* Turn pattern into a regexp and do a regexp match. */ + longest_start = cur_start = ptr; + longest_len = cur_len = 0; + exact = 1; + + /* Turn pattern into a regexp and do a regexp match. Also find the + longest substring containing no special characters. */ for (; *pattern; pattern++) { - if (*pattern == '?') - *ptr++ = '.'; - else if (*pattern == '*') - { - *ptr++ = '.'; - *ptr++ = '*'; - } + if (*pattern == '?' || *pattern == '*') + { + if (cur_len > longest_len) + { + longest_start = cur_start; + longest_len = cur_len; + } + cur_len = 0; + exact = 0; + + if (*pattern == '?') + *ptr++ = '.'; + else /* if (*pattern == '*') */ + { + *ptr++ = '.'; + *ptr++ = '*'; + } + } else - *ptr++ = tolower (*pattern); + { + if (cur_len == 0) + cur_start = ptr; + cur_len++; + + *ptr++ = tolower (*pattern); + } } + + if (cur_len > longest_len) + { + longest_start = cur_start; + longest_len = cur_len; + } + *ptr = '$'; *(ptr + 1) = '\0'; + nonspecial = xmalloc (longest_len + 1); + strncpy (nonspecial, longest_start, longest_len); + nonspecial[longest_len] = '\0'; + pattern_regex = build_string (regex); for (i = 0; i < font_name_count; i++) { - fontname = build_string (font_name_table[i]); - if (fast_string_match (pattern_regex, fontname) >= 0) + fontname = mac_c_string_match (pattern_regex, font_name_table[i], + nonspecial, exact); + if (!NILP (fontname)) { font_list = Fcons (fontname, font_list); - - n_fonts++; - if (maxnames > 0 && n_fonts >= maxnames) - break; + if (exact || maxnames > 0 && ++n_fonts >= maxnames) + return font_list; } else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) @@ -6384,17 +6440,19 @@ mac_do_list_fonts (pattern, maxnames) scl_val[XLFD_SCL_POINT_SIZE], scl_val[XLFD_SCL_AVGWIDTH], ptr + sizeof ("-0-0-75-75-m-0-") - 1); - fontname = build_string (scaled); - if (fast_string_match (pattern_regex, fontname) >= 0) + fontname = mac_c_string_match (pattern_regex, scaled, + nonspecial, exact); + if (!NILP (fontname)) { font_list = Fcons (fontname, font_list); - - n_fonts++; - if (maxnames > 0 && n_fonts >= maxnames) - break; + if (exact || maxnames > 0 && ++n_fonts >= maxnames) + return font_list; } } } + + xfree (nonspecial); + return font_list; } From 4edf8c0418eddf5b1b64174838a0797eac557617 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 19 Dec 2004 00:50:28 +0000 Subject: [PATCH 065/104] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40a11a935cf..d759b8a74a5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-12-19 Kim F. Storm + + * mouse.el (mouse-1-click-follows-link): Doc fix. + 2004-12-18 YAMAMOTO Mitsuharu * term/mac-win.el (encoding-vector, mac-font-encoder-list) From 787e24c303f452b32c40f20e66d290f02e1e6fe1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 19 Dec 2004 00:50:51 +0000 Subject: [PATCH 066/104] (mouse-1-click-follows-link): Doc fix. --- lisp/mouse.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index e525c9921e2..91e2e4ae5c6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -50,17 +50,17 @@ :group 'mouse) (defcustom mouse-1-click-follows-link 350 - "Non-nil means that clicking mouse-1 on a link follows the link. + "Non-nil means that clicking Mouse-1 on a link follows the link. -With the default setting, an ordinary mouse-1 click on a link -performs the same action as mouse-2 on that link, while a longer -mouse-1 click \(hold down the mouse-1 button for more than 350 -milliseconds) performs the original mouse-1 binding \(which +With the default setting, an ordinary Mouse-1 click on a link +performs the same action as Mouse-2 on that link, while a longer +Mouse-1 click \(hold down the Mouse-1 button for more than 350 +milliseconds) performs the original Mouse-1 binding \(which typically sets point where you click the mouse). If value is an integer, the time elapsed between pressing and releasing the mouse button determines whether to follow the link -or perform the normal mouse-1 action (typically set point). +or perform the normal Mouse-1 action (typically set point). The absolute numeric value specifices the maximum duration of a \"short click\" in milliseconds. A positive value means that a short click follows the link, and a longer click performs the @@ -68,7 +68,7 @@ normal action. A negative value gives the opposite behaviour. If value is `double', a double click follows the link. -Otherwise, a single mouse-1 click unconditionally follows the link. +Otherwise, a single Mouse-1 click unconditionally follows the link. Note that dragging the mouse never follows the link. From a1a6b4285004e53f826a89fd618799669ecad84c Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 19 Dec 2004 06:59:33 +0000 Subject: [PATCH 067/104] (calcAlg-blank-matching-open): Temporarily adjust the syntax of both delimiters of half-open intervals. --- lisp/calc/calc-aent.el | 52 ++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index c062a822e89..2210435036c 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -410,32 +410,40 @@ T means abort and give an error message.") (exit-minibuffer)))) (defun calcAlg-blink-matching-open () - (let ((oldpos (point)) - (blinkpos nil)) + (let ((rightpt (point)) + (leftpt nil) + (rightchar (preceding-char)) + leftchar + rightsyntax + leftsyntax) (save-excursion (condition-case () - (setq blinkpos (scan-sexps oldpos -1)) - (error nil))) - (if (and blinkpos - (> oldpos (1+ (point-min))) - (or (and (= (char-after (1- oldpos)) ?\)) - (= (char-after blinkpos) ?\[)) - (and (= (char-after (1- oldpos)) ?\]) - (= (char-after blinkpos) ?\())) - (save-excursion - (goto-char blinkpos) - (looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)"))) - (let ((saved (aref (syntax-table) (char-after blinkpos)))) - (unwind-protect - (progn - (aset (syntax-table) (char-after blinkpos) - (+ (logand saved 255) - (lsh (char-after (1- oldpos)) 8))) - (blink-matching-open)) - (aset (syntax-table) (char-after blinkpos) saved))) + (setq leftpt (scan-sexps rightpt -1) + leftchar (char-after leftpt)) + (error nil))) + (if (and leftpt + (or (and (= rightchar ?\)) + (= leftchar ?\[)) + (and (= rightchar ?\]) + (= leftchar ?\())) + (save-excursion + (goto-char leftpt) + (looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)"))) + (let ((leftsaved (aref (syntax-table) leftchar)) + (rightsaved (aref (syntax-table) rightchar))) + (unwind-protect + (progn + (cond ((= leftchar ?\[) + (aset (syntax-table) leftchar (cons 4 ?\))) + (aset (syntax-table) rightchar (cons 5 ?\[))) + (t + (aset (syntax-table) leftchar (cons 4 ?\])) + (aset (syntax-table) rightchar (cons 5 ?\()))) + (blink-matching-open)) + (aset (syntax-table) leftchar leftsaved) + (aset (syntax-table) rightchar rightsaved))) (blink-matching-open)))) - (defun calc-alg-digit-entry () (calc-alg-entry (cond ((eq last-command-char ?e) From 9ee7410d905fbcaaea7a2d1f91aff36e5f042e9c Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 19 Dec 2004 07:28:04 +0000 Subject: [PATCH 068/104] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d759b8a74a5..9c4ca4ad949 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-12-19 Jay Belanger + + * calc/calc-aent.el (calcAlg-blank-matching-open): + Temporarily adjust the syntax of both delimiters of half-open + intervals. + 2004-12-19 Kim F. Storm * mouse.el (mouse-1-click-follows-link): Doc fix. From 134579f2dadf89fca5d933fd7cb83fd7d3d32c4b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 20 Dec 2004 11:06:54 +0000 Subject: [PATCH 069/104] (re_match_2_internal) : Fix calls to UPDATE_SYNTAX_TABLE_FORWARD. --- src/ChangeLog | 5 +++++ src/regex.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1d4c964a45c..c7af7651f6c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-20 Richard M. Stallman + + * regex.c (re_match_2_internal) : + Fix calls to UPDATE_SYNTAX_TABLE_FORWARD. + 2004-12-18 YAMAMOTO Mitsuharu * macterm.c (endif, x_font_name_to_mac_font_name): Use diff --git a/src/regex.c b/src/regex.c index 1009c837dcf..a223f170765 100644 --- a/src/regex.c +++ b/src/regex.c @@ -5860,7 +5860,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) PREFETCH_NOLIMIT (); c2 = RE_STRING_CHAR (d, dend - d); #ifdef emacs - UPDATE_SYNTAX_TABLE_FORWARD (charpos); + UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1); #endif s2 = SYNTAX (c2); @@ -5947,7 +5947,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) PREFETCH_NOLIMIT (); c2 = RE_STRING_CHAR (d, dend - d); #ifdef emacs - UPDATE_SYNTAX_TABLE_FORWARD (charpos); + UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1); #endif s2 = SYNTAX (c2); From 68c690279cf058547bb6898560fc0cab5b522bc1 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Mon, 20 Dec 2004 16:46:17 +0000 Subject: [PATCH 070/104] (mac_do_list_fonts): Fix memory leak --- src/ChangeLog | 4 ++++ src/macterm.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c7af7651f6c..33d6f42799c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-12-20 YAMAMOTO Mitsuharu + + * macterm.c (mac_do_list_fonts): Fix memory leak + 2004-12-20 Richard M. Stallman * regex.c (re_match_2_internal) : diff --git a/src/macterm.c b/src/macterm.c index ca15d3c4965..9dae0b54d70 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -6426,7 +6426,7 @@ mac_do_list_fonts (pattern, maxnames) { font_list = Fcons (fontname, font_list); if (exact || maxnames > 0 && ++n_fonts >= maxnames) - return font_list; + break; } else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) @@ -6446,7 +6446,7 @@ mac_do_list_fonts (pattern, maxnames) { font_list = Fcons (fontname, font_list); if (exact || maxnames > 0 && ++n_fonts >= maxnames) - return font_list; + break; } } } From 8f449c3afd596c3564eeb9f96e29c406163020d5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 20 Dec 2004 18:08:52 +0000 Subject: [PATCH 071/104] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c4ca4ad949..8341f1d4994 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-12-20 Glenn Morris + + * calendar/calendar.el (view-other-diary-entries): Add autoload. + * calendar/diary-lib.el (view-other-diary-entries): Use + current-prefix-arg in interactive spec. + 2004-12-19 Jay Belanger * calc/calc-aent.el (calcAlg-blank-matching-open): From 3b554221139bc71cf608fa56212ec99a971c1c3d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 20 Dec 2004 18:09:22 +0000 Subject: [PATCH 072/104] (view-other-diary-entries): Use current-prefix-arg in interactive spec. --- lisp/calendar/diary-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 679c4b991b6..fdade091ab2 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -80,7 +80,7 @@ Searches for entries that match ARG days, starting with the date indicated by the cursor position in the displayed three-month calendar. D-FILE specifies the file to use as the diary file." (interactive - (list (if arg (prefix-numeric-value arg) 1) + (list (prefix-numeric-value current-prefix-arg) (read-file-name "Enter diary file name: " default-directory nil t))) (let ((diary-file d-file)) (view-diary-entries arg))) From 791b8dea104a192b323e5f0d06a6b2ebf432b9aa Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 20 Dec 2004 18:09:46 +0000 Subject: [PATCH 073/104] (view-other-diary-entries): Add autoload. --- lisp/calendar/calendar.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index aa0b3005fad..88d6aee513f 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1660,6 +1660,13 @@ the date indicated by the cursor position in the displayed three-month calendar." t) +(autoload 'view-other-diary-entries "diary-lib" + "Prepare and display buffer of diary entries from an alternative diary file. +Searches for entries that match ARG days, starting with the date indicated +by the cursor position in the displayed three-month calendar. +D-FILE specifies the file to use as the diary file." + t) + (autoload 'calendar-sunrise-sunset "solar" "Local time of sunrise and sunset for date under cursor." t) From e9a2654a9d026fede690ab753227f1210f8c2f4f Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 20 Dec 2004 20:02:10 +0000 Subject: [PATCH 074/104] (Types Tutorial): Emphasized that you can't divide by 0. --- man/ChangeLog | 5 +++++ man/calc.texi | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index b96026759a1..3b6507e6b78 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2004-12-20 Jay Belanger + + * calc.texi (Types Tutorial): Emphasized that you can't divide by + zero. + 2004-12-17 Luc Teirlinck * cc-mode.texi (Text Filling and Line Breaking): Put period after diff --git a/man/calc.texi b/man/calc.texi index 8dfa75c6ded..8260ed10350 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -4757,10 +4757,11 @@ or 24 hours. @end smallexample @noindent -In this last step, Calc has found a new number which, when multiplied -by 5 modulo 24, produces the original number, 21. If @var{m} is prime -it is always possible to find such a number. For non-prime @var{m} -like 24, it is only sometimes possible. +In this last step, Calc has divided by 5 modulo 24; i.e., it has found a +new number which, when multiplied by 5 modulo 24, produces the original +number, 21. If @var{m} is prime and the divisor is not a multiple of +@var{m}, it is always possible to find such a number. For non-prime +@var{m} like 24, it is only sometimes possible. @smallexample @group From 3c7e66a8a779703a4dccad2be562f0073e44f966 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:30:31 +0000 Subject: [PATCH 075/104] (Fgarbage_collect): Update call to truncate_undo_list. Call that at the very start. (undo_limit, undo_strong_limit, undo_outer_limit): To undo.c. (syms_of_alloc): Don't define undo-limit, undo-strong-limit and undo-outer-limit here. --- src/alloc.c | 104 +++++++++++++++++++--------------------------------- 1 file changed, 37 insertions(+), 67 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index 5038fdfce10..83de92520c4 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -200,12 +200,6 @@ extern #endif /* VIRT_ADDR_VARIES */ int malloc_sbrk_unused; -/* Two limits controlling how much undo information to keep. */ - -EMACS_INT undo_limit; -EMACS_INT undo_strong_limit; -EMACS_INT undo_outer_limit; - /* Number of live and free conses etc. */ static int total_conses, total_markers, total_symbols, total_vector_size; @@ -4644,13 +4638,48 @@ returns nil, because real GC can't be done. */) if (abort_on_gc) abort (); - EMACS_GET_TIME (t1); - /* Can't GC if pure storage overflowed because we can't determine if something is a pure object or not. */ if (pure_bytes_used_before_overflow) return Qnil; + /* Don't keep undo information around forever. + Do this early on, so it is no problem if the user quits. */ + { + register struct buffer *nextb = all_buffers; + + while (nextb) + { + /* If a buffer's undo list is Qt, that means that undo is + turned off in that buffer. Calling truncate_undo_list on + Qt tends to return NULL, which effectively turns undo back on. + So don't call truncate_undo_list if undo_list is Qt. */ + if (! EQ (nextb->undo_list, Qt)) + truncate_undo_list (nextb); + + /* Shrink buffer gaps, but skip indirect and dead buffers. */ + if (nextb->base_buffer == 0 && !NILP (nextb->name)) + { + /* If a buffer's gap size is more than 10% of the buffer + size, or larger than 2000 bytes, then shrink it + accordingly. Keep a minimum size of 20 bytes. */ + int size = min (2000, max (20, (nextb->text->z_byte / 10))); + + if (nextb->text->gap_size > size) + { + struct buffer *save_current = current_buffer; + current_buffer = nextb; + make_gap (-(nextb->text->gap_size - size)); + current_buffer = save_current; + } + } + + nextb = nextb->next; + } + } + + EMACS_GET_TIME (t1); + /* In case user calls debug_print during GC, don't let that cause a recursive GC. */ consing_since_gc = 0; @@ -4689,42 +4718,6 @@ returns nil, because real GC can't be done. */) shrink_regexp_cache (); - /* Don't keep undo information around forever. */ - { - register struct buffer *nextb = all_buffers; - - while (nextb) - { - /* If a buffer's undo list is Qt, that means that undo is - turned off in that buffer. Calling truncate_undo_list on - Qt tends to return NULL, which effectively turns undo back on. - So don't call truncate_undo_list if undo_list is Qt. */ - if (! EQ (nextb->undo_list, Qt)) - nextb->undo_list - = truncate_undo_list (nextb->undo_list, undo_limit, - undo_strong_limit, undo_outer_limit); - - /* Shrink buffer gaps, but skip indirect and dead buffers. */ - if (nextb->base_buffer == 0 && !NILP (nextb->name)) - { - /* If a buffer's gap size is more than 10% of the buffer - size, or larger than 2000 bytes, then shrink it - accordingly. Keep a minimum size of 20 bytes. */ - int size = min (2000, max (20, (nextb->text->z_byte / 10))); - - if (nextb->text->gap_size > size) - { - struct buffer *save_current = current_buffer; - current_buffer = nextb; - make_gap (-(nextb->text->gap_size - size)); - current_buffer = save_current; - } - } - - nextb = nextb->next; - } - } - gc_in_progress = 1; /* clear_marks (); */ @@ -5999,29 +5992,6 @@ prevent garbage collection during a part of the program. */); doc: /* Non-nil means loading Lisp code in order to dump an executable. This means that certain objects should be allocated in shared (pure) space. */); - DEFVAR_INT ("undo-limit", &undo_limit, - doc: /* Keep no more undo information once it exceeds this size. -This limit is applied when garbage collection happens. -The size is counted as the number of bytes occupied, -which includes both saved text and other data. */); - undo_limit = 20000; - - DEFVAR_INT ("undo-strong-limit", &undo_strong_limit, - doc: /* Don't keep more than this much size of undo information. -A previous command which pushes the undo list past this size -is entirely forgotten when GC happens. -The size is counted as the number of bytes occupied, -which includes both saved text and other data. */); - undo_strong_limit = 30000; - - DEFVAR_INT ("undo-outer-limit", &undo_outer_limit, - doc: /* Don't keep more than this much size of undo information. -If the current command has produced more than this much undo information, -GC discards it. This is a last-ditch limit to prevent memory overflow. -The size is counted as the number of bytes occupied, -which includes both saved text and other data. */); - undo_outer_limit = 300000; - DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages, doc: /* Non-nil means display messages at start and end of garbage collection. */); garbage_collection_messages = 0; From 137e23eabdbee787601e927b48d4c0e714e5f192 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:31:24 +0000 Subject: [PATCH 076/104] (truncate_undo_list): Return void. Take just one argument, the buffer. Make it current, and inhibit recursive GC. Access and update the undo list directly; return void. Refer to the undo...limit variables directly. Test undo_outer_limit only after counting the whole current command. When it's exceeded, call the function in undo-outer-limit-function. (undo_limit, undo_strong_limit, undo_outer_limit): Moved from alloc.c. (Vundo_outer_limit_function): New variable. (syms_of_undo): Define undo-limit, undo-strong-limit and undo-outer-limit here, and undo-outer-limit-function. Doc fixes. --- src/undo.c | 152 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 118 insertions(+), 34 deletions(-) diff --git a/src/undo.c b/src/undo.c index 9fdc46a3b13..d2f89c36a2a 100644 --- a/src/undo.c +++ b/src/undo.c @@ -24,6 +24,16 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "commands.h" +/* Limits controlling how much undo information to keep. */ + +EMACS_INT undo_limit; +EMACS_INT undo_strong_limit; +EMACS_INT undo_outer_limit; + +/* Function to call when undo_outer_limit is exceeded. */ + +Lisp_Object Vundo_outer_limit_function; + /* Last buffer for which undo information was recorded. */ Lisp_Object last_undo_buffer; @@ -291,31 +301,35 @@ but another undo command will undo to the previous boundary. */) } /* At garbage collection time, make an undo list shorter at the end, - returning the truncated list. - MINSIZE, MAXSIZE and LIMITSIZE are the limits on size allowed, - as described below. - In practice, these are the values of undo-limit, - undo-strong-limit, and undo-outer-limit. */ + returning the truncated list. How this is done depends on the + variables undo-limit, undo-strong-limit and undo-outer-limit. + In some cases this works by calling undo-outer-limit-function. */ -Lisp_Object -truncate_undo_list (list, minsize, maxsize, limitsize) - Lisp_Object list; - int minsize, maxsize, limitsize; +void +truncate_undo_list (b) + struct buffer *b; { + Lisp_Object list; Lisp_Object prev, next, last_boundary; int size_so_far = 0; + /* Make sure that calling undo-outer-limit-function + won't cause another GC. */ + int count = inhibit_garbage_collection (); + + /* Make the buffer current to get its local values of variables such + as undo_limit. Also so that Vundo_outer_limit_function can + tell which buffer to operate on. */ + record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); + set_buffer_internal (b); + + list = b->undo_list; + prev = Qnil; next = list; last_boundary = Qnil; - /* Always preserve at least the most recent undo record - unless it is really horribly big. - If the first element is an undo boundary, skip past it. - - Skip, skip, skip the undo, skip, skip, skip the undo, - Skip, skip, skip the undo, skip to the undo bound'ry. - (Get it? "Skip to my Loo?") */ + /* If the first element is an undo boundary, skip past it. */ if (CONSP (next) && NILP (XCAR (next))) { /* Add in the space occupied by this element and its chain link. */ @@ -326,6 +340,12 @@ truncate_undo_list (list, minsize, maxsize, limitsize) next = XCDR (next); } + /* Always preserve at least the most recent undo record + unless it is really horribly big. + + Skip, skip, skip the undo, skip, skip, skip the undo, + Skip, skip, skip the undo, skip to the undo bound'ry. */ + while (CONSP (next) && ! NILP (XCAR (next))) { Lisp_Object elt; @@ -341,35 +361,52 @@ truncate_undo_list (list, minsize, maxsize, limitsize) + SCHARS (XCAR (elt))); } - /* If we reach LIMITSIZE before the first boundary, - we're heading for memory full, so truncate the list to nothing. */ - if (size_so_far > limitsize) - return Qnil; - /* Advance to next element. */ prev = next; next = XCDR (next); } + /* If by the first boundary we have already passed undo_outer_limit, + we're heading for memory full, so offer to clear out the list. */ + if (size_so_far > undo_outer_limit + && !NILP (Vundo_outer_limit_function)) + { + Lisp_Object temp = last_undo_buffer; + + /* Normally the function this calls is undo-outer-limit-truncate. */ + if (! NILP (call1 (Vundo_outer_limit_function, + make_number (size_so_far)))) + { + /* The function is responsible for making + any desired changes in buffer-undo-list. */ + unbind_to (count, Qnil); + return; + } + /* That function probably used the minibuffer, and if so, that + changed last_undo_buffer. Change it back so that we don't + force next change to make an undo boundary here. */ + last_undo_buffer = temp; + } + if (CONSP (next)) last_boundary = prev; - /* Keep more if it fits. */ + /* Keep additional undo data, if it fits in the limits. */ while (CONSP (next)) { Lisp_Object elt; elt = XCAR (next); /* When we get to a boundary, decide whether to truncate - either before or after it. The lower threshold, MINSIZE, + either before or after it. The lower threshold, undo_limit, tells us to truncate after it. If its size pushes past - the higher threshold MAXSIZE as well, we truncate before it. */ + the higher threshold undo_strong_limit, we truncate before it. */ if (NILP (elt)) { - if (size_so_far > maxsize) + if (size_so_far > undo_strong_limit) break; last_boundary = prev; - if (size_so_far > minsize) + if (size_so_far > undo_limit) break; } @@ -390,16 +427,15 @@ truncate_undo_list (list, minsize, maxsize, limitsize) /* If we scanned the whole list, it is short enough; don't change it. */ if (NILP (next)) - return list; - + ; /* Truncate at the boundary where we decided to truncate. */ - if (!NILP (last_boundary)) - { - XSETCDR (last_boundary, Qnil); - return list; - } + else if (!NILP (last_boundary)) + XSETCDR (last_boundary, Qnil); + /* There's nothing we decided to keep, so clear it out. */ else - return Qnil; + b->undo_list = Qnil; + + unbind_to (count, Qnil); } DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0, @@ -563,6 +599,54 @@ syms_of_undo () defsubr (&Sprimitive_undo); defsubr (&Sundo_boundary); + + DEFVAR_INT ("undo-limit", &undo_limit, + doc: /* Keep no more undo information once it exceeds this size. +This limit is applied when garbage collection happens. +When a previous command increases the total undo list size past this +value, the earlier commands that came before it are forgotten. + +The size is counted as the number of bytes occupied, +which includes both saved text and other data. */); + undo_limit = 20000; + + DEFVAR_INT ("undo-strong-limit", &undo_strong_limit, + doc: /* Don't keep more than this much size of undo information. +This limit is applied when garbage collection happens. +When a previous command increases the total undo list size past this +value, that command and the earlier commands that came before it are forgotten. +However, the most recent buffer-modifying command's undo info +is never discarded for this reason. + +The size is counted as the number of bytes occupied, +which includes both saved text and other data. */); + undo_strong_limit = 30000; + + DEFVAR_INT ("undo-outer-limit", &undo_outer_limit, + doc: /* Outer limit on size of undo information for one command. +At garbage collection time, if the current command has produced +more than this much undo information, it asks you whether to delete +the information. This is a last-ditch limit to prevent memory overflow. + +The size is counted as the number of bytes occupied, +which includes both saved text and other data. + +In fact, this calls the function which is the value of +`undo-outer-limit-function' with one argument, the size. +The text above describes the behavior of the function +that variable usually specifies. */); + undo_outer_limit = 300000; + + DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, + doc: /* Function to call when an undo list exceeds `undo-outer-limit'. +This function is called with one argument, the current undo list size +for the most recent command (since the last undo boundary). +If the function returns t, that means truncation has been fully handled. +If it returns nil, the other forms of truncation are done. + +Garbage collection is inhibited around the call to this function, +so it must make sure not to do a lot of consing. */); + Vundo_outer_limit_function = Qnil; } /* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a From f10fffca3fb90b39d12f806a1038b12c5b610c84 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:32:07 +0000 Subject: [PATCH 077/104] (truncate_undo_list): Update decl. --- src/lisp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lisp.h b/src/lisp.h index 3dddd6179b2..754356689d9 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3049,7 +3049,7 @@ extern void syms_of_macros P_ ((void)); /* defined in undo.c */ extern Lisp_Object Qinhibit_read_only; EXFUN (Fundo_boundary, 0); -extern Lisp_Object truncate_undo_list P_ ((Lisp_Object, int, int, int)); +extern void truncate_undo_list P_ ((struct buffer *)); extern void record_marker_adjustment P_ ((Lisp_Object, int)); extern void record_insert P_ ((int, int)); extern void record_delete P_ ((int, Lisp_Object)); From 75fa7206f08d2b34f8e53c681a2423abe12e12c3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:33:16 +0000 Subject: [PATCH 078/104] (Fread_file_name): Delete duplicates in file-name-history when history_delete_duplicates is true. --- src/fileio.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index aa37c296eb3..d58c49d2825 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -228,6 +228,8 @@ extern int minibuf_level; extern int minibuffer_auto_raise; +extern int history_delete_duplicates; + /* These variables describe handlers that have "already" had a chance to handle the current operation. @@ -6383,7 +6385,13 @@ and `read-file-name-function'. */) if (replace_in_history) /* Replace what Fcompleting_read added to the history with what we will actually return. */ - XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val)); + { + Lisp_Object val1 = double_dollars (val); + tem = Fsymbol_value (Qfile_name_history); + if (history_delete_duplicates) + XSETCDR (tem, Fdelete (val1, XCDR(tem))); + XSETCAR (tem, val1); + } else if (add_to_history) { /* Add the value to the history--but not if it matches @@ -6391,8 +6399,10 @@ and `read-file-name-function'. */) Lisp_Object val1 = double_dollars (val); tem = Fsymbol_value (Qfile_name_history); if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) - Fset (Qfile_name_history, - Fcons (val1, tem)); + { + if (history_delete_duplicates) tem = Fdelete (val1, tem); + Fset (Qfile_name_history, Fcons (val1, tem)); + } } return val; From 69bbd6bd04990994a53994c78d0184118e898d79 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:33:57 +0000 Subject: [PATCH 079/104] (unwind_to_catch): Clear immediate_quit. --- src/eval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/eval.c b/src/eval.c index 879f916aa46..df528e3da80 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1178,6 +1178,7 @@ unwind_to_catch (catch, value) set_poll_suppress_count (catch->poll_suppress_count); interrupt_input_blocked = catch->interrupt_input_blocked; handling_signal = 0; + immediate_quit = 0; do { From 85e7f4776aa861a7e1fe994a787987ea923a6936 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:34:42 +0000 Subject: [PATCH 080/104] (kbd_buffer_store_event_hold): In the code for while-no-input, handle immediate_quit. --- src/keyboard.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index ffd36acb335..f5ca087227d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3711,13 +3711,23 @@ kbd_buffer_store_event_hold (event, hold_quit) ++kbd_store_ptr; } - /* If we're in a section that requested to be interrupted as soon - as input comes, then set quit-flag to cause an interrupt. */ + /* If we're inside while-no-input, and this event qualifies + as input, set quit-flag to cause an interrupt. */ if (!NILP (Vthrow_on_input) && event->kind != FOCUS_IN_EVENT && event->kind != HELP_EVENT && event->kind != DEICONIFY_EVENT) - Vquit_flag = Vthrow_on_input; + { + Vquit_flag = Vthrow_on_input; + /* If we're inside a function that wants immediate quits, + do it now. */ + if (immediate_quit && NILP (Vinhibit_quit)) + { + immediate_quit = 0; + sigfree (); + QUIT; + } + } } From 6df99033c1ecff7d094f41ef91145cebfc5375f7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:35:18 +0000 Subject: [PATCH 081/104] (get_next_display_element): Display codes 8a0 and 8ad specially as `\ ' and `\-'. --- src/xdisp.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index b27b5e2e744..2b97866592e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4915,7 +4915,9 @@ get_next_display_element (it) || (it->multibyte_p ? ((it->c >= 127 && it->len == 1) - || !CHAR_PRINTABLE_P (it->c)) + || !CHAR_PRINTABLE_P (it->c) + || it->c == 0x8ad + || it->c == 0x8a0) : (it->c >= 127 && (!unibyte_display_via_language_environment || it->c == unibyte_char_to_multibyte (it->c))))) @@ -4958,6 +4960,21 @@ get_next_display_element (it) XSETINT (it->ctl_chars[1], g); ctl_len = 2; } + else if (it->c == 0x8a0 || it->c == 0x8ad) + { + /* Set IT->ctl_chars[0] to the glyph for `\\'. */ + if (it->dp + && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) + && GLYPH_CHAR_VALID_P (XINT (DISP_ESCAPE_GLYPH (it->dp)))) + g = XINT (DISP_ESCAPE_GLYPH (it->dp)); + else + g = FAST_MAKE_GLYPH ('\\', face_id); + XSETINT (it->ctl_chars[0], g); + + g = FAST_MAKE_GLYPH (it->c == 0x8ad ? '-' : ' ', face_id); + XSETINT (it->ctl_chars[1], g); + ctl_len = 2; + } else { unsigned char str[MAX_MULTIBYTE_LENGTH]; From d2acc90a44d940a97134dea2a4c9c1a19ccc06da Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:37:25 +0000 Subject: [PATCH 082/104] (escape-glyph): Use blue against light foreground. --- lisp/faces.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 55ed31fa6b0..b215d25bf21 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2031,8 +2031,8 @@ Note: Other faces cannot inherit from the cursor face." (defface escape-glyph '((((background dark)) :foreground "cyan") (((type pc)) :foreground "magenta") - (t :foreground "dark blue")) - "Face for displaying \\ and ^ in multichar glyphs." + (t :foreground "blue")) + "Face for characters displayed as ^-sequences or \-sequences." :group 'basic-faces) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From b6e8e8e55dba10595b059df3638a85b10c3d3d1f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:37:52 +0000 Subject: [PATCH 083/104] (undo-outer-limit-truncate): New function. (undo-outer-limit-function): Use undo-outer-limit-truncate. --- lisp/simple.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index 3c9e8c72428..9f1bde393ee 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1484,6 +1484,17 @@ is not *inside* the region START...END." (t '(0 . 0))) '(0 . 0))) + +;; When the first undo batch in an undo list is longer than undo-outer-limit, +;; this function gets called to ask the user what to do. +;; Garbage collection is inhibited around the call, +;; so it had better not do a lot of consing. +(setq undo-outer-limit-function 'undo-outer-limit-truncate) +(defun undo-outer-limit-truncate (size) + (if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " + (buffer-name) size)) + (progn (setq buffer-undo-list nil) t) + nil)) (defvar shell-command-history nil "History list for some commands that read shell commands.") From 761d3eb391b4b58f121ef624b3e0c720f4470c9f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:38:36 +0000 Subject: [PATCH 084/104] (calculator-radix-grouping-mode) (calculator-radix-grouping-digits) (calculator-radix-grouping-separator): New defcustoms for the new radix grouping mode functionality. (calculator-mode-hook): Now used in electric mode too. (calculator-mode-map): Some new keys. (calculator-message): New function. Some new calls. (calculator-string-to-number): New function, (calculator-curnum-value): Use it. (calculator-rotate-displayer, calculator-rotate-displayer-back) (calculator-displayer-prev, calculator-displayer-next): Change digit group size when in radix mode. (calculator-number-to-string): Renamed from calculator-num-to-string. Now deals with digit grouping in radix mode. --- lisp/calculator.el | 220 +++++++++++++++++++++++++++++---------------- 1 file changed, 144 insertions(+), 76 deletions(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index a9410ae961c..76ff4053c7f 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -4,6 +4,7 @@ ;; Author: Eli Barzilay ;; Keywords: tools, convenience +;; Time-stamp: <2002-07-13 01:14:35 eli> ;; This file is part of GNU Emacs. @@ -100,6 +101,20 @@ at runtime." :type 'integer :group 'calculator) +(defcustom calculator-radix-grouping-mode t + "*Use digit grouping in radix output mode. +If this is set, chunks of `calculator-radix-grouping-digits' characters +will be separated by `calculator-radix-grouping-separator' when in radix +output mode is active (determined by `calculator-output-radix').") + +(defcustom calculator-radix-grouping-digits 4 + "*The number of digits used for grouping display in radix modes. +See `calculator-radix-grouping-mode'.") + +(defcustom calculator-radix-grouping-separator "'" + "*The separator used in radix grouping display. +See `calculator-radix-grouping-mode'.") + (defcustom calculator-remove-zeros t "*Non-nil value means delete all redundant zero decimal digits. If this value is not t, and not nil, redundant zeros are removed except @@ -163,7 +178,11 @@ Otherwise show as a negative number." :group 'calculator) (defcustom calculator-mode-hook nil - "*List of hook functions for `calculator-mode' to run." + "*List of hook functions for `calculator-mode' to run. +Note: if `calculator-electric-mode' is on, then this hook will get +activated in the minibuffer - in that case it should not do much more +than local key settings and other effects that will change things +outside the scope of calculator related code." :type 'hook :group 'calculator) @@ -387,7 +406,7 @@ Used for repeating operations in calculator-repR/L.") "oD" "oH" "oX" "oO" "oB") (calculator-rotate-displayer "'") (calculator-rotate-displayer-back "\"") - (calculator-displayer-pref "{") + (calculator-displayer-prev "{") (calculator-displayer-next "}") (calculator-saved-up [up] [?\C-p]) (calculator-saved-down [down] [?\C-n]) @@ -399,10 +418,10 @@ Used for repeating operations in calculator-repR/L.") (calculator-save-and-quit [(control return)] [(control kp-enter)]) (calculator-paste [insert] [(shift insert)] - [mouse-2]) + [paste] [mouse-2] [?\C-y]) (calculator-clear [delete] [?\C-?] [?\C-d]) (calculator-help [?h] [??] [f1] [help]) - (calculator-copy [(control insert)]) + (calculator-copy [(control insert)] [copy]) (calculator-backspace [backspace]) ))) (while p @@ -536,7 +555,7 @@ Used for repeating operations in calculator-repR/L.") ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors) "---" ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors))) - ("Decimal Dislpay" + ("Decimal Display" ,@(mapcar (lambda (d) (vector (cadr d) ;; Note: inserts actual object here @@ -611,10 +630,11 @@ The prompt indicates the current modes: * \"=?\": (? is B/O/H) the display radix (when input is decimal); * \"??\": (? is D/B/O/H) 1st char for input radix, 2nd for display. -Also, the quote character can be used to switch display modes for -decimal numbers (double-quote rotates back), and the two brace -characters (\"{\" and \"}\" change display parameters that these -displayers use (if they handle such). +Also, the quote key can be used to switch display modes for decimal +numbers (double-quote rotates back), and the two brace characters +\(\"{\" and \"}\" change display parameters that these displayers use (if +they handle such). If output is using any radix mode, then these keys +toggle digit grouping mode and the chunk size. Values can be saved for future reference in either a list of saved values, or in registers. @@ -683,6 +703,7 @@ See the documentation for `calculator-mode' for more information." (setq calculator-saved-global-map (current-global-map)) (use-local-map nil) (use-global-map calculator-mode-map) + (run-hooks 'calculator-mode-hook) (unwind-protect (catch 'calculator-done (Electric-command-loop @@ -717,6 +738,12 @@ See the documentation for `calculator-mode' for more information." (if (and calculator-restart-other-mode calculator-electric-mode) (calculator))) +(defun calculator-message (string &rest arguments) + "Same as `message', but special handle of electric mode." + (apply 'message string arguments) + (if calculator-electric-mode + (progn (sit-for 1) (message nil)))) + ;;;--------------------------------------------------------------------- ;;; Operators @@ -818,82 +845,116 @@ The string is set not to exceed the screen width." (concat calculator-prompt (substring prompt (+ trim (length calculator-prompt))))))) -(defun calculator-curnum-value () - "Get the numeric value of the displayed number string as a float." +(defun calculator-string-to-number (str) + "Convert the given STR to a number, according to the value of +`calculator-input-radix'." (if calculator-input-radix (let ((radix (cdr (assq calculator-input-radix '((bin . 2) (oct . 8) (hex . 16))))) - (i -1) (value 0)) - ;; assume valid input (upcased & characters in range) - (while (< (setq i (1+ i)) (length calculator-curnum)) - (setq value - (+ (let ((ch (aref calculator-curnum i))) - (- ch (if (<= ch ?9) ?0 (- ?A 10)))) - (* radix value)))) + (i -1) (value 0) (new-value 0)) + ;; assume mostly valid input (e.g., characters in range) + (while (< (setq i (1+ i)) (length str)) + (setq new-value + (let* ((ch (upcase (aref str i))) + (n (cond ((< ch ?0) nil) + ((<= ch ?9) (- ch ?0)) + ((< ch ?A) nil) + ((<= ch ?Z) (- ch (- ?A 10))) + (t nil)))) + (if (and n (<= 0 n) (< n radix)) + (+ n (* radix value)) + (progn + (calculator-message + "Warning: Ignoring bad input character `%c'." ch) + (sit-for 1) + value)))) + (if (if (< new-value 0) (> value 0) (< value 0)) + (calculator-message "Warning: Overflow in input.")) + (setq value new-value)) value) - (car - (read-from-string - (cond - ((equal "." calculator-curnum) - "0.0") - ((string-match "[eE][+-]?$" calculator-curnum) - (concat calculator-curnum "0")) - ((string-match "\\.[0-9]\\|[eE]" calculator-curnum) - calculator-curnum) - ((string-match "\\." calculator-curnum) - ;; do this because Emacs reads "23." as an integer - (concat calculator-curnum "0")) - ((stringp calculator-curnum) - (concat calculator-curnum ".0")) - (t "0.0")))))) + (car (read-from-string + (cond ((equal "." str) "0.0") + ((string-match "[eE][+-]?$" str) (concat str "0")) + ((string-match "\\.[0-9]\\|[eE]" str) str) + ((string-match "\\." str) + ;; do this because Emacs reads "23." as an integer + (concat str "0")) + ((stringp str) (concat str ".0")) + (t "0.0")))))) + +(defun calculator-curnum-value () + "Get the numeric value of the displayed number string as a float." + (calculator-string-to-number calculator-curnum)) (defun calculator-rotate-displayer (&optional new-disp) "Switch to the next displayer on the `calculator-displayers' list. Can be called with an optional argument NEW-DISP to force rotation to -that argument." +that argument. +If radix output mode is active, toggle digit grouping." (interactive) - (setq calculator-displayers - (if (and new-disp (memq new-disp calculator-displayers)) - (let ((tmp nil)) - (while (not (eq (car calculator-displayers) new-disp)) - (setq tmp (cons (car calculator-displayers) tmp)) - (setq calculator-displayers (cdr calculator-displayers))) - (setq calculator-displayers - (nconc calculator-displayers (nreverse tmp)))) - (nconc (cdr calculator-displayers) - (list (car calculator-displayers))))) - (message "Using %s." (cadr (car calculator-displayers))) - (if calculator-electric-mode - (progn (sit-for 1) (message nil))) + (cond + (calculator-output-radix + (setq calculator-radix-grouping-mode + (not calculator-radix-grouping-mode)) + (calculator-message + "Digit grouping mode %s." + (if calculator-radix-grouping-mode "ON" "OFF"))) + (t + (setq calculator-displayers + (if (and new-disp (memq new-disp calculator-displayers)) + (let ((tmp nil)) + (while (not (eq (car calculator-displayers) new-disp)) + (setq tmp (cons (car calculator-displayers) tmp)) + (setq calculator-displayers + (cdr calculator-displayers))) + (setq calculator-displayers + (nconc calculator-displayers (nreverse tmp)))) + (nconc (cdr calculator-displayers) + (list (car calculator-displayers))))) + (calculator-message + "Using %s." (cadr (car calculator-displayers))))) (calculator-enter)) (defun calculator-rotate-displayer-back () - "Like `calculator-rotate-displayer', but rotates modes back." + "Like `calculator-rotate-displayer', but rotates modes back. +If radix output mode is active, toggle digit grouping." (interactive) (calculator-rotate-displayer (car (last calculator-displayers)))) (defun calculator-displayer-prev () "Send the current displayer function a 'left argument. This is used to modify display arguments (if the current displayer -function supports this)." +function supports this). +If radix output mode is active, increase the grouping size." (interactive) - (and (car calculator-displayers) - (let ((disp (caar calculator-displayers))) - (cond ((symbolp disp) (funcall disp 'left)) - ((and (consp disp) (eq 'std (car disp))) - (calculator-standard-displayer 'left (cadr disp))))))) + (if calculator-output-radix + (progn (setq calculator-radix-grouping-digits + (1+ calculator-radix-grouping-digits)) + (calculator-enter)) + (and (car calculator-displayers) + (let ((disp (caar calculator-displayers))) + (cond + ((symbolp disp) (funcall disp 'left)) + ((and (consp disp) (eq 'std (car disp))) + (calculator-standard-displayer 'left (cadr disp)))))))) (defun calculator-displayer-next () "Send the current displayer function a 'right argument. This is used to modify display arguments (if the current displayer -function supports this)." +function supports this). +If radix output mode is active, decrease the grouping size." (interactive) - (and (car calculator-displayers) - (let ((disp (caar calculator-displayers))) - (cond ((symbolp disp) (funcall disp 'right)) - ((and (consp disp) (eq 'std (car disp))) - (calculator-standard-displayer 'right (cadr disp))))))) + (if calculator-output-radix + (progn (setq calculator-radix-grouping-digits + (max 2 (1- calculator-radix-grouping-digits))) + (calculator-enter)) + (and (car calculator-displayers) + (let ((disp (caar calculator-displayers))) + (cond + ((symbolp disp) (funcall disp 'right)) + ((and (consp disp) (eq 'std (car disp))) + (calculator-standard-displayer 'right (cadr disp)))))))) (defun calculator-remove-zeros (numstr) "Get a number string NUMSTR and remove unnecessary zeroes. @@ -995,7 +1056,7 @@ the 'left or 'right when one of the standard modes is used." (calculator-remove-zeros str)) "e" (number-to-string exp)))))) -(defun calculator-num-to-string (num) +(defun calculator-number-to-string (num) "Convert NUM to a displayable string." (cond ((and (numberp num) calculator-output-radix) @@ -1015,6 +1076,14 @@ the 'left or 'right when one of the standard modes is used." (?6 . "110") (?7 . "111"))))))) (string-match "^0*\\(.+\\)" s) (setq str (match-string 1 s)))) + (if calculator-radix-grouping-mode + (let ((d (/ (length str) calculator-radix-grouping-digits)) + (r (% (length str) calculator-radix-grouping-digits))) + (while (>= (setq d (1- d)) (if (zerop r) 1 0)) + (let ((i (+ r (* d calculator-radix-grouping-digits)))) + (setq str (concat (substring str 0 i) + calculator-radix-grouping-separator + (substring str i))))))) (upcase (if (and (not calculator-2s-complement) (< num 0)) (concat "-" str) @@ -1051,7 +1120,7 @@ If optional argument FORCE is non-nil, don't use the cached string." ;; customizable display for a single value (caar calculator-displayers) calculator-displayer))) - (mapconcat 'calculator-num-to-string + (mapconcat 'calculator-number-to-string (reverse calculator-stack) " ")) " " @@ -1319,9 +1388,8 @@ Optional string argument KEYS will force using it as the keys entered." (if (not (and op (= -1 (calculator-op-arity op)))) ;;(error "Binary operator without a first operand") (progn - (message "Binary operator without a first operand") - (if calculator-electric-mode - (progn (sit-for 1) (message nil))) + (calculator-message + "Binary operator without a first operand") (throw 'op-error nil))))) (calculator-reduce-stack (cond ((eq (nth 1 op) '\() 10) @@ -1334,9 +1402,7 @@ Optional string argument KEYS will force using it as the keys entered." (not (numberp (car calculator-stack))))) ;;(error "Unterminated expression") (progn - (message "Unterminated expression") - (if calculator-electric-mode - (progn (sit-for 1) (message nil))) + (calculator-message "Unterminated expression") (throw 'op-error nil))) (setq calculator-stack (cons op calculator-stack)) (calculator-reduce-stack (calculator-op-prec op)) @@ -1540,7 +1606,7 @@ Optional string argument KEYS will force using it as the keys entered." (setcdr as val) (setq calculator-registers (cons (cons reg val) calculator-registers))) - (message (format "[%c] := %S" reg val)))) + (calculator-message "[%c] := %S" reg val))) (defun calculator-put-value (val) "Paste VAL as if entered. @@ -1552,24 +1618,26 @@ Used by `calculator-paste' and `get-register'." (progn (calculator-clear-fragile) (setq calculator-curnum (let ((calculator-displayer "%S")) - (calculator-num-to-string val))) + (calculator-number-to-string val))) (calculator-update-display)))) (defun calculator-paste () "Paste a value from the `kill-ring'." (interactive) (calculator-put-value - (let ((str (current-kill 0))) - (and calculator-paste-decimals + (let ((str (replace-regexp-in-string + "^ *\\(.+[^ ]\\) *$" "\\1" (current-kill 0)))) + (and (not calculator-input-radix) + calculator-paste-decimals (string-match "\\([0-9]+\\)\\(\\.[0-9]+\\)?\\(e[0-9]+\\)?" str) (or (match-string 1 str) (match-string 2 str) (match-string 3 str)) - (setq str (concat (match-string 1 str) + (setq str (concat (or (match-string 1 str) "0") (or (match-string 2 str) ".0") - (match-string 3 str)))) - (condition-case nil (car (read-from-string str)) + (or (match-string 3 str) "")))) + (condition-case nil (calculator-string-to-number str) (error nil))))) (defun calculator-get-register (reg) @@ -1678,7 +1746,7 @@ To use this, apply a binary operator (evaluate it), then call this." (while (> x 0) (setq r (* r (truncate x))) (setq x (1- x))) - r)) + (+ 0.0 r))) (defun calculator-truncate (n) "Truncate N, return 0 in case of overflow." From a50342391b233e6e32080046dd5fecd5a9654194 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:46:47 +0000 Subject: [PATCH 085/104] (Event Input Misc): Add while-no-input. --- lispref/commands.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lispref/commands.texi b/lispref/commands.texi index 0144123ecb5..85e2953f102 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -2388,6 +2388,18 @@ The alias @code{last-input-char} exists for compatibility with Emacs version 18. @end defvar +@defmac while-no-input body... +This construct runs the @var{body} forms and returns the value +of the last one---but only if no input arrives. If any input +arrives during the execution of the @var{body} forms, it aborts +them (working much like a quit), and the @code{while-no-input} +form returns @code{nil}. + +If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil}, +arrival of input during those parts won't cause an abort until +the end of that part. +@end defmac + @defun discard-input @cindex flush input @cindex discard input From 414ac1a31415c71e56d6aa7d6f6c060a9308c241 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:47:38 +0000 Subject: [PATCH 086/104] *** empty log message *** --- etc/NEWS | 62 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 1ac6aba6de5..f343f563a05 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -98,56 +98,45 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 -** You can now follow links by clicking mouse-1 on the link. +** You can now follow links by clicking Mouse-1 on the link. -Traditionally, Emacs uses a mouse-1 click to set point and a mouse-2 -click to follow a link, whereas most other applications use a mouse-1 +Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2 +click to follow a link, whereas most other applications use a Mouse-1 click for both purposes, depending on whether you click outside or -inside a link. With release 21.4, the behaviour of a mouse-1 click +inside a link. With release 21.4, the behaviour of a Mouse-1 click has been changed to match this context-sentitive dual behaviour. -Depending on the current mode, a mouse-2 click in Emacs may do much -more than just follow a link, so the new mouse-1 behaviour is only +Depending on the current mode, a Mouse-2 click in Emacs may do much +more than just follow a link, so the new Mouse-1 behaviour is only activated for modes which explicitly mark a clickable text as a "link" (see the new function `mouse-on-link-p' for details). The lisp packages that are included in release 21.4 have been adapted to do this, but external packages may not yet support this. However, there is no risk in using such packages, as the worst thing that could -happen is that you get the original mouse-1 behaviour when you click +happen is that you get the original Mouse-1 behaviour when you click on a link, which typically means that you set point where you click. -If you want to get the original mouse-1 action also inside a link, you -just need to press the mouse-1 button a little longer than a normal -click (i.e. press and hold the mouse-1 button for half a second before +If you want to get the original Mouse-1 action also inside a link, you +just need to press the Mouse-1 button a little longer than a normal +click (i.e. press and hold the Mouse-1 button for half a second before you release it). -Dragging the mouse-1 inside a link still performs the original +Dragging the Mouse-1 inside a link still performs the original drag-mouse-1 action, typically copy the text. -You can customize the new mouse-1 behaviour via the new user option +You can customize the new Mouse-1 behaviour via the new user option `mouse-1-click-follows-link'. ++++ +** When the undo information of the current command gets really large +(beyond the value of `undo-outer-limit'), Emacs asks you whether to +discard it or keep it. + ** line-move-ignore-invisible now defaults to t. ** In Outline mode, hide-body no longer hides lines at the top of the file that precede the first header line. -+++ -** `set-auto-mode' now gives the interpreter magic line (if present) -precedence over the file name. Likewise an Date: Tue, 21 Dec 2004 11:49:32 +0000 Subject: [PATCH 087/104] Don't say "freeware". --- etc/DISTRIB | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/DISTRIB b/etc/DISTRIB index f1e8deb6ce1..bc0ea8cc60d 100644 --- a/etc/DISTRIB +++ b/etc/DISTRIB @@ -83,7 +83,7 @@ product and divide it by five, that is a good amount. If you like GNU Emacs, please express your satisfaction with a donation: send me or the Foundation what you feel Emacs has been worth to you. If you are glad that I developed GNU Emacs and distribute it -as freeware, rather than following the obstructive and antisocial +as free software, rather than following the obstructive and antisocial practices typical of software developers, reward me. If you would like the Foundation to develop more free software, contribute. From fda2922a94640b3e57ed8b1197f186212cf8ad0a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:49:53 +0000 Subject: [PATCH 088/104] *** empty log message *** --- etc/ChangeLog | 4 ++++ etc/NEWS | 3 ++- lisp/ChangeLog | 24 ++++++++++++++++++++++++ lispref/ChangeLog | 4 ++++ src/ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 1 deletion(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index c148f1a37a0..f0123a8b90d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2004-12-21 Richard M. Stallman + + * DISTRIB: Don't say "freeware". + 2004-12-15 Nick Roberts * DEBUG: Change printing example to break on a procedure name. diff --git a/etc/NEWS b/etc/NEWS index f343f563a05..778754d9d17 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2414,7 +2414,8 @@ 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 -a simple and efficient way of printing progress messages to the user. +a simple and efficient way for a command to present progress messages +for the user. --- ** To manipulate the File menu using easy-menu, you must specify the diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8341f1d4994..b210a675939 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,27 @@ +2004-12-21 Richard M. Stallman + + * faces.el (escape-glyph): Use blue against light foreground. + + * simple.el (undo-outer-limit-truncate): New function. + (undo-outer-limit-function): Use undo-outer-limit-truncate. + +2004-12-21 Eli Barzilay + + * calculator.el: (calculator-radix-grouping-mode) + (calculator-radix-grouping-digits) + (calculator-radix-grouping-separator): + New defcustoms for the new radix grouping mode functionality. + (calculator-mode-hook): Now used in electric mode too. + (calculator-mode-map): Some new keys. + (calculator-message): New function. Some new calls. + (calculator-string-to-number): New function, + (calculator-curnum-value): Use it. + (calculator-rotate-displayer, calculator-rotate-displayer-back) + (calculator-displayer-prev, calculator-displayer-next): + Change digit group size when in radix mode. + (calculator-number-to-string): Renamed from calculator-num-to-string. + Now deals with digit grouping in radix mode. + 2004-12-20 Glenn Morris * calendar/calendar.el (view-other-diary-entries): Add autoload. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 6944d2af6c5..247309624de 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2004-12-21 Richard M. Stallman + + * commands.texi (Event Input Misc): Add while-no-input. + 2004-12-11 Richard M. Stallman * display.texi (Line Height): Rewrite text for clarity. diff --git a/src/ChangeLog b/src/ChangeLog index 33d6f42799c..c2e81ad6a17 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,39 @@ +2004-12-21 Richard M. Stallman + + * eval.c (unwind_to_catch): Clear immediate_quit. + + * xdisp.c (get_next_display_element): Display codes 8a0 and 8ad + specially as `\ ' and `\-'. + + * keyboard.c (kbd_buffer_store_event_hold): + In the code for while-no-input, handle immediate_quit. + + * alloc.c (Fgarbage_collect): Update call to truncate_undo_list. + Call that at the very start. + (undo_limit, undo_strong_limit, undo_outer_limit): Moved to undo.c. + (syms_of_alloc): Don't define undo-limit, + undo-strong-limit and undo-outer-limit here. + + * undo.c (truncate_undo_list): Return void. + Take just one argument, the buffer. + Make it current, and inhibit recursive GC. + Access and update the undo list directly; return void. + Refer to the undo...limit variables directly. + Test undo_outer_limit only after counting the whole current command. + When it's exceeded, call the function in undo-outer-limit-function. + (undo_limit, undo_strong_limit, undo_outer_limit): From alloc.c. + (Vundo_outer_limit_function): New variable. + (syms_of_undo): Define undo-limit, undo-strong-limit + and undo-outer-limit here, and undo-outer-limit-function. + Doc fixes. + + * lisp.h (truncate_undo_list): Update decl. + +2004-12-21 Piet van Oostrum + + * fileio.c (Fread_file_name): Delete duplicates in + file-name-history when history_delete_duplicates is true. + 2004-12-20 YAMAMOTO Mitsuharu * macterm.c (mac_do_list_fonts): Fix memory leak From 4db985039fe4f1a7599d2d6d04be892cf1a149a7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Dec 2004 11:50:52 +0000 Subject: [PATCH 089/104] Comment change. --- lisp/emacs-lisp/bytecomp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2048bd6212f..a11831f944e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2178,7 +2178,7 @@ list that represents a doc string reference. (let ((old-load-list current-load-list) (args (mapcar 'eval (cdr form)))) (apply 'require args) - ;; Detech (require 'cl) in a way that works even if cl is already loaded. + ;; Detect (require 'cl) in a way that works even if cl is already loaded. (if (member (car args) '("cl" cl)) (setq byte-compile-warnings (remq 'cl-functions byte-compile-warnings)))) From a74deabc2bac6281a28be8b871d173a1fc6e3f5a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 21 Dec 2004 15:02:36 +0000 Subject: [PATCH 090/104] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b210a675939..78fc948a699 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-21 Markus Rost + + * calendar/diary-lib.el (mark-diary-entries): Set + mark-diary-entries-in-calendar only after checking for diary-file. + 2004-12-21 Richard M. Stallman * faces.el (escape-glyph): Use blue against light foreground. From d0897fa5354a5b582277d1011d9617bb7a00964b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 21 Dec 2004 15:03:31 +0000 Subject: [PATCH 091/104] From Markus Rost : (mark-diary-entries): Set mark-diary-entries-in-calendar only after checking for diary-file. --- lisp/calendar/diary-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index fdade091ab2..511f82f8f2f 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -841,11 +841,11 @@ Each entry in the diary file visible in the calendar window is marked. After the entries are marked, the hooks `nongregorian-diary-marking-hook' and `mark-diary-entries-hook' are run." (interactive) - (setq mark-diary-entries-in-calendar t) (let ((marking-diary-entries t) file-glob-attrs marks) (save-excursion (set-buffer (find-file-noselect (diary-check-diary-file) t)) + (setq mark-diary-entries-in-calendar t) (message "Marking diary entries...") (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) (let ((d diary-date-forms) From 56351784c9a8218c2187260d18fd501bdfa444ac Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 22 Dec 2004 00:23:53 +0000 Subject: [PATCH 092/104] (ispell-help): Bind resize-mini-windows. --- lisp/ChangeLog | 4 ++++ lisp/textmodes/ispell.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 78fc948a699..31b01552667 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-12-21 Richard M. Stallman + + * textmodes/ispell.el (ispell-help): Bind resize-mini-windows. + 2004-12-21 Markus Rost * calendar/diary-lib.el (mark-diary-entries): Set diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index f6a1c1d5cce..f3a7616bfd6 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1975,7 +1975,7 @@ SPC: Accept word this time. (sit-for 5) (kill-buffer "*Ispell Help*")) (unwind-protect - (progn + (let ((resize-mini-windows 'grow-only)) (select-window (minibuffer-window)) (erase-buffer) (message nil) From bc3f38d9656ba23a6f1192f0ddcd9763786dd91e Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 22 Dec 2004 05:44:13 +0000 Subject: [PATCH 093/104] (quail-start-translation): Fix prompt string for the case if input-method-use-echo-area being non-nil. (quail-start-conversion): Likewise. (quail-show-guidance): Don't show guidance if input-method-use-echo-area is non-nil. --- lisp/international/quail.el | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index d10e215881b..992f7ed56a6 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1371,11 +1371,12 @@ Return the input string." (while quail-translating (set-buffer-modified-p modified-p) (quail-show-guidance) - (let* ((keyseq (read-key-sequence - (and input-method-use-echo-area - (concat input-method-previous-message - quail-current-str)) - nil nil t)) + (let* ((prompt (if input-method-use-echo-area + (format "%s%s %s" + (or input-method-previous-message "") + quail-current-str + quail-guidance-str))) + (keyseq (read-key-sequence prompt nil nil t)) (cmd (lookup-key (quail-translation-keymap) keyseq))) (if (if key (and (commandp cmd) (not (eq cmd 'quail-other-command))) @@ -1436,12 +1437,13 @@ Return the input string." quail-translating t) (quail-setup-overlays nil))) (quail-show-guidance) - (let* ((keyseq (read-key-sequence - (and input-method-use-echo-area - (concat input-method-previous-message - quail-conversion-str - quail-current-str)) - nil nil t)) + (let* ((prompt (if input-method-use-echo-area + (format "%s%s%s %s" + (or input-method-previous-message "") + quail-conversion-str + quail-current-str + quail-guidance-str))) + (keyseq (read-key-sequence prompt nil nil t)) (cmd (lookup-key (quail-conversion-keymap) keyseq))) (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) (progn @@ -1950,10 +1952,10 @@ minibuffer and the selected frame has no other windows)." ;; Then, show the guidance. (when (and (quail-require-guidance-buf) + (not input-method-use-echo-area) (null unread-command-events) (null unread-post-input-method-events)) - (if (or (eq (selected-window) (minibuffer-window)) - input-method-use-echo-area) + (if (eq (selected-window) (minibuffer-window)) (if (eq (minibuffer-window) (frame-root-window)) ;; Use another frame. It is sure that we are using some ;; window system. From 3f6b532c9061006263c12f1f57779b0864cf2b89 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 22 Dec 2004 06:32:30 +0000 Subject: [PATCH 094/104] (Fx_get_cut_buffer_internal): Return a unibyte string. --- src/xselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xselect.c b/src/xselect.c index c89347be2cd..38547ea6bbf 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2324,7 +2324,7 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal, Fcons (x_atom_to_symbol (display, type), Fcons (make_number (format), Qnil)))); - ret = (bytes ? make_string ((char *) data, bytes) : Qnil); + ret = (bytes ? make_unibyte_string ((char *) data, bytes) : Qnil); /* Use xfree, not XFree, because x_get_window_property calls xmalloc itself. */ xfree (data); From 7a0ea9e3554e4fc99c0c7de0216dc8915fe5b6ee Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 22 Dec 2004 06:32:49 +0000 Subject: [PATCH 095/104] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ src/ChangeLog | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31b01552667..2795cbf26d4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-12-22 Kenichi Handa + + * international/quail.el (quail-start-translation): Fix prompt + string for the case if input-method-use-echo-area being non-nil. + (quail-start-conversion): Likewise. + (quail-show-guidance): Don't show guidance if + input-method-use-echo-area is non-nil. + 2004-12-21 Richard M. Stallman * textmodes/ispell.el (ispell-help): Bind resize-mini-windows. diff --git a/src/ChangeLog b/src/ChangeLog index c2e81ad6a17..0a6612e962d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-12-22 Kenichi Handa + + * xselect.c (Fx_get_cut_buffer_internal): Return a unibyte string. + 2004-12-21 Richard M. Stallman * eval.c (unwind_to_catch): Clear immediate_quit. From 81c1cf71feec0cd6f906141d741dccfb76aae3de Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 2004 00:15:23 +0000 Subject: [PATCH 096/104] (Vundo_outer_limit): Replaces undo_outer_limit. Uses changed. (syms_of_undo): Initialize appropriately. (truncate_undo_list): If it's nil, there's no limit. --- src/undo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/undo.c b/src/undo.c index d2f89c36a2a..df4b8d08cd6 100644 --- a/src/undo.c +++ b/src/undo.c @@ -28,7 +28,8 @@ Boston, MA 02111-1307, USA. */ EMACS_INT undo_limit; EMACS_INT undo_strong_limit; -EMACS_INT undo_outer_limit; + +Lisp_Object Vundo_outer_limit; /* Function to call when undo_outer_limit is exceeded. */ @@ -368,7 +369,8 @@ truncate_undo_list (b) /* If by the first boundary we have already passed undo_outer_limit, we're heading for memory full, so offer to clear out the list. */ - if (size_so_far > undo_outer_limit + if (INTEGERP (Vundo_outer_limit) + && size_so_far > XINT (Vundo_outer_limit) && !NILP (Vundo_outer_limit_function)) { Lisp_Object temp = last_undo_buffer; @@ -622,7 +624,7 @@ The size is counted as the number of bytes occupied, which includes both saved text and other data. */); undo_strong_limit = 30000; - DEFVAR_INT ("undo-outer-limit", &undo_outer_limit, + DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit, doc: /* Outer limit on size of undo information for one command. At garbage collection time, if the current command has produced more than this much undo information, it asks you whether to delete @@ -635,7 +637,7 @@ In fact, this calls the function which is the value of `undo-outer-limit-function' with one argument, the size. The text above describes the behavior of the function that variable usually specifies. */); - undo_outer_limit = 300000; + Vundo_outer_limit = make_number (300000); DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, doc: /* Function to call when an undo list exceeds `undo-outer-limit'. From 8e43e4b2f912fe94566a6d78a087d679bee5627d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 2004 00:15:49 +0000 Subject: [PATCH 097/104] (Vundo_outer_limit): Fix decl. --- src/lisp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lisp.h b/src/lisp.h index 754356689d9..8081e7c4fe4 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3058,6 +3058,7 @@ extern void record_change P_ ((int, int)); extern void record_property_change P_ ((int, int, Lisp_Object, Lisp_Object, Lisp_Object)); extern void syms_of_undo P_ ((void)); +extern Lisp_Object Vundo_outer_limit; /* defined in textprop.c */ extern Lisp_Object Qfont, Qmouse_face; From 55f4edbcd246d8ea1715687a7aeeb3afe35c0345 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 2004 00:17:01 +0000 Subject: [PATCH 098/104] (main): If batch mode, set Vundo_outer_limit to nil. --- src/ChangeLog | 11 +++++++++++ src/emacs.c | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0a6612e962d..8d09c5bfd2f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2004-12-22 Richard M. Stallman + + * emacs.c (main): If batch mode, set Vundo_outer_limit to nil. + + * lisp.h (Vundo_outer_limit): Fix decl. + + * undo.c (Vundo_outer_limit): Replaces undo_outer_limit. + Uses changed. + (syms_of_undo): Initialize appropriately. + (truncate_undo_list): If it's nil, there's no limit. + 2004-12-22 Kenichi Handa * xselect.c (Fx_get_cut_buffer_internal): Return a unibyte string. diff --git a/src/emacs.c b/src/emacs.c index 791e13dd6d0..5c62ee071ff 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1133,7 +1133,10 @@ main (argc, argv /* Handle the -batch switch, which means don't do interactive display. */ noninteractive = 0; if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) - noninteractive = 1; + { + noninteractive = 1; + Vundo_outer_limit = Qnil; + } if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args)) { noninteractive = 1; /* Set batch mode. */ From 66354420ae890d5581395f62d66b3decb007786e Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 23 Dec 2004 16:16:14 +0000 Subject: [PATCH 099/104] (__WIN32__) [HAVE_NTGUI]: Define for correct behaviour of JPEG library. --- src/ChangeLog | 5 +++++ src/image.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 8d09c5bfd2f..5030c115d35 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-23 Jason Rumney + + * image.c (__WIN32__) [HAVE_NTGUI]: Define for correct behaviour + of JPEG library. + 2004-12-22 Richard M. Stallman * emacs.c (main): If batch mode, set Vundo_outer_limit to nil. diff --git a/src/image.c b/src/image.c index 18ffc2db3a4..6a86708a9d7 100644 --- a/src/image.c +++ b/src/image.c @@ -6269,6 +6269,12 @@ jpeg_image_p (object) #undef HAVE_STDLIB_H #endif /* HAVE_STLIB_H */ +#if defined (HAVE_NTGUI) && !defined (__WIN32__) +/* jpeglib.h will define boolean differently depending on __WIN32__, + so make sure it is defined. */ +#define __WIN32__ 1 +#endif + #include #include #include From aa7d6700031329370636abbef742b86bf31fc956 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 23 Dec 2004 18:22:05 +0000 Subject: [PATCH 100/104] (hs-inside-comment-p): Fix omission bug: When extending backwards, move outside the current comment first. --- lisp/ChangeLog | 7 ++++++- lisp/progmodes/hideshow.el | 29 +++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2795cbf26d4..dea5cf3fd7b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-23 Thien-Thi Nguyen + + * progmodes/hideshow.el (hs-inside-comment-p): Fix omission bug: + When extending backwards, move outside the current comment first. + 2004-12-22 Kenichi Handa * international/quail.el (quail-start-translation): Fix prompt @@ -23,7 +28,7 @@ (undo-outer-limit-function): Use undo-outer-limit-truncate. 2004-12-21 Eli Barzilay - + * calculator.el: (calculator-radix-grouping-mode) (calculator-radix-grouping-digits) (calculator-radix-grouping-separator): diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 7013c3856e3..2c2797f97f0 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -5,7 +5,7 @@ ;; Author: Thien-Thi Nguyen ;; Dan Nicolaescu ;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines -;; Maintainer-Version: 5.31 +;; Maintainer-Version: n/a (presently) ;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning ;; This file is part of GNU Emacs. @@ -58,7 +58,7 @@ ;; ;; (load-library "hideshow") ;; (add-hook 'X-mode-hook ; other modes similarly -;; '(lambda () (hs-minor-mode 1))) +;; (lambda () (hs-minor-mode 1))) ;; ;; where X = {emacs-lisp,c,c++,perl,...}. You can also manually toggle ;; hideshow minor mode by typing `M-x hs-minor-mode'. After hideshow is @@ -133,10 +133,7 @@ ;; variable `hs-special-modes-alist'. Packages that use hideshow should ;; do something like: ;; -;; (let ((my-mode-hs-info '(my-mode "{{" "}}" ...))) -;; (if (not (member my-mode-hs-info hs-special-modes-alist)) -;; (setq hs-special-modes-alist -;; (cons my-mode-hs-info hs-special-modes-alist)))) +;; (add-to-list 'hs-special-modes-alist '(my-mode "{{" "}}" ...)) ;; ;; If you have an entry that works particularly well, consider ;; submitting it for inclusion in hideshow.el. See docstring for @@ -180,9 +177,9 @@ ;; In the case of `vc-diff', here is a less invasive workaround: ;; ;; (add-hook 'vc-before-checkin-hook -;; '(lambda () -;; (goto-char (point-min)) -;; (hs-show-block))) +;; (lambda () +;; (goto-char (point-min)) +;; (hs-show-block))) ;; ;; Unfortunately, these workarounds do not restore hideshow state. ;; If someone figures out a better way, please let me know. @@ -265,8 +262,7 @@ This has effect iff `search-invisible' is set to `open'." '((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1)) - (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) - ) + (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning)) "*Alist for initializing the hideshow variables for different modes. Each element has the form (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC). @@ -543,10 +539,15 @@ as cdr." (let ((q (point))) (when (or (looking-at hs-c-start-regexp) (re-search-backward hs-c-start-regexp (point-min) t)) + ;; first get to the beginning of this comment... + (while (and (not (bobp)) + (= (point) (progn (forward-comment -1) (point)))) + (forward-char -1)) + ;; ...then extend backwards (forward-comment (- (buffer-size))) (skip-chars-forward " \t\n\f") (let ((p (point)) - (not-hidable nil)) + (hidable t)) (beginning-of-line) (unless (looking-at (concat "[ \t]*" hs-c-start-regexp)) ;; we are in this situation: (example) @@ -571,13 +572,13 @@ as cdr." (when (or (not (looking-at hs-c-start-regexp)) (> (point) q)) ;; we cannot hide this comment block - (setq not-hidable t))) + (setq hidable nil))) ;; goto the end of the comment (forward-comment (buffer-size)) (skip-chars-backward " \t\n\f") (end-of-line) (when (>= (point) q) - (list (if not-hidable nil p) (point)))))))) + (list (and hidable p) (point)))))))) (defun hs-grok-mode-type () "Set up hideshow variables for new buffers. From 11c2175c79f09ceb0a7021a71dbe9ec8686f5fe3 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 23 Dec 2004 18:28:13 +0000 Subject: [PATCH 101/104] (mode-line, mode-line-inactive): Use min-colors. --- lisp/ChangeLog | 4 ++++ lisp/faces.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dea5cf3fd7b..2cb780af94c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-12-23 Dan Nicolaescu + + * faces.el (mode-line, mode-line-inactive): Use min-colors. + 2004-12-23 Thien-Thi Nguyen * progmodes/hideshow.el (hs-inside-comment-p): Fix omission bug: diff --git a/lisp/faces.el b/lisp/faces.el index b215d25bf21..d2ae90805f2 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1783,7 +1783,7 @@ created." (defface mode-line - '((((type x w32 mac) (class color)) + '((((class color) (min-colors 88)) :box (:line-width -1 :style released-button) :background "grey75" :foreground "black") (t @@ -1796,11 +1796,11 @@ created." (defface mode-line-inactive '((default :inherit mode-line) - (((type x w32 mac) (background light) (class color)) + (((class color) (min-colors 88) (background light)) :weight light :box (:line-width -1 :color "grey75" :style nil) :foreground "grey20" :background "grey90") - (((type x w32 mac) (background dark) (class color)) + (((class color) (min-colors 88) (background dark) ) :weight light :box (:line-width -1 :color "grey40" :style nil) :foreground "grey80" :background "grey30")) From bd55c35cc18353ce75a4661c3a06e9a7bb88ccf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 23 Dec 2004 22:17:56 +0000 Subject: [PATCH 102/104] * keyboard.c (input_available_signal): Call SIGNAL_THREAD_CHECK before touching input_available_clear_time, to avoid accessing it from multiple threads. --- src/ChangeLog | 6 ++++++ src/keyboard.c | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5030c115d35..83419a166a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-12-23 Jan Dj,Ad(Brv + + * keyboard.c (input_available_signal): Call SIGNAL_THREAD_CHECK + before touching input_available_clear_time, to avoid accessing it + from multiple threads. + 2004-12-23 Jason Rumney * image.c (__WIN32__) [HAVE_NTGUI]: Define for correct behaviour diff --git a/src/keyboard.c b/src/keyboard.c index f5ca087227d..1c6f3f7c5f5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6841,14 +6841,16 @@ input_available_signal (signo) sigisheld (SIGIO); #endif - if (input_available_clear_time) - EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); - #ifdef SYNC_INPUT interrupt_input_pending = 1; #else - SIGNAL_THREAD_CHECK (signo); +#endif + + if (input_available_clear_time) + EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); + +#ifndef SYNC_INPUT handle_async_input (); #endif From 53c403031f0506f5f2e87b4da0e2580eab4049f1 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 24 Dec 2004 01:57:47 +0000 Subject: [PATCH 103/104] Untabify, reindent; nfc. --- lisp/progmodes/hideshow.el | 90 +++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 2c2797f97f0..3be0efa612a 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -408,8 +408,8 @@ Note that `mode-line-format' is buffer-local.") (let ((ovs (overlays-in from to))) (while ovs (let ((ov (car ovs))) - (when (overlay-get ov 'hs) - (delete-overlay ov))) + (when (overlay-get ov 'hs) + (delete-overlay ov))) (setq ovs (cdr ovs))))) (defun hs-isearch-show (ov) @@ -429,16 +429,16 @@ OV is shown. This function is meant to be used as the `isearch-open-invisible-temporary' property of an overlay." (setq hs-headline - (if hide-p - nil - (or hs-headline - (let ((start (overlay-start ov))) - (buffer-substring - (save-excursion (goto-char start) - (beginning-of-line) - (skip-chars-forward " \t") - (point)) - start))))) + (if hide-p + nil + (or hs-headline + (let ((start (overlay-start ov))) + (buffer-substring + (save-excursion (goto-char start) + (beginning-of-line) + (skip-chars-forward " \t") + (point)) + start))))) (force-mode-line-update) (overlay-put ov 'invisible (and hide-p 'hs))) @@ -460,10 +460,10 @@ on what kind of block is to be hidden." ;; deprecated backward compatibility -- `block'<=>`code' (and (eq 'block hs-isearch-open) (eq 'code flag))) - (overlay-put overlay 'isearch-open-invisible 'hs-isearch-show) - (overlay-put overlay - 'isearch-open-invisible-temporary - 'hs-isearch-show-temporary)) + (overlay-put overlay 'isearch-open-invisible 'hs-isearch-show) + (overlay-put overlay + 'isearch-open-invisible-temporary + 'hs-isearch-show-temporary)) overlay)))) (defun hs-forward-sexp (match-data arg) @@ -519,10 +519,10 @@ and then further adjusted to be at the end of the line." (defun hs-safety-is-job-n () "Warn if `buffer-invisibility-spec' does not contain symbol `hs'." - (unless (and (listp buffer-invisibility-spec) - (assq 'hs buffer-invisibility-spec)) - (message "Warning: `buffer-invisibility-spec' does not contain hs!!") - (sit-for 2))) + (unless (and (listp buffer-invisibility-spec) + (assq 'hs buffer-invisibility-spec)) + (message "Warning: `buffer-invisibility-spec' does not contain hs!!") + (sit-for 2))) (defun hs-inside-comment-p () "Return non-nil if point is inside a comment, otherwise nil. @@ -566,7 +566,7 @@ as cdr." (while (and (< (point) q) (> (point) p) (not (looking-at hs-c-start-regexp))) - (setq p (point));; use this to avoid an infinite cycle + (setq p (point)) ;; use this to avoid an infinite cycle (forward-comment 1) (skip-chars-forward " \t\n\f")) (when (or (not (looking-at hs-c-start-regexp)) @@ -646,7 +646,7 @@ Return point, or nil if original point was not in a block." (hs-hide-level-recursive (1- arg) minp maxp) (goto-char (match-beginning hs-block-start-mdata-select)) (hs-hide-block-at-point t))) - (hs-safety-is-job-n) + (hs-safety-is-job-n) (goto-char maxp)) (defmacro hs-life-goes-on (&rest body) @@ -676,8 +676,8 @@ and `case-fold-search' are both t." (let ((overlays (overlays-at (point))) (found nil)) (while (and (not found) (overlayp (car overlays))) - (setq found (overlay-get (car overlays) 'hs) - overlays (cdr overlays))) + (setq found (overlay-get (car overlays) 'hs) + overlays (cdr overlays))) found))) (defun hs-c-like-adjust-block-beginning (initial) @@ -725,7 +725,7 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." (funcall hs-hide-all-non-comment-function) (hs-hide-block-at-point t))) ;; found a comment, probably - (let ((c-reg (hs-inside-comment-p))) ; blech! + (let ((c-reg (hs-inside-comment-p))) ; blech! (when (and c-reg (car c-reg)) (if (> (count-lines (car c-reg) (nth 1 c-reg)) 1) (hs-hide-block-at-point t c-reg) @@ -774,17 +774,17 @@ See documentation for functions `hs-hide-block' and `run-hooks'." ;; first see if we have something at the end of the line (catch 'eol-begins-hidden-region-p (let ((here (point)) - (ovs (save-excursion (end-of-line) (overlays-at (point))))) - (while ovs - (let ((ov (car ovs))) - (when (overlay-get ov 'hs) - (goto-char - (cond (end (overlay-end ov)) - ((eq 'comment (overlay-get ov 'hs)) here) - (t (+ (overlay-start ov) (overlay-get ov 'hs-ofs))))) - (delete-overlay ov) - (throw 'eol-begins-hidden-region-p t))) - (setq ovs (cdr ovs))) + (ovs (save-excursion (end-of-line) (overlays-at (point))))) + (while ovs + (let ((ov (car ovs))) + (when (overlay-get ov 'hs) + (goto-char + (cond (end (overlay-end ov)) + ((eq 'comment (overlay-get ov 'hs)) here) + (t (+ (overlay-start ov) (overlay-get ov 'hs-ofs))))) + (delete-overlay ov) + (throw 'eol-begins-hidden-region-p t))) + (setq ovs (cdr ovs))) nil)) ;; not immediately obvious, look for a suitable block (let ((c-reg (hs-inside-comment-p)) @@ -871,9 +871,9 @@ Key bindings: (interactive "P") (setq hs-headline nil - hs-minor-mode (if (null arg) - (not hs-minor-mode) - (> (prefix-numeric-value arg) 0))) + hs-minor-mode (if (null arg) + (not hs-minor-mode) + (> (prefix-numeric-value arg) 0))) (if hs-minor-mode (progn (hs-grok-mode-type) @@ -923,12 +923,12 @@ Key bindings: ;; make some variables permanently buffer-local (let ((vars '(hs-minor-mode - hs-c-start-regexp - hs-block-start-regexp - hs-block-start-mdata-select - hs-block-end-regexp - hs-forward-sexp-func - hs-adjust-block-beginning))) + hs-c-start-regexp + hs-block-start-regexp + hs-block-start-mdata-select + hs-block-end-regexp + hs-forward-sexp-func + hs-adjust-block-beginning))) (while vars (let ((var (car vars))) (make-variable-buffer-local var) From 70d16390a08dc9d94c961eb380be8e1b5b496963 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 24 Dec 2004 02:08:14 +0000 Subject: [PATCH 104/104] Require `cl' when compiling. Remove XEmacs and Emacs 19 compatibility. Use `dolist' and `add-to-list' for load-time actions. (hs-discard-overlays): Use `dolist'. (hs-show-block): Likewise. --- lisp/ChangeLog | 8 ++++ lisp/progmodes/hideshow.el | 85 +++++++++++--------------------------- 2 files changed, 33 insertions(+), 60 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2cb780af94c..aebf3cc4285 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-12-24 Thien-Thi Nguyen + + * progmodes/hideshow.el: Require `cl' when compiling. + Remove XEmacs and Emacs 19 compatibility. + Use `dolist' and `add-to-list' for load-time actions. + (hs-discard-overlays): Use `dolist'. + (hs-show-block): Likewise. + 2004-12-23 Dan Nicolaescu * faces.el (mode-line, mode-line-inactive): Use min-colors. diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 3be0efa612a..3bd5dd2a1f6 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -5,7 +5,7 @@ ;; Author: Thien-Thi Nguyen ;; Dan Nicolaescu ;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines -;; Maintainer-Version: n/a (presently) +;; Maintainer-Version: 5.39.2.8 ;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning ;; This file is part of GNU Emacs. @@ -220,6 +220,7 @@ ;;; Code: (require 'easymenu) +(eval-when-compile (require 'cl)) ;;--------------------------------------------------------------------------- ;; user-configurable variables @@ -374,28 +375,6 @@ Note that `mode-line-format' is buffer-local.") ;;--------------------------------------------------------------------------- ;; system dependency -; ;; xemacs compatibility -; (when (string-match "xemacs\\|lucid" emacs-version) -; ;; use pre-packaged compatiblity layer -; (require 'overlay)) -; -; ;; xemacs and emacs-19 compatibility -; (when (or (not (fboundp 'add-to-invisibility-spec)) -; (not (fboundp 'remove-from-invisibility-spec))) -; ;; `buffer-invisibility-spec' mutators snarfed from Emacs 20.3 lisp/subr.el -; (defun add-to-invisibility-spec (arg) -; (cond -; ((or (null buffer-invisibility-spec) (eq buffer-invisibility-spec t)) -; (setq buffer-invisibility-spec (list arg))) -; (t -; (setq buffer-invisibility-spec -; (cons arg buffer-invisibility-spec))))) -; (defun remove-from-invisibility-spec (arg) -; (when buffer-invisibility-spec -; (setq buffer-invisibility-spec -; (delete arg buffer-invisibility-spec))))) - -;; hs-match-data (defalias 'hs-match-data 'match-data) ;;--------------------------------------------------------------------------- @@ -405,12 +384,9 @@ Note that `mode-line-format' is buffer-local.") "Delete hideshow overlays in region defined by FROM and TO." (when (< to from) (setq from (prog1 to (setq to from)))) - (let ((ovs (overlays-in from to))) - (while ovs - (let ((ov (car ovs))) - (when (overlay-get ov 'hs) - (delete-overlay ov))) - (setq ovs (cdr ovs))))) + (dolist (ov (overlays-in from to)) + (when (overlay-get ov 'hs) + (delete-overlay ov)))) (defun hs-isearch-show (ov) "Delete overlay OV, and set `hs-headline' to nil. @@ -773,18 +749,15 @@ See documentation for functions `hs-hide-block' and `run-hooks'." (or ;; first see if we have something at the end of the line (catch 'eol-begins-hidden-region-p - (let ((here (point)) - (ovs (save-excursion (end-of-line) (overlays-at (point))))) - (while ovs - (let ((ov (car ovs))) - (when (overlay-get ov 'hs) - (goto-char - (cond (end (overlay-end ov)) - ((eq 'comment (overlay-get ov 'hs)) here) - (t (+ (overlay-start ov) (overlay-get ov 'hs-ofs))))) - (delete-overlay ov) - (throw 'eol-begins-hidden-region-p t))) - (setq ovs (cdr ovs))) + (let ((here (point))) + (dolist (ov (save-excursion (end-of-line) (overlays-at (point)))) + (when (overlay-get ov 'hs) + (goto-char + (cond (end (overlay-end ov)) + ((eq 'comment (overlay-get ov 'hs)) here) + (t (+ (overlay-start ov) (overlay-get ov 'hs-ofs))))) + (delete-overlay ov) + (throw 'eol-begins-hidden-region-p t))) nil)) ;; not immediately obvious, look for a suitable block (let ((c-reg (hs-inside-comment-p)) @@ -913,27 +886,19 @@ Key bindings: ))))) ;; some housekeeping -(or (assq 'hs-minor-mode minor-mode-map-alist) - (setq minor-mode-map-alist - (cons (cons 'hs-minor-mode hs-minor-mode-map) - minor-mode-map-alist))) -(or (assq 'hs-minor-mode minor-mode-alist) - (setq minor-mode-alist (append minor-mode-alist - (list '(hs-minor-mode " hs"))))) +(add-to-list 'minor-mode-map-alist (cons 'hs-minor-mode hs-minor-mode-map)) +(add-to-list 'minor-mode-alist '(hs-minor-mode " hs") t) ;; make some variables permanently buffer-local -(let ((vars '(hs-minor-mode - hs-c-start-regexp - hs-block-start-regexp - hs-block-start-mdata-select - hs-block-end-regexp - hs-forward-sexp-func - hs-adjust-block-beginning))) - (while vars - (let ((var (car vars))) - (make-variable-buffer-local var) - (put var 'permanent-local t)) - (setq vars (cdr vars)))) +(dolist (var '(hs-minor-mode + hs-c-start-regexp + hs-block-start-regexp + hs-block-start-mdata-select + hs-block-end-regexp + hs-forward-sexp-func + hs-adjust-block-beginning)) + (make-variable-buffer-local var) + (put var 'permanent-local t)) ;;--------------------------------------------------------------------------- ;; that's it