Mercurial > emacs
changeset 90188:01137c1fdbe9
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 324-352)
- Merge from gnus--rel--5.10
- Update from CVS
- etc/emacs-buffer.gdb: Remove RCS keywords
* gnus--rel--5.10 (patch 70-79)
- Update from CVS
- Merge from emacs--cvs-trunk--0
line wrap: on
line diff
--- a/admin/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/admin/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,8 @@ +2005-06-04 Richard M. Stallman <rms@gnu.org> + + * emacs-pretesters: Refer to etc/DEBUG instead of duplicating it. + Other cleanups. + 2005-04-19 Lute Kamstra <lute@gnu.org> * make-tarball.txt: Don't commit lisp/loaddefs.el.
--- a/admin/emacs-pretesters Sun Jun 05 01:58:02 2005 +0000 +++ b/admin/emacs-pretesters Mon Jun 06 02:39:45 2005 +0000 @@ -30,13 +30,13 @@ lot of time. But when you have a reason to ask other pretesters for help, you can do it that way. -* It is absolutely vital that you tell me about even the smallest -change or departure from the standard sources and procedure. +* It is absolutely vital that you report even the smallest change or +departure from the standard sources and procedure. -Otherwise, you are not testing the same program that I asked you to +Otherwise, you are not testing the same program that we asked you to test. Testing a different program is usually of no use whatever. It -can even cause trouble if you fail to tell me that you tested some -other program instead of what I am about to release. I might think +can even cause trouble, if you fail to tell us that you tested some +other program instead of what we are about to release. We might think that Emacs works, when in fact it has not even been tried, and might have a glaring fault. @@ -46,8 +46,8 @@ Actually, it does no harm to test Emacs with such customizations *as well as* testing it "out of the box". Anything you do that could find -a bug is useful, as long as you make sure I know exactly what you did. -The important point is that testing with local changes is no +a bug is useful, as long as you make sure we know exactly what you +did. The important point is that testing with local changes is no substitute for testing Emacs exactly as it is distributed. * Even changing the compilation options counts as a change in the @@ -71,10 +71,10 @@ the planned release is that, without changes, it doesn't work on that machine. -To make Emacs work on that machine, I would need to install new +To make Emacs work on that machine, we would need to install new configuration files. That is not out of the question, since it is safe--it certainly won't break any other machines that already work. -But you will have to rush me the legal papers to give the FSF +But you will have to rush in the legal papers to give the FSF permission to use such a large piece of text. * Look in the etc/MACHINES file. @@ -92,25 +92,25 @@ * Send your problem reports to emacs-pretest-bug@gnu.org, not bug-gnu-emacs. -Sometimes I won't know what to do about a system-dependent issue, and -I may need people to tell me what happens if you try a certain thing -on a certain system. When this happens, I'll send out a query. +Sometimes we won't know what to do about a system-dependent issue, and +we may need people to say what happens if you try a certain thing on a +certain system. When this happens, we'll send out a query. * Don't delay sending information. -When you test on a system and encounter no problems, please tell me -about it right away. That way, I will know that someone has tested -Emacs on that kind of system. +When you test on a system and encounter no problems, please report it +right away. That way, we will know that someone has tested Emacs on +that kind of system. Please don't wait for several days "to see if it really works before -you say anything." Tell me right away that Emacs seems basically to -work; then, if you notice a problem a few days later, tell me +you say anything." Tell us right away that Emacs seems basically to +work; then, if you notice a problem a few days later, tell us immediately about that when you see it. It is okay if you double check things before reporting a problem, such as to see if you can easily fix it. But don't wait very long. A good -rule to use in pretesting is always to tell me about every problem on -the same day you encounter it, even if that means you can't find a +rule to use in pretesting is always to report every problem on the +same day you encounter it, even if that means you can't find a solution before you report the problem. I'd much rather hear about a problem today and a solution tomorrow @@ -123,20 +123,22 @@ the bug to find the other message. This may be difficult, it is probably time-consuming. -To help me save time, simply copy the relevant parts of any previous +To help save our time, simply copy the relevant parts of any previous messages into your own bug report. -In particular, if I ask you for more information because a bug report +In particular, if we ask you for more information because a bug report was incomplete, it is best to send me the *entire* collection of relevant information, all together. If you send just the additional -information, that makes me do extra work. There is even a risk that -I won't remember what question you are sending me the answer to. +information, that makes extra work for us. There is even a risk that +we won't remember what question you are sending the answer to. * When you encounter a bug that manifests itself as a Lisp error, try setting debug-on-error to t and making the bug happen again. Then you will get a Lisp backtrace. Including that in your bug report is very useful. +* For advice on debugging, see etc/DEBUG. + * Debugging optimized code is possible, if you compile with GCC, but in some cases the optimized code can be confusing. If you are not accustomed to that, recompile Emacs without -O. One way to do this is @@ -144,193 +146,6 @@ make clean make CFLAGS=-g -* If you use X windows, it is a good idea to run Emacs under GDB (or -some other suitable debugger) *all the time*, at least while -pretesting. - -Then, when Emacs crashes, you will be able to debug the live process, -not just a core dump. The `pr' command defined in src/.gdbinit is very -useful in this case for examining Lisp_Object values as they would -appear in Lisp. - -If you can't use `pr' because Emacs has got a fault already, or -because you have only a core dump, you can use `xtype' to look at the -type of a value, and then choose one of the other commands `xsymbol', -`xstring', `xcons', `xvector' and so on to examine the contents. - -I myself *always* run Emacs under GDB so that I can debug conveniently -if the occasion arises. - -* To get Lisp-level backtrace information within GDB, -look for stack frames that call Ffuncall. Select them one by one in GDB -and type this: - - p *args - pr - -This will print the name of the Lisp function called by that level -of function calling. - -By printing the remaining elements of args, you can see the argument -values. Here's how to print the first argument: - - p args[1] - pr - -If you do not have a live process, you can use xtype and the other -x... commands such as xsymbol to get such information, albeit less -conveniently. - -* 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 = Fcons (frame, prefix); - -First, use these commands: - - cd src - gdb emacs - b xmenu.c:1209 - r -q - -Then type C-x 5 2 to create a new frame, and it hits the breakpoint: - - (gdb) p frame - $1 = 1077872640 - (gdb) xtype - Lisp_Vectorlike - PVEC_FRAME - (gdb) xframe - $2 = (struct frame *) 0x3f0800 - (gdb) p *$ - $3 = { - size = 536871989, - next = 0x366240, - name = 809661752, - [...] - } - (gdb) p $3->name - $4 = 809661752 - -Now we can use `pr' to print the name of the frame: - - (gdb) pr - "emacs@steenrod.math.nwu.edu" - -* The Emacs C code heavily uses macros defined in lisp.h. So suppose -we want the address of the l-value expression near the bottom of -`kbd_buffer_store_event' from keyboard.c: - - XVECTOR (kbd_buffer_frame_or_window)->contents[kbd_store_ptr - - kbd_buffer] - = event->frame_or_window); - -XVECTOR is a macro, and therefore GDB does not know about it. -GDB cannot evaluate p XVECTOR (kbd_buffer_frame_or_window). - -However, you can use the xvector command in GDB to get the same -result. Here is how: - - (gdb) p kbd_buffer_frame_or_window - $1 = 1078005760 - (gdb) xvector - $2 = (struct Lisp_Vector *) 0x411000 - 0 - (gdb) p $->contents[kbd_store_ptr - kbd_buffer] - $3 = 1077872640 - (gdb) p &$ - $4 = (int *) 0x411008 - -* Here's a related example of macros and the GDB `define' command. -There are many Lisp vectors such as `recent_keys', which contains the -last 100 keystrokes. We can print this Lisp vector - -p recent_keys -pr - -But this may be inconvenient, since `recent_keys' is much more verbose -than `C-h l'. We might want to print only the last 10 elements of -this vector. `recent_keys' is updated in keyboard.c by the command - - XVECTOR (recent_keys)->contents[recent_keys_index] = c; - -So we define a GDB command `xvector-elts', so the last 10 keystrokes -are printed by - - xvector-elts recent_keys recent_keys_index 10 - -where you can define xvector-elts as follows: - - define xvector-elts - set $i = 0 - p $arg0 - xvector - set $foo = $ - while $i < $arg2 - p $foo->contents[$arg1-($i++)] - pr - end - document xvector-elts - Prints a range of elements of a Lisp vector. - xvector-elts v n i - prints `i' elements of the vector `v' ending at the index `n'. - end - -* To debug what happens while preloading and dumping Emacs, -do `gdb temacs' and start it with `r -batch -l loadup dump'. - -If temacs actually succeeds when running under GDB in this way, do not -try to run the dumped Emacs, because it was dumped with the GDB -breakpoints in it. - -* If you encounter X protocol errors, try evaluating (x-synchronize t). -That puts Emacs into synchronous mode, where each Xlib call checks for -errors before it returns. This mode is much slower, but when you get -an error, you will see exactly which call really caused the error. - -* If the symptom of the bug is that Emacs fails to respond, don't -assume Emacs is `hung'--it may instead be in an infinite loop. To -find out which, make the problem happen under GDB and stop Emacs once -it is not responding. (If Emacs is using X Windows directly, you can -stop Emacs by typing C-z at the GDB job.) Then try stepping with -`step'. If Emacs is hung, the `step' command won't return. If it is -looping, `step' will return. - -If this shows Emacs is hung in a system call, stop it again and -examine the arguments of the call. In your bug report, state exactly -where in the source the system call is, and what the arguments are. - -If Emacs is in an infinite loop, please determine where the loop -starts and ends. The easiest way to do this is to use the GDB command -`finish'. Each time you use it, Emacs resumes execution until it -exits one stack frame. Keep typing `finish' until it doesn't -return--that means the infinite loop is in the stack frame which you -just tried to finish. - -Stop Emacs again, and use `finish' repeatedly again until you get back -to that frame. Then use `next' to step through that frame. By -stepping, you will see where the loop starts and ends. Also please -examine the data being used in the loop and try to determine why the -loop does not exit when it should. Include all of this information in -your bug report. - -* If certain operations in Emacs are slower than they used to be, here -is some advice for how to find out why. - -Stop Emacs repeatedly during the slow operation, and make a backtrace -each time. Compare the backtraces looking for a pattern--a specific -function that shows up more often than you'd expect. - -If you don't see a pattern in the C backtraces, get some Lisp -backtrace information by looking at Ffuncall frames (see above), and -again look for a pattern. - -When using X, you can stop Emacs at any time by typing C-z at GDB. -When not using X, you can do this with C-g. - * Configure tries to figure out what kind of system you have by compiling and linking programs which calls various functions and looks at whether that succeeds. The file config.log contains any messages @@ -344,6 +159,9 @@ rm config.cache ./configure +* Don't try changing Emacs *in any way* during pretest unless it fails +to work unchanged. + * Always be precise when talking about changes you have made. Show things rather than describing them. Use exact filenames (relative to the main directory of the distribution), not partial ones. For @@ -352,27 +170,27 @@ diff. * Always use `diff -c' to make diffs. If you don't include context, it -may be hard for me to figure out where you propose to make the -changes. So I might have to ignore your patch. +may be hard for us to figure out where you propose to make the +changes. So we might ignore your patch. -* When you write a fix, keep in mind that I can't install a change +* When you write a fix, keep in mind that we can't install a change that *might* break other systems without the risk that it will fail to work and therefore require an additional cycle of pretesting. People often suggest fixing a problem by changing config.h or src/ymakefile or even src/Makefile to do something special that a particular system needs. Sometimes it is totally obvious that such -changes would break Emacs for almost all users. I can't possibly make -a change like that. All I can do is send it back to you and ask you -to find a fix that is safe to install. +changes would break Emacs for almost all users. We can't possibly +make a change like that. All we can do is ask you to find a fix that +is safe to install. Sometimes people send fixes that *might* be an improvement in general--but it is hard to be sure of this. I can install such changes some of the time, but not during pretest, when I am trying to get a new version to work reliably as quickly as possible. -The safest changes for me to install are changes to the s- and m- -files. At least I know those can't affect most systems. +The safest changes for us to install are changes to the s- and m- +files. At least those can't break other systems. Another safe kind of change is one that uses a conditional to make sure it will apply only to a particular kind of system. Ordinarily, @@ -380,60 +198,20 @@ cleaner alternative. But the virtue of safety can make it superior at pretest time. -* Don't try changing Emacs *in any way* unless it fails to work unchanged. - -* Don't even suggest changes to add features or make something -cleaner. Every change I install could introduce a bug, so I won't -install a change during pretest unless I see it is *necessary*. +* Don't suggest changes during pretest to add features or make +something cleaner. Every change risks introducing a bug, so I won't +install a change during pretest unless it is *necessary*. * If you would like to suggest changes for purposes other than fixing user-visible bugs, don't wait till pretest time. Instead, send them -after I have made a release that proves to be stable. Then I can give -your suggestions proper consideration. If you send them at pretest -time, I will have to defer them till later, and that might mean I -forget all about them. +after we have made a release that proves to be stable. That is the +easiest time to consider such suggestions. If you send them at +pretest time, we will have to defer them till later, and that might +mean we forget all about them. * In some cases, if you don't follow these guidelines, your -information might still be useful, but I might have to do more work to -make use of it. Unfortunately, I am so far behind in my work that I -just can't keep up unless you help me to do it efficiently. - -Some suggestions for debugging on MS Windows: - - Marc Fleischeuers, Geoff Voelker and Andrew Innes - -To debug emacs with Microsoft Visual C++, you either start emacs from -the debugger or attach the debugger to a running emacs process. To -start emacs from the debugger, you can use the file bin/debug.bat. The -Microsoft Developer studio will start and under Project, Settings, -Debug, General you can set the command-line arguments and emacs' -startup directory. Set breakpoints (Edit, Breakpoints) at Fsignal and -other functions that you want to examine. Run the program (Build, -Start debug). Emacs will start and the debugger will take control as -soon as a breakpoint is hit. - -You can also attach the debugger to an already running emacs process. -To do this, start up the Microsoft Developer studio and select Build, -Start debug, Attach to process. Choose the emacs process from the -list. Send a break to the running process (Debug, Break) and you will -find that execution is halted somewhere in user32.dll. Open the stack -trace window and go up the stack to w32_msg_pump. Now you can set -breakpoints in emacs (Edit, Breakpoints). Continue the running emacs -process (Debug, Step out) and control will return to emacs, until a -breakpoint is hit. - -To examine the contents of a lisp variable, you can use the function -'debug_print'. Right-click on a variable, select QuickWatch, and -place 'debug_print(' and ')' around the expression. Press -'Recalculate' and the output is sent to the 'Debug' pane in the Output -window. If emacs was started from the debugger, a console window was -opened at emacs' startup; this console window also shows the output of -'debug_print'. It is also possible to keep appropriately masked and -typecast lisp symbols in the Watch window, this is more convenient -when steeping though the code. For instance, on entering -apply_lambda, you can watch (struct Lisp_Symbol *) (0xfffffff & -args[0]). - +information might still be useful, but we would have to do more work +to make use of it. That might cause it to fall by the wayside. Local Variables: mode: text
--- a/etc/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/etc/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,20 @@ +2005-05-30 Miles Bader <miles@gnu.org> + + * emacs-buffer.gdb: Remove RCS keywords. + +2005-05-30 Noah Friedman <friedman@splode.com> + + * emacs-buffer.gdb: New file. + * NEWS: Mention it. + +2005-05-28 Richard M. Stallman <rms@gnu.org> + + * TUTORIAL.fr: Change NBSP to space. + +2005-05-28 Bill Wohler <wohler@newt.com> + + * NEWS, MH-E-NEWS: Upgraded to MH-E version 7.84. + 2005-05-19 Nick Roberts <nickrob@snap.net.nz> * TODO: post-command-idle-hook has gone.
--- a/etc/MH-E-NEWS Sun Jun 05 01:58:02 2005 +0000 +++ b/etc/MH-E-NEWS Mon Jun 06 02:39:45 2005 +0000 @@ -1,16 +1,94 @@ * COPYRIGHT -Copyright (C) 2003, 2004 Free Software Foundation, Inc. - +Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. +* Changes in MH-E 7.84 + +Version 7.84 contains no user-visible changes. This version +incorporates changes made in CVS Emacs such as the removal of some +deprecated software. + +* Changes in MH-E 7.83 + +Version 7.83 fixes a handful of bugs, adds colors to buttons for +signed or encrypted messages, and contains some documentation changes +related to the upcoming release of the manual. Some options were moved +to other customization groups as a result. + +While not related to this release, the MH-E mailing lists are now +gatewayed at gmane.org (closes SF #979308). + +** New Variables in MH-E 7.83 + +*** mh-show-pgg-bad-face + +Face used to highlight a bad PGG signature. + +*** mh-show-pgg-good-face + +Face used to highlight a good PGG signature. + +*** mh-show-pgg-unknown-face + +Face used to highlight a PGG signature whose status is unknown. This +face is also used for a signature when the signer is untrusted. + +** Bug Fixes in MH-E 7.83 + +*** Whitespace in pick Expressions + +The "C-u / s RET" command now works. In addition, you can now add +whitespace to any of the limiting (/) commands (closes SF #1122655). + +*** auto-mode-alist Updated + +MH-E originally updated auto-mode-alist to set the major mode of +drafts. Now that we explicitly set the mode, there is no reason to do +this, and this behavior caused problems for people who didn't use MH-E +who were editing files that looked like MH message files (closes SF +#1032353). + +*** mh-show-unquote-From Fails (read-only buffer) + +MH-E quotes the "From " header field that is inserted by MTAs. +However, it was trying to do this in a read-only buffer. This has been +fixed (closes SF #1089870). + +*** rmmproc Refile Complains No Such Message + +MH-E would get confused about which folder to delete messages from if +you were refiling and deleting messages at the same time. This has +been fixed (closes SF #1023959). + +*** ! Doesn't Do Regions + +Now it does (closes SF #1046330). + +*** Swish Fixes + +Items in swish indexes that aren't mail messages are now handled more +gracefully. + +*** Spamassassin Fixes + +If you use spamassassin, there was an error when you tried to junk +mail if the option mh-junk-background was set. This has been fixed. + +*** Mairix Support + +Indexing now compatible with Mairix version 0.12 and later. + + + * Changes in MH-E 7.82 Version 7.82 continues to address the saga surrounding the use of CL -macros in CVS Emacs and fixes the auto-detection of vanilla MH (SF -#1014781). +macros in CVS Emacs and fixes the auto-detection of vanilla MH (closes +SF #1014781). * Changes in MH-E 7.81 @@ -23,6 +101,8 @@ to ":default". This release also corrects the release numbering; the previous version number was intended to be 7.80. + + * Changes in MH-E 7.4.80 Version 7.4.80 now supports GNU mailutils, S/MIME, picons,
--- a/etc/NEWS Sun Jun 05 01:58:02 2005 +0000 +++ b/etc/NEWS Mon Jun 06 02:39:45 2005 +0000 @@ -183,9 +183,15 @@ --- ** When pure storage overflows while dumping, Emacs now prints how much pure storage it will approximately need. + +** The script etc/emacs-buffer.gdb can be used with gdb to retrieve the +contents of buffers from a core dump and save them to files easily, should +emacs crash. + * Startup Changes in Emacs 22.1 ++++ ** New command line option -Q or --quick. This is like using -q --no-site-file, but in addition it also disables the fancy startup screen. @@ -419,6 +425,10 @@ ** The default for the paper size (variable ps-paper-type) is taken from the locale. +** The command `list-faces-display' now accepts a prefix arg. +When passed, the function prompts for a regular expression and lists +only faces matching this regexp. + ** Mark command changes: +++ @@ -776,6 +786,7 @@ The variable `automatic-hscrolling' was renamed to `auto-hscroll-mode'. The old name is still available as an alias. +--- *** Moving or scrolling through images (and other lines) taller that the window now works sensibly, by automatically adjusting the window's vscroll property. @@ -892,8 +903,10 @@ +++ *** New standard font-lock face `font-lock-preprocessor-face'. ++++ *** New standard font-lock face `font-lock-comment-delimiter-face'. ++++ *** Easy to overlook single character negation can now be font-locked. You can use the new variable `font-lock-negation-char-face' and the face of the same name to customize this. Currently the cc-modes, sh-script-mode, @@ -1313,6 +1326,7 @@ like bash's `ESC .' binding. It is bound by default to `C-c .', but otherwise behaves quite similarly to the bash version. ++++ *** `comint-use-prompt-regexp-instead-of-fields' has been renamed `comint-use-prompt-regexp'. The old name has been kept as an alias, but declared obsolete. @@ -1358,9 +1372,11 @@ matches, compilation errors, etc. This minor mode can be toggled with C-c C-f. ++++ *** When the left fringe is displayed, an arrow points to current message in the compilation buffer. ++++ *** The new variable `compilation-context-lines' controls lines of leading context before the current message. If nil and the left fringe is displayed, it doesn't scroll the compilation output window. If there is no left fringe, @@ -1687,6 +1703,7 @@ similar to Refill mode, but more reliable. To turn the word wrap feature off, set `longlines-auto-wrap' to nil. ++++ ** The printing package is now part of the Emacs distribution. If you enable the printing package by including (require 'printing) in @@ -1779,6 +1796,7 @@ * Changes in Specialized Modes and Packages in Emacs 22.1: +--- ** Makefile mode has submodes for automake, gmake, makepp and BSD make. The former two couldn't be differentiated before, and the latter two @@ -2467,6 +2485,7 @@ +++ *** Desktop saving is now a minor mode, `desktop-save-mode'. ++++ *** The variable `desktop-enable' is obsolete. Customize `desktop-save-mode' to enable desktop saving. @@ -2537,6 +2556,7 @@ then it reverts to the old behavior and asks the user to select regions for comparison. ++++ *** The new command `ediff-backup' compares a file with its most recent backup using `ediff'. If you specify the name of a backup file, `ediff-backup' compares it with the file of which it is a backup. @@ -2726,7 +2746,7 @@ --- ** MH-E changes. -Upgraded to MH-E version 7.82. There have been major changes since +Upgraded to MH-E version 7.84. There have been major changes since version 5.0.2; see MH-E-NEWS for details. ** Calendar changes: @@ -3207,6 +3227,10 @@ dangerous; otherwise it returns a reason why the form might be unsafe (calls unknown function, alters global variable, etc). +*** `list-faces-display' takes an optional argument, REGEXP. + +If it is non-nil, the function lists only faces matching this regexp. + ** Lisp code indentation features: +++ @@ -4846,6 +4870,7 @@ to display the size of the accessible part of the buffer on the mode line. ++++ *** Mouse-face on mode-line (and header-line) is now supported. `mode-line-highlight' is the standard face indicating mouse sensitive elements on mode-line (and header-line) like `highlight' face on text
--- a/etc/TUTORIAL.fr Sun Jun 05 01:58:02 2005 +0000 +++ b/etc/TUTORIAL.fr Mon Jun 06 02:39:45 2005 +0000 @@ -746,14 +746,14 @@ périodiquement un fichier de « sauvegarde automatique » pour chaque fichier en cours d'édition. Le nom de ce fichier commence et se termine par un # : si, par exemple, votre fichier s'appelle -« hello.c », son fichier de sauvegarde automatique s'appellera -« #hello.c# ». Lorsque vous sauvegardez le fichier de la façon +« hello.c », son fichier de sauvegarde automatique s'appellera +« #hello.c# ». Lorsque vous sauvegardez le fichier de la façon habituelle, Emacs détruit son fichier de sauvegarde automatique. Si l'ordinateur se plante, vous pouvez récupérer ce qui a été sauvegardé automatiquement en ouvrant normalement le fichier (celui que vous éditiez, pas la sauvegarde automatique), puis en faisant -M-x recover file<Entrée>. Lorsqu'Emacs vous demande de confirmer, +M-x recover file<Entrée>. Lorsqu'Emacs vous demande de confirmer, tapez yes<Entrée> pour continuer et récupérer ainsi les données sauvées par la sauvegarde automatique. @@ -847,7 +847,7 @@ Vous pouvez activer le mode Auto Fill en faisant M-x auto fill mode<Entrée>. Lorsqu'il est activé, vous pouvez le désactiver en -faisant à nouveau M-x auto fill mode<Entrée>. Si le mode est +faisant à nouveau M-x auto fill mode<Entrée>. Si le mode est désactivé, cette commande l'active et, s'il est activé, elle le désactive : on dit que la commande « fait basculer le mode ». @@ -913,10 +913,10 @@ REMARQUE : Sur certains systèmes, C-s gèlera l'écran et vous ne verrez plus rien se produire dans Emacs. Cela indique qu'une -« fonctionnalité » du système d'exploitation, appelée « contrôle de +« fonctionnalité » du système d'exploitation, appelée « contrôle de flux », a intercepté le C-s et ne lui permet pas de parvenir à Emacs. Pour décoincer l'écran, faites C-q puis consultez la section -« Spontaneous Entry to Incremental Search » dans le manuel d'Emacs +« Spontaneous Entry to Incremental Search » dans le manuel d'Emacs pour avoir des avis sur la gestion de cette « fonctionnalité ». Si vous vous trouvez au milieu d'une recherche incrémentale et que @@ -924,7 +924,7 @@ caractère de la chaîne recherchée et que la recherche reprend à l'endroit où elle se trouvait précédemment. Supposons, par exemple, que vous ayiez tapé « c » pour trouver la première occurrence de -« c ». Si vous tapez maintenant « u », le curseur ira sur la première +« c ». Si vous tapez maintenant « u », le curseur ira sur la première occurrence de « cu ». Faites <Delback> : cela supprime le « u » de la chaîne de recherche et le curseur revient à la première occurrence de « c ». @@ -1038,7 +1038,7 @@ ici. Cependant, vous pouvez vouloir en apprendre plus, car il a bien d'autres fonctionnalités utiles. Emacs dispose de commandes pour lire la documentation sur ses commandes. Ces commandes d'« aide » -commencent toutes par le caractère C-h, le « caractère d'aide ». +commencent toutes par le caractère C-h, le « caractère d'aide ». Pour utiliser l'aide, tapez C-h suivi d'un caractère indiquant le type d'aide que vous souhaitez. Si vous êtes VRAIMENT perdu, faites C-h ? @@ -1113,7 +1113,7 @@ C-h i Manuels en ligne (alias Info). Cette commande vous place dans un tampon spéciale, appelé « *info* », où vous pouvez lire les manuels en ligne des paquetages installés sur - votre système. Faites m emacs <Entrée> pour lire le + votre système. Faites m emacs <Entrée> pour lire le manuel d'Emacs. Si vous n'avez jamais utilisé Info auparavant, tapez ? et Emacs vous fera faire une visite guidée des fonctionnalités du mode Info. Lorsque vous @@ -1133,7 +1133,7 @@ La complétion permet d'éviter les frappes inutiles. Si, par exemple, vous voulez basculer vers le tampon *Messages*, tapez simplement -C-x b *M<Tab> et Emacs complètera le nom du tampon s'il peut le +C-x b *M<Tab> et Emacs complètera le nom du tampon s'il peut le déterminer à partir de ce que vous avez saisi avant la tabulation. La complétion est décrite dans la version Info du manuel Emacs, à la rubrique "Completion".
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/emacs-buffer.gdb Mon Jun 06 02:39:45 2005 +0000 @@ -0,0 +1,270 @@ +# emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps + +# Copyright (C) 2005 Free Software Foundation, Inc. + +# Maintainer: Noah Friedman <friedman@splode.com> +# Status: tested with Emacs 22 +# Created: 2005-04-28 + +# This file is part of GNU Emacs. +# +# GNU Emacs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Emacs; see the file COPYING. If not, write to the +# Free Software Foundation, Inc.; 51 Franklin Street, Fifth Floor; +# Boston, MA 02110-1301, USA. + +# Commentary: + +# This is a set of gdb macros for recovering the contents of buffers from +# an Emacs coredump; they may not always be file-backed or have a recent +# autosave. +# +# The Emacs executable must have debugging symbols for this to work. But +# you never strip Emacs, right? Right! +# +# The main commands of interest are `ybuffer-list', `yfile-buffers', +# `ysave-buffer', and `ybuffer-contents'. The `y' prefix avoids any +# namespace collisions with emacs/src/.gdbinit. + +# Example usage: +# +# $ gdb /export/src/emacs/2005-05-02--03-17/src/emacs core.emacs.6.9845 +# Current directory is /u/noah/ +# GNU gdb (6.1post-1.20040607.43rh) +# ... +# #0 0x400007a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 +# (gdb) source emacs-buffer.gdb +# (gdb) ybuffer-list +# B# M Size Name Mode File +# -- - ---- ---- ---- ---- +# 0 * 556 mail to emacs-devel@gnu.org Mail +# 1 * 0 *Minibuf-1* Fundamental +# 2 145769 ChangeLog Change Log /u/noah/lib/elisp/noahf/ChangeLog +# 3 6619 ascii-table.el Elisp /u/noah/lib/elisp/noahf/ascii-table.el +# 4 * 48396 *Messages* Fundamental +# 5 3191 *Apropos* Apropos +# 6 17642 init-21.el Elisp /u/noah/etc/init/emacs/init-21.el +# 7 333 cpuid.c C /u/noah/cpuid.c +# 8 230 src Dired +# 9 218 noah Dired +# 10 * 21 *Echo Area 0* Fundamental +# 11 * 0 *Echo Area 1* Fundamental +# 12 319952 *bbdb data* Text /u/noah/.bbdb +# (gdb) ysave-buffer 0 mail.save +# [Wrote buffer "mail to emacs-devel@gnu.org" to file mail.save] +# (gdb) quit +# $ ls -l mail.save +# -rw-rw-rw- 1 noah user 556 May 2 04:05 mail.save +# $ + +# Code: + +# Force loading of symbols, enough to give us gdb_valbits etc. +set main + +# When nonzero, display some extra diagnostics in various commands +set $yverbose = 1 +set $yfile_buffers_only = 0 + +set $tagmask = (((long)1 << gdb_gctypebits) - 1) +set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1 + +define ygetptr + set $ptr = $arg0 + set $ptr = (gdb_use_union ? $ptr.u.val : $ptr & $valmask) | gdb_data_seg_bits +end + +define ybuffer-list + set $files_only = $yfile_buffers_only + set $yfile_buffers_only = 0 + + if $yverbose + printf "B# M Size Name Mode File\n" + printf "-- - ---- ---- ---- ----\n" + end + + set $i = 0 + set $alist = Vbuffer_alist + while $alist != Qnil + ygetptr $alist + set $this = ((struct Lisp_Cons *) $ptr)->car + set $alist = ((struct Lisp_Cons *) $ptr)->cdr + + # Vbuffer_alist elts are pairs of the form (name . buffer) + ygetptr $this + set $buf = ((struct Lisp_Cons *) $ptr)->cdr + ygetptr $buf + set $buf = (struct buffer *) $ptr + + if ! ($files_only && $buf->filename == Qnil) + ygetptr $buf->name + set $name = ((struct Lisp_String *) $ptr)->data + set $modp = ($buf->text->modiff > $buf->text->save_modiff) ? '*' : ' ' + + ygetptr $buf->mode_name + set $mode = ((struct Lisp_String *) $ptr)->data + + if $buf->filename != Qnil + ygetptr $buf->filename + set $filename = ((struct Lisp_String *) $ptr)->data + else + set $filename = ' ' + end + + printf "%2d %c %9d %-20s %-10s %s\n", \ + $i, $modp, ($buf->text->z_byte - 1), $name, $mode, $filename + end + + set $i++ + end +end +document ybuffer-list + Display a list of buffer names, sizes, and other attributes. + The buffer number in the first column is used as an argument + to some other emacs-buffer recovery commands, e.g. `ysave-buffer'. +end + +define yfile-buffers + set $yfile_buffers_only = 1 + ybuffer-list +end +document yfile-buffers + Display a list of buffers which are associated with files. + This is like `ybuffer-list', but only buffers that were visiting files + are displayed. +end + +define yset-buffer + set $i = $arg0 + + set $alist = Vbuffer_alist + while ($alist != Qnil && $i > 0) + ygetptr $alist + set $alist = ((struct Lisp_Cons *) $ptr)->cdr + set $i-- + end + + # Get car of alist; this is a pair (name . buffer) + ygetptr $alist + set $this = ((struct Lisp_Cons *) $ptr)->car + + # Get the buffer object + ygetptr $this + set $this = ((struct Lisp_Cons *) $ptr)->cdr + + ygetptr $this + set $ycurrent_buffer = (struct buffer *) $ptr +end +document yset-buffer + Set current buffer (for other emacs-buffer recovery commands) to the ARG'th + buffer as displayed by `ybuffer-list'. +end + +define yget-buffer-pointers + yset-buffer $arg0 + set $buf = $ycurrent_buffer->text + + set $beg = $buf->beg + set $gap = $beg + $buf->gpt_byte + set $gap_end = $gap + $buf->gap_size - 1 + set $end = $gap_end + ($buf->z_byte - $buf->gpt_byte) + + set $modp = $buf->modiff > $buf->save_modiff + + #print *$beg@($gap - $beg) + #print *$gap_end@($end - $gap_end) +end +document yget-buffer-pointers + Update convenience variables with address pointers for the ARG'th buffer + as displayed by `ybuffer-list'. + + This also sets the current buffer using `yset-buffer' (which see). +end + +define yget-current-buffer-name + set $this = $ycurrent_buffer->name + ygetptr $this + set $ycurrent_buffer_name = ((struct Lisp_String *) $ptr)->data +end +document yget-current-buffer-name + Set $ycurrent_buffer_name to the name of the currently selected buffer. +end + +define ycurrent-buffer + yget-current-buffer-name + printf "%s\n", $ycurrent_buffer_name +end +document ycurrent-buffer + Display the currently selected buffer. +end + +define ydump-buffer + yget-buffer-pointers $arg0 + if $buf->z_byte > 1 + if $buf->z_byte <= $buf->gpt_byte + set $endptr = $beg + $buf->gpt_byte - 1 + dump binary memory $arg1 $beg $endptr + else + dump binary memory $arg1 $beg $gap-1 + append binary memory $arg1 $gap_end $end + set $endptr = $end + end + end +end +document ydump-buffer + Write contents of buffer N (as numbered according to `ybuffer-list') to + file FILE. + + This is mainly used as an internal subroutine for `ysave-buffer' and + `ybuffer-contents', which see. +end + +define ysave-buffer + ydump-buffer $arg0 $arg1 + if $yverbose + yget-current-buffer-name + if $buf->z_byte <= 1 + printf "[Buffer \"%s\" is empty.]\n", $ycurrent_buffer_name + else + # Output string broken into separate calls as necessary to avoid + # requiring a running process for evaluation. + printf "[Wrote buffer \"%s\" to file ", $ycurrent_buffer_name + echo $arg1]\n + end + end +end +document ysave-buffer + Save contents of buffer N (as numbered according to `ybuffer-list') to + file FILE. +end + +define ybuffer-contents + ydump-buffer $arg0 /dev/stdout + if $yverbose && $buf->z_byte <= 1 + yget-current-buffer-name + printf "[Buffer \"%s\" is empty.]\n", $ycurrent_buffer_name + else + if *($endptr-1) != '\n' + echo \n + end + end +end +document ybuffer-contents + Write contents of buffer N (numbered according to `ybuffer-list') to stdout. +end + +# local variables: +# mode: gdb-script +# end: + +# arch-tag: 02087f62-2663-4868-977a-1fbb2fc2e7ef
--- a/leim/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/leim/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,9 @@ +2005-06-04 Eli Zaretskii <eliz@gnu.org> + + * makefile.w32-in (distclean): Fix a typo (colon was after + "clean"). + (extraclean): New target, emulates Makefile.in. + 2005-04-06 Kenichi Handa <handa@m17n.org> * quail/sgml-input.el ("sgml"): Enable quail-completion by typing
--- a/leim/makefile.w32-in Sun Jun 05 01:58:02 2005 +0000 +++ b/leim/makefile.w32-in Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API. # Copyright (C) 1997, 2004 Electrotechnical Laboratory, JAPAN. -# Licensed to the Free Software Foundation. +# Licensed to the Free Software Foundation. +# Copyright (C) 2005, Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -197,9 +198,12 @@ - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(DEL) leim-list.el -distclean clean: +distclean: clean - $(DELTREE) $(SUBDIRS) - $(DEL) stamp-subdir maintainer-clean: distclean - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) + +extraclean: maintainer-clean + - $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR)
--- a/lib-src/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/lib-src/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,7 @@ +2005-06-04 Eli Zaretskii <eliz@gnu.org> + + * ntlib.h (fileno): Don't define if already defined. + 2005-05-25 Thien-Thi Nguyen <ttn@gnu.org> * yow.c (setup_yow): Use EXIT_FAILURE in case no separators found.
--- a/lib-src/ntlib.h Sun Jun 05 01:58:02 2005 +0000 +++ b/lib-src/ntlib.h Mon Jun 06 02:39:45 2005 +0000 @@ -90,7 +90,9 @@ #define fcloseall _fcloseall #define fdopen _fdopen #define fgetchar _fgetchar +#ifndef fileno #define fileno _fileno +#endif #define flushall _flushall #define fputchar _fputchar #define getcwd _getcwd
--- a/lisp/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,8 +1,612 @@ -2005-05-26 Nick Roberts <nickrob@snap.net.nz> +2005-06-05 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point + to preserve point. + (gdb-find-file-hook): Add doc string. + + * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate + C dereferenced pointer expression. + (gud-tool-bar-map): Put it on the tool bar. Re-order icons. + + * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files. + + * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-down.xpm, + toolbar/gud-finish.xpm, toolbar/gud-ni.xpm, toolbar/gud-n.xpm, + toolbar/gud-print.xpm, toolbar/gud-remove.xpm, toolbar/gud-run.xpm, + toolbar/gud-si.xpm, toolbar/gud-s.xpm, toolbar/gud-until.xpm, + toolbar/gud-up.xpm, toolbar/gud-watch.xpm: + Make background transparent. + +2005-06-04 Luc Teirlinck <teirllm@auburn.edu> + + * font-lock.el (font-lock-add-keywords): Doc fix. Comment change. + (font-lock-remove-keywords): Doc fix. + (font-lock-mode-major-mode): Compiler defvar. + (font-lock-set-defaults): Use `font-lock-mode-major-mode'. + + * font-core.el (font-lock-mode-major-mode): Compiler defvar. + (font-lock-mode): Update `font-lock-mode-major-mode'. + (font-lock-set-defaults): Compiler defvar. + (font-lock-default-function): Take `font-lock-mode-major-mode' + into account. + + * emacs-lisp/easy-mmode.el (define-global-minor-mode): Make it + keep track of which major mode it enabled the minor mode for. + Use find-file-hook again. Update docstring. + + * simple.el (eval-expression-print-level) + (eval-expression-print-length, eval-expression-debug-on-error): + Doc fixes. + +2005-06-04 Matt Hodges <MPHodges@member.fsf.org> + + * iswitchb.el (iswitchb-single-match-face) + (iswitchb-current-match-face, iswitchb-virtual-matches-face) + (iswitchb-invalid-regexp-face): New faces. + (iswitchb-completions): Use them. + (iswitchb-use-faces): Renamed from iswitchb-use-fonts, which is + now marked as an obsolete alias. + (iswitchb-read-buffer): Remove check for bound font variables. + (iswitchb-invalid-regexp): New free variable. + (iswitchb-get-matched-buffers): Catch invalid-regexp errors and + set iswitchb-invalid-regexp. + (iswitchb, iswitchb-complete, iswitchb-completions): Deal with + invalid regexps. + (iswitchb-completions): Add check for complete match when entering + a regexp. + (iswitchb-completions): Remove require-match argument. + (iswitchb-exhibit): Fix caller. + (iswitchb-common-match-inserted): New variable. + (iswitchb-complete, iswitchb-completion-help): Use it. + +2005-06-04 David Reitter <david.reitter@gmail.com> (tiny change) + + * url-http.el (url-http-chunked-encoding-after-change-function): + Use `url-http-debug' instead of `message'. + +2005-06-04 Thierry Emery <thierry.emery@free.fr> (tiny change) + + * url-http.el (url-http-parse-headers): Pass redirected URL as a + callback argument. + +2005-06-04 Kim F. Storm <storm@cua.dk> + + * simple.el (line-move): Only call sit-for when moving backwards. + + * ido.el (ido-make-merged-file-list-1): New defun split from + ido-make-merged-file-list. + (ido-make-merged-file-list): Bind throw-on-input around call to + ido-make-merged-file-list-1. Return input-pending-p if + interrupted by more input available. + (ido-read-internal): Handle input-pending-p return value from + ido-make-merged-file-list. + +2005-06-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/flyspell.el (flyspell-check-word-p): Simplify silly + compatibility code. + + * international/latexenc.el (latexenc-find-file-coding-system): + Don't inherit the EOL part of the coding-system from the + tex-main buffer. Fit within 80 columns. + +2005-06-03 Matt Hodges <MPHodges@member.fsf.org> + + * tmm.el (tmm-inactive-face): New face. + (tmm-remove-inactive-mouse-face): New function. + (tmm-prompt, tmm-add-one-shortcut) + (tmm-add-prompt, tmm-get-keymap): Make active menu items visible + but not selectable. + +2005-06-03 Juanma Barranquero <lekktu@gmail.com> + + * faces.el (face-equal): Improve argument/docstring consistency. + +2005-06-03 Daniel Pfeiffer <occitan@esperanto.org> + + * progmodes/make-mode.el (makefile-targets-face) + (makefile-shell-face, makefile-makepp-perl-face): Add :version. + (makefile-bsdmake-dependency-regex) + (makefile-makepp-rule-action-regex) + (makefile-bsdmake-rule-action-regex): New constants. + (makefile-makepp-mode, makefile-bsdmake-mode): Use them. + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Allow (...) within `...' for makepp messages. + +2005-06-03 Michael Kifer <kifer@cs.stonybrook.edu> + + * ediff-diff.el (ediff-same-contents): Eliminate CL-type functions. + + * ediff-mult.el (ediff-intersect-directories): Make sure that ".." and + "." files are deleted from all file lists before comparison. + + * viper-keym.el (viper-toggle-key, viper-quoted-insert-key) + (viper-ESC-key): Made them customizable. + + * viper.el (viper-non-hook-settings): Fix the names of defadvices. + +2005-06-01 Luc Teirlinck <teirllm@auburn.edu> + + * autorevert.el (auto-revert-buffers): Use save-match-data. + +2005-06-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/easymenu.el (easy-menu-return-item): Quick fix to find + menu items with a nil command binding. + +2005-06-01 Juanma Barranquero <lekktu@gmail.com> + + * emacs-lisp/cl-macs.el (defsetf): + Improve argument/docstring consistency. + + * faces.el (list-faces-display): Improve the formatting by + computing the maximum length required for any face-name (reworked + patch of 1999-01-11, accidentally deleted on 1999-07-21). + (internal-find-face): Remove redundant info in docstring. + +2005-06-01 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-1) + (gdb-info-breakpoints-custom, gdb-delete-breakpoint) + (gdb-goto-breakpoint, gdb-source-info, gdb-get-location) + (gdb-assembler-custom): Improve regexps. + (def-gdb-auto-update-handler): Use window point to preserve + point. + +2005-05-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * thumbs.el (thumbs-mode): Fix misuse of make-variable-buffer-local. + +2005-05-31 Jay Belanger <belanger@truman.edu> + + * calc/calc-embed.el (calc-embedded-word): Change argument passed + to calc-embedded. + (calc-embedded-make-info): Have plain prefix argument select + entire line. + +2005-05-31 Juanma Barranquero <lekktu@gmail.com> + + * faces.el (list-faces-display): Signal error if passed a regexp + that matches no face name. + + * simple.el (filter-buffer-substring): Fix typo in docstring. + +2005-05-31 Richard M. Stallman <rms@gnu.org> + + * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not INTERACTIVE. + (vhdl-emacs-21): Doc fix. + (vhdl-mode): Unconditionally set comment-padding. + (vhdl-fixup-whitespace-region): Insert spaces only where + there are none. + (vhdl-statistics-buffer): Make the Emacs 21 behavior universal. + +2005-05-30 John Wiegley <johnw@newartisans.com> + + * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el + * eshell/em-unix.el, eshell/esh-ext.el, eshell/esh-io.el + * eshell/esh-util.el, eshell/esh-var.el: Change all uses of + `directory-sep-char' to ?/, and all uses of `string-to-int' to + `string-to-number'. + +2005-05-30 Jay Belanger <belanger@truman.edu> + + * calc/calc.el (calc-bug-address): Fix docstring. + (calc-window-hook, calc-trail-window-hook): New variables. + (calc-trail-display): Restore use of calc-trail-window-hook. + (calc): Restore use of calc-window-hook. + +2005-05-31 Masatake YAMATO <jet@gyve.org> + + * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines. + + * help-fns.el (help-C-file-name): Add autoload mark for + `find-function-noselect'. + +2005-05-30 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/tex-mode.el (tex-compile-commands, tex-compile) + (tex-start-tex): Undo all but the last part of the 2005-05-28 change. + +2005-05-30 Glenn Morris <gmorris@ast.cam.ac.uk> + + * calendar/diary-lib.el (mark-included-diary-files): Only kill + included diary buffer if it was not already being visited. + Reported by Stephen Berman <Stephen.Berman@gmx.net>. + + * calendar/icalendar.el (top-level): Do not require 'appt. + + * mail/supercite.el (sc-select-attribution): Only use a list + element from sc-attrib-selection-list if it returns a string. + Reported by Davide G. M. Salvetti <salve@debian.org>. + +2005-05-30 Juanma Barranquero <lekktu@gmail.com> + + * thumbs.el (thumbs-thumbname): The resulting thubname now + includes a hash value to improve its uniqueness, and has a ".jpg" + extension. Also, it is now a valid filename on all systems. + (thumbs-make-thumb): Use `let', not `let*'. + (thumbs-show-thumbs-list): Check for JPEG availability. + +2005-05-30 Richard M. Stallman <rms@gnu.org> + + * filesets.el (filesets-menu-ensure-use-cached): + Prevent warning when emacs-version>= is undefined. + + * printing.el (pr-interactive-n-up): Use string-to-number. + + * emulation/tpu-mapper.el: Use eval-buffer, not eval-current-buffer. + + * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn): + Warn only when name to be defined is quoted. + +2005-05-30 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-toggle-breakpoint): + Make regexp more robust. + (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): + Force regeneration of disassembly. + +2005-05-29 Jay Belanger <belanger@truman.edu> + + * calc/calc.el (calc-user-invocation): Check if + calc-invocation-macro is non-nil. + +2005-05-29 Juri Linkov <juri@jurta.org> + + * add-log.el (change-log-font-lock-keywords): + Add `+' to e-mail regexp to accept mail address with keywords. + + * man.el (Man-name-regexp): Add `:' to accept qualified names. + +2005-05-29 Luc Teirlinck <teirllm@auburn.edu> + + * progmodes/inf-lisp.el (inferior-lisp-mode): Use delay-mode-hooks. + + * ielm.el (inferior-emacs-lisp-mode): Ditto. + +2005-05-29 Richard M. Stallman <rms@gnu.org> + + * textmodes/flyspell.el (flyspell-auto-correct-previous-word): + Undo the change that moves to end of the current word. + +2005-05-29 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-memory-set-repeat-count): + Throw error when count <= 0 to ensure input is a number. + (gdb-read-memory-custom): Pick up address from buffer. + (gdb-memory-mode): Allow user to increment and decrement + memory address from header line. + +2005-05-29 Richard M. Stallman <rms@gnu.org> + + * flyspell.el (flyspell-version): Function deleted. + (flyspell-auto-correct-previous-hook): Doc fix. + + * jit-lock.el (jit-lock-function, jit-lock-after-change): + Do nothing if memory is full. + + * font-lock.el (font-lock-fontify-syntactically-region): + Pass t for GREEDY to looking-back. + + * saveplace.el (save-place-alist-to-file): Write the file + using write-region. + + * subr.el (looking-back): New argument GREEDY. + + * progmodes/compile.el (compilation-start): Set the mode + before inserting the initial text. + + * progmodes/which-func.el (which-func-update-1): Turn the mode + off in case of error by setting which-func-mode. + +2005-05-29 Peter Heslin <p.j.heslin@durham.ac.uk> (tiny change) + + * flyspell.el (flyspell-auto-correct-previous-word): + Narrow down to what's on the screen, and recenter overlays + at the end of the next word. + +2005-05-29 Manuel Serrano <Manuel.Serrano@sophia.inria.fr> + + * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. + (flyspell-default-delayed-commands): Add backward-delete-char-untabify. + (flyspell-abbrev-p): Default to nil. + (flyspell-use-global-abbrev-table-p): Doc fix. + (flyspell-large-region): Allow nil as value. + (flyspell-use-meta-tab, flyspell-auto-correct-binding): New variables. + + (mail-mode-flyspell-verify): More robust handling + of `mail-header-separator'. More efficient signature detection. + Allow for regexp metacharacters in message-header-separator. + Adding `To' not to be checked in mail-mode-flyspell-verify. + + (flyspell-prog-mode): Run flyspell-prog-mode-hook. + (flyspell-mouse-map): Bind M-TAB only if flyspell-use-meta-tab. + Bind flyspell-auto-correct-binding. + Bind C-. and C-, . + (flyspell-mode-map): Likewise. + (flyspell-mode): Doc fix. + (flyspell-accept-buffer-local-defs): Preserve current buffer. + (flyspell-mode-on): Bind flyspell-mouse-map and flyspell-mode-map. + (flyspell-word-cache-result): New var, always local. + (flyspell-check-pre-word-p): Doc fix. + (flyspell-check-changed-word-p): Handle spc like newline. + (flyspell-post-command-hook): Set flyspell-word-cache-result. + (flyspell-word-search-backward, flyspell-word-search-forward): + New functions. + (flyspell-word): Return t if nothing to check. + When parsing TeX code, check for after } or \. + Use flyspell-word-search-backward to find previous word. + Return nil if duplicated word. + For word already checked, return same value as last time. + Set flyspell-word-cache-result after checking. + Don't clobber the return value. + (flyspell-get-word): Major rewrite. + (flyspell-external-point-words): New locals pword, pcount. + Fix size used in progress message. + Find the proper corresponding word in flyspell-large-region-buffer. + (flyspell-region): Check for flyspell-large-region = nil. + (flyspell-highlight-incorrect-region): Clean up overlays in region. + (flyspell-auto-correct-word): Check that WORD is a cons. + (flyspell-correct-word): Likewise. + +2005-05-29 Daniel Pfeiffer <occitan@esperanto.org> + + * progmodes/make-mode.el (makefile-rule-action-regex) + (makefile-macroassign-regex, makefile-makepp-mode) + (makefile-bsdmake-mode): Continuation lines may be empty. + Reported by Joshua Varner. + (makefile-makepp-font-lock-keywords): Add $(stem). + +2005-05-28 Karl Berry <karl@gnu.org> + + * textmodes/tex-mode.el: Now that tex-send-command calls + shell-quote-argument (2005-03-31 change), remove all calls to + shell-quote-argument; they all end up invoking tex-send-command. + The double quoting loses on filenames with non-safe characters, + such as "@". Reported by Frederik Fouvry. + +2005-05-29 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-assembler-custom): Be more careful + about preserving point. + +2005-05-27 Jay Belanger <belanger@truman.edu> + + * calc/calc-misc.el (calc-info-goto-node): Use info instead of + Info-goto-node. + + * calc/calc-embed.el (calc-embed-arg): New variable. + (calc-do-embedded-activate, calc-embedded-activate-formula) + (calc-embedded-edit, calc-do-embedded-activate): Replace undeclared + variable by new variable. + (calc-embedded-make-info): Replace undeclared variable by new + variable. When selecting region with positive prefix + argument, use end of previous line instead of beginning of line. + + * calc/calc-aent.el (calc-arg-values): Declare it. + + * calc/calc-ext.el (calc-help-map, calc-alg-map, calc-alg-esc-map): + Declare them. + + * calc/calc-stuff.el (math-decls-cache-tag): Declare it. + + * calc/calc.el (calc-alg-map): Declare it. + + * calc/calcalg2.el (math-decls-cache, math-decls-all): Declare them. + +2005-05-28 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-all-registers): New variable. + (gdb-registers-buffer, toggle-gdb-all-registers): + Toggle display of floating point registers. + (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers. + + * progmodes/gud.el (gud-goto-info): Use info. Don't use require. + (toggle-gud-tooltip-dereference): + Rename from gud-toggle-tooltip-dereference. + +2005-05-27 Stefan Monnier <monnier@iro.umontreal.ca> + + * info.el (Info-goto-node): Revert autoload addition (2004-06-12). + +2005-05-27 Jay Belanger <belanger@truman.edu> + + * calc/calc-prog.el (calc-kbd-report): Remove. + (calc-kbd-query): Rewrite. + +2005-05-27 Juanma Barranquero <lekktu@gmail.com> + + * image.el (image-library-alist): Move to image.c. + (image-type-available-p): Doc fix. + +2005-05-27 Lute Kamstra <lute@gnu.org> + + * calc/calc.el (calc): + * outline.el (outline-1, outline-2, outline-3, outline-4) + (outline-5, outline-6, outline-7, outline-8): + * textmodes/dns-mode.el (dns-mode): + * textmodes/sgml-mode.el (sgml-namespace-face): + * textmodes/tex-mode.el (superscript, subscript, tex-math-face) + (tex-verbatim-face, tex-use-reftex): + * textmodes/texinfo.el (texinfo-heading-face): + Specify customization group. + + * longlines.el: Don't require easy-mmode. + (longlines-visible-face): Specify customization group. + +2005-05-27 Kenichi Handa <handa@m17n.org> + + * language/cyrillic.el: Add cyrillic-iso8859-5 characters in the + encoding table of windows-1251. + + * international/ucs-tables.el (ucs-set-table-for-input): + If translation-table-for-input of a coding system is a symbol, get + its translation-table property. + + * international/code-pages.el: Don't register a coding system into + non-iso-charset-alist more than once. + (cp-make-coding-system): Likewise. + +2005-05-26 John Wiegley <johnw@newartisans.com> + + * eshell/esh-cmd.el (eshell-eval-command): If the return value of + `eshell-resume-eval' is wrapped in a list, it indicates that the + command was run asynchronously. In that case, unwrap the value + before checking the delimiter value. + + * eshell/em-cmpl.el (eshell-complete-parse-arguments): If the + character before a space at the end of a line is \, assume the space + is part of the last argument rather than a final argument separator. + + * eshell/esh-io.el (eshell-get-target): If `eshell-buffer-shorthand' + is in use, and the target is `t' or `nil' (which are the most common + values), don't assume that the symbol target is a buffer. + +2005-05-26 Luc Teirlinck <teirllm@auburn.edu> + + * calendar/calendar.el (calendar-mode-line-format): + Use mode-line-highlight as mouse-face. + + * time.el (display-time-string-forms, display-time-update): + Use mode-line-highlight as mouse-face. + +2005-05-26 Jay Belanger <belanger@truman.edu> + + * calc/calc.el (calc-language-alist): Remove extra defvar. + +2005-05-26 Lute Kamstra <lute@gnu.org> + + * arc-mode.el (archive-mode): + * bookmark.el (bookmark-read-annotation-mode) + (bookmark-edit-annotation-mode, bookmark-bmenu-mode): + * bs.el (bs-mode): + * calc/calc-yank.el (calc-edit-mode): + * calc/calc.el (calc-mode, calc-trail-mode): + * calculator.el (calculator-mode): + * chistory.el (command-history-mode): + * comint.el: + * cus-edit.el (custom-mode): + * descr-text.el (describe-text-mode): + * ebuff-menu.el (Electric-buffer-menu-mode): + * ediff-util.el (ediff-mode): + * emacs-lisp/re-builder.el (reb-mode): + * emulation/vi.el (vi-mode-setup): + * emulation/ws-mode.el (wordstar-mode): + * eshell/esh-mode.el (eshell-mode): + * forms.el (forms-mode): + * help-mode.el (help-mode): + * hexl.el (hexl-mode): + * ibuffer.el (ibuffer-mode): + * ielm.el (inferior-emacs-lisp-mode): + * info.el (Info-mode, Info-edit-mode): + * international/swedish.el: + * ledit.el (ledit-from-lisp-mode): + * locate.el (locate-mode): + * mail/rmail.el (rmail-mode): + * mail/rmailedit.el (rmail-edit-mode): + * mail/rmailsum.el (rmail-summary-mode): + * mail/supercite.el (sc-electric-mode): + * net/eudc.el (eudc-mode): + * net/quickurl.el (quickurl-list-mode): + * net/snmp-mode.el (snmp-mode, snmpv2-mode): + * obsolete/ooutline.el (outline-mode): + * obsolete/options.el (Edit-options-mode): + * obsolete/rnews.el (news-mode): + * obsolete/rnewspost.el (news-reply-mode): + * play/5x5.el (5x5-mode): + * play/decipher.el (decipher-mode, decipher-stats-mode): + * play/gomoku.el (gomoku-mode): + * play/snake.el (snake-mode): + * play/solitaire.el (solitaire-mode): + * play/tetris.el (tetris-mode): + * progmodes/ada-mode.el (ada-mode): + * progmodes/antlr-mode.el (antlr-mode): + * progmodes/autoconf.el (autoconf-mode): + * progmodes/dcl-mode.el (dcl-mode): + * progmodes/delphi.el (delphi-mode): + * progmodes/ebrowse.el (ebrowse-tree-mode) + (ebrowse-electric-list-mode, ebrowse-member-mode) + (ebrowse-electric-position-mode): + * progmodes/f90.el (f90-mode): + * progmodes/fortran.el (fortran-mode): + * progmodes/icon.el (icon-mode): + * progmodes/idlw-help.el (idlwave-help-mode): + * progmodes/idlw-shell.el (idlwave-shell-mode): + * progmodes/idlwave.el (idlwave-mode): + * progmodes/inf-lisp.el (inferior-lisp-mode): + * progmodes/m4-mode.el (m4-mode): + * progmodes/meta-mode.el (metafont-mode, metapost-mode): + * progmodes/modula2.el (modula-2-mode): + * progmodes/octave-inf.el (inferior-octave-mode): + * progmodes/octave-mod.el (octave-mode): + * progmodes/pascal.el (pascal-mode): + * progmodes/sh-script.el (sh-mode): + * progmodes/sql.el (sql-mode, sql-interactive-mode): + * progmodes/vhdl-mode.el (vhdl-mode): + * progmodes/xscheme.el (scheme-interaction-mode): + * replace.el (occur-mode): + * ses.el (ses-mode): + * simple.el (completion-list-mode): + * skeleton.el: + * speedbar.el (speedbar-mode): + * term.el (term-mode): + * terminal.el (terminal-edit-mode): + * textmodes/reftex-index.el (reftex-index-mode) + (reftex-index-phrases-mode): + * textmodes/reftex-sel.el (reftex-select-label-mode) + (reftex-select-bib-mode): + * textmodes/reftex-toc.el (reftex-toc-mode): + * wdired.el (wdired-change-to-wdired-mode): + * wid-browse.el (widget-browse-mode): + Use run-mode-hooks. + + * array.el (array-mode): + * calendar/todo-mode.el (todo-mode): + * man.el (Man-mode): + * play/landmark.el (lm-mode): + * play/mpuz.el (mpuz-mode): + Use kill-all-local-variables and run-mode-hooks. + + * subr.el (delay-mode-hooks): Specify indentation. + +2005-05-26 Mark A. Hershberger <mah@everybody.org> + + * xml.el (xml-substitute-special): Don't die for undefined xml entities. + +2005-05-26 Jay Belanger <belanger@truman.edu> + + * calc/calc-prog.el (calc-user-define-edit): Don't find substring + of nil. + +2005-05-27 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-frame-address): + Rename from gdb-current-address. + (gdb-previous-frame-address): Rename from gdb-previous-address. + (gdb-selected-frame): Rename from gdb-current-frame. + (gdb-get-selected-frame): Rename from gdb-get-current-frame. + (gdb-frame-number): Rename from gdb-current-stack-level. + (gdb-ann3): Match new mode-name for disassembly buffer. + Extend initialisation of variables. + (gdb-post-prompt): Update disassembly from gdb-frame-handler. + (gdb-memory-mode): Use mouse-face in header line. + (gdb-assembler-buffer-name): Call it disassembly and give frame + in mode line. + (gdb-source-spec-regexp, gdb-assembler-custom) + (gdb-invalidate-assembler, gdb-frame-handler): + Make robust to leading zeroes in address format. + +2005-05-26 Carsten Dominik <dominik@science.uva.nl> + + * textmodes/org.el (org-mode): Use `define-derived-mode' to + define `org-mode'. + (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'. + +2005-05-26 Stefan Monnier <monnier@iro.umontreal.ca> * log-edit.el (log-edit-changelog-entries): Distinguish between filenames like xfns.c and fns.c. - Coded by Stefan Monnier <monnier@iro.umontreal.ca>. 2005-05-25 Luc Teirlinck <teirllm@auburn.edu> @@ -35,7 +639,7 @@ 2005-05-24 Andre Spiegel <spiegel@gnu.org> - * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsoleted. + * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsolete. (cperl-vc-rcs-header, cperl-vc-sccs-header): New user options. (cperl-mode): Use them. @@ -76,11 +680,11 @@ CC Mode update to 5.30.10: - * cc-fonts.el (c-font-lock-declarators): Fixed bug where the point + * cc-fonts.el (c-font-lock-declarators): Fix bug where the point could go past the limit in decoration level 2, thereby causing errors during interactive fontification. - * cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when + * cc-mode.el (c-make-inherited-keymap): Fix cc-bytecomp bug when the file is evaluated interactively. * cc-engine.el (c-guess-basic-syntax): Handle operator @@ -98,7 +702,7 @@ Compensate for return value from `forward-line' when it has moved but not to a different line due to eob. - * cc-engine.el (c-guess-basic-syntax): Fixed anchoring in + * cc-engine.el (c-guess-basic-syntax): Fix anchoring in `objc-method-intro' and `objc-method-args-cont'. 2005-05-23 Alan Mackenzie <bug-cc-mode@gnu.org> @@ -127,8 +731,7 @@ * subr.el (font-lock-defaults): Remove defvar as it's already defined in font-core.el. - * font-lock.el (font-lock-beginning-of-syntax-function): Fix - docstring. + * font-lock.el (font-lock-beginning-of-syntax-function): Fix docstring. 2005-05-23 Nick Roberts <nickrob@snap.net.nz> @@ -140,8 +743,8 @@ * font-core.el: Update comment. - * emacs-lisp/easy-mmode.el (define-global-minor-mode): Use - `after-change-major-mode-hook' instead of `find-file-hook'. + * emacs-lisp/easy-mmode.el (define-global-minor-mode): + Use `after-change-major-mode-hook' instead of `find-file-hook'. * buff-menu.el (Buffer-menu-mode): Use `run-mode-hooks'. @@ -201,15 +804,14 @@ * vc-cvs.el (vc-cvs-checkout-model): Handle the case where FILE doesn't exist. - * vc.el (vc-trunk-p): Add autoload cookie. The function is used - in vc-rcs.el when vc-mistrust-permissions is t, which is not the - default. + * vc.el (vc-trunk-p): Add autoload cookie. The function is used in + vc-rcs.el when vc-mistrust-permissions is t, which is not the default. 2005-05-22 Nick Roberts <nickrob@snap.net.nz> * emacs-lisp/bytecomp.el: Remove make-obsolete-variable for already deleted variables: auto-fill-hook, blink-paren-hook, - lisp-indent-hook, inhibit-local-variables, unread-command-event + lisp-indent-hook, inhibit-local-variables, unread-command-event, suspend-hooks, comment-indent-hook, meta-flag, before-change-function, after-change-function, font-lock-doc-string-face. @@ -451,7 +1053,7 @@ post-command-idle-delay. * faces.el (list-faces-display): Provide button when describe-face - is called to take user back to the list of faces. + is called to take user back to the list of faces. * help-fns.el (describe-variable): Remove hyperlinks in a variable's value as these are quite frequently inappropriate. @@ -721,8 +1323,8 @@ * progmodes/compile.el (compilation-setup): Set local value of overlay-arrow-string to "" always. - (compilation-set-window): Left fringe then don't scroll. No left - fringe then no arrow and scroll message to top. + (compilation-set-window): Left fringe then don't scroll. + No left fringe then no arrow and scroll message to top. (compilation-context-lines): Adjust doc string accordingly. 2005-05-16 Kim F. Storm <storm@cua.dk> @@ -981,7 +1583,7 @@ 2005-05-11 Stefan Monnier <monnier@iro.umontreal.ca> - * files.el (executable-find): Move from executable.el. Use locate-file. + * files.el (executable-find): Move from executable.el. Use locate-file. * progmodes/executable.el (executable-find): Move to files.el. * font-lock.el (font-lock-fontify-keywords-region): Use a marker @@ -1031,10 +1633,10 @@ * progmodes/gdb-ui.el (gdb-macro-info): New variable. (gdb-source-info): Check for preprocessor info. - (gdb-tooltip-print-1): New function. Don't print tooltip if it is + (gdb-tooltip-print-1): New function. Don't print tooltip if it is a macro for a function. + (gdb-info-breakpoints-custom): Try to find file again if not already found (user might have used GDB dir command). - (gdb-info-breakpoints-custom): Try to find file again if not already (gdb-get-location): Update gdb-location-alist correctly for change to gdb-info-breakpoints-custom. @@ -1130,7 +1732,7 @@ * tooltip.el: Move code for GUD tooltips into gud.el. (require): CL no longer needed to compile case. (tooltip-mode): Do not toggle functions for GUD tooltips. - (tooltip-gud-tips-p): Remove. Replace with minor mode + (tooltip-gud-tips-p): Remove. Replace with minor mode gud-tooltip-mode in gud.el. (tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area) (tooltip-gud-toggle-dereference): Rename in gud.el by replacing @@ -1142,14 +1744,14 @@ (tooltip-gud-original-filter, tooltip-gud-dereference) (tooltip-gud-event, tooltip-toggle-gud-tips) (tooltip-gud-process-output, tooltip-gud-print-command) - (tooltip-gud-tips): GUD tooltip functions/variables. Rename in + (tooltip-gud-tips): GUD tooltip functions/variables. Rename in gud.el by replacing tooltip-gud prefix with gud-tooltip. (gdb-tooltip-print): Move to gdb-ui.el. * progmodes/gud.el: Move code for GUD tooltips from tooltip.el. (require): CL needed to compile case. (gud-tooltip-mode): Use to toggle GUD tooltips unstead of - tooltip-gud-tips-p. Make it a minor-mode. + tooltip-gud-tips-p. Make it a minor-mode. (gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t. (gud-menu-map): GUD tooltips use gud-tooltip-mode now. (gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area) @@ -1245,7 +1847,7 @@ * ido.el (ido-setup-hook): New hook. (ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead. (ido-input-stack): New var. - (ido-define-mode-map): Bind M-b to ido-push-dir. Move old + (ido-define-mode-map): Bind M-b to ido-push-dir. Move old ido-next-work-file binding to M-O. Bind M-f to ido-wide-find-file-or-pop-dir. (ido-define-mode-map): Don't run ido-define-mode-map-hook. @@ -1338,7 +1940,7 @@ (gdb-set-gud-minor-mode-1): Handle gdb-define-alist. (gdb-source, gdb-memory-set-repeat-count): Replace string-to-int with string-to-number. - (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. + (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. * progmodes/gud.el: Replace string-to-int with string-to-number. (gud-find-file): Handle gdb-define-alist. @@ -1384,7 +1986,7 @@ move to cc-vars.el. * progmodes/cc-vars.el (cc-define-list-program): - Change to "gcc -E -dM -". Make customizable. + Change to "gcc -E -dM -". Make customizable. 2005-05-02 Kim F. Storm <storm@cua.dk> @@ -1435,7 +2037,7 @@ * subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo) (compiled-function-p, focus-frame, unfocus-frame): Remove aliases and obsolete declarations. - Back out inadvertant changes from previous commit. + Back out inadvertent changes from previous commit. 2005-05-01 Luc Teirlinck <teirllm@auburn.edu> @@ -1490,7 +2092,7 @@ 2005-04-30 Nick Roberts <nickrob@snap.net.nz> * progmodes/cc-mode.el (cc-create-define-alist): Check that file - exists. Initialise cc-define-alist. + exists. Initialise cc-define-alist. (c-mode): Add cc-create-define-alist locally to after-save-hook. If there is no file (Macroexpansion) don't create an alist. @@ -1580,7 +2182,7 @@ 2005-04-28 Nick Roberts <nickrob@snap.net.nz> - * progmodes/cc-mode.el: (cc-create-define-alist): New function. + * progmodes/cc-mode.el (cc-create-define-alist): New function. (cc-define-alist): New variable. (c-mode): Make it local and initialise it. @@ -1709,7 +2311,7 @@ 2005-04-25 Dan Nicolaescu <dann@ics.uci.edu> * term.el (ansi-term-color-vector): Use the xterm colors. - (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar. + (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar. 2005-04-25 Lute Kamstra <lute@gnu.org> @@ -2731,13 +3333,13 @@ * add-log.el (change-log-font-lock-keywords): The manual describing a Change Log entry, says: (...) "Aside from these header lines, every line in the change log starts with a space or - a tab.". The font-lock was not highlighting lines started with + a tab.". The font-lock was not highlighting lines started with spaces, added support for it. 2005-04-03 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> * textmodes/bibtex.el (bibtex-url): Use format to generate the url. - (bibtex-generate-url-list): Update docstring accordingly. Put the + (bibtex-generate-url-list): Update docstring accordingly. Put the complex example in the docstring. (bibtex-font-lock-url): Use pop. @@ -2770,7 +3372,7 @@ 2005-04-02 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change) - * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional + * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional mailbox specifications as well as URLs. (rmail-insert-inbox-text): Remove unused conditional branches. @@ -2872,12 +3474,7 @@ (fill-newline): Use fill-text-properties-at instead of text-properties-at. -2005-03-31 Karl Berry <karl@freefriends.org> - - * textmodes/tex-mode.el (tex-compile): Use shell-quote-argument, - not comint-quote-filename. - -2005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change) +2005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change) * textmodes/tex-mode.el (tex-start-tex) Use shell-quote-argument, not comint-quote-filename. @@ -3016,12 +3613,12 @@ (hs-special-modes-alist): Add a Fortran entry. (fortran-mode-map): Bind fortran-end-of-block, fortran-beginning-of-block to \M-\C-n, \M-\C-p. - (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4. + (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4. (fortran-looking-at-if-then, fortran-end-of-block) (fortran-beginning-of-block): New functions, for hideshow. - * progmodes/f90.el (f90-end-block-re, f90-start-block-re): Doc - fix. Tweak regexp. + * progmodes/f90.el (f90-end-block-re, f90-start-block-re): + Doc fix. Tweak regexp. (f90-beginning-of-block): Push mark first. 2005-03-29 Jay Belanger <belanger@truman.edu> @@ -3039,7 +3636,7 @@ * vc.el (vc-do-command): Use a pipe for async processes, so password prompts don't show up at places where the user can't reply. -2005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change) +2005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change) * textmodes/tex-mode.el (tex-send-command): shell-quote-argument on the file name we pass to the inferior shell. @@ -3269,11 +3866,11 @@ * calendar/calendar.el: Replace `legal' with `valid'. * emacs-lisp/advice.el: Replace `legal' with `valid'. * mail/supercite.el: Replace `legal' with `valid'. - * progmodes/cperl-mode.el, progmodes/idlw-shell.el, - progmodes/idlwave.el, progmodes/vhdl-mode.el: Replace `legal' with - `valid'. - * textmodes/reftex-vars.el, textmodes/reftex.el: Replace `legal' - with `valid'. + * progmodes/cperl-mode.el, progmodes/idlw-shell.el + * progmodes/idlwave.el, progmodes/vhdl-mode.el: + Replace `legal' with `valid'. + * textmodes/reftex-vars.el, textmodes/reftex.el: + Replace `legal' with `valid'. 2005-03-25 Werner Lemberg <wl@gnu.org> @@ -3283,15 +3880,15 @@ * emulation/vip.el: Replace `illegal' with `invalid'. * eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with `invalid'. * mail/supercite.el: Replace `illegal' with `invalid'. - * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el, - progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el, - progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el, - progmodes/sh-script.el, progmodes/xscheme.el: Replace `illegal' with - `invalid'. - * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el, - textmodes/reftex-index.el, textmodes/reftex-parse.el, - textmodes/reftex-ref.el, textmodes/reftex-vars.el, - textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'. + * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el + * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el + * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el + * progmodes/sh-script.el, progmodes/xscheme.el: + Replace `illegal' with `invalid'. + * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el + * textmodes/reftex-index.el, textmodes/reftex-parse.el + * textmodes/reftex-ref.el, textmodes/reftex-vars.el + * textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'. 2005-03-24 Stefan Monnier <monnier@iro.umontreal.ca> @@ -3412,11 +4009,11 @@ (recentf-include-p): More robust. (recentf-keep-p): New function. (recentf-remove-if-non-kept): Rename from - `recentf-remove-if-non-readable'. Use `recentf-keep-p'. + `recentf-remove-if-non-readable'. Use `recentf-keep-p'. All callers updated. (recentf-menu-items-for-commands): Fix help string. - (recentf-track-closed-file): Update. Doc fix. - (recentf-cleanup): Update. Count removed files. Doc fix. + (recentf-track-closed-file): Update. Doc fix. + (recentf-cleanup): Update. Count removed files. Doc fix. 2005-03-23 Kim F. Storm <storm@cua.dk> @@ -4132,7 +4729,7 @@ * files.el (mode-require-final-newline): Doc fix. -2005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change) +2005-03-03 Stephan Stahl <stahl@eos.franken.de> (tiny change) * progmodes/which-func.el (which-function): Specify NOERROR when calling imenu--make-index-alist. @@ -4727,7 +5324,7 @@ * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable. (gdb-set-gud-minor-mode, gdb-set-gud-minor-mode-1) (gdb-set-gud-minor-mode-existing-buffers): New functions. - (gdb-find-file-hook): New hook. Add it to find-file-hook. + (gdb-find-file-hook): New hook. Add it to find-file-hook. (gdb-info-breakpoints-custom, gdb-source-info): Simplify. 2005-02-14 Luc Teirlinck <teirllm@auburn.edu> @@ -4891,13 +5488,13 @@ 2005-02-05 Nick Roberts <nickrob@snap.net.nz> - * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before + * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before GDB-Windows on the menu-bar as this works better. 2005-02-04 Jay Belanger <belanger@truman.edu> * calc/calc-embed.el (calc-embedded-update): Don't put in - unnecessary newlines. Adjust the end of formula marker. + unnecessary newlines. Adjust the end of formula marker. * calc/calc-lang.el (math-latex-parse-frac): Don't use arguments. (math-latex-parse-two-args): New function. @@ -4959,7 +5556,7 @@ 2005-02-02 Nick Roberts <nickrob@snap.net.nz> - * progmodes/gdb-ui.el: (gdb-goto-info): Delete. + * progmodes/gdb-ui.el (gdb-goto-info): Delete. * progmodes/gud.el (gud-goto-info): New function. (gud-tool-bar-map): Use correct icon. @@ -5667,8 +6264,8 @@ 2005-01-11 Juri Linkov <juri@jurta.org> - * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm, - * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm, + * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm + * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm * toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons. * info.el (Info-history-forward): New variable. @@ -6392,7 +6989,7 @@ 2004-12-21 Eli Barzilay <eli@barzilay.org> - * calculator.el: (calculator-radix-grouping-mode) + * calculator.el (calculator-radix-grouping-mode) (calculator-radix-grouping-digits) (calculator-radix-grouping-separator): New defcustoms for the new radix grouping mode functionality. @@ -6593,11 +7190,11 @@ (zone-replace-char): New defsubst. (zone-park/sit-for): Likewise. (zone-fret): Take window-start arg. - Update callers. Use `zone-park/sit-for'. + Update callers. Use `zone-park/sit-for'. (zone-fill-out-screen): Rewrite. - (zone-fall-through-ws): Likewise. Update callers. + (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'. + 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'. @@ -7438,16 +8035,16 @@ (tramp-file-name-handler-alist): Delete file-directory-files, add directory-files-and-attributes. (tramp-perl-file-attributes): Surround uid and gid by double - quotes. Change parameter id-format from nonnumeric. + quotes. Change parameter id-format from nonnumeric. (tramp-convert-file-attributes): New function. (tramp-handle-file-attributes): Use it. (tramp-maybe-send-perl-script): New function. - (tramp-handle-file-attributes-with-perl): Use it. Don't convert - file mode. Change parameter id-format from nonnumeric. + (tramp-handle-file-attributes-with-perl): Use it. Don't convert + file mode. Change parameter id-format from nonnumeric. (tramp-handle-file-attributes-with-ls): Change parameter id-format from nonnumeric. (tramp-post-connection): Don't send tramp-perl-file-attributes - script. Reset connection property "perl-scripts". + script. Reset connection property "perl-scripts". (tramp-handle-insert-directory): Run real handler when ls-lisp is in use. @@ -7470,7 +8067,7 @@ (gdb-view-source-function, gdb-view-assembler): Delete functions. (menu): Delete menu bindings for viewing source/assembler. (gdb-setup-windows, gdb-restore-windows): - Don't dedicate GUD. No assembler now. + Don't dedicate GUD. No assembler now. (gdb-reset): No need to undedicate source buffers now. (gdb-source-info): No assembler now. @@ -7597,7 +8194,7 @@ (gdb-var-evaluate-expression-handler, gdb-put-string): Remove unused variable bindings. (gdb-setup-windows, gdb-display-buffer): - Simplify. Use pop-to-buffer. + Simplify. Use pop-to-buffer. (gdb-view-source-function): Simplify. (gdb-frame-breakpoints-buffer): Use pop-to-buffer, special-display-regexps. @@ -7681,8 +8278,8 @@ * progmodes/gdb-ui.el (dedicated-switch-to-buffer): New function. (gdb-ann3, gdb-setup-windows, gdb-restore-windows): Dedicate gdb-related windows. - (gdb-display-buffer): Dedicate gdb-related windows. Don't grab - other frames. + (gdb-display-buffer): Dedicate gdb-related windows. + Don't grab other frames. (gdb-reset): Remove dedicated property after debugging. 2004-11-24 Jay Belanger <belanger@truman.edu> @@ -8548,8 +9145,8 @@ 2004-11-10 Nick Roberts <nickrob@snap.net.nz> - * tooltip.el: Don't require cl, comint, gud, gdb-ui for - compilation. The resulting compiler warnings appear to be harmless. + * tooltip.el: Don't require cl, comint, gud, gdb-ui for compilation. + The resulting compiler warnings appear to be harmless. 2004-11-10 Daniel Pfeiffer <occitan@esperanto.org> @@ -9772,7 +10369,7 @@ * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and reset kmacro-initial-counter-value if set. (kmacro-set-counter): Only set kmacro-counter if defining or executing - macro. Set kmacro-initial-counter-value otherwise. Never set both. + macro. Set kmacro-initial-counter-value otherwise. Never set both. (kmacro-display): Show macro counter if non-zero. * subr.el (substitute-key-definition): Mention command remapping @@ -9959,8 +10556,8 @@ * term.el (term-adjust-current-row-cache): Don't allow the current row to become negative. - (term-emulate-terminal): Fix insert mode. Handle tab insertion at - the end of the line. Fix scroll down. Add comments. + (term-emulate-terminal): Fix insert mode. Handle tab insertion at + the end of the line. Fix scroll down. Add comments. (term-handle-ansi-escape): Don't exceed terminal width when moving right. (term-scroll-region): Move the cursor after setting the scroll region. @@ -10115,7 +10712,7 @@ * calendar/holidays.el (holiday-advent): Report on a specified day offset from advent, not just advent. (holiday-easter-etc): Report on one specified day offset from - easter, not all easter holidays. Various Easter holidays moved to + easter, not all easter holidays. Various Easter holidays moved to `christian-holidays' variable in calendar.el. * calendar/calendar.el (christian-holidays): Adapt for new behaviour of `holiday-advent' and `holiday-easter-etc' functions. @@ -10130,7 +10727,7 @@ (ido-read-internal): Handle new `list' context. Handle insert-buffer and insert-file ido-exit values. (ido-buffer-internal): New arg switch-cmd. Use it to setup - ido-context-switch-command. Handle insert-file ido-exit value. + ido-context-switch-command. Handle insert-file ido-exit value. (ido-read-buffer): Set ido-context-switch-command to 'ignore unless it is already bound by caller. (ido-file-internal): New arg switch-cmd. Use it to setup @@ -10460,7 +11057,7 @@ Do not call obsolete function compilation-parse-errors. (bibtex-remove-delimiters): Only remove delimiters if present. (bibtex-copy-entry-as-kill): Add docstring. - (bibtex-clean-entry): Use bibtex-string=. Handle empty keys. + (bibtex-clean-entry): Use bibtex-string=. Handle empty keys. Detect duplicate keys if bibtex-maintain-sorted-entries is nil. (bibtex-complete): Use bibtex-predefined-month-strings, bibtex-string=, and new function bibtex-complete-key-cleanup. @@ -11146,8 +11743,8 @@ when `c-opt-type-concat-key' is used (i.e. in Pike). * progmodes/cc-engine.el (c-looking-at-special-brace-list): - Fix bug when the inner char pair doesn't have paren syntax, i.e. "(< - >)". + Fix bug when the inner char pair doesn't have paren syntax, + i.e. "(<>)". * progmodes/cc-align.el (c-lineup-multi-inher): Made it syntactic whitespace safe. @@ -11227,7 +11824,7 @@ string. (2) Check that settings to `c-offsets-alist' are not spuriously quoted. - * progmodes/cc-cmds.el: (c-electric-brace): Don't delete a comment + * progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment which precedes the newly inserted `{'. 2004-08-10 Michael Albinus <michael.albinus@gmx.de> @@ -11880,7 +12477,7 @@ 2004-06-23 Nick Roberts <nickrob@gnu.org> - * comint.el: (comint-insert-clicked-input, comint-copy-old-input): + * comint.el (comint-insert-clicked-input, comint-copy-old-input): Remove. (comint-insert-input, comint-mouse-insert-input): New functions based on comint-insert-clicked-input for two bindings but just @@ -12391,7 +12988,7 @@ 2004-06-04 Karl Fogel <kfogel@red-bean.com> - * vc-svn.el (vc-svn-checkin): Use 'nconc' instead of 'list*', + * vc-svn.el (vc-svn-checkin): Use `nconc' instead of `list*', because the latter is a CL-ism. This fixes the bug reported by Shawn Boyette <mdxi@collapsar.net> in http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00442.html. @@ -13331,9 +13928,9 @@ of 19 months of 19 days, with 4 intercalary days. Each year begins on March 21, with the calendar starting in 1844. - * calendar/cal-menu.el, calendar/calendar.el, - calendar/diary-lib.el, calendar/holidays.el: Added support for - using cal-bahai.el. + * calendar/cal-menu.el, calendar/calendar.el + * calendar/diary-lib.el, calendar/holidays.el: + Added support for using cal-bahai.el. * eshell/em-glob.el (eshell-glob-initialize): Move initialization of `eshell-glob-chars-regexp' into `eshell-glob-regexp', so that @@ -14157,7 +14754,7 @@ * emacs-lisp/rx.el (rx-syntax): Move sregex style syntax to code. (rx-bracket, rx-check-any, rx-any): Clean up name space. - * wdired.el: (wdired-mode-map): Move init into declaration. + * wdired.el (wdired-mode-map): Move init into declaration. Fix `return' binding. (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): Use force-mode-line-update. @@ -15700,7 +16297,7 @@ 2004-03-15 David Ponce <david@dponce.com> - * ruler-mode.el: (ruler-mode-left-fringe-cols) + * ruler-mode.el (ruler-mode-left-fringe-cols) (ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols) (ruler-mode-right-scroll-bar-cols): Remove. (ruler-mode-window-col, ruler-mode-mouse-set-left-margin) @@ -16447,7 +17044,7 @@ 2004-02-16 Eli Tziperman <eli@deas.harvard.edu> - * rmail-spam-filter.el: (vm-use-spam-filter) + * rmail-spam-filter.el (vm-use-spam-filter) (rsf-min-region-length-added-to-spam-list): New variables. (rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from rmail-bbdb-auto-delete-spam-entries. Add cc: to recipients for @@ -17105,7 +17702,7 @@ * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline. -2004-01-18 David Ponce <david@dponce.com> (tiny change) +2004-01-18 David Ponce <david@dponce.com> (tiny change) * progmodes/which-func.el (which-function-mode): Don't cancel which-func-update-timer if not set. @@ -19619,10 +20216,10 @@ * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix. (cal-tex-LaTeX-hourbox): Move definition before use. - * calendar/cal-china.el, cal-hebrew.el, cal-islam.el, - cal-julian.el, cal-menu.el, cal-move.el, holidays.el, - lunar.el, solar.el - (displayed-month, displayed-year): Define for compiler. + * calendar/cal-china.el, cal-hebrew.el, cal-islam.el + * cal-julian.el, cal-menu.el, cal-move.el, holidays.el + * lunar.el, solar.el (displayed-month, displayed-year): + Define for compiler. 2003-08-03 Martin Stjernholm <bug-cc-mode@gnu.org>
--- a/lisp/add-log.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/add-log.el Mon Jun 06 02:39:45 2005 +0000 @@ -220,7 +220,7 @@ ("^\\sw.........[0-9:+ ]*" (0 'change-log-date-face) ;; Name and e-mail; some people put e-mail in parens, not angles. - ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil + ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil (1 'change-log-name-face) (2 'change-log-email-face))) ;;
--- a/lisp/arc-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/arc-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -689,7 +689,7 @@ (setq major-mode 'archive-mode) (setq mode-name (concat typename "-Archive")) ;; Run archive-foo-mode-hook and archive-mode-hook - (run-hooks (archive-name "mode-hook") 'archive-mode-hook) + (run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook) (use-local-map archive-mode-map)) (make-local-variable 'archive-proper-file-start)
--- a/lisp/array.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/array.el Mon Jun 06 02:39:45 2005 +0000 @@ -872,6 +872,7 @@ Entering array mode calls the function `array-mode-hook'." (interactive) + (kill-all-local-variables) ;; Number of rows in the array. (make-local-variable 'array-max-row) ;; Number of columns in the array. @@ -907,7 +908,7 @@ (setq truncate-lines t) (setq overwrite-mode 'overwrite-mode-textual) (use-local-map array-mode-map) - (run-hooks 'array-mode-hook)) + (run-mode-hooks 'array-mode-hook))
--- a/lisp/autorevert.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/autorevert.el Mon Jun 06 02:39:45 2005 +0000 @@ -484,46 +484,47 @@ This function is also responsible for removing buffers no longer in Auto-Revert mode from `auto-revert-buffer-list', and for canceling the timer when no buffers need to be checked." - (let ((bufs (if global-auto-revert-mode - (buffer-list) - auto-revert-buffer-list)) - (remaining ()) - (new ())) - ;; Partition `bufs' into two halves depending on whether or not - ;; the buffers are in `auto-revert-remaining-buffers'. The two - ;; halves are then re-joined with the "remaining" buffers at the - ;; head of the list. - (dolist (buf auto-revert-remaining-buffers) - (if (memq buf bufs) - (push buf remaining))) - (dolist (buf bufs) - (if (not (memq buf remaining)) - (push buf new))) - (setq bufs (nreverse (nconc new remaining))) - (while (and bufs - (not (and auto-revert-stop-on-user-input - (input-pending-p)))) - (let ((buf (car bufs))) - (if (buffer-name buf) ; Buffer still alive? - (with-current-buffer buf - ;; Test if someone has turned off Auto-Revert Mode in a - ;; non-standard way, for example by changing major mode. - (if (and (not auto-revert-mode) - (not auto-revert-tail-mode) - (memq buf auto-revert-buffer-list)) - (setq auto-revert-buffer-list - (delq buf auto-revert-buffer-list))) - (when (auto-revert-active-p) (auto-revert-handler))) - ;; Remove dead buffer from `auto-revert-buffer-list'. - (setq auto-revert-buffer-list - (delq buf auto-revert-buffer-list)))) - (setq bufs (cdr bufs))) - (setq auto-revert-remaining-buffers bufs) - ;; Check if we should cancel the timer. - (when (and (not global-auto-revert-mode) - (null auto-revert-buffer-list)) - (cancel-timer auto-revert-timer) - (setq auto-revert-timer nil)))) + (save-match-data + (let ((bufs (if global-auto-revert-mode + (buffer-list) + auto-revert-buffer-list)) + (remaining ()) + (new ())) + ;; Partition `bufs' into two halves depending on whether or not + ;; the buffers are in `auto-revert-remaining-buffers'. The two + ;; halves are then re-joined with the "remaining" buffers at the + ;; head of the list. + (dolist (buf auto-revert-remaining-buffers) + (if (memq buf bufs) + (push buf remaining))) + (dolist (buf bufs) + (if (not (memq buf remaining)) + (push buf new))) + (setq bufs (nreverse (nconc new remaining))) + (while (and bufs + (not (and auto-revert-stop-on-user-input + (input-pending-p)))) + (let ((buf (car bufs))) + (if (buffer-name buf) ; Buffer still alive? + (with-current-buffer buf + ;; Test if someone has turned off Auto-Revert Mode in a + ;; non-standard way, for example by changing major mode. + (if (and (not auto-revert-mode) + (not auto-revert-tail-mode) + (memq buf auto-revert-buffer-list)) + (setq auto-revert-buffer-list + (delq buf auto-revert-buffer-list))) + (when (auto-revert-active-p) (auto-revert-handler))) + ;; Remove dead buffer from `auto-revert-buffer-list'. + (setq auto-revert-buffer-list + (delq buf auto-revert-buffer-list)))) + (setq bufs (cdr bufs))) + (setq auto-revert-remaining-buffers bufs) + ;; Check if we should cancel the timer. + (when (and (not global-auto-revert-mode) + (null auto-revert-buffer-list)) + (cancel-timer auto-revert-timer) + (setq auto-revert-timer nil))))) ;; The end:
--- a/lisp/bookmark.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/bookmark.el Mon Jun 06 02:39:45 2005 +0000 @@ -866,7 +866,7 @@ (use-local-map bookmark-read-annotation-mode-map) (setq major-mode 'bookmark-read-annotation-mode) (insert (funcall bookmark-read-annotation-text-func bookmark)) - (run-hooks 'text-mode-hook)) + (run-mode-hooks 'text-mode-hook)) (defun bookmark-read-annotation (parg bookmark) @@ -903,7 +903,7 @@ (let ((annotation (bookmark-get-annotation bookmark))) (if (and annotation (not (string-equal annotation ""))) (insert annotation))) - (run-hooks 'text-mode-hook)) + (run-mode-hooks 'text-mode-hook)) (defun bookmark-send-edited-annotation () @@ -1618,7 +1618,7 @@ (setq buffer-read-only t) (setq major-mode 'bookmark-bmenu-mode) (setq mode-name "Bookmark Menu") - (run-hooks 'bookmark-bmenu-mode-hook)) + (run-mode-hooks 'bookmark-bmenu-mode-hook)) (defun bookmark-bmenu-toggle-filenames (&optional show)
--- a/lisp/bs.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/bs.el Mon Jun 06 02:39:45 2005 +0000 @@ -656,7 +656,7 @@ truncate-lines t font-lock-defaults '(bs-mode-font-lock-keywords t) font-lock-verbose nil) - (run-hooks 'bs-mode-hook)) + (run-mode-hooks 'bs-mode-hook)) (defun bs-kill () "Let buffer disappear and reset window-configuration."
--- a/lisp/calc/calc-aent.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-aent.el Mon Jun 06 02:39:45 2005 +0000 @@ -947,6 +947,9 @@ first nil)) x)) +;; calc-arg-values is defined in calc-ext.el, but is used here. +(defvar calc-arg-values) + (defun calc-check-user-syntax (&optional x prec) (let ((p calc-user-parse-table) (matches nil)
--- a/lisp/calc/calc-embed.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-embed.el Mon Jun 06 02:39:45 2005 +0000 @@ -192,8 +192,15 @@ (defvar calc-embed-top) (defvar calc-embed-bot) +;; The variable calc-embed-arg is local to calc-do-embedded, +;; calc-embedded-update-formula, calc-embedded-edit and +;; calc-do-embedded-activate, but is used by +;; calc-embedded-make-info, which is called by the above +;; functions. +(defvar calc-embed-arg) + (defvar calc-embedded-quiet nil) -(defun calc-do-embedded (arg end obeg oend) +(defun calc-do-embedded (calc-embed-arg end obeg oend) (if calc-embedded-info ;; Turn embedded mode off or switch to a new buffer. @@ -237,7 +244,7 @@ (buffer-name))) (keyboard-quit)) (calc-embedded nil))) - (calc-embedded arg end obeg oend))) + (calc-embedded calc-embed-arg end obeg oend))) ;; Turn embedded mode on. (calc-plain-buffer-only) @@ -250,7 +257,8 @@ (calc-embedded-save-original-modes) (or calc-embedded-globals (calc-find-globals)) - (setq info (calc-embedded-make-info (point) nil t arg end obeg oend)) + (setq info + (calc-embedded-make-info (point) nil t calc-embed-arg end obeg oend)) (if (eq (car-safe (aref info 8)) 'error) (progn (setq calc-embedded-original-modes nil) @@ -311,13 +319,13 @@ (calc-select-part 2))) -(defun calc-embedded-update-formula (arg) +(defun calc-embedded-update-formula (calc-embed-arg) (interactive "P") - (if arg + (if calc-embed-arg (let ((entry (assq (current-buffer) calc-embedded-active))) (while (setq entry (cdr entry)) (and (eq (car-safe (aref (car entry) 8)) 'calcFunc-evalto) - (or (not (consp arg)) + (or (not (consp calc-embed-arg)) (and (<= (aref (car entry) 2) (region-beginning)) (>= (aref (car entry) 3) (region-end)))) (save-excursion @@ -337,9 +345,9 @@ (goto-char (+ (aref info 4) pt)))))))) -(defun calc-embedded-edit (arg) +(defun calc-embedded-edit (calc-embed-arg) (interactive "P") - (let ((info (calc-embedded-make-info (point) nil t arg)) + (let ((info (calc-embedded-make-info (point) nil t calc-embed-arg)) str) (if (eq (car-safe (aref info 8)) 'error) (progn @@ -374,12 +382,12 @@ (aset info 8 val) (calc-embedded-update info 14 t t)))) -(defun calc-do-embedded-activate (arg cbuf) +(defun calc-do-embedded-activate (calc-embed-arg cbuf) (calc-plain-buffer-only) - (if arg + (if calc-embed-arg (calc-embedded-forget)) (calc-find-globals) - (if (< (prefix-numeric-value arg) 0) + (if (< (prefix-numeric-value calc-embed-arg) 0) (message "Deactivating %s for Calc Embedded mode" (buffer-name)) (message "Activating %s for Calc Embedded mode..." (buffer-name)) (save-excursion @@ -432,7 +440,7 @@ (defun calc-embedded-word () (interactive) - (calc-embedded '(4))) + (calc-embedded '(t))) (defun calc-embedded-mark-formula (&optional body-only) "Put point at the beginning of this Calc formula, mark at the end. @@ -799,16 +807,26 @@ (aset info 1 (or cbuf (save-excursion (calc-create-buffer) (current-buffer))))) - (if (and (integerp calc-embed-top) (not calc-embed-bot)) + (if (and + (or (integerp calc-embed-top) (equal calc-embed-top '(4))) + (not calc-embed-bot)) ; started with a user-supplied argument (progn - (if (= (setq arg (prefix-numeric-value arg)) 0) - (progn - (aset info 2 (copy-marker (region-beginning))) - (aset info 3 (copy-marker (region-end)))) - (aset info (if (> arg 0) 2 3) (point-marker)) - (forward-line arg) - (aset info (if (> arg 0) 3 2) (point-marker))) + (if (equal calc-embed-top '(4)) + (progn + (aset info 2 (copy-marker (line-beginning-position))) + (aset info 3 (copy-marker (line-end-position)))) + (if (= (setq calc-embed-arg (prefix-numeric-value calc-embed-arg)) 0) + (progn + (aset info 2 (copy-marker (region-beginning))) + (aset info 3 (copy-marker (region-end)))) + (aset info (if (> calc-embed-arg 0) 2 3) (point-marker)) + (if (> calc-embed-arg 0) + (progn + (forward-line (1- calc-embed-arg)) + (end-of-line)) + (forward-line (1+ calc-embed-arg))) + (aset info (if (> calc-embed-arg 0) 3 2) (point-marker)))) (aset info 4 (copy-marker (aref info 2))) (aset info 5 (copy-marker (aref info 3)))) (if (aref info 4)
--- a/lisp/calc/calc-ext.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-ext.el Mon Jun 06 02:39:45 2005 +0000 @@ -43,6 +43,9 @@ (defvar math-comp-sel-cpos nil) (defvar math-compose-hash-args nil) +(defvar calc-alg-map) +(defvar calc-alg-esc-map) + ;;; The following was made a function so that it could be byte-compiled. (defun calc-init-extensions () @@ -1192,8 +1195,9 @@ (math-normalize val))))) - -(if (boundp 'calc-help-map) +(defvar calc-help-map nil) + +(if calc-help-map nil (setq calc-help-map (make-keymap)) (define-key calc-help-map "b" 'calc-describe-bindings)
--- a/lisp/calc/calc-misc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-misc.el Mon Jun 06 02:39:45 2005 +0000 @@ -160,7 +160,7 @@ "Go to a node in the Calculator info documentation." (interactive) (select-window (get-largest-window)) - (Info-goto-node (concat "(Calc)" node))) + (info (concat "(Calc)" node))) (defun calc-tutorial () "Run the Emacs Info system on the Calculator Tutorial."
--- a/lisp/calc/calc-prog.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-prog.el Mon Jun 06 02:39:45 2005 +0000 @@ -702,7 +702,7 @@ (get func 'calc-user-defn))) (kys (concat "z" (char-to-string (car def)))) (intcmd (symbol-name (cdr def))) - (algcmd (substring (symbol-name func) 9))) + (algcmd (if func (substring (symbol-name func) 9) ""))) (if (and defn (calc-valid-formula-func func)) (let ((niceexpr (math-format-nice-expr defn (frame-width)))) (calc-wrapper @@ -1446,15 +1446,22 @@ (error "Unbalanced Z' in keyboard macro"))) -(defun calc-kbd-report (msg) - (interactive "sMessage: ") - (calc-wrapper - (math-working msg (calc-top-n 1)))) +;; (defun calc-kbd-report (msg) +;; (interactive "sMessage: ") +;; (calc-wrapper +;; (math-working msg (calc-top-n 1)))) -(defun calc-kbd-query (msg) - (interactive "sPrompt: ") - (calc-wrapper - (calc-alg-entry nil (and (not (equal msg "")) msg)))) +(defun calc-kbd-query () + (interactive) + (let ((defining-kbd-macro nil) + (executing-kbd-macro nil) + (msg (calc-top 1))) + (if (not (eq (car-safe msg) 'vec)) + (error "No prompt string provided") + (setq msg (math-vector-to-string msg)) + (calc-wrapper + (calc-pop-stack 1) + (calc-alg-entry nil (and (not (equal msg "")) msg)))))) ;;;; Logical operations.
--- a/lisp/calc/calc-stuff.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-stuff.el Mon Jun 06 02:39:45 2005 +0000 @@ -171,6 +171,7 @@ (defvar math-max-digits-cache) ; calc-bin.el (defvar math-integral-cache) ; calcalg2.el (defvar math-units-table) ; calc-units.el +(defvar math-decls-cache-tag) ; calc-arith.el (defvar math-format-date-cache) ; calc-forms.el (defvar math-holidays-cache-tag) ; calc-forms.el
--- a/lisp/calc/calc-yank.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc-yank.el Mon Jun 06 02:39:45 2005 +0000 @@ -447,7 +447,7 @@ (setq truncate-lines nil) (setq major-mode 'calc-edit-mode) (setq mode-name "Calc Edit") - (run-hooks 'calc-edit-mode-hook) + (run-mode-hooks 'calc-edit-mode-hook) (make-local-variable 'calc-original-buffer) (setq calc-original-buffer oldbuf) (make-local-variable 'calc-return-buffer)
--- a/lisp/calc/calc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calc.el Mon Jun 06 02:39:45 2005 +0000 @@ -209,7 +209,8 @@ (defgroup calc nil "GNU Calc" :prefix "calc-" - :tag "Calc") + :tag "Calc" + :group 'applications) ;;;###autoload (defcustom calc-settings-file @@ -324,7 +325,7 @@ :type '(choice (string) (sexp))) (defvar calc-bug-address "belanger@truman.edu" - "Address of the author of Calc, for use by `report-calc-bug'.") + "Address of the maintainer of Calc, for use by `report-calc-bug'.") (defvar calc-scan-for-dels t "If t, scan keymaps to find all DEL-like keys. @@ -719,6 +720,12 @@ (defvar calc-load-hook nil "Hook run when calc.el is loaded.") +(defvar calc-window-hook nil + "Hook called to create the Calc window.") + +(defvar calc-trail-window-hook nil + "Hook called to create the Calc trail window.") + ;; Verify that Calc is running on the right kind of system. (defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version)))) @@ -830,20 +837,6 @@ (defvar var-gamma '(special-const (math-gamma-const))) (defvar var-Modes '(special-const (math-get-modes-vec))) -(defvar calc-language-alist - '((latex-mode . latex) - (tex-mode . tex) - (plain-tex-mode . tex) - (context-mode . tex) - (nroff-mode . eqn) - (pascal-mode . pascal) - (c-mode . c) - (c++-mode . c) - (fortran-mode . fortran) - (f90-mode . fortran)) - "Alist of major modes with appropriate Calc languages.") - - (mapcar (lambda (v) (or (boundp v) (set v nil))) calc-local-var-list) @@ -1066,7 +1059,7 @@ (use-global-map glob) (use-local-map loc))))) - +(defvar calc-alg-map) ; Defined in calc-ext.el (defun calc-mode () "Calculator major mode. @@ -1131,7 +1124,7 @@ (string-match "full" (nth 1 p)) (setq calc-standalone-flag t)) (setq p (cdr p)))) - (run-hooks 'calc-mode-hook) + (run-mode-hooks 'calc-mode-hook) (calc-refresh t) (calc-set-mode-line) (calc-check-defines)) @@ -1181,7 +1174,7 @@ (insert (propertize (concat "Emacs Calculator v" calc-version " by Dave Gillespie\n") 'font-lock-face 'italic)))) - (run-hooks 'calc-trail-mode-hook)) + (run-mode-hooks 'calc-trail-mode-hook)) (defun calc-create-buffer () (set-buffer (get-buffer-create "*Calculator*")) @@ -1218,18 +1211,20 @@ (switch-to-buffer (current-buffer) t) (if (get-buffer-window (current-buffer)) (select-window (get-buffer-window (current-buffer))) - (let ((w (get-largest-window))) - (if (and pop-up-windows - (> (window-height w) - (+ window-min-height calc-window-height 2))) - (progn - (setq w (split-window w - (- (window-height w) - calc-window-height 2) - nil)) - (set-window-buffer w (current-buffer)) - (select-window w)) - (pop-to-buffer (current-buffer)))))) + (if calc-window-hook + (run-hooks 'calc-window-hook) + (let ((w (get-largest-window))) + (if (and pop-up-windows + (> (window-height w) + (+ window-min-height calc-window-height 2))) + (progn + (setq w (split-window w + (- (window-height w) + calc-window-height 2) + nil)) + (set-window-buffer w (current-buffer)) + (select-window w)) + (pop-to-buffer (current-buffer))))))) (save-excursion (set-buffer (calc-trail-buffer)) (and calc-display-trail @@ -1836,15 +1831,17 @@ (not (if flag (memq flag '(nil 0)) win))) (if (null win) (progn - (let ((w (split-window nil (/ (* (window-width) 2) 3) t))) - (set-window-buffer w calc-trail-buffer)) - (calc-wrapper - (setq overlay-arrow-string calc-trail-overlay - overlay-arrow-position calc-trail-pointer) - (or no-refresh - (if interactive - (calc-do-refresh) - (calc-refresh)))))) + (if calc-trail-window-hook + (run-hooks 'calc-trail-window-hook) + (let ((w (split-window nil (/ (* (window-width) 2) 3) t))) + (set-window-buffer w calc-trail-buffer))) + (calc-wrapper + (setq overlay-arrow-string calc-trail-overlay + overlay-arrow-position calc-trail-pointer) + (or no-refresh + (if interactive + (calc-do-refresh) + (calc-refresh)))))) (if win (progn (delete-window win) @@ -3444,7 +3441,7 @@ (defun calc-user-invocation () (interactive) - (unless (stringp calc-invocation-macro) + (unless calc-invocation-macro (error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro")) (execute-kbd-macro calc-invocation-macro nil))
--- a/lisp/calc/calcalg2.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calc/calcalg2.el Mon Jun 06 02:39:45 2005 +0000 @@ -202,6 +202,8 @@ (defvar math-deriv-var) (defvar math-deriv-total) (defvar math-deriv-symb) +(defvar math-decls-cache) +(defvar math-decls-all) (defun math-derivative (expr) (cond ((equal expr math-deriv-var)
--- a/lisp/calculator.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calculator.el Mon Jun 06 02:39:45 2005 +0000 @@ -4,7 +4,7 @@ ;; Author: Eli Barzilay <eli@barzilay.org> ;; Keywords: tools, convenience -;; Time-stamp: <2002-07-13 01:14:35 eli> +;; Time-stamp: <26 May 2005, 14:32:34, Lute Kamstra, pijl> ;; This file is part of GNU Emacs. @@ -680,7 +680,7 @@ (setq major-mode 'calculator-mode) (setq mode-name "Calculator") (use-local-map calculator-mode-map) - (run-hooks 'calculator-mode-hook)) + (run-mode-hooks 'calculator-mode-hook)) (eval-when-compile (require 'electric) (require 'ehelp))
--- a/lisp/calendar/calendar.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calendar/calendar.el Mon Jun 06 02:39:45 2005 +0000 @@ -2335,6 +2335,7 @@ (propertize (substitute-command-keys "\\<calendar-mode-map>\\[scroll-calendar-left]") 'help-echo "mouse-2: scroll left" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'mouse-scroll-calendar-left)) "Calendar" @@ -2343,12 +2344,14 @@ (substitute-command-keys "\\<calendar-mode-map>\\[calendar-goto-info-node] info") 'help-echo "mouse-2: read Info on Calendar" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node)) "/" (propertize (substitute-command-keys "\\<calendar-mode-map>\\[calendar-other-month] other") 'help-echo "mouse-2: choose another month" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'mouse-calendar-other-month)) "/" @@ -2356,11 +2359,13 @@ (substitute-command-keys "\\<calendar-mode-map>\\[calendar-goto-today] today") 'help-echo "mouse-2: go to today's date" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today))) '(calendar-date-string (calendar-current-date) t) (propertize (substitute-command-keys "\\<calendar-mode-map>\\[scroll-calendar-right]") 'help-echo "mouse-2: scroll right" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'mouse-scroll-calendar-right))) "The mode line of the calendar buffer.
--- a/lisp/calendar/diary-lib.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calendar/diary-lib.el Mon Jun 06 02:39:45 2005 +0000 @@ -1050,15 +1050,16 @@ (regexp-quote diary-include-string) " \"\\([^\"]*\\)\"") nil t) - (let ((diary-file (substitute-in-file-name - (buffer-substring-no-properties - (match-beginning 2) (match-end 2)))) - (mark-diary-entries-hook 'mark-included-diary-files)) + (let* ((diary-file (substitute-in-file-name + (match-string-no-properties 2))) + (mark-diary-entries-hook 'mark-included-diary-files) + (dbuff (find-buffer-visiting diary-file))) (if (file-exists-p diary-file) (if (file-readable-p diary-file) (progn (mark-diary-entries) - (kill-buffer (find-buffer-visiting diary-file))) + (unless dbuff + (kill-buffer (find-buffer-visiting diary-file)))) (beep) (message "Can't read included diary file %s" diary-file) (sleep-for 2))
--- a/lisp/calendar/icalendar.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calendar/icalendar.el Mon Jun 06 02:39:45 2005 +0000 @@ -165,7 +165,6 @@ ;; all the other libs we need ;; ====================================================================== (require 'calendar) -(require 'appt) ;; ====================================================================== ;; misc
--- a/lisp/calendar/todo-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/calendar/todo-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -904,11 +904,12 @@ \\{todo-mode-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'todo-mode) (setq mode-name "TODO") (use-local-map todo-mode-map) (easy-menu-add todo-menu) - (run-hooks 'todo-mode-hook)) + (run-mode-hooks 'todo-mode-hook)) (eval-when-compile (defvar date)
--- a/lisp/chistory.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/chistory.el Mon Jun 06 02:39:45 2005 +0000 @@ -145,7 +145,7 @@ (setq major-mode 'command-history-mode) (setq mode-name "Command History") (use-local-map command-history-map) - (run-hooks 'command-history-mode-hook)) + (run-mode-hooks 'command-history-mode-hook)) (defun Command-history-setup () (kill-all-local-variables)
--- a/lisp/comint.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/comint.el Mon Jun 06 02:39:45 2005 +0000 @@ -3437,7 +3437,7 @@ ;; (make-local-variable 'shell-directory-stack) ;; (setq shell-directory-stack nil) ;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker) -;; (run-hooks 'shell-mode-hook)) +;; (run-mode-hooks 'shell-mode-hook)) ;; ;; ;; Completion for comint-mode users
--- a/lisp/cus-edit.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/cus-edit.el Mon Jun 06 02:39:45 2005 +0000 @@ -4276,7 +4276,7 @@ (set (make-local-variable 'widget-link-prefix) "") (set (make-local-variable 'widget-link-suffix) "")) (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t) - (run-hooks 'custom-mode-hook)) + (run-mode-hooks 'custom-mode-hook)) (put 'custom-mode 'mode-class 'special)
--- a/lisp/descr-text.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/descr-text.el Mon Jun 06 02:39:45 2005 +0000 @@ -61,7 +61,7 @@ (use-local-map describe-text-mode-map) (widget-setup) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) - (run-hooks 'describe-text-mode-hook)) + (run-mode-hooks 'describe-text-mode-hook)) ;;; Describe-Text Utilities.
--- a/lisp/ebuff-menu.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ebuff-menu.el Mon Jun 06 02:39:45 2005 +0000 @@ -162,7 +162,7 @@ (setq major-mode 'Electric-buffer-menu-mode) (goto-char (point-min)) (if (search-forward "\n." nil t) (forward-char -1)) - (run-hooks 'electric-buffer-menu-mode-hook)) + (run-mode-hooks 'electric-buffer-menu-mode-hook)) ;; generally the same as Buffer-menu-mode-map ;; (except we don't indirect to global-map)
--- a/lisp/ediff-diff.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ediff-diff.el Mon Jun 06 02:39:45 2005 +0000 @@ -1353,7 +1353,7 @@ If FILTER-RE is non-nil, recursive checking in directories affects only files whose names match the expression." ;; Normalize empty filter RE to nil. - (unless (length filter-re) (setq filter-re nil)) + (unless (> (length filter-re) 0) (setq filter-re nil)) ;; Indicate progress (message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re) (cond @@ -1367,27 +1367,11 @@ (if (eq ediff-recurse-to-subdirectories 'yes) (let* ((all-entries-1 (directory-files d1 t filter-re)) (all-entries-2 (directory-files d2 t filter-re)) - (entries-1 (remove-if (lambda (s) - (string-match "^\\.\\.?$" - (file-name-nondirectory s))) - all-entries-1)) - (entries-2 (remove-if (lambda (s) - (string-match "^\\.\\.?$" - (file-name-nondirectory s))) - all-entries-2)) + (entries-1 (ediff-delete-all-matches "^\\.\\.?$" all-entries-1)) + (entries-2 (ediff-delete-all-matches "^\\.\\.?$" all-entries-2)) ) - ;; First, check only the names (works quickly and ensures a - ;; precondition for subsequent code) - (if (and (= (length entries-1) (length entries-2)) - (every (lambda (a b) (equal (file-name-nondirectory a) - (file-name-nondirectory b))) - entries-1 entries-2)) - ;; With name equality established, compare the entries - ;; through recursion. - (every (lambda (a b) - (ediff-same-contents a b filter-re)) - entries-1 entries-2) - ) + + (ediff-same-file-contents-lists entries-1 entries-2 filter-re) )) ) ; end of the directories case ;; D1 & D2 are both files => compare directly @@ -1398,6 +1382,42 @@ ) ) +;; If lists have the same length and names of files are pairwise equal +;; (removing the directories) then compare contents pairwise. +;; True if all contents are the same; false otherwise +(defun ediff-same-file-contents-lists (entries-1 entries-2 filter-re) + ;; First, check only the names (works quickly and ensures a + ;; precondition for subsequent code) + (if (and (= (length entries-1) (length entries-2)) + (equal (mapcar 'file-name-nondirectory entries-1) + (mapcar 'file-name-nondirectory entries-2))) + ;; With name equality established, compare the entries + ;; through recursion. + (let ((continue t)) + (while (and entries-1 continue) + (if (ediff-same-contents + (car entries-1) (car entries-2) filter-re) + (setq entries-1 (cdr entries-1) + entries-2 (cdr entries-2)) + (setq continue nil)) + ) + ;; if reached the end then lists are equal + (null entries-1)) + ) + ) + + +;; ARG1 is a regexp, ARG2 is a list of full-filenames +;; Delete all entries that match the regexp +(defun ediff-delete-all-matches (regex file-list-list) + (let (result elt) + (while file-list-list + (setq elt (car file-list-list)) + (or (string-match regex (file-name-nondirectory elt)) + (setq result (cons elt result))) + (setq file-list-list (cdr file-list-list))) + (reverse result))) + ;;; Local Variables: ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
--- a/lisp/ediff-help.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ediff-help.el Mon Jun 06 02:39:45 2005 +0000 @@ -132,7 +132,7 @@ "Normally, not a user option. See `ediff-help-message' for details.") (defconst ediff-brief-message-string - " ? -quick help " + " Type ? for help" "Contents of the brief help message.") ;; The actual brief help message (ediff-defvar-local ediff-brief-help-message ""
--- a/lisp/ediff-mult.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ediff-mult.el Mon Jun 06 02:39:45 2005 +0000 @@ -560,17 +560,23 @@ (ediff-add-slash-if-directory auxdir1 elt)) lis1) auxdir2 (file-name-as-directory dir2) + lis2 (directory-files auxdir2 nil regexp) + lis2 (delete "." lis2) + lis2 (delete ".." lis2) lis2 (mapcar (lambda (elt) (ediff-add-slash-if-directory auxdir2 elt)) - (directory-files auxdir2 nil regexp))) + lis2)) (if (stringp dir3) (setq auxdir3 (file-name-as-directory dir3) + lis3 (directory-files auxdir3 nil regexp) + lis3 (delete "." lis3) + lis3 (delete ".." lis3) lis3 (mapcar (lambda (elt) (ediff-add-slash-if-directory auxdir3 elt)) - (directory-files auxdir3 nil regexp)))) + lis3))) (if (ediff-nonempty-string-p merge-autostore-dir) (setq merge-autostore-dir
--- a/lisp/ediff-util.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ediff-util.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; ediff-util.el --- the core commands and utilities of ediff -;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +;; 2004 Free Software Foundation, Inc. ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
--- a/lisp/ediff.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ediff.el Mon Jun 06 02:39:45 2005 +0000 @@ -7,7 +7,7 @@ ;; Keywords: comparing, merging, patching, tools, unix (defconst ediff-version "2.80" "The current version of Ediff") -(defconst ediff-date "February 19, 2005" "Date of last update") +(defconst ediff-date "June 3, 2005" "Date of last update") ;; This file is part of GNU Emacs.
--- a/lisp/emacs-lisp/bytecomp.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Mon Jun 06 02:39:45 2005 +0000 @@ -1248,15 +1248,15 @@ (defun byte-compile-nogroup-warn (form) (let ((keyword-args (cdr (cdr (cdr (cdr form))))) (name (cadr form))) - (unless (plist-get keyword-args :group) - (byte-compile-warn - "%s for `%s' fails to specify containing group" - (cdr (assq (car form) - '((custom-declare-group . defgroup) - (custom-declare-face . defface) - (custom-declare-variable . defcustom)))) - (if (and (consp name) (eq (car name) 'quote)) - (cadr name) name))))) + (or (plist-get keyword-args :group) + (not (and (consp name) (eq (car name) 'quote))) + (byte-compile-warn + "%s for `%s' fails to specify containing group" + (cdr (assq (car form) + '((custom-declare-group . defgroup) + (custom-declare-face . defface) + (custom-declare-variable . defcustom)))) + (cadr name))))) ;; Warn if the function or macro is being redefined with a different ;; number of arguments.
--- a/lisp/emacs-lisp/cl-macs.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emacs-lisp/cl-macs.el Mon Jun 06 02:39:45 2005 +0000 @@ -1565,14 +1565,21 @@ This macro is an easy-to-use substitute for `define-setf-method' that works well for simple place forms. In the simple `defsetf' form, `setf's of the form (setf (NAME ARGS...) VAL) are transformed to function or macro -calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). +calls of the form (FUNC ARGS... VAL). Example: + + (defsetf aref aset) + Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). Here, the above `setf' call is expanded by binding the argument forms ARGS according to ARGLIST, binding the value form VAL to STORE, then executing BODY, which must return a Lisp form that does the necessary `setf' operation. Actually, ARGLIST and STORE may be bound to temporary variables which are introduced automatically to preserve proper execution order of the arguments. -Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." +Example: + + (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v)) + +\(fn NAME [FUNC | ARGLIST (STORE) BODY...])" (if (listp arg1) (let* ((largs nil) (largsr nil) (temps nil) (tempsr nil)
--- a/lisp/emacs-lisp/easy-mmode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emacs-lisp/easy-mmode.el Mon Jun 06 02:39:45 2005 +0000 @@ -271,14 +271,26 @@ TURN-ON is a function that will be called with no args in every buffer and that should try to turn MODE on if applicable for that buffer. KEYS is a list of CL-style keyword arguments: -:group to specify the custom group." +:group to specify the custom group. + +If MODE's set-up depends on the major mode in effect when it was +enabled, then disabling and reenabling MODE should make MODE work +correctly with the current major mode. This is important to +prevent problems with derived modes, that is, major modes that +call another major mode in their body." + (let* ((global-mode-name (symbol-name global-mode)) (pretty-name (easy-mmode-pretty-mode-name mode)) (pretty-global-name (easy-mmode-pretty-mode-name global-mode)) (group nil) (extra-args nil) - (buffers (intern (concat global-mode-name "-buffers"))) - (cmmh (intern (concat global-mode-name "-cmmh")))) + (MODE-buffers (intern (concat global-mode-name "-buffers"))) + (MODE-enable-in-buffers + (intern (concat global-mode-name "-enable-in-buffers"))) + (MODE-check-buffers + (intern (concat global-mode-name "-check-buffers"))) + (MODE-cmhh (intern (concat global-mode-name "-cmhh"))) + (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode")))) ;; Check keys. (while (keywordp (car keys)) @@ -294,6 +306,8 @@ "-mode\\'" "" (symbol-name mode)))))) `(progn + (defvar ,MODE-major-mode nil) + (make-variable-buffer-local ',MODE-major-mode) ;; The actual global minor-mode (define-minor-mode ,global-mode ,(format "Toggle %s in every buffer. @@ -306,10 +320,13 @@ ;; Setup hook to handle future mode changes and new buffers. (if ,global-mode (progn - (add-hook 'after-change-major-mode-hook ',buffers) - (add-hook 'change-major-mode-hook ',cmmh)) - (remove-hook 'after-change-major-mode-hook ',buffers) - (remove-hook 'change-major-mode-hook ',cmmh)) + (add-hook 'after-change-major-mode-hook + ',MODE-enable-in-buffers) + (add-hook 'find-file-hook ',MODE-check-buffers) + (add-hook 'change-major-mode-hook ',MODE-cmhh)) + (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) + (remove-hook 'find-file-hook ',MODE-check-buffers) + (remove-hook 'change-major-mode-hook ',MODE-cmhh)) ;; Go through existing buffers. (dolist (buf (buffer-list)) @@ -321,22 +338,33 @@ :autoload-end ;; List of buffers left to process. - (defvar ,buffers nil) + (defvar ,MODE-buffers nil) ;; The function that calls TURN-ON in each buffer. - (defun ,buffers () - (remove-hook 'post-command-hook ',buffers) - (while ,buffers - (let ((buf (pop ,buffers))) - (when (buffer-live-p buf) - (with-current-buffer buf (,turn-on)))))) - (put ',buffers 'definition-name ',global-mode) + (defun ,MODE-enable-in-buffers () + (dolist (buf ,MODE-buffers) + (when (buffer-live-p buf) + (with-current-buffer buf + (if ,mode + (unless (eq ,MODE-major-mode major-mode) + (,mode -1) + (,turn-on) + (setq ,MODE-major-mode major-mode)) + (,turn-on) + (setq ,MODE-major-mode major-mode)))))) + (put ',MODE-enable-in-buffers 'definition-name ',global-mode) + + (defun ,MODE-check-buffers () + (,MODE-enable-in-buffers) + (setq ,MODE-buffers nil) + (remove-hook 'post-command-hook ',MODE-check-buffers)) + (put ',MODE-check-buffers 'definition-name ',global-mode) ;; The function that catches kill-all-local-variables. - (defun ,cmmh () - (add-to-list ',buffers (current-buffer)) - (add-hook 'post-command-hook ',buffers)) - (put ',cmmh 'definition-name ',global-mode)))) + (defun ,MODE-cmhh () + (add-to-list ',MODE-buffers (current-buffer)) + (add-hook 'post-command-hook ',MODE-check-buffers)) + (put ',MODE-cmhh 'definition-name ',global-mode)))) ;;; ;;; easy-mmode-defmap
--- a/lisp/emacs-lisp/easymenu.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emacs-lisp/easymenu.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; easymenu.el --- support the easymenu interface for defining a menu -;; Copyright (C) 1994,96,98,1999,2000,2004 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1996, 1998, 1999, 2000, 2004, 2005 +;; Free Software Foundation, Inc. ;; Keywords: emulations ;; Author: Richard Stallman <rms@gnu.org> @@ -534,7 +535,7 @@ (easy-menu-do-add-item map item before))) (defun easy-menu-item-present-p (map path name) - "In submenu of MAP with path PATH, return true iff item NAME is present. + "In submenu of MAP with path PATH, return non-nil iff item NAME is present. MAP and PATH are defined as in `easy-menu-add-item'. NAME should be a string, the name of the element to be looked for." (easy-menu-return-item (easy-menu-get-map map path) name)) @@ -552,7 +553,14 @@ "In menu MENU try to look for menu item with name NAME. If a menu item is found, return (NAME . item), otherwise return nil. If item is an old format item, a new format item is returned." - (let ((item (lookup-key menu (vector (easy-menu-intern name)))) + ;; The call to `lookup-key' also calls the C function `get_keyelt' which + ;; looks inside a menu-item to only return the actual command. This is + ;; not what we want here. We should either add an arg to lookup-key to be + ;; able to turn off this "feature", or else we could use map-keymap here. + ;; In the mean time, I just use `assq' which is an OK approximation since + ;; menus are rarely built from vectors or char-tables. + (let ((item (or (cdr (assq name menu)) + (lookup-key menu (vector (easy-menu-intern name))))) ret enable cache label) (cond ((stringp (car-safe item))
--- a/lisp/emacs-lisp/find-func.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emacs-lisp/find-func.el Mon Jun 06 02:39:45 2005 +0000 @@ -246,8 +246,6 @@ in `load-path'." (if (not function) (error "You didn't specify a function")) - (and (subrp (symbol-function function)) - (error "%s is a primitive function" function)) (let ((def (symbol-function function)) aliases) (while (symbolp def) @@ -265,6 +263,8 @@ (let ((library (cond ((eq (car-safe def) 'autoload) (nth 1 def)) + ((subrp def) + (help-C-file-name def 'subr)) ((symbol-file function 'defun))))) (find-function-search-for-symbol function nil library))))
--- a/lisp/emacs-lisp/re-builder.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emacs-lisp/re-builder.el Mon Jun 06 02:39:45 2005 +0000 @@ -254,7 +254,7 @@ mode-name "RE Builder") (use-local-map reb-mode-map) (reb-mode-common) - (run-hooks 'reb-mode-hook)) + (run-mode-hooks 'reb-mode-hook)) (define-derived-mode reb-lisp-mode emacs-lisp-mode "RE Builder Lisp"
--- a/lisp/emulation/tpu-mapper.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emulation/tpu-mapper.el Mon Jun 06 02:39:45 2005 +0000 @@ -375,7 +375,7 @@ ;;; ;;; Load the newly defined keys and clean up ;;; -(eval-current-buffer) +(eval-buffer) (kill-buffer (current-buffer)) (kill-buffer "*scratch*") (kill-buffer "Gold-Keys")
--- a/lisp/emulation/vi.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emulation/vi.el Mon Jun 06 02:39:45 2005 +0000 @@ -403,7 +403,7 @@ (make-local-variable 'vi-mode-old-mode-name) (make-local-variable 'vi-mode-old-major-mode) (make-local-variable 'vi-mode-old-case-fold) - (run-hooks 'vi-mode-hook)) + (run-mode-hooks 'vi-mode-hook)) ;;;###autoload (defun vi-mode ()
--- a/lisp/emulation/viper-keym.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emulation/viper-keym.el Mon Jun 06 02:39:45 2005 +0000 @@ -50,16 +50,25 @@ ;;; Variables -(defvar viper-toggle-key "\C-z" +(defcustom viper-toggle-key "\C-z" "The key used to change states from emacs to Vi and back. In insert mode, this key also functions as Meta. Must be set in .viper file or prior to loading Viper. -This setting cannot be changed interactively.") +This setting cannot be changed interactively." + :type 'string + :group 'viper) -(defvar viper-ESC-key "\e" +(defcustom viper-quoted-insert-key "\C-v" + "The key used to quote special characters when inserting them in Insert state." + :type 'string + :group 'viper) + +(defcustom viper-ESC-key "\e" "Key used to ESC. Must be set in .viper file or prior to loading Viper. -This setting cannot be changed interactively.") +This setting cannot be changed interactively." + :type 'string + :group 'viper) ;;; Emacs keys in other states. @@ -242,7 +251,7 @@ (define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) (define-key viper-insert-basic-map (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab) -(define-key viper-insert-basic-map "\C-v" 'quoted-insert) +(define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert) (define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) (define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert) (define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key)
--- a/lisp/emulation/viper.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emulation/viper.el Mon Jun 06 02:39:45 2005 +0000 @@ -990,12 +990,13 @@ (setq global-mode-string (append '("" viper-mode-string) (cdr global-mode-string)))) - (defadvice describe-key (before viper-read-keyseq-ad protect activate) + (defadvice describe-key (before viper-describe-key-ad protect activate) "Force to read key via `viper-read-key-sequence'." - (interactive (list (viper-read-key-sequence "Describe key: ")))) + (interactive (list (viper-read-key-sequence "Describe key: ")) + )) (defadvice describe-key-briefly - (before viper-read-keyseq-ad protect activate) + (before viper-describe-key-briefly-ad protect activate) "Force to read key via `viper-read-key-sequence'." (interactive (list (viper-read-key-sequence "Describe key briefly: "))))
--- a/lisp/emulation/ws-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/emulation/ws-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -294,7 +294,7 @@ (use-local-map wordstar-mode-map) (setq mode-name "WordStar") (setq major-mode 'wordstar-mode) - (run-hooks 'wordstar-mode-hook)) + (run-mode-hooks 'wordstar-mode-hook)) (defun wordstar-center-paragraph ()
--- a/lisp/eshell/em-cmpl.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/em-cmpl.el Mon Jun 06 02:39:45 2005 +0000 @@ -136,8 +136,7 @@ :type (get 'pcomplete-file-ignore 'custom-type) :group 'eshell-cmpl) -(defcustom eshell-cmpl-dir-ignore - (format "\\`\\(\\.\\.?\\|CVS\\)%c\\'" directory-sep-char) +(defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'" (documentation-property 'pcomplete-dir-ignore 'variable-documentation) :type (get 'pcomplete-dir-ignore 'custom-type) @@ -155,7 +154,7 @@ :type (get 'pcomplete-autolist 'custom-type) :group 'eshell-cmpl) -(defcustom eshell-cmpl-suffix-list (list directory-sep-char ?:) +(defcustom eshell-cmpl-suffix-list (list ?/ ?:) (documentation-property 'pcomplete-suffix-list 'variable-documentation) :type (get 'pcomplete-suffix-list 'custom-type) @@ -370,7 +369,8 @@ (setq args (nthcdr (1+ l) args) posns (nthcdr (1+ l) posns)))) (assert (= (length args) (length posns))) - (when (and args (eq (char-syntax (char-before end)) ? )) + (when (and args (eq (char-syntax (char-before end)) ? ) + (not (eq (char-before (1- end)) ?\\))) (nconc args (list "")) (nconc posns (list (point)))) (cons (mapcar
--- a/lisp/eshell/em-dirs.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/em-dirs.el Mon Jun 06 02:39:45 2005 +0000 @@ -276,8 +276,7 @@ (let* ((letter (match-string 1)) (regexp (concat "\\`" letter)) (path (eshell-find-previous-directory regexp))) - (concat (or path letter) - (char-to-string directory-sep-char))))) + (concat (or path letter) "/")))) (defun eshell-complete-user-reference () "If there is a user reference, complete it." @@ -300,7 +299,7 @@ (let* ((path default-directory) (len (length path))) (if (and (> len 1) - (eq (aref path (1- len)) directory-sep-char) + (eq (aref path (1- len)) ?/) (not (and (eshell-under-windows-p) (string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) (setq path (substring path 0 (1- (length path))))) @@ -324,9 +323,7 @@ (len (length extra-dots)) replace-text) (while (> len 0) - (setq replace-text - (concat replace-text - (char-to-string directory-sep-char) "..") + (setq replace-text (concat replace-text "/..") len (1- len))) (setq path (replace-match replace-text t t path 1)))) @@ -371,7 +368,7 @@ (setq path (ring-remove eshell-last-dir-ring (if index - (string-to-int index) + (string-to-number index) 0))))) ((and path (string-match "^=\\(.*\\)$" path)) (let ((oldpath (eshell-find-previous-directory
--- a/lisp/eshell/em-glob.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/em-glob.el Mon Jun 06 02:39:45 2005 +0000 @@ -265,9 +265,6 @@ (defvar matches) (defvar message-shown)) -;; jww (1999-11-18): this function assumes that directory-sep-char is -;; a forward slash (/) - (defun eshell-glob-entries (path globs &optional recurse-p) "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." (let* ((entries (ignore-errors @@ -303,11 +300,11 @@ ;; can't use `directory-file-name' because it strips away text ;; properties in the string (let ((len (1- (length incl)))) - (if (eq (aref incl len) directory-sep-char) + (if (eq (aref incl len) ?/) (setq incl (substring incl 0 len))) (when excl (setq len (1- (length excl))) - (if (eq (aref excl len) directory-sep-char) + (if (eq (aref excl len) ?/) (setq excl (substring excl 0 len))))) (setq incl (eshell-glob-regexp incl) excl (and excl (eshell-glob-regexp excl))) @@ -329,7 +326,7 @@ (while entries (setq name (car entries) len (length name) - isdir (eq (aref name (1- len)) directory-sep-char)) + isdir (eq (aref name (1- len)) ?/)) (if (let ((fname (directory-file-name name))) (and (not (and excl (string-match excl fname))) (string-match incl fname)))
--- a/lisp/eshell/em-unix.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/em-unix.el Mon Jun 06 02:39:45 2005 +0000 @@ -877,7 +877,7 @@ (unless by-bytes (setq block-size (or block-size 1024))) (if (and max-depth (stringp max-depth)) - (setq max-depth (string-to-int max-depth))) + (setq max-depth (string-to-number max-depth))) ;; filesystem support means nothing under Windows (if (eshell-under-windows-p) (setq only-one-filesystem nil))
--- a/lisp/eshell/esh-cmd.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/esh-cmd.el Mon Jun 06 02:39:45 2005 +0000 @@ -757,7 +757,7 @@ (defmacro eshell-do-subjob (object) "Evaluate a command OBJECT as a subjob. -We indicate thet the process was run in the background by returned it +We indicate that the process was run in the background by returning it ensconced in a list." `(let ((eshell-current-subjob-p t)) ,object)) @@ -1006,11 +1006,10 @@ (eshell-resume-eval)))) ;; On systems that don't support async subprocesses, eshell-resume ;; can return t. Don't treat that as an error. + (if (listp delim) + (setq delim (car delim))) (if (and delim (not (eq delim t))) - (error "Unmatched delimiter: %c" - (if (listp delim) - (car delim) - delim)))))) + (error "Unmatched delimiter: %c" delim))))) (defun eshell-resume-command (proc status) "Resume the current command when a process ends."
--- a/lisp/eshell/esh-ext.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/esh-ext.el Mon Jun 06 02:39:45 2005 +0000 @@ -103,7 +103,7 @@ "Invoke a .BAT or .CMD file on DOS/Windows systems." ;; since CMD.EXE can't handle forward slashes in the initial ;; argument... - (setcar args (subst-char-in-string directory-sep-char ?\\ (car args))) + (setcar args (subst-char-in-string ?/ ?\\ (car args))) (throw 'eshell-replace-command (eshell-parse-command eshell-windows-shell-file (cons "/c" args))))
--- a/lisp/eshell/esh-io.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/esh-io.el Mon Jun 06 02:39:45 2005 +0000 @@ -192,7 +192,7 @@ (eshell-finish-arg (prog1 (list 'eshell-set-output-handle - (or (and sh (string-to-int sh)) 1) + (or (and sh (string-to-number sh)) 1) (list 'quote (aref [overwrite append insert] (1- (length oper))))) @@ -353,7 +353,8 @@ ((or (bufferp target) (and (boundp 'eshell-buffer-shorthand) (symbol-value 'eshell-buffer-shorthand) - (symbolp target))) + (symbolp target) + (not (memq target '(t nil))))) (let ((buf (if (bufferp target) target (get-buffer-create
--- a/lisp/eshell/esh-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/esh-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -438,7 +438,7 @@ (if eshell-first-time-p (run-hooks 'eshell-first-time-mode-hook)) - (run-hooks 'eshell-mode-hook) + (run-mode-hooks 'eshell-mode-hook) (run-hooks 'eshell-post-command-hook)) (put 'eshell-mode 'mode-class 'special)
--- a/lisp/eshell/esh-util.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/esh-util.el Mon Jun 06 02:39:45 2005 +0000 @@ -253,14 +253,13 @@ parts) (if (and (eshell-under-windows-p) (> len 2) - (eq (aref path 0) directory-sep-char) - (eq (aref path 1) directory-sep-char)) + (eq (aref path 0) ?/) + (eq (aref path 1) ?/)) (setq i 2)) (while (< i len) - (if (and (eq (aref path i) directory-sep-char) + (if (and (eq (aref path i) ?/) (not (get-text-property i 'escaped path))) - (setq parts (cons (if (= li i) - (char-to-string directory-sep-char) + (setq parts (cons (if (= li i) "/" (substring path li (1+ i))) parts) li (1+ i))) (setq i (1+ i))) @@ -268,9 +267,7 @@ (setq parts (cons (substring path li i) parts))) (if (and (eshell-under-windows-p) (string-match "\\`[A-Za-z]:\\'" (car (last parts)))) - (setcar (last parts) - (concat (car (last parts)) - (char-to-string directory-sep-char)))) + (setcar (last parts) (concat (car (last parts)) "/"))) (nreverse parts))) (defun eshell-to-flat-string (value) @@ -450,8 +447,8 @@ (point) (progn (end-of-line) (point))) ":"))) (if (and (and fields (nth 0 fields) (nth 2 fields)) - (not (assq (string-to-int (nth 2 fields)) names))) - (setq names (cons (cons (string-to-int (nth 2 fields)) + (not (assq (string-to-number (nth 2 fields)) names))) + (setq names (cons (cons (string-to-number (nth 2 fields)) (nth 0 fields)) names)))) (forward-line))))
--- a/lisp/eshell/esh-var.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/eshell/esh-var.el Mon Jun 06 02:39:45 2005 +0000 @@ -631,7 +631,7 @@ (if (and value (stringp value) (file-directory-p value)) - (concat varname (char-to-string directory-sep-char)) + (concat varname "/") varname)))) (eshell-envvar-names (eshell-environment-variables))) (all-completions argname obarray 'boundp)
--- a/lisp/faces.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/faces.el Mon Jun 06 02:39:45 2005 +0000 @@ -183,10 +183,7 @@ If the optional argument FRAME is given, this gets the face NAME for that frame; otherwise, it uses the selected frame. If FRAME is the symbol t, then the global, non-frame face is returned. -If NAME is already a face, it is simply returned. - -This function is defined for compatibility with Emacs 20.2. It -should not be used anymore." +If NAME is already a face, it is simply returned." (facep name)) (make-obsolete 'internal-find-face 'facep "21.1") @@ -234,8 +231,8 @@ (defun face-equal (face1 face2 &optional frame) "Non-nil if faces FACE1 and FACE2 are equal. Faces are considered equal if all their attributes are equal. -If the optional argument FRAME is given, report on face FACE in that frame. -If FRAME is t, report on the defaults for face FACE (for new frames). +If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame. +If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). If FRAME is omitted or nil, use the selected frame." (internal-lisp-face-equal-p face1 face2 frame)) @@ -1154,16 +1151,24 @@ arg, prompt for a regular expression." (interactive (list (and current-prefix-arg (read-string "List faces matching regexp: ")))) - (let ((faces (sort (face-list) #'string-lessp)) + (let ((all-faces (zerop (length regexp))) (frame (selected-frame)) + (max-length 0) + faces line-format disp-frame window face-name) - (when (> (length regexp) 0) - (setq faces - (delq nil - (mapcar (lambda (f) - (when (string-match regexp (symbol-name f)) - f)) - faces)))) + ;; We filter and take the max length in one pass + (setq faces + (delq nil + (mapcar (lambda (f) + (let ((s (symbol-name f))) + (when (or all-faces (string-match regexp s)) + (setq max-length (max (length s) max-length)) + f))) + (sort (face-list) #'string-lessp)))) + (unless faces + (error "No faces matching \"%s\"" regexp)) + (setq max-length (1+ max-length) + line-format (format "%%-%ds" max-length)) (with-output-to-temp-buffer "*Faces*" (save-excursion (set-buffer standard-output) @@ -1178,7 +1183,7 @@ (setq help-xref-stack nil) (dolist (face faces) (setq face-name (symbol-name face)) - (insert (format "%25s " face-name)) + (insert (format line-format face-name)) ;; Hyperlink to a customization buffer for the face. Using ;; the help xref mechanism may not be the best way. (save-excursion @@ -1203,7 +1208,7 @@ (goto-char beg) (forward-line 1) (while (not (eobp)) - (insert " ") + (insert-char ?\s max-length) (forward-line 1)))) (goto-char (point-min))) (print-help-return-message))
--- a/lisp/files.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/files.el Mon Jun 06 02:39:45 2005 +0000 @@ -514,6 +514,10 @@ This means to guarantee valid names and perhaps to canonicalize certain patterns. +FILENAME should be an absolute file name since the conversion rules +sometimes vary depending on the position in the file name. E.g. c:/foo +is a valid DOS file name, but c:/bar/c:/foo is not. + This function's standard definition is trivial; it just returns the argument. However, on Windows and DOS, replace invalid characters. On DOS, make sure to obey the 8.3 limitations. On
--- a/lisp/filesets.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/filesets.el Mon Jun 06 02:39:45 2005 +0000 @@ -132,7 +132,8 @@ (defvar filesets-menu-ensure-use-cached (and filesets-running-xemacs - (not (emacs-version>= 21 5))) + (if (fboundp 'emacs-version>=) + (not (emacs-version>= 21 5)))) "Make sure (X)Emacs uses filesets' cache. Well, if you use XEmacs (prior to 21.5?) custom.el is loaded after
--- a/lisp/font-core.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/font-core.el Mon Jun 06 02:39:45 2005 +0000 @@ -88,6 +88,8 @@ It will be passed one argument, which is the current value of `font-lock-mode'.") +;; The mode for which font-lock was initialized, or nil if none. +(defvar font-lock-mode-major-mode) (define-minor-mode font-lock-mode "Toggle Font Lock mode. With arg, turn Font Lock mode off if and only if arg is a non-positive @@ -156,7 +158,9 @@ ;; Arrange to unfontify this buffer if we change major mode later. (if font-lock-mode (add-hook 'change-major-mode-hook 'font-lock-change-mode nil t) - (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))) + (remove-hook 'change-major-mode-hook 'font-lock-change-mode t)) + (when font-lock-mode + (setq font-lock-mode-major-mode major-mode))) ;; Get rid of fontification for the old major mode. ;; We do this when changing major modes. @@ -175,6 +179,7 @@ '(font-lock-face))) (restore-buffer-modified-p modp))) +(defvar font-lock-set-defaults) (defun font-lock-default-function (mode) ;; Turn on Font Lock mode. (when mode @@ -201,9 +206,14 @@ ;; Only do hard work if the mode has specified stuff in ;; `font-lock-defaults'. (when (or font-lock-defaults - (and (boundp 'font-lock-keywords) font-lock-keywords) + (if (boundp 'font-lock-keywords) font-lock-keywords) (with-no-warnings - (cdr (assq major-mode font-lock-defaults-alist)))) + (cdr (assq major-mode font-lock-defaults-alist))) + (and mode + (boundp 'font-lock-set-defaults) + font-lock-set-defaults + font-lock-mode-major-mode + (not (eq font-lock-mode-major-mode major-mode)))) (font-lock-mode-internal mode))) (defun turn-on-font-lock ()
--- a/lisp/font-lock.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/font-lock.el Mon Jun 06 02:39:45 2005 +0000 @@ -683,9 +683,22 @@ adds two fontification patterns for C mode, to fontify `FIXME:' words, even in comments, and to fontify `and', `or' and `not' words as keywords. -When used from a Lisp program (such as a minor mode), it is recommended to -use nil for MODE (and place the call on a hook) to avoid subtle problems -due to details of the implementation. +The above procedure will only add the keywords for C mode, not +for modes derived from C mode. To add them for derived modes too, +pass nil for MODE and add the call to c-mode-hook. + +For example: + + (add-hook 'c-mode-hook + (lambda () + (font-lock-add-keywords 'c-mode + '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) + (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . + font-lock-keyword-face))))) + +The above procedure may fail to add keywords to derived modes if +some involved major mode does not follow the standard conventions. +File a bug report if this happens, so the major mode can be corrected. Note that some modes have specialized support for additional patterns, e.g., see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', @@ -704,7 +717,8 @@ (font-lock-update-removed-keyword-alist mode keywords append)) (t ;; Otherwise set or add the keywords now. - ;; This is a no-op if it has been done already in this buffer. + ;; This is a no-op if it has been done already in this buffer + ;; for the correct major mode. (font-lock-set-defaults) (let ((was-compiled (eq (car font-lock-keywords) t))) ;; Bring back the user-level (uncompiled) keywords. @@ -774,9 +788,11 @@ MODE should be a symbol, the major mode command name, such as `c-mode' or nil. If nil, highlighting keywords are removed for the current buffer. -When used from a Lisp program (such as a minor mode), it is recommended to -use nil for MODE (and place the call on a hook) to avoid subtle problems -due to details of the implementation." +To make the removal apply to modes derived from MODE as well, +pass nil for MODE and add the call to MODE-hook. This may fail +for some derived modes if some involved major mode does not +follow the standard conventions. File a bug report if this +happens, so the major mode can be corrected." (cond (mode ;; Remove one keyword at the time. (dolist (keyword keywords) @@ -1351,7 +1367,7 @@ comment-start-skip)) (put-text-property beg (match-end 0) 'face font-lock-comment-delimiter-face))) - (if (looking-back comment-end-regexp (point-at-bol)) + (if (looking-back comment-end-regexp (point-at-bol) t) (put-text-property (match-beginning 0) (point) 'face font-lock-comment-delimiter-face)))) (< (point) end)) @@ -1571,12 +1587,15 @@ (defvar font-lock-set-defaults nil) ; Whether we have set up defaults. +(defvar font-lock-mode-major-mode) (defun font-lock-set-defaults () "Set fontification defaults appropriately for this mode. Sets various variables using `font-lock-defaults' (or, if nil, using `font-lock-defaults-alist') and `font-lock-maximum-decoration'." - ;; Set fontification defaults iff not previously set. - (unless font-lock-set-defaults + ;; Set fontification defaults iff not previously set for correct major mode. + (unless (and font-lock-set-defaults + (eq font-lock-mode-major-mode major-mode)) + (setq font-lock-mode-major-mode major-mode) (set (make-local-variable 'font-lock-set-defaults) t) (make-local-variable 'font-lock-fontified) (make-local-variable 'font-lock-multiline)
--- a/lisp/forms.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/forms.el Mon Jun 06 02:39:45 2005 +0000 @@ -713,7 +713,7 @@ ;; user customising ;;(message "forms: proceeding setup (user hooks)...") - (run-hooks 'forms-mode-hook 'forms-mode-hooks) + (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks) ;;(message "forms: setting up... done.") ;; be helpful
--- a/lisp/gnus/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,241 @@ +2005-06-04 Luc Teirlinck <teirllm@auburn.edu> + + * gnus-art.el (article-update-date-lapsed): Use `save-match-data'. + +2005-06-04 Lute Kamstra <lute@gnu.org> + + * nnfolder.el (nnfolder-read-folder): Make sure that undo + information is never recorded. + +2005-06-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy. + +2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org> + + * pop3.el (pop3-md5): Run md5 in the binary mode. + (pop3-md5-program-args): New variable. + + * starttls.el (starttls-set-process-query-on-exit-flag): + Use eval-and-compile. + +2005-05-31 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (article-display-x-face): Replace + process-kill-without-query by gnus-set-process-query-on-exit-flag. + + * gnus-group.el: Bind gnus-cache-active-hashtb when compiling. + + * gnus-util.el (gnus-set-process-query-on-exit-flag): Alias to + set-process-query-on-exit-flag or process-kill-without-query. + + * html2text.el (html2text-fix-paragraphs): Use `while - re-search' + loop instead of replace-regexp. + + * imap.el (imap-ssl-open): Use set-process-query-on-exit-flag + instead of process-kill-without-query if it is available. + + * mm-util.el (mm-insert-file-contents): Bind find-file-hook + instead of find-file-hooks if it is available. + + * mml1991.el: Bind pgg-default-user-id when compiling. + + * mml2015.el: Bind pgg-default-user-id when compiling. + + * nndraft.el (nndraft-request-associate-buffer): + Use write-contents-functions instead of write-contents-hooks if it is + available. + + * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook + instead of find-file-hooks if it is available. + + * nntp.el (nntp-open-connection): Replace + process-kill-without-query by gnus-set-process-query-on-exit-flag. + (nntp-open-ssl-stream): Ditto. + (nntp-open-tls-stream): Ditto. + + * pgg.el: Don't bind itimer vars; don't autoload itimer functions. + (pgg-run-at-time-1): New macro. + (pgg-run-at-time): Use it. + + * starttls.el (starttls-set-process-query-on-exit-flag): Alias to + set-process-query-on-exit-flag or process-kill-without-query. + (starttls-open-stream-gnutls): Use it instead of + process-kill-without-query. + (starttls-open-stream): Ditto. + +2005-05-31 Simon Josefsson <jas@extundo.com> + + * imap.el (imap-ssl-open): Use imap-process-connection-type, + instead of hard coding to nil. + +2005-05-31 Kevin Greiner <kgreiner@xpediantsolutions.com> + + * gnus-group.el (): Require gnus-sum and autoload functions to + resolve warnings when gnus-group.el compiled alone. + +2005-05-30 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus-agent.el (gnus-agent-regenerate-group) + (gnus-agent-fetch-articles): Replace `string-to-int' by + `string-to-number'. + * gnus-art.el (gnus-button-fetch-group): Ditto. + * gnus-cache.el (gnus-cache-generate-active) + (gnus-cache-articles-in-group): Ditto. + * gnus-group.el (gnus-group-set-current-level) + (gnus-group-insert-group-line): Ditto. + * gnus-score.el (gnus-score-set-expunge-below) + (gnus-score-set-mark-below, gnus-summary-score-effect) + (gnus-summary-score-entry): Ditto. + * gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas) + (gnus-soup-pack): Ditto. + * gnus-spec.el (gnus-xmas-format): Ditto. + * gnus-start.el (gnus-newsrc-to-gnus-format): Ditto. + * gnus-sum.el (gnus-create-xref-hashtb): Ditto. + * gnus-uu.el (gnus-uu-expand-numbers): Ditto. + * nnbabyl.el (nnbabyl-article-group-number): Ditto. + * nndb.el (nndb-get-remote-expire-response): Ditto. + * nndiary.el (nndiary-parse-schedule-value) + (nndiary-string-to-number, nndiary-request-replace-article) + (nndiary-request-article): Ditto. + * nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto. + * nndraft.el (nndraft-articles, nndraft-request-group): Ditto. + * nneething.el (nneething-make-head): Ditto. + * nnfolder.el (nnfolder-request-article) + (nnfolder-retrieve-headers): Ditto. + * nnheader.el (nnheader-file-to-number): Ditto. + * nnkiboze.el (nnkiboze-request-article): Ditto. + * nnmail.el (nnmail-process-unix-mail-format) + (nnmail-process-babyl-mail-format): Ditto. + * nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto. + * nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number) + (nnmh-request-create-group, nnmh-request-list-1) + (nnmh-request-group, nnmh-request-article): Ditto. + * nnml.el (nnml-request-replace-article, nnml-request-article): Ditto. + * nnrss.el (nnrss-find-rss-via-syndic8): Ditto. + * nnsoup.el (nnsoup-make-active): Ditto. + * nnspool.el (nnspool-find-id, nnspool-request-group): Ditto. + * nntp.el (nntp-find-group-and-number) + (nntp-retrieve-headers-with-xover): Ditto. + * pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto. + * pgg-parse.el (pgg-read-body, pgg-read-bytes) + (pgg-format-key-identifier): Ditto. + * pop3.el (pop3-last, pop3-stat): Ditto. + * qp.el (quoted-printable-decode-region): Ditto. + + * spam-report.el (spam-report-url-ping-mm-url): Use format instead + of concat. + +2005-05-30 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks. + + * gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks. + + * gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks. + + * gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks. + + * gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks. + + * gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks. + + * gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks. + (gnus-carpal-mode): Ditto. + + * gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks. + (gnus-browse-mode): Ditto. + + * gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks. + + * gnus-util.el (gnus-run-mode-hooks): Save current buffer. + +2005-05-29 Richard M. Stallman <rms@gnu.org> + + * gnus-cite.el (gnus-cite-add-face): Set overlay's evaporate property. + +2005-05-27 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-util.el (gnus-run-mode-hooks): New function. + + * score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks. + +2005-05-26 Luc Teirlinck <teirllm@auburn.edu> + + * gnus-agent.el (gnus-agent-make-mode-line-string): + Use mode-line-highlight as mouse-face. + +2005-05-17 Katsumi Yamaoka <yamaoka@jpl.org> + + * canlock.el (canlock): Change the parent group to news. + + * deuglify.el (gnus-outlook-deuglify): Add :group. + + * dig.el (dig): Add :group. + + * gnus-art.el (gnus-inhibit-mime-unbuttonizing): Add :group. + + * gnus-cite.el (gnus-cite-attribution-face): Add :group. + (gnus-cite-face-1, gnus-cite-face-2, gnus-cite-face-3): Ditto. + (gnus-cite-face-4, gnus-cite-face-5, gnus-cite-face-6): Ditto. + (gnus-cite-face-7, gnus-cite-face-8, gnus-cite-face-9): Ditto. + (gnus-cite-face-10, gnus-cite-face-11): Ditto. + + * gnus-diary.el (gnus-diary): Add :group. + + * gnus.el (gnus-group-news-1-face): Add :group. + (gnus-group-news-1-empty-face): Ditto. + (gnus-group-news-2-face, gnus-group-news-2-empty-face): Ditto. + (gnus-group-news-3-face, gnus-group-news-3-empty-face): Ditto. + (gnus-group-news-4-face, gnus-group-news-4-empty-face): Ditto. + (gnus-group-news-5-face, gnus-group-news-5-empty-face): Ditto. + (gnus-group-news-6-face, gnus-group-news-6-empty-face): Ditto. + (gnus-group-news-low-face, gnus-group-news-low-empty-face): Ditto. + (gnus-group-mail-1-face, gnus-group-mail-1-empty-face): Ditto. + (gnus-group-mail-2-face, gnus-group-mail-2-empty-face): Ditto. + (gnus-group-mail-3-face, gnus-group-mail-3-empty-face): Ditto. + (gnus-group-mail-low-face, gnus-group-mail-low-empty-face): Ditto. + (gnus-summary-selected-face, gnus-summary-cancelled-face): Ditto. + (gnus-summary-high-ticked-face): Ditto. + (gnus-summary-low-ticked-face): Ditto. + (gnus-summary-normal-ticked-face): Ditto. + (gnus-summary-high-ancient-face): Ditto. + (gnus-summary-low-ancient-face): Ditto. + (gnus-summary-normal-ancient-face): Ditto. + (gnus-summary-high-undownloaded-face): Ditto. + (gnus-summary-low-undownloaded-face): Ditto. + (gnus-summary-normal-undownloaded-face): Ditto. + (gnus-summary-high-unread-face): Ditto. + (gnus-summary-low-unread-face): Ditto. + (gnus-summary-normal-unread-face): Ditto. + (gnus-summary-high-read-face, gnus-summary-low-read-face): Ditto. + (gnus-summary-normal-read-face, gnus-splash-face): Ditto. + + * message.el (message-minibuffer-local-map): Add :group. + + * sieve-manage.el (sieve-manage-log): Add :group. + (sieve-manage-default-user): Diito. + (sieve-manage-server-eol, sieve-manage-client-eol): Ditto. + (sieve-manage-streams, sieve-manage-stream-alist): Ditto. + (sieve-manage-authenticators): Ditto. + (sieve-manage-authenticator-alist): Ditto. + (sieve-manage-default-port): Ditto. + + * sieve-mode.el (sieve-control-commands-face): Add :group. + (sieve-action-commands-face): Ditto. + (sieve-test-commands-face): Ditto. + (sieve-tagged-arguments-face): Ditto. + + * smime.el (smime): Add :group. + + * spam-report.el (spam-report): Add :group. + + * spam.el (spam, spam-face): Add :group. + +2005-05-26 Lute Kamstra <lute@gnu.org> + + * score-mode.el (gnus-score-mode): Use run-mode-hooks. + 2005-05-16 Katsumi Yamaoka <yamaoka@jpl.org> * gnus-art.el: Don't autoload mail-extract-address-components. @@ -213,11 +451,11 @@ * nnimap.el (nnimap-date-days-ago): Ditto. - * gnus-demon.el (parse-time-string): Added autoload. - - * gnus-delay.el (parse-time-string): Added autoload. - - * gnus-art.el (parse-time-string): Added autoload. + * gnus-demon.el (parse-time-string): Add autoload. + + * gnus-delay.el (parse-time-string): Add autoload. + + * gnus-art.el (parse-time-string): Add autoload. * nnultimate.el (parse-time): Require for `parse-time-string'. @@ -271,14 +509,13 @@ (rfc2047-encoded-word-regexp): Don't use shy group. (rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change. (rfc2047-parse-and-decode): Ditto. - (rfc2047-decode): Treat the ascii coding-system as raw-text by - default. + (rfc2047-decode): Treat the ascii coding-system as raw-text by default. 2005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> * rfc2047.el (rfc2047-encode-encoded-words): New variable. (rfc2047-field-value): Strip props. - (rfc2047-encode-message-header): Disabled header folding -- not + (rfc2047-encode-message-header): Disable header folding -- not all headers can be folded, and this should be done by the message composition mode. Probably. I think. (rfc2047-encodable-p): Say that =? needs encoding.
--- a/lisp/gnus/canlock.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/canlock.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; canlock.el --- functions for Cancel-Lock feature -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 +;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Katsumi Yamaoka <yamaoka@jpl.org> @@ -50,7 +50,7 @@ (defgroup canlock nil "The Cancel-Lock feature." - :group 'applications) + :group 'news) (defcustom canlock-password nil "Password to use when signing a Cancel-Lock or a Cancel-Key header."
--- a/lisp/gnus/deuglify.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/deuglify.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; deuglify.el --- deuglify broken Outlook (Express) articles -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002 Raymond Scholz ;; Author: Raymond Scholz <rscholz@zonix.de> @@ -231,7 +231,8 @@ (defgroup gnus-outlook-deuglify nil "Deuglify articles generated by broken user agents like MS Outlook (Express)." - :version "22.1") + :version "22.1" + :group 'gnus) ;;;###autoload (defcustom gnus-outlook-deuglify-unwrap-min 45
--- a/lisp/gnus/dig.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/dig.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; dig.el --- Domain Name System dig interface -;; Copyright (c) 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (c) 2000, 2001, 2003, 2005 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> ;; Keywords: DNS BIND dig @@ -40,7 +40,8 @@ (eval-when-compile (require 'cl)) (defgroup dig nil - "Dig configuration.") + "Dig configuration." + :group 'comm) (defcustom dig-program "dig" "Name of dig (domain information groper) binary."
--- a/lisp/gnus/gnus-agent.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-agent.el Mon Jun 06 02:39:45 2005 +0000 @@ -561,7 +561,8 @@ (if (and (fboundp 'propertize) (fboundp 'make-mode-line-mouse-map)) (propertize string 'local-map - (make-mode-line-mouse-map mouse-button mouse-func)) + (make-mode-line-mouse-map mouse-button mouse-func) + 'mouse-face 'mode-line-highlight) string)) (defun gnus-agent-toggle-plugged (set-to) @@ -1539,7 +1540,7 @@ (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *") (push (cons (buffer-substring (match-beginning 1) (match-end 1)) - (string-to-int + (string-to-number (buffer-substring (match-beginning 2) (match-end 2)))) crosses) @@ -2551,7 +2552,7 @@ (buffer-disable-undo) (setq truncate-lines t) (setq buffer-read-only t) - (gnus-run-hooks 'gnus-category-mode-hook)) + (gnus-run-mode-hooks 'gnus-category-mode-hook)) (defalias 'gnus-category-position-point 'gnus-goto-colon) @@ -3702,7 +3703,7 @@ (dir (file-name-directory file)) point (downloaded (if (file-exists-p dir) - (sort (mapcar (lambda (name) (string-to-int name)) + (sort (mapcar (lambda (name) (string-to-number name)) (directory-files dir nil "^[0-9]+$" t)) '>) (progn (gnus-make-directory dir) nil)))
--- a/lisp/gnus/gnus-art.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-art.el Mon Jun 06 02:39:45 2005 +0000 @@ -367,8 +367,12 @@ (or (nth 4 spec) 3) (intern (format "gnus-emphasis-%s" (nth 2 spec))))) types)) - '(("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" - 2 3 gnus-emphasis-strikethru) + '(;; I've never seen anyone use this strikethru convention whereas I've + ;; several times seen it triggered by normal text. --Stef + ;; Miles suggests that this form is sometimes used but for italics, + ;; so maybe we should map it to `italic'. + ;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" + ;; 2 3 gnus-emphasis-strikethru) ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" 2 3 gnus-emphasis-underline)))) "*Alist that says how to fontify certain phrases. @@ -814,6 +818,7 @@ as described by the variables `gnus-buttonized-mime-types' and `gnus-unbuttonized-mime-types'." :version "22.1" + :group 'gnus-article-mime :type 'boolean) (defcustom gnus-body-boundary-delimiter "_" @@ -2180,10 +2185,11 @@ ;; The command is a string, so we interpret the command ;; as a, well, command, and fork it off. (let ((process-connection-type nil)) - (process-kill-without-query + (gnus-set-process-query-on-exit-flag (start-process "article-x-face" nil shell-file-name - shell-command-switch gnus-article-x-face-command)) + shell-command-switch gnus-article-x-face-command) + nil) (with-temp-buffer (insert face) (process-send-region "article-x-face" @@ -3032,20 +3038,21 @@ (defun article-update-date-lapsed () "Function to be run from a timer to update the lapsed time line." - (let (deactivate-mark) - (save-excursion - (ignore-errors - (walk-windows - (lambda (w) - (set-buffer (window-buffer w)) - (when (eq major-mode 'gnus-article-mode) - (let ((mark (point-marker))) - (goto-char (point-min)) - (when (re-search-forward "^X-Sent:" nil t) - (article-date-lapsed t)) - (goto-char (marker-position mark)) - (move-marker mark nil)))) - nil 'visible))))) + (save-match-data + (let (deactivate-mark) + (save-excursion + (ignore-errors + (walk-windows + (lambda (w) + (set-buffer (window-buffer w)) + (when (eq major-mode 'gnus-article-mode) + (let ((mark (point-marker))) + (goto-char (point-min)) + (when (re-search-forward "^X-Sent:" nil t) + (article-date-lapsed t)) + (goto-char (marker-position mark)) + (move-marker mark nil)))) + nil 'visible)))))) (defun gnus-start-date-timer (&optional n) "Start a timer to update the X-Sent header in the article buffers. @@ -3741,7 +3748,7 @@ (setq buffer-read-only t) (set-syntax-table gnus-article-mode-syntax-table) (mm-enable-multibyte) - (gnus-run-hooks 'gnus-article-mode-hook)) + (gnus-run-mode-hooks 'gnus-article-mode-hook)) (defun gnus-article-setup-buffer () "Initialize the article buffer." @@ -6786,7 +6793,7 @@ (match-string 3 address) "nntp"))) nil nil nil - (and (match-end 6) (list (string-to-int (match-string 6 address)))))))) + (and (match-end 6) (list (string-to-number (match-string 6 address)))))))) (defun gnus-url-parse-query-string (query &optional downcase) (let (retval pairs cur key val)
--- a/lisp/gnus/gnus-cache.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-cache.el Mon Jun 06 02:39:45 2005 +0000 @@ -487,7 +487,7 @@ articles) (when (file-exists-p dir) (setq articles - (sort (mapcar (lambda (name) (string-to-int name)) + (sort (mapcar (lambda (name) (string-to-number name)) (directory-files dir nil "^[0-9]+$" t)) '<)) ;; Update the cache active file, just to synch more. @@ -681,7 +681,7 @@ ;; Separate articles from all other files and directories. (while files (if (string-match "^[0-9]+$" (file-name-nondirectory (car files))) - (push (string-to-int (file-name-nondirectory (pop files))) nums) + (push (string-to-number (file-name-nondirectory (pop files))) nums) (push (pop files) alphs))) ;; If we have nums, then this is probably a valid group. (when (setq nums (sort nums '<))
--- a/lisp/gnus/gnus-cite.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-cite.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; gnus-cite.el --- parse citations in articles for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005 ;; Free Software Foundation, Inc. ;; Author: Per Abhiddenware @@ -138,7 +139,8 @@ (defface gnus-cite-attribution-face '((t (:italic t))) - "Face used for attribution lines.") + "Face used for attribution lines." + :group 'gnus-cite) (defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face "Face used for attribution lines. @@ -155,7 +157,8 @@ (:foreground "MidnightBlue")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-2 '((((class color) (background dark)) @@ -165,7 +168,8 @@ (:foreground "firebrick")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-3 '((((class color) (background dark)) @@ -175,7 +179,8 @@ (:foreground "dark green")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-4 '((((class color) (background dark)) @@ -185,7 +190,8 @@ (:foreground "OrangeRed")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-5 '((((class color) (background dark)) @@ -195,7 +201,8 @@ (:foreground "dark khaki")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-6 '((((class color) (background dark)) @@ -205,7 +212,8 @@ (:foreground "dark violet")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-7 '((((class color) (background dark)) @@ -215,7 +223,8 @@ (:foreground "SteelBlue4")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-8 '((((class color) (background dark)) @@ -225,7 +234,8 @@ (:foreground "magenta")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-9 '((((class color) (background dark)) @@ -235,7 +245,8 @@ (:foreground "violet")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-10 '((((class color) (background dark)) @@ -245,7 +256,8 @@ (:foreground "medium purple")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-11 '((((class color) (background dark)) @@ -255,7 +267,8 @@ (:foreground "turquoise")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defcustom gnus-cite-face-list '(gnus-cite-face-1 gnus-cite-face-2 gnus-cite-face-3 gnus-cite-face-4 @@ -1004,6 +1017,7 @@ (when (< from to) (push (setq overlay (gnus-make-overlay from to)) gnus-cite-overlay-list) + (gnus-overlay-put overlay 'evaporate t) (gnus-overlay-put overlay 'face face)))))) (defun gnus-cite-toggle (prefix)
--- a/lisp/gnus/gnus-cus.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-cus.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; gnus-cus.el --- customization commands for Gnus ;; -;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> @@ -67,7 +67,7 @@ (set (make-local-variable 'widget-push-button-suffix) "") (set (make-local-variable 'widget-link-prefix) "") (set (make-local-variable 'widget-link-suffix) "")) - (gnus-run-hooks 'gnus-custom-mode-hook)) + (gnus-run-mode-hooks 'gnus-custom-mode-hook)) ;;; Group Customization:
--- a/lisp/gnus/gnus-diary.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-diary.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend -;; Copyright (c) 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 1999, 2000, 2001 Didier Verna. ;; Author: Didier Verna <didier@xemacs.org> @@ -103,7 +103,8 @@ (defgroup gnus-diary nil "Utilities on top of the nndiary backend for Gnus." - :version "22.1") + :version "22.1" + :group 'gnus) (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n" "*Summary line format for nndiary groups."
--- a/lisp/gnus/gnus-eform.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-eform.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; gnus-eform.el --- a mode for editing forms for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -83,7 +83,7 @@ (use-local-map gnus-edit-form-mode-map) (make-local-variable 'gnus-edit-form-done-function) (make-local-variable 'gnus-prev-winconf) - (gnus-run-hooks 'gnus-edit-form-mode-hook)) + (gnus-run-mode-hooks 'gnus-edit-form-mode-hook)) (defun gnus-edit-form (form documentation exit-func) "Edit FORM in a new buffer.
--- a/lisp/gnus/gnus-group.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-group.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; gnus-group.el --- group mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -41,7 +41,11 @@ (require 'time-date) (require 'gnus-ems) -(eval-when-compile (require 'mm-url)) +(eval-when-compile + (require 'mm-url) + (let ((features (cons 'gnus-group features))) + (require 'gnus-sum)) + (defvar gnus-cache-active-hashtb)) (defcustom gnus-group-archive-directory "/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/" @@ -1042,7 +1046,7 @@ (gnus-undo-mode 1)) (when gnus-slave (gnus-slave-mode)) - (gnus-run-hooks 'gnus-group-mode-hook)) + (gnus-run-mode-hooks 'gnus-group-mode-hook)) (defun gnus-update-group-mark-positions () (save-excursion @@ -1452,7 +1456,7 @@ (eval gnus-group-line-format-spec))) `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) gnus-unread ,(if (numberp number) - (string-to-int gnus-tmp-number-of-unread) + (string-to-number gnus-tmp-number-of-unread) t) gnus-marked ,gnus-tmp-marked-mark gnus-indentation ,gnus-group-indentation @@ -3246,7 +3250,7 @@ (progn (unless (gnus-group-process-prefix current-prefix-arg) (error "No group on the current line")) - (string-to-int + (string-to-number (let ((s (read-string (format "Level (default %s): " (or (gnus-group-group-level)
--- a/lisp/gnus/gnus-kill.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-kill.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; gnus-kill.el --- kill commands for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> @@ -161,7 +161,7 @@ (setq major-mode 'gnus-kill-file-mode) (setq mode-name "Kill") (lisp-mode-variables nil) - (gnus-run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) + (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) (defun gnus-kill-file-edit-file (newsgroup) "Begin editing a kill file for NEWSGROUP.
--- a/lisp/gnus/gnus-salt.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-salt.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; gnus-salt.el --- alternate summary mode interfaces for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -496,7 +496,7 @@ (gnus-set-work-buffer) (gnus-tree-node-insert (make-mail-header "") nil) (setq gnus-tree-node-length (1- (point)))) - (gnus-run-hooks 'gnus-tree-mode-hook)) + (gnus-run-mode-hooks 'gnus-tree-mode-hook)) (defun gnus-tree-read-summary-keys (&optional arg) "Read a summary buffer key sequence and execute it." @@ -1009,7 +1009,7 @@ (buffer-disable-undo) (setq buffer-read-only t) (make-local-variable 'gnus-carpal-attached-buffer) - (gnus-run-hooks 'gnus-carpal-mode-hook)) + (gnus-run-mode-hooks 'gnus-carpal-mode-hook)) (defun gnus-carpal-setup-buffer (type) (let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))
--- a/lisp/gnus/gnus-score.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-score.el Mon Jun 06 02:39:45 2005 +0000 @@ -826,7 +826,7 @@ ;; If this is an integer comparison, we transform from string to int. (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) (if (stringp match) - (setq match (string-to-int match))) + (setq match (string-to-number match))) (set-text-properties 0 (length match) nil match)) (unless (eq date 'now) @@ -891,7 +891,7 @@ t) (read-string "Match: ") (if (y-or-n-p "Use regexp match? ") 'r 's) - (string-to-int (read-string "Score: ")))) + (string-to-number (read-string "Score: ")))) (save-excursion (unless (and (stringp match) (> (length match) 0)) (error "No match")) @@ -945,7 +945,7 @@ "Automatically mark articles with score below SCORE as read." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Mark below: "))))) + (string-to-number (read-string "Mark below: "))))) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'mark (list score)) (gnus-score-set 'touched '(t)) @@ -979,7 +979,7 @@ "Automatically expunge articles with score below SCORE." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Set expunge below: "))))) + (string-to-number (read-string "Set expunge below: "))))) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'expunge (list score)) (gnus-score-set 'touched '(t)))
--- a/lisp/gnus/gnus-soup.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-soup.el Mon Jun 06 02:39:45 2005 +0000 @@ -349,9 +349,9 @@ (packer (if (< (string-match "%s" packer) (string-match "%d" packer)) (format packer files - (string-to-int (gnus-soup-unique-prefix dir))) + (string-to-number (gnus-soup-unique-prefix dir))) (format packer - (string-to-int (gnus-soup-unique-prefix dir)) + (string-to-number (gnus-soup-unique-prefix dir)) files))) (dir (expand-file-name dir))) (gnus-make-directory dir) @@ -385,7 +385,7 @@ (and (eq (preceding-char) ?\t) (gnus-soup-field)) (and (eq (preceding-char) ?\t) - (string-to-int (gnus-soup-field)))) + (string-to-number (gnus-soup-field)))) areas) (when (eq (preceding-char) ?\t) (beginning-of-line 2))) @@ -535,7 +535,7 @@ (error "Bad header")) (forward-line 1) (setq beg (point) - end (+ (point) (string-to-int + end (+ (point) (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) (switch-to-buffer tmp-buf)
--- a/lisp/gnus/gnus-spec.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-spec.el Mon Jun 06 02:39:45 2005 +0000 @@ -509,7 +509,7 @@ (t (if (null args) (error 'wrong-number-of-arguments #'my-format n fstring)) - (let* ((minlen (string-to-int (or (match-string 2) ""))) + (let* ((minlen (string-to-number (or (match-string 2) ""))) (arg (car args)) (str (if (stringp arg) arg (format "%s" arg))) (lpad (null (match-string 1)))
--- a/lisp/gnus/gnus-srvr.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-srvr.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,6 @@ ;;; gnus-srvr.el --- virtual server support for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +;; 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -269,7 +270,7 @@ (put 'gnus-server-mode 'font-lock-defaults '(gnus-server-font-lock-keywords t)) (set (make-local-variable 'font-lock-defaults) '(gnus-server-font-lock-keywords t))) - (gnus-run-hooks 'gnus-server-mode-hook)) + (gnus-run-mode-hooks 'gnus-server-mode-hook)) (defun gnus-server-insert-server-line (gnus-tmp-name method) (let* ((gnus-tmp-how (car method)) @@ -849,7 +850,7 @@ (setq truncate-lines t) (gnus-set-default-directory) (setq buffer-read-only t) - (gnus-run-hooks 'gnus-browse-mode-hook)) + (gnus-run-mode-hooks 'gnus-browse-mode-hook)) (defun gnus-browse-read-group (&optional no-article number) "Enter the group at the current line.
--- a/lisp/gnus/gnus-start.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-start.el Mon Jun 06 02:39:45 2005 +0000 @@ -2518,7 +2518,7 @@ (cond ((looking-at "[0-9]+") ;; We narrow and read a number instead of buffer-substring/ - ;; string-to-int because it's faster. narrow/widen is + ;; string-to-number because it's faster. narrow/widen is ;; faster than save-restriction/narrow, and save-restriction ;; produces a garbage object. (setq num1 (progn
--- a/lisp/gnus/gnus-sum.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-sum.el Mon Jun 06 02:39:45 2005 +0000 @@ -2722,7 +2722,7 @@ (make-local-variable 'gnus-summary-mark-positions) (gnus-make-local-hook 'pre-command-hook) (add-hook 'pre-command-hook 'gnus-set-global-variables nil t) - (gnus-run-hooks 'gnus-summary-mode-hook) + (gnus-run-mode-hooks 'gnus-summary-mode-hook) (turn-on-gnus-mailing-list-mode) (mm-enable-multibyte) (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) @@ -5660,7 +5660,7 @@ (match-end 1))) (substring xrefs (match-beginning 1) (match-end 1)))) (setq number - (string-to-int (substring xrefs (match-beginning 2) + (string-to-number (substring xrefs (match-beginning 2) (match-end 2)))) (if (setq entry (gnus-gethash group xref-hashtb)) (setcdr entry (cons number (cdr entry)))
--- a/lisp/gnus/gnus-util.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-util.el Mon Jun 06 02:39:45 2005 +0000 @@ -1015,6 +1015,13 @@ (save-current-buffer (apply 'run-hooks funcs))) +(defun gnus-run-mode-hooks (&rest funcs) + "Run `run-mode-hooks' if it is available, otherwise `run-hooks'. +This function saves the current buffer." + (if (fboundp 'run-mode-hooks) + (save-current-buffer (apply 'run-mode-hooks funcs)) + (save-current-buffer (apply 'run-hooks funcs)))) + ;;; Various (defvar gnus-group-buffer) ; Compiler directive @@ -1564,6 +1571,11 @@ (file-truename (concat old-dir ".."))))))))) +(if (fboundp 'set-process-query-on-exit-flag) + (defalias 'gnus-set-process-query-on-exit-flag + 'set-process-query-on-exit-flag) + (defalias 'gnus-set-process-query-on-exit-flag + 'process-kill-without-query)) (provide 'gnus-util)
--- a/lisp/gnus/gnus-uu.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus-uu.el Mon Jun 06 02:39:45 2005 +0000 @@ -1185,7 +1185,7 @@ (ignore-errors (replace-match (format "%06d" - (string-to-int (buffer-substring + (string-to-number (buffer-substring (match-beginning 0) (match-end 0))))))) (setq string (buffer-substring 1 (point-max))) (setcar (car string-list) string)
--- a/lisp/gnus/gnus.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/gnus.el Mon Jun 06 02:39:45 2005 +0000 @@ -366,7 +366,8 @@ (:foreground "ForestGreen" :bold t)) (t ())) - "Level 1 newsgroup face.") + "Level 1 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-1-empty-face '((((class color) @@ -377,7 +378,8 @@ (:foreground "ForestGreen")) (t ())) - "Level 1 empty newsgroup face.") + "Level 1 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-2-face '((((class color) @@ -388,7 +390,8 @@ (:foreground "CadetBlue4" :bold t)) (t ())) - "Level 2 newsgroup face.") + "Level 2 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-2-empty-face '((((class color) @@ -399,7 +402,8 @@ (:foreground "CadetBlue4")) (t ())) - "Level 2 empty newsgroup face.") + "Level 2 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-3-face '((((class color) @@ -410,7 +414,8 @@ (:bold t)) (t ())) - "Level 3 newsgroup face.") + "Level 3 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-3-empty-face '((((class color) @@ -421,7 +426,8 @@ ()) (t ())) - "Level 3 empty newsgroup face.") + "Level 3 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-4-face '((((class color) @@ -432,7 +438,8 @@ (:bold t)) (t ())) - "Level 4 newsgroup face.") + "Level 4 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-4-empty-face '((((class color) @@ -443,7 +450,8 @@ ()) (t ())) - "Level 4 empty newsgroup face.") + "Level 4 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-5-face '((((class color) @@ -454,7 +462,8 @@ (:bold t)) (t ())) - "Level 5 newsgroup face.") + "Level 5 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-5-empty-face '((((class color) @@ -465,7 +474,8 @@ ()) (t ())) - "Level 5 empty newsgroup face.") + "Level 5 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-6-face '((((class color) @@ -476,7 +486,8 @@ (:bold t)) (t ())) - "Level 6 newsgroup face.") + "Level 6 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-6-empty-face '((((class color) @@ -487,7 +498,8 @@ ()) (t ())) - "Level 6 empty newsgroup face.") + "Level 6 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-low-face '((((class color) @@ -498,7 +510,8 @@ (:foreground "DarkGreen" :bold t)) (t ())) - "Low level newsgroup face.") + "Low level newsgroup face." + :group 'gnus-group) (defface gnus-group-news-low-empty-face '((((class color) @@ -509,7 +522,8 @@ (:foreground "DarkGreen")) (t ())) - "Low level empty newsgroup face.") + "Low level empty newsgroup face." + :group 'gnus-group) (defface gnus-group-mail-1-face '((((class color) @@ -520,7 +534,8 @@ (:foreground "DeepPink3" :bold t)) (t (:bold t))) - "Level 1 mailgroup face.") + "Level 1 mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-1-empty-face '((((class color) @@ -531,7 +546,8 @@ (:foreground "DeepPink3")) (t (:italic t :bold t))) - "Level 1 empty mailgroup face.") + "Level 1 empty mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-2-face '((((class color) @@ -542,7 +558,8 @@ (:foreground "HotPink3" :bold t)) (t (:bold t))) - "Level 2 mailgroup face.") + "Level 2 mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-2-empty-face '((((class color) @@ -553,7 +570,8 @@ (:foreground "HotPink3")) (t (:bold t))) - "Level 2 empty mailgroup face.") + "Level 2 empty mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-3-face '((((class color) @@ -564,7 +582,8 @@ (:foreground "magenta4" :bold t)) (t (:bold t))) - "Level 3 mailgroup face.") + "Level 3 mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-3-empty-face '((((class color) @@ -575,7 +594,8 @@ (:foreground "magenta4")) (t ())) - "Level 3 empty mailgroup face.") + "Level 3 empty mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-low-face '((((class color) @@ -586,7 +606,8 @@ (:foreground "DeepPink4" :bold t)) (t (:bold t))) - "Low level mailgroup face.") + "Low level mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-low-empty-face '((((class color) @@ -597,18 +618,21 @@ (:foreground "DeepPink4")) (t (:bold t))) - "Low level empty mailgroup face.") + "Low level empty mailgroup face." + :group 'gnus-group) ;; Summary mode faces. (defface gnus-summary-selected-face '((t (:underline t))) - "Face used for selected articles.") + "Face used for selected articles." + :group 'gnus-summary) (defface gnus-summary-cancelled-face '((((class color)) (:foreground "yellow" :background "black"))) - "Face used for cancelled articles.") + "Face used for cancelled articles." + :group 'gnus-summary) (defface gnus-summary-high-ticked-face '((((class color) @@ -619,7 +643,8 @@ (:foreground "firebrick" :bold t)) (t (:bold t))) - "Face used for high interest ticked articles.") + "Face used for high interest ticked articles." + :group 'gnus-summary) (defface gnus-summary-low-ticked-face '((((class color) @@ -630,7 +655,8 @@ (:foreground "firebrick" :italic t)) (t (:italic t))) - "Face used for low interest ticked articles.") + "Face used for low interest ticked articles." + :group 'gnus-summary) (defface gnus-summary-normal-ticked-face '((((class color) @@ -641,7 +667,8 @@ (:foreground "firebrick")) (t ())) - "Face used for normal interest ticked articles.") + "Face used for normal interest ticked articles." + :group 'gnus-summary) (defface gnus-summary-high-ancient-face '((((class color) @@ -652,7 +679,8 @@ (:foreground "RoyalBlue" :bold t)) (t (:bold t))) - "Face used for high interest ancient articles.") + "Face used for high interest ancient articles." + :group 'gnus-summary) (defface gnus-summary-low-ancient-face '((((class color) @@ -663,7 +691,8 @@ (:foreground "RoyalBlue" :italic t)) (t (:italic t))) - "Face used for low interest ancient articles.") + "Face used for low interest ancient articles." + :group 'gnus-summary) (defface gnus-summary-normal-ancient-face '((((class color) @@ -674,7 +703,8 @@ (:foreground "RoyalBlue")) (t ())) - "Face used for normal interest ancient articles.") + "Face used for normal interest ancient articles." + :group 'gnus-summary) (defface gnus-summary-high-undownloaded-face '((((class color) @@ -683,7 +713,8 @@ (((class color) (background dark)) (:bold t :foreground "LightGray")) (t (:inverse-video t :bold t))) - "Face used for high interest uncached articles.") + "Face used for high interest uncached articles." + :group 'gnus-summary) (defface gnus-summary-low-undownloaded-face '((((class color) @@ -692,7 +723,8 @@ (((class color) (background dark)) (:italic t :foreground "LightGray" :bold nil)) (t (:inverse-video t :italic t))) - "Face used for low interest uncached articles.") + "Face used for low interest uncached articles." + :group 'gnus-summary) (defface gnus-summary-normal-undownloaded-face '((((class color) @@ -701,22 +733,26 @@ (((class color) (background dark)) (:foreground "LightGray" :bold nil)) (t (:inverse-video t))) - "Face used for normal interest uncached articles.") + "Face used for normal interest uncached articles." + :group 'gnus-summary) (defface gnus-summary-high-unread-face '((t (:bold t))) - "Face used for high interest unread articles.") + "Face used for high interest unread articles." + :group 'gnus-summary) (defface gnus-summary-low-unread-face '((t (:italic t))) - "Face used for low interest unread articles.") + "Face used for low interest unread articles." + :group 'gnus-summary) (defface gnus-summary-normal-unread-face '((t ())) - "Face used for normal interest unread articles.") + "Face used for normal interest unread articles." + :group 'gnus-summary) (defface gnus-summary-high-read-face '((((class color) @@ -729,7 +765,8 @@ :bold t)) (t (:bold t))) - "Face used for high interest read articles.") + "Face used for high interest read articles." + :group 'gnus-summary) (defface gnus-summary-low-read-face '((((class color) @@ -742,7 +779,8 @@ :italic t)) (t (:italic t))) - "Face used for low interest read articles.") + "Face used for low interest read articles." + :group 'gnus-summary) (defface gnus-summary-normal-read-face '((((class color) @@ -753,7 +791,8 @@ (:foreground "DarkGreen")) (t ())) - "Face used for normal interest read articles.") + "Face used for normal interest read articles." + :group 'gnus-summary) ;;; @@ -806,7 +845,8 @@ (:foreground "#888888")) (t ())) - "Face for the splash screen.") + "Face for the splash screen." + :group 'gnus) (defun gnus-splash () (save-excursion
--- a/lisp/gnus/html2text.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/html2text.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; html2text.el --- a simple html to plain text converter -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Joakim Hove <hove@phys.ntnu.no> @@ -374,7 +374,8 @@ fashion, quite close to pure guess-work. It does work in some cases though." (interactive) (goto-char (point-min)) - (replace-regexp "^<br>$" "") + (while (re-search-forward "^<br>$" nil t) + (delete-region (match-beginning 0) (match-end 0))) ;; Removing lonely <br> on a single line, if they are left intact we ;; dont have any paragraphs at all. (goto-char (point-min))
--- a/lisp/gnus/imap.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/imap.el Mon Jun 06 02:39:45 2005 +0000 @@ -640,7 +640,11 @@ (let* ((port (or port imap-default-ssl-port)) (coding-system-for-read imap-coding-system-for-read) (coding-system-for-write imap-coding-system-for-write) - (process-connection-type nil) + (process-connection-type imap-process-connection-type) + (set-process-query-on-exit-flag + (if (fboundp 'set-process-query-on-exit-flag) + 'set-process-query-on-exit-flag + 'process-kill-without-query)) process) (when (progn (setq process (start-process @@ -650,7 +654,7 @@ (format-spec-make ?s server ?p (number-to-string port))))) - (process-kill-without-query process) + (funcall set-process-query-on-exit-flag process nil) process) (with-current-buffer buffer (goto-char (point-min))
--- a/lisp/gnus/message.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/message.el Mon Jun 06 02:39:45 2005 +0000 @@ -842,7 +842,8 @@ (set-keymap-parent map minibuffer-local-map) map) "Keymap for `message-read-from-minibuffer'." - :version "22.1") + :version "22.1" + :group 'message-various) ;;;###autoload (defcustom message-citation-line-function 'message-insert-citation-line
--- a/lisp/gnus/mm-util.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/mm-util.el Mon Jun 06 02:39:45 2005 +0000 @@ -831,22 +831,28 @@ `find-file-hooks', etc. If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. This function ensures that none of these modifications will take place." - (let ((format-alist nil) - (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil) - (inhibit-file-name-operation (if inhibit - 'insert-file-contents - inhibit-file-name-operation)) - (inhibit-file-name-handlers - (if inhibit - (append mm-inhibit-file-name-handlers - inhibit-file-name-handlers) - inhibit-file-name-handlers))) - (insert-file-contents filename visit beg end replace))) + (let* ((format-alist nil) + (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (inhibit-file-name-operation (if inhibit + 'insert-file-contents + inhibit-file-name-operation)) + (inhibit-file-name-handlers + (if inhibit + (append mm-inhibit-file-name-handlers + inhibit-file-name-handlers) + inhibit-file-name-handlers)) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (insert-file-contents filename visit beg end replace) + (set ffh val)))) (defun mm-append-to-file (start end filename &optional codesys inhibit) "Append the contents of the region to the end of file FILENAME.
--- a/lisp/gnus/mml1991.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/mml1991.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,6 @@ ;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -;; Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 +;; Free Software Foundation, Inc. ;; Author: Sascha Lüdecke <sascha@meta-x.de>, ;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue) @@ -219,8 +220,10 @@ ;; pgg wrapper -(defvar pgg-output-buffer) -(defvar pgg-errors-buffer) +(eval-when-compile + (defvar pgg-default-user-id) + (defvar pgg-errors-buffer) + (defvar pgg-output-buffer)) (defun mml1991-pgg-sign (cont) (let (headers cte)
--- a/lisp/gnus/mml2015.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/mml2015.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,6 @@ ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu> ;; Keywords: PGP MIME MML @@ -632,6 +633,7 @@ ;;; pgg wrapper (eval-when-compile + (defvar pgg-default-user-id) (defvar pgg-errors-buffer) (defvar pgg-output-buffer))
--- a/lisp/gnus/nnbabyl.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnbabyl.el Mon Jun 06 02:39:45 2005 +0000 @@ -493,7 +493,7 @@ (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " nil t) (cons (buffer-substring (match-beginning 1) (match-end 1)) - (string-to-int + (string-to-number (buffer-substring (match-beginning 2) (match-end 2))))))) (defun nnbabyl-insert-lines ()
--- a/lisp/gnus/nndb.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nndb.el Mon Jun 06 02:39:45 2005 +0000 @@ -196,7 +196,7 @@ ;; otherwise, pull all of the following numbers into the list (re-search-forward "follows\r?\n?" nil t) (while (re-search-forward "^[0-9]+$" nil t) - (push (string-to-int (match-string 0)) list))) + (push (string-to-number (match-string 0)) list))) list)) (defun nndb-request-expire-articles-remote
--- a/lisp/gnus/nndiary.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nndiary.el Mon Jun 06 02:39:45 2005 +0000 @@ -601,7 +601,7 @@ (nnheader-report 'nndiary "Article %s retrieved" id) ;; We return the article number. (cons (if group-num (car group-num) group) - (string-to-int (file-name-nondirectory path))))))) + (string-to-number (file-name-nondirectory path))))))) (deffoo nndiary-request-group (group &optional server dont-check) (let ((file-name-coding-system nnmail-pathname-coding-system)) @@ -820,7 +820,7 @@ ;; we should insert it. (This situation should never ;; occur, but one likes to make sure...) (while (and (looking-at "[0-9]+\t") - (< (string-to-int + (< (string-to-number (buffer-substring (match-beginning 0) (match-end 0))) article) @@ -1281,14 +1281,14 @@ (nnheader-article-to-file-alist nndiary-current-directory)))) -(defun nndiary-string-to-int (str min &optional max) - ;; Like `string-to-int' but barf if STR is not exactly an integer, and not +(defun nndiary-string-to-number (str min &optional max) + ;; Like `string-to-number' but barf if STR is not exactly an integer, and not ;; within the specified bounds. ;; Signals are caught by `nndiary-schedule'. (if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str)) (nndiary-error "not an integer value") ;; else - (let ((val (string-to-int str))) + (let ((val (string-to-number str))) (and (or (< val min) (and max (> val max))) (nndiary-error "value out of range")) @@ -1315,12 +1315,12 @@ (let ((res (split-string val "-"))) (cond ((= (length res) 1) - (nndiary-string-to-int (car res) min-or-values max)) + (nndiary-string-to-number (car res) min-or-values max)) ((= (length res) 2) ;; don't know if crontab accepts this, but ensure ;; that BEG is <= END - (let ((beg (nndiary-string-to-int (car res) min-or-values max)) - (end (nndiary-string-to-int (cadr res) min-or-values max))) + (let ((beg (nndiary-string-to-number (car res) min-or-values max)) + (end (nndiary-string-to-number (cadr res) min-or-values max))) (cond ((< beg end) (cons beg end)) ((= beg end)
--- a/lisp/gnus/nndoc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nndoc.el Mon Jun 06 02:39:45 2005 +0000 @@ -421,7 +421,7 @@ (search-forward "\n\n" beg t) (re-search-backward "^Content-Length:[ \t]*\\([0-9]+\\) *$" end t) - (setq len (string-to-int (match-string 1))) + (setq len (string-to-number (match-string 1))) (search-forward "\n\n" beg t) (unless (= (setq len (+ (point) len)) (point-max)) (and (< len (point-max)) @@ -444,7 +444,7 @@ (defun nndoc-rnews-body-end () (and (re-search-backward nndoc-article-begin nil t) (forward-line 1) - (goto-char (+ (point) (string-to-int (match-string 1)))))) + (goto-char (+ (point) (string-to-number (match-string 1)))))) (defun nndoc-babyl-type-p () (when (re-search-forward "\^_\^L *\n" nil t)
--- a/lisp/gnus/nndraft.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nndraft.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; nndraft.el --- draft article access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -174,8 +174,11 @@ (setq buffer-file-name (expand-file-name file) buffer-auto-save-file-name (make-auto-save-file-name)) (clear-visited-file-modtime) - (make-local-variable 'write-contents-hooks) - (push 'nndraft-generate-headers write-contents-hooks) + (let ((hook (if (boundp 'write-contents-functions) + 'write-contents-functions + 'write-contents-hooks))) + (gnus-make-local-hook hook) + (add-hook hook 'nndraft-generate-headers nil t)) article)) (deffoo nndraft-request-group (group &optional server dont-check) @@ -185,7 +188,7 @@ (file-name-coding-system nnmail-pathname-coding-system) dir file) (nnheader-re-read-dir pathname) - (setq dir (mapcar (lambda (name) (string-to-int (substring name 1))) + (setq dir (mapcar (lambda (name) (string-to-number (substring name 1))) (ignore-errors (directory-files pathname nil "^#[0-9]+#$" t)))) (dolist (n dir) @@ -293,7 +296,7 @@ "Return the list of messages in the group." (gnus-make-directory nndraft-current-directory) (sort - (mapcar 'string-to-int + (mapcar 'string-to-number (directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t)) '<))
--- a/lisp/gnus/nneething.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nneething.el Mon Jun 06 02:39:45 2005 +0000 @@ -329,7 +329,7 @@ (when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t) (concat "From: " (match-string 0) "\n")))) (nneething-from-line (nth 2 atts) file)) - (if (> (string-to-int (int-to-string (nth 7 atts))) 0) + (if (> (string-to-number (int-to-string (nth 7 atts))) 0) (concat "Chars: " (int-to-string (nth 7 atts)) "\n") "") (if buffer
--- a/lisp/gnus/nnfolder.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnfolder.el Mon Jun 06 02:39:45 2005 +0000 @@ -200,7 +200,7 @@ ((search-backward (concat "\n" nnfolder-article-marker) nil t) (goto-char (match-end 0)) - (setq num (string-to-int + (setq num (string-to-number (buffer-substring (point) (gnus-point-at-eol)))) (goto-char start) @@ -210,7 +210,7 @@ (search-forward (concat "\n" nnfolder-article-marker) nil t) (progn - (setq num (string-to-int + (setq num (string-to-number (buffer-substring (point) (gnus-point-at-eol)))) (> num article)) @@ -285,7 +285,7 @@ (cons nnfolder-current-group (if (search-forward (concat "\n" nnfolder-article-marker) nil t) - (string-to-int (buffer-substring + (string-to-number (buffer-substring (point) (gnus-point-at-eol))) -1)))))))) @@ -875,6 +875,7 @@ nnfolder-file-coding-system)) (nnheader-find-file-noselect file t))))) (mm-enable-multibyte) ;; Use multibyte buffer for future copying. + (buffer-disable-undo) (if (equal (cadr (assoc group nnfolder-scantime-alist)) (nth 5 (file-attributes file))) ;; This looks up-to-date, so we don't do any scanning. @@ -901,7 +902,6 @@ maxid start end newscantime novbuf articles newnum buffer-read-only) - (buffer-disable-undo) (setq maxid (cdr active)) (unless (or gnus-nov-is-evil nnfolder-nov-is-evil
--- a/lisp/gnus/nnheader.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnheader.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ ;;; nnheader.el --- header access macros for Gnus and its backends ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 +;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> @@ -683,9 +683,9 @@ (defsubst nnheader-file-to-number (file) "Take a FILE name and return the article number." (if (string= nnheader-numerical-short-files "^[0-9]+$") - (string-to-int file) + (string-to-number file) (string-match nnheader-numerical-short-files file) - (string-to-int (match-string 0 file)))) + (string-to-number (match-string 0 file)))) (defvar nnheader-directory-files-is-safe (or (eq system-type 'windows-nt) @@ -953,15 +953,21 @@ (defun nnheader-find-file-noselect (&rest args) "Open a file with some variables bound. See `find-file-noselect' for the arguments." - (let ((format-alist nil) - (auto-mode-alist (mm-auto-mode-alist)) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil) - (coding-system-for-read nnheader-file-coding-system)) - (apply 'find-file-noselect args))) + (let* ((format-alist nil) + (auto-mode-alist (mm-auto-mode-alist)) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (coding-system-for-read nnheader-file-coding-system) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (apply 'find-file-noselect args) + (set ffh val)))) (defun nnheader-directory-regular-files (dir) "Return a list of all regular files in DIR."
--- a/lisp/gnus/nnkiboze.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnkiboze.el Mon Jun 06 02:39:45 2005 +0000 @@ -106,7 +106,7 @@ (error "nnkiboze: No xref")) (unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref) (error "nnkiboze: Malformed xref")) - (setq num (string-to-int (match-string 2 xref)) + (setq num (string-to-number (match-string 2 xref)) group (match-string 1 xref)) (or (with-current-buffer buffer (or (and gnus-use-cache (gnus-cache-request-article num group))
--- a/lisp/gnus/nnmail.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnmail.el Mon Jun 06 02:39:45 2005 +0000 @@ -769,7 +769,7 @@ (if (not (save-excursion (and (re-search-backward "^Content-Length:[ \t]*\\([0-9]+\\)" start t) - (setq content-length (string-to-int + (setq content-length (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) @@ -906,7 +906,7 @@ (if (not (re-search-forward "^Content-Length:[ \t]*\\([0-9]+\\)" nil t)) (setq content-length nil) - (setq content-length (string-to-int (match-string 1))) + (setq content-length (string-to-number (match-string 1))) ;; We destroy the header, since none of the backends ever ;; use it, and we do not want to confuse other mailers by ;; having a (possibly) faulty header.
--- a/lisp/gnus/nnmbox.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnmbox.el Mon Jun 06 02:39:45 2005 +0000 @@ -475,7 +475,7 @@ (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " nil t) (cons (buffer-substring (match-beginning 1) (match-end 1)) - (string-to-int + (string-to-number (buffer-substring (match-beginning 2) (match-end 2))))))) (defun nnmbox-in-header-p (pos) @@ -681,7 +681,7 @@ (let (alist) (while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t) (push (cons (match-string 1) - (string-to-int (match-string 2))) alist)) + (string-to-number (match-string 2))) alist)) (nnmbox-insert-newsgroup-line alist)) ;; this is really a new article (nnmbox-save-mail
--- a/lisp/gnus/nnmh.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnmh.el Mon Jun 06 02:39:45 2005 +0000 @@ -150,7 +150,7 @@ (file-exists-p file) (not (file-directory-p file)) (save-excursion (nnmail-find-file file)) - (string-to-int (file-name-nondirectory file))))) + (string-to-number (file-name-nondirectory file))))) (deffoo nnmh-request-group (group &optional server dont-check) (nnheader-init-server-buffer) @@ -176,7 +176,7 @@ (nnheader-re-read-dir pathname) (setq dir (sort - (mapcar (lambda (name) (string-to-int name)) + (mapcar (lambda (name) (string-to-number name)) (directory-files pathname nil "^[0-9]+$" t)) '<)) (cond @@ -224,7 +224,7 @@ ;; For each directory, generate an active file line. (unless (string= (expand-file-name nnmh-toplev) dir) (let ((files (mapcar - (lambda (name) (string-to-int name)) + (lambda (name) (string-to-number name)) (directory-files dir nil "^[0-9]+$" t)))) (when files (save-excursion @@ -358,7 +358,7 @@ (nnmh-possibly-change-directory group server) (let ((articles (mapcar (lambda (file) - (string-to-int file)) + (string-to-number file)) (directory-files nnmh-current-directory nil "^[0-9]+$")))) (when articles @@ -486,7 +486,7 @@ (let ((files (sort (mapcar (lambda (f) - (string-to-int f)) + (string-to-number f)) (directory-files dir nil "^[0-9]+$")) '>))) (when files @@ -509,7 +509,7 @@ ;; articles in this folder. The articles that are "new" will be ;; marked as unread by Gnus. (let* ((dir nnmh-current-directory) - (files (sort (mapcar (function (lambda (name) (string-to-int name))) + (files (sort (mapcar (function (lambda (name) (string-to-number name))) (directory-files nnmh-current-directory nil "^[0-9]+$" t)) '<))
--- a/lisp/gnus/nnml.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnml.el Mon Jun 06 02:39:45 2005 +0000 @@ -212,7 +212,7 @@ (nnheader-report 'nnml "Article %s retrieved" id) ;; We return the article number. (cons (if group-num (car group-num) group) - (string-to-int (file-name-nondirectory path))))))) + (string-to-number (file-name-nondirectory path))))))) (deffoo nnml-request-group (group &optional server dont-check) (let ((file-name-coding-system nnmail-pathname-coding-system)) @@ -426,7 +426,7 @@ ;; we should insert it. (This situation should never ;; occur, but one likes to make sure...) (while (and (looking-at "[0-9]+\t") - (< (string-to-int + (< (string-to-number (buffer-substring (match-beginning 0) (match-end 0))) article)
--- a/lisp/gnus/nnrss.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnrss.el Mon Jun 06 02:39:45 2005 +0000 @@ -899,7 +899,7 @@ (selection (mapcar (lambda (listinfo) (cons (cdr (assoc "sitename" listinfo)) - (string-to-int + (string-to-number (cdr (assoc "feedid" listinfo))))) feedinfo))) (cdr (assoc
--- a/lisp/gnus/nnsoup.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnsoup.el Mon Jun 06 02:39:45 2005 +0000 @@ -752,9 +752,9 @@ (let ((files (sort (directory-files nnsoup-directory t "IDX$") (lambda (f1 f2) (< (progn (string-match "/\\([0-9]+\\)\\." f1) - (string-to-int (match-string 1 f1))) + (string-to-number (match-string 1 f1))) (progn (string-match "/\\([0-9]+\\)\\." f2) - (string-to-int (match-string 1 f2))))))) + (string-to-number (match-string 1 f2))))))) active group lines ident elem min) (set-buffer (get-buffer-create " *nnsoup work*")) (while files
--- a/lisp/gnus/nnspool.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nnspool.el Mon Jun 06 02:39:45 2005 +0000 @@ -248,7 +248,7 @@ ;; Fix by Sudish Joseph <joseph@cis.ohio-state.edu> (when (setq dir (directory-files pathname nil "^[0-9]+$" t)) (setq dir - (sort (mapcar (lambda (name) (string-to-int name)) dir) '<))) + (sort (mapcar (lambda (name) (string-to-number name)) dir) '<))) (if dir (nnheader-insert "211 %d %d %d %s\n" (length dir) (car dir) @@ -440,7 +440,7 @@ (goto-char (point-min)) (prog1 (when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]") - (cons (match-string 1) (string-to-int (match-string 2)))) + (cons (match-string 1) (string-to-number (match-string 2)))) (kill-buffer (current-buffer))))) (defun nnspool-find-file (file)
--- a/lisp/gnus/nntp.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/nntp.el Mon Jun 06 02:39:45 2005 +0000 @@ -1128,7 +1128,7 @@ (nntp-kill-buffer pbuffer)) (when (and (buffer-name pbuffer) process) - (process-kill-without-query process) + (gnus-set-process-query-on-exit-flag process nil) (if (and (nntp-wait-for process "^2.*\n" buffer nil t) (memq (process-status process) '(open run))) (prog1 @@ -1162,7 +1162,7 @@ (format-spec-make ?s nntp-address ?p nntp-port-number))))) - (process-kill-without-query proc) + (gnus-set-process-query-on-exit-flag proc nil) (save-excursion (set-buffer buffer) (let ((nntp-connection-alist (list proc buffer nil))) @@ -1173,7 +1173,7 @@ (defun nntp-open-tls-stream (buffer) (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number))) - (process-kill-without-query proc) + (gnus-set-process-query-on-exit-flag proc nil) (save-excursion (set-buffer buffer) (let ((nntp-connection-alist (list proc buffer nil))) @@ -1499,7 +1499,7 @@ (when (<= count 1) (goto-char (point-min)) (when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t) - (let ((low-limit (string-to-int + (let ((low-limit (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) (while (and articles (<= (car articles) low-limit)) @@ -1571,7 +1571,7 @@ (goto-char (point-min)) ;; We first find the number by looking at the status line. (let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ") - (string-to-int + (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) newsgroups xref) @@ -1609,7 +1609,7 @@ "\\([^ :]+\\):\\([0-9]+\\)") xref)) (setq group (match-string 1 xref) - number (string-to-int (match-string 2 xref)))) + number (string-to-number (match-string 2 xref)))) ((and (setq newsgroups (mail-fetch-field "newsgroups")) (not (string-match "," newsgroups)))
--- a/lisp/gnus/pgg-gpg.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/pgg-gpg.el Mon Jun 06 02:39:45 2005 +0000 @@ -252,7 +252,7 @@ (when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t) (setq status (buffer-substring (match-end 0) (progn (end-of-line)(point))) - status (vconcat (mapcar #'string-to-int (split-string status)))) + status (vconcat (mapcar #'string-to-number (split-string status)))) (erase-buffer) (insert (format "Imported %d key(s). \tArmor contains %d key(s) [%d bad, %d old].\n"
--- a/lisp/gnus/pgg-parse.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/pgg-parse.el Mon Jun 06 02:39:45 2005 +0000 @@ -113,7 +113,7 @@ `(mapconcat (lambda (c) (format "%02X" (pgg-char-int c))) ,string "") ;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x" - ;; (string-to-int-list ,string))) + ;; (string-to-number-list ,string))) ) (defmacro pgg-parse-time-field (bytes) @@ -136,7 +136,7 @@ (defmacro pgg-read-bytes (nbytes) `(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes)) - ;; `(string-to-int-list (pgg-read-bytes-string ,nbytes)) + ;; `(string-to-number-list (pgg-read-bytes-string ,nbytes)) ) (defmacro pgg-read-body-string (ptag) @@ -146,7 +146,7 @@ (defmacro pgg-read-body (ptag) `(mapcar #'pgg-char-int (pgg-read-body-string ,ptag)) - ;; `(string-to-int-list (pgg-read-body-string ,ptag)) + ;; `(string-to-number-list (pgg-read-body-string ,ptag)) ) (defalias 'pgg-skip-bytes 'forward-char)
--- a/lisp/gnus/pgg.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/pgg.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; pgg.el --- glue for the various PGP implementations. -;; Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Created: 1999/10/28 @@ -97,82 +97,76 @@ (read-passwd prompt))) (eval-when-compile - (defvar itimer-process) - (defvar itimer-timer) - (autoload 'delete-itimer "itimer") - (autoload 'itimer-driver-start "itimer") - (autoload 'itimer-value "itimer") - (autoload 'set-itimer-function "itimer") - (autoload 'set-itimer-function-arguments "itimer") - (autoload 'set-itimer-restart "itimer") - (autoload 'start-itimer "itimer")) + (defmacro pgg-run-at-time-1 (time repeat function args) + (when (featurep 'xemacs) + (if (condition-case nil + (let ((delete-itimer 'delete-itimer) + (itimer-driver-start 'itimer-driver-start) + (itimer-value 'itimer-value) + (start-itimer 'start-itimer)) + (unless (or (symbol-value 'itimer-process) + (symbol-value 'itimer-timer)) + (funcall itimer-driver-start)) + ;; Check whether there is a bug to which the difference of + ;; the present time and the time when the itimer driver was + ;; woken up is subtracted from the initial itimer value. + (let* ((inhibit-quit t) + (ctime (current-time)) + (itimer-timer-last-wakeup + (prog1 + ctime + (setcar ctime (1- (car ctime))))) + (itimer-list nil) + (itimer (funcall start-itimer "pgg-run-at-time" + 'ignore 5))) + (sleep-for 0.1) ;; Accept the timeout interrupt. + (prog1 + (> (funcall itimer-value itimer) 0) + (funcall delete-itimer itimer)))) + (error nil)) + `(let ((time ,time)) + (apply #'start-itimer "pgg-run-at-time" + ,function (if time (max time 1e-9) 1e-9) + ,repeat nil t ,args))) + `(let ((time ,time) + (itimers (list nil))) + (setcar + itimers + (apply #'start-itimer "pgg-run-at-time" + (lambda (itimers repeat function &rest args) + (let ((itimer (car itimers))) + (if repeat + (progn + (set-itimer-function + itimer + (lambda (itimer repeat function &rest args) + (set-itimer-restart itimer repeat) + (set-itimer-function itimer function) + (set-itimer-function-arguments itimer args) + (apply function args))) + (set-itimer-function-arguments + itimer + (append (list itimer repeat function) args))) + (set-itimer-function + itimer + (lambda (itimer function &rest args) + (delete-itimer itimer) + (apply function args))) + (set-itimer-function-arguments + itimer + (append (list itimer function) args))))) + 1e-9 (if time (max time 1e-9) 1e-9) + nil t itimers ,repeat ,function ,args)))))) (eval-and-compile - (defalias - 'pgg-run-at-time - (if (featurep 'xemacs) - (if (condition-case nil - (progn - (unless (or itimer-process itimer-timer) - (itimer-driver-start)) - ;; Check whether there is a bug to which the difference of - ;; the present time and the time when the itimer driver was - ;; woken up is subtracted from the initial itimer value. - (let* ((inhibit-quit t) - (ctime (current-time)) - (itimer-timer-last-wakeup - (prog1 - ctime - (setcar ctime (1- (car ctime))))) - (itimer-list nil) - (itimer (start-itimer "pgg-run-at-time" 'ignore 5))) - (sleep-for 0.1) ;; Accept the timeout interrupt. - (prog1 - (> (itimer-value itimer) 0) - (delete-itimer itimer)))) - (error nil)) - (lambda (time repeat function &rest args) - "Emulating function run as `run-at-time'. + (if (featurep 'xemacs) + (defun pgg-run-at-time (time repeat function &rest args) + "Emulating function run as `run-at-time'. TIME should be nil meaning now, or a number of seconds from now. Return an itimer object which can be used in either `delete-itimer' or `cancel-timer'." - (apply #'start-itimer "pgg-run-at-time" - function (if time (max time 1e-9) 1e-9) - repeat nil t args)) - (lambda (time repeat function &rest args) - "Emulating function run as `run-at-time' in the right way. -TIME should be nil meaning now, or a number of seconds from now. -Return an itimer object which can be used in either `delete-itimer' -or `cancel-timer'." - (let ((itimers (list nil))) - (setcar - itimers - (apply #'start-itimer "pgg-run-at-time" - (lambda (itimers repeat function &rest args) - (let ((itimer (car itimers))) - (if repeat - (progn - (set-itimer-function - itimer - (lambda (itimer repeat function &rest args) - (set-itimer-restart itimer repeat) - (set-itimer-function itimer function) - (set-itimer-function-arguments itimer args) - (apply function args))) - (set-itimer-function-arguments - itimer - (append (list itimer repeat function) args))) - (set-itimer-function - itimer - (lambda (itimer function &rest args) - (delete-itimer itimer) - (apply function args))) - (set-itimer-function-arguments - itimer - (append (list itimer function) args))))) - 1e-9 (if time (max time 1e-9) 1e-9) - nil t itimers repeat function args))))) - 'run-at-time))) + (pgg-run-at-time-1 time repeat function args)) + (defalias 'pgg-run-at-time 'run-at-time))) (defun pgg-add-passphrase-cache (key passphrase) (setq key (pgg-truncate-key-identifier key))
--- a/lisp/gnus/pop3.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/pop3.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; pop3.el --- Post Office Protocol (RFC 1460) interface -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005 ;; Free Software Foundation, Inc. ;; Author: Richard L. Pieri <ratinox@peorth.gweep.net> @@ -348,21 +349,36 @@ ;; AUTHORIZATION STATE +(eval-when-compile + (if (not (fboundp 'md5)) ;; Emacs 20 + (defalias 'md5 'ignore))) + (eval-and-compile - (if (fboundp 'md5) - (defalias 'pop3-md5 'md5) + (if (and (fboundp 'md5) + ;; There might be an incompatible implementation. + (condition-case nil + (md5 "Check whether the 4th argument is allowed" + nil nil 'binary) + (error nil))) + (defun pop3-md5 (string) + (md5 string nil nil 'binary)) (defvar pop3-md5-program "md5" - "*Program to encode its input in MD5.") - + "*Program to encode its input in MD5. +\"openssl\" is a popular alternative; set `pop3-md5-program-args' to +'(\"md5\") if you use it.") + (defvar pop3-md5-program-args nil + "*List of arguments passed to `pop3-md5-program'.") (defun pop3-md5 (string) - (with-temp-buffer - (insert string) - (call-process-region (point-min) (point-max) - pop3-md5-program - t (current-buffer) nil) - ;; The meaningful output is the first 32 characters. - ;; Don't return the newline that follows them! - (buffer-substring (point-min) (+ 32 (point-min))))))) + (let ((default-enable-multibyte-characters t) + (coding-system-for-write 'binary)) + (with-temp-buffer + (insert string) + (apply 'call-process-region (point-min) (point-max) + pop3-md5-program t (current-buffer) nil + pop3-md5-program-args) + ;; The meaningful output is the first 32 characters. + ;; Don't return the newline that follows them! + (buffer-substring (point-min) (+ 32 (point-min)))))))) (defun pop3-user (process user) "Send USER information to POP3 server." @@ -398,8 +414,8 @@ "Return the number of messages in the maildrop and the maildrop's size." (pop3-send-command process "STAT") (let ((response (pop3-read-response process t))) - (list (string-to-int (nth 1 (split-string response " "))) - (string-to-int (nth 2 (split-string response " ")))) + (list (string-to-number (nth 1 (split-string response " "))) + (string-to-number (nth 2 (split-string response " ")))) )) (defun pop3-list (process &optional msg) @@ -449,7 +465,7 @@ "Return highest accessed message-id number for the session." (pop3-send-command process "LAST") (let ((response (pop3-read-response process t))) - (string-to-int (nth 1 (split-string response " "))) + (string-to-number (nth 1 (split-string response " "))) )) (defun pop3-rset (process)
--- a/lisp/gnus/qp.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/qp.el Mon Jun 06 02:39:45 2005 +0000 @@ -69,9 +69,9 @@ (cond ((eq (char-after (1+ (point))) ?\n) (delete-char 2)) ((looking-at "=[0-9A-F][0-9A-F]") - (let ((byte (string-to-int (buffer-substring (1+ (point)) - (+ 3 (point))) - 16))) + (let ((byte (string-to-number (buffer-substring (1+ (point)) + (+ 3 (point))) + 16))) (mm-insert-byte byte 1) (delete-char 3))) (t
--- a/lisp/gnus/score-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/score-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; score-mode.el --- mode for editing Gnus score files -;; Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001, 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: news, mail @@ -28,7 +28,7 @@ (eval-when-compile (require 'cl)) (require 'mm-util) ; for mm-universal-coding-system -(require 'gnus-util) ; for gnus-pp +(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks (defvar gnus-score-mode-hook nil "*Hook run in score mode buffers.") @@ -71,7 +71,7 @@ (setq mode-name "Score") (lisp-mode-variables nil) (make-local-variable 'gnus-score-edit-exit-function) - (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) + (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) (defun gnus-score-make-menu-bar () (unless (boundp 'gnus-score-menu)
--- a/lisp/gnus/sieve-manage.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/sieve-manage.el Mon Jun 06 02:39:45 2005 +0000 @@ -86,22 +86,27 @@ (defcustom sieve-manage-log "*sieve-manage-log*" "Name of buffer for managesieve session trace." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-default-user (user-login-name) "Default username to use." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-server-eol "\r\n" "The EOL string sent from the server." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-client-eol "\r\n" "The EOL string we send to the server." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-streams '(network starttls shell) - "Priority of streams to consider when opening connection to server.") + "Priority of streams to consider when opening connection to server." + :group 'sieve-manage) (defcustom sieve-manage-stream-alist '((network sieve-manage-network-p sieve-manage-network-open) @@ -113,10 +118,12 @@ NAME names the stream, CHECK is a function returning non-nil if the server support the stream and OPEN is a function for opening the -stream.") +stream." + :group 'sieve-manage) (defcustom sieve-manage-authenticators '(cram-md5 plain) - "Priority of authenticators to consider when authenticating to server.") + "Priority of authenticators to consider when authenticating to server." + :group 'sieve-manage) (defcustom sieve-manage-authenticator-alist '((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth) @@ -127,11 +134,13 @@ NAME names the authenticator. CHECK is a function returning non-nil if the server support the authenticator and AUTHENTICATE is a function -for doing the actual authentication.") +for doing the actual authentication." + :group 'sieve-manage) (defcustom sieve-manage-default-port 2000 "Default port number for managesieve protocol." - :type 'integer) + :type 'integer + :group 'sieve-manage) ;; Internal variables:
--- a/lisp/gnus/sieve-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/sieve-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; sieve-mode.el --- Sieve code editing commands for Emacs -;; Copyright (C) 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ;; Author: Simon Josefsson <simon@josefsson.org> @@ -75,7 +75,8 @@ (((class color) (background light)) (:foreground "Orchid")) (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:bold t))) - "Face used for Sieve Control Commands.") + "Face used for Sieve Control Commands." + :group 'sieve) (defvar sieve-action-commands-face 'sieve-action-commands-face "Face name used for Sieve Action Commands.") @@ -85,7 +86,8 @@ (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) - "Face used for Sieve Action Commands.") + "Face used for Sieve Action Commands." + :group 'sieve) (defvar sieve-test-commands-face 'sieve-test-commands-face "Face name used for Sieve Test Commands.") @@ -99,7 +101,8 @@ (((class color) (background light)) (:foreground "CadetBlue")) (((class color) (background dark)) (:foreground "Aquamarine")) (t (:bold t :underline t))) - "Face used for Sieve Test Commands.") + "Face used for Sieve Test Commands." + :group 'sieve) (defvar sieve-tagged-arguments-face 'sieve-tagged-arguments-face "Face name used for Sieve Tagged Arguments.") @@ -111,7 +114,8 @@ (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) - "Face used for Sieve Tagged Arguments.") + "Face used for Sieve Tagged Arguments." + :group 'sieve) (defconst sieve-font-lock-keywords
--- a/lisp/gnus/smime.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/smime.el Mon Jun 06 02:39:45 2005 +0000 @@ -122,7 +122,8 @@ (eval-when-compile (require 'cl)) (defgroup smime nil - "S/MIME configuration.") + "S/MIME configuration." + :group 'mime) (defcustom smime-keys nil "*Map mail addresses to a file containing Certificate (and private key).
--- a/lisp/gnus/spam-report.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/spam-report.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; spam-report.el --- Reporting spam -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Teodor Zlatanov <tzz@lifelogs.com> ;; Keywords: network @@ -35,7 +35,9 @@ (autoload 'mm-url-insert "mm-url")) (defgroup spam-report nil - "Spam reporting configuration.") + "Spam reporting configuration." + :group 'mail + :group 'news) (defcustom spam-report-gmane-regex nil "Regexp matching Gmane newsgroups, e.g. \"^nntp\\+.*:gmane\\.\" @@ -181,14 +183,14 @@ the external program specified in `mm-url-program' to connect to server." (with-temp-buffer - (let ((url (concat "http://" host report))) + (let ((url (format "http://%s%s" host report))) (mm-url-insert url t)))) ;;;###autoload (defun spam-report-url-to-file (host report) "Collect spam report requests in `spam-report-requests-file'. Customize `spam-report-url-ping-function' to use this function." - (let ((url (concat "http://" host report)) + (let ((url (format "http://%s%s" host report)) (file spam-report-requests-file)) (gnus-make-directory (file-name-directory file)) (gnus-message 9 "Writing URL `%s' to file `%s'" url file)
--- a/lisp/gnus/spam.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/spam.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,5 +1,5 @@ ;;; spam.el --- Identifying spam -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> ;; Keywords: network @@ -77,7 +77,9 @@ (defgroup spam nil "Spam configuration." - :version "22.1") + :version "22.1" + :group 'mail + :group 'news) (defcustom spam-directory (nnheader-concat gnus-directory "spam/") "Directory for spam whitelists and blacklists." @@ -308,7 +310,8 @@ (((class color) (background light)) (:foreground "ivory4")) (t :inverse-video t)) - "Face for spam-marked articles.") + "Face for spam-marked articles." + :group 'spam) (defcustom spam-face 'spam-face "Face for spam-marked articles."
--- a/lisp/gnus/starttls.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/gnus/starttls.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; starttls.el --- STARTTLS functions -;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Daiki Ueno <ueno@unixuser.org> ;; Author: Simon Josefsson <simon@josefsson.org> @@ -235,6 +236,13 @@ (starttls-negotiate-gnutls process) (signal-process (process-id process) 'SIGALRM))) +(eval-and-compile + (if (fboundp 'set-process-query-on-exit-flag) + (defalias 'starttls-set-process-query-on-exit-flag + 'set-process-query-on-exit-flag) + (defalias 'starttls-set-process-query-on-exit-flag + 'process-kill-without-query))) + (defun starttls-open-stream-gnutls (name buffer host service) (message "Opening STARTTLS connection to `%s'..." host) (let* (done @@ -246,7 +254,7 @@ (int-to-string service) service) starttls-extra-arguments))) - (process-kill-without-query process) + (starttls-set-process-query-on-exit-flag process nil) (while (and (processp process) (eq (process-status process) 'run) (save-excursion @@ -286,7 +294,7 @@ name buffer starttls-program host (format "%s" service) starttls-extra-args))) - (process-kill-without-query process) + (starttls-set-process-query-on-exit-flag process nil) process))) (provide 'starttls)
--- a/lisp/help-fns.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/help-fns.el Mon Jun 06 02:39:45 2005 +0000 @@ -224,7 +224,7 @@ ;;; (symbol-file (if (symbolp subr-or-var) subr-or-var ;;; (subr-name subr-or-var)) ;;; (if (eq kind 'var) 'defvar 'defun))) - +;;;###autoload (defun help-C-file-name (subr-or-var kind) "Return the name of the C file where SUBR-OR-VAR is defined. KIND should be `var' for a variable or `subr' for a subroutine."
--- a/lisp/help-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/help-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -196,7 +196,7 @@ (view-mode) (make-local-variable 'view-no-disable-on-exit) (setq view-no-disable-on-exit t) - (run-hooks 'help-mode-hook)) + (run-mode-hooks 'help-mode-hook)) ;;;###autoload (defun help-mode-setup ()
--- a/lisp/hexl.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/hexl.el Mon Jun 06 02:39:45 2005 +0000 @@ -291,7 +291,7 @@ "hexl-current-address") (if hexl-follow-ascii (hexl-follow-ascii 1))) - (run-hooks 'hexl-mode-hook)) + (run-mode-hooks 'hexl-mode-hook)) (defun hexl-isearch-search-function ()
--- a/lisp/ibuffer.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ibuffer.el Mon Jun 06 02:39:45 2005 +0000 @@ -2511,7 +2511,7 @@ (when ibuffer-default-directory (setq default-directory ibuffer-default-directory)) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) - (run-hooks 'ibuffer-mode-hook) + (run-mode-hooks 'ibuffer-mode-hook) ;; called after mode hooks to allow the user to add filters (ibuffer-update-mode-name))
--- a/lisp/ido.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ido.el Mon Jun 06 02:39:45 2005 +0000 @@ -1646,6 +1646,7 @@ (l (ido-make-merged-file-list ido-text-init (eq ido-use-merged-list 'auto) (eq ido-try-merged-list 'wide)))) + (ido-trace "merged" l) (cond ((not l) (if (eq ido-try-merged-list 'wide) @@ -1665,6 +1666,9 @@ ido-use-merged-list nil))) ((eq l t) (setq ido-use-merged-list nil)) + ((eq l 'input-pending-p) + (setq ido-try-merged-list t + ido-use-merged-list nil)) (t (setq ido-pre-merge-state (list ido-text-init ido-current-directory olist oign omat)) @@ -2493,10 +2497,10 @@ (file-directory-p dir) (or (not must-match) ;; TODO. check for nonreadable and too-big. - (ido-set-matches1 + (ido-set-matches-1 (if (eq ido-cur-item 'file) - (ido-make-file-list1 dir) - (ido-make-dir-list1 dir))))) + (ido-make-file-list-1 dir) + (ido-make-dir-list-1 dir))))) (setq j n) (setq dir nil))) (if dir @@ -2786,11 +2790,11 @@ (ido-directory-too-big nil)) (cond ((eq ido-cur-item 'file) - (ido-make-file-list1 ido-current-directory)) + (ido-make-file-list-1 ido-current-directory)) ((eq ido-cur-item 'dir) - (ido-make-dir-list1 ido-current-directory)) + (ido-make-dir-list-1 ido-current-directory)) ((eq ido-cur-item 'buffer) - (ido-make-buffer-list1)) + (ido-make-buffer-list-1)) ((eq ido-cur-item 'list) ido-choice-list) (t nil)))) @@ -2908,74 +2912,87 @@ (setq items (cdr items))) res)) + +(defun ido-make-merged-file-list-1 (text auto wide) + (let (res) + (if (and (ido-final-slash text) ido-dir-file-cache) + (if wide + (setq res (ido-wide-find-dirs-or-files + ido-current-directory (substring text 0 -1) ido-enable-prefix t)) + ;; Use list of cached directories + (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) + (dirs ido-dir-file-cache) + dir b d f) + (if nil ;; simple + (while dirs + (setq dir (car (car dirs)) + dirs (cdr dirs)) + (when (and (string-match re dir) + (not (ido-ignore-item-p dir ido-ignore-directories-merge)) + (file-directory-p dir)) + (setq b (substring dir 0 -1) + f (concat (file-name-nondirectory b) "/") + d (file-name-directory b) + res (cons (cons f d) res)))) + (while dirs + (setq dir (car dirs) + d (car dir) + dirs (cdr dirs)) + (when (not (ido-ignore-item-p d ido-ignore-directories-merge)) + (setq dir (cdr (cdr dir))) + (while dir + (setq f (car dir) + dir (cdr dir)) + (if (and (string-match re f) + (not (ido-ignore-item-p f ido-ignore-directories))) + (setq res (cons (cons f d) res))))) + (if (and auto (input-pending-p)) + (setq dirs nil + res t)))))) + (if wide + (setq res (ido-wide-find-dirs-or-files + ido-current-directory text ido-enable-prefix nil)) + (let ((ido-text text) + (dirs ido-work-directory-list) + (must-match (and text (> (length text) 0))) + dir fl) + (if (and auto (not (member ido-current-directory dirs))) + (setq dirs (cons ido-current-directory dirs))) + (while dirs + (setq dir (car dirs) + dirs (cdr dirs)) + (when (and dir (stringp dir) + (or ido-merge-ftp-work-directories + (not (ido-is-ftp-directory dir))) + (file-directory-p dir) + ;; TODO. check for nonreadable and too-big. + (setq fl (if (eq ido-cur-item 'file) + (ido-make-file-list-1 dir t) + (ido-make-dir-list-1 dir t)))) + (if must-match + (setq fl (ido-set-matches-1 fl))) + (if fl + (setq res (nconc fl res)))) + (if (and auto (input-pending-p)) + (setq dirs nil + res t)))))) + res)) + (defun ido-make-merged-file-list (text auto wide) (let (res) (message "Searching for `%s'...." text) (condition-case nil - (if (and (ido-final-slash text) ido-dir-file-cache) - (if wide - (setq res (ido-wide-find-dirs-or-files - ido-current-directory (substring text 0 -1) ido-enable-prefix t)) - ;; Use list of cached directories - (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) - (dirs ido-dir-file-cache) - dir b d f) - (if nil ;; simple - (while dirs - (setq dir (car (car dirs)) - dirs (cdr dirs)) - (when (and (string-match re dir) - (not (ido-ignore-item-p dir ido-ignore-directories-merge)) - (file-directory-p dir)) - (setq b (substring dir 0 -1) - f (concat (file-name-nondirectory b) "/") - d (file-name-directory b) - res (cons (cons f d) res)))) - (while dirs - (setq dir (car dirs) - d (car dir) - dirs (cdr dirs)) - (when (not (ido-ignore-item-p d ido-ignore-directories-merge)) - (setq dir (cdr (cdr dir))) - (while dir - (setq f (car dir) - dir (cdr dir)) - (if (and (string-match re f) - (not (ido-ignore-item-p f ido-ignore-directories))) - (setq res (cons (cons f d) res))))) - (if (and auto (input-pending-p)) - (setq dirs nil - res t)))))) - (if wide - (setq res (ido-wide-find-dirs-or-files - ido-current-directory text ido-enable-prefix nil)) - (let ((ido-text text) - (dirs ido-work-directory-list) - (must-match (and text (> (length text) 0))) - dir fl) - (if (and auto (not (member ido-current-directory dirs))) - (setq dirs (cons ido-current-directory dirs))) - (while dirs - (setq dir (car dirs) - dirs (cdr dirs)) - (when (and dir (stringp dir) - (or ido-merge-ftp-work-directories - (not (ido-is-ftp-directory dir))) - (file-directory-p dir) - ;; TODO. check for nonreadable and too-big. - (setq fl (if (eq ido-cur-item 'file) - (ido-make-file-list1 dir t) - (ido-make-dir-list1 dir t)))) - (if must-match - (setq fl (ido-set-matches1 fl))) - (if fl - (setq res (nconc fl res)))) - (if (and auto (input-pending-p)) - (setq dirs nil - res t)))))) - (quit (setq res t))) - (if (and res (not (eq res t))) - (setq res (ido-sort-merged-list res auto))) + (unless (catch 'input-pending-p + (let ((throw-on-input 'input-pending-p)) + (setq res (ido-make-merged-file-list-1 text auto wide)) + t)) + (setq res 'input-pending-p)) + (quit + (setq res t + ido-try-merged-list nil + ido-use-merged-list nil))) + (when (and res (listp res)) + (setq res (ido-sort-merged-list res auto))) (when (and (or ido-rotate-temp ido-rotate-file-list-default) (listp res) (> (length text) 0)) @@ -2986,7 +3003,7 @@ (message nil) res)) -(defun ido-make-buffer-list1 (&optional frame visible) +(defun ido-make-buffer-list-1 (&optional frame visible) ;; Return list of non-ignored buffer names (delq nil (mapcar @@ -3004,7 +3021,7 @@ ;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, ;; it is put to the start of the list. (let* ((ido-current-buffers (ido-get-buffers-in-frames 'current)) - (ido-temp-list (ido-make-buffer-list1 (selected-frame) ido-current-buffers))) + (ido-temp-list (ido-make-buffer-list-1 (selected-frame) ido-current-buffers))) (if ido-temp-list (nconc ido-temp-list ido-current-buffers) (setq ido-temp-list ido-current-buffers)) @@ -3041,7 +3058,7 @@ (nconc ido-temp-list items) (setq ido-temp-list items))) -(defun ido-file-name-all-completions1 (dir) +(defun ido-file-name-all-completions-1 (dir) (cond ((ido-nonreadable-directory-p dir) '()) ;; do not check (ido-directory-too-big-p dir) here. @@ -3098,13 +3115,13 @@ (if (and ftp (file-readable-p dir)) (setq mtime (cons 'ftp (ido-time-stamp)))) (if mtime - (setq cached (cons dir (cons mtime (ido-file-name-all-completions1 dir))) + (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir))) ido-dir-file-cache (cons cached ido-dir-file-cache))) (if (> (length ido-dir-file-cache) ido-max-dir-file-cache) (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil))) (and cached (cdr (cdr cached)))) - (ido-file-name-all-completions1 dir))) + (ido-file-name-all-completions-1 dir))) (defun ido-remove-cached-dir (dir) ;; Remove dir from ido-dir-file-cache @@ -3115,7 +3132,7 @@ (setq ido-dir-file-cache (delq cached ido-dir-file-cache)))))) -(defun ido-make-file-list1 (dir &optional merged) +(defun ido-make-file-list-1 (dir &optional merged) ;; Return list of non-ignored files in DIR ;; If MERGED is non-nil, each file is cons'ed with DIR (and (or (ido-is-tramp-root dir) (file-directory-p dir)) @@ -3132,7 +3149,7 @@ ;; The hook `ido-make-file-list-hook' is run after the list has been ;; created to allow the user to further modify the order of the file names ;; in this list. - (let ((ido-temp-list (ido-make-file-list1 ido-current-directory))) + (let ((ido-temp-list (ido-make-file-list-1 ido-current-directory))) (setq ido-temp-list (sort ido-temp-list (if ido-file-extensions-order #'ido-file-extension-lessp @@ -3168,7 +3185,7 @@ (run-hooks 'ido-make-file-list-hook) ido-temp-list)) -(defun ido-make-dir-list1 (dir &optional merged) +(defun ido-make-dir-list-1 (dir &optional merged) ;; Return list of non-ignored subdirs in DIR ;; If MERGED is non-nil, each subdir is cons'ed with DIR (and (or (ido-is-tramp-root dir) (file-directory-p dir)) @@ -3184,7 +3201,7 @@ ;; The hook `ido-make-dir-list-hook' is run after the list has been ;; created to allow the user to further modify the order of the ;; directory names in this list. - (let ((ido-temp-list (ido-make-dir-list1 ido-current-directory))) + (let ((ido-temp-list (ido-make-dir-list-1 ido-current-directory))) (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp)) (ido-to-end ;; move . files to end (delq nil (mapcar @@ -3238,7 +3255,7 @@ ;;; FIND MATCHING ITEMS -(defun ido-set-matches1 (items &optional do-full) +(defun ido-set-matches-1 (items &optional do-full) ;; Return list of matches in items (let* ((case-fold-search ido-case-fold) (slash (and (not ido-enable-prefix) (ido-final-slash ido-text))) @@ -3296,7 +3313,7 @@ (defun ido-set-matches () ;; Set `ido-matches' to the list of items matching prompt (when ido-rescan - (setq ido-matches (ido-set-matches1 (reverse ido-cur-list) (not ido-rotate)) + (setq ido-matches (ido-set-matches-1 (reverse ido-cur-list) (not ido-rotate)) ido-rotate nil))) (defun ido-ignore-item-p (name re-list &optional ignore-ext)
--- a/lisp/ielm.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ielm.el Mon Jun 06 02:39:45 2005 +0000 @@ -480,7 +480,8 @@ Customized bindings may be defined in `ielm-map', which currently contains: \\{ielm-map}" (interactive) - (comint-mode) + (delay-mode-hooks + (comint-mode)) (setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt))) (set (make-local-variable 'paragraph-separate) "\\'") (make-local-variable 'paragraph-start) @@ -548,7 +549,7 @@ (set-marker comint-last-input-start (ielm-pm)) (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)) - (run-hooks 'ielm-mode-hook)) + (run-mode-hooks 'ielm-mode-hook)) (defun ielm-get-old-input nil ;; Return the previous input surrounding point
--- a/lisp/image.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/image.el Mon Jun 06 02:39:45 2005 +0000 @@ -48,20 +48,6 @@ with one argument, a string containing the image data. If PREDICATE returns a non-nil value, TYPE is the image's type.") -;;;###autoload -(defvar image-library-alist nil - "Alist of image types vs external libraries needed to display them. - -Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol -representing a supported image type, and the rest are strings giving -alternate filenames for the corresponding external libraries. - -Emacs tries to load the libraries in the order they appear on the -list; if none is loaded, the running session of Emacs won't -support the image type. Types 'pbm and 'xbm don't need to be -listed; they're always supported.") -;;;###autoload (put 'image-library-alist 'risky-local-variable t) - (defun image-jpeg-p (data) "Value is non-nil if DATA, a string, consists of JFIF image data. We accept the tag Exif because that is the same format." @@ -122,7 +108,7 @@ ;;;###autoload (defun image-type-available-p (type) - "Value is non-nil if image type TYPE is available. + "Return non-nil if image type TYPE is available. Image types are symbols like `xbm' or `jpeg'." (and (fboundp 'init-image-library) (init-image-library type image-library-alist)))
--- a/lisp/info.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/info.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ ;;; info.el --- info package for Emacs -;; Copyright (C) 1985,86,92,93,94,95,96,97,98,99,2000,01,02,03,04,2005 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help @@ -515,9 +515,10 @@ ;; since the argument will then be parsed improperly. This also ;; has the added benefit of allowing node names to be included ;; following the parenthesized filename. - (if (and (stringp file) (string-match "(.*)" file)) - (Info-goto-node file) - (Info-goto-node (concat "(" file ")"))) + (Info-goto-node + (if (and (stringp file) (string-match "(.*)" file)) + file + (concat "(" file ")"))) (if (zerop (buffer-size)) (Info-directory)))) @@ -1344,7 +1345,9 @@ ;; Go to an info node specified with a filename-and-nodename string ;; of the sort that is found in pointers in nodes. -;;;###autoload +;; Don't autoload this function: the correct entry point for other packages +;; to use is `info'. --Stef +;; ;;;###autoload (defun Info-goto-node (nodename &optional fork) "Go to info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME. If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file @@ -3259,7 +3262,7 @@ (set (make-local-variable 'search-whitespace-regexp) Info-search-whitespace-regexp) (Info-set-mode-line) - (run-hooks 'Info-mode-hook)) + (run-mode-hooks 'Info-mode-hook)) ;; When an Info buffer is killed, make sure the associated tags buffer ;; is killed too. @@ -3301,7 +3304,7 @@ (setq buffer-read-only nil) (force-mode-line-update) (buffer-enable-undo (current-buffer)) - (run-hooks 'Info-edit-mode-hook)) + (run-mode-hooks 'Info-edit-mode-hook)) (defun Info-edit () "Edit the contents of this Info node. @@ -4127,5 +4130,5 @@ (provide 'info) -;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac +;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac ;;; info.el ends here
--- a/lisp/international/latexenc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/international/latexenc.el Mon Jun 06 02:39:45 2005 +0000 @@ -130,46 +130,49 @@ (throw 'cs t) (goto-char (match-end 0)))))) (let* ((match (match-string 1)) - (sym (intern match))) - (when (latexenc-inputenc-to-coding-system match) - (setq sym (latexenc-inputenc-to-coding-system match))) - (when (coding-system-p sym) - sym - (if (and (require 'code-pages nil t) (coding-system-p sym)) - sym - 'undecided))) + (sym (or (latexenc-inputenc-to-coding-system match) + (intern match)))) + (cond + ((coding-system-p sym) sym) + ((and (require 'code-pages nil t) (coding-system-p sym)) sym) + (t 'undecided))) ;; else try to find it in the master/main file - (let (latexenc-main-file) - ;; is there a TeX-master or tex-main-file in the local variable section + (let ((default-directory (file-name-directory (nth 1 arg-list))) + latexenc-main-file) + ;; Is there a TeX-master or tex-main-file in the local variables + ;; section? (unless latexenc-dont-use-TeX-master-flag (goto-char (point-max)) - (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) + (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) + 'move) (search-forward "Local Variables:" nil t) - (when (re-search-forward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t) - (let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2)))) - (if (file-exists-p file) - (setq latexenc-main-file file) - (if (boundp 'TeX-default-extension) - (when (file-exists-p (concat file "." TeX-default-extension)) - (setq latexenc-main-file (concat file "." TeX-default-extension))) - (dolist (ext '("drv" "dtx" "ltx" "tex")) - (if (file-exists-p (concat file "." ext)) - (setq latexenc-main-file (concat file "." ext))))))))) + (when (re-search-forward + "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" + nil t) + (let ((file (match-string 2))) + (dolist (ext `("" ,(if (boundp 'TeX-default-extension) + (concat "." TeX-default-extension) + "") + ".tex" ".ltx" ".dtx" ".drv")) + (if (and (null latexenc-main-file) ;Stop at first. + (file-exists-p (concat file ext))) + (setq latexenc-main-file (concat file ext))))))) ;; try tex-modes tex-guess-main-file (when (and (not latexenc-dont-use-tex-guess-main-file-flag) - (not latexenc-main-file)) - (when (fboundp 'tex-guess-main-file) - (let ((tex-start-of-header "\\\\document\\(style\\|class\\)") - (default-directory (file-name-directory (nth 1 arg-list)))) - (setq latexenc-main-file (tex-guess-main-file))))) + (not latexenc-main-file) + (fboundp 'tex-guess-main-file)) + (let ((tex-start-of-header "\\\\document\\(style\\|class\\)")) + (setq latexenc-main-file (tex-guess-main-file)))) ;; if we found a master/main file get the coding system from it (if (and latexenc-main-file (file-readable-p latexenc-main-file)) (let* ((latexenc-dont-use-tex-guess-main-file-flag t) (latexenc-dont-use-TeX-master-flag t) - (latexenc-main-buffer (find-file-noselect latexenc-main-file t))) - (or (buffer-local-value 'coding-system-for-write latexenc-main-buffer) - (buffer-local-value 'buffer-file-coding-system latexenc-main-buffer))) + (latexenc-main-buffer + (find-file-noselect latexenc-main-file t))) + (coding-system-base ;Disregard the EOL part of the CS. + (with-current-buffer latexenc-main-buffer + (or coding-system-for-write buffer-file-coding-system)))) 'undecided)))) 'undecided))
--- a/lisp/international/swedish.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/international/swedish.el Mon Jun 06 02:39:45 2005 +0000 @@ -133,7 +133,7 @@ ; (setq major-mode 'swedish-mode) ; (setq local-abbrev-table swedish-mode-abbrev-table) ; (set-syntax-table text-mode-syntax-table) -; (run-hooks 'text-mode-hook)) +; (run-mode-hooks 'text-mode-hook)) ;(defun indented-swedish-mode () ; "Major mode for editing indented Swedish text intended for @@ -151,7 +151,7 @@ ; (use-local-map indented-text-mode-map) ; (setq mode-name "Indented Swedish") ; (setq major-mode 'indented-swedish-mode) -; (run-hooks 'text-mode-hook)) +; (run-mode-hooks 'text-mode-hook)) (provide 'swedish)
--- a/lisp/iswitchb.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/iswitchb.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; iswitchb.el --- switch between buffers using substrings -;; Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. ;; Author: Stephen Eglen <stephen@gnu.org> ;; Maintainer: Stephen Eglen <stephen@gnu.org> @@ -165,11 +165,10 @@ ;; Font-Lock -;; If you have font-lock loaded, the first matching buffer is -;; highlighted. To switch this off, set (setq iswitchb-use-fonts nil) -;; I don't use font-lock that much, so I've hardcoded the faces. If -;; this is too harsh, let me know. Colouring of the matching buffer -;; name was suggested by Carsten Dominik (dominik@strw.leidenuniv.nl) +;; font-lock is used to highlight the first matching buffer. To +;; switch this off, set (setq iswitchb-use-faces nil). Colouring of +;; the matching buffer name was suggested by Carsten Dominik +;; (dominik@strw.leidenuniv.nl) ;; Replacement for read-buffer @@ -230,16 +229,10 @@ ;; Regexp matching -;; There is limited provision for regexp matching within iswitchb, -;; enabled through `iswitchb-regexp'. This allows you to type `c$' -;; for example and see all buffer names ending in `c'. This facility -;; is quite limited though in two respects. First, you can't -;; currently type in expressions like `[0-9]' directly -- you have to -;; type them in when iswitchb-regexp is nil and then toggle on the -;; regexp functionality. Likewise, don't enter an expression -;; containing `\' in regexp mode. If you try, iswitchb gets confused, -;; so just hit C-g and try again. Secondly, no completion mechanism -;; is currently offered when regexp searching. +;; There is provision for regexp matching within iswitchb, enabled +;; through `iswitchb-regexp'. This allows you to type `c$' for +;; example and see all buffer names ending in `c'. No completion +;; mechanism is currently offered when regexp searching. ;;; TODO @@ -256,6 +249,8 @@ (fboundp 'last))) (require 'cl)) +(require 'font-lock) + ;; Set up the custom library. ;; taken from http://www.dina.kvl.dk/~abraham/custom/ (eval-and-compile @@ -377,10 +372,11 @@ :type 'boolean :group 'iswitchb) -(defcustom iswitchb-use-fonts t +(defcustom iswitchb-use-faces t "*Non-nil means use font-lock fonts for showing first match." :type 'boolean :group 'iswitchb) +(define-obsolete-variable-alias 'iswitchb-use-fonts 'iswitchb-use-faces "22.1") (defcustom iswitchb-use-frame-buffer-list nil "*Non-nil means use the currently selected frame's buffer list." @@ -408,6 +404,35 @@ :type 'hook :group 'iswitchb) +(defface iswitchb-single-match-face + '((t + (:inherit font-lock-comment-face))) + "Iswitchb face for single matching buffer name." + :version "22.1" + :group 'iswitchb) + +(defface iswitchb-current-match-face + '((t + (:inherit font-lock-function-name-face))) + "Iswitchb face for current matching buffer name." + :version "22.1" + :group 'iswitchb) + +(defface iswitchb-virtual-matches-face + '((t + (:inherit font-lock-builtin-face))) + "Iswitchb face for matching virtual buffer names. +See also `iswitchb-use-virtual-buffers'." + :version "22.1" + :group 'iswitchb) + +(defface iswitchb-invalid-regexp-face + '((t + (:inherit font-lock-warning-face))) + "Iswitchb face for indicating invalid regexp. " + :version "22.1" + :group 'iswitchb) + ;; Do we need the variable iswitchb-use-mycompletion? ;;; Internal Variables @@ -507,6 +532,11 @@ (defvar iswitchb-minibuf-depth nil "Value we expect to be returned by `minibuffer-depth' in the minibuffer.") +(defvar iswitchb-common-match-inserted nil + "Non-nil if we have just inserted a common match in the minibuffer.") + +(defvar iswitchb-invalid-regexp) + ;;; FUNCTIONS ;;; ISWITCHB KEYMAP @@ -564,6 +594,7 @@ ;;`iswitchb-buffer-ignore') (let* ((prompt "iswitch ") + iswitchb-invalid-regexp (buf (iswitchb-read-buffer prompt))) ;;(message "chosen text %s" iswitchb-final-text) @@ -572,7 +603,8 @@ (cond ( (eq iswitchb-exit 'findfile) (call-interactively 'find-file)) - + (iswitchb-invalid-regexp + (message "Won't make invalid regexp named buffer")) (t ;; View the buffer ;;(message "go to buf %s" buf) @@ -602,10 +634,7 @@ buf-sel iswitchb-final-text (icomplete-mode nil) ;; prevent icomplete starting up - ;; can only use fonts if they have been bound. - (iswitchb-use-fonts (and iswitchb-use-fonts - (boundp 'font-lock-comment-face) - (boundp 'font-lock-function-name-face)))) + ) (iswitchb-define-mode-map) (setq iswitchb-exit nil) @@ -691,7 +720,9 @@ (let (res) (cond ((not iswitchb-matches) (run-hooks 'iswitchb-cannot-complete-hook)) - + (iswitchb-invalid-regexp + ;; Do nothing + ) ((= 1 (length iswitchb-matches)) ;; only one choice, so select it. (exit-minibuffer)) @@ -703,7 +734,8 @@ (not (equal res iswitchb-text))) ;; found something to complete, so put it in the minibuffer. (progn - (setq iswitchb-rescan nil) + (setq iswitchb-rescan nil + iswitchb-common-match-inserted t) (delete-region (minibuffer-prompt-end) (point)) (insert res)) ;; else nothing to complete @@ -889,22 +921,26 @@ (do-string (stringp (car list))) name ret) - (mapcar - (lambda (x) + (setq iswitchb-invalid-regexp nil) + (catch 'invalid-regexp + (mapcar + (lambda (x) - (if do-string - (setq name x) ;We already have the name - (setq name (buffer-name x))) + (if do-string + (setq name x) ;We already have the name + (setq name (buffer-name x))) - (cond - ((and (or (and string-format (string-match regexp name)) - (and (null string-format) - (string-match (regexp-quote regexp) name))) - - (not (iswitchb-ignore-buffername-p name))) - (setq ret (cons name ret)) - ))) - list) + (cond + ((and (if (not string-format) + (string-match (regexp-quote regexp) name) + (condition-case error + (string-match regexp name) + (invalid-regexp + (setq iswitchb-invalid-regexp t) + (throw 'invalid-regexp (setq ret (cdr error)))))) + (not (iswitchb-ignore-buffername-p name))) + (setq ret (cons name ret))))) + list)) ret)) (defun iswitchb-ignore-buffername-p (bufname) @@ -989,7 +1025,8 @@ (temp-buf "*Completions*") (win)) - (if (eq last-command this-command) + (if (and (eq last-command this-command) + (not iswitchb-common-match-inserted)) ;; scroll buffer (progn (set-buffer temp-buf) @@ -1016,8 +1053,8 @@ (fundamental-mode)) (display-completion-list (if iswitchb-matches iswitchb-matches - iswitchb-buflist)) - ))))) + iswitchb-buflist)))) + (setq iswitchb-common-match-inserted nil)))) ;;; KILL CURRENT BUFFER @@ -1227,8 +1264,7 @@ ;; Insert the match-status information: (insert (iswitchb-completions - contents - (not minibuffer-completion-confirm))))))) + contents)))))) (eval-when-compile (defvar most-len) @@ -1243,27 +1279,29 @@ (setq most-is-exact t)) (substring com most-len))) -(defun iswitchb-completions (name require-match) +(defun iswitchb-completions (name) "Return the string that is displayed after the user's text. Modified from `icomplete-completions'." (let ((comps iswitchb-matches) ; "-determined" - only one candidate - (open-bracket-determined (if require-match "(" "[")) - (close-bracket-determined (if require-match ")" "]")) + (open-bracket-determined "[") + (close-bracket-determined "]") ;"-prospects" - more than one candidate (open-bracket-prospects "{") (close-bracket-prospects "}") first) - (if (and iswitchb-use-fonts comps) + (if (and iswitchb-use-faces comps) (progn (setq first (car comps)) (setq first (format "%s" first)) (put-text-property 0 (length first) 'face (if (= (length comps) 1) - 'font-lock-comment-face - 'font-lock-function-name-face) + (if iswitchb-invalid-regexp + 'iswitchb-invalid-regexp-face + 'iswitchb-single-match-face) + 'iswitchb-current-match-face) first) (setq comps (cons first (cdr comps))))) @@ -1292,7 +1330,7 @@ (let ((comp comps)) (while comp (put-text-property 0 (length (car comp)) - 'face 'font-lock-builtin-face + 'face 'iswitchb-virtual-matches-face (car comp)) (setq comp (cdr comp)))))) @@ -1300,16 +1338,23 @@ open-bracket-determined close-bracket-determined)) - ((null (cdr comps)) ;one match - (concat (if (and (> (length (car comps)) - (length name))) - (concat open-bracket-determined + (iswitchb-invalid-regexp + (concat " " (car comps))) + ((null (cdr comps)) ;one match + (concat + (if (if (not iswitchb-regexp) + (= (length name) + (length (car comps))) + (string-match name (car comps)) + (string-equal (match-string 0 (car comps)) + (car comps))) + "" + (concat open-bracket-determined ;; when there is one match, show the ;; matching buffer name in full (car comps) - close-bracket-determined) - "") - (if (not iswitchb-use-fonts) " [Matched]"))) + close-bracket-determined)) + (if (not iswitchb-use-faces) " [Matched]"))) (t ;multiple matches (if (and iswitchb-max-to-show (> (length comps) iswitchb-max-to-show))
--- a/lisp/jit-lock.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/jit-lock.el Mon Jun 06 02:39:45 2005 +0000 @@ -298,7 +298,7 @@ "Fontify current buffer starting at position START. This function is added to `fontification-functions' when `jit-lock-mode' is active." - (when jit-lock-mode + (when (and jit-lock-mode (not (memory-full-p))) (if (null jit-lock-defer-time) ;; No deferral. (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) @@ -540,7 +540,7 @@ This function ensures that lines following the change will be refontified in case the syntax of those lines has changed. Refontification will take place when text is fontified stealthily." - (when jit-lock-mode + (when (and jit-lock-mode (not (memory-full-p))) (save-excursion (with-buffer-prepared-for-jit-lock ;; It's important that the `fontified' property be set from the
--- a/lisp/ledit.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ledit.el Mon Jun 06 02:39:45 2005 +0000 @@ -152,7 +152,7 @@ (use-local-map ledit-mode-map) (setq mode-name "Ledit") (setq major-mode 'ledit-mode) - (run-hooks 'ledit-mode-hook)) + (run-mode-hooks 'ledit-mode-hook)) (provide 'ledit)
--- a/lisp/locate.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/locate.el Mon Jun 06 02:39:45 2005 +0000 @@ -393,7 +393,7 @@ (make-local-variable 'revert-buffer-function) (setq revert-buffer-function 'locate-update) (set (make-local-variable 'page-delimiter) "\n\n") - (run-hooks 'locate-mode-hook)) + (run-mode-hooks 'locate-mode-hook)) (defun locate-do-setup (search-string) (goto-char (point-min))
--- a/lisp/longlines.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/longlines.el Mon Jun 06 02:39:45 2005 +0000 @@ -39,8 +39,6 @@ ;;; Code: -(require 'easy-mmode) - (defgroup longlines nil "Automatic wrapping of long lines when loading files." :group 'fill) @@ -157,7 +155,8 @@ (defface longlines-visible-face '((t (:background "red"))) - "Face used to make hard newlines visible in `longlines-mode'.") + "Face used to make hard newlines visible in `longlines-mode'." + :group 'longlines) (defun longlines-show-hard-newlines (&optional arg) "Make hard newlines visible by adding a face.
--- a/lisp/mail/rmail.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mail/rmail.el Mon Jun 06 02:39:45 2005 +0000 @@ -1156,7 +1156,7 @@ (when rmail-display-summary (rmail-summary)) (rmail-construct-io-menu)) - (run-hooks 'rmail-mode-hook))) + (run-mode-hooks 'rmail-mode-hook))) (defun rmail-mode-2 () (kill-all-local-variables)
--- a/lisp/mail/rmailedit.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mail/rmailedit.el Mon Jun 06 02:39:45 2005 +0000 @@ -68,7 +68,7 @@ (save-excursion (set-buffer rmail-summary-buffer) (rmail-summary-disable))) - (run-hooks 'rmail-edit-mode-hook)) + (run-mode-hooks 'rmail-edit-mode-hook)) (defvar rmail-old-pruned nil) (put 'rmail-old-pruned 'permanent-local t)
--- a/lisp/mail/rmailsum.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mail/rmailsum.el Mon Jun 06 02:39:45 2005 +0000 @@ -760,7 +760,7 @@ (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) (rmail-summary-enable) - (run-hooks 'rmail-summary-mode-hook)) + (run-mode-hooks 'rmail-summary-mode-hook)) ;; Summary features need to be disabled during edit mode. (defun rmail-summary-disable ()
--- a/lisp/mail/supercite.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mail/supercite.el Mon Jun 06 02:39:45 2005 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org> -;; Maintainer: FSF +;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> ;; Created: February 1993 ;; Last Modified: 1993/09/22 18:58:46 ;; Keywords: mail, news @@ -1182,8 +1182,11 @@ (setq attribution attrib attriblist nil)) ((listp attrib) - (setq attribution (eval attrib) - attriblist nil)) + (setq attribution (eval attrib)) + (if (stringp attribution) + (setq attriblist nil) + (setq attribution nil + attriblist (cdr attriblist)))) (t (error "%s did not evaluate to a string or list!" "sc-attrib-selection-list")) ))) @@ -1667,7 +1670,7 @@ (major-mode 'sc-electric-mode)) (use-local-map sc-electric-mode-map) (sc-eref-show sc-eref-style) - (run-hooks 'sc-electric-mode-hook) + (run-mode-hooks 'sc-electric-mode-hook) (recursive-edit) )))
--- a/lisp/man.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/man.el Mon Jun 06 02:39:45 2005 +0000 @@ -259,7 +259,7 @@ (defvar Man-cooked-hook nil "Hook run after removing backspaces but before `Man-mode' processing.") -(defvar Man-name-regexp "[-a-zA-Z0-9_+][-a-zA-Z0-9_.+]*" +(defvar Man-name-regexp "[-a-zA-Z0-9_+][-a-zA-Z0-9_.:+]*" "Regular expression describing the name of a manpage (without section).") (defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" @@ -1061,6 +1061,7 @@ The following key bindings are currently in effect in the buffer: \\{Man-mode-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'Man-mode mode-name "Man" buffer-auto-save-file-name nil @@ -1069,7 +1070,7 @@ " {" 'Man-page-mode-string "}") truncate-lines t buffer-read-only t) - (buffer-disable-undo (current-buffer)) + (buffer-disable-undo) (auto-fill-mode -1) (use-local-map Man-mode-map) (set-syntax-table man-mode-syntax-table) @@ -1080,7 +1081,7 @@ (Man-strip-page-headers) (Man-unindent) (Man-goto-page 1) - (run-hooks 'Man-mode-hook)) + (run-mode-hooks 'Man-mode-hook)) (defsubst Man-build-section-alist () "Build the association list of manpage sections."
--- a/lisp/mh-e/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,27 +1,305 @@ -2005-04-08 Dan Nicolaescu <dann@ics.uci.edu> +2005-05-28 Bill Wohler <wohler@newt.com> + + Released MH-E version 7.84. + + * MH-E-NEWS, README: Updated for release 7.84. + + * mh-e.el (Version, mh-version): Updated for release 7.84. + +2005-05-28 Bill Wohler <wohler@newt.com> + + * mh-e.el, mh-comp.el: Don't autoload Info-goto-node. It's not + used, and if it were, the code should use the info function + instead. + + Use full year in copyright notices (for example, 2005, not 05). + + * Makefile (mh-loaddefs.el, mh-e-autoloads.el): Added 2005 to + copyright notice. + + * mh-inc.el: Use three ;;; to precede Local Variables to be + consistent with other files. Will have to ask Stefan Monnier why + he changed it. + + * README: This version of MH-E to appear in GNU Emacs 22.1, not + 21.5. + + * ChangeLog: The * in a ChangeLog entry must only be used before a + filename. + + Fixed compilation warnings in CVS Emacs. This included using + "public" functions instead of "private" ones (info instead of + Info-goto-node, view-mode-enter instead of view-mode), and + removing a customization group that didn't have a parent group. In + addition, string-to-int was recently deprecated; use + string-to-number instead. + + * mh-customize.el (Info-goto-node): Deleted autoload. + (mh-e): Deleted mh group. Use single mh-e group instead. + (mh-tool-bar-folder-help, mh-tool-bar-letter-help): Use info + instead of Info-goto-node. + + * mh-e.el (mh-read-msg-list): string-to-int deprecated; use + string-to-number. + + * mh-funcs.el (mh-list-folders): Use view-mode-enter instead of + view-mode. + + * mh-seq.el (mh-list-sequences): Use view-mode-enter instead of + view-mode. + + * mh-utils.el (mh-get-msg-num): string-to-int deprecated; use + string-to-number. + + Merged in changes from CVS Emacs including: + + * mh-utils.el (mh-show-mode): + * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. Lute + Kamstra <lute@gnu.org> 2005-05-26. + +2005-05-25 Bill Wohler <wohler@newt.com> + + Merged in changes from CVS Emacs including: * mh-customize.el (mh-speedbar-selected-folder-face): Special case - high number of colors displays. - -2005-03-25 Werner Lemberg <wl@gnu.org> - - * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'. - -2005-03-25 Werner Lemberg <wl@gnu.org> - - * mh-e.el: Replace `illegal' with `invalid'. - -2004-09-07 Stefan <monnier@iro.umontreal.ca> - - * mh-inc.el (mh-inc-spool-list): Correctly declare the external var. - -2004-08-21 Bill Wohler <wohler@newt.com> - - * Released MH-E version 7.82. + high number of colors displays. Dan Nicolaescu <dann@ics.uci.edu> + 2005-04-08. + + * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with + `valid'. Replace `illegal' with `invalid'. Werner Lemberg + <wl@gnu.org> 2005-03-25. + + * mh-inc.el (mh-inc-spool-list): Correctly declare the external + var. Stefan <monnier@iro.umontreal.ca> 2004-09-07. + +2005-05-18 Bill Wohler <wohler@newt.com> + + * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in + docstring. + +2005-05-05 Bill Wohler <wohler@newt.com> + + * mh-e.el (Version, mh-version): Added +cvs to release number. + +2005-05-05 Bill Wohler <wohler@newt.com> + + Released MH-E version 7.83. + + * MH-E-NEWS, README: Updated for release 7.83. + + * mh-e.el (Version, mh-version): Updated for release 7.83. + +2005-05-05 Bill Wohler <wohler@newt.com> + + * README: To appear in Emacs 21.5, since 21.4 was released (but + without the latest MH-E). + + * release-utils (usage): Added --variable-changes. + +2005-05-04 Bill Wohler <wohler@newt.com> + + * mh-customize.el (*-face): Made docstrings consistent. + + * mh-seq.el (mh-pick-args-list): Extracted function for turning + string of pick arguments to list. Fixed list so that multi-word + arguments were put in a single string (closes SF #1122655). + (mh-edit-pick-expr): Use it. + + * mh-unit.el (mh-unit): Since 21.4 snuck out but didn't contain + updated lm-verify, don't run lm-verify on versions before 21.5. + (mh-unit-test-pick-args-list): Added. + + * mh-customize.el (mh-yank-from-start-of-msg): Use headline + capitalization. Changed wording of some choices to be more consistent. + (mh-invisible-header-fields-internal): Added fields from usa.net. + +2005-04-24 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-mime.el (mh-mime-security-button-face): New function which + determines the face to use to colorize encrypted or signed emails. + (mh-insert-mime-security-button): Modified to colorize the button + differently based on whether the signature was valid or not, + whether the decryption was successful or not, etc. + + * mh-customize.el (mh-show-pgg-good-face) + (mh-show-pgg-unknown-face, mh-show-pgg-bad-face): Faces added to + highlight buttons introduced for encrpted or signed MIME parts. + +2005-03-19 Bill Wohler <wohler@newt.com> + + * mh-customize.el (mh-mml-method-default): Sorted alphabetically. + (mh-insert-x-mailer-flag, mh-reply-show-message-flag): Moved from + mh-letter group to mh-sending-mail group. The writing of the + documentation revealed that these options were misplaced. + +2005-03-17 Bill Wohler <wohler@newt.com> + + * mh-customize.el (mh-junk-background): Put in alphabetical order. + Synced with manual. + (mh-junk-program): Use double-quotes on non-symbols. + + * mh-pick.el: (mh-search-folder): Synced docstrings with manual. + + * mh-index.el: (mh-index-search, mh-pick-execute-search) + (mh-grep-execute-search, mh-mairix-execute-search) + (mh-swish-execute-search, mh-swish++-execute-search) + (mh-namazu-execute-search): Synced docstrings with manual. Note + that I'm now grabbing the output of an Info buffer which is why + the indents on the examples has changed a bit. If we all use that + methodology in the future, we shouldn't produce as many gratuitous + diffs. I also noticed that `grep' and `search' became links to + unrelated things, so let's use double-quotes for quoting + non-symbols in the docstrings. + + * mh-customize.el (mh-index-new-messages-folders) + (mh-index-ticked-messages-folders): Synced docstrings with manual. + +2005-02-16 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-index.el (mh-swish-execute-search): Simplify the indexing + recipe for swish. Thanks to Eric Jensen for the suggestion. + +2005-02-11 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-index.el (mh-swish-execute-search) + (mh-swish++-execute-search): Make the indexing recipes better. + (mh-swish-next-result): The indexer might find matches in files + that aren't messages. Make the function handle that case + gracefully. + +2005-02-07 Bill Wohler <wohler@newt.com> + + * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced + docstrings with manual. + +2005-02-06 Bill Wohler <wohler@newt.com> + + * mh-junk.el (mh-spamassassin-blacklist): Removed trailing + whitespace. + + * mh-e.el (mh-refile-or-write-again): Checkdoc fix. + + * mh-identity.el (mh-identity-list-set) + (mh-identity-field-handler, mh-identity-handler-gpg-identity) + (mh-identity-handler-signature) + (mh-identity-handler-attribution-verb) + (mh-identity-handler-default, mh-identity-handler-top): Docstring + editing. + + * mh-customize.el (mh-identity-list, mh-auto-fields-list) + (mh-identity-default, mh-identity-handlers): Synced docstrings + with manual. + +2005-02-03 Bill Wohler <wohler@newt.com> + + * mh-xemacs.el (define-behavior 'mh): Moved Ben's code here from + mh-e.el and added standard documentation. + + * mh-e.el: Received patch from Ben Wing <ben@666.com> to add + define-behavior on XEmacs. + +2005-01-28 Jeffrey C Honig <jch@honig.net> + + * mh-customize.el (mh-invisible-header-fields-internal): Added + X-Evolution header added by Evolution mai client. + +2005-01-18 Bill Wohler <wohler@newt.com> + + * mh-customize.el (mh-invisible-header-fields-internal): Added + DomainKey-Signature (http://antispam.yahoo.com/domainkeys/). + There's a Comment field that goes with it, but I thought it was + too general to add. + +2005-01-06 Bill Wohler <wohler@newt.com> + + * mh-junk.el (mh-spamassassin-blacklist): Fixed typo to fix an + error when junking spamassassin mail when mh-junk-background is + turned on. + +2004-12-25 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-utils.el (mh-show-unquote-From): Make the buffer writable + before trying to change it (closes SF #1089870). + + * mh-comp.el (mh-complete-word): Fix a typo in a variable + name (closes SF #1089870) + +2004-11-28 Jeffrey C Honig <jch@honig.net> + + * mh-comp.el (mh-complete-word): Kill the *Completions* buffer in + any cases where we belive we are done with it. Not perfect, but + better than just leaving it around. + +2004-11-08 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a + function at compile time doesn't guarantee it's existence at run + time. So make the macro handle that situation better. + +2004-11-05 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-acros.el (advice): Load advice, since it isn't loaded in + XEmacs causing compilation problems. + +2004-10-24 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-index.el (mh-mairix-execute-search) + (mh-mairix-regexp-builder): Update the interface to mairix so that + it will work with versions of mairix 0.12 and later. + + * mh-funcs.el (mh-rmf-daemon): Avoid using + beginning-of-buffer since it clobbers the mark and it was pointed + out on the Emacs developers list to be the wrong thing to do. + + * mh-e.el (mh-inc-folder): Only remove the window on the show + buffer. This means if the user has BBDB enabled then the window + displaying BBDB information isn't clobbered. + (mh-refile-or-write-again): Don't use the function + interactive-p. There was a long thread on the Emacs developers + list where it was pointed out that it is incorrect to use this + function most of the time. + + * mh-comp.el (autoload): Don't set auto-mode-alist. This could + screw things up for users that don't use MH-E (closes SF #1032353). + +2004-10-13 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-e.el (mh-refile-or-write-again): Generalize the function to + work on a range of messages (closes SF #1046330). + +2004-09-02 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-e.el (mh-process-commands): The concurrent execution of mark + and refile can cause problems since both the commands change the + current folder. This change avoids that by getting rid of the + concurrency. Another change covers the corner case where we refile + messages to a previously empty folder. Before the modification + sequences weren't preserved even if the appropriate flag was + set. That is no longer the case. + +2004-08-26 Satyaki Das <satyaki@theforce.stanford.edu> + + * mh-e.el (mh-get-new-mail): Also, update the unseen sequence from + disk. Otherwise, the new messages aren't highlighted. + + * mh-seq.el (mh-thread-inc): Fix a bug which appears when inc is + run in a narrowed folder. The user sequence notation was getting + lost. The change fixes that. + + * mh-e.el (mh-get-new-mail): Make inc more efficient by reusing + the existing user sequence notation and deleted/refiled notation. + +2004-08-24 Bill Wohler <wohler@newt.com> + + * mh-e.el (Version, mh-version): Added +cvs to release number. + +2004-08-24 Bill Wohler <wohler@newt.com> + + Released MH-E version 7.82. * MH-E-NEWS, README: Updated for release 7.82. - * mh-e.el (Version, mh-version): Update for release 7.82. + * mh-e.el (Version, mh-version): Updated for release 7.82. 2004-08-24 Bill Wohler <wohler@newt.com> @@ -52,11 +330,11 @@ 2004-08-21 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.81. + Released MH-E version 7.81. * MH-E-NEWS, README: Updated for release 7.81. - * mh-e.el (Version, mh-version): Update for release 7.81. + * mh-e.el (Version, mh-version): Updated for release 7.81. 2004-08-21 Bill Wohler <wohler@newt.com> @@ -89,7 +367,7 @@ 2004-08-15 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.4.80. + Released MH-E version 7.4.80. * MH-E-NEWS, README: Updated for release 7.4.80. @@ -319,13 +597,13 @@ are more useful than a key sequence in these cases. Use "See also" instead of "See also documentation for". - * Merged in 7.4.4 changes, described below. + Merged in 7.4.4 changes, described below. * mh-e.el (Version, mh-version): Set to 7.4.4+cvs. 2004-07-10 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.4.4. + Released MH-E version 7.4.4. * MH-E-NEWS, README: Updated for release 7.4.4. @@ -394,9 +672,9 @@ routines in the best way possible (closes SF #930012). (require 'mouse): To shush compiler. - * Use new function mh-require-cl throughout. - - * Add arch taglines (courtesy Miles Bader). + Use new function mh-require-cl throughout. + + Add arch taglines (courtesy Miles Bader). * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. @@ -536,7 +814,7 @@ 2003-11-18 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.4.3. + Released MH-E version 7.4.3. * MH-E-NEWS, README: Updated for release 7.4.3. @@ -679,8 +957,8 @@ 2003-11-04 Steve Youngs <sryoungs@bigpond.net.au> - * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el - in XEmacs. + * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate + mh-loaddefs.el in XEmacs. (XEMACS_LOADDEFS_COOKIE): Ditto. (XEMACS_LOADDEFS_PKG_NAME): Ditto. (xemacs): Add target to build mh-loaddefs.el in XEmacs @@ -1358,7 +1636,7 @@ 2003-08-19 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.4.2. + Released MH-E version 7.4.2. * MH-E-NEWS, README: Updated for release 7.4.2. @@ -2228,7 +2506,7 @@ 2003-06-25 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.4.1. + Released MH-E version 7.4.1. * MH-E-NEWS, README: Updated for release 7.4.1. @@ -2250,7 +2528,7 @@ 2003-06-24 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.4. + Released MH-E version 7.4. * MH-E-NEWS, README: Updated for release 7.4. @@ -3357,7 +3635,7 @@ 2003-04-24 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.3. + Released MH-E version 7.3. * MH-E-NEWS, README: Updated for release 7.3. @@ -4915,7 +5193,7 @@ 2003-02-03 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.2. + Released MH-E version 7.2. * MH-E-NEWS, README: Updated for release 7.2. @@ -5579,7 +5857,7 @@ 2003-01-07 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.1. + Released MH-E version 7.1. * MH-E-NEWS, README: Updated for release 7.1. @@ -6673,7 +6951,7 @@ 2002-11-29 Bill Wohler <wohler@newt.com> - * Released MH-E version 7.0. + Released MH-E version 7.0. * mh-e.el (Version, mh-version): Updated for release 7.0. @@ -6698,7 +6976,7 @@ 2002-11-21 Bill Wohler <wohler@newt.com> - * Released MH-E version 6.1.91. + Released MH-E version 6.1.91. * mh-e.el (Version, mh-version): Updated for release 6.1.91. @@ -6722,7 +7000,7 @@ 2002-11-15 Bill Wohler <wohler@newt.com> - * Released MH-E version 6.1.90. + Released MH-E version 6.1.90. * README (Compile): New section. Users must now compile MH-E due to the vagaries of the various versions of gnus. @@ -9683,7 +9961,7 @@ 2002-04-08 Bill Wohler <wohler@newt.com> - * Released mh-e version 6.1. + Released mh-e version 6.1. * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp @@ -9787,7 +10065,7 @@ 2001-12-16 Bill Wohler <wohler@newt.com> - * Released mh-e version 6.0. + Released mh-e version 6.0. * MH-E-NEWS: Be a little more specific about incompatible changes. Added info about outdated manual. @@ -9810,7 +10088,7 @@ 2001-12-14 Bill Wohler <wohler@newt.com> - * Released mh-e version 5.0.93. + Released mh-e version 5.0.93. * Makefile (MH-E-SRC): Added mh-xemacs-compat.el. (MH-E-IMG): Added .pbm images for all. Removed mail_ prefix from @@ -9995,7 +10273,7 @@ 2001-12-04 Bill Wohler <wohler@newt.com> - * Released mh-e version 5.0.92. + Released mh-e version 5.0.92. * mh-utils.el (gnus-cite-face-list) (mh-gnus-article-highlight-citation): Don't autoload. Revert to @@ -10005,7 +10283,7 @@ 2001-12-03 Bill Wohler <wohler@newt.com> - * Released mh-e version 5.0.91. + Released mh-e version 5.0.91. * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now that workaround has been implemented. @@ -10911,17 +11189,17 @@ 2001-04-14 chad brown <y@mit.edu> - * rearrange the font-lock keywords a bit + Rearrange the font-lock keywords a bit. 2001-04-12 chad brown <y@mit.edu> - * preliminary (somewhat boring) font-lock support for mh-e. More + Preliminary (somewhat boring) font-lock support for mh-e. More interesting font-lock support probably wants to have better support for multiple format files 2001-02-24 chad brown <y@mit.edu> - * add default nmh paths to mh-find-prog in mh-utils.el. + Add default nmh paths to mh-find-prog in mh-utils.el. change to mh-kill-folder in mh-funcs.el to make it more general. 2001-02-19 Bill Wohler <wohler@newt.com> @@ -10934,10 +11212,10 @@ (dist): Leave release in current directory. -Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. - -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. ;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51
--- a/lisp/mh-e/mh-acros.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-acros.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-acros.el --- Macros used in MH-E -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -40,6 +40,7 @@ ;;; Code: (require 'cl) +(require 'advice) ;; The Emacs coding conventions require that the cl package not be required at ;; runtime. However, the cl package in versions of Emacs prior to 21.4 left cl @@ -68,8 +69,9 @@ (defmacro mh-funcall-if-exists (function &rest args) "Call FUNCTION with ARGS as parameters if it exists." - (if (fboundp function) - `(funcall ',function ,@args))) + (when (fboundp function) + `(when (fboundp ',function) + (funcall ',function ,@args)))) (defmacro mh-make-local-hook (hook) "Make HOOK local if needed.
--- a/lisp/mh-e/mh-alias.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-alias.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-alias.el --- MH-E mail alias completion and expansion ;; -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -162,16 +163,16 @@ (while (< (point) (point-max)) (cond ((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):") - (when (> (string-to-int (match-string 2)) 200) + (when (> (string-to-number (match-string 2)) 200) (let* ((username (match-string 1)) (gecos-name (match-string 3)) (realname (mh-alias-gecos-name gecos-name username mh-alias-passwd-gecos-comma-separator-flag)) (alias-name (if mh-alias-local-users-prefix - (concat mh-alias-local-users-prefix - (mh-alias-suggest-alias realname t)) - username)) + (concat mh-alias-local-users-prefix + (mh-alias-suggest-alias realname t)) + username)) (alias-translation (if (string-equal username realname) (concat "<" username ">")
--- a/lisp/mh-e/mh-comp.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-comp.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-comp.el --- MH-E functions for composing messages -;; Copyright (C) 1993, 95, 1997, 2000, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -52,7 +53,6 @@ (defvar mh-identity-menu) ;;; Autoloads -(autoload 'Info-goto-node "info") (autoload 'mail-mode-fill-paragraph "sendmail") (autoload 'mm-handle-displayed-p "mm-decode") @@ -490,8 +490,10 @@ cc/all sender and all recipients. If optional prefix argument INCLUDEP provided, then include the message in the reply using filter `mhl.reply' in your MH directory. -If the file named by `mh-repl-formfile' exists, it is used as a skeleton -for the reply. +If the file named by `mh-repl-formfile' exists, it is used as a skeleton for +the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU +mailutils variants and the file names by `mh-repl-group-formfile' exists, it +is used instead. See also `mh-send'." (interactive (list @@ -1629,15 +1631,22 @@ (defun mh-complete-word (word choices begin end) "Complete WORD at from CHOICES. Any match found replaces the text from BEGIN to END." - (let ((completion (try-completion word choices))) + (let ((completion (try-completion word choices)) + (completions-buffer "*Completions*")) (cond ((eq completion t) + (ignore-errors + (kill-buffer completions-buffer)) (message "Completed: %s" word)) ((null completion) + (ignore-errors + (kill-buffer completions-buffer)) (message "No completion for `%s'" word)) ((stringp completion) (if (equal word completion) - (with-output-to-temp-buffer "*Completions*" + (with-output-to-temp-buffer completions-buffer (display-completion-list (all-completions word choices))) + (ignore-errors + (kill-buffer completions-buffer)) (delete-region begin end) (insert completion)))))) @@ -1965,8 +1974,6 @@ ;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el. -;;;###autoload(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode)) - (provide 'mh-comp) ;;; Local Variables:
--- a/lisp/mh-e/mh-customize.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-customize.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-customize.el --- MH-E customization -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -69,8 +69,6 @@ (mh-require-cl) (require 'mh-loaddefs) -(autoload 'Info-goto-node "info") - (eval-and-compile (defvar mh-xemacs-flag (featurep 'xemacs) "Non-nil means the current Emacs is XEmacs.")) @@ -102,121 +100,115 @@ ;;; MH-E Customization Groups -(defgroup mh nil +(defgroup mh-e nil "Emacs interface to the MH mail system. MH is the Rand Mail Handler. Other implementations include nmh and GNU mailutils." :link '(custom-manual "(mh-e)Top") :group 'mail) -(defgroup mh-e '((mh custom-group)) ; Sort of an alias for 'mh group - "Emacs interface to the MH mail system. -MH is the Rand Mail Handler. Other implementations include nmh and GNU -mailutils." - :link '(custom-manual "(mh-e)Top")) - (defgroup mh-alias nil "Aliases." :link '(custom-manual "(mh-e)Aliases") :prefix "mh-alias-" - :group 'mh) + :group 'mh-e) (defgroup mh-folder nil "Organizing your mail with folders." :prefix "mh-" :link '(custom-manual "(mh-e)Organizing") - :group 'mh) + :group 'mh-e) (defgroup mh-folder-selection nil "Folder selection." :prefix "mh-" :link '(custom-manual "(mh-e)Folder Selection") - :group 'mh) + :group 'mh-e) (defgroup mh-identity nil "Identities." :link '(custom-manual "(mh-e)Identities") :prefix "mh-identity-" - :group 'mh) + :group 'mh-e) (defgroup mh-inc nil "Incorporating your mail." :prefix "mh-inc-" :link '(custom-manual "(mh-e)Incorporating Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-index nil "Searching." :link '(custom-manual "(mh-e)Searching") :prefix "mh-index-" - :group 'mh) + :group 'mh-e) (defgroup mh-junk nil "Dealing with junk mail." :link '(custom-manual "(mh-e)Junk") :prefix "mh-junk-" - :group 'mh) + :group 'mh-e) (defgroup mh-letter nil "Editing a draft." :prefix "mh-" :link '(custom-manual "(mh-e)Editing Drafts") - :group 'mh) + :group 'mh-e) (defgroup mh-ranges nil "Ranges." :prefix "mh-" :link '(custom-manual "(mh-e)Ranges") - :group 'mh) + :group 'mh-e) (defgroup mh-scan-line-formats nil "Scan line formats." :link '(custom-manual "(mh-e)Scan Line Formats") :prefix "mh-" - :group 'mh) + :group 'mh-e) (defgroup mh-sending-mail nil "Sending mail." :prefix "mh-" :link '(custom-manual "(mh-e)Sending Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-sequences nil "Sequences." :prefix "mh-" :link '(custom-manual "(mh-e)Sequences") - :group 'mh) + :group 'mh-e) (defgroup mh-show nil "Reading your mail." :prefix "mh-" :link '(custom-manual "(mh-e)Reading Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-speed nil "The speedbar." :prefix "mh-speed-" :link '(custom-manual "(mh-e)Speedbar") - :group 'mh) + :group 'mh-e) (defgroup mh-toolbar nil "The toolbar" :link '(custom-manual "(mh-e)Toolbar") :prefix "mh-" - :group 'mh) + :group 'mh-e) (defgroup mh-faces nil "Faces used in MH-E." :link '(custom-manual "(mh-e)Top") :prefix "mh-" :group 'faces - :group 'mh) + :group 'mh-e) (defgroup mh-hooks nil "MH-E hooks." :link '(custom-manual "(mh-e)Top") :prefix "mh-" - :group 'mh) + :group 'mh-e) ;;; Faces @@ -280,7 +272,7 @@ :set (lambda (symbol value) (set-default symbol value) ;Done in mh-variant-set-variant! (mh-variant-set value)) - :group 'mh) + :group 'mh-e) @@ -448,14 +440,34 @@ (defcustom mh-identity-list nil "*List of identities. -Each element consists of an identity label, and a collection of header fields -and a signature to insert if the identity is selected (see -`mh-identity-default', `mh-insert-identity' and the `Identity' menu in a -MH-Letter buffer). The `Value Menu' contains the common header fields `From' -and `Organization'. Other header fields may be added using the `Other Field' -menu item. The `Signature' menu item is used to insert a signature with -`mh-insert-signature'. The `GPG Key ID' menu item is used to specify a -different key to sign or encrypt messages." +To customize this option, click on the `INS' button and enter a label such as +`Home' or `Work'. Then click on the `INS' button with the label `Add at least +one item below'. Then choose one of the items in the `Value Menu'. + +You can specify an alternate `From:' header field using the `From Field' menu +item. You must include a valid email address. A standard format is `First Last +<login@@host.domain>'. If you use an initial with a period, then you must +quote your name as in `\"First I. Last\" <login@@host.domain>'. People usually +list the name of the company where they work using the `Organization Field' +menu item. Set any arbitrary header field and value in the `Other Field' menu +item. Unless the header field is a standard one, precede the name of your +field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of +`Attribution Verb' overrides the setting of +`mh-extract-from-attribution-verb'. Set your signature with the `Signature' +menu item. You can specify the contents of `mh-signature-file-name', a file, +or a function. Specify a different key to sign or encrypt messages with the +`GPG Key ID' menu item. + +You can select the identities you have added via the menu called `Identity' in +the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the +fields and signature added by the identity, select the `None' identity. + +The `Identity' menu contains two other items to save you from having to set +the identity on every message. The menu item `Set Default for Session' can be +used to set the default identity to the current identity until you exit Emacs. +The menu item `Save as Default' sets the option `mh-identity-default' to the +current identity setting. You can also customize the `mh-identity-default' +option in the usual fashion." :type '(repeat (list :tag "" (string :tag "Label") (repeat :tag "Add at least one item below" @@ -489,12 +501,38 @@ (defcustom mh-auto-fields-list nil "List of recipients for which header lines are automatically inserted. -Each element consists of the recipient, which is a regular expression, and a -collection of header fields and identities to insert if the message is sent to -this recipient. The `Value Menu' contains the common header fields `Fcc' and -`Mail-Followup-To'. Other header fields may be added using the `Other Field' -menu item. The `Identity' menu item is used to insert entire identities with -`mh-insert-identity'." + +This option can be used to set the identity depending on the recipient. To +customize this option, click on the `INS' button and enter a regular +expression for the recipient's address. Click on the `INS' button with the +`Add at least one item below' label. Then choose one of the items in the +`Value Menu'. + +The `Identity' menu item is used to select an identity from those configured +in `mh-identity-list'. All of the information for that identity will be added +if the recipient matches. The `Fcc Field' menu item is used to select a folder +that is used in the `Fcc:' header. When you send the message, MH will put a +copy of your message in this folder. The `Mail-Followup-To Field' menu item is +used to insert an `Mail-Followup-To:' header field with the recipients you +provide. If the recipient's mail user agent supports this header field (as nmh +does), then their replies will go to the addresses listed. This is useful if +their replies go both to the list and to you and you don't have a mechanism to +suppress duplicates. If you reply to someone not on the list, you must either +remove the `Mail-Followup-To:' field, or ensure the recipient is also listed +there so that he receives replies to your reply. Other header fields may be +added using the `Other Field' menu item. + +These fields can only be added after the recipient is known. Once the header +contains one or more recipients, run the \\[mh-insert-auto-fields] command or +choose the `Identity -> Insert Auto Fields' menu item to insert these fields +manually. However, you can just send the message and the fields will be added +automatically. You are given a chance to see these fields and to confirm them +before the message is actually sent. You can do away with this confirmation by +turning off the option `mh-auto-fields-prompt-flag'. + +You should avoid using the same header field in `mh-auto-fields-list' and +`mh-identity-list' definitions that may apply to the same message as the +result is undefined." :type `(repeat (list :tag "" (string :tag "Recipient") @@ -525,7 +563,8 @@ :group 'mh-identity) (defcustom mh-identity-default nil - "Default identity to use when `mh-letter-mode' is called." + "Default identity to use when `mh-letter-mode' is called. +See `mh-identity-list'." :type (append '(radio) (cons '(const :tag "None" nil) @@ -534,16 +573,32 @@ :group 'mh-identity) (defcustom mh-identity-handlers - '((":default" . mh-identity-handler-bottom) - ("from" . mh-identity-handler-top) + '(("From" . mh-identity-handler-top) + (":default" . mh-identity-handler-bottom) (":attribution-verb" . mh-identity-handler-attribution-verb) (":signature" . mh-identity-handler-signature) (":pgg-default-user-id" . mh-identity-handler-gpg-identity)) "Handler functions for fields in `mh-identity-list'. -This is an alist of fields (strings) and handlers (functions). Strings are -lowercase. Use \":signature\" for Signature and \":pgg-default-user-id\" for -GPG Key ID. The function associated with the string \":default\" is used if no -other functions are appropriate." + +This option is used to change the way that fields, signatures, and +attributions in `mh-identity-list' are added. To customize +`mh-identity-handlers', replace the name of an existing handler function +associated with the field you want to change with the name of a function you +have written. You can also click on an `INS' button and insert a field of your +choice and the name of the function you have written to handle it. + +The `Field' field can be any field that you've used in your +`mh-identity-list'. The special fields `:attribution-verb', `:signature', or +`:pgg-default-user-id' are used for the `mh-identity-list' choices +`Attribution Verb', `Signature', and `GPG Key ID' respectively. + +The handler associated with the `:default' field is used when no other field +matches. + +The handler functions are passed two or three arguments: the FIELD itself (for +example, `From'), or one of the special fields (for example, `:signature'), +and the ACTION `'remove' or `'add'. If the action is `'add', an additional +argument containing the VALUE for the field is given." :type '(repeat (cons (string :tag "Field") function)) :group 'mh-identity) @@ -552,45 +607,45 @@ ;;; Incorporating Your Mail (:group 'mh-inc) (defcustom mh-inc-prog "inc" - "*Program to run to incorporate new mail into a folder. -Normally \"inc\". This program is relative to the `mh-progs' directory unless -it is an absolute pathname." + "*Program to incorporate new mail into a folder. + +This program generates a one-line summary for each of the new messages. Unless +it is an absolute pathname, the file is assumed to be in the `mh-progs' +directory. You may also link a file to `inc' that uses a different format. +You'll then need to modify several scan line format variables appropriately." :type 'string :group 'mh-inc) (defcustom mh-inc-spool-list nil - "*Alist of alternate spool files, corresponding folders and keybindings. -This option will be described by example. + "*Alternate spool files. -Suppose you have subscribed to the mh-e-devel mailing list and you use -procmail to filter its mail into `~/mail/mh-e' with the following -`.procmailrc' recipe: +You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail +from arbitrary spool files other than your system mailbox, file it in folders +other than your `+inbox', and assign key bindings to incorporate this mail. + +Suppose you are subscribed to the `mh-e-devel' mailing list and you use +`procmail' to filter this mail into `~/mail/mh-e' with the following recipe in +`.procmailrc': MAILDIR=$HOME/mail :0: - * ^From mh-e-devel-admin@lists.sourceforge.net + * ^From mh-e-devel-admin@stop.mail-abuse.org mh-e -If you wanted to incorporate that spool file into an MH folder called mh-e -with the \"I m\" or \\[mh-inc-spool-mh-e] commands, you would use the -following: +In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m' +\(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS' +button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a +`Key Binding' of `m'. - Spool File: ~/mail/mh-e - Folder: mh-e - Key Binding: m - -Then, you could also install `xbuffy' and configure an extra mailbox using the -gnuserv package to run the `mh-inc-spool-mh-e' command in Emacs: +You can use `xbuffy' to automate the incorporation of this mail using the +`gnudoit' command in the `gnuserv' package as follows: box ~/mail/mh-e title mh-e origMode polltime 10 headertime 0 - command gnudoit -q '(mh-inc-spool-mh-e)' - -To incorporate the spool file, click the xbuffy box with the middle mouse -button." + command gnudoit -q '(mh-inc-spool-mh-e)'" :type '(repeat (list (file :tag "Spool File") (string :tag "Folder") (character :tag "Key Binding"))) @@ -602,10 +657,10 @@ ;;; Searching (:group 'mh-index) (defcustom mh-index-new-messages-folders t - "Folders searched for the `unseen' sequence. -This option can be set to `Inbox' to search the `+inbox' folder or `All' to + "Folders searched for the \"unseen\" sequence. +Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to search all of the top level folders. Otherwise, list the folders that should -be searched with the `Choose Folders' menu item. +be searched with the \"Choose Folders\" menu item. See also `mh-recursive-folders-flag'." :group 'mh-index @@ -633,9 +688,9 @@ (defcustom mh-index-ticked-messages-folders t "Folders searched for `mh-tick-seq'. -This option can be set to `Inbox' to search the `+inbox' folder or `All' to +Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to search all of the top level folders. Otherwise, list the folders that should -be searched with the `Choose Folders' menu item. +be searched with the \"Choose Folders\" menu item. See also `mh-recursive-folders-flag'." :group 'mh-index @@ -672,25 +727,6 @@ finally return (car element))))) ;; User customizable variables -(defcustom mh-junk-disposition nil - "Disposition of junk mail." - :type '(choice (const :tag "Delete Spam" nil) - (string :tag "Spam Folder")) - :group 'mh-junk) - -(defcustom mh-junk-program nil - "Spam program that MH-E should use. -The default setting of this option is `Auto-detect' which means that MH-E will -automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in that -order. If, for example, you have both SpamAssassin and Bogofilter installed -and you want to use BogoFilter, then you can set this option to `Bogofilter'." - :type '(choice (const :tag "Auto-detect" nil) - (const :tag "SpamAssassin" spamassassin) - (const :tag "Bogofilter" bogofilter) - (const :tag "SpamProbe" spamprobe)) - :set 'mh-junk-choose - :group 'mh-junk) - (defcustom mh-junk-background nil "If on, spam programs are run in background. By default, the programs are run in the foreground, but this can be slow when @@ -700,23 +736,31 @@ (const :tag "On" 0)) :group 'mh-junk) +(defcustom mh-junk-disposition nil + "Disposition of junk mail." + :type '(choice (const :tag "Delete Spam" nil) + (string :tag "Spam Folder")) + :group 'mh-junk) + +(defcustom mh-junk-program nil + "Spam program that MH-E should use. + +The default setting of this option is \"Auto-detect\" which means that MH-E +will automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in +that order. If, for example, you have both SpamAssassin and Bogofilter +installed and you want to use BogoFilter, then you can set this option to +\"Bogofilter\"." + :type '(choice (const :tag "Auto-detect" nil) + (const :tag "SpamAssassin" spamassassin) + (const :tag "Bogofilter" bogofilter) + (const :tag "SpamProbe" spamprobe)) + :set 'mh-junk-choose + :group 'mh-junk) + ;;; Editing a Draft (:group 'mh-letter) -(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none") - "Default method to use in security directives." - :type '(choice (const :tag "PGP (MIME)" "pgpmime") - (const :tag "PGP" "pgp") - (const :tag "S/MIME" "smime") - (const :tag "None" "none")) - :group 'mh-letter) - -(defcustom mh-compose-forward-as-mime-flag t - "Non-nil means that messages are forwarded as a MIME part." - :type 'boolean - :group 'mh-letter) - (defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn) "Type of MIME message directives in messages. @@ -761,11 +805,6 @@ :type 'string :group 'mh-letter) -(defcustom mh-insert-x-mailer-flag t - "*Non-nil means append an X-Mailer field to the header." - :type 'boolean - :group 'mh-letter) - (defcustom mh-letter-complete-function 'ispell-complete-word "*Function to call when completing outside of address or folder fields. By default, this is set to `ispell-complete-word'." @@ -780,16 +819,12 @@ :type 'integer :group 'mh-letter) -(defcustom mh-reply-show-message-flag t - "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply]. - -The setting of this variable determines whether the MH `show-buffer' is -displayed with the current message when using `mh-reply' without a prefix -argument. Set it to nil if you already include the message automatically -in your draft using - repl: -filter repl.filter -in your ~/.mh_profile file." - :type 'boolean +(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none") + "Default method to use in security directives." + :type '(choice (const :tag "PGP (MIME)" "pgpmime") + (const :tag "PGP" "pgp") + (const :tag "S/MIME" "smime") + (const :tag "None" "none")) :group 'mh-letter) (defcustom mh-signature-file-name "~/.signature" @@ -881,14 +916,14 @@ If the show buffer has a region, this variable is ignored unless its value is one of `attribution' or `autoattrib' in which case the attribution is added to the yanked region." - :type '(choice (const :tag "Below point" nil) - (const :tag "Without header" body) + :type '(choice (const :tag "Body and Header" t) + (const :tag "Body" body) + (const :tag "Below Point" nil) (const :tag "Invoke supercite" supercite) - (const :tag "Invoke supercite, automatically" autosupercite) - (const :tag "Without header, with attribution" attribution) - (const :tag "Without header, with attribution, automatically" - autoattrib) - (const :tag "Entire message with headers" t)) + (const :tag "Invoke supercite, Automatically" autosupercite) + (const :tag "Body With Attribution" attribution) + (const :tag "Body With Attribution, Automatically" + autoattrib)) :group 'mh-letter) @@ -947,6 +982,11 @@ ;;; Sending Mail (:group 'mh-sending-mail) +(defcustom mh-compose-forward-as-mime-flag t + "Non-nil means that messages are forwarded as a MIME part." + :type 'boolean + :group 'mh-sending-mail) + (defcustom mh-compose-letter-function nil "Invoked when setting up a letter draft. It is passed three arguments: TO recipients, SUBJECT, and CC recipients." @@ -965,6 +1005,11 @@ :type 'string :group 'mh-sending-mail) +(defcustom mh-insert-x-mailer-flag t + "*Non-nil means append an X-Mailer field to the header." + :type 'boolean + :group 'mh-sending-mail) + (defcustom mh-reply-default-reply-to nil "*Sets the person or persons to whom a reply will be sent. If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this @@ -975,6 +1020,18 @@ (const "cc") (const "all")) :group 'mh-sending-mail) +(defcustom mh-reply-show-message-flag t + "*Non-nil means the show buffer is displayed using \\<mh-letter-mode-map>\\[mh-reply]. + +The setting of this variable determines whether the MH `show-buffer' is +displayed with the current message when using `mh-reply' without a prefix +argument. Set it to nil if you already include the message automatically +in your draft using + repl: -filter repl.filter +in your ~/.mh_profile file." + :type 'boolean + :group 'mh-sending-mail) + ;;; Sequences (:group 'mh-sequences) @@ -1120,6 +1177,7 @@ "Delivered-To:" ; Egroups/yahoogroups mailing list manager "Delivery-Date:" ; MH "Delivery:" + "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys "Encoding:" "Envelope-to:" "Errors-To:" @@ -1188,6 +1246,7 @@ "X-Envelope-From:" "X-Envelope-Sender:" "X-Envelope-To:" + "X-Evolution:" ; Evolution mail client "X-Face:" "X-Folder:" ; Spam "X-From-Line" @@ -1264,6 +1323,7 @@ "X-Trace:" "X-UID" "X-UIDL:" + "X-USANET-" ; usa.net "X-UserInfo1:" "X-VSMLoop:" ; NTMail "X-Vms-To:" @@ -1527,13 +1587,13 @@ (defun mh-tool-bar-folder-help () "Visit \"(mh-e)Top\"." (interactive) - (Info-goto-node "(mh-e)Top") + (info "(mh-e)Top") (delete-other-windows)) (defun mh-tool-bar-letter-help () "Visit \"(mh-e)Draft Editing\"." (interactive) - (Info-goto-node "(mh-e)Draft Editing") + (info "(mh-e)Draft Editing") (delete-other-windows)) (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) @@ -1907,9 +1967,9 @@ ;; Common buttons (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences") (mh-tool-bar-folder-help (folder) "help" - "Help! (general help)\nThis button runs `Info-goto-node'") + "Help! (general help)\nThis button runs `info'") (mh-tool-bar-letter-help (letter) "help" - "Help! (general help)\nThis button runs `Info-goto-node'") + "Help! (general help)\nThis button runs `info'") ;; Folder narrowed to sequence buttons (mh-widen (sequence) "widen" "Widen from the sequence\nThis button runs `mh-widen'")) @@ -2085,7 +2145,7 @@ ;;; Faces Used in Scan Listing (:group 'mh-folder-faces) (defvar mh-folder-body-face 'mh-folder-body-face - "Face for highlighting body text in MH-Folder buffers.") + "Face used to highlight body text in MH-Folder buffers.") (defface mh-folder-body-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) @@ -2093,11 +2153,11 @@ (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) - "Face for highlighting body text in MH-Folder buffers." + "Face used to highlight body text in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face - "Face for the current message line in MH-Folder buffers.") + "Face used for the current message line in MH-Folder buffers.") (defface mh-folder-cur-msg-face '((((type tty pc) (class color)) (:background "LightGreen")) @@ -2108,11 +2168,11 @@ (((class color) (background dark)) (:background "DarkOliveGreen4")) (t (:underline t))) - "Face for the current message line in MH-Folder buffers." + "Face used for the current message line in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face - "Face for highlighting the current message in MH-Folder buffers.") + "Face used to highlight the current message in MH-Folder buffers.") (defface mh-folder-cur-msg-number-face '((((type tty) (class color)) (:foreground "cyan" :weight bold)) (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) @@ -2120,11 +2180,11 @@ (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) - "Face for highlighting the current message in MH-Folder buffers." + "Face used to highlight the current message in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-date-face 'mh-folder-date-face - "Face for highlighting the date in MH-Folder buffers.") + "Face used to highlight the date in MH-Folder buffers.") (defface mh-folder-date-face '((((class color) (background light)) (:foreground "snow4")) @@ -2132,11 +2192,11 @@ (:foreground "snow3")) (t (:bold t))) - "Face for highlighting the date in MH-Folder buffers." + "Face used to highlight the date in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-followup-face 'mh-folder-followup-face - "Face for highlighting Re: (followup) subject text in MH-Folder buffers.") + "Face used to highlight Re: subject text in MH-Folder buffers.") (defface mh-folder-followup-face '((((class color) (background light)) (:foreground "blue3")) @@ -2144,11 +2204,11 @@ (:foreground "LightGoldenRod")) (t (:bold t))) - "Face for highlighting Re: (followup) subject text in MH-Folder buffers." + "Face used to highlight Re: subject text in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-msg-number-face 'mh-folder-msg-number-face - "Face for highlighting the message number in MH-Folder buffers.") + "Face used to highlight the message number in MH-Folder buffers.") (defface mh-folder-msg-number-face '((((class color) (background light)) (:foreground "snow4")) @@ -2156,15 +2216,15 @@ (:foreground "snow3")) (t (:bold t))) - "Face for highlighting the message number in MH-Folder buffers." + "Face used to highlight the message number in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-deleted-face 'mh-folder-deleted-face - "Face for highlighting deleted messages in MH-Folder buffers.") + "Face used to highlight deleted messages in MH-Folder buffers.") (copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face) (defvar mh-folder-refiled-face 'mh-folder-refiled-face - "Face for highlighting refiled messages in MH-Folder buffers.") + "Face used to highlight refiled messages in MH-Folder buffers.") (defface mh-folder-refiled-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) @@ -2174,11 +2234,11 @@ (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) - "Face for highlighting refiled messages in MH-Folder buffers." + "Face used to highlight refiled messages in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-subject-face 'mh-folder-subject-face - "Face for highlighting subject text in MH-Folder buffers.") + "Face used to highlight subject text in MH-Folder buffers.") (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-folder")) (defface mh-folder-subject-face @@ -2188,7 +2248,7 @@ (:foreground "yellow")) (t (:bold t))) - "Face for highlighting subject text in MH-Folder buffers." + "Face used to highlight subject text in MH-Folder buffers." :group 'mh-folder-faces) (defface mh-folder-tick-face @@ -2199,15 +2259,15 @@ :group 'mh-folder-faces) (defvar mh-folder-address-face 'mh-folder-address-face - "Face for highlighting the address in MH-Folder buffers.") + "Face used to highlight the address in MH-Folder buffers.") (copy-face 'mh-folder-subject-face 'mh-folder-address-face) (defvar mh-folder-scan-format-face 'mh-folder-scan-format-face - "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.") + "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.") (copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face) (defvar mh-folder-to-face 'mh-folder-to-face - "Face for highlighting the To: string in MH-Folder buffers.") + "Face used to highlight the To: string in MH-Folder buffers.") (defface mh-folder-to-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) @@ -2215,7 +2275,7 @@ (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) - "Face for highlighting the To: string in MH-Folder buffers." + "Face used to highlight the To: string in MH-Folder buffers." :group 'mh-folder-faces) @@ -2223,7 +2283,7 @@ ;;; Faces Used in Searching (:group 'mh-index-faces) (defvar mh-index-folder-face 'mh-index-folder-face - "Face for highlighting folders in MH-Index buffers.") + "Face used to highlight folders in MH-Index buffers.") (defface mh-index-folder-face '((((class color) (background light)) (:foreground "dark green" :bold t)) @@ -2231,7 +2291,7 @@ (:foreground "indian red" :bold t)) (t (:bold t))) - "Face for highlighting folders in MH-Index buffers." + "Face used to highlight folders in MH-Index buffers." :group 'mh-index-faces) @@ -2244,7 +2304,7 @@ (((class color) (background dark)) (:background "gray10")) (t (:bold t))) - "Face for displaying header fields in draft buffers." + "Face used to display header fields in draft buffers." :group 'mh-letter-faces) @@ -2252,7 +2312,7 @@ ;;; Faces Used in Message Display (:group 'mh-show-faces) (defvar mh-show-cc-face 'mh-show-cc-face - "Face for highlighting cc header fields.") + "Face used to highlight cc: header fields.") (defface mh-show-cc-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) @@ -2262,11 +2322,11 @@ (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) - "Face for highlighting cc header fields." + "Face used to highlight cc: header fields." :group 'mh-show-faces) (defvar mh-show-date-face 'mh-show-date-face - "Face for highlighting the Date header field.") + "Face used to highlight the Date: header field.") (defface mh-show-date-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) @@ -2274,7 +2334,7 @@ (((class color) (background light)) (:foreground "ForestGreen")) (((class color) (background dark)) (:foreground "PaleGreen")) (t (:bold t :underline t))) - "Face for highlighting the Date header field." + "Face used to highlight the Date: header field." :group 'mh-show-faces) (defvar mh-show-header-face 'mh-show-header-face @@ -2289,13 +2349,36 @@ "Face used to deemphasize unspecified header fields." :group 'mh-show-faces) +(defvar mh-show-pgg-good-face 'mh-show-pgg-good-face + "Face used to highlight a good PGG signature.") +(defface mh-show-pgg-good-face + '((t (:bold t :foreground "LimeGreen"))) + "Face used to highlight a good PGG signature." + :group 'mh-show-faces) + +(defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown-face + "Face used to highlight a PGG signature whose status is unknown. +This face is also used for a signature when the signer is untrusted.") +(defface mh-show-pgg-unknown-face + '((t (:bold t :foreground "DarkGoldenrod2"))) + "Face used to highlight a PGG signature whose status is unknown. +This face is also used for a signature when the signer is untrusted." + :group 'mh-show-faces) + +(defvar mh-show-pgg-bad-face 'mh-show-pgg-bad-face + "Face used to highlight a bad PGG signature.") +(defface mh-show-pgg-bad-face + '((t (:bold t :foreground "DeepPink1"))) + "Face used to highlight a bad PGG signature." + :group 'mh-show-faces) + (defface mh-show-signature-face '((t (:italic t))) - "Face for highlighting message signature." + "Face used to highlight the message signature." :group 'mh-show-faces) (defvar mh-show-to-face 'mh-show-to-face - "Face for highlighting the To: header field.") + "Face used to highlight the To: header field.") (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-show")) (defface mh-show-to-face @@ -2306,11 +2389,11 @@ (((class color) (background light)) (:foreground "SaddleBrown")) (((class color) (background dark)) (:foreground "burlywood")) (t (:underline t))) - "Face for highlighting the To: header field." + "Face used to highlight the To: header field." :group 'mh-show-faces) (defvar mh-show-from-face 'mh-show-from-face - "Face for highlighting the From: header field.") + "Face used to highlight the From: header field.") (defface mh-show-from-face '((((class color) (background light)) (:foreground "red3")) @@ -2318,17 +2401,17 @@ (:foreground "cyan")) (t (:bold t))) - "Face for highlighting the From: header field." + "Face used to highlight the From: header field." :group 'mh-show-faces) (defface mh-show-xface-face '((t (:foreground "black" :background "white"))) - "Face for displaying the X-Face image. + "Face used to display the X-Face image. The background and foreground is used in the image." :group 'mh-show-faces) (defvar mh-show-subject-face 'mh-show-subject-face - "Face for highlighting the Subject header field.") + "Face used to highlight the Subject: header field.") (copy-face 'mh-folder-subject-face 'mh-show-subject-face)
--- a/lisp/mh-e/mh-e.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-e.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,11 +1,12 @@ ;;; mh-e.el --- GNU Emacs interface to the MH mail system -;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, -;; 2000, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1988, +;; 1990, 1992, 1993, 1994, 1995, 1997, 1999, +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> -;; Version: 7.82 +;; Version: 7.84 ;; Keywords: mail ;; This file is part of GNU Emacs. @@ -97,10 +98,7 @@ (defvar font-lock-auto-fontify) (defvar font-lock-defaults) -(defconst mh-version "7.82" "Version number of MH-E.") - -;;; Autoloads -(autoload 'Info-goto-node "info") +(defconst mh-version "7.84" "Version number of MH-E.") (defvar mh-partial-folder-mode-line-annotation "select" "Annotation when displaying part of a folder. @@ -578,7 +576,8 @@ (setq folder mh-inbox)) (let ((threading-needed-flag nil)) (let ((config (current-window-configuration))) - (delete-other-windows) + (when (and mh-show-buffer (get-buffer mh-show-buffer)) + (delete-windows-on mh-show-buffer)) (cond ((not (get-buffer folder)) (mh-make-folder folder) (setq threading-needed-flag mh-show-threads-flag) @@ -717,22 +716,24 @@ (mh-refile-a-msg nil folder)) (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg))) -(defun mh-refile-or-write-again (message) - "Re-execute the last refile or write command on the given MESSAGE. +(defun mh-refile-or-write-again (range &optional interactive-flag) + "Re-execute the last refile or write command on the given RANGE. Default is the displayed message. Use the same folder or file as the previous -refile or write command." - (interactive (list (mh-get-msg-num t))) +refile or write command. +If INTERACTIVE-FLAG is non-nil then the function was called interactively." + (interactive (list (mh-interactive-range "Redo") t)) (if (null mh-last-destination) (error "No previous refile or write")) (let (output) (setq output (cond ((eq (car mh-last-destination) 'refile) - (mh-refile-a-msg message (cdr mh-last-destination)) + (mh-refile-msg range (cdr mh-last-destination)) (format "Destination folder: %s" (cdr mh-last-destination))) (t - (apply 'mh-write-msg-to-file message (cdr mh-last-destination)) + (mh-iterate-on-range msg range + (apply 'mh-write-msg-to-file msg (cdr mh-last-destination))) + (mh-next-msg interactive-flag) (format "Destination: %s" (cdr mh-last-destination))))) - (mh-next-msg (interactive-p)) (message output))) (defun mh-quit () @@ -1801,7 +1802,7 @@ (message "inc %s..." folder)) (setq mh-next-direction 'forward) (goto-char (point-max)) - (mh-remove-all-notation) + (mh-remove-cur-notation) (let ((start-of-inc (point))) (if maildrop-name ;; I think MH 5 used "-ms-file" instead of "-file", @@ -1827,7 +1828,7 @@ start-of-inc (point-max)))) (delete-region start-of-inc (point-max)) (unwind-protect (mh-widen t) - (mh-remove-all-notation) + (mh-remove-cur-notation) (goto-char (point-max)) (setq start-of-inc (point)) (insert saved-text) @@ -1846,7 +1847,15 @@ (t (setq new-mail-flag t))) (keep-lines mh-scan-valid-regexp) ; Flush random scan lines - (setq mh-seq-list (mh-read-folder-sequences folder t)) + (let* ((sequences (mh-read-folder-sequences folder t)) + (new-cur (assoc 'cur sequences)) + (new-unseen (assoc mh-unseen-seq sequences))) + (unless (assoc 'cur mh-seq-list) + (push (list 'cur) mh-seq-list)) + (unless (assoc mh-unseen-seq mh-seq-list) + (push (list mh-unseen-seq) mh-seq-list)) + (setcdr (assoc 'cur mh-seq-list) (cdr new-cur)) + (setcdr (assoc mh-unseen-seq mh-seq-list) (cdr new-unseen))) (when (equal (point-max) start-of-inc) (mh-notate-cur)) (if new-mail-flag @@ -1858,8 +1867,7 @@ (mh-thread-inc folder start-of-inc)) (mh-goto-cur-msg)) (goto-char point-before-inc)) - (mh-notate-user-sequences) - (mh-notate-deleted-and-refiled))))) + (mh-notate-user-sequences (cons start-of-inc (point-max))))))) (defun mh-make-folder-mode-line (&optional ignored) "Set the fields of the mode line for a folder buffer. @@ -2033,18 +2041,18 @@ (mh-coalesce-msg-list msgs)) (mh-delete-scan-msgs msgs) ;; Preserve sequences in destination folder... - (when (and mh-refile-preserves-sequences-flag - (numberp last)) + (when mh-refile-preserves-sequences-flag (clrhash dest-map) - (loop for i from (1+ last) + (loop for i from (1+ (or last 0)) for msg in (sort (copy-sequence msgs) #'<) do (loop for seq-name in (gethash msg seq-map) do (push i (gethash seq-name dest-map)))) (maphash #'(lambda (seq msgs) - ;; Run it in the background, since we don't care - ;; about the results. - (apply #'mh-exec-cmd-daemon "mark" #'ignore + ;; Can't be run in the background, since the + ;; current folder is changed by mark this could + ;; lead to a race condition with the next refile. + (apply #'mh-exec-cmd "mark" "-sequence" (symbol-name seq) dest-folder "-add" (mapcar #'(lambda (x) (format "%s" x)) (mh-coalesce-msg-list msgs)))) @@ -2201,13 +2209,14 @@ (end-of-line (save-excursion (end-of-line) (point))) num) (while (re-search-forward "[0-9]+" end-of-line t) - (setq num (string-to-int (buffer-substring (match-beginning 0) - (match-end 0)))) + (setq num (string-to-number (buffer-substring (match-beginning 0) + (match-end 0)))) (cond ((looking-at "-") ; Message range (forward-char 1) (re-search-forward "[0-9]+" end-of-line t) - (let ((num2 (string-to-int (buffer-substring (match-beginning 0) - (match-end 0))))) + (let ((num2 (string-to-number + (buffer-substring (match-beginning 0) + (match-end 0))))) (if (< num2 num) (error "Bad message range: %d-%d" num num2)) (while (<= num num2)
--- a/lisp/mh-e/mh-funcs.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-funcs.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-funcs.el --- MH-E functions not everyone will use right away -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -127,7 +128,7 @@ (set-buffer (get-buffer-create mh-temp-buffer)) (insert-before-markers output) (when (save-excursion - (beginning-of-buffer) + (goto-char (point-min)) (re-search-forward "^rmf: " (point-max) t)) (display-buffer mh-temp-buffer))) @@ -148,7 +149,7 @@ "-recurse" "-norecurse")) (goto-char (point-min)) - (view-mode 1) + (view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing folders...done")))))
--- a/lisp/mh-e/mh-gnus.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-gnus.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com>
--- a/lisp/mh-e/mh-identity.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-identity.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-identity.el --- Multiple identify support for MH-E. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -87,18 +87,18 @@ ;;;###mh-autoload (defun mh-identity-list-set (symbol value) "Update the `mh-identity-list' variable, and rebuild the menu. -Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in -customization). This is called after 'customize is used to alter +Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set +in customization). This is called after 'customize is used to alter `mh-identity-list'." (set-default symbol value) (mh-identity-make-menu)) (defvar mh-identity-local nil - "Buffer-local variable holding the identity currently in use.") + "Buffer-local variable that holds the identity currently in use.") (make-variable-buffer-local 'mh-identity-local) (defun mh-header-field-delete (field value-only) - "Delete FIELD in the mail header, or only its value if VALUE-ONLY is t. + "Delete header FIELD, or only its value if VALUE-ONLY is t. Return t if anything is deleted." (let ((field-colon (if (string-match "^.*:$" field) field @@ -119,11 +119,11 @@ "Marker for the end of a signature inserted by `mh-insert-identity'.") (defun mh-identity-field-handler (field) - "Return the handler for a FIELD or nil if none set. + "Return the handler for header FIELD or nil if none set. The field name is downcased. If the FIELD begins with the character `:', then it must have a special handler defined in `mh-identity-handlers', else return an error since it is not a valid -message header." +header field." (or (cdr (assoc (downcase field) mh-identity-handlers)) (and (eq (aref field 0) ?:) (error (format "Field %s - unknown mh-identity-handler" field))) @@ -132,8 +132,8 @@ ;;;###mh-autoload (defun mh-insert-identity (identity) - "Insert proper fields for given IDENTITY. -Edit the `mh-identity-list' variable to define identity." + "Insert fields specified by given IDENTITY. +See `mh-identity-list'." (interactive (list (completing-read "Identity: " @@ -167,7 +167,8 @@ ;;;###mh-autoload (defun mh-identity-handler-gpg-identity (field action &optional value) - "For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. + "Process header FIELD \":pgg-default-user-id\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE when action 'add is selected." (cond @@ -180,8 +181,8 @@ ;;;###mh-autoload (defun mh-identity-handler-signature (field action &optional value) - "For FIELD \"signature\", process headers for ACTION 'remove or 'add. -The VALUE is added." + "Process header FIELD \":signature\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." (cond ((equal action 'remove) (when (and (markerp mh-identity-signature-start) @@ -210,8 +211,8 @@ ;;;###mh-autoload (defun mh-identity-handler-attribution-verb (field action &optional value) - "For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. -The VALUE is added." + "Process header FIELD \":attribution-verb\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." (when (and (markerp mh-identity-attribution-verb-start) (markerp mh-identity-attribution-verb-end)) (delete-region mh-identity-attribution-verb-start @@ -239,9 +240,10 @@ (point-max-marker)))) (defun mh-identity-handler-default (field action top &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -if TOP is non-nil, add the field and it's VALUE at the top of the header, else -add it at the bottom of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If TOP is non-nil, add the field and its +VALUE at the top of the header, else add it at the bottom of the header. If +action is 'add, the VALUE is added." (let ((field-colon (if (string-match "^.*:$" field) field (concat field ":")))) @@ -266,14 +268,16 @@ ;;;###mh-autoload (defun mh-identity-handler-top (field action &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the top of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the top of the header." (mh-identity-handler-default field action t value)) ;;;###mh-autoload (defun mh-identity-handler-bottom (field action &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the bottom of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the bottom of the header." (mh-identity-handler-default field action nil value)) (provide 'mh-identity)
--- a/lisp/mh-e/mh-inc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-inc.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-inc.el --- MH-E `inc' and separate mail spool handling ;; -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -98,10 +98,10 @@ (provide 'mh-inc) -;; Local Variables: -;; indent-tabs-mode: nil -;; sentence-end-double-space: nil -;; End: +;;; Local Variables: +;;; indent-tabs-mode: nil +;;; sentence-end-double-space: nil +;;; End: -;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 +;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 ;;; mh-inc.el ends here
--- a/lisp/mh-e/mh-index.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-index.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-index -- MH-E interface to indexing programs -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -31,6 +31,7 @@ ;;; swish-e ;;; mairix ;;; namazu +;;; pick ;;; grep ;;; ;;; (2) To use this package, you first have to build an index. Please read @@ -352,43 +353,74 @@ (defun* mh-index-search (redo-search-flag folder search-regexp &optional window-config) "Perform an indexed search in an MH mail folder. -Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. +Use a prefix argument to repeat the search. + +Unlike regular searches, the prompt for the folder to search can be `all' to +search all folders; in addition, the search works recursively on the listed +folder. The search criteria are entered in an MH-Pick buffer as described in +`mh-search-folder'. + +To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another +difference from the regular searches is that because the search operates on +more than one folder, the messages that are found are put in a temporary +sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This +buffer is special because it displays messages from multiple folders; each set +of messages from a given folder has a heading with the folder name. + +In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can +be used to visit the folder of the message at point. Initially, only the +messages that matched the search criteria are displayed in the folder. While +the temporary buffer has its own set of message numbers, the actual messages +numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] +command is useful to find the actual message number of an interesting message, +or to view surrounding messages with the \\[mh-rescan-folder] command. + +Because this folder is temporary, you'll probably get in the habit of killing +it when you're done with \\[mh-kill-folder]. -If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a -index search, then the search is repeated. Otherwise, FOLDER is searched with -SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is -\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG -stores the window configuration that will be restored after the user quits the -folder containing the index search results. +If you have run the \\[mh-search-folder] command, but change your mind while +entering the search criteria and actually want to run an indexed search, then +you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the +MH-Pick buffer. + +The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined +by the `mh-index-program' option. The default value is \"Auto-detect\" which +means that MH-E will automatically choose one of \"swish++\", \"swish-e\", +\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, +you have both \"swish++\" and \"mairix\" installed and you want to use +\"mairix\", then you can set this option to \"mairix\". + + *NOTE* -Four indexing programs are supported; if none of these are present, then grep -is used. This function picks the first program that is available on your -system. If you would prefer to use a different program, set the customization -variable `mh-index-program' accordingly. + The \"pick\" and \"grep\" commands do not perform a recursive search on + the given folder. -The documentation for the following functions describes how to generate the -index for each program: +This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 +checksum of a message. This means that if an incoming message already contains +an \"X-MHE-Checksum:\" field, that message might not be found by this command. +The following \"procmail\" recipe avoids this problem by renaming the existing +header field: + + :0 wf + | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" + +The documentation for the following commands describe how to set up the +various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands +do not require additional configuration. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - -If none of these programs are present then we use pick. If desired grep can be -used instead. Details about these methods can be found in: - - `mh-pick-execute-search' - `mh-grep-execute-search' -This and related functions use an X-MHE-Checksum header to cache the MD5 -checksum of a message. This means that already present X-MHE-Checksum headers -in the incoming email could result in messages not being found. The following -procmail recipe should avoid this: - - :0 wf - | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\" - -This has the effect of renaming already present X-MHE-Checksum headers." +In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was +generated by a index search, then the search is repeated. Otherwise, FOLDER is +searched with SEARCH-REGEXP and the results are presented in an MH-E folder. +If FOLDER is \"+\" then mail in all folders are searched. Optional argument +WINDOW-CONFIG stores the window configuration that will be restored after the +user quits the folder containing the index search results." (interactive (list current-prefix-arg (progn @@ -998,8 +1030,8 @@ in the folder itself and does not descend into any sub-folders that may be present. -FOLDER-PATH is the directory containing the mails to be searched and -SEARCH-REGEXP is the pattern that pick gets." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (setq mh-index-pick-folder @@ -1029,7 +1061,13 @@ (defun mh-grep-execute-search (folder-path search-regexp) "Execute grep and read the results. -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." + +Unlike the other index search programs \"grep\" only searches messages present +in the folder itself and does not descend into any sub-folders that may be +present. + +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (call-process mh-grep-binary nil '(t nil) nil @@ -1081,34 +1119,34 @@ (defun mh-mairix-execute-search (folder-path search-regexp-list) "Execute mairix and read the results. -In the examples below replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.mairix. Then create the file -/home/user/Mail/.mairix/config with the following contents: +First create the directory \"/home/user/Mail/.mairix\". Then create the file +\"/home/user/Mail/.mairix/config\" with the following contents: - # This should contain the same thing as your `mh-user-path' - base=/home/user/Mail + base=/home/user/Mail - # List of folders that should be indexed. 3 dots at the end means there are - # subfolders within the folder - mh_folders=archive...:inbox:drafts:news:sent:trash + # List of folders that should be indexed. 3 dots at the end means there + # are subfolders within the folder + mh=archive...:inbox:drafts:news:sent:trash - vfolder_format=raw - database=/home/user/Mail/mairix/database + vfolder_format=raw + database=/home/user/Mail/mairix/database Use the following command line to generate the mairix index. Run this daily from cron: - mairix -f /home/user/Mail/.mairix/config + mairix -f /home/user/Mail/.mairix/config -FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-mairix-binary (error "Set mh-mairix-binary appropriately")) (apply #'call-process mh-mairix-binary nil '(t nil) nil - "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) + "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) search-regexp-list) (goto-char (point-min)) (setq mh-mairix-folder @@ -1167,10 +1205,10 @@ (let ((expr-list (cdr conjunct)) (expr-string "")) (dolist (e expr-list) - (setq expr-string (concat expr-string "+" + (setq expr-string (concat expr-string "," (if (atom e) "" "~") (if (atom e) e (cadr e))))) - (setq final (concat final "," (substring expr-string 1))))) + (setq final (concat final "/" (substring expr-string 1))))) (substring final 1))) result))) result)) @@ -1327,52 +1365,49 @@ (defun mh-swish-execute-search (folder-path search-regexp) "Execute swish-e and read the results. -In the examples below, replace /home/user/Mail with the path to your MH -directory. +In the examples below, replace \"/home/user/Mail\" with the path to your +MH directory. -First create the directory /home/user/Mail/.swish. Then create the file -/home/user/Mail/.swish/config with the following contents: +First create the directory \"/home/user/Mail/.swish\". Then create the file +\"/home/user/Mail/.swish/config\" with the following contents: - IndexDir /home/user/Mail - IndexFile /home/user/Mail/.swish/index - IndexName \"Mail Index\" - IndexDescription \"Mail Index\" - IndexPointer \"http://nowhere\" - IndexAdmin \"nobody\" - #MetaNames automatic - IndexReport 3 - FollowSymLinks no - UseStemming no - IgnoreTotalWordCountWhenRanking yes - WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- - BeginCharacters abcdefghijklmnopqrstuvwxyz - EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 - IgnoreLimit 50 1000 - IndexComments 0 - FileRules pathname contains /home/user/Mail/.swish - FileRules pathname contains /home/user/Mail/mhe-index - FileRules filename is index - FileRules filename is \\..* - FileRules filename is #.* - FileRules filename is ,.* - FileRules filename is .*~ + DefaultContents TXT* + IndexDir /home/user/Mail + IndexFile /home/user/Mail/.swish/index + IndexName \"Mail Index\" + IndexDescription \"Mail Index\" + IndexPointer \"http://nowhere\" + IndexAdmin \"nobody\" + #MetaNames automatic + IndexReport 3 + FollowSymLinks no + UseStemming no + IgnoreTotalWordCountWhenRanking yes + WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- + BeginCharacters abcdefghijklmnopqrstuvwxyz + EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 + IgnoreLimit 50 1000 + IndexComments 0 + FileRules filename contains \\D + FileRules pathname contains /home/user/Mail/.swish + FileRules pathname contains /home/user/Mail/mhe-index + +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. If there are any directories you would like to ignore, append lines like the -following to config: +following to \"config\": - FileRules pathname contains /home/user/Mail/scripts + FileRules pathname contains /home/user/Mail/scripts -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the swish index. Run this daily +from cron: -Use the following command line to generate the swish index. Run this -daily from cron: + swish-e -c /home/user/Mail/.swish/config - swish-e -c /home/user/Mail/.swish/config - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-swish-binary @@ -1407,7 +1442,8 @@ (list (let* ((s (buffer-substring-no-properties start (1+ (point))))) (unless (string-match mh-swish-folder s) (return 'error)) - (if (string-match mh-user-path s) + (if (and (string-match mh-user-path s) + (< (match-end 0) (1- (length s)))) (format "+%s" (substring s (match-end 0) (1- (length s)))) (return 'error))) @@ -1431,34 +1467,35 @@ (defun mh-swish++-execute-search (folder-path search-regexp) "Execute swish++ and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.swish++. Then create the file -/home/user/Mail/.swish++/swish++.conf with the following contents: +First create the directory \"/home/user/Mail/.swish++\". Then create the file +\"/home/user/Mail/.swish++/swish++.conf\" with the following contents: - IncludeMeta Bcc Cc Comments Content-Description From Keywords - IncludeMeta Newsgroups Resent-To Subject To - IncludeMeta Message-Id References In-Reply-To - IncludeFile Mail * - IndexFile /home/user/Mail/.swish++/swish++.index + IncludeMeta Bcc Cc Comments Content-Description From Keywords + IncludeMeta Newsgroups Resent-To Subject To + IncludeMeta Message-Id References In-Reply-To + IncludeFile Mail * + IndexFile /home/user/Mail/.swish++/swish++.index -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ - -o -path /home/user/Mail/.swish++ -prune \\ - -o -name \"[0-9]*\" -print \\ - | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail + find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ + -o -path /home/user/Mail/.swish++ -prune \\ + -o -name \"[0-9]*\" -print \\ + | index -c /home/user/Mail/.swish++/swish++.conf - -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The command above assumes that the results are found in sub-folders of -`mh-index-folder' which is +mhe-index by default. +This command does not index the folders that hold the results of your searches +in \"+mhe-index\" since they tend to be ephemeral and the original messages +are indexed anyway. -On some systems (Debian GNU/Linux, for example), use index++ instead of index. +On some systems (Debian GNU/Linux, for example), use \"index++\" instead of +\"index\". -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-swish++-binary @@ -1512,32 +1549,29 @@ (defun mh-namazu-execute-search (folder-path search-regexp) "Execute namazu and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.namazu. Then create the file -/home/user/Mail/.namazu/mknmzrc with the following contents: +First create the directory \"/home/user/Mail/.namazu\". Then create the file +\"/home/user/Mail/.namazu/mknmzrc\" with the following contents: - package conf; # Don't remove this line! - $ADDRESS = 'user@localhost'; - $ALLOW_FILE = \"[0-9]*\"; - $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; - -In the above example configuration, none of the mail files contained in the -directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. + package conf; # Don't remove this line! + $ADDRESS = 'user@localhost'; + $ALLOW_FILE = \"[0-9]*\"; + $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. -Use the following command line to generate the namazu index. Run this -daily from cron: +Use the following command line to generate the namazu index. Run this daily +from cron: - mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ - /home/user/Mail + mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ + /home/user/Mail -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (let ((namazu-index-directory (format "%s%s" mh-user-path mh-namazu-directory))) (unless (file-exists-p namazu-index-directory)
--- a/lisp/mh-e/mh-init.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-init.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-init.el --- MH-E initialization. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com>
--- a/lisp/mh-e/mh-junk.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-junk.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-junk.el --- Interface to anti-spam measures -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu>, ;; Bill Wohler <wohler@newt.com> @@ -191,8 +191,8 @@ (message (format "Blacklisting message %d..." msg)) (set-buffer (get-buffer-create mh-temp-buffer)) (erase-buffer) - (call-process (expand-file-name mh-scan-prog mh-progs) mh-junk-background - t nil + (call-process (expand-file-name mh-scan-prog mh-progs) + nil mh-junk-background nil (format "%s" msg) current-folder "-format" "%<(mymbox{from})%|%(addr{from})%>") (goto-char (point-min))
--- a/lisp/mh-e/mh-loaddefs.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-loaddefs.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-loaddefs.el --- automatically extracted autoloads ;; -;;; Copyright (C) 2005 Free Software Foundation, Inc. +;;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. ;;; Author: Bill Wohler <wohler@newt.com> ;;; Keywords: mail ;;; Commentary: @@ -13,7 +13,7 @@ ;;;;;; mh-check-whom mh-insert-signature mh-to-fcc mh-to-field mh-fill-paragraph-function ;;;;;; mh-get-header-field mh-send-other-window mh-send mh-reply ;;;;;; mh-redistribute mh-forward mh-extract-rejected-mail mh-edit-again) -;;;;;; "mh-comp" "mh-comp.el" (16665 53716)) +;;;;;; "mh-comp" "mh-comp.el" (17048 51103)) ;;; Generated autoloads from mh-comp.el (autoload (quote mh-edit-again) "mh-comp" "\ @@ -56,8 +56,10 @@ cc/all sender and all recipients. If optional prefix argument INCLUDEP provided, then include the message in the reply using filter `mhl.reply' in your MH directory. -If the file named by `mh-repl-formfile' exists, it is used as a skeleton -for the reply. +If the file named by `mh-repl-formfile' exists, it is used as a skeleton for +the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU +mailutils variants and the file names by `mh-repl-group-formfile' exists, it +is used instead. See also `mh-send'." t nil) @@ -183,7 +185,7 @@ ;;;;;; mh-store-msg mh-undo-folder mh-sort-folder mh-page-digest-backwards ;;;;;; mh-page-digest mh-pipe-msg mh-pack-folder mh-list-folders ;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el" -;;;;;; (16671 48788)) +;;;;;; (17048 47864)) ;;; Generated autoloads from mh-funcs.el (autoload (quote mh-burst-digest) "mh-funcs" "\ @@ -261,7 +263,7 @@ ;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb ;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity ;;;;;; mh-insert-identity mh-identity-list-set mh-identity-make-menu) -;;;;;; "mh-identity" "mh-identity.el" (16671 57010)) +;;;;;; "mh-identity" "mh-identity.el" (17044 63778)) ;;; Generated autoloads from mh-identity.el (autoload (quote mh-identity-make-menu) "mh-identity" "\ @@ -271,43 +273,46 @@ (autoload (quote mh-identity-list-set) "mh-identity" "\ Update the `mh-identity-list' variable, and rebuild the menu. -Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in -customization). This is called after 'customize is used to alter +Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set +in customization). This is called after 'customize is used to alter `mh-identity-list'." nil nil) (autoload (quote mh-insert-identity) "mh-identity" "\ -Insert proper fields for given IDENTITY. -Edit the `mh-identity-list' variable to define identity." t nil) +Insert fields specified by given IDENTITY. +See `mh-identity-list'." t nil) (autoload (quote mh-identity-handler-gpg-identity) "mh-identity" "\ -For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. +Process header FIELD \":pgg-default-user-id\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE when action 'add is selected." nil nil) (autoload (quote mh-identity-handler-signature) "mh-identity" "\ -For FIELD \"signature\", process headers for ACTION 'remove or 'add. -The VALUE is added." nil nil) +Process header FIELD \":signature\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil) (autoload (quote mh-identity-handler-attribution-verb) "mh-identity" "\ -For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. -The VALUE is added." nil nil) +Process header FIELD \":attribution-verb\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil) (autoload (quote mh-identity-insert-attribution-verb) "mh-identity" "\ Insert VALUE as attribution verb, setting up delimiting markers. If VALUE is nil, use `mh-extract-from-attribution-verb'." nil nil) (autoload (quote mh-identity-handler-top) "mh-identity" "\ -For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the top of the header." nil nil) +Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the top of the header." nil nil) (autoload (quote mh-identity-handler-bottom) "mh-identity" "\ -For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the bottom of the header." nil nil) +Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the bottom of the header." nil nil) ;;;*** -;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (16671 -;;;;;; 48848)) +;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (17048 +;;;;;; 44143)) ;;; Generated autoloads from mh-inc.el (autoload (quote mh-inc-spool-list-set) "mh-inc" "\ @@ -326,7 +331,7 @@ ;;;;;; mh-index-parse-search-regexp mh-index-do-search mh-index-p ;;;;;; mh-index-read-data mh-index-search mh-index-create-sequences ;;;;;; mh-create-sequence-map mh-index-update-maps) "mh-index" "mh-index.el" -;;;;;; (16665 53754)) +;;;;;; (17044 64025)) ;;; Generated autoloads from mh-index.el (autoload (quote mh-index-update-maps) "mh-index" "\ @@ -346,43 +351,74 @@ (autoload (quote mh-index-search) "mh-index" "\ Perform an indexed search in an MH mail folder. -Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. +Use a prefix argument to repeat the search. + +Unlike regular searches, the prompt for the folder to search can be `all' to +search all folders; in addition, the search works recursively on the listed +folder. The search criteria are entered in an MH-Pick buffer as described in +`mh-search-folder'. + +To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another +difference from the regular searches is that because the search operates on +more than one folder, the messages that are found are put in a temporary +sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This +buffer is special because it displays messages from multiple folders; each set +of messages from a given folder has a heading with the folder name. + +In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can +be used to visit the folder of the message at point. Initially, only the +messages that matched the search criteria are displayed in the folder. While +the temporary buffer has its own set of message numbers, the actual messages +numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] +command is useful to find the actual message number of an interesting message, +or to view surrounding messages with the \\[mh-rescan-folder] command. + +Because this folder is temporary, you'll probably get in the habit of killing +it when you're done with \\[mh-kill-folder]. -If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a -index search, then the search is repeated. Otherwise, FOLDER is searched with -SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is -\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG -stores the window configuration that will be restored after the user quits the -folder containing the index search results. +If you have run the \\[mh-search-folder] command, but change your mind while +entering the search criteria and actually want to run an indexed search, then +you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the +MH-Pick buffer. + +The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined +by the `mh-index-program' option. The default value is \"Auto-detect\" which +means that MH-E will automatically choose one of \"swish++\", \"swish-e\", +\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, +you have both \"swish++\" and \"mairix\" installed and you want to use +\"mairix\", then you can set this option to \"mairix\". + + *NOTE* -Four indexing programs are supported; if none of these are present, then grep -is used. This function picks the first program that is available on your -system. If you would prefer to use a different program, set the customization -variable `mh-index-program' accordingly. + The \"pick\" and \"grep\" commands do not perform a recursive search on + the given folder. -The documentation for the following functions describes how to generate the -index for each program: +This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 +checksum of a message. This means that if an incoming message already contains +an \"X-MHE-Checksum:\" field, that message might not be found by this command. +The following \"procmail\" recipe avoids this problem by renaming the existing +header field: + + :0 wf + | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" + +The documentation for the following commands describe how to set up the +various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands +do not require additional configuration. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - -If none of these programs are present then we use pick. If desired grep can be -used instead. Details about these methods can be found in: - - `mh-pick-execute-search' - `mh-grep-execute-search' -This and related functions use an X-MHE-Checksum header to cache the MD5 -checksum of a message. This means that already present X-MHE-Checksum headers -in the incoming email could result in messages not being found. The following -procmail recipe should avoid this: - - :0 wf - | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\" - -This has the effect of renaming already present X-MHE-Checksum headers." t nil) +In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was +generated by a index search, then the search is repeated. Otherwise, FOLDER is +searched with SEARCH-REGEXP and the results are presented in an MH-E folder. +If FOLDER is \"+\" then mail in all folders are searched. Optional argument +WINDOW-CONFIG stores the window configuration that will be restored after the +user quits the folder containing the index search results." t nil) (autoload (quote mh-index-read-data) "mh-index" "\ Read index data from file." nil nil) @@ -463,114 +499,109 @@ (autoload (quote mh-swish-execute-search) "mh-index" "\ Execute swish-e and read the results. -In the examples below, replace /home/user/Mail with the path to your MH -directory. +In the examples below, replace \"/home/user/Mail\" with the path to your +MH directory. -First create the directory /home/user/Mail/.swish. Then create the file -/home/user/Mail/.swish/config with the following contents: +First create the directory \"/home/user/Mail/.swish\". Then create the file +\"/home/user/Mail/.swish/config\" with the following contents: - IndexDir /home/user/Mail - IndexFile /home/user/Mail/.swish/index - IndexName \"Mail Index\" - IndexDescription \"Mail Index\" - IndexPointer \"http://nowhere\" - IndexAdmin \"nobody\" - #MetaNames automatic - IndexReport 3 - FollowSymLinks no - UseStemming no - IgnoreTotalWordCountWhenRanking yes - WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- - BeginCharacters abcdefghijklmnopqrstuvwxyz - EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 - IgnoreLimit 50 1000 - IndexComments 0 - FileRules pathname contains /home/user/Mail/.swish - FileRules pathname contains /home/user/Mail/mhe-index - FileRules filename is index - FileRules filename is \\..* - FileRules filename is #.* - FileRules filename is ,.* - FileRules filename is .*~ + DefaultContents TXT* + IndexDir /home/user/Mail + IndexFile /home/user/Mail/.swish/index + IndexName \"Mail Index\" + IndexDescription \"Mail Index\" + IndexPointer \"http://nowhere\" + IndexAdmin \"nobody\" + #MetaNames automatic + IndexReport 3 + FollowSymLinks no + UseStemming no + IgnoreTotalWordCountWhenRanking yes + WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- + BeginCharacters abcdefghijklmnopqrstuvwxyz + EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 + IgnoreLimit 50 1000 + IndexComments 0 + FileRules filename contains \\D + FileRules pathname contains /home/user/Mail/.swish + FileRules pathname contains /home/user/Mail/mhe-index + +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. If there are any directories you would like to ignore, append lines like the -following to config: +following to \"config\": - FileRules pathname contains /home/user/Mail/scripts + FileRules pathname contains /home/user/Mail/scripts -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the swish index. Run this daily +from cron: -Use the following command line to generate the swish index. Run this -daily from cron: + swish-e -c /home/user/Mail/.swish/config - swish-e -c /home/user/Mail/.swish/config - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-swish++-execute-search) "mh-index" "\ Execute swish++ and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.swish++. Then create the file -/home/user/Mail/.swish++/swish++.conf with the following contents: +First create the directory \"/home/user/Mail/.swish++\". Then create the file +\"/home/user/Mail/.swish++/swish++.conf\" with the following contents: - IncludeMeta Bcc Cc Comments Content-Description From Keywords - IncludeMeta Newsgroups Resent-To Subject To - IncludeMeta Message-Id References In-Reply-To - IncludeFile Mail * - IndexFile /home/user/Mail/.swish++/swish++.index + IncludeMeta Bcc Cc Comments Content-Description From Keywords + IncludeMeta Newsgroups Resent-To Subject To + IncludeMeta Message-Id References In-Reply-To + IncludeFile Mail * + IndexFile /home/user/Mail/.swish++/swish++.index -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ - -o -path /home/user/Mail/.swish++ -prune \\ - -o -name \"[0-9]*\" -print \\ - | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail + find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ + -o -path /home/user/Mail/.swish++ -prune \\ + -o -name \"[0-9]*\" -print \\ + | index -c /home/user/Mail/.swish++/swish++.conf - -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The command above assumes that the results are found in sub-folders of -`mh-index-folder' which is +mhe-index by default. +This command does not index the folders that hold the results of your searches +in \"+mhe-index\" since they tend to be ephemeral and the original messages +are indexed anyway. -On some systems (Debian GNU/Linux, for example), use index++ instead of index. +On some systems (Debian GNU/Linux, for example), use \"index++\" instead of +\"index\". -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-namazu-execute-search) "mh-index" "\ Execute namazu and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.namazu. Then create the file -/home/user/Mail/.namazu/mknmzrc with the following contents: +First create the directory \"/home/user/Mail/.namazu\". Then create the file +\"/home/user/Mail/.namazu/mknmzrc\" with the following contents: - package conf; # Don't remove this line! - $ADDRESS = 'user@localhost'; - $ALLOW_FILE = \"[0-9]*\"; - $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; - -In the above example configuration, none of the mail files contained in the -directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. + package conf; # Don't remove this line! + $ADDRESS = 'user@localhost'; + $ALLOW_FILE = \"[0-9]*\"; + $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. -Use the following command line to generate the namazu index. Run this -daily from cron: +Use the following command line to generate the namazu index. Run this daily +from cron: - mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ - /home/user/Mail + mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ + /home/user/Mail -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-index-choose) "mh-index" "\ Choose an indexing function. @@ -582,7 +613,7 @@ ;;;*** ;;;### (autoloads (mh-variants mh-variant-p mh-variant-set) "mh-init" -;;;;;; "mh-init.el" (16684 6777)) +;;;;;; "mh-init.el" (17044 64253)) ;;; Generated autoloads from mh-init.el (autoload (quote mh-variant-set) "mh-init" "\ @@ -604,7 +635,7 @@ ;;;*** ;;;### (autoloads (mh-junk-whitelist mh-junk-blacklist) "mh-junk" -;;;;;; "mh-junk.el" (16671 48929)) +;;;;;; "mh-junk.el" (17044 64253)) ;;; Generated autoloads from mh-junk.el (autoload (quote mh-junk-blacklist) "mh-junk" "\ @@ -644,7 +675,7 @@ ;;;;;; mh-mhn-compose-external-compressed-tar mh-mhn-compose-anon-ftp ;;;;;; mh-mhn-compose-insertion mh-file-mime-type mh-have-file-command ;;;;;; mh-compose-forward mh-compose-insertion) "mh-mime" "mh-mime.el" -;;;;;; (16684 7323)) +;;;;;; (17048 47895)) ;;; Generated autoloads from mh-mime.el (autoload (quote mh-compose-insertion) "mh-mime" "\ @@ -857,15 +888,79 @@ ;;;*** ;;;### (autoloads (mh-do-search mh-pick-do-search mh-search-folder) -;;;;;; "mh-pick" "mh-pick.el" (16671 49140)) +;;;;;; "mh-pick" "mh-pick.el" (17048 47905)) ;;; Generated autoloads from mh-pick.el (autoload (quote mh-search-folder) "mh-pick" "\ Search FOLDER for messages matching a pattern. -This function uses the MH command `pick' to do the work. -Add the messages found to the sequence named `search'. -Argument WINDOW-CONFIG is the current window configuration and is used when -the search folder is dismissed." t nil) + +With this command, you can search a folder for messages to or from a +particular person or about a particular subject. In fact, you can also search +for messages containing selected strings in any arbitrary header field or any +string found within the messages. + +You are first prompted for the name of the folder to search and then placed in +the following buffer in MH-Pick mode: + + From: + To: + Cc: + Date: + Subject: + -------- + +Edit this template by entering your search criteria in an appropriate header +field that is already there, or create a new field yourself. If the string +you're looking for could be anywhere in a message, then place the string +underneath the row of dashes. The \\[mh-search-folder] command uses the MH +command \"pick\" to do the real work. + +There are no semantics associated with the search criteria--they are simply +treated as strings. Case is ignored when all lowercase is used, and regular +expressions (a la \"ed\") are available. It is all right to specify several +search criteria. What happens then is that a logical _and_ of the various +fields is performed. If you prefer a logical _or_ operation, run +\\[mh-search-folder] multiple times. + +As an example, let's say that we want to find messages from Ginnean about +horseback riding in the Kosciusko National Park (Australia) during January, +1994. Normally we would start with a broad search and narrow it down if +necessary to produce a manageable amount of data, but we'll cut to the chase +and create a fairly restrictive set of criteria as follows: + + From: ginnean + To: + Cc: + Date: Jan 1994 + Subject: horse.*kosciusko + -------- + +As with MH-Letter mode, MH-Pick provides commands like +\\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks. + +To perform the search, type \\[mh-do-search]. The selected messages are placed +in the \"search\" sequence, which you can use later in forwarding, printing, +or narrowing your field of view. Subsequent searches are appended to the +\"search\" sequence. If, however, you wish to start with a clean slate, first +delete the \"search\" sequence. + +If you're searching in a folder that is already displayed in an MH-Folder +buffer, only those messages contained in the buffer are used for the search. +Therefore, if you want to search in all messages, first kill the folder's +buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder +with \\[mh-rescan-folder]. + +If you find that you do the same thing over and over when editing the search +template, you may wish to bind some shortcuts to keys. This can be done with +the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is +run on a new pattern. + +If you have run the \\[mh-index-search] command, but change your mind while +entering the search criteria and actually want to run a regular search, then +you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command. + +In a program, argument WINDOW-CONFIG is the current window configuration and +is used when the search folder is dismissed." t nil) (autoload (quote mh-pick-do-search) "mh-pick" "\ Find messages that match the qualifications in the current pattern buffer. @@ -882,7 +977,7 @@ ;;;### (autoloads (mh-print-msg mh-ps-print-toggle-mime mh-ps-print-toggle-color ;;;;;; mh-ps-print-toggle-faces mh-ps-print-msg-show mh-ps-print-msg-file -;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (16680 11171)) +;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (17044 64253)) ;;; Generated autoloads from mh-print.el (autoload (quote mh-ps-print-msg) "mh-print" "\ @@ -935,7 +1030,7 @@ ;;;;;; mh-rename-seq mh-translate-range mh-read-range mh-read-seq-default ;;;;;; mh-notate-deleted-and-refiled mh-widen mh-put-msg-in-seq ;;;;;; mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences mh-delete-seq) -;;;;;; "mh-seq" "mh-seq.el" (16671 65286)) +;;;;;; "mh-seq" "mh-seq.el" (17048 47921)) ;;; Generated autoloads from mh-seq.el (autoload (quote mh-delete-seq) "mh-seq" "\ @@ -1157,7 +1252,7 @@ ;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists ;;;;;; mh-speed-view mh-speed-toggle mh-folder-speedbar-buttons) -;;;;;; "mh-speed" "mh-speed.el" (16665 53793)) +;;;;;; "mh-speed" "mh-speed.el" (17044 64253)) ;;; Generated autoloads from mh-speed.el (autoload (quote mh-folder-speedbar-buttons) "mh-speed" "\ @@ -1196,7 +1291,7 @@ ;;;;;; mh-alias-grab-from-field mh-alias-add-alias mh-alias-for-from-p ;;;;;; mh-alias-address-to-alias mh-alias-letter-expand-alias mh-alias-minibuffer-confirm-address ;;;;;; mh-read-address mh-alias-reload-maybe mh-alias-reload) "mh-alias" -;;;;;; "mh-alias.el" (16671 49382)) +;;;;;; "mh-alias.el" (17048 47789)) ;;; Generated autoloads from mh-alias.el (autoload (quote mh-alias-reload) "mh-alias" "\
--- a/lisp/mh-e/mh-mime.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-mime.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-mime.el --- MH-E support for composing MIME messages -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -1325,6 +1326,18 @@ (point-max))) (forward-line -1))))) +(defun mh-mime-security-button-face (info) + "Return the button face to use for encrypted/signed mail based on INFO." + (cond ((string-match "OK" info) ;Decrypted mail + mh-show-pgg-good-face) + ((string-match "Failed" info) ;Decryption failed or signature invalid + mh-show-pgg-bad-face) + ((string-match "Undecided" info);Unprocessed mail + mh-show-pgg-unknown-face) + ((string-match "Untrusted" info);Key not trusted + mh-show-pgg-unknown-face) + (t mh-show-pgg-good-face))) + (defun mh-mime-security-press-button (handle) "Callback from security button for part HANDLE." (if (mm-handle-multipart-ctl-parameter handle 'gnus-info) @@ -1364,9 +1377,10 @@ (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info) "Undecided")) (details (mm-handle-multipart-ctl-parameter handle 'gnus-details)) - pressed-details begin end) + pressed-details begin end face) (setq details (if details (concat "\n" details) "")) (setq pressed-details (if mh-mime-security-button-pressed details "")) + (setq face (mh-mime-security-button-face info)) (unless (bolp) (insert "\n")) (setq begin (point)) (gnus-eval-format @@ -1382,6 +1396,7 @@ :mime-handle handle :action 'mh-widget-press-button :button-keymap mh-mime-security-button-map + :button-face face :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.") (dolist (ov (mh-funcall-if-exists overlays-in begin end)) (mh-funcall-if-exists overlay-put ov 'evaporate t))
--- a/lisp/mh-e/mh-pick.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-pick.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-pick.el --- make a search pattern and search for a message in MH-E -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -52,10 +53,74 @@ ;;;###mh-autoload (defun mh-search-folder (folder window-config) "Search FOLDER for messages matching a pattern. -This function uses the MH command `pick' to do the work. -Add the messages found to the sequence named `search'. -Argument WINDOW-CONFIG is the current window configuration and is used when -the search folder is dismissed." + +With this command, you can search a folder for messages to or from a +particular person or about a particular subject. In fact, you can also search +for messages containing selected strings in any arbitrary header field or any +string found within the messages. + +You are first prompted for the name of the folder to search and then placed in +the following buffer in MH-Pick mode: + + From: + To: + Cc: + Date: + Subject: + -------- + +Edit this template by entering your search criteria in an appropriate header +field that is already there, or create a new field yourself. If the string +you're looking for could be anywhere in a message, then place the string +underneath the row of dashes. The \\[mh-search-folder] command uses the MH +command \"pick\" to do the real work. + +There are no semantics associated with the search criteria--they are simply +treated as strings. Case is ignored when all lowercase is used, and regular +expressions (a la \"ed\") are available. It is all right to specify several +search criteria. What happens then is that a logical _and_ of the various +fields is performed. If you prefer a logical _or_ operation, run +\\[mh-search-folder] multiple times. + +As an example, let's say that we want to find messages from Ginnean about +horseback riding in the Kosciusko National Park (Australia) during January, +1994. Normally we would start with a broad search and narrow it down if +necessary to produce a manageable amount of data, but we'll cut to the chase +and create a fairly restrictive set of criteria as follows: + + From: ginnean + To: + Cc: + Date: Jan 1994 + Subject: horse.*kosciusko + -------- + +As with MH-Letter mode, MH-Pick provides commands like +\\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks. + +To perform the search, type \\[mh-do-search]. The selected messages are placed +in the \"search\" sequence, which you can use later in forwarding, printing, +or narrowing your field of view. Subsequent searches are appended to the +\"search\" sequence. If, however, you wish to start with a clean slate, first +delete the \"search\" sequence. + +If you're searching in a folder that is already displayed in an MH-Folder +buffer, only those messages contained in the buffer are used for the search. +Therefore, if you want to search in all messages, first kill the folder's +buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder +with \\[mh-rescan-folder]. + +If you find that you do the same thing over and over when editing the search +template, you may wish to bind some shortcuts to keys. This can be done with +the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is +run on a new pattern. + +If you have run the \\[mh-index-search] command, but change your mind while +entering the search criteria and actually want to run a regular search, then +you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command. + +In a program, argument WINDOW-CONFIG is the current window configuration and +is used when the search folder is dismissed." (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t) (current-window-configuration))) (let ((pick-folder (if (equal folder "+") mh-current-folder folder))) @@ -140,8 +205,7 @@ (make-local-variable 'mh-searching-function) (make-local-variable 'mh-help-messages) (easy-menu-add mh-pick-menu) - (setq mh-help-messages mh-pick-mode-help-messages) - (run-hooks 'mh-pick-mode-hook)) + (setq mh-help-messages mh-pick-mode-help-messages)) ;;;###mh-autoload (defun mh-pick-do-search ()
--- a/lisp/mh-e/mh-print.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-print.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-print.el --- MH-E printing support -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Jeffrey C Honig <jch@honig.net> ;; Maintainer: Bill Wohler <wohler@newt.com>
--- a/lisp/mh-e/mh-seq.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-seq.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-seq.el --- MH-E sequences support -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -195,7 +196,7 @@ (insert "\n")) (setq seq-list (cdr seq-list))) (goto-char (point-min)) - (view-mode 1) + (view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing sequences...done"))))) @@ -788,10 +789,33 @@ If no prefix arg is given, then return DEFAULT." (let ((default-string (loop for x in default concat (format " %s" x)))) (if (or current-prefix-arg (equal default-string "")) - (delete "" (split-string (read-string "Pick expression: " - default-string))) + (mh-pick-args-list (read-string "Pick expression: " + default-string)) default))) +(defun mh-pick-args-list (s) + "Form list by grouping elements in string S suitable for pick arguments. +For example, the string \"-subject a b c -from Joe User <user@domain.com>\" +is converted to (\"-subject\" \"a b c\" \"-from\" +\"Joe User <user@domain.com>\"" + (let ((full-list (split-string s)) + current-arg collection arg-list) + (while full-list + (setq current-arg (car full-list)) + (if (null (string-match "^-" current-arg)) + (setq collection + (if (null collection) + current-arg + (format "%s %s" collection current-arg))) + (when collection + (setq arg-list (append arg-list (list collection))) + (setq collection nil)) + (setq arg-list (append arg-list (list current-arg)))) + (setq full-list (cdr full-list))) + (when collection + (setq arg-list (append arg-list (list collection)))) + arg-list)) + ;;;###mh-autoload (defun mh-narrow-to-subject (&optional pick-expr) "Limit to messages with same subject. @@ -1315,6 +1339,7 @@ (old-buffer-modified-flag (buffer-modified-p))) (delete-region (point-min) (point-max)) (mh-thread-print-scan-lines thread-tree) + (mh-notate-user-sequences) (mh-notate-deleted-and-refiled) (mh-notate-cur) (set-buffer-modified-p old-buffer-modified-flag))))
--- a/lisp/mh-e/mh-speed.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-speed.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; mh-speed.el --- Speedbar interface for MH-E. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das <satyaki@theforce.stanford.edu> ;; Maintainer: Bill Wohler <wohler@newt.com>
--- a/lisp/mh-e/mh-utils.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/mh-e/mh-utils.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,7 @@ ;;; mh-utils.el --- MH-E code needed for both sending and reading -;; Copyright (C) 1993, 95, 1997, 2000, 01, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler <wohler@newt.com> ;; Maintainer: Bill Wohler <wohler@newt.com> @@ -703,8 +704,8 @@ (save-excursion (beginning-of-line) (cond ((looking-at mh-scan-msg-number-regexp) - (string-to-int (buffer-substring (match-beginning 1) - (match-end 1)))) + (string-to-number (buffer-substring (match-beginning 1) + (match-end 1)))) (error-if-no-message (error "Cursor not pointing to message")) (t nil)))) @@ -1129,8 +1130,7 @@ (make-local-variable 'mh-show-folder-buffer) (buffer-disable-undo) (setq buffer-read-only t) - (use-local-map mh-show-mode-map) - (run-hooks 'mh-show-mode-hook)) + (use-local-map mh-show-mode-map)) (defun mh-show-addr () "Use `goto-address'." @@ -1673,7 +1673,8 @@ "Decode >From at beginning of lines for `mh-show-mode'." (save-excursion (let ((modified (buffer-modified-p)) - (case-fold-search nil)) + (case-fold-search nil) + (buffer-read-only nil)) (goto-char (mh-mail-header-end)) (while (re-search-forward "^>From" nil t) (replace-match "From"))
--- a/lisp/net/eudc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/net/eudc.el Mon Jun 06 02:39:45 2005 +0000 @@ -670,8 +670,7 @@ (if eudc-emacs-p (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu)) (setq mode-popup-menu (eudc-menu))) - (run-hooks 'eudc-mode-hook) - ) + (run-mode-hooks 'eudc-mode-hook)) ;;}}}
--- a/lisp/net/quickurl.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/net/quickurl.el Mon Jun 06 02:39:45 2005 +0000 @@ -458,7 +458,7 @@ (use-local-map quickurl-list-mode-map) (setq major-mode 'quickurl-list-mode mode-name "quickurl list") - (run-hooks 'quickurl-list-mode-hook) + (run-mode-hooks 'quickurl-list-mode-hook) (setq buffer-read-only t truncate-lines t))
--- a/lisp/net/snmp-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/net/snmp-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -393,8 +393,7 @@ (setq snmp-mode-status-list snmp-rfc1212-status) ;; Run hooks - (run-hooks 'snmp-common-mode-hook) - (run-hooks 'snmp-mode-hook)) + (run-mode-hooks 'snmp-common-mode-hook 'snmp-mode-hook)) ;;;###autoload @@ -429,8 +428,7 @@ (setq snmp-mode-status-list snmp-rfc1902-status) ;; Run hooks - (run-hooks 'snmp-common-mode-hook) - (run-hooks 'snmpv2-mode-hook)) + (run-mode-hooks 'snmp-common-mode-hook 'snmpv2-mode-hook)) ;;;----------------------------------------------------------------------------
--- a/lisp/obsolete/ooutline.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/obsolete/ooutline.el Mon Jun 06 02:39:45 2005 +0000 @@ -224,7 +224,7 @@ (setq font-lock-defaults '(outline-font-lock-keywords t)) (make-local-variable 'change-major-mode-hook) (add-hook 'change-major-mode-hook 'show-all) - (run-hooks 'text-mode-hook 'outline-mode-hook)) + (run-mode-hooks 'text-mode-hook 'outline-mode-hook)) (defcustom outline-minor-mode-prefix "\C-c@" "*Prefix key to use for Outline commands in Outline minor mode.
--- a/lisp/obsolete/options.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/obsolete/options.el Mon Jun 06 02:39:45 2005 +0000 @@ -109,7 +109,7 @@ (setq truncate-lines t) (setq major-mode 'Edit-options-mode) (setq mode-name "Options") - (run-hooks 'Edit-options-mode-hook)) + (run-mode-hooks 'Edit-options-mode-hook)) (defun Edit-options-set () (interactive) (Edit-options-modify
--- a/lisp/obsolete/rnews.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/obsolete/rnews.el Mon Jun 06 02:39:45 2005 +0000 @@ -375,7 +375,7 @@ (set-syntax-table text-mode-syntax-table) (use-local-map news-mode-map) (setq local-abbrev-table text-mode-abbrev-table) - (run-hooks 'news-mode-hook)) + (run-mode-hooks 'news-mode-hook)) (defun string-subst-char (new old string) (let (index)
--- a/lisp/obsolete/rnewspost.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/obsolete/rnewspost.el Mon Jun 06 02:39:45 2005 +0000 @@ -130,7 +130,7 @@ (setq mode-name "News Reply") (make-local-variable 'paragraph-separate) (make-local-variable 'paragraph-start) - (run-hooks 'text-mode-hook 'news-reply-mode-hook)) + (run-mode-hooks 'text-mode-hook 'news-reply-mode-hook)) (defvar news-reply-yank-from "" "Save `From:' field for `news-reply-yank-original'.")
--- a/lisp/outline.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/outline.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004 +;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -167,14 +167,45 @@ 0 '(outline-font-lock-face) nil t))) "Additional expressions to highlight in Outline mode.") -(defface outline-1 '((t :inherit font-lock-function-name-face)) "Level 1.") -(defface outline-2 '((t :inherit font-lock-variable-name-face)) "Level 2.") -(defface outline-3 '((t :inherit font-lock-keyword-face)) "Level 3.") -(defface outline-4 '((t :inherit font-lock-builtin-face)) "Level 4.") -(defface outline-5 '((t :inherit font-lock-comment-face)) "Level 5.") -(defface outline-6 '((t :inherit font-lock-constant-face)) "Level 6.") -(defface outline-7 '((t :inherit font-lock-type-face)) "Level 7.") -(defface outline-8 '((t :inherit font-lock-string-face)) "Level 8.") +(defface outline-1 + '((t :inherit font-lock-function-name-face)) + "Level 1." + :group 'outlines) + +(defface outline-2 + '((t :inherit font-lock-variable-name-face)) + "Level 2." + :group 'outlines) + +(defface outline-3 + '((t :inherit font-lock-keyword-face)) + "Level 3." + :group 'outlines) + +(defface outline-4 + '((t :inherit font-lock-builtin-face)) + "Level 4." + :group 'outlines) + +(defface outline-5 + '((t :inherit font-lock-comment-face)) + "Level 5." + :group 'outlines) + +(defface outline-6 + '((t :inherit font-lock-constant-face)) + "Level 6." + :group 'outlines) + +(defface outline-7 + '((t :inherit font-lock-type-face)) + "Level 7." + :group 'outlines) + +(defface outline-8 + '((t :inherit font-lock-string-face)) + "Level 8." + :group 'outlines) (defvar outline-font-lock-faces [outline-1 outline-2 outline-3 outline-4
--- a/lisp/play/5x5.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/5x5.el Mon Jun 06 02:39:45 2005 +0000 @@ -178,10 +178,10 @@ (use-local-map 5x5-mode-map) (setq major-mode '5x5-mode mode-name "5x5") - (run-hooks '5x5-mode-hook) + (run-mode-hooks '5x5-mode-hook) (setq buffer-read-only t truncate-lines t) - (buffer-disable-undo (current-buffer))) + (buffer-disable-undo)) ;;;###autoload (defun 5x5 (&optional size)
--- a/lisp/play/decipher.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/decipher.el Mon Jun 06 02:39:45 2005 +0000 @@ -314,7 +314,7 @@ (lambda () (setq buffer-read-only nil buffer-undo-list nil)) nil t) - (run-hooks 'decipher-mode-hook) + (run-mode-hooks 'decipher-mode-hook) (setq buffer-read-only t)) (put 'decipher-mode 'mode-class 'special) @@ -998,7 +998,7 @@ major-mode 'decipher-stats-mode mode-name "Decipher-Stats") (use-local-map decipher-stats-mode-map) - (run-hooks 'decipher-stats-mode-hook)) + (run-mode-hooks 'decipher-stats-mode-hook)) (put 'decipher-stats-mode 'mode-class 'special) ;;--------------------------------------------------------------------
--- a/lisp/play/gomoku.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/gomoku.el Mon Jun 06 02:39:45 2005 +0000 @@ -206,7 +206,7 @@ (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(gomoku-font-lock-keywords t)) (toggle-read-only t) - (run-hooks 'gomoku-mode-hook)) + (run-mode-hooks 'gomoku-mode-hook)) ;;; ;;; THE BOARD.
--- a/lisp/play/landmark.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/landmark.el Mon Jun 06 02:39:45 2005 +0000 @@ -248,6 +248,7 @@ Entry to this mode calls the value of `lm-mode-hook' if that value is non-nil. One interesting value is `turn-on-font-lock'." (interactive) + (kill-all-local-variables) (setq major-mode 'lm-mode mode-name "Lm") (lm-display-statistics) @@ -255,7 +256,7 @@ (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(lm-font-lock-keywords t)) (toggle-read-only t) - (run-hooks 'lm-mode-hook)) + (run-mode-hooks 'lm-mode-hook)) ;;;_ + THE SCORE TABLE.
--- a/lisp/play/mpuz.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/mpuz.el Mon Jun 06 02:39:45 2005 +0000 @@ -129,11 +129,12 @@ Then you may resume the game with M-x mpuz. You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." (interactive) + (kill-all-local-variables) (setq major-mode 'mpuz-mode mode-name "Mult Puzzle" tab-width 30) (use-local-map mpuz-mode-map) - (run-hooks 'mpuz-mode-hook)) + (run-mode-hooks 'mpuz-mode-hook)) ;; Some variables for statistics
--- a/lisp/play/snake.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/snake.el Mon Jun 06 02:39:45 2005 +0000 @@ -385,7 +385,7 @@ (gamegrid-init (snake-display-options)) - (run-hooks 'snake-mode-hook)) + (run-mode-hooks 'snake-mode-hook)) ;;;###autoload (defun snake ()
--- a/lisp/play/solitaire.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/solitaire.el Mon Jun 06 02:39:45 2005 +0000 @@ -105,7 +105,7 @@ (setq truncate-lines t) (setq major-mode 'solitaire-mode) (setq mode-name "Solitaire") - (run-hooks 'solitaire-mode-hook)) + (run-mode-hooks 'solitaire-mode-hook)) (defvar solitaire-stones 0 "Counter for the stones that are still there.")
--- a/lisp/play/tetris.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/play/tetris.el Mon Jun 06 02:39:45 2005 +0000 @@ -616,7 +616,7 @@ (gamegrid-init (tetris-display-options)) - (run-hooks 'tetris-mode-hook)) + (run-mode-hooks 'tetris-mode-hook)) ;;;###autoload (defun tetris ()
--- a/lisp/printing.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/printing.el Mon Jun 06 02:39:45 2005 +0000 @@ -5466,7 +5466,7 @@ (str (pr-f-read-string (format fmt-prompt prompt mess) "1" nil "1")) int) (while (if (string-match "^\\s *[0-9]+$" str) - (setq int (string-to-int str) + (setq int (string-to-number str) prompt (cond ((< int 1) "Integer below 1; ") ((> int 100) "Integer above 100; ") (t nil)))
--- a/lisp/progmodes/ada-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/ada-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -1369,7 +1369,7 @@ (min ada-indent (current-column)))))) (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t) - (run-hooks 'ada-mode-hook) + (run-mode-hooks 'ada-mode-hook) ;; To be run after the hook, in case the user modified ;; ada-fill-comment-prefix
--- a/lisp/progmodes/antlr-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/antlr-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -2624,7 +2624,7 @@ (imenu-add-to-menubar (if (stringp antlr-imenu-name) antlr-imenu-name "Index"))) (antlr-set-tabs) - (run-hooks 'antlr-mode-hook)) + (run-mode-hooks 'antlr-mode-hook)) ;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in ;; XEmacs) could use the following property. The header of the submenu would
--- a/lisp/progmodes/autoconf.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/autoconf.el Mon Jun 06 02:39:45 2005 +0000 @@ -103,7 +103,7 @@ (set (make-local-variable 'indent-line-function) #'indent-relative) (set (make-local-variable 'add-log-current-defun-function) #'autoconf-current-defun-function) - (run-hooks 'autoconf-mode-hook)) + (run-mode-hooks 'autoconf-mode-hook)) (provide 'autoconf-mode)
--- a/lisp/progmodes/compile.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/compile.el Mon Jun 06 02:39:45 2005 +0000 @@ -231,9 +231,9 @@ (makepp "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ -`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)" +`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)" 4 5 nil (1 . 2) 3 - ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil + ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil (2 compilation-info-face) (3 compilation-line-face nil t) (1 (compilation-error-properties 2 3 nil nil nil 0 nil) @@ -935,12 +935,20 @@ (substitute-env-vars (match-string 1 command)) "~") default-directory)) + ;; Select the desired mode. + (if (not (eq mode t)) + (funcall mode) + (setq buffer-read-only nil) + (with-no-warnings (comint-mode)) + (compilation-shell-minor-mode)) + (if highlight-regexp + (set (make-local-variable 'compilation-highlight-regexp) + highlight-regexp)) (erase-buffer) - ;; output a mode setter, for saving and later reloading this buffer + ;; Output a mode setter, for saving and later reloading this buffer. (insert "-*- mode: " name-of-mode "; default-directory: " (prin1-to-string default-directory) - " -*-\n" command "\n") - (setq thisdir default-directory)) + " -*-\n" command "\n") (setq thisdir default-directory)) (set-buffer-modified-p nil)) ;; If we're already in the compilation buffer, go to the end ;; of the buffer, so point will track the compilation output. @@ -963,14 +971,6 @@ ;; don't override users' setting of $EMACS. (unless (getenv "EMACS") '("EMACS=t")) (copy-sequence process-environment)))) - (if (not (eq mode t)) - (funcall mode) - (setq buffer-read-only nil) - (with-no-warnings (comint-mode)) - (compilation-shell-minor-mode)) - (if highlight-regexp - (set (make-local-variable 'compilation-highlight-regexp) - highlight-regexp)) (set (make-local-variable 'compilation-arguments) (list command mode name-function highlight-regexp)) (set (make-local-variable 'revert-buffer-function)
--- a/lisp/progmodes/dcl-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/dcl-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -641,7 +641,7 @@ (setq mode-name "DCL") (use-local-map dcl-mode-map) (tempo-use-tag-list 'dcl-tempo-tags) - (run-hooks 'dcl-mode-hook)) + (run-mode-hooks 'dcl-mode-hook)) ;;; *** Movement commands ***************************************************
--- a/lisp/progmodes/delphi.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/delphi.el Mon Jun 06 02:39:45 2005 +0000 @@ -2002,7 +2002,7 @@ (delphi-parse-region (point-min) (point-max)) (delphi-progress-done)))) - (run-hooks 'delphi-mode-hook)) + (run-mode-hooks 'delphi-mode-hook)) ;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 ;;; delphi.el ends here
--- a/lisp/progmodes/ebrowse.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/ebrowse.el Mon Jun 06 02:39:45 2005 +0000 @@ -1162,7 +1162,7 @@ (when tree (ebrowse-redraw-tree) (set-buffer-modified-p nil)) - (run-hooks 'ebrowse-tree-mode-hook))) + (run-mode-hooks 'ebrowse-tree-mode-hook))) @@ -2026,7 +2026,7 @@ truncate-lines t buffer-read-only t major-mode 'ebrowse-electric-list-mode) - (run-hooks 'ebrowse-electric-list-mode-hook)) + (run-mode-hooks 'ebrowse-electric-list-mode-hook)) (defun ebrowse-list-tree-buffers () @@ -2277,7 +2277,7 @@ ebrowse--const-display-flag nil ebrowse--pure-display-flag nil) (modify-syntax-entry ?_ (char-to-string (char-syntax ?a))) - (run-hooks 'ebrowse-member-mode-hook)) + (run-mode-hooks 'ebrowse-member-mode-hook)) @@ -3987,7 +3987,7 @@ truncate-lines t buffer-read-only t major-mode 'ebrowse-electric-position-mode) - (run-hooks 'ebrowse-electric-position-mode-hook)) + (run-mode-hooks 'ebrowse-electric-position-mode-hook)) (defun ebrowse-draw-position-buffer ()
--- a/lisp/progmodes/f90.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/f90.el Mon Jun 06 02:39:45 2005 +0000 @@ -830,7 +830,7 @@ (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram) (set (make-local-variable 'add-log-current-defun-function) #'f90-current-defun) - (run-hooks 'f90-mode-hook)) + (run-mode-hooks 'f90-mode-hook)) ;; Inline-functions.
--- a/lisp/progmodes/fortran.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/fortran.el Mon Jun 06 02:39:45 2005 +0000 @@ -799,7 +799,7 @@ #'fortran-current-defun) (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) - (run-hooks 'fortran-mode-hook)) + (run-mode-hooks 'fortran-mode-hook)) (defun fortran-gud-find-expr ()
--- a/lisp/progmodes/gdb-ui.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/gdb-ui.el Mon Jun 06 02:39:45 2005 +0000 @@ -66,15 +66,16 @@ (require 'gud) -(defvar gdb-current-address "main" "Initialisation for Assembler buffer.") -(defvar gdb-previous-address nil) +(defvar gdb-frame-address "main" "Initialisation for Assembler buffer.") +(defvar gdb-previous-frame-address nil) (defvar gdb-memory-address "main") (defvar gdb-previous-frame nil) -(defvar gdb-current-frame nil) -(defvar gdb-current-stack-level nil) +(defvar gdb-selected-frame nil) +(defvar gdb-frame-number nil) (defvar gdb-current-language nil) (defvar gdb-var-list nil "List of variables in watch window.") (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") +(defvar gdb-main-file nil "Source file from which program execution begins.") (defvar gdb-buffer-type nil) (defvar gdb-overlay-arrow-position nil) (defvar gdb-server-prefix nil) @@ -211,11 +212,18 @@ :version "22.1") (defcustom gdb-cpp-define-alist-flags "" - "*Preprocessor flags for `gdb-cpp-define-alist-program'." + "Preprocessor flags for `gdb-cpp-define-alist-program'." :type 'string :group 'gud :version "22.1") +(defcustom gdb-show-main nil + "Non-nil means display source file containing the main routine at startup. +Also display the main routine in the disassembly buffer if present." + :type 'boolean + :group 'gud + :version "22.1") + (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") (defun gdb-create-define-alist () @@ -269,7 +277,7 @@ (defun gdb-set-gud-minor-mode-1 (buffer) (goto-char (point-min)) (when (and (search-forward "Located in " nil t) - (looking-at "\\S-*") + (looking-at "\\S-+") (string-equal (buffer-file-name buffer) (match-string 0))) (with-current-buffer buffer @@ -295,7 +303,7 @@ (set (make-local-variable 'gud-minor-mode) 'gdba) (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) ;; - (gud-def gud-break (if (not (string-equal mode-name "Machine")) + (gud-def gud-break (if (not (string-match "Machine" mode-name)) (gud-call "break %f:%l" arg) (save-excursion (beginning-of-line) @@ -303,7 +311,7 @@ (gud-call "break *%a" arg))) "\C-b" "Set breakpoint at current line or address.") ;; - (gud-def gud-remove (if (not (string-equal mode-name "Machine")) + (gud-def gud-remove (if (not (string-match "Machine" mode-name)) (gud-call "clear %f:%l" arg) (save-excursion (beginning-of-line) @@ -311,7 +319,7 @@ (gud-call "clear *%a" arg))) "\C-d" "Remove breakpoint at current line or address.") ;; - (gud-def gud-until (if (not (string-equal mode-name "Machine")) + (gud-def gud-until (if (not (string-match "Machine" mode-name)) (gud-call "until %f:%l" arg) (save-excursion (beginning-of-line) @@ -332,25 +340,26 @@ (setq comint-input-sender 'gdb-send) ;; ;; (re-)initialize - (setq gdb-current-address "main") - (setq gdb-previous-address nil) - (setq gdb-memory-address "main") - (setq gdb-previous-frame nil) - (setq gdb-current-frame nil) - (setq gdb-current-stack-level nil) - (setq gdb-var-list nil) - (setq gdb-var-changed nil) - (setq gdb-first-prompt nil) - (setq gdb-prompting nil) - (setq gdb-input-queue nil) - (setq gdb-current-item nil) - (setq gdb-pending-triggers nil) - (setq gdb-output-sink 'user) - (setq gdb-server-prefix "server ") - (setq gdb-flush-pending-output nil) - (setq gdb-location-alist nil) - (setq gdb-find-file-unhook nil) - (setq gdb-macro-info nil) + (setq gdb-frame-address (if gdb-show-main "main" nil)) + (setq gdb-previous-frame-address nil + gdb-memory-address "main" + gdb-previous-frame nil + gdb-selected-frame nil + gdb-current-language nil + gdb-frame-number nil + gdb-var-list nil + gdb-var-changed nil + gdb-first-prompt nil + gdb-prompting nil + gdb-input-queue nil + gdb-current-item nil + gdb-pending-triggers nil + gdb-output-sink 'user + gdb-server-prefix "server " + gdb-flush-pending-output nil + gdb-location-alist nil + gdb-find-file-unhook nil + gdb-macro-info nil) ;; (setq gdb-buffer-type 'gdba) ;; @@ -380,8 +389,8 @@ (require 'tooltip) (let ((expr (tooltip-identifier-from-point (point)))) (if (and (string-equal gdb-current-language "c") - gdb-use-colon-colon-notation gdb-current-frame) - (setq expr (concat gdb-current-frame "::" expr))) + gdb-use-colon-colon-notation gdb-selected-frame) + (setq expr (concat gdb-selected-frame "::" expr))) (catch 'already-watched (dolist (var gdb-var-list) (if (string-equal expr (car var)) (throw 'already-watched nil))) @@ -862,7 +871,7 @@ (setq gdb-prompting t)) (defconst gdb-source-spec-regexp - "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") + "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x0*\\([a-f0-9]*\\)") ;; Do not use this except as an annotation handler. (defun gdb-source (args) @@ -872,7 +881,7 @@ (cons (match-string 1 args) (string-to-number (match-string 2 args)))) - (setq gdb-current-address (match-string 3 args)) + (setq gdb-frame-address (match-string 3 args)) ;; cover for auto-display output which comes *before* ;; stopped annotation (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) @@ -985,10 +994,12 @@ This begins the collection of output from the current command if that happens to be appropriate." (unless gdb-pending-triggers - (gdb-get-current-frame) + (gdb-get-selected-frame) (gdb-invalidate-frames) (gdb-invalidate-breakpoints) - (gdb-invalidate-assembler) + ;; Do this through gdb-get-selected-frame -> gdb-frame-handler + ;; so gdb-frame-address is updated. + ;; (gdb-invalidate-assembler) (gdb-invalidate-registers) (gdb-invalidate-memory) (gdb-invalidate-locals) @@ -1150,12 +1161,12 @@ (let ((buf (gdb-get-buffer ',buf-key))) (and buf (with-current-buffer buf - (let ((p (point)) + (let ((p (window-point (get-buffer-window buf 0))) (buffer-read-only nil)) (erase-buffer) (insert-buffer-substring (gdb-get-create-buffer 'gdb-partial-output-buffer)) - (goto-char p))))) + (set-window-point (get-buffer-window buf 0) p))))) ;; put customisation here (,custom-defun))) @@ -1293,7 +1304,7 @@ (goto-char (point-min)) (while (< (point) (- (point-max) 1)) (forward-line 1) - (if (looking-at "[^\t].*breakpoint") + (if (looking-at "[^\t].*?breakpoint") (progn (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") (setq bptno (match-string 1)) @@ -1435,9 +1446,9 @@ (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") + (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+")) (gdb-enqueue-input (list (concat gdb-server-prefix @@ -1452,9 +1463,9 @@ (interactive) (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") + (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+")) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+")) (gdb-enqueue-input (list (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) @@ -1467,10 +1478,10 @@ (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") + (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\ -\\(\\S-*\\):\\([0-9]+\\)")) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\ +\\(\\S-+\\):\\([0-9]+\\)")) (let ((bptno (match-string 1)) (file (match-string 2)) (line (match-string 3))) @@ -1511,7 +1522,7 @@ help-echo "mouse-2, RET: Select frame")) (beginning-of-line) (when (and (looking-at "^#\\([0-9]+\\)") - (equal (match-string 1) gdb-current-stack-level)) + (equal (match-string 1) gdb-frame-number)) (put-text-property (line-beginning-position) (line-end-position) 'face '(:inverse-video t))) (forward-line 1)))))) @@ -1648,13 +1659,20 @@ ;; Registers buffer. ;; +(defcustom gdb-all-registers nil + "Non-nil means include floating-point registers." + :type 'boolean + :group 'gud + :version "22.1") + (gdb-set-buffer-rules 'gdb-registers-buffer 'gdb-registers-buffer-name 'gdb-registers-mode) (def-gdb-auto-updated-buffer gdb-registers-buffer gdb-invalidate-registers - (concat gdb-server-prefix "info registers\n") + (concat + gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n") gdb-info-registers-handler gdb-info-registers-custom) @@ -1663,6 +1681,7 @@ (defvar gdb-registers-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map) + (define-key map " " 'toggle-gdb-all-registers) (define-key map "q" 'kill-this-buffer) map)) @@ -1672,7 +1691,7 @@ \\{gdb-registers-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-registers-mode) - (setq mode-name "Registers") + (setq mode-name "Registers:") (setq buffer-read-only t) (use-local-map gdb-registers-mode-map) (run-mode-hooks 'gdb-registers-mode-hook) @@ -1695,6 +1714,20 @@ (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) +(defun toggle-gdb-all-registers () + "Toggle the display of floating-point registers." + (interactive) + (if gdb-all-registers + (progn + (setq gdb-all-registers nil) + (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) + (setq mode-name "Registers:"))) + (setq gdb-all-registers t) + (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) + (setq mode-name "Registers:All"))) + (gdb-invalidate-registers)) + + ;; Memory buffer. ;; (defcustom gdb-memory-repeat-count 32 @@ -1733,7 +1766,11 @@ gdb-read-memory-handler gdb-read-memory-custom) -(defun gdb-read-memory-custom ()) +(defun gdb-read-memory-custom () + (save-excursion + (goto-char (point-min)) + (if (looking-at "0x[[:xdigit:]]+") + (setq gdb-memory-address (match-string 0))))) (defvar gdb-memory-mode-map (let ((map (make-sparse-keymap))) @@ -1757,8 +1794,8 @@ (select-window (posn-window (event-start event))) (let* ((arg (read-from-minibuffer "Repeat count: ")) (count (string-to-number arg))) - (if (< count 0) - (error "Non-negative numbers only") + (if (<= count 0) + (error "Positive numbers only") (customize-set-variable 'gdb-memory-repeat-count count) (gdb-invalidate-memory))))) @@ -1911,10 +1948,42 @@ (setq header-line-format '(:eval (concat - "Read address: " + "Read address[" + (propertize + "-" + 'face font-lock-warning-face + 'help-echo "mouse-1: Decrement address" + 'mouse-face 'mode-line-highlight + 'local-map + (gdb-make-header-line-mouse-map + 'mouse-1 + #'(lambda () (interactive) + (let ((gdb-memory-address + ;; let GDB do the arithmetic + (concat + gdb-memory-address " - " + (number-to-string + (* gdb-memory-repeat-count + (cond ((string= gdb-memory-unit "b") 1) + ((string= gdb-memory-unit "h") 2) + ((string= gdb-memory-unit "w") 4) + ((string= gdb-memory-unit "g") 8))))))) + (gdb-invalidate-memory))))) + "|" + (propertize "+" + 'face font-lock-warning-face + 'help-echo "mouse-1: Increment address" + 'mouse-face 'mode-line-highlight + 'local-map (gdb-make-header-line-mouse-map + 'mouse-1 + #'(lambda () (interactive) + (let ((gdb-memory-address nil)) + (gdb-invalidate-memory))))) + "]: " (propertize gdb-memory-address 'face font-lock-warning-face 'help-echo "mouse-1: Set memory address" + 'mouse-face 'mode-line-highlight 'local-map (gdb-make-header-line-mouse-map 'mouse-1 #'gdb-memory-set-address)) @@ -1922,6 +1991,7 @@ (propertize (number-to-string gdb-memory-repeat-count) 'face font-lock-warning-face 'help-echo "mouse-1: Set repeat count" + 'mouse-face 'mode-line-highlight 'local-map (gdb-make-header-line-mouse-map 'mouse-1 #'gdb-memory-set-repeat-count)) @@ -1929,11 +1999,13 @@ (propertize gdb-memory-format 'face font-lock-warning-face 'help-echo "mouse-3: Select display format" + 'mouse-face 'mode-line-highlight 'local-map gdb-memory-format-keymap) " Unit Size: " (propertize gdb-memory-unit 'face font-lock-warning-face 'help-echo "mouse-3: Select unit size" + 'mouse-face 'mode-line-highlight 'local-map gdb-memory-unit-keymap)))) (run-mode-hooks 'gdb-memory-mode-hook) 'gdb-invalidate-memory) @@ -1986,12 +2058,12 @@ (replace-match " (array);\n" nil nil)))) (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) (and buf (with-current-buffer buf - (let ((p (point)) + (let ((p (window-point (get-buffer-window buf 0))) (buffer-read-only nil)) - (delete-region (point-min) (point-max)) + (erase-buffer) (insert-buffer-substring (gdb-get-create-buffer 'gdb-partial-output-buffer)) - (goto-char p))))) + (set-window-point (get-buffer-window buf 0) p))))) (run-hooks 'gdb-info-locals-hook)) (defun gdb-info-locals-custom () @@ -2009,7 +2081,7 @@ \\{gdb-locals-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-locals-mode) - (setq mode-name (concat "Locals:" gdb-current-frame)) + (setq mode-name (concat "Locals:" gdb-selected-frame)) (setq buffer-read-only t) (use-local-map gdb-locals-mode-map) (run-mode-hooks 'gdb-locals-mode-hook) @@ -2069,7 +2141,8 @@ (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) - (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) + (define-key menu [disassembly] + '("Disassembly" . gdb-display-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) (define-key menu [inferior] '(menu-item "Inferior IO" gdb-display-inferior-io-buffer @@ -2086,7 +2159,7 @@ (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) - (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) + (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) (define-key menu [inferior] '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer @@ -2129,14 +2202,6 @@ (gdb-display-buffer (gdb-get-create-buffer 'gdba))) -(defvar gdb-main-file nil "Source file from which program execution begins.") - -(defcustom gdb-show-main nil - "Nil means don't display source file containing the main routine." - :type 'boolean - :group 'gud - :version "22.1") - (defun gdb-set-window-buffer (name) (set-window-buffer (selected-window) (get-buffer name)) (set-window-dedicated-p (selected-window) t)) @@ -2236,7 +2301,7 @@ buffers." (goto-char (point-min)) (if (and (search-forward "Located in " nil t) - (looking-at "\\S-*")) + (looking-at "\\S-+")) (setq gdb-main-file (match-string 0))) (goto-char (point-min)) (if (search-forward "Includes preprocessor macro info." nil t) @@ -2254,7 +2319,7 @@ (goto-char (point-min)) (catch 'file-not-found (if (search-forward "Located in " nil t) - (when (looking-at "\\S-*") + (when (looking-at "\\S-+") (delete (cons bptno "File not found") gdb-location-alist) (push (cons bptno (match-string 0)) gdb-location-alist)) (gdb-resync) @@ -2276,6 +2341,8 @@ (add-hook 'find-file-hook 'gdb-find-file-hook) (defun gdb-find-file-hook () +"Set up buffer for debugging if file is part of the source code +of the current session." (if (and (not gdb-find-file-unhook) ;; in case gud or gdb-ui is just loaded gud-comint-buffer @@ -2399,7 +2466,9 @@ (def-gdb-auto-updated-buffer gdb-assembler-buffer gdb-invalidate-assembler - (concat gdb-server-prefix "disassemble " gdb-current-address "\n") + (concat gdb-server-prefix "disassemble " + (if (member gdb-frame-address '(nil "main")) nil "0x") + gdb-frame-address "\n") gdb-assembler-handler gdb-assembler-custom) @@ -2407,38 +2476,38 @@ (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) (pos 1) (address) (flag) (bptno)) (with-current-buffer buffer - (if (not (equal gdb-current-address "main")) - (progn - (goto-char (point-min)) - (if (re-search-forward gdb-current-address nil t) - (progn - (setq pos (point)) - (beginning-of-line) - (or gdb-overlay-arrow-position - (setq gdb-overlay-arrow-position (make-marker))) - (set-marker gdb-overlay-arrow-position - (point) (current-buffer)))))) - ;; remove all breakpoint-icons in assembler buffer before updating. - (gdb-remove-breakpoint-icons (point-min) (point-max))) + (save-excursion + (if (not (equal gdb-frame-address "main")) + (progn + (goto-char (point-min)) + (if (and gdb-frame-address + (re-search-forward gdb-frame-address nil t)) + (progn + (setq pos (point)) + (beginning-of-line) + (or gdb-overlay-arrow-position + (setq gdb-overlay-arrow-position (make-marker))) + (set-marker gdb-overlay-arrow-position + (point) (current-buffer)))))) + ;; remove all breakpoint-icons in assembler buffer before updating. + (gdb-remove-breakpoint-icons (point-min) (point-max)))) (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) (goto-char (point-min)) (while (< (point) (- (point-max) 1)) (forward-line 1) - (if (looking-at "[^\t].*breakpoint") + (if (looking-at "[^\t].*?breakpoint") (progn (looking-at - "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)") + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)") (setq bptno (match-string 1)) (setq flag (char-after (match-beginning 2))) (setq address (match-string 3)) - ;; remove leading 0s from output of info break. - (if (string-match "^0+\\(.*\\)" address) - (setq address (match-string 1 address))) (with-current-buffer buffer + (save-excursion (goto-char (point-min)) (if (re-search-forward address nil t) - (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) - (if (not (equal gdb-current-address "main")) + (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) + (if (not (equal gdb-frame-address "main")) (set-window-point (get-buffer-window buffer 0) pos)))) (defvar gdb-assembler-mode-map @@ -2468,7 +2537,7 @@ \\{gdb-assembler-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-assembler-mode) - (setq mode-name "Machine") + (setq mode-name (concat "Machine:" gdb-selected-frame)) (setq gdb-overlay-arrow-position nil) (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) (setq fringes-outside-margins t) @@ -2482,33 +2551,36 @@ (defun gdb-assembler-buffer-name () (with-current-buffer gud-comint-buffer - (concat "*Machine Code " (gdb-get-target-string) "*"))) + (concat "*Disassembly of " (gdb-get-target-string) "*"))) (defun gdb-display-assembler-buffer () "Display disassembly view." (interactive) + (setq gdb-previous-frame nil) (gdb-display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))) (defun gdb-frame-assembler-buffer () "Display disassembly view in a new frame." (interactive) + (setq gdb-previous-frame nil) (let ((special-display-regexps (append special-display-regexps '(".*"))) (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))) -;; modified because if gdb-current-address has changed value a new command +;; modified because if gdb-frame-address has changed value a new command ;; must be enqueued to update the buffer with the new output (defun gdb-invalidate-assembler (&optional ignored) (if (gdb-get-buffer 'gdb-assembler-buffer) (progn - (unless (string-equal gdb-current-frame gdb-previous-frame) + (unless (and gdb-selected-frame + (string-equal gdb-selected-frame gdb-previous-frame)) (if (or (not (member 'gdb-invalidate-assembler gdb-pending-triggers)) - (not (string-equal gdb-current-address - gdb-previous-address))) + (not (string-equal gdb-frame-address + gdb-previous-frame-address))) (progn - ;; take previous disassemble command off the queue + ;; take previous disassemble command, if any, off the queue (with-current-buffer gud-comint-buffer (let ((queue gdb-input-queue)) (dolist (item queue) @@ -2516,46 +2588,46 @@ (setq gdb-input-queue (delete item gdb-input-queue)))))) (gdb-enqueue-input - (list (concat gdb-server-prefix "disassemble " - gdb-current-address "\n") + (list + (concat gdb-server-prefix "disassemble " + (if (member gdb-frame-address '(nil "main")) nil "0x") + gdb-frame-address "\n") 'gdb-assembler-handler)) (push 'gdb-invalidate-assembler gdb-pending-triggers) - (setq gdb-previous-address gdb-current-address) - (setq gdb-previous-frame gdb-current-frame))))))) + (setq gdb-previous-frame-address gdb-frame-address) + (setq gdb-previous-frame gdb-selected-frame))))))) -(defun gdb-get-current-frame () - (if (not (member 'gdb-get-current-frame gdb-pending-triggers)) +(defun gdb-get-selected-frame () + (if (not (member 'gdb-get-selected-frame gdb-pending-triggers)) (progn (gdb-enqueue-input (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler)) - (push 'gdb-get-current-frame + (push 'gdb-get-selected-frame gdb-pending-triggers)))) (defun gdb-frame-handler () (setq gdb-pending-triggers - (delq 'gdb-get-current-frame gdb-pending-triggers)) + (delq 'gdb-get-selected-frame gdb-pending-triggers)) (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) (goto-char (point-min)) - (if (looking-at "Stack level \\([0-9]+\\)") - (setq gdb-current-stack-level (match-string 1))) - (forward-line) - (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ") + (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) + (setq gdb-frame-number (match-string 1))) + (goto-char (point-min)) + (if (re-search-forward + ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t) (progn - (setq gdb-current-frame (match-string 2)) + (setq gdb-selected-frame (match-string 2)) (if (gdb-get-buffer 'gdb-locals-buffer) (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer) - (setq mode-name (concat "Locals:" gdb-current-frame)))) - (let ((address (match-string 1))) - ;; remove leading 0s from output of info frame command. - (if (string-match "^0+\\(.*\\)" address) - (setq gdb-current-address - (concat "0x" (match-string 1 address))) - (setq gdb-current-address (concat "0x" address)))) - (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t)) - ;;update with new frame for machine code if necessary - (gdb-invalidate-assembler))))) + (setq mode-name (concat "Locals:" gdb-selected-frame)))) + (if (gdb-get-buffer 'gdb-assembler-buffer) + (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer) + (setq mode-name (concat "Machine:" gdb-selected-frame)))) + (setq gdb-frame-address (match-string 1)))) + (goto-char (point-min)) (if (re-search-forward " source language \\(\\S-*\\)\." nil t) (setq gdb-current-language (match-string 1)))) + (gdb-invalidate-assembler)) (provide 'gdb-ui)
--- a/lisp/progmodes/gud.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/gud.el Mon Jun 06 02:39:45 2005 +0000 @@ -25,17 +25,17 @@ ;;; Commentary: -;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> -;; It was later rewritten by rms. Some ideas were due to Masanobu. -;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> -;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>, -;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com> -;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com> -;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk> -;; added the IRIX kluge, re-implemented the Mips-ish variant and added -;; a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX kluge with -;; the gud-xdb-directories hack producing gud-dbx-directories. Derek L. Davies -;; <ddavies@world.std.com> added support for jdb (Java debugger.) +;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> It was +;; later rewritten by rms. Some ideas were due to Masanobu. Grand +;; Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> Barry +;; Warsaw <bwarsaw@cen.com> hacked the mode to use comint.el. Shane Hartman +;; <shane@spr.com> added support for xdb (HPUX debugger). Rick Sladkey +;; <jrs@world.std.com> wrote the GDB command completion code. Dave Love +;; <d.love@dl.ac.uk> added the IRIX kluge, re-implemented the Mips-ish variant +;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX +;; kluge with the gud-xdb-directories hack producing gud-dbx-directories. +;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java +;; debugger.) ;;; Code: @@ -107,11 +107,10 @@ (setq same-window-regexps nil) (throw 'info-found nil)))) nil 0) - (require 'info) (select-frame (make-frame))) (if (memq gud-minor-mode '(gdbmi gdba)) - (Info-goto-node "(emacs)GDB Graphical Interface") - (Info-goto-node "(emacs)Debuggers")))) + (info "(emacs)GDB Graphical Interface") + (info "(emacs)Debuggers")))) (easy-mmode-defmap gud-menu-map '(([help] "Info" . gud-goto-info) @@ -141,6 +140,9 @@ :enable (and (not gud-running) (memq gud-minor-mode '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) + ([print*] menu-item "Print Dereference" gud-pstar + :enable (and (not gud-running) + (memq gud-minor-mode '(gdbmi gdba gdb)))) ([print] menu-item "Print Expression" gud-print :enable (not gud-running)) ([watch] menu-item "Watch Expression" gud-watch @@ -184,18 +186,19 @@ (dolist (x '((gud-break . "gud-break") (gud-remove . "gud-remove") (gud-print . "gud-print") + (gud-pstar . "gud-pstar") (gud-watch . "gud-watch") + (gud-cont . "gud-cont") + (gud-until . "gud-until") + (gud-finish . "gud-finish") (gud-run . "gud-run") - (gud-until . "gud-until") - (gud-cont . "gud-cont") ;; gud-s, gud-si etc. instead of gud-step, ;; gud-stepi, to avoid file-name clashes on DOS ;; 8+3 filesystems. + (gud-next . "gud-n") (gud-step . "gud-s") - (gud-next . "gud-n") - (gud-finish . "gud-finish") + (gud-nexti . "gud-ni") (gud-stepi . "gud-si") - (gud-nexti . "gud-ni") (gud-up . "gud-up") (gud-down . "gud-down") (gud-goto-info . "info")) @@ -343,13 +346,13 @@ (defvar gud-speedbar-menu-items ;; Note to self. Add expand, and turn off items when not available. - '(["Jump to stack frame" speedbar-edit-line + '(["Jump to stack frame" speedbar-edit-line (with-current-buffer gud-comint-buffer (not (memq gud-minor-mode '(gdbmi gdba))))] - ["Edit value" speedbar-edit-line + ["Edit value" speedbar-edit-line (with-current-buffer gud-comint-buffer (not (memq gud-minor-mode '(gdbmi gdba))))] - ["Delete expression" gdb-var-delete + ["Delete expression" gdb-var-delete (with-current-buffer gud-comint-buffer (not (memq gud-minor-mode '(gdbmi gdba))))]) "Additional menu items to add to the speedbar frame.") @@ -581,6 +584,8 @@ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") + (gud-def gud-pstar "print* %e" nil + "Evaluate C dereferenced pointer expression at point.") (gud-def gud-until "until %l" "\C-u" "Continue to current line.") (gud-def gud-run "run" nil "Run the program.") @@ -3192,7 +3197,7 @@ "The mouse movement event that led to a tooltip display. This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") -(defun gud-tooltip-toggle-dereference () +(defun toggle-gud-tooltip-dereference () "Toggle whether tooltips should show `* expr' or `expr'." (interactive) (setq gud-tooltip-dereference (not gud-tooltip-dereference)) @@ -3201,7 +3206,7 @@ (if gud-tooltip-dereference "on" "off")))) (define-obsolete-function-alias 'tooltip-gud-toggle-dereference - 'gud-tooltip-toggle-dereference "22.1") + 'toggle-gud-tooltip-dereference "22.1") (define-minor-mode gud-tooltip-mode "Toggle the display of GUD tooltips."
--- a/lisp/progmodes/icon.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/icon.el Mon Jun 06 02:39:45 2005 +0000 @@ -205,7 +205,7 @@ (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil icon-forward-sexp-function) hs-special-modes-alist))) - (run-hooks 'icon-mode-hook)) + (run-mode-hooks 'icon-mode-hook)) ;; This is used by indent-for-comment to decide how much to ;; indent a comment in Icon code based on its context.
--- a/lisp/progmodes/idlw-help.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/idlw-help.el Mon Jun 06 02:39:45 2005 +0000 @@ -278,7 +278,7 @@ (set (make-local-variable 'idlwave-help-def-pos) nil) (set (make-local-variable 'idlwave-help-args) nil) (set (make-local-variable 'idlwave-help-in-header) nil) - (run-hooks 'idlwave-help-mode-hook)) + (run-mode-hooks 'idlwave-help-mode-hook)) (defun idlwave-html-help-location () "Return the help directory where HTML files are, or nil if that is unknown."
--- a/lisp/progmodes/idlw-shell.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/idlw-shell.el Mon Jun 06 02:39:45 2005 +0000 @@ -1055,7 +1055,7 @@ (set (make-local-variable 'tool-bar-map) nil) ;; Run the hooks. - (run-hooks 'idlwave-shell-mode-hook) + (run-mode-hooks 'idlwave-shell-mode-hook) (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) ;; Turn off IDL's ^d interpreting, and define a system ;; variable which knows the version of IDLWAVE
--- a/lisp/progmodes/idlwave.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/idlwave.el Mon Jun 06 02:39:45 2005 +0000 @@ -1954,7 +1954,7 @@ (idlwave-new-buffer-update) ;; Run the mode hook - (run-hooks 'idlwave-mode-hook)) + (run-mode-hooks 'idlwave-mode-hook)) (defvar idlwave-setup-done nil) (defun idlwave-setup ()
--- a/lisp/progmodes/inf-lisp.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/inf-lisp.el Mon Jun 06 02:39:45 2005 +0000 @@ -260,7 +260,8 @@ If you accidentally suspend your process, use \\[comint-continue-subjob] to continue it." (interactive) - (comint-mode) + (delay-mode-hooks + (comint-mode)) (setq comint-prompt-regexp inferior-lisp-prompt) (setq major-mode 'inferior-lisp-mode) (setq mode-name "Inferior Lisp") @@ -269,7 +270,7 @@ (use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file (setq comint-get-old-input (function lisp-get-old-input)) (setq comint-input-filter (function lisp-input-filter)) - (run-hooks 'inferior-lisp-mode-hook)) + (run-mode-hooks 'inferior-lisp-mode-hook)) (defun lisp-get-old-input () "Return a string containing the sexp ending at point."
--- a/lisp/progmodes/m4-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/m4-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -147,7 +147,7 @@ font-lock-defaults '(m4-font-lock-keywords nil) ) (set-syntax-table m4-mode-syntax-table) - (run-hooks 'm4-mode-hook)) + (run-mode-hooks 'm4-mode-hook)) (provide 'm4-mode) ;;stuff to play with for debugging
--- a/lisp/progmodes/make-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/make-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -111,7 +111,8 @@ '((t (:underline t))) "Face to use for additionally highlighting rule targets in Font-Lock mode." :group 'faces - :group 'makefile) + :group 'makefile + :version "22.1") (defface makefile-shell-face '((((class color) (background light)) (:background "seashell1")) @@ -119,7 +120,8 @@ (t (:reverse-video t))) "Face to use for additionally highlighting Shell commands in Font-Lock mode." :group 'faces - :group 'makefile) + :group 'makefile + :version "22.1") (defface makefile-makepp-perl-face '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book @@ -127,7 +129,8 @@ (t (:reverse-video t))) "Face to use for additionally highlighting Perl code in Font-Lock mode." :group 'faces - :group 'makefile) + :group 'makefile + :version "22.1") (defcustom makefile-browser-buffer-name "*Macros and Targets*" "*Name of the macro- and target browser buffer." @@ -262,18 +265,33 @@ "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" "Regex used to find dependency lines in a makefile.") +(defconst makefile-bsdmake-dependency-regex + (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex) + (replace-match "\\([:!]\\)" t t makefile-dependency-regex)) + "Regex used to find dependency lines in a BSD makefile.") + (defvar makefile-dependency-skip "^:" "Characters to skip to find a line that might be a dependency.") (defvar makefile-rule-action-regex - "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)" + "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" "Regex used to highlight rule action lines in font lock mode.") +(defconst makefile-makepp-rule-action-regex + ;; Don't care about initial tab, but I don't know how to font-lock correctly without. + "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)" + "Regex used to highlight makepp rule action lines in font lock mode.") + +(defconst makefile-bsdmake-rule-action-regex + (progn (string-match "-@" makefile-rule-action-regex) + (replace-match "-+@" t t makefile-rule-action-regex)) + "Regex used to highlight BSD rule action lines in font lock mode.") + ;; Note that the first and second subexpression is used by font lock. Note ;; that if you change this regexp you might have to fix the imenu index in ;; makefile-imenu-generic-expression. (defconst makefile-macroassign-regex - "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)" + "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)" "Regex used to find macro assignment lines in a makefile.") (defconst makefile-var-use-regex @@ -420,7 +438,7 @@ nil "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" - '("[^$]\\(\\$[({]\\(?:target\\|output\\)s?\\_>.*?[})]\\)" + '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)" 1 'makefile-targets-face prepend) ;; Colon modifier keywords. @@ -849,10 +867,8 @@ ;;;###autoload (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" "An adapted `makefile-mode' that knows about makepp." - (set (make-local-variable 'makefile-rule-action-regex) - ;; Don't care about initial tab, but I don't know how to font-lock correctly without. - "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)") - + (set (make-local-variable 'makefile-rule-action-regex) + makefile-makepp-rule-action-regex) (setq font-lock-defaults `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) imenu-generic-expression @@ -863,11 +879,10 @@ (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" "An adapted `makefile-mode' that knows about BSD make." (set (make-local-variable 'makefile-dependency-regex) - ;; Identical to default, except allows `!' instead of `:'. - "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)") + makefile-bsdmake-dependency-regex) (set (make-local-variable 'makefile-dependency-skip) "^:!") (set (make-local-variable 'makefile-rule-action-regex) - "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)") + makefile-bsdmake-rule-action-regex) (setq font-lock-defaults `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
--- a/lisp/progmodes/meta-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/meta-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -998,7 +998,7 @@ (setq meta-complete-list (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) (list "" 'ispell-complete-word))) - (run-hooks 'meta-common-mode-hook 'metafont-mode-hook)) + (run-mode-hooks 'meta-common-mode-hook 'metafont-mode-hook)) ;;;###autoload (defun metapost-mode () @@ -1023,7 +1023,7 @@ (setq meta-complete-list (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) (list "" 'ispell-complete-word))) - (run-hooks 'meta-common-mode-hook 'metapost-mode-hook)) + (run-mode-hooks 'meta-common-mode-hook 'metapost-mode-hook)) ;;; Just in case ...
--- a/lisp/progmodes/modula2.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/modula2.el Mon Jun 06 02:39:45 2005 +0000 @@ -172,7 +172,7 @@ ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. ;(font-lock-comment-start-regexp . "(\\*") )) - (run-hooks 'm2-mode-hook)) + (run-mode-hooks 'm2-mode-hook)) ;; Regexps written with help from Ron Forrester <ron@orcad.com> ;; and Spencer Allain <sallain@teknowledge.com>.
--- a/lisp/progmodes/octave-inf.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/octave-inf.el Mon Jun 06 02:39:45 2005 +0000 @@ -158,7 +158,7 @@ inferior-octave-dynamic-complete-functions) (comint-read-input-ring t) - (run-hooks 'inferior-octave-mode-hook)) + (run-mode-hooks 'inferior-octave-mode-hook)) ;;;###autoload (defun inferior-octave (&optional arg)
--- a/lisp/progmodes/octave-mod.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/octave-mod.el Mon Jun 06 02:39:45 2005 +0000 @@ -555,7 +555,7 @@ (octave-add-octave-menu) (octave-initialize-completions) - (run-hooks 'octave-mode-hook)) + (run-mode-hooks 'octave-mode-hook)) ;;; Miscellaneous useful functions (defun octave-describe-major-mode ()
--- a/lisp/progmodes/pascal.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/pascal.el Mon Jun 06 02:39:45 2005 +0000 @@ -383,7 +383,7 @@ (make-local-variable 'imenu-generic-expression) (setq imenu-generic-expression pascal-imenu-generic-expression) (setq imenu-case-fold-search t) - (run-hooks 'pascal-mode-hook)) + (run-mode-hooks 'pascal-mode-hook))
--- a/lisp/progmodes/sh-script.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/sh-script.el Mon Jun 06 02:39:45 2005 +0000 @@ -1392,7 +1392,7 @@ (string-match "\\.m?spec\\'" buffer-file-name)) "rpm"))))) (sh-set-shell (or interpreter sh-shell-file) nil nil)) - (run-hooks 'sh-mode-hook)) + (run-mode-hooks 'sh-mode-hook)) ;;;###autoload (defalias 'shell-script-mode 'sh-mode)
--- a/lisp/progmodes/sql.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/sql.el Mon Jun 06 02:39:45 2005 +0000 @@ -2249,7 +2249,7 @@ (setq local-abbrev-table sql-mode-abbrev-table) (setq abbrev-all-caps 1) ;; Run hook - (run-hooks 'sql-mode-hook) + (run-mode-hooks 'sql-mode-hook) ;; Catch changes to sql-product and highlight accordingly (sql-highlight-product) (add-hook 'hack-local-variables-hook 'sql-highlight-product t t)) @@ -2367,7 +2367,7 @@ (make-local-variable 'sql-input-ring-separator) (make-local-variable 'sql-input-ring-file-name) ;; Run hook. - (run-hooks 'sql-interactive-mode-hook) + (run-mode-hooks 'sql-interactive-mode-hook) ;; Set comint based on user overrides. (setq comint-prompt-regexp sql-prompt-regexp) (setq left-margin sql-prompt-length)
--- a/lisp/progmodes/vhdl-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/vhdl-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -127,7 +127,7 @@ "Non-nil if XEmacs is used.") ;; Emacs 21 handling (defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs)) - "Non-nil if GNU Emacs 21 is used.") + "Non-nil if Emacs 21 is used.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -4568,8 +4568,7 @@ (set (make-local-variable 'indent-line-function) 'vhdl-indent-line) (set (make-local-variable 'comment-start) "--") (set (make-local-variable 'comment-end) "") - (when vhdl-emacs-21 - (set (make-local-variable 'comment-padding) "")) + (set (make-local-variable 'comment-padding) "") (set (make-local-variable 'comment-column) vhdl-inline-comment-column) (set (make-local-variable 'end-comment-column) vhdl-end-comment-column) (set (make-local-variable 'comment-start-skip) "--+\\s-*") @@ -4622,7 +4621,7 @@ (if noninteractive "" " See menu for documentation and release notes.")) ;; run hooks - (run-hooks 'vhdl-mode-hook)) + (run-mode-hooks 'vhdl-mode-hook)) (defun vhdl-activate-customizations () "Activate all customizations on local variables." @@ -7484,7 +7483,13 @@ (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) (if (match-string 1) (goto-char (match-end 1)) - (replace-match "\\3 \\4 \\5") + (save-excursion + (goto-char (match-beginning 4)) + (unless (eq (preceding-char) ?\ ) + (insert " ")) + (goto-char (match-end 4)) + (unless (eq (following-char) ?\ ) + (insert " "))) (goto-char (match-end 4)))) ;; eliminate multiple spaces and spaces at end of line (goto-char beg) @@ -7540,7 +7545,7 @@ (interactive "r\np") (save-excursion (goto-char beg) - (let ((margin (if interactive (current-indentation) (current-column)))) + (let ((margin (if arg (current-indentation) (current-column)))) (goto-char end) (setq end (point-marker)) ;; remove inline comments, newlines and whitespace @@ -12055,8 +12060,7 @@ # statements : %5d\n\ # code lines : %5d\n\ # total lines : %5d\n\ " - (buffer-file-name) no-stats no-code-lines no-lines) - (unless vhdl-emacs-21 (vhdl-show-messages)))) + (buffer-file-name) no-stats no-code-lines no-lines))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Help functions
--- a/lisp/progmodes/which-func.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/which-func.el Mon Jun 06 02:39:45 2005 +0000 @@ -196,7 +196,7 @@ (puthash window current which-func-table) (force-mode-line-update))) (error - (which-func-mode -1) + (setq which-func-mode nil) (error "Error in which-func-update: %s" info)))))) ;;;###autoload
--- a/lisp/progmodes/xscheme.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/progmodes/xscheme.el Mon Jun 06 02:39:45 2005 +0000 @@ -338,7 +338,7 @@ (setq xscheme-previous-process-state (cons nil nil))))))) (scheme-interaction-mode-initialize) (scheme-mode-variables) - (run-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) + (run-mode-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) (defun exit-scheme-interaction-mode () "Take buffer out of scheme interaction mode"
--- a/lisp/recentf.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/recentf.el Mon Jun 06 02:39:45 2005 +0000 @@ -76,7 +76,7 @@ :type 'file) (defcustom recentf-exclude nil -"*List of regexps and predicates for filenames excluded from the recent list. + "*List of regexps and predicates for filenames excluded from the recent list. When a filename matches any of the regexps or satisfies any of the predicates it is excluded from the recent list. A predicate is a function that is passed a filename to check and that
--- a/lisp/replace.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/replace.el Mon Jun 06 02:39:45 2005 +0000 @@ -693,7 +693,7 @@ (make-local-variable 'occur-revert-arguments) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) (setq next-error-function 'occur-next-error) - (run-hooks 'occur-mode-hook)) + (run-mode-hooks 'occur-mode-hook)) (defun occur-revert-function (ignore1 ignore2) "Handle `revert-buffer' for Occur mode buffers."
--- a/lisp/saveplace.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/saveplace.el Mon Jun 06 02:39:45 2005 +0000 @@ -222,7 +222,8 @@ (t t)))) (condition-case nil - (write-file file) + ;; Don't use write-file; we don't want this buffer to visit it. + (write-region (point-min) (point-max) file) (file-error (message "Can't write %s" file))) (kill-buffer (current-buffer)) (message "Saving places to %s...done" file)))))
--- a/lisp/ses.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/ses.el Mon Jun 06 02:39:45 2005 +0000 @@ -1552,7 +1552,7 @@ (setq ses--deferred-narrow 'ses-mode) (1value (add-hook 'post-command-hook 'ses-command-hook nil t)) (run-with-idle-timer 0.01 nil 'ses-command-hook) - (run-hooks 'ses-mode-hook))) + (run-mode-hooks 'ses-mode-hook))) (put 'ses-mode 'mode-class 'special)
--- a/lisp/simple.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/simple.el Mon Jun 06 02:39:45 2005 +0000 @@ -920,21 +920,21 @@ (defvar read-expression-history nil) (defcustom eval-expression-print-level 4 - "*Value to use for `print-level' when printing value in `eval-expression'. + "Value for `print-level' while printing value in `eval-expression'. A value of nil means no limit." :group 'lisp :type '(choice (const :tag "No Limit" nil) integer) :version "21.1") (defcustom eval-expression-print-length 12 - "*Value to use for `print-length' when printing value in `eval-expression'. + "Value for `print-length' while printing value in `eval-expression'. A value of nil means no limit." :group 'lisp :type '(choice (const :tag "No Limit" nil) integer) :version "21.1") (defcustom eval-expression-debug-on-error t - "*Non-nil means set `debug-on-error' when evaluating in `eval-expression'. + "If non-nil set `debug-on-error' to t in `eval-expression'. If nil, don't change the value of `debug-on-error'." :group 'lisp :type 'boolean @@ -2247,7 +2247,7 @@ If DELETE is non-nil, the text between BEG and END is deleted from the buffer. -Point is temporarily set to BEG before caling +Point is temporarily set to BEG before calling `buffer-substring-filters', in case the functions need to know where the text came from. @@ -3351,25 +3351,27 @@ (let ((forward (> arg 0)) (part (nth 2 (pos-visible-in-window-p (point) nil t)))) (if (and (consp part) - (> (setq part (if forward (cdr part) (car part))) 0)) + (> (if forward (cdr part) (car part)) 0)) (set-window-vscroll nil (if forward (+ (window-vscroll nil t) - (min part + (min (cdr part) (* (frame-char-height) arg))) (max 0 (- (window-vscroll nil t) - (min part + (min (car part) (* (frame-char-height) (- arg)))))) t) (set-window-vscroll nil 0) (when (line-move-1 arg noerror to-end) - (sit-for 0) - (if (and (not forward) - (setq part (nth 2 (pos-visible-in-window-p - (line-beginning-position) nil t))) - (> (cdr part) 0)) - (set-window-vscroll nil (cdr part) t)) + (when (not forward) + ;; Update display before calling pos-visible-in-window-p, + ;; because it depends on window-start being up-to-date. + (sit-for 0) + (if (and (setq part (nth 2 (pos-visible-in-window-p + (line-beginning-position) nil t))) + (> (cdr part) 0)) + (set-window-vscroll nil (cdr part) t))) t))) (line-move-1 arg noerror to-end))) @@ -4762,7 +4764,7 @@ (setq major-mode 'completion-list-mode) (make-local-variable 'completion-base-size) (setq completion-base-size nil) - (run-hooks 'completion-list-mode-hook)) + (run-mode-hooks 'completion-list-mode-hook)) (defun completion-list-mode-finish () "Finish setup of the completions buffer.
--- a/lisp/skeleton.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/skeleton.el Mon Jun 06 02:39:45 2005 +0000 @@ -557,7 +557,7 @@ ;; (aset map i nil) ;; (aset map (+ i 128) nil) ;; (setq i (1+ i)))) -;; (run-hooks 'mirror-mode-hook)) +;; (run-mode-hooks 'mirror-mode-hook)) (provide 'skeleton)
--- a/lisp/speedbar.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/speedbar.el Mon Jun 06 02:39:45 2005 +0000 @@ -1306,7 +1306,7 @@ (if speedbar-track-mouse-flag (set (make-local-variable 'track-mouse) t)) ;this could be messy. (setq auto-show-mode nil)) ;no auto-show for Emacs - (run-hooks 'speedbar-mode-hook)) + (run-mode-hooks 'speedbar-mode-hook)) (speedbar-update-contents) speedbar-buffer)
--- a/lisp/subr.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/subr.el Mon Jun 06 02:39:45 2005 +0000 @@ -1853,7 +1853,7 @@ These hooks will be executed by the first following call to `run-mode-hooks' that occurs outside any `delayed-mode-hooks' form. Only affects hooks run in the current buffer." - (declare (debug t)) + (declare (debug t) (indent 0)) `(progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) @@ -1996,14 +1996,34 @@ (buffer-substring-no-properties (match-beginning num) (match-end num))))) -(defun looking-back (regexp &optional limit) +(defun looking-back (regexp &optional limit greedy) "Return non-nil if text before point matches regular expression REGEXP. Like `looking-at' except matches before point, and is slower. LIMIT if non-nil speeds up the search by specifying how far back the -match can start." - (not (null - (save-excursion - (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t))))) +match can start. + +If GREEDY is non-nil, extend the match backwards as far as possible, +stopping when a single additional previous character cannot be part +of a match for REGEXP." + (let ((start (point)) + (pos + (save-excursion + (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t) + (point))))) + (if (and greedy pos) + (save-restriction + (narrow-to-region (point-min) start) + (while (and (> pos (point-min)) + (save-excursion + (goto-char pos) + (backward-char 1) + (looking-at (concat "\\(?:" regexp "\\)\\'")))) + (setq pos (1- pos))) + (save-excursion + (goto-char pos) + (looking-at (concat "\\(?:" regexp "\\)\\'"))))) + (not (null pos)))) + (defconst split-string-default-separators "[ \f\t\n\r\v]+" "The default value of separators for `split-string'.
--- a/lisp/term.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/term.el Mon Jun 06 02:39:45 2005 +0000 @@ -1100,7 +1100,7 @@ (make-local-variable 'term-current-face) (make-local-variable 'term-pending-frame) (setq term-pending-frame nil) - (run-hooks 'term-mode-hook) + (run-mode-hooks 'term-mode-hook) (term-if-xemacs (set-buffer-menubar (append current-menubar (list term-terminal-menu)))) @@ -4177,7 +4177,7 @@ ;;; (make-local-variable 'shell-directory-stack) ;;; (setq shell-directory-stack nil) ;;; (add-hook 'term-input-filter-functions 'shell-directory-tracker) -;;; (run-hooks 'shell-mode-hook)) +;;; (run-mode-hooks 'shell-mode-hook)) ;;; ;;; ;;; Completion for term-mode users
--- a/lisp/terminal.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/terminal.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; terminal.el --- terminal emulator for GNU Emacs -;; Copyright (C) 1986,87,88,89,93,94 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1987, 1988, 1989, 1993, 1994 Free Software Foundation, Inc. ;; Author: Richard Mlynarik <mly@eddie.mit.edu> ;; Maintainer: FSF @@ -537,7 +537,7 @@ (setq mode-name "Terminal Edit") (setq mode-line-modified (default-value 'mode-line-modified)) (setq mode-line-process nil) - (run-hooks 'terminal-edit-mode-hook)) + (run-mode-hooks 'terminal-edit-mode-hook)) (defun te-edit () "Start editing the terminal emulator buffer with ordinary Emacs commands."
--- a/lisp/textmodes/dns-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/dns-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -48,7 +48,8 @@ ;;; Code: (defgroup dns-mode nil - "DNS master file mode configuration.") + "DNS master file mode configuration." + :group 'data) (defconst dns-mode-classes '("IN" "CS" "CH" "HS") "List of strings with known DNS classes.")
--- a/lisp/textmodes/flyspell.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/flyspell.el Mon Jun 06 02:39:45 2005 +0000 @@ -1,6 +1,6 @@ ;;; flyspell.el --- on-the-fly spell checker -;; Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr> ;; Maintainer: FSF @@ -56,6 +56,21 @@ :group 'processes) ;*---------------------------------------------------------------------*/ +;* Which emacs are we currently running */ +;*---------------------------------------------------------------------*/ +(defvar flyspell-emacs + (cond + ((string-match "XEmacs" emacs-version) + 'xemacs) + (t + 'emacs)) + "The type of Emacs we are currently running.") + +(defvar flyspell-use-local-map + (or (eq flyspell-emacs 'xemacs) + (not (string< emacs-version "20")))) + +;*---------------------------------------------------------------------*/ ;* User configuration ... */ ;*---------------------------------------------------------------------*/ (defcustom flyspell-highlight-flag t @@ -109,7 +124,8 @@ delete-backward-char backward-or-forward-delete-char delete-char - scrollbar-vertical-drag) + scrollbar-vertical-drag + backward-delete-char-untabify) "The standard list of delayed commands for Flyspell. See `flyspell-delayed-commands'." :group 'flyspell @@ -199,15 +215,15 @@ :type '(repeat (string))) (defcustom flyspell-abbrev-p - t - "*If true, add correction to abbreviation table." + nil + "*If non-nil, add correction to abbreviation table." :group 'flyspell :version "21.1" :type 'boolean) (defcustom flyspell-use-global-abbrev-table-p nil - "*If true, prefer global abbrev table to local abbrev table." + "*If non-nil, prefer global abbrev table to local abbrev table." :group 'flyspell :version "21.1" :type 'boolean) @@ -224,10 +240,12 @@ If the region is smaller than this number of characters, `flyspell-region' checks the words sequentially using regular flyspell methods. Else, if the region is large, a new Ispell process is -spawned for speed." +spawned for speed. + +If `flyspell-large-region' is nil, all regions are treated as small." :group 'flyspell :version "21.1" - :type 'number) + :type '(choice number boolean)) (defcustom flyspell-insert-function (function insert) "*Function for inserting word by flyspell upon correction." @@ -244,6 +262,20 @@ :group 'flyspell :type '(choice string (const nil))) +(defcustom flyspell-use-meta-tab t + "*Non-nil means that flyspell uses META-TAB to correct word." + :group 'flyspell + :type 'boolean) + +(defcustom flyspell-auto-correct-binding + (cond + ((eq flyspell-emacs 'xemacs) + [(control \;)]) + (t + [?\C-\;])) + "The key binding for flyspell auto correction." + :group 'flyspell) + ;*---------------------------------------------------------------------*/ ;* Mode specific options */ ;* ------------------------------------------------------------- */ @@ -267,17 +299,24 @@ (put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify) (defun mail-mode-flyspell-verify () "This function is used for `flyspell-generic-check-word-p' in Mail mode." - (let ((in-headers (save-excursion - ;; When mail-header-separator is "", - ;; it is likely to be found in both directions. - (not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t)))) - (in-signature (save-excursion - (re-search-backward message-signature-separator nil t)))) - (cond (in-headers + (let ((header-end (save-excursion + (goto-char (point-min)) + (re-search-forward + (concat "^" + (regexp-quote mail-header-separator) + "$") + nil t) + (point))) + (signature-begin (save-excursion + (goto-char (point-max)) + (re-search-backward message-signature-separator + nil t) + (point)))) + (cond ((< (point) header-end) (and (save-excursion (beginning-of-line) (looking-at "^Subject:")) (> (point) (match-end 0)))) - (in-signature + ((> (point) signature-begin) nil) (t (save-excursion @@ -351,7 +390,8 @@ "Turn on `flyspell-mode' for comments and strings." (interactive) (setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify) - (flyspell-mode 1)) + (flyspell-mode 1) + (run-hooks 'flyspell-prog-mode-hook)) ;*---------------------------------------------------------------------*/ ;* Overlay compatibility */ @@ -366,21 +406,6 @@ (autoload 'previous-overlay-change "overlay" "Overlay compatibility kit." t) ;*---------------------------------------------------------------------*/ -;* Which emacs are we currently running */ -;*---------------------------------------------------------------------*/ -(defvar flyspell-emacs - (cond - ((string-match "XEmacs" emacs-version) - 'xemacs) - (t - 'emacs)) - "The type of Emacs we are currently running.") - -(defvar flyspell-use-local-map - (or (eq flyspell-emacs 'xemacs) - (not (string< emacs-version "20")))) - -;*---------------------------------------------------------------------*/ ;* The minor mode declaration. */ ;*---------------------------------------------------------------------*/ (eval-when-compile (defvar flyspell-local-mouse-map)) @@ -391,9 +416,13 @@ (defvar flyspell-mouse-map (let ((map (make-sparse-keymap))) + (if flyspell-use-meta-tab + (define-key map "\M-\t" #'flyspell-auto-correct-word)) (define-key map (if (featurep 'xemacs) [button2] [down-mouse-2]) #'flyspell-correct-word) - (define-key map "\M-\t" #'flyspell-auto-correct-word) + (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word) + (define-key map [(control \,)] 'flyspell-goto-next-error) + (define-key map [(control \.)] 'flyspell-auto-correct-word) map)) ;;;###autoload @@ -404,7 +433,18 @@ (setq minor-mode-map-alist (cons (cons 'flyspell-mode flyspell-mode-map) minor-mode-map-alist))) - (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word)) + (if flyspell-use-meta-tab + (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word)) + (cond + ((eq flyspell-emacs 'xemacs) + (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word) + (define-key flyspell-mode-map [(control \,)] 'flyspell-goto-next-error) + (define-key flyspell-mode-map [(control \.)] 'flyspell-auto-correct-word)) + (flyspell-use-local-map + (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word) + (define-key flyspell-mode-map [?\C-\,] 'flyspell-goto-next-error) + (define-key flyspell-mode-map [?\C-\.] 'flyspell-auto-correct-word)))) + ;; the name of the overlay property that defines the keymap (defvar flyspell-overlay-keymap-property-name 'keymap) @@ -456,7 +496,8 @@ Bindings: \\[ispell-word]: correct words (using Ispell). \\[flyspell-auto-correct-word]: automatically correct word. -\\[flyspell-correct-word] (or mouse-2): popup correct words. +\\[flyspell-auto-correct-previous-word]: automatically correct the last misspelled word. +\\[flyspell-correct-word] (or down-mouse-2): popup correct words. Hooks: This runs `flyspell-mode-hook' after flyspell is entered. @@ -512,22 +553,19 @@ (and (consp ws) (window-minibuffer-p (car ws))))) ;*---------------------------------------------------------------------*/ -;* flyspell-version ... */ -;*---------------------------------------------------------------------*/ -;;;###autoload -(defun flyspell-version () - "The flyspell version" - (interactive) - "1.6h") - -;*---------------------------------------------------------------------*/ ;* flyspell-accept-buffer-local-defs ... */ ;*---------------------------------------------------------------------*/ (defun flyspell-accept-buffer-local-defs () - (ispell-accept-buffer-local-defs) + ;; strange problem. If buffer in current window has font-lock turned on, + ;; but SET-BUFFER was called to point to an invisible buffer, this ispell + ;; call will reset the buffer to the buffer in the current window. However, + ;; it only happens at startup (fix by Albert L. Ting). + (let ((buf (current-buffer))) + (ispell-accept-buffer-local-defs) + (set-buffer buf)) (if (not (and (eq flyspell-dash-dictionary ispell-dictionary) (eq flyspell-dash-local-dictionary ispell-local-dictionary))) - ;; the dictionary has changed + ;; The dictionary has changed (progn (setq flyspell-dash-dictionary ispell-dictionary) (setq flyspell-dash-local-dictionary ispell-local-dictionary) @@ -566,6 +604,22 @@ (let ((mode-predicate (get major-mode 'flyspell-mode-predicate))) (if mode-predicate (setq flyspell-generic-check-word-p mode-predicate))) + ;; work around the fact that the `local-map' text-property replaces the + ;; buffer's local map rather than shadowing it. + (set (make-local-variable 'flyspell-mouse-map) + (let ((map (copy-keymap flyspell-mouse-map))) + (set-keymap-parent map (current-local-map)) + (if (and (eq flyspell-emacs 'emacs) + (not (string< emacs-version "20"))) + (define-key map '[tool-bar] nil)) + map)) + (set (make-local-variable 'flyspell-mode-map) + (let ((map (copy-keymap flyspell-mode-map))) + (set-keymap-parent map (current-local-map)) + (if (and (eq flyspell-emacs 'emacs) + (not (string< emacs-version "20"))) + (define-key map '[tool-bar] nil)) + map)) ;; the welcome message (if (and flyspell-issue-message-flag flyspell-issue-welcome-flag @@ -624,9 +678,11 @@ (defvar flyspell-word-cache-start nil) (defvar flyspell-word-cache-end nil) (defvar flyspell-word-cache-word nil) +(defvar flyspell-word-cache-result '_) (make-variable-buffer-local 'flyspell-word-cache-start) (make-variable-buffer-local 'flyspell-word-cache-end) (make-variable-buffer-local 'flyspell-word-cache-word) +(make-variable-buffer-local 'flyspell-word-cache-result) ;*---------------------------------------------------------------------*/ ;* The flyspell pre-hook, store the current position. In the */ @@ -678,7 +734,7 @@ ;* flyspell-check-pre-word-p ... */ ;*---------------------------------------------------------------------*/ (defun flyspell-check-pre-word-p () - "Return non-nil if we should to check the word before point. + "Return non-nil if we should check the word before point. More precisely, it applies to the word that was before point before the current command." (cond @@ -735,7 +791,7 @@ The answer depends of several criteria. Mostly we check word delimiters." (cond - ((and (eq (char-after start) ?\n) (> stop start)) + ((and (memq (char-after start) '(?\n ? )) (> stop start)) t) ((not (numberp flyspell-pre-point)) t) @@ -774,9 +830,7 @@ ((get this-command 'flyspell-delayed) ;; the current command is not delayed, that ;; is that we must check the word now - (if (fboundp 'about-xemacs) - (sit-for flyspell-delay nil) - (sit-for flyspell-delay 0 nil))) + (sit-for flyspell-delay)) (t t))) (t t))) @@ -924,7 +978,9 @@ ;; when a word is not checked because of a delayed command ;; we do not disable the ispell cache. (if (and (symbolp this-command) (get this-command 'flyspell-delayed)) - (setq flyspell-word-cache-end -1)))) + (progn + (setq flyspell-word-cache-end -1) + (setq flyspell-word-cache-result '_))))) (while (consp flyspell-changes) (let ((start (car (car flyspell-changes))) (stop (cdr (car flyspell-changes)))) @@ -949,6 +1005,34 @@ (message (format "mispelling `%s' %S" word replacements))))) ;*---------------------------------------------------------------------*/ +;* flyspell-word-search-backward ... */ +;*---------------------------------------------------------------------*/ +(defun flyspell-word-search-backward (word bound) + (save-excursion + (let ((r '()) + p) + (while (and (not r) (setq p (search-backward word bound t))) + (let ((lw (flyspell-get-word '()))) + (if (and (consp lw) (string-equal (car lw) word)) + (setq r p) + (goto-char p)))) + r))) + +;*---------------------------------------------------------------------*/ +;* flyspell-word-search-forward ... */ +;*---------------------------------------------------------------------*/ +(defun flyspell-word-search-forward (word bound) + (save-excursion + (let ((r '()) + p) + (while (and (not r) (setq p (search-forward word bound t))) + (let ((lw (flyspell-get-word '()))) + (if (and (consp lw) (string-equal (car lw) word)) + (setq r p) + (goto-char (1+ p))))) + r))) + +;*---------------------------------------------------------------------*/ ;* flyspell-word ... */ ;*---------------------------------------------------------------------*/ (defun flyspell-word (&optional following) @@ -963,7 +1047,7 @@ (if (or (eq flyspell-word nil) (and (fboundp flyspell-generic-check-word-p) (not (funcall flyspell-generic-check-word-p)))) - '() + t (progn ;; destructure return flyspell-word info list. (setq start (car (cdr flyspell-word)) @@ -972,21 +1056,24 @@ ;; before checking in the directory, we check for doublons. (cond ((and (or (not (eq ispell-parser 'tex)) - (not (eq (char-after start) ?\\))) + (and (> start (point-min)) + (not (eq (char-after (1- start)) ?})) + (not (eq (char-after (1- start)) ?\\)))) flyspell-mark-duplications-flag (save-excursion - (goto-char start) - (word-search-backward word - (- start - (+ 1 (- end start))) - t))) + (goto-char (1- start)) + (let ((p (flyspell-word-search-backward + word + (- start (1+ (- end start)))))) + (and p (/= p (1- start)))))) ;; yes, this is a doublon - (flyspell-highlight-incorrect-region start end 'doublon)) + (flyspell-highlight-incorrect-region start end 'doublon) + nil) ((and (eq flyspell-word-cache-start start) (eq flyspell-word-cache-end end) (string-equal flyspell-word-cache-word word)) ;; this word had been already checked, we skip - nil) + flyspell-word-cache-result) ((and (eq ispell-parser 'tex) (flyspell-tex-command-p flyspell-word)) ;; this is a correct word (because a tex command) @@ -1016,59 +1103,68 @@ (setq ispell-filter (cdr ispell-filter)) (if (consp ispell-filter) (setq poss (ispell-parse-output (car ispell-filter)))) - (cond ((eq poss t) - ;; correct - (flyspell-unhighlight-at start) - (if (> end start) - (flyspell-unhighlight-at (- end 1))) - t) - ((and (stringp poss) flyspell-highlight-flag) - ;; correct - (flyspell-unhighlight-at start) - (if (> end start) - (flyspell-unhighlight-at (- end 1))) - t) - ((null poss) - (flyspell-unhighlight-at start) - (if (> end start) - (flyspell-unhighlight-at (- end 1)))) - ((or (and (< flyspell-duplicate-distance 0) - (or (save-excursion - (goto-char start) - (word-search-backward word - (point-min) - t)) - (save-excursion - (goto-char end) - (word-search-forward word - (point-max) - t)))) - (and (> flyspell-duplicate-distance 0) - (or (save-excursion - (goto-char start) - (word-search-backward - word - (- start - flyspell-duplicate-distance) - t)) - (save-excursion - (goto-char end) - (word-search-forward - word - (+ end - flyspell-duplicate-distance) - t))))) - (if flyspell-highlight-flag - (flyspell-highlight-duplicate-region start end poss) - (message (format "duplicate `%s'" word)))) - (t - ;; incorrect highlight the location - (if flyspell-highlight-flag - (flyspell-highlight-incorrect-region start end poss) - (flyspell-notify-misspell start end word poss)))) - ;; return to original location - (goto-char cursor-location) - (if ispell-quit (setq ispell-quit nil))))))))) + (let ((res (cond ((eq poss t) + ;; correct + (setq flyspell-word-cache-result t) + (flyspell-unhighlight-at start) + (if (> end start) + (flyspell-unhighlight-at (- end 1))) + t) + ((and (stringp poss) flyspell-highlight-flag) + ;; correct + (setq flyspell-word-cache-result t) + (flyspell-unhighlight-at start) + (if (> end start) + (flyspell-unhighlight-at (- end 1))) + t) + ((null poss) + (setq flyspell-word-cache-result t) + (flyspell-unhighlight-at start) + (if (> end start) + (flyspell-unhighlight-at (- end 1))) + t) + ((or (and (< flyspell-duplicate-distance 0) + (or (save-excursion + (goto-char start) + (flyspell-word-search-backward + word + (point-min))) + (save-excursion + (goto-char end) + (flyspell-word-search-forward + word + (point-max))))) + (and (> flyspell-duplicate-distance 0) + (or (save-excursion + (goto-char start) + (flyspell-word-search-backward + word + (- start + flyspell-duplicate-distance))) + (save-excursion + (goto-char end) + (flyspell-word-search-forward + word + (+ end + flyspell-duplicate-distance)))))) + (setq flyspell-word-cache-result nil) + (if flyspell-highlight-flag + (flyspell-highlight-duplicate-region + start end poss) + (message (format "duplicate `%s'" word))) + nil) + (t + (setq flyspell-word-cache-result nil) + ;; incorrect highlight the location + (if flyspell-highlight-flag + (flyspell-highlight-incorrect-region + start end poss) + (flyspell-notify-misspell start end word poss)) + nil)))) + ;; return to original location + (goto-char cursor-location) + (if ispell-quit (setq ispell-quit nil)) + res)))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-tex-math-initialized ... */ @@ -1175,30 +1271,31 @@ ;*---------------------------------------------------------------------*/ ;* flyspell-get-word ... */ ;*---------------------------------------------------------------------*/ -(defun flyspell-get-word (following) +(defun flyspell-get-word (following &optional extra-otherchars) "Return the word for spell-checking according to Ispell syntax. -If argument FOLLOWING is non-nil or if `ispell-following-word' +If optional argument FOLLOWING is non-nil or if `flyspell-following-word' is non-nil when called interactively, then the following word \(rather than preceding\) is checked when the cursor is not over a word. -Optional second argument contains other chars that can be included in word +Optional second argument contains otherchars that can be included in word many times. -Word syntax described by `ispell-dictionary-alist' (which see)." +Word syntax described by `flyspell-dictionary-alist' (which see)." (let* ((flyspell-casechars (flyspell-get-casechars)) (flyspell-not-casechars (flyspell-get-not-casechars)) (ispell-otherchars (ispell-get-otherchars)) (ispell-many-otherchars-p (ispell-get-many-otherchars-p)) - (word-regexp (if (string< "" ispell-otherchars) - (concat flyspell-casechars - "+\\(" - ispell-otherchars - "?" - flyspell-casechars - "+\\)" - (if ispell-many-otherchars-p - "*" "?")) - (concat flyspell-casechars "+"))) - did-it-once + (word-regexp (concat flyspell-casechars + "+\\(" + (if (not (string= "" ispell-otherchars)) + (concat ispell-otherchars "?")) + (if extra-otherchars + (concat extra-otherchars "?")) + flyspell-casechars + "+\\)" + (if (or ispell-many-otherchars-p + extra-otherchars) + "*" "?"))) + did-it-once prevpt start end word) ;; find the word (if (not (looking-at flyspell-casechars)) @@ -1207,21 +1304,26 @@ (re-search-backward flyspell-casechars (point-min) t))) ;; move to front of word (re-search-backward flyspell-not-casechars (point-min) 'start) - (let ((pos nil)) - (if (string< "" ispell-otherchars) - (while (and (looking-at ispell-otherchars) - (not (bobp)) - (or (not did-it-once) - ispell-many-otherchars-p) - (not (eq pos (point)))) - (setq pos (point)) - (setq did-it-once t) + (while (and (or (and (not (string= "" ispell-otherchars)) + (looking-at ispell-otherchars)) + (and extra-otherchars (looking-at extra-otherchars))) + (not (bobp)) + (or (not did-it-once) + ispell-many-otherchars-p) + (not (eq prevpt (point)))) + (if (and extra-otherchars (looking-at extra-otherchars)) + (progn (backward-char 1) (if (looking-at flyspell-casechars) - (re-search-backward flyspell-not-casechars (point-min) 'move) - (backward-char -1))))) + (re-search-backward flyspell-not-casechars (point-min) 'move))) + (setq did-it-once t + prevpt (point)) + (backward-char 1) + (if (looking-at flyspell-casechars) + (re-search-backward flyspell-not-casechars (point-min) 'move) + (backward-char -1)))) ;; Now mark the word and save to string. - (if (eq (re-search-forward word-regexp (point-max) t) nil) + (if (not (re-search-forward word-regexp (point-max) t)) nil (progn (setq start (match-beginning 0) @@ -1280,25 +1382,37 @@ (set-buffer buffer) (goto-char (point-min)) (let ((size (- flyspell-large-region-end flyspell-large-region-beg)) - (start flyspell-large-region-beg)) + (start flyspell-large-region-beg) + (pword "") + (pcount 1)) ;; now we are done with ispell, we have to find the word in ;; the initial buffer (while (< (point) (- (point-max) 1)) ;; we have to fetch the incorrect word (if (re-search-forward "\\([^\n]+\\)\n" (point-max) t) (let ((word (match-string 1))) + (if (string= word pword) + (setq pcount (1+ pcount)) + (progn + (setq pword word) + (setq pcount 1))) (goto-char (match-end 0)) - (set-buffer flyspell-large-region-buffer) - (goto-char flyspell-large-region-beg) (if flyspell-issue-message-flag (message "Spell Checking...%d%% [%s]" - (* 100 (/ (float (- (point) start)) size)) + (* 100 (/ (float (point)) (point-max))) word)) - (if (search-forward word flyspell-large-region-end t) + (set-buffer flyspell-large-region-buffer) + (goto-char flyspell-large-region-beg) + (let ((keep t) + (n 0)) + (while (and (or (< n pcount) keep) + (search-forward word flyspell-large-region-end t)) (progn - (setq flyspell-large-region-beg (point)) (goto-char (- (point) 1)) - (flyspell-word))) + (setq n (1+ n)) + (setq keep (flyspell-word)))) + (if (= n pcount) + (setq flyspell-large-region-beg (point)))) (set-buffer buffer)) (goto-char (point-max))))) ;; we are done @@ -1370,7 +1484,7 @@ (let ((old beg)) (setq beg end) (setq end old))) - (if (> (- end beg) flyspell-large-region) + (if (and flyspell-large-region (> (- end beg) flyspell-large-region)) (flyspell-large-region beg end) (flyspell-small-region beg end))))) @@ -1517,15 +1631,23 @@ (if (or flyspell-highlight-properties (not (flyspell-properties-at-p beg))) (progn + ;; we cleanup all the overlay that are in the region, not + ;; beginning at the word start position + (if (< (1+ beg) end) + (let ((os (overlays-in (1+ beg) end))) + (while (consp os) + (if (flyspell-overlay-p (car os)) + (delete-overlay (car os))) + (setq os (cdr os))))) ;; we cleanup current overlay at the same position (if (and (not flyspell-persistent-highlight) (overlayp flyspell-overlay)) (delete-overlay flyspell-overlay) - (let ((overlays (overlays-at beg))) - (while (consp overlays) - (if (flyspell-overlay-p (car overlays)) - (delete-overlay (car overlays))) - (setq overlays (cdr overlays))))) + (let ((os (overlays-at beg))) + (while (consp os) + (if (flyspell-overlay-p (car os)) + (delete-overlay (car os))) + (setq os (cdr os))))) ;; now we can use a new overlay (setq flyspell-overlay (make-flyspell-overlay @@ -1677,69 +1799,71 @@ (flyspell-ajust-cursor-point pos (point) old-max) (setq flyspell-auto-correct-pos (point))) ;; fetch the word to be checked - (let ((word (flyspell-get-word nil)) - start end poss) - ;; destructure return word info list. - (setq start (car (cdr word)) - end (car (cdr (cdr word))) - word (car word)) - (setq flyspell-auto-correct-word word) - ;; now check spelling of word. - (process-send-string ispell-process "%\n") ;put in verbose mode - (process-send-string ispell-process (concat "^" word "\n")) - ;; wait until ispell has processed word - (while (progn - (accept-process-output ispell-process) - (not (string= "" (car ispell-filter))))) - (setq ispell-filter (cdr ispell-filter)) - (if (consp ispell-filter) - (setq poss (ispell-parse-output (car ispell-filter)))) - (cond ((or (eq poss t) (stringp poss)) - ;; don't correct word - t) - ((null poss) - ;; ispell error - (error "Ispell: error in Ispell process")) - (t - ;; the word is incorrect, we have to propose a replacement - (let ((replacements (if flyspell-sort-corrections - (sort (car (cdr (cdr poss))) 'string<) - (car (cdr (cdr poss)))))) - (setq flyspell-auto-correct-region nil) - (if (consp replacements) - (progn - (let ((replace (car replacements))) - (let ((new-word replace)) - (if (not (equal new-word (car poss))) - (progn - ;; the save the current replacements - (setq flyspell-auto-correct-region - (cons start (length new-word))) - (let ((l replacements)) - (while (consp (cdr l)) - (setq l (cdr l))) - (rplacd l (cons (car poss) replacements))) - (setq flyspell-auto-correct-ring - replacements) - (flyspell-unhighlight-at start) - (delete-region start end) - (funcall flyspell-insert-function new-word) - (if flyspell-abbrev-p - (if (flyspell-already-abbrevp - (flyspell-abbrev-table) word) - (flyspell-change-abbrev - (flyspell-abbrev-table) - word - new-word) - (flyspell-define-abbrev word new-word))) - (flyspell-word) - (flyspell-display-next-corrections - (cons new-word flyspell-auto-correct-ring)) - (flyspell-ajust-cursor-point pos - (point) - old-max)))))))))) - (setq flyspell-auto-correct-pos (point)) - (ispell-pdict-save t))))) + (let ((word (flyspell-get-word nil))) + (if (consp word) + (let ((start (car (cdr word))) + (end (car (cdr (cdr word)))) + (word (car word)) + poss) + (setq flyspell-auto-correct-word word) + ;; now check spelling of word. + (process-send-string ispell-process "%\n") ;put in verbose mode + (process-send-string ispell-process (concat "^" word "\n")) + ;; wait until ispell has processed word + (while (progn + (accept-process-output ispell-process) + (not (string= "" (car ispell-filter))))) + (setq ispell-filter (cdr ispell-filter)) + (if (consp ispell-filter) + (setq poss (ispell-parse-output (car ispell-filter)))) + (cond + ((or (eq poss t) (stringp poss)) + ;; don't correct word + t) + ((null poss) + ;; ispell error + (error "Ispell: error in Ispell process")) + (t + ;; the word is incorrect, we have to propose a replacement + (let ((replacements (if flyspell-sort-corrections + (sort (car (cdr (cdr poss))) 'string<) + (car (cdr (cdr poss)))))) + (setq flyspell-auto-correct-region nil) + (if (consp replacements) + (progn + (let ((replace (car replacements))) + (let ((new-word replace)) + (if (not (equal new-word (car poss))) + (progn + ;; the save the current replacements + (setq flyspell-auto-correct-region + (cons start (length new-word))) + (let ((l replacements)) + (while (consp (cdr l)) + (setq l (cdr l))) + (rplacd l (cons (car poss) replacements))) + (setq flyspell-auto-correct-ring + replacements) + (flyspell-unhighlight-at start) + (delete-region start end) + (funcall flyspell-insert-function new-word) + (if flyspell-abbrev-p + (if (flyspell-already-abbrevp + (flyspell-abbrev-table) word) + (flyspell-change-abbrev + (flyspell-abbrev-table) + word + new-word) + (flyspell-define-abbrev word + new-word))) + (flyspell-word) + (flyspell-display-next-corrections + (cons new-word flyspell-auto-correct-ring)) + (flyspell-ajust-cursor-point pos + (point) + old-max)))))))))) + (setq flyspell-auto-correct-pos (point)) + (ispell-pdict-save t))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-auto-correct-previous-pos ... */ @@ -1752,8 +1876,8 @@ ;*---------------------------------------------------------------------*/ (defun flyspell-auto-correct-previous-hook () "Hook to track successive calls to `flyspell-auto-correct-previous-word'. -Sets flyspell-auto-correct-previous-pos to nil" - (interactive) +Sets `flyspell-auto-correct-previous-pos' to nil" + (interactive) (remove-hook 'pre-command-hook (function flyspell-auto-correct-previous-hook) t) (unless (eq this-command (function flyspell-auto-correct-previous-word)) (setq flyspell-auto-correct-previous-pos nil))) @@ -1761,45 +1885,56 @@ ;*---------------------------------------------------------------------*/ ;* flyspell-auto-correct-previous-word ... */ ;*---------------------------------------------------------------------*/ -(defun flyspell-auto-correct-previous-word (position) - "*Auto correct the first mispelled word that occurs before point." +(defun flyspell-auto-correct-previous-word (position) + "*Auto correct the first mispelled word that occurs before point. +But don't look beyond what's visible on the screen." (interactive "d") - (add-hook 'pre-command-hook - (function flyspell-auto-correct-previous-hook) t t) + (let (top bot) + (save-excursion + (move-to-window-line 0) + (setq top (point)) + (move-to-window-line -1) + (setq bot (point))) + (save-excursion + (save-restriction + (narrow-to-region top bot) + (overlay-recenter (point)) - (save-excursion - (unless flyspell-auto-correct-previous-pos - ;; only reset if a new overlay exists - (setq flyspell-auto-correct-previous-pos nil) - - (let ((overlay-list (overlays-in (point-min) position)) - (new-overlay 'dummy-value)) + (add-hook 'pre-command-hook + (function flyspell-auto-correct-previous-hook) t t) - ;; search for previous (new) flyspell overlay - (while (and new-overlay - (or (not (flyspell-overlay-p new-overlay)) - ;; check if its face has changed - (not (eq (get-char-property - (overlay-start new-overlay) 'face) - 'flyspell-incorrect-face)))) - (setq new-overlay (car-safe overlay-list)) - (setq overlay-list (cdr-safe overlay-list))) + (unless flyspell-auto-correct-previous-pos + ;; only reset if a new overlay exists + (setq flyspell-auto-correct-previous-pos nil) + + (let ((overlay-list (overlays-in (point-min) position)) + (new-overlay 'dummy-value)) + + ;; search for previous (new) flyspell overlay + (while (and new-overlay + (or (not (flyspell-overlay-p new-overlay)) + ;; check if its face has changed + (not (eq (get-char-property + (overlay-start new-overlay) 'face) + 'flyspell-incorrect-face)))) + (setq new-overlay (car-safe overlay-list)) + (setq overlay-list (cdr-safe overlay-list))) + + ;; if nothing new exits new-overlay should be nil + (if new-overlay ;; the length of the word may change so go to the start + (setq flyspell-auto-correct-previous-pos + (overlay-start new-overlay))))) - ;; if nothing new exits new-overlay should be nil - (if new-overlay;; the length of the word may change so go to the start - (setq flyspell-auto-correct-previous-pos - (overlay-start new-overlay))))) - - (when flyspell-auto-correct-previous-pos - (save-excursion - (goto-char flyspell-auto-correct-previous-pos) - (let ((ispell-following-word t));; point is at start - (if (numberp flyspell-auto-correct-previous-pos) - (goto-char flyspell-auto-correct-previous-pos)) - (flyspell-auto-correct-word)) - ;; the point may have moved so reset this - (setq flyspell-auto-correct-previous-pos (point)))))) + (when flyspell-auto-correct-previous-pos + (save-excursion + (goto-char flyspell-auto-correct-previous-pos) + (let ((ispell-following-word t)) ;; point is at start + (if (numberp flyspell-auto-correct-previous-pos) + (goto-char flyspell-auto-correct-previous-pos)) + (flyspell-auto-correct-word)) + ;; the point may have moved so reset this + (setq flyspell-auto-correct-previous-pos (point)))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-correct-word ... */ @@ -1814,72 +1949,76 @@ (let ((save (point))) (mouse-set-point event) (let ((cursor-location (point)) - (word (flyspell-get-word nil)) - start end poss replace) - ;; destructure return word info list. - (setq start (car (cdr word)) - end (car (cdr (cdr word))) - word (car word)) - ;; now check spelling of word. - (process-send-string ispell-process "%\n") ;put in verbose mode - (process-send-string ispell-process (concat "^" word "\n")) - ;; wait until ispell has processed word - (while (progn - (accept-process-output ispell-process) - (not (string= "" (car ispell-filter))))) - (setq ispell-filter (cdr ispell-filter)) - (if (consp ispell-filter) - (setq poss (ispell-parse-output (car ispell-filter)))) - (cond ((or (eq poss t) (stringp poss)) - ;; don't correct word - t) - ((null poss) - ;; ispell error - (error "Ispell: error in Ispell process")) - ((string-match "GNU" (emacs-version)) - ;; the word is incorrect, we have to propose a replacement - (setq replace (flyspell-emacs-popup event poss word)) - (cond ((eq replace 'ignore) - (goto-char save) - nil) - ((eq replace 'save) - (goto-char save) - (process-send-string ispell-process (concat "*" word "\n")) - (flyspell-unhighlight-at cursor-location) - (setq ispell-pdict-modified-p '(t))) - ((or (eq replace 'buffer) (eq replace 'session)) - (process-send-string ispell-process (concat "@" word "\n")) - (if (null ispell-pdict-modified-p) - (setq ispell-pdict-modified-p - (list ispell-pdict-modified-p))) - (flyspell-unhighlight-at cursor-location) - (goto-char save) - (if (eq replace 'buffer) - (ispell-add-per-file-word-list word))) - (replace - (flyspell-unhighlight-at cursor-location) - (let ((new-word (if (atom replace) - replace - (car replace))) - (cursor-location (+ (- (length word) (- end start)) - cursor-location))) - (if (not (equal new-word (car poss))) - (let ((old-max (point-max))) - (delete-region start end) - (funcall flyspell-insert-function new-word) - (if flyspell-abbrev-p - (flyspell-define-abbrev word new-word)) - (flyspell-ajust-cursor-point save - cursor-location - old-max))))) - (t - (goto-char save) - nil))) - ((eq flyspell-emacs 'xemacs) - (flyspell-xemacs-popup - event poss word cursor-location start end save) - (goto-char save))) - (ispell-pdict-save t)))) + (word (flyspell-get-word nil))) + (if (consp word) + (let ((start (car (cdr word))) + (end (car (cdr (cdr word)))) + (word (car word)) + poss replace) + ;; now check spelling of word. + (process-send-string ispell-process "%\n") ;put in verbose mode + (process-send-string ispell-process (concat "^" word "\n")) + ;; wait until ispell has processed word + (while (progn + (accept-process-output ispell-process) + (not (string= "" (car ispell-filter))))) + (setq ispell-filter (cdr ispell-filter)) + (if (consp ispell-filter) + (setq poss (ispell-parse-output (car ispell-filter)))) + (cond + ((or (eq poss t) (stringp poss)) + ;; don't correct word + t) + ((null poss) + ;; ispell error + (error "Ispell: error in Ispell process")) + ((string-match "GNU" (emacs-version)) + ;; the word is incorrect, we have to propose a replacement + (setq replace (flyspell-emacs-popup event poss word)) + (cond ((eq replace 'ignore) + (goto-char save) + nil) + ((eq replace 'save) + (goto-char save) + (process-send-string ispell-process + (concat "*" word "\n")) + (flyspell-unhighlight-at cursor-location) + (setq ispell-pdict-modified-p '(t))) + ((or (eq replace 'buffer) (eq replace 'session)) + (process-send-string ispell-process + (concat "@" word "\n")) + (if (null ispell-pdict-modified-p) + (setq ispell-pdict-modified-p + (list ispell-pdict-modified-p))) + (flyspell-unhighlight-at cursor-location) + (goto-char save) + (if (eq replace 'buffer) + (ispell-add-per-file-word-list word))) + (replace + (flyspell-unhighlight-at cursor-location) + (let ((new-word (if (atom replace) + replace + (car replace))) + (cursor-location + (+ (- (length word) (- end start)) + cursor-location))) + (if (not (equal new-word (car poss))) + (let ((old-max (point-max))) + (delete-region start end) + (funcall flyspell-insert-function new-word) + (if flyspell-abbrev-p + (flyspell-define-abbrev word new-word)) + (flyspell-ajust-cursor-point save + cursor-location + old-max))))) + (t + (goto-char save) + nil))) + ((eq flyspell-emacs 'xemacs) + (flyspell-xemacs-popup + event poss word cursor-location start end save) + (goto-char save))) + (ispell-pdict-save t)))))) ;*---------------------------------------------------------------------*/ ;* flyspell-xemacs-correct ... */
--- a/lisp/textmodes/org.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/org.el Mon Jun 06 02:39:45 2005 +0000 @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik <dominik at science dot uva dot nl> ;; Keywords: outlines, hypermedia, calendar ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 3.09 +;; Version: 3.10 ;; ;; This file is part of GNU Emacs. ;; @@ -80,6 +80,9 @@ ;; ;; Changes: ;; ------- +;; Version 3.10 +;; - Using `define-derived-mode' to derive `org-mode' from `outline-mode'. +;; ;; Version 3.09 ;; - Time-of-day specifications in agenda are extracted and placed ;; into the prefix. Timed entries can be placed into a time grid for @@ -151,10 +154,12 @@ (require 'outline) (require 'time-date) (require 'easymenu) +(or (fboundp 'run-mode-hooks) + (defalias 'run-mode-hooks 'run-hooks)) ;;; Customization variables -(defvar org-version "3.09" +(defvar org-version "3.10" "The version number of the file org.el.") (defun org-version () (interactive) @@ -372,7 +377,11 @@ -*- mode: org; org-category: \"ELisp\" -If the file does not specify a category, the file's base name +or contain a special line + +#+CATEGORY: ELisp + +If the file does not specify a category, then file's base name is used instead.") (defun org-set-regexps-and-options () @@ -1525,7 +1534,7 @@ ;;;###autoload -(defun org-mode (&optional arg) +(define-derived-mode org-mode outline-mode "Org" "Outline-based notes management and organizer, alias \"Carstens outline-mode for keeping track of everything.\" @@ -1538,16 +1547,11 @@ Plain text URL-like links connect to websites, emails (VM), Usenet messages (Gnus), BBDB entries, and any files related to the project. For printing and sharing of notes, an Org-mode file (or a part of it) -can be exported as a well-structured ASCII or HTML file. +can be exported as a structured ASCII or HTML file. The following commands are available: \\{org-mode-map}" - (interactive "P") - (outline-mode) - (setq major-mode 'org-mode) - (setq mode-name "Org") - (use-local-map org-mode-map) (easy-menu-add org-org-menu) (org-install-agenda-files-menu) (setq outline-regexp "\\*+") @@ -1569,15 +1573,10 @@ (if org-enable-table-editor "|" "") (if org-enable-fixed-width-editor ":" "") "]")))) - ;; Hook, and startup actions - (if (or arg - (and org-insert-mode-line-in-empty-file - (interactive-p) - (= (point-min) (point-max)))) - (save-excursion - (goto-char (point-min)) - (insert " -*- mode: org -*-\n\n"))) - (run-hooks 'org-mode-hook) + (if (and org-insert-mode-line-in-empty-file + (interactive-p) + (= (point-min) (point-max))) + (insert " -*- mode: org -*-\n\n")) (unless org-inhibit-startup (if org-startup-with-deadline-check (call-interactively 'org-check-deadlines) @@ -1641,7 +1640,6 @@ 'keymap org-mouse-map)) t))) - (defun org-font-lock-level () (save-excursion (org-back-to-heading t) @@ -3120,7 +3118,7 @@ "--") (mapcar 'org-file-menu-entry org-agenda-files))) (org-agenda-set-mode-name) - (run-hooks 'org-agenda-mode-hook)) + (run-mode-hooks 'org-agenda-mode-hook)) (define-key org-agenda-mode-map [(tab)] 'org-agenda-goto) (define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to) @@ -6700,7 +6698,7 @@ (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) "[ \t]*|")) (easy-menu-add orgtbl-mode-menu) - (run-hooks (quote orgtbl-mode-hook))) + (run-hooks 'orgtbl-mode-hook)) (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp) (remove-hook 'before-change-functions 'org-before-change-function t) (easy-menu-remove orgtbl-mode-menu) @@ -8433,7 +8431,7 @@ ;;; Menu entries -;; First, remove the outline menus. +;; First, remove the outline menus. Org-mode does not neede these commands. (if org-xemacs-p (add-hook 'org-mode-hook (lambda () @@ -8442,7 +8440,7 @@ (delete-menu-item '("Hide")) (set-menubar-dirty-flag))) (setq org-mode-map (delq (assoc 'menu-bar (cdr org-mode-map)) - org-mode-map))) + org-mode-map))) ;; Define the Org-mode menus (easy-menu-define org-org-menu org-mode-map "Org menu"
--- a/lisp/textmodes/reftex-index.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/reftex-index.el Mon Jun 06 02:39:45 2005 +0000 @@ -310,7 +310,7 @@ (easy-menu-add reftex-index-menu reftex-index-map) (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t) (add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t) - (run-hooks 'reftex-index-mode-hook)) + (run-mode-hooks 'reftex-index-mode-hook)) (defconst reftex-index-help " AVAILABLE KEYS IN INDEX BUFFER @@ -1308,7 +1308,7 @@ reftex-index-phrases-font-lock-defaults) (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map) (set (make-local-variable 'reftex-index-phrases-marker) (make-marker)) - (run-hooks 'reftex-index-phrases-mode-hook)) + (run-mode-hooks 'reftex-index-phrases-mode-hook)) (add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock) ;; Font Locking stuff
--- a/lisp/textmodes/reftex-sel.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/reftex-sel.el Mon Jun 06 02:39:45 2005 +0000 @@ -60,7 +60,7 @@ (when (syntax-table-p reftex-latex-syntax-table) (set-syntax-table reftex-latex-syntax-table)) ;; We do not set a local map - reftex-select-item does this. - (run-hooks 'reftex-select-label-mode-hook)) + (run-mode-hooks 'reftex-select-label-mode-hook)) (defvar reftex-select-bib-map nil "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry. @@ -88,7 +88,7 @@ mode-name "BSelect") (set (make-local-variable 'reftex-select-marked) nil) ;; We do not set a local map - reftex-select-item does this. - (run-hooks 'reftex-select-bib-mode-hook)) + (run-mode-hooks 'reftex-select-bib-mode-hook)) ;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) ;;; ;; Find the correct offset data, like insert-docstruct would, but faster.
--- a/lisp/textmodes/reftex-toc.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/reftex-toc.el Mon Jun 06 02:39:45 2005 +0000 @@ -73,7 +73,7 @@ (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t) (add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t) (easy-menu-add reftex-toc-menu reftex-toc-map) - (run-hooks 'reftex-toc-mode-hook)) + (run-mode-hooks 'reftex-toc-mode-hook)) (defvar reftex-last-toc-file nil "Stores the file name from which `reftex-toc' was called. For redo command.")
--- a/lisp/textmodes/sgml-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/sgml-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -248,7 +248,8 @@ (defface sgml-namespace-face '((t (:inherit font-lock-builtin-face))) - "`sgml-mode' face used to highlight the namespace part of identifiers.") + "`sgml-mode' face used to highlight the namespace part of identifiers." + :group 'sgml) (defvar sgml-namespace-face 'sgml-namespace-face) ;; internal
--- a/lisp/textmodes/tex-mode.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/tex-mode.el Mon Jun 06 02:39:45 2005 +0000 @@ -643,19 +643,23 @@ (defface superscript '((t :height 0.8)) ;; :raise 0.3 - "Face used for superscripts.") + "Face used for superscripts." + :group 'tex) (defface subscript '((t :height 0.8)) ;; :raise -0.3 - "Face used for subscripts.") + "Face used for subscripts." + :group 'tex) (defface tex-math-face '((t :inherit font-lock-string-face)) - "Face used to highlight TeX math expressions.") + "Face used to highlight TeX math expressions." + :group 'tex) (defvar tex-math-face 'tex-math-face) (defface tex-verbatim-face ;; '((t :inherit font-lock-string-face)) '((t :family "courier")) - "Face used to highlight TeX verbatim environments.") + "Face used to highlight TeX verbatim environments." + :group 'tex) (defvar tex-verbatim-face 'tex-verbatim-face) ;; Use string syntax but math face for $...$. @@ -1623,7 +1627,8 @@ (defcustom tex-use-reftex t "If non-nil, use RefTeX's list of files to determine what command to use." - :type 'boolean) + :type 'boolean + :group 'tex) (defvar tex-compile-commands '(((concat "pdf" tex-command @@ -2227,8 +2232,7 @@ (tex-start-shell)) (tex-send-command (if alt tex-alt-dvi-print-command tex-dvi-print-command) - (shell-quote-argument - print-file-name-dvi) + print-file-name-dvi t)))) (defun tex-alt-print ()
--- a/lisp/textmodes/texinfo.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/textmodes/texinfo.el Mon Jun 06 02:39:45 2005 +0000 @@ -345,7 +345,8 @@ (defface texinfo-heading-face '((t (:inherit font-lock-function-name-face))) - "Face used for section headings in `texinfo-mode'.") + "Face used for section headings in `texinfo-mode'." + :group 'texinfo) (defvar texinfo-heading-face 'texinfo-heading-face) (defvar texinfo-font-lock-keywords
--- a/lisp/thumbs.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/thumbs.el Mon Jun 06 02:39:45 2005 +0000 @@ -302,18 +302,21 @@ (defun thumbs-thumbname (img) "Return a thumbnail name for the image IMG." - (concat thumbs-thumbsdir "/" - (subst-char-in-string - ?\ ?\_ - (apply - 'concat - (split-string - (expand-file-name img) "/"))))) + (convert-standard-filename + (let ((filename (expand-file-name img))) + (format "%s/%08x-%s.jpg" + thumbs-thumbsdir + (sxhash filename) + (subst-char-in-string + ?\s ?\_ + (apply + 'concat + (split-string filename "/"))))))) (defun thumbs-make-thumb (img) "Create the thumbnail for IMG." - (let* ((fn (expand-file-name img)) - (tn (thumbs-thumbname img))) + (let ((fn (expand-file-name img)) + (tn (thumbs-thumbname img))) (if (or (not (file-exists-p tn)) ;; This is not the right fix, but I don't understand ;; the external program or why it produces a geometry @@ -378,8 +381,9 @@ (unless (bobp) (newline)))) (defun thumbs-show-thumbs-list (L &optional buffer-name same-window) - (when (not (display-images-p)) - (error "Images are not supported in this Emacs session")) + (unless (and (display-images-p) + (image-type-available-p 'jpeg)) + (error "Required image type is not supported in this Emacs session")) (funcall (if same-window 'switch-to-buffer 'pop-to-buffer) (or buffer-name "*THUMB-View*")) (let ((inhibit-read-only t)) @@ -754,9 +758,8 @@ (define-derived-mode thumbs-mode fundamental-mode "thumbs" "Preview images in a thumbnails buffer" - (make-variable-buffer-local 'thumbs-markedL) (setq buffer-read-only t) - (setq thumbs-markedL nil)) + (set (make-local-variable 'thumbs-markedL) nil)) (defvar thumbs-view-image-mode-map (let ((map (make-sparse-keymap))) @@ -793,7 +796,5 @@ (provide 'thumbs) +;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c ;;; thumbs.el ends here - - -;;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c
--- a/lisp/time.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/time.el Mon Jun 06 02:39:45 2005 +0000 @@ -200,6 +200,7 @@ (list :background bg))))) 'face display-time-mail-face 'help-echo "You have new mail; mouse-2: Read mail" + 'mouse-face 'mode-line-highlight 'local-map (make-mode-line-mouse-map 'mouse-2 read-mail-command))) "")) @@ -293,6 +294,7 @@ (concat (substring str 0 -2) "." (substring str -2)) 'local-map (make-mode-line-mouse-map 'mouse-2 'display-time-next-load-average) + 'mouse-face 'mode-line-highlight 'help-echo (concat "System load average for past " (if (= 0 display-time-load-average)
--- a/lisp/tmm.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/tmm.el Mon Jun 06 02:39:45 2005 +0000 @@ -133,6 +133,12 @@ :type '(choice integer (const nil)) :group 'tmm) +(require 'font-lock) +(defface tmm-inactive-face + '((t :inherit font-lock-comment-face)) + "Face used for inactive menu items." + :group 'tmm) + ;;;###autoload (defun tmm-prompt (menu &optional in-popup default-item) "Text-mode emulation of calling the bindings in keymap. @@ -193,7 +199,14 @@ (eq (car-safe (cdr (car tail))) 'menu-item))) (setq index-of-default (1+ index-of-default))) (setq tail (cdr tail))))) - (setq history (reverse (mapcar 'car tmm-km-list))) + (let ((prompt (concat "^." (regexp-quote tmm-mid-prompt)))) + (setq history + (reverse (delq nil + (mapcar + (lambda (elt) + (if (string-match prompt (car elt)) + (car elt))) + tmm-km-list))))) (setq history-len (length history)) (setq history (append history history history history)) (setq tmm-c-prompt (nth (- history-len 1 index-of-default) history)) @@ -259,37 +272,43 @@ (defsubst tmm-add-one-shortcut (elt) ;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts - (let* ((str (car elt)) - (paren (string-match "(" str)) - (pos 0) (word 0) char) - (catch 'done ; ??? is this slow? - (while (and (or (not tmm-shortcut-words) ; no limit on words - (< word tmm-shortcut-words)) ; try n words - (setq pos (string-match "\\w+" str pos)) ; get next word - (not (and paren (> pos paren)))) ; don't go past "(binding.." - (if (or (= pos 0) - (/= (aref str (1- pos)) ?.)) ; avoid file extensions - (let ((shortcut-style - (if (listp tmm-shortcut-style) ; convert to list - tmm-shortcut-style - (list tmm-shortcut-style)))) - (while shortcut-style ; try upcase and downcase variants - (setq char (funcall (car shortcut-style) (aref str pos))) - (if (not (memq char tmm-short-cuts)) (throw 'done char)) - (setq shortcut-style (cdr shortcut-style))))) - (setq word (1+ word)) - (setq pos (match-end 0))) - (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit - (setq char tmm-next-shortcut-digit) - (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit)) - (if (not (memq char tmm-short-cuts)) (throw 'done char))) - (setq char nil)) - (if char (setq tmm-short-cuts (cons char tmm-short-cuts))) - (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt) - ;; keep them lined up in columns - (make-string (1+ (length tmm-mid-prompt)) ?\ )) - str) - (cdr elt)))) + (cond + ((eq (cddr elt) 'ignore) + (cons (concat " " (make-string (length tmm-mid-prompt) ?\-) + (car elt)) + (cdr elt))) + (t + (let* ((str (car elt)) + (paren (string-match "(" str)) + (pos 0) (word 0) char) + (catch 'done ; ??? is this slow? + (while (and (or (not tmm-shortcut-words) ; no limit on words + (< word tmm-shortcut-words)) ; try n words + (setq pos (string-match "\\w+" str pos)) ; get next word + (not (and paren (> pos paren)))) ; don't go past "(binding.." + (if (or (= pos 0) + (/= (aref str (1- pos)) ?.)) ; avoid file extensions + (let ((shortcut-style + (if (listp tmm-shortcut-style) ; convert to list + tmm-shortcut-style + (list tmm-shortcut-style)))) + (while shortcut-style ; try upcase and downcase variants + (setq char (funcall (car shortcut-style) (aref str pos))) + (if (not (memq char tmm-short-cuts)) (throw 'done char)) + (setq shortcut-style (cdr shortcut-style))))) + (setq word (1+ word)) + (setq pos (match-end 0))) + (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit + (setq char tmm-next-shortcut-digit) + (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit)) + (if (not (memq char tmm-short-cuts)) (throw 'done char))) + (setq char nil)) + (if char (setq tmm-short-cuts (cons char tmm-short-cuts))) + (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt) + ;; keep them lined up in columns + (make-string (1+ (length tmm-mid-prompt)) ?\ )) + str) + (cdr elt)))))) ;; This returns the old map. (defun tmm-define-keys (minibuffer) @@ -319,9 +338,27 @@ (goto-char 1) (delete-region 1 (search-forward "Possible completions are:\n"))) +(defun tmm-remove-inactive-mouse-face () + "Remove the mouse-face property from inactive menu items." + (let ((inhibit-read-only t) + (inactive-string + (concat " " (make-string (length tmm-mid-prompt) ?\-))) + next) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (setq next (next-single-char-property-change (point) 'mouse-face)) + (when (looking-at inactive-string) + (remove-text-properties (point) next '(mouse-face)) + (add-text-properties (point) next '(face tmm-inactive-face))) + (goto-char next))) + (set-buffer-modified-p nil))) + (defun tmm-add-prompt () (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t) + (unless tmm-c-prompt + (error "No active menu entries")) (let ((win (selected-window))) (setq tmm-old-mb-map (tmm-define-keys t)) ;; Get window and hide it for electric mode to get correct size @@ -334,8 +371,9 @@ (with-output-to-temp-buffer "*Completions*" (display-completion-list completions)) (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)) + (set-buffer "*Completions*") + (tmm-remove-inactive-mouse-face) (when tmm-completion-prompt - (set-buffer "*Completions*") (let ((buffer-read-only nil)) (goto-char (point-min)) (insert tmm-completion-prompt)))) @@ -345,7 +383,6 @@ (Electric-pop-up-window "*Completions*") (with-current-buffer "*Completions*" (setq tmm-old-comp-map (tmm-define-keys nil)))) - (insert tmm-c-prompt))) (defun tmm-delete-map () @@ -438,7 +475,7 @@ (setq km (and (eval visible) km))) (setq enable (plist-get plist :enable)) (if enable - (setq km (and (eval enable) km))) + (setq km (if (eval enable) km 'ignore))) (and str (consp (nth 3 elt)) (stringp (cdr (nth 3 elt))) ; keyseq cache @@ -467,8 +504,7 @@ ;; Verify that the command is enabled; ;; if not, don't mention it. (when (and km (symbolp km) (get km 'menu-enable)) - (unless (eval (get km 'menu-enable)) - (setq km nil))) + (setq km (if (eval (get km 'menu-enable)) km 'ignore))) (and km str (or (assoc str tmm-km-list) (push (cons str (cons event km)) tmm-km-list))))))
--- a/lisp/toolbar/gud-break.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-break.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * stop_xpm[] = { "24 24 3 1", -" c #C0C0C0C0C0C0", +" c None", ". c #F8F810104040", "X c #F8F8FCFCF8F8", " ",
--- a/lisp/toolbar/gud-cont.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-cont.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * continue_xpm[] = { "24 24 6 1", -" c #c0c0c0", +" c None", ". c #cc0033", "X c #d99faa", "o c #616161",
--- a/lisp/toolbar/gud-down.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-down.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * down_xpm[] = { "24 24 14 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000000000000", "X c #7F7F7F7F7F7F", "o c #2D2D2D2D2D2D",
--- a/lisp/toolbar/gud-finish.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-finish.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * finish_xpm[] = { "24 24 7 1", -" c #c0c0c0", +" c None", ". c #cc0033", "X c #616161", "o c #2a1f55",
--- a/lisp/toolbar/gud-n.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-n.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * next_xpm[] = { "24 24 7 1", -" c #c0c0c0", +" c None", ". c #cc0033", "X c #616161", "o c #2a1f55",
--- a/lisp/toolbar/gud-ni.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-ni.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * gud_nexti_xpm[] = { "24 24 6 1", -" c #C0C0C0C0C0C0", +" c None", ". c #CCCC00003333", "X c #616161616161", "o c #D4D400000000",
--- a/lisp/toolbar/gud-print.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-print.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * print_xpm[] = { "24 24 2 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000000000000", " ", " ",
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/toolbar/gud-pstar.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -0,0 +1,29 @@ +/* XPM */ +static char * gud_pstar_xpm[] = { +"24 24 2 1", +" c #BDBDBEBEBDBD", +". c #000000000000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ... ... ", +" ... ... ", +" .. .. . ", +" .. .. . . . ", +" .. .. ... ", +" .. .. . . . ", +" .. .. . ", +" ... .. ", +" .. .. ", +" .. ", +" .. ", +" .. ", +" .... ", +" ", +" ", +" "};
--- a/lisp/toolbar/gud-remove.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-remove.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * go_xpm[] = { "24 24 4 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000080800000", "X c #FFFFFFFFFFFF", "o c #F8F8FCFCF8F8",
--- a/lisp/toolbar/gud-run.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-run.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * run_xpm[] = { "24 24 9 1", -" c #c0c0c0", +" c None", ". c #000080", "X c #aa9faa", "o c #b5b9b5",
--- a/lisp/toolbar/gud-s.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-s.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * step_xpm[] = { "24 24 6 1", -" c #c0c0c0", +" c None", ". c #d40000", "X c #616161", "o c #2a1f55",
--- a/lisp/toolbar/gud-si.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-si.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * gud_stepi_xpm[] = { "24 24 5 1", -" c #C0C0C0C0C0C0", +" c None", ". c #D4D400000000", "X c #616161616161", "o c #2A2A1F1F5555",
--- a/lisp/toolbar/gud-until.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-until.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * goto_xpm[] = { "24 24 6 1", -" c #c0c0c0", +" c None", ". c #ff0000", "X c #616161", "o c #2a1f55",
--- a/lisp/toolbar/gud-up.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-up.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * up_xpm[] = { "24 24 14 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000000000000", "X c #7F7F7F7F7F7F", "o c #2D2D2D2D2D2D",
--- a/lisp/toolbar/gud-watch.xpm Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/toolbar/gud-watch.xpm Mon Jun 06 02:39:45 2005 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * watch_xpm[] = { "24 24 11 1", -" c #C0C0C0C0C0C0", +" c None", ". c #808080808080", "X c #000000000000", "o c #A5A59F9FA3A3",
--- a/lisp/url/url-http.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/url/url-http.el Mon Jun 06 02:39:45 2005 +0000 @@ -500,7 +500,8 @@ (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) (url-retrieve redirect-uri url-callback-function - url-callback-arguments) + (cons redirect-uri + (cdr url-callback-arguments))) (url-mark-buffer-as-dead (current-buffer)))))) (4 ; Client error ;; 400 Bad Request @@ -849,7 +850,7 @@ (url-display-percentage nil nil) (goto-char (match-end 1)) (if (re-search-forward "^\r*$" nil t) - (message "Saw end of trailers...")) + (url-http-debug "Saw end of trailers...")) (if (url-http-parse-headers) (url-http-activate-callback))))))))))
--- a/lisp/wdired.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/wdired.el Mon Jun 06 02:39:45 2005 +0000 @@ -263,7 +263,7 @@ (buffer-enable-undo) ; Performance hack. See above. (set-buffer-modified-p nil) (setq buffer-undo-list nil) - (run-hooks 'wdired-mode-hook) + (run-mode-hooks 'wdired-mode-hook) (message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \ or \\[wdired-abort-changes] to abort changes")))
--- a/lisp/wid-browse.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/wid-browse.el Mon Jun 06 02:39:45 2005 +0000 @@ -82,7 +82,7 @@ (use-local-map widget-browse-mode-map) (easy-menu-add widget-browse-mode-customize-menu) (easy-menu-add widget-browse-mode-menu) - (run-hooks 'widget-browse-mode-hook)) + (run-mode-hooks 'widget-browse-mode-hook)) (put 'widget-browse-mode 'mode-class 'special)
--- a/lisp/xml.el Sun Jun 05 01:58:02 2005 +0000 +++ b/lisp/xml.el Mon Jun 06 02:39:45 2005 +0000 @@ -84,6 +84,9 @@ ;;** ;;******************************************************************* +(defconst xml-undefined-entity "?" + "What to substitute for undefined entities") + (defvar xml-entity-alist '(("lt" . "<") ("gt" . ">") @@ -745,9 +748,10 @@ ((eq (length this-part) 0) (error "XML: (Not Well-Formed) No entity given")) (t - (when xml-validating-parser + (if xml-validating-parser (error "XML: (Validity) Undefined entity `%s'" - this-part)))))) + this-part) + xml-undefined-entity))))) (cond ((null children) ;; FIXME: If we have an entity that expands into XML, this won't work.
--- a/lispref/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/lispref/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,23 @@ +2005-05-29 Luc Teirlinck <teirllm@auburn.edu> + + * modes.texi (Major Mode Conventions): A derived mode only needs + to put the call to the parent mode inside `delay-mode-hooks'. + +2005-05-29 Richard M. Stallman <rms@gnu.org> + + * modes.texi (Mode Hooks): Explain that after-change-major-mode-hook is + new, and what that implies. Clarify. + + * files.texi (Locating Files): Clean up the text. + + * frames.texi (Window Frame Parameters): Document user-size. + Shorten entry for top by referring to left. + +2005-05-26 Richard M. Stallman <rms@gnu.org> + + * modes.texi (Mode Hooks): Explain that after-change-major-mode-hook + is new, and what the implications are. Other clarifications. + 2005-05-24 Richard M. Stallman <rms@gnu.org> * frames.texi (Dialog Boxes): Minor fixes.
--- a/lispref/files.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/lispref/files.texi Mon Jun 06 02:39:45 2005 +0000 @@ -1261,36 +1261,36 @@ @cindex locate files @cindex find files - Sometimes, you need to find a file that could reside in one of the -standard directories. One example is when you need to look for a -program's executable file, e.g., to find out whether a given program -is installed on the user's system. Another example is the search for + This section explains how to search for a file in a list of +directories. One example is when you need to look for a program's +executable file, e.g., to find out whether a given program is +installed on the user's system. Another example is the search for Lisp libraries (@pxref{Library Search}). Such searches generally need -to try several alternative file name extensions, in addition to -looking in every standard directory where the file could be found. -Emacs provides a function for such a generalized search for a file. +to try various possible file name extensions, in addition to various +possible directories. Emacs provides a function for such a +generalized search for a file. @defun locate-file filename path &optional suffixes predicate -This function searches for the file whose name is @var{filename} in -a list of directories given by @var{path}. If it finds the file, it -returns its full @dfn{absolute file name} (@pxref{Relative File -Names}); if the file is not found, the function returns @code{nil}. +This function searches for a file whose name is @var{filename} in a +list of directories given by @var{path}, trying the suffixes in +@var{suffixes}. If it finds such a file, it returns the full +@dfn{absolute file name} of the file (@pxref{Relative File Names}); +otherwise it returns @code{nil}. The optional argument @var{suffixes} gives the list of file-name -suffixes to append to @var{filename} when searching. If -@var{suffixes} is @code{nil}, it's equivalent to passing a list with a -single element that is an empty string @code{""}. - -Typical values of @var{path} are @code{exec-path} (@pxref{Subprocess +suffixes to append to @var{filename} when searching. +@code{locate-file} tries each possible directory with each of these +suffixes. If @var{suffixes} is @code{nil}, or @code{("")}, then there +are no suffixes, and @var{filename} is used only as-is. Typical +values of @var{suffixes} are @code{exec-suffixes} (@pxref{Subprocess +Creation, exec-suffixes}) and @code{load-suffixes} (@pxref{Library +Search, load-suffixes}). + +Typical values for @var{path} are @code{exec-path} (@pxref{Subprocess Creation, exec-path}) when looking for executable programs or @code{load-path} (@pxref{Library Search, load-path}) when looking for -Lisp files. Use @code{("/")} to disable the path search (e.g., if -@var{filename} already includes the leading directories), but still -try the extensions in @var{suffixes}. - -Typical values of @var{suffixes} are @code{exec-suffixes} -(@pxref{Subprocess Creation, exec-suffixes}) and @code{load-suffixes} -(@pxref{Library Search, load-suffixes}). +Lisp files. If @var{filename} is absolute, @var{path} has no effect, +but the suffixes in @var{suffixes} are still tried. The optional argument @var{predicate}, if non-@code{nil}, specifies the predicate function to use for testing whether a candidate file is @@ -1316,7 +1316,6 @@ @code{exec-suffixes}. @end defun - @node Changing Files @section Changing File Names and Attributes @cindex renaming files
--- a/lispref/frames.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/lispref/frames.texi Mon Jun 06 02:39:45 2005 +0000 @@ -362,20 +362,8 @@ @item top The screen position of the top edge, in pixels, with respect to the -top edge of the screen. The value may be a positive number @var{pos}, -or a list of the form @code{(+ @var{pos})} which permits specifying a -negative @var{pos} value. - -A negative number @minus{}@var{pos}, or a list of the form @code{(- -@var{pos})}, actually specifies the position of the bottom edge of the -window with respect to the bottom edge of the screen. A positive value -of @var{pos} counts toward the top. @strong{Reminder:} if the -parameter is a negative integer @minus{}@var{pos}, then @var{pos} is -positive. - -Some window managers ignore program-specified positions. If you want to -be sure the position you specify is not ignored, specify a -non-@code{nil} value for the @code{user-position} parameter as well. +top edge of the screen. It works just like @code{left}, except vertically +instead of horizontally. @item icon-left The screen position of the left edge @emph{of the frame's icon}, in @@ -418,6 +406,11 @@ The width of the frame contents, in characters. (To get the height in pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.) +@item user-size +This does for the size parameters @code{height} and @code{width} what +the @code{user-position} parameter (see above) does for the position +parameters @code{top} and @code{left}. + @item fullscreen Specify that width, height or both shall be set to the size of the screen. The value @code{fullwidth} specifies that width shall be the size of the
--- a/lispref/modes.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/lispref/modes.texi Mon Jun 06 02:39:45 2005 +0000 @@ -437,10 +437,8 @@ command (called the @dfn{parent mode}) and then alter some of its settings. A mode that does this is called a @dfn{derived mode}. The recommended way to define one is to use @code{define-derived-mode}, -but this is not required. Such a mode should use -@code{delay-mode-hooks} around its entire body (including the call to -the parent mode command) @emph{except} for the final call to -@code{run-mode-hooks}, which runs the derived mode's hook. (Using +but this is not required. Such a mode should call the parent mode +command inside a @code{delay-mode-hooks} form. (Using @code{define-derived-mode} does this automatically.) @xref{Derived Modes}, and @ref{Mode Hooks}. @@ -1117,7 +1115,7 @@ @node Mode Hooks @subsection Mode Hooks -The two last things a major mode function does is to run its mode + The two last things a major mode function should do is run its mode hook and finally the mode independent normal hook @code{after-change-major-mode-hook}. If the major mode is a derived mode, that is if it calls another major mode (the parent mode) in its @@ -1125,45 +1123,53 @@ mode's hook. Neither the parent's mode hook nor @code{after-change-major-mode-hook} are run at the end of the actual call to the parent mode. This applies recursively if the parent mode -has itself a parent. That is, the mode hooks of all major modes called -directly or indirectly by the major mode function are all run in -sequence at the end, just before @code{after-change-major-mode-hook}. - -If you are customizing a major mode, rather than defining one, the -above is all you need to know about the hooks run at the end of a -major mode. This also applies if you use @code{define-derived-mode} -to define a major mode, because that macro will automatically -implement the above for you. - -Programmers wishing to define a major mode without using -@code{define-derived-mode}, should make sure that their major mode -follows the above conventions. @xref{Major Mode Conventions}, for how -this should be accomplished. Below, we give some implementation -details. +has itself a parent. That is, the mode hooks of all major modes +called directly or indirectly by the major mode function are all run +in sequence at the end, just before +@code{after-change-major-mode-hook}. + + These conventions are new in Emacs 22, and some major modes +implemented by users do not follow them yet. So if you put a function +onto @code{after-change-major-mode-hook}, keep in mind that some modes +will fail to run it. If a user complains about that, you can respond, +``That major mode fails to follow Emacs conventions, and that's why it +fails to work. Please fix the major mode.'' In most cases, that is +good enough, so go ahead and use @code{after-change-major-mode-hook}. +However, if a certain feature needs to be completely reliable, +it should not use @code{after-change-major-mode-hook} as of yet. + + When you defined a major mode using @code{define-derived-mode}, it +automatically makes sure these conventions are followed. If you +define a major mode ``from scratch'', not using +@code{define-derived-mode}, make sure the major mode command follows +these and other conventions. @xref{Major Mode Conventions}. You use +these functions to do it properly. @defun run-mode-hooks &rest hookvars Major modes should run their mode hook using this function. It is -similar to @code{run-hooks} (@pxref{Hooks}), but if run inside a +similar to @code{run-hooks} (@pxref{Hooks}), but it also runs +@code{after-change-major-mode-hook}. + +When the call to this function is dynamically inside a @code{delay-mode-hooks} form, this function does not run any hooks. -Instead, it arranges for @var{hookvars} to be run at a later call to -the function. Otherwise, @code{run-mode-hooks} runs any delayed hooks -in order, then @var{hookvars} and finally -@code{after-change-major-mode-hook}. +Instead, it arranges for the next call to @code{run-mode-hooks} to run +@var{hookvars}. @end defun @defmac delay-mode-hooks body... This macro executes @var{body} like @code{progn}, but all calls to @code{run-mode-hooks} inside @var{body} delay running their hooks. They will be run by the first call to @code{run-mode-hooks} after exit -from @code{delay-mode-hooks}. +from @code{delay-mode-hooks}. This is the proper way for a major mode +command to invoke its parent mode. @end defmac @defvar after-change-major-mode-hook Every major mode function should run this normal hook at its very end. It normally does not need to do so explicitly. Indeed, a major mode function should normally run its mode hook with @code{run-mode-hooks} -as the very last thing it does and @code{run-mode-hooks} runs -@code{after-change-major-mode-hook} at its very end. +as the very last thing it does, and the last thing +@code{run-mode-hooks} does is run @code{after-change-major-mode-hook}. @end defvar @node Minor Modes
--- a/man/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/man/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,78 @@ +2005-06-05 Chong Yidong <cyd@stupidchicken.com> + + * emacs.texi: Rename Hardcopy to Printing. + Make PostScript and PostScript Variables subnodes of it. + + * misc.texi (Printing): Rename node from Hardcopy. + Mention menu bar options. + Move PostScript and PostScript Variables to submenu. + (Printing package): New node. + + * mark.texi (Using Region): Change Hardcopy xref to Printing. + + * dired.texi (Operating on Files): Likewise. + + * calendar.texi (Displaying the Diary): Likewise. + + * msdog.texi (MS-DOS Printing, MS-DOS Processes): Likewise. + + * glossary.texi (Glossary): Likewise. + + * frames.texi (Mode Line Mouse): Mention mode-line-highlight + effect. + +2005-06-04 Richard M. Stallman <rms@gnu.org> + + * trouble.texi (After a Crash): Polish previous change. + +2005-05-31 Jay Belanger <belanger@truman.edu> + + * calc.texi (Notations Used in This Manual): Use @kbd for key + sequence. + (Demonstration of Calc): Mention another way of starting Calc. + (Starting Calc): Mention long name of M-#. + (Embedded Mode Overview): Remove unnecessary instruction. + (Other M-# commands): Rephrase `M-# 0' explanation. + (Basic Embedded Mode): Rewrite discussion of prefix arguments to + reflect current behavior. + +2005-05-30 Jay Belanger <belanger@truman.edu> + + * calc.texi (Hooks): Change description of calc-window-hook and + calc-trail-window-hook to match usage. + (Computational Functions): Add more constant-generating functions. + (Customizable Variables): Use defvar. + +2005-05-30 Noah Friedman <friedman@splode.com> + + * trouble.texi (After a Crash): Mention emacs-buffer.gdb as a + recovery mechanism. + +2005-05-28 Jay Belanger <belanger@truman.edu> + + * calc.texi (Assignments in Embedded Mode): Fix variable name. + (Basic Embedded Mode): Explain behavior of arguments to + calc-embedded-mode. + +2005-05-28 Nick Roberts <nickrob@snap.net.nz> + + * building.texi (Other Buffers): SPC toggles display of + floating point registers. + +2005-05-27 Jay Belanger <belanger@truman.edu> + + * calc.texi (Queries in Keyboard Macros): Rewrite to reflect + current behavior. + +2005-05-27 Nick Roberts <nickrob@snap.net.nz> + + * files.texi (Log Buffer): Merge in description of Log Edit + mode from pcl-cvs.texi. + +2005-05-26 Richard M. Stallman <rms@gnu.org> + + * building.texi (Lisp Eval): C-M-x with arg runs Edebug. + 2005-05-25 Jay Belanger <belanger@truman.edu> * calc.texi: Change Calc version number throughout.
--- a/man/building.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/building.texi Mon Jun 06 02:39:45 2005 +0000 @@ -932,7 +932,8 @@ @item Registers Buffer The registers buffer displays the values held by the registers -(@pxref{Registers,,, gdb, The GNU debugger}). +(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{SPC} to +toggle the display of floating point registers. @item Assembler Buffer The assembler buffer displays the current frame as machine code. An @@ -944,7 +945,7 @@ The threads buffer displays a summary of all threads currently in your program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to -any thread in the list and type @key{RET} to make it become the +any thread in the list and press @key{RET} to make it become the current thread (@code{gdb-threads-select}) and display the associated source in the source buffer. Alternatively, click @kbd{Mouse-2} to make the selected thread become the current one. @@ -1149,10 +1150,11 @@ @kbd{C-x C-e} a second time to display the value of the integer result in additional formats (octal, hexadecimal, and character). - If @kbd{C-M-x}, @kbd{C-x C-e}, or @kbd{M-:} is given a numeric -argument, it inserts the value into the current buffer at point, rather -than displaying it in the echo area. The argument's value does not -matter. + If @kbd{C-x C-e}, or @kbd{M-:} is given a numeric argument, it +inserts the value into the current buffer at point, rather than +displaying it in the echo area. The argument's value does not matter. +@kbd{C-M-x} with a numeric argument instruments the function +definition for Edebug (@pxref{Instrumenting, Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}). @findex eval-region @findex eval-current-buffer
--- a/man/calc.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/calc.texi Mon Jun 06 02:39:45 2005 +0000 @@ -583,6 +583,7 @@ * What is Calc:: * About This Manual:: * Notations Used in This Manual:: +* Demonstration of Calc:: * Using Calc:: * Demonstration of Calc:: * History and Acknowledgements:: @@ -764,7 +765,7 @@ (If you don't have the @key{LFD} or @key{TAB} keys on your keyboard, the @kbd{C-j} and @kbd{C-i} keys are equivalent to them, respectively. If you don't have a Meta key, look for Alt or Extend Char. You can -also press @key{ESC} or @key{C-[} first to get the same effect, so +also press @key{ESC} or @kbd{C-[} first to get the same effect, so that @kbd{M-x}, @kbd{@key{ESC} x}, and @kbd{C-[ x} are all equivalent.) Sometimes the @key{RET} key is not shown when it is ``obvious'' @@ -797,7 +798,8 @@ To begin, start Emacs if necessary (usually the command @code{emacs} does this), and type @kbd{M-# c} (or @kbd{@key{ESC} # c}) to start the -Calculator. (@xref{Starting Calc}, if this doesn't work for you.) +Calculator. (You can also use @kbd{M-x calc} if this doesn't work. +@xref{Starting Calc}, for various ways of starting the Calculator.) Be sure to type all the sample input exactly, especially noting the difference between lower-case and upper-case letters. Remember, @@ -987,11 +989,15 @@ Control or @key{CTRL} while typing a left square bracket (that's @kbd{C-[} in Emacs notation). -@kbd{M-#} is a @dfn{prefix key}; when you press it, Emacs waits for -you to press a second key to complete the command. In this case, -you will follow @kbd{M-#} with a letter (upper- or lower-case, it -doesn't matter for @kbd{M-#}) that says which Calc interface you -want to use. +The key @kbd{M-#} is bound to the command @code{calc-dispatch}, +which can be rebound if convenient. +(@xref{Key Bindings,,Customizing Key Bindings,emacs, +The GNU Emacs Manual}.) + +When you press @kbd{M-#}, Emacs waits for you to press a second key to +complete the command. In this case, you will follow @kbd{M-#} with a +letter (upper- or lower-case, it 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 @@ -1335,9 +1341,7 @@ @end smallexample 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.) +and keyboard will revert to the way they were before. The related command @kbd{M-# w} operates on a single word, which generally means a single number, inside text. It uses any @@ -1520,8 +1524,7 @@ @item 0 (This is the ``zero'' digit key.) Reset the Calculator to -its default state: Empty stack, and default mode settings. -With any prefix argument, reset everything but the stack. +its initial state: Empty stack, and initial mode settings. @end table @node History and Acknowledgements, , Using Calc, Getting Started @@ -1589,7 +1592,7 @@ features, large and small. A few deserve special mention: Tim Peters, who helped develop the ideas that led to the selection commands, rewrite rules, and many other algebra features; -@texline Fran\c cois +@texline Fran\c{c}ois @infoline Francois Pinard, who contributed an early prototype of the Calc Summary appendix as well as providing valuable suggestions in many other areas of Calc; @@ -30113,20 +30116,21 @@ on their own separate lines or in-line with the formula. If you give a positive or negative numeric prefix argument, Calc -instead uses the current point as one end of the formula, and moves -forward or backward (respectively) by that many lines to find the -other end. Explicit delimiters are not necessary in this case. - -With a prefix argument of zero, Calc uses the current region -(delimited by point and mark) instead of formula delimiters. +instead uses the current point as one end of the formula, and includes +that many lines forward or backward (respectively, including the current +line). Explicit delimiters are not necessary in this case. + +With a prefix argument of zero, Calc uses the current region (delimited +by point and mark) instead of formula delimiters. With a prefix +argument of @kbd{C-u} only, Calc uses the current line as the formula. @kindex M-# w @pindex calc-embedded-word -With a prefix argument of @kbd{C-u} only, Calc scans for the first -non-numeric character (i.e., the first character that is not a -digit, sign, decimal point, or upper- or lower-case @samp{e}) -forward and backward to delimit the formula. @kbd{M-# w} -(@code{calc-embedded-word}) is equivalent to @kbd{C-u M-# e}. +The @kbd{M-# w} (@code{calc-embedded-word}) command will start Embedded +mode on the current ``word''; in this case Calc will scan for the first +non-numeric character (i.e., the first character that is not a digit, +sign, decimal point, or upper- or lower-case @samp{e}) forward and +backward to delimit the formula. When you enable Embedded mode for a formula, Calc reads the text between the delimiters and tries to interpret it as a Calc formula. @@ -30495,7 +30499,7 @@ @kindex M-# u @kindex M-# = -@pindex calc-embedded-update +@pindex calc-embedded-update-formula Another way to change the assignment to @code{foo} would simply be to edit the number using regular Emacs editing rather than Embedded mode. Then, we have to find a way to get Embedded mode to notice @@ -31395,23 +31399,35 @@ @node Queries in Macros, , Local Values in Macros, Keyboard Macros @subsection Queries in Keyboard Macros -@noindent -@kindex Z = -@pindex calc-kbd-report -The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative -message including the value on the top of the stack. You are prompted -to enter a string. That string, along with the top-of-stack value, -is displayed unless @kbd{m w} (@code{calc-working}) has been used -to turn such messages off. - +@c @noindent +@c @kindex Z = +@c @pindex calc-kbd-report +@c The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative +@c message including the value on the top of the stack. You are prompted +@c to enter a string. That string, along with the top-of-stack value, +@c is displayed unless @kbd{m w} (@code{calc-working}) has been used +@c to turn such messages off. + +@noindent @kindex Z # @pindex calc-kbd-query -The @kbd{Z #} (@code{calc-kbd-query}) command displays a prompt message -(which you enter during macro definition), then does an algebraic entry -which takes its input from the keyboard, even during macro execution. -This command allows your keyboard macros to accept numbers or formulas -as interactive input. All the normal conventions of algebraic input, -including the use of @kbd{$} characters, are supported. +The @kbd{Z #} (@code{calc-kbd-query}) command prompts for an algebraic +entry which takes its input from the keyboard, even during macro +execution. All the normal conventions of algebraic input, including the +use of @kbd{$} characters, are supported. The prompt message itself is +taken from the top of the stack, and so must be entered (as a string) +before the @kbd{Z #} command. (Recall, as a string it can be entered by +pressing the @kbd{"} key and will appear as a vector when it is put on +the stack. The prompt message is only put on the stack to provide a +prompt for the @kbd{Z #} command; it will not play any role in any +subsequent calculations.) This command allows your keyboard macros to +accept numbers or formulas as interactive input. + +As an example, +@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for +input with ``Power: '' in the minibuffer, then return 2 to the provided +power. (The response to the prompt that's given, 3 in this example, +will not be part of the macro.) @xref{Keyboard Macro Query, , , emacs, the Emacs Manual}, for a description of @kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept @@ -33628,22 +33644,25 @@ the absolute values of the components. @end defun -@findex two-pi +@findex e +@findex gamma-const +@findex ln-2 +@findex ln-10 +@findex phi @findex pi-over-2 @findex pi-over-4 @findex pi-over-180 @findex sqrt-two-pi @findex sqrt-e -@findex e -@findex ln-2 -@findex ln-10 +@findex two-pi @defun pi The function @samp{(pi)} computes @samp{pi} to the current precision. Other related constant-generating functions are @code{two-pi}, @code{pi-over-2}, @code{pi-over-4}, @code{pi-over-180}, @code{sqrt-two-pi}, -@code{e}, @code{sqrt-e}, @code{ln-2}, and @code{ln-10}. Each function -returns a floating-point value in the current precision, and each uses -caching so that all calls after the first are essentially free. +@code{e}, @code{sqrt-e}, @code{ln-2}, @code{ln-10}, @code{phi} and +@code{gamma-const}. Each function returns a floating-point value in the +current precision, and each uses caching so that all calls after the +first are essentially free. @end defun @defmac math-defcache @var{func} @var{initial} @var{form} @@ -34692,7 +34711,7 @@ @end defvar @defvar calc-window-hook -If this hook exists, it is called to create the Calc window. +If this hook is non-@code{nil}, it is called to create the Calc window. Upon return, this new Calc window should be the current window. (The Calc buffer will already be the current buffer when the hook is called.) If the hook is not defined, Calc will @@ -34701,10 +34720,10 @@ @end defvar @defvar calc-trail-window-hook -If this hook exists, it is called to create the Calc Trail window. -The variable @code{calc-trail-buffer} will contain the buffer -which the window should use. Unlike @code{calc-window-hook}, -this hook must @emph{not} switch into the new window. +If this hook is non-@code{nil}, it is called to create the Calc Trail +window. The variable @code{calc-trail-buffer} will contain the buffer +which the window should use. Unlike @code{calc-window-hook}, this hook +must @emph{not} switch into the new window. @end defvar @defvar calc-edit-mode-hook @@ -34808,11 +34827,7 @@ See @ref{Regexp Search,, Regular Expression Search, emacs, The GNU Emacs Manual} to see how regular expressions work. -@table @code - -@item calc-settings-file - -@vindex calc-settings-file +@defvar calc-settings-file The variable @code{calc-settings-file} holds the file name in which commands like @kbd{m m} and @kbd{Z P} store ``permanent'' definitions. @@ -34822,9 +34837,9 @@ exists) the first time Calc is invoked. The default value for this variable is @code{"~/.calc.el"}. - -@item calc-gnuplot-name - +@end defvar + +@defvar calc-gnuplot-name See @ref{Graphics}.@* The variable @code{calc-gnuplot-name} should be the name of the GNUPLOT program (a string). If you have GNUPLOT installed on your @@ -34833,10 +34848,10 @@ You may also need to set some Lisp variables to show Calc how to run GNUPLOT on your system, see @ref{Devices, ,Graphical Devices} . The default value of @code{calc-gnuplot-name} is @code{"gnuplot"}. - -@item calc-gnuplot-plot-command -@itemx calc-gnuplot-print-command - +@end defvar + +@defvar calc-gnuplot-plot-command +@defvarx calc-gnuplot-print-command See @ref{Devices, ,Graphical Devices}.@* The variables @code{calc-gnuplot-plot-command} and @code{calc-gnuplot-print-command} represent system commands to @@ -34849,9 +34864,9 @@ The default value of @code{calc-gnuplot-plot-command} is @code{nil}, and the default value of @code{calc-gnuplot-print-command} is @code{"lp %s"}. - -@item calc-language-alist - +@end defvar + +@defvar calc-language-alist See @ref{Basic Embedded Mode}.@* The variable @code{calc-language-alist} controls the languages that Calc will associate with major modes. When Calc embedded mode is @@ -34877,9 +34892,9 @@ (fortran-mode . fortran) (f90-mode . fortran)) @end example - -@item calc-embedded-announce-formula - +@end defvar + +@defvar calc-embedded-announce-formula See @ref{Customizing Embedded Mode}.@* The variable @code{calc-embedded-announce-formula} helps determine what formulas @kbd{M-# a} will activate in a buffer. It is a @@ -34891,10 +34906,10 @@ The default pattern is @code{"%Embed\n\\(% .*\n\\)*"}, which checks for @samp{%Embed} followed by any number of lines beginning with @samp{%} and a space. - -@item calc-embedded-open-formula -@itemx calc-embedded-close-formula - +@end defvar + +@defvar calc-embedded-open-formula +@defvarx calc-embedded-close-formula See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-formula} and @code{calc-embedded-open-formula} control the region that Calc will @@ -34919,10 +34934,10 @@ @item Lines containing a single @samp{%} or @samp{.\"} symbol and nothing else. @end enumerate - -@item calc-embedded-open-word -@itemx calc-embedded-close-word - +@end defvar + +@defvar calc-embedded-open-word +@defvarx calc-embedded-close-word See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-word} and @code{calc-embedded-close-word} control the region that Calc will @@ -34932,10 +34947,10 @@ The default values of @code{calc-embedded-open-word} and @code{calc-embedded-close-word} are @code{"^\\|[^-+0-9.eE]"} and @code{"$\\|[^-+0-9.eE]"} respectively. - -@item calc-embedded-open-plain -@itemx calc-embedded-close-plain - +@end defvar + +@defvar calc-embedded-open-plain +@defvarx calc-embedded-close-plain See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-plain} and @code{calc-embedded-open-plain} are used to delimit ``plain'' @@ -34948,10 +34963,10 @@ @code{calc-embedded-close-plain} is @code{" %%%\n"}, without the trailing newline here, the first line of a Big mode formula that followed might be shifted over with respect to the other lines. - -@item calc-embedded-open-new-formula -@itemx calc-embedded-close-new-formula - +@end defvar + +@defvar calc-embedded-open-new-formula +@defvarx calc-embedded-close-new-formula See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-new-formula} and @code{calc-embedded-close-new-formula} are strings which are @@ -34966,10 +34981,10 @@ if typed at the end of a line. (It follows that if @kbd{M-# f} is typed on a blank line, both a leading opening newline and a trailing closing newline are omitted.) - -@item calc-embedded-open-mode -@itemx calc-embedded-close-mode - +@end defvar + +@defvar calc-embedded-open-mode +@defvarx calc-embedded-close-mode See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-mode} and @code{calc-embedded-close-mode} are strings which Calc will place before @@ -34983,8 +34998,7 @@ If you change the value of @code{calc-embedded-close-mode}, it is a good idea still to end with a newline so that mode annotations will appear on lines by themselves. - -@end table +@end defvar @node Reporting Bugs, Summary, Customizable Variables, Top @appendix Reporting Bugs @@ -35089,11 +35103,12 @@ @r{ @: M-# r @: @: 36 @:calc-grab-rectangle@:} @r{ @: M-# s @: @: @:calc-info-summary@:} @r{ @: M-# t @: @: @:calc-tutorial@:} -@r{ @: M-# u @: @: @:calc-embedded-update@:} +@r{ @: M-# u @: @: @:calc-embedded-update-formula@:} @r{ @: M-# w @: @: @:calc-embedded-word@:} @r{ @: M-# x @: @: @:calc-quit@:} @r{ @: M-# y @: @:1,28,49 @:calc-copy-to-buffer@:} @r{ @: M-# z @: @: @:calc-user-invocation@:} +@r{ @: M-# = @: @: @:calc-embedded-update-formula@:} @r{ @: M-# : @: @: 36 @:calc-grab-sum-down@:} @r{ @: M-# _ @: @: 36 @:calc-grab-sum-across@:} @r{ @: M-# ` @:editing @: 30 @:calc-embedded-edit@:} @@ -35869,8 +35884,7 @@ @c @r{ @: Z ` @: @: @:calc-kbd-push@:} @r{ @: Z ' @: @: @:calc-kbd-pop@:} -@r{ a@: Z = @:message @: 28 @:calc-kbd-report@:} -@r{ @: Z # @:prompt @: @:calc-kbd-query@:} +@r{ @: Z # @: @: @:calc-kbd-query@:} @c @r{ comp@: Z C @:func, args @: 50 @:calc-user-define-composition@:}
--- a/man/calendar.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/calendar.texi Mon Jun 06 02:39:45 2005 +0000 @@ -1046,7 +1046,7 @@ on your screen. There is a special command to print hard copy of the diary buffer @emph{as it appears}; this command is @kbd{M-x print-diary-entries}. It sends the data directly to the printer. You -can customize it like @code{lpr-region} (@pxref{Hardcopy}). +can customize it like @code{lpr-region} (@pxref{Printing}). @findex diary The command @kbd{M-x diary} displays the diary entries for the current
--- a/man/dired.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/dired.texi Mon Jun 06 02:39:45 2005 +0000 @@ -616,7 +616,7 @@ command to print them with, but the minibuffer starts out with a suitable guess made using the variables @code{lpr-command} and @code{lpr-switches} (the same variables that @code{lpr-buffer} uses; -@pxref{Hardcopy}). +@pxref{Printing}). @findex dired-do-compress @kindex Z @r{(Dired)}
--- a/man/emacs.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/emacs.texi Mon Jun 06 02:39:45 2005 +0000 @@ -191,9 +191,7 @@ * Gnus:: How to read netnews with Emacs. * Shell:: Executing shell commands from Emacs. * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc. -* Hardcopy:: Printing buffers or regions. -* PostScript:: Printing buffers or regions as PostScript. -* PostScript Variables::Customizing the PostScript printing commands. +* Printing:: Printing hardcopies of buffers or regions. * Sorting:: Sorting lines, paragraphs or pages within Emacs. * Narrowing:: Restricting display and editing to a portion of the buffer.
--- a/man/files.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/files.texi Mon Jun 06 02:39:45 2005 +0000 @@ -1526,8 +1526,29 @@ When you check in changes, @kbd{C-x v v} first reads a log entry. It pops up a buffer called @samp{*VC-Log*} for you to enter the log entry. -When you are finished, type @kbd{C-c C-c} in the @samp{*VC-Log*} buffer. -That is when check-in really happens. + +Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it, +typically the last log message entered. If it does, mark and point +are set around the entire contents of the buffer so that it is easy to +kill the contents of the buffer with @kbd{C-w}. + +@findex log-edit-insert-changelog +If you work by writing entries in the @file{ChangeLog} +(@pxref{Change Log}) and then commit the change under revision +control, you can generate the Log Edit text from the ChangeLog using +@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for +entries for the file(s) concerned in the top entry in the ChangeLog +and uses those paragraphs as the log text. This text is only inserted +if the top entry was made under your user name on the current date. +@xref{Change Logs and VC}, for the opposite way of +working---generating ChangeLog entries from the revision control log. + +In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files}) +shows the list of files to be committed in case you need to check +that. + +When you have finished editing the log message, type @kbd{C-c C-c} to +exit the buffer and commit the change. To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that buffer. You can switch buffers and do other editing. As long as you
--- a/man/frames.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/frames.texi Mon Jun 06 02:39:45 2005 +0000 @@ -393,6 +393,14 @@ You can use mouse clicks on window mode lines to select and manipulate windows. + Some areas of the mode line, such as the buffer name and the major +mode name, have their own special mouse bindings. These areas are +highlighted when you hold the mouse over them, and information about +the special bindings will be displayed (@pxref{Tooltips}). + + You can also click on areas of the mode line that do not have +special mouse bindings of their own. This has the following effects: + @table @kbd @item Mouse-1 @kindex Mouse-1 @r{(mode line)} @@ -420,12 +428,6 @@ @kbd{C-Mouse-2} on a scroll bar splits the corresponding window vertically. @xref{Split Window}. - The commands above apply to areas of the mode line which do not have -special mouse bindings of their own. Some areas, such as the buffer -name and the major mode name, have their own special mouse bindings. -Emacs displays information about these bindings when you hold the -mouse over such a place (@pxref{Tooltips}). - @node Creating Frames @section Creating Frames @cindex creating frames
--- a/man/glossary.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/glossary.texi Mon Jun 06 02:39:45 2005 +0000 @@ -573,7 +573,7 @@ @item Hardcopy Hardcopy means printed output. Emacs has commands for making printed -listings of text in Emacs buffers. @xref{Hardcopy}. +listings of text in Emacs buffers. @xref{Printing}. @item @key{HELP} @key{HELP} is the Emacs name for @kbd{C-h} or @key{F1}. You can type
--- a/man/mark.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/mark.texi Mon Jun 06 02:39:45 2005 +0000 @@ -293,7 +293,7 @@ @item Fill it as text with @kbd{M-x fill-region} (@pxref{Filling}). @item -Print hardcopy with @kbd{M-x print-region} (@pxref{Hardcopy}). +Print hardcopy with @kbd{M-x print-region} (@pxref{Printing}). @item Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}). @end itemize
--- a/man/misc.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/misc.texi Mon Jun 06 02:39:45 2005 +0000 @@ -1214,7 +1214,7 @@ @end ignore -@node Emacs Server, Hardcopy, Shell, Top +@node Emacs Server, Printing, Shell, Top @section Using Emacs as a Server @pindex emacsclient @cindex Emacs as a server @@ -1374,14 +1374,17 @@ rest of the arguments is not taken as a list of files to visit but as a list of expressions to evaluate. -@node Hardcopy, PostScript, Emacs Server, Top -@section Hardcopy Output +@node Printing, Sorting, Emacs Server, Top +@section Printing Hard Copies @cindex hardcopy - - The Emacs commands for making hardcopy let you print either an entire -buffer or just part of one, either with or without page headers. -See also the hardcopy commands of Dired (@pxref{Misc File Ops}) -and the diary (@pxref{Displaying the Diary}). +@cindex printing + + Emacs provides commands for printing hard copies of either an entire +buffer or just part of one, with or without page headers. You can +invoke the printing commands directly, as detailed in the following +section, or using the @samp{File} menu on the menu bar. See also the +hardcopy commands of Dired (@pxref{Misc File Ops}) and the diary +(@pxref{Displaying the Diary}). @table @kbd @item M-x print-buffer @@ -1428,7 +1431,13 @@ @code{lpr-add-switches} should be @code{nil} if your printer program is not compatible with @code{lpr}. -@node PostScript, PostScript Variables, Hardcopy, Top +@menu +* PostScript:: Printing buffers or regions as PostScript. +* PostScript Variables:: Customizing the PostScript printing commands. +* Printing Package:: An optional advanced printing interface. +@end menu + +@node PostScript, PostScript Variables,, Printing @section PostScript Hardcopy These commands convert buffer contents to PostScript, @@ -1492,7 +1501,7 @@ The following section describes variables for customizing these commands. @end ifinfo -@node PostScript Variables, Sorting, PostScript, Top +@node PostScript Variables, Printing Package, PostScript, Printing @section Variables for PostScript Hardcopy @vindex ps-lpr-command @@ -1584,7 +1593,33 @@ Many other customization variables for these commands are defined and described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}. -@node Sorting, Narrowing, PostScript Variables, Top +@node Printing Package,, PostScript Variables, Printing +@section Printing Package +@cindex Printing package + + The basic Emacs facilities for printing hardcopy can be extended +using the Printing package. This provides an easy-to-use interface +for choosing what to print, previewing PostScript files before +printing, and setting various printing options such as print headers, +landscape or portrait modes, duplex modes, and so forth. On GNU/Linux +or Unix systems, the Printing package relies on the @file{gs} and +@file{gv} utilities, which are distributed as part of the GhostScript +program. On MS-Windows, the @file{gstools} port of Ghostscript can be +used. + +@findex pr-interface + To use the Printing package, add @code{(require 'printing)} to your +init file (@pxref{Init File}). The usual printing options in the menu +bar will be replaced with a @samp{Printing} submenu, containing +various printing options. You can also type @kbd{M-x pr-interface +RET}; this creates a @samp{*Printing Interface*} buffer, similar to a +customization buffer , where you can set the printing options. After +selecting what and how to print, start the print job using the +@samp{Print} button (click @kbd{mouse-2} on it, or move point over it +and type @kbd{RET}). For further information on the various options, +use the @samp{Interface Help} button. + +@node Sorting, Narrowing, Printing, Top @section Sorting Text @cindex sorting
--- a/man/msdog.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/msdog.texi Mon Jun 06 02:39:45 2005 +0000 @@ -419,13 +419,12 @@ @node MS-DOS Printing @section Printing and MS-DOS - Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and + Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}) can work in MS-DOS and MS-Windows by sending the output to one of the printer ports, if a Posix-style @code{lpr} program is unavailable. The same Emacs -variables control printing on all systems (@pxref{Hardcopy}), but in -some cases they have different default values on MS-DOS and -MS-Windows. +variables control printing on all systems, but in some cases they have +different default values on MS-DOS and MS-Windows. @vindex printer-name @r{(MS-DOS)} If you want to use your local printer, printing on it in the usual DOS @@ -758,7 +757,7 @@ Processes}. @cindex printing under MS-DOS - Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and + Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}), work in MS-DOS by sending the output to one of the printer ports. @xref{MS-DOS Printing}.
--- a/man/org.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/org.texi Mon Jun 06 02:39:45 2005 +0000 @@ -4,7 +4,7 @@ @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 3.09 +@set VERSION 3.10 @set DATE May 2005 @dircategory Emacs
--- a/man/trouble.texi Sun Jun 05 01:58:02 2005 +0000 +++ b/man/trouble.texi Mon Jun 06 02:39:45 2005 +0000 @@ -351,6 +351,25 @@ recover are present in Emacs buffers. You should then save them. Only this---saving them---updates the files themselves. + As a last resort, if you had buffers with content which were not +associated with any files, or if the autosave was not recent enough to +have recorded important changes, you can use the +@file{etc/emacs-buffer.gdb} script with GDB (the GNU Debugger) to +retrieve them from a core dump--provided that a core dump was saved, +and that the Emacs executable was not stripped of its debugging +symbols. + + To use this script, run @code{gdb} with the file name of your Emacs +executable and the file name of the core dump, e.g. @samp{gdb +/usr/bin/emacs core.emacs}. At the @code{(gdb)} prompt, load the +recovery script: @samp{source /usr/src/emacs/etc/emacs-buffer.gdb}. +Then type the command @code{ybuffer-list} to see which buffers are +available. For each buffer, it lists a buffer number. To save a +buffer, use @code{ysave-buffer}; you specify the buffer number, and +the file name to write that buffer into. You should use a file name +which does not already exist; if the file does exist, the script does +not make make a backup of its old contents. + @node Emergency Escape @subsection Emergency Escape
--- a/nt/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/nt/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,12 @@ +2005-06-05 Eli Zaretskii <eliz@gnu.org> + + * inc/sys/socket.h: Change arg 4 of sys_setsockopt to + `const void *', for consistency with Posix. + +2005-06-04 Eli Zaretskii <eliz@gnu.org> + + * inc/pwd.h (getpwnam, getpwuid): Add prototypes. + 2005-05-24 Juanma Barranquero <lekktu@gmail.com> * INSTALL: Add more pointers to ports of Unix tools to Windows,
--- a/nt/inc/pwd.h Sun Jun 05 01:58:02 2005 +0000 +++ b/nt/inc/pwd.h Mon Jun 06 02:39:45 2005 +0000 @@ -18,6 +18,10 @@ typedef int uid_t; typedef uid_t gid_t; +struct passwd * getpwnam (char *); +struct passwd * getpwuid (int); + + #endif /* _PWD_H_ */ /* arch-tag: 68308424-cb2b-49ed-bb52-b347fee416bf
--- a/nt/inc/sys/socket.h Sun Jun 05 01:58:02 2005 +0000 +++ b/nt/inc/sys/socket.h Mon Jun 06 02:39:45 2005 +0000 @@ -102,7 +102,7 @@ struct servent * sys_getservbyname (const char * name, const char * proto); int sys_getpeername (int s, struct sockaddr *addr, int * namelen); int sys_shutdown (int socket, int how); -int sys_setsockopt (int s, int level, int oname, const char * oval, int olen); +int sys_setsockopt (int s, int level, int oname, const void * oval, int olen); int sys_listen (int s, int backlog); int sys_getsockname (int s, struct sockaddr * name, int * namelen); int sys_accept (int s, struct sockaddr *addr, int *addrlen);
--- a/src/ChangeLog Sun Jun 05 01:58:02 2005 +0000 +++ b/src/ChangeLog Mon Jun 06 02:39:45 2005 +0000 @@ -1,3 +1,153 @@ +2005-06-05 Eli Zaretskii <eliz@gnu.org> + + * w32.c (sys_setsockopt): Change arg 4 to `const void *'. In the + call to pfn_setsockopt, cast optval to `const char *'. + +2005-06-04 Eli Zaretskii <eliz@gnu.org> + + * w32.c (gettimeofday): Use struct _timeb, not struct timeb. + (open_unc_volume): Cast return value of map_w32_filename, to avoid + compiler warnings. + + * s/ms-w32.h (fileno): Don't define if already defined. + + * emacs.c: Include w32heap.h, to avoid compiler warning about sbrk. + + * makefile.w32-in (DOC): Define to point to the generated DOC-X. + +2005-06-04 Richard M. Stallman <rms@gnu.org> + + * xmenu.c (popup_get_selection): Click not in menu deactivates menu. + +2005-06-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * macmenu.c (cleanup_popup_menu): New function. + (Fx_popup_menu): unwind protect cleanup_popup_menu in case + mac_menu_show Quit:s. + (mac_menu_show): Quit on cancel if not popped up on click (i.e. + a dialog). + +2005-06-04 Kim F. Storm <storm@cua.dk> + + * coding.c (decode_coding_string): Handle CODING_FINISH_INTERRUPT. + + * callproc.c (Fcall_process): Don't use alloca to gradually + increase size of buf, as it effectively uses twice the necessary + space on the stack. Instead, pre-allocate buf of full size, and + gradually increase the read size. + + * bytecode.c (BYTE_CODE_QUIT): Check Vthrow_on_input. + + * eval.c (unbind_to): Preserve value of Vquit_flag. + + * xterm.c (handle_one_xevent): Also ignore mouse motion just + before a button release event. + +2005-06-03 Juanma Barranquero <lekktu@gmail.com> + + * xfaces.c (Finternal_lisp_face_equal_p): Really report + on faces in a frame, if the argument FRAME is non-nil. + Improve argument/docstring consistency. + +2005-06-02 Kim F. Storm <storm@cua.dk> + + * xdisp.c (MODE_LINE_NOPROP_LEN): New macro. + (x_consider_frame_title, Fformat_mode_line): Save offset into + mode_line_noprop_buf rather than pointer, in case buffer is relocated. + +2005-06-01 Kim F. Storm <storm@cua.dk> + + * fns.c (mapcar1): Maybe exit loop if original sequence was modified. + +2005-06-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * macterm.c (mac_to_x_fontname, mac_do_list_fonts): Set XLFD + resolution fields for scalable fonts to 0. + + * xfaces.c (build_scalable_font_name): Round pixel size to the + nearest integer. + +2005-06-01 Kim F. Storm <storm@cua.dk> + + * xdisp.c (display_mode_line): Support nested calls to redisplay + and format-mode-line. Set mode_line_target to MODE_LINE_DISPLAY. + +2005-05-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * fileio.c (Finsert_file_contents): + * xdisp.c (note_mode_line_or_margin_highlight): Lisp_Object/int mixup. + +2005-05-31 Kim F. Storm <storm@cua.dk> + + * xdisp.c (mode_line_noprop_buf, mode_line_noprop_buf_end) + (mode_line_noprop_ptr): Rename from frame_title_*. + (store_mode_line_noprop_char): Rename from store_frame_title_char. + (store_mode_line_noprop): Rename from store_frame_title. + (mode_line_target): New enum to specify current output target + for mode line formatting. + (display_mode_element): Test it rather than frame_title_ptr and + mode_line_string_list to determine where output should go. + (mode_line_proptrans_alist, mode_line_string_alist): Make static. + (Vmode_line_unwind_vector): New variable. + (format_mode_line_unwind_data, unwind_format_mode_line): + New functions for unwind protection in mode line formatting. + (x_consider_frame_title): Use them and new local var 'title_start' + to support nested calls to format-mode-line and redisplay. Set + mode_line_target to MODE_LINE_TITLE. + (Fformat_mode_line): Use them and new local var 'string_start' to + support nested calls to format-mode-line and redisplay. Set + mode_line_target to MODE_LINE_NOPROP or MODE_LINE_STRING. + Don't trim trailing dashes. + (decode_mode_spec): Don't make infinite number of trailing dashes + for MODE_LINE_NOPROP and MODE_LINE_STRING targets. + (syms_of_xdisp): Initialize and staticpro mode_line_string_face, + mode_line_string_face_prop, and Vmode_line_unwind_vector. + (init_xdisp): Initialize mode_line_noprop_ptr to start of _buf. + Initialize mode_line_target to MODE_LINE_DISPLAY. + +2005-05-29 Richard M. Stallman <rms@gnu.org> + + * buffer.c (Fbuffer_local_value): Call indirect_variable. + +2005-05-28 Masatake YAMATO <jet@gyve.org> + + * xdisp.c (note_mode_line_or_margin_highlight): Change the + pointer to a hand cursor when hoovering over a mouse-face. + +2005-05-27 Kenichi Handa <handa@m17n.org> + + * xterm.c (x_encode_char): Call check_ccl_update in advance. + + * ccl.c: Now an element of Vccl_program_table is a vector of + length 4, not 3. + (ccl_get_compiled_code): New arg idx. Caller changed. + Adjust for the change of Vccl_program_table. + (setup_ccl_program): Adjust for the change of Vccl_program_table. + (check_ccl_update): New function. + (Fregister_ccl_program): Use ASET to set an element of a vector. + Adjusted for the change of Vccl_program_table. + + * ccl.h (struct ccl_program): New member idx. + (check_ccl_update): Extern it. + +2005-05-27 Juanma Barranquero <lekktu@gmail.com> + + * image.c (Vimage_library_alist): Move from image.el. + (syms_of_image): Defvar it. + (lookup_image_type): Use it. + + * buffer.c (Fbuffer_local_value): Make argument name match its use + in docstring. + +2005-05-26 Juanma Barranquero <lekktu@gmail.com> + + * keyboard.c (Frecursive_edit): Fix typo in docstring. + (Fposn_at_x_y): Make argument name match its use in docstring. + +2005-05-26 Lute Kamstra <lute@gnu.org> + + * eval.c (Frun_hooks): Mention run-mode-hooks in docstring. + 2005-05-24 Masatake YAMATO <jet@gyve.org> * xdisp.c (note_mode_line_or_margin_highlight): Use b and e @@ -26,9 +176,9 @@ 2005-05-23 Masatake YAMATO <jet@gyve.org> - * xdisp.c (note_mode_line_or_margin_highlight): Added code - for mouse-face. Change the type of the first argument from `window' - to `List_Object'. + * xdisp.c (note_mode_line_or_margin_highlight): Add code + for mouse-face. Change the type of the first argument from `window' + to `Lisp_Object'. (note_mouse_highlight): Call note_mode_line_or_margin_highlight with window instead of w. @@ -79,8 +229,7 @@ 2005-05-16 Andreas Schwab <schwab@suse.de> - * unexmacosx.c (unexec_realloc): Move declarations before - statements. + * unexmacosx.c (unexec_realloc): Move declarations before statements. 2005-05-14 Richard M. Stallman <rms@gnu.org> @@ -108,8 +257,8 @@ * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init. - * keyboard.c (readable_events) [USE_TOOLKIT_SCROLL_BARS]: Regard - toolkit scroll bar thumb drag events as squeezable and prevent + * keyboard.c (readable_events) [USE_TOOLKIT_SCROLL_BARS]: + Regard toolkit scroll bar thumb drag events as squeezable and prevent redisplay from being paused by them. * mac.c [!MAC_OSX]: Include keyboard.h and syssignal.h. @@ -117,12 +266,11 @@ [!MAC_OSX] (check_alarm, pause, index): Remove functions. [!MAC_OSX && __MRC__] (sys_strftime): Likewise. [!MAC_OSX] (select): If fd 0 is not set in rfds and some input - event occurs before timeout, behave as if the function were - interrupted. + event occurs before timeout, behave as if the function were interrupted. [!MAC_OSX] (sigblock, sigsetmask, alarm): Simulate SIGALRM handling using Time Manager routines. - [!MAC_OSX] (mac_atimer_task, mac_atimer_qlink, signal_mask): New - variables. + [!MAC_OSX] (mac_atimer_task, mac_atimer_qlink, signal_mask): + New variables. [!MAC_OSX] (mac_atimer_handler, set_mac_atimer, remove_mac_atimer) (setitimer): New functions. @@ -136,8 +284,8 @@ (x_scroll_bar_handle_click): Change type of second argument from int to ControlPartCode. (check_alarm): Remove declaration. - (XTread_Socket) [!TARGET_API_MAC_CARBON]: Don't call it. - (XTread_Socket): Use ControlPartCode instead of SInt16. + (XTread_socket) [!TARGET_API_MAC_CARBON]: Don't call it. + (XTread_socket): Use ControlPartCode instead of SInt16. 2005-05-13 Nozomu Ando <nand@mac.com> @@ -1941,7 +2089,7 @@ 2005-01-13 Kim F. Storm <storm@cua.dk> * xdisp.c (Fformat_mode_line): Fix last change. Remove NO_PROPS arg - (specify 0 for FACE instead). Reorder arg list. Doc fix. + (specify 0 for FACE instead). Reorder arg list. Doc fix. 2005-01-12 Richard M. Stallman <rms@gnu.org> @@ -2092,7 +2240,7 @@ fontp->space_width to FONT_WIDTH so they are valid. * w32fns.c (w32_load_system_font): Set FONT_WIDTH to maximum, not - average width. Set fontp->average_width and fontp->space_width to + average width. Set fontp->average_width and fontp->space_width to their appropriate values. * w32term.c (x_new_font): Set FRAME_COLUMN_WIDTH to @@ -2119,7 +2267,7 @@ * xdisp.c (setup_for_ellipsis, get_next_display_element): Set it->ellipsis_p to 1 or 0. (display_line): Record whether row ends in mid-ellipsis. - (set_cursor_from_row): If ends in ellipsis. find start of it. + (set_cursor_from_row): If ends in ellipsis, find start of it. (cursor_row_p): If PT's at the end of the ellipsis the row ends within, don't display cursor on this row. @@ -2822,7 +2970,7 @@ * fringe.c (update_window_fringes): Prefer truncation bitmaps over angle bitmaps at top/bottom line. - * xdisp.c: Undo recent changes for restoring saved_face_id. Instead, + * xdisp.c: Undo recent changes for restoring saved_face_id. Instead, set it when it->method is set to next_element_from_display_vector. (setup_for_ellipsis): Add LEN argument. Callers changed. Set it->saved_face_id. @@ -3018,7 +3166,7 @@ * xfns.c (Fx_file_dialog): Call popup_activated instead of x_menu_in_use. Call x_menu_set_in_use in Motif version also. - * xterm.h: (x_menu_in_use): Remove. + * xterm.h (x_menu_in_use): Remove. 2004-11-16 Richard M. Stallman <rms@gnu.org> @@ -3152,7 +3300,7 @@ (MR_PARTIALLY_VISIBLE_AT_BOTTOM): New helper macros. (MATRIX_ROW_PARTIALLY_VISIBLE_P): Fix to return false if invisible part of last line is only extra line spacing (so the text on the - line is fully visible). Use helper macros. + line is fully visible). Use helper macros. Add W arg (to use them). All callers changed. (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P) (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P): Use helper macros. @@ -3833,7 +3981,7 @@ * keyboard.c (timer_resume_idle): New function to resume idle timer without resetting timers on the idle list. - (read_char): Use timer_resume_idle. Remove local var last_idle_start. + (read_char): Use timer_resume_idle. Remove local var last_idle_start. (timer_start_idle, timer_stop_idle): Declare static. (read_key_sequence): Use timer_resume_idle instead of timer_start_idle. @@ -4976,7 +5124,7 @@ 2004-06-11 Kenichi Handa <handa@m17n.org> - * coding.c (decode_coding_string): Check CODING_FINISH_INTERRUPT. + * coding.c (encode_coding_string): Check CODING_FINISH_INTERRUPT. 2004-06-11 Kim F. Storm <storm@cua.dk> @@ -5907,7 +6055,7 @@ elt_prefix combined with Fsingle_key_description. (describe_vector): Declare static. Replace arg `elt_prefix' with `prefix'. Add KEYMAP_P arg. Add local var `elt_prefix'; use it - if !KEYMAP_P. Use Fkey_description with prefix instead of + if !KEYMAP_P. Use Fkey_description with prefix instead of Fsingle_key_description. * keymap.h (Fkey_description): Fix prototype. @@ -6122,7 +6270,7 @@ (display_mode_line): Set mode_line_p before displaying line. (calc_pixel_width_or_height): Declare extern. Add separate :align-to handling. Remove complex cases for fringes and scroll-bars. - Add left, right, and center alignment positions. Add text (area) + Add left, right, and center alignment positions. Add text (area) width/height. Return width or height for image specs. (produce_stretch_glyph): Improve handling of :align-to. Is now relative to left of text area by default, but other base offsets @@ -10430,7 +10578,7 @@ * intervals.h (CHECK_TOTAL_LENGTH): New macro. * intervals.c: Add many calls to CHECK_TOTAL_LENGTH. - * alloc.c: (VALIDATE_LISP_STORAGE): Macro deleted. + * alloc.c (VALIDATE_LISP_STORAGE): Macro deleted. All calls deleted. (lisp_malloc): Do the work here directly. @@ -10589,7 +10737,7 @@ (syms_of_w32fns): Don't intern/staticpro removed vars. * w32term.c: Remove unnecessary extern declarations. - (x_fullscreen_adjust): Remove. Use generic instead. + (x_fullscreen_adjust): Remove. Use generic instead. (x_redisplay_interface): Add w32_frame_parm_handlers member. * w32reg.c (x_get_string_resource): Use XrmDatabase. @@ -11815,9 +11963,9 @@ 2003-01-21 David Ponce <david@dponce.com> * w32term.c (w32_encode_char): For DIM=1 charset, set - ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c - x_encode_char change by Kenichi Handa <handa@m17n.org> on - 2002-09-30.) + ccl->reg[2] to -1 before calling ccl_driver. + (Sync. with xterm.c x_encode_char change by Kenichi Handa + <handa@m17n.org> on 2002-09-30.) (w32_draw_relief_rect): Declare all args. (w32_define_cursor): New. @@ -14500,7 +14648,7 @@ 2002-06-27 Kim F. Storm <storm@cua.dk> - * xdisp.c: (mode_line_string_list, mode_line_string_face) + * xdisp.c (mode_line_string_list, mode_line_string_face) (mode_line_string_face_prop): New variables. (store_mode_line_string): New function. (display_mode_element): Use store_mode_line_string to @@ -14543,7 +14691,7 @@ 2002-06-24 Juanma Barranquero <lektu@terra.es> - * w32select.c: Include composite.h + * w32select.c: Include composite.h. * w16select.c: Likewise. @@ -15534,7 +15682,7 @@ * config.in: Add HAVE_SHARED_GAME_DIR. - * callproc.c: (Vgame_score_directory): New variable. + * callproc.c (Vgame_score_directory): New variable. (syms_of_callproc) <Vgame_score_directory>: DEFVAR_LISP. 2002-04-10 Richard M. Stallman <rms@gnu.org> @@ -16082,7 +16230,7 @@ * xterm.h (x_session_check_input, x_session_initialize): Declare. - * xterm.c: (XTread_socket): Add call to x_session_check_input and + * xterm.c (XTread_socket): Add call to x_session_check_input and x_session_have_connection. (x_initialize): Add call to x_session_initialize. @@ -16499,10 +16647,10 @@ 2002-02-17 Kim F. Storm <storm@cua.dk> - * frame.c: (Vmouse_highlight): New variable. + * frame.c (Vmouse_highlight): New variable. (syms_of_frame): DEFVAR_LISP it. - * frame.h: (Vmouse_highlight): Declare extern. + * frame.h (Vmouse_highlight): Declare extern. * xterm.h (struct x_display_info): Add mouse_face_hidden. @@ -18027,7 +18175,7 @@ 2001-11-16 Eli Zaretskii <eliz@is.elta.co.il> - * syswait.h: (HAVE_SYS_WAIT_H): Undef for ISC 4.1. Reported by + * syswait.h (HAVE_SYS_WAIT_H): Undef for ISC 4.1. Reported by Andrew Wiseman <a.wiseman@btclick.com>. 2001-11-16 Kim F. Storm <storm@cua.dk> @@ -18715,7 +18863,7 @@ * xterm.c: Fix typo in a comment. - * lisp.h: (gdb_lisp_params): Remove code in #if 0 which is now in + * lisp.h (gdb_lisp_params): Remove code in #if 0 which is now in emacs.c. 2001-10-27 Gerd Moellmann <gerd@gnu.org> @@ -18839,7 +18987,7 @@ 2001-10-24 Pavel Jan,Am(Bk <Pavel@Janik.cz> - * xterm.c: (x_insert_glyphs): Remove unused variables `real_end' + * xterm.c (x_insert_glyphs): Remove unused variables `real_end' and `real_start'. (x_draw_image_foreground): Remove unused variables `mask' and `xgcv'. (glyph_rect): Remove unused variable `area'. @@ -18871,7 +19019,7 @@ (HAVE_BOXES): Fix typo in comment. (push_menu_pane): Fix typo in comment. - * xdisp.c: (display_prop_string_p): Remove unused local declaration + * xdisp.c (display_prop_string_p): Remove unused local declaration of `Qwhen'. (single_display_prop_string_p): Remove unused local declarations of `Qwhen' and `Qmargin'.
--- a/src/buffer.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/buffer.c Mon Jun 06 02:39:45 2005 +0000 @@ -878,20 +878,23 @@ Sbuffer_local_value, 2, 2, 0, doc: /* Return the value of VARIABLE in BUFFER. If VARIABLE does not have a buffer-local binding in BUFFER, the value -is the default binding of variable. */) - (symbol, buffer) - register Lisp_Object symbol; +is the default binding of the variable. */) + (variable, buffer) + register Lisp_Object variable; register Lisp_Object buffer; { register struct buffer *buf; register Lisp_Object result; - CHECK_SYMBOL (symbol); + CHECK_SYMBOL (variable); CHECK_BUFFER (buffer); buf = XBUFFER (buffer); + if (SYMBOLP (variable)) + variable = indirect_variable (variable); + /* Look in local_var_list */ - result = Fassoc (symbol, buf->local_var_alist); + result = Fassoc (variable, buf->local_var_alist); if (NILP (result)) { int offset, idx; @@ -906,7 +909,7 @@ idx = PER_BUFFER_IDX (offset); if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) && SYMBOLP (PER_BUFFER_SYMBOL (offset)) - && EQ (PER_BUFFER_SYMBOL (offset), symbol)) + && EQ (PER_BUFFER_SYMBOL (offset), variable)) { result = PER_BUFFER_VALUE (buf, offset); found = 1; @@ -915,7 +918,7 @@ } if (!found) - result = Fdefault_value (symbol); + result = Fdefault_value (variable); } else { @@ -923,7 +926,7 @@ Lisp_Object current_alist_element; /* What binding is loaded right now? */ - valcontents = SYMBOL_VALUE (symbol); + valcontents = SYMBOL_VALUE (variable); current_alist_element = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr); @@ -940,7 +943,7 @@ } if (EQ (result, Qunbound)) - return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); + return Fsignal (Qvoid_variable, Fcons (variable, Qnil)); return result; } @@ -5292,19 +5295,19 @@ doc: /* Default value of `ctl-arrow' for buffers that do not override it. This is the same as (default-value 'ctl-arrow). */); - DEFVAR_LISP_NOPRO ("default-direction-reversed", - &buffer_defaults.direction_reversed, - doc: /* Default value of `direction-reversed' for buffers that do not override it. + DEFVAR_LISP_NOPRO ("default-direction-reversed", + &buffer_defaults.direction_reversed, + doc: /* Default value of `direction-reversed' for buffers that do not override it. This is the same as (default-value 'direction-reversed). */); - DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", - &buffer_defaults.enable_multibyte_characters, - doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. + DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", + &buffer_defaults.enable_multibyte_characters, + doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. This is the same as (default-value 'enable-multibyte-characters). */); - DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", - &buffer_defaults.buffer_file_coding_system, - doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. + DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", + &buffer_defaults.buffer_file_coding_system, + doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. This is the same as (default-value 'buffer-file-coding-system). */); DEFVAR_LISP_NOPRO ("default-truncate-lines",
--- a/src/bytecode.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/bytecode.c Mon Jun 06 02:39:45 2005 +0000 @@ -384,8 +384,11 @@ do { \ if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ { \ + Lisp_Object flag = Vquit_flag; \ Vquit_flag = Qnil; \ BEFORE_POTENTIAL_GC (); \ + if (EQ (Vthrow_on_input, flag)) \ + Fthrow (Vthrow_on_input, Qnil); \ Fsignal (Qquit, Qnil); \ AFTER_POTENTIAL_GC (); \ } \
--- a/src/callproc.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/callproc.c Mon Jun 06 02:39:45 2005 +0000 @@ -218,9 +218,10 @@ int fd[2]; int filefd; register int pid; - char buf[16384]; - char *bufptr = buf; - int bufsize = sizeof buf; +#define CALLPROC_BUFFER_SIZE_MIN (16 * 1024) +#define CALLPROC_BUFFER_SIZE_MAX (4 * CALLPROC_BUFFER_SIZE_MIN) + char buf[CALLPROC_BUFFER_SIZE_MAX]; + int bufsize = CALLPROC_BUFFER_SIZE_MIN; int count = SPECPDL_INDEX (); register const unsigned char **new_argv @@ -753,7 +754,7 @@ nread = carryover; while (nread < bufsize - 1024) { - int this_read = emacs_read (fd[0], bufptr + nread, + int this_read = emacs_read (fd[0], buf + nread, bufsize - nread); if (this_read < 0) @@ -779,7 +780,7 @@ { if (NILP (current_buffer->enable_multibyte_characters) && ! CODING_MAY_REQUIRE_DECODING (&process_coding)) - insert_1_both (bufptr, nread, nread, 0, 1, 0); + insert_1_both (buf, nread, nread, 0, 1, 0); else { /* We have to decode the input. */ Lisp_Object buf; @@ -826,17 +827,13 @@ if (process_coding.mode & CODING_MODE_LAST_BLOCK) break; +#if (CALLPROC_BUFFER_SIZE_MIN != CALLPROC_BUFFER_SIZE_MAX) /* Make the buffer bigger as we continue to read more data, - but not past 64k. */ - if (bufsize < 64 * 1024 && total_read > 32 * bufsize) - { - char *tempptr; - bufsize *= 2; - - tempptr = (char *) alloca (bufsize); - bcopy (bufptr, tempptr, bufsize / 2); - bufptr = tempptr; - } + but not past CALLPROC_BUFFER_SIZE_MAX. */ + if (bufsize < CALLPROC_BUFFER_SIZE_MAX && total_read > 32 * bufsize) + if ((bufsize *= 2) > CALLPROC_BUFFER_SIZE_MAX) + bufsize = CALLPROC_BUFFER_SIZE_MAX; +#endif if (display_p) {
--- a/src/ccl.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/ccl.c Mon Jun 06 02:39:45 2005 +0000 @@ -55,10 +55,12 @@ Lisp_Object Qccl_program_idx; /* Table of registered CCL programs. Each element is a vector of - NAME, CCL_PROG, and RESOLVEDP where NAME (symbol) is the name of - the program, CCL_PROG (vector) is the compiled code of the program, - RESOLVEDP (t or nil) is the flag to tell if symbols in CCL_PROG is - already resolved to index numbers or not. */ + NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the + name of the program, CCL_PROG (vector) is the compiled code of the + program, RESOLVEDP (t or nil) is the flag to tell if symbols in + CCL_PROG is already resolved to index numbers or not, UPDATEDP (t + or nil) is the flat to tell if the CCL program is updated after it + was once used. */ Lisp_Object Vccl_program_table; /* Vector of registered hash tables for translation. */ @@ -1850,14 +1852,16 @@ symbols, return Qnil. */ static Lisp_Object -ccl_get_compiled_code (ccl_prog) +ccl_get_compiled_code (ccl_prog, idx) Lisp_Object ccl_prog; + int *idx; { Lisp_Object val, slot; if (VECTORP (ccl_prog)) { val = resolve_symbol_ccl_program (ccl_prog); + *idx = -1; return (VECTORP (val) ? val : Qnil); } if (!SYMBOLP (ccl_prog)) @@ -1869,9 +1873,10 @@ return Qnil; slot = AREF (Vccl_program_table, XINT (val)); if (! VECTORP (slot) - || ASIZE (slot) != 3 + || ASIZE (slot) != 4 || ! VECTORP (AREF (slot, 1))) return Qnil; + *idx = XINT (val); if (NILP (AREF (slot, 2))) { val = resolve_symbol_ccl_program (AREF (slot, 1)); @@ -1900,7 +1905,7 @@ { struct Lisp_Vector *vp; - ccl_prog = ccl_get_compiled_code (ccl_prog); + ccl_prog = ccl_get_compiled_code (ccl_prog, &ccl->idx); if (! VECTORP (ccl_prog)) return -1; vp = XVECTOR (ccl_prog); @@ -1908,6 +1913,13 @@ ccl->prog = vp->contents; ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]); ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]); + if (ccl->idx >= 0) + { + Lisp_Object slot; + + slot = AREF (Vccl_program_table, ccl->idx); + ASET (slot, 3, Qnil); + } } ccl->ic = CCL_HEADER_MAIN; for (i = 0; i < 8; i++) @@ -1921,6 +1933,33 @@ return 0; } + +/* Check if CCL is updated or not. If not, re-setup members of CCL. */ + +int +check_ccl_update (ccl) + struct ccl_program *ccl; +{ + struct Lisp_Vector *vp; + Lisp_Object slot, ccl_prog; + + if (ccl->idx < 0) + return 0; + slot = AREF (Vccl_program_table, ccl->idx); + if (NILP (AREF (slot, 3))) + return 0; + ccl_prog = ccl_get_compiled_code (AREF (slot, 0), &ccl->idx); + if (! VECTORP (ccl_prog)) + return -1; + ccl->size = ASIZE (ccl_prog); + ccl->prog = XVECTOR (ccl_prog)->contents; + ccl->eof_ic = XINT (AREF (ccl_prog, CCL_HEADER_EOF)); + ccl->buf_magnification = XINT (AREF (ccl_prog, CCL_HEADER_BUF_MAG)); + ASET (slot, 3, Qnil); + return 0; +} + + DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. See the documentation of `define-ccl-program' for the detail of CCL program. */) @@ -2178,8 +2217,9 @@ if (EQ (name, AREF (slot, 0))) { /* Update this slot. */ - AREF (slot, 1) = ccl_prog; - AREF (slot, 2) = resolved; + ASET (slot, 1, ccl_prog); + ASET (slot, 2, resolved); + ASET (slot, 3, Qt); return make_number (idx); } } @@ -2192,19 +2232,19 @@ new_table = Fmake_vector (make_number (len * 2), Qnil); for (j = 0; j < len; j++) - AREF (new_table, j) - = AREF (Vccl_program_table, j); + ASET (new_table, j, AREF (Vccl_program_table, j)); Vccl_program_table = new_table; } { Lisp_Object elt; - elt = Fmake_vector (make_number (3), Qnil); - AREF (elt, 0) = name; - AREF (elt, 1) = ccl_prog; - AREF (elt, 2) = resolved; - AREF (Vccl_program_table, idx) = elt; + elt = Fmake_vector (make_number (4), Qnil); + ASET (elt, 0, name); + ASET (elt, 1, ccl_prog); + ASET (elt, 2, resolved); + ASET (elt, 3, Qt); + ASET (Vccl_program_table, idx, elt); } Fput (name, Qccl_program_idx, make_number (idx));
--- a/src/ccl.h Sun Jun 05 01:58:02 2005 +0000 +++ b/src/ccl.h Mon Jun 06 02:39:45 2005 +0000 @@ -36,6 +36,10 @@ /* Structure to hold information about running CCL code. Read comments in the file ccl.c for the detail of each field. */ struct ccl_program { + int idx; /* Index number of the CCL program. + -1 means that the program was given + by a vector, not by a program + name. */ int size; /* Size of the compiled code. */ Lisp_Object *prog; /* Pointer into the compiled code. */ int ic; /* Instruction Counter (index for PROG). */ @@ -91,6 +95,9 @@ execution of ccl program CCL_PROG (symbol or vector). */ extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object)); +/* Check if CCL is updated or not. If not, re-setup members of CCL. */ +extern int check_ccl_update P_ ((struct ccl_program *)); + extern void ccl_driver P_ ((struct ccl_program *, int *, int *, int, int, Lisp_Object));
--- a/src/emacs.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/emacs.c Mon Jun 06 02:39:45 2005 +0000 @@ -44,6 +44,7 @@ #include <fcntl.h> #include <windows.h> /* just for w32.h */ #include "w32.h" +#include "w32heap.h" /* for prototype of sbrk */ #endif #include "lisp.h"
--- a/src/eval.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/eval.c Mon Jun 06 02:39:45 2005 +0000 @@ -2292,7 +2292,7 @@ enum run_hooks_condition)); DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, - doc: /* Run each hook in HOOKS. Major mode functions use this. + doc: /* Run each hook in HOOKS. Each argument should be a symbol, a hook variable. These symbols are processed in the order specified. If a hook symbol has a non-nil value, that value may be a function @@ -2300,6 +2300,9 @@ If the value is a function, it is called with no arguments. If it is a list, the elements are called, in order, with no arguments. +Major modes should not use this function directly to run their mode +hook; they should use `run-mode-hooks' instead. + Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hooks &rest HOOKS) */) @@ -3127,10 +3130,10 @@ int count; Lisp_Object value; { - int quitf = !NILP (Vquit_flag); - struct gcpro gcpro1; - - GCPRO1 (value); + Lisp_Object quitf = Vquit_flag; + struct gcpro gcpro1, gcpro2; + + GCPRO2 (value, quitf); Vquit_flag = Qnil; while (specpdl_ptr != specpdl + count) @@ -3179,8 +3182,8 @@ } } - if (NILP (Vquit_flag) && quitf) - Vquit_flag = Qt; + if (NILP (Vquit_flag) && !NILP (quitf)) + Vquit_flag = quitf; UNGCPRO; return value;
--- a/src/fileio.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/fileio.c Mon Jun 06 02:39:45 2005 +0000 @@ -3750,7 +3750,7 @@ int set_coding_system = 0; Lisp_Object coding_system; int read_quit = 0; - int old_Vdeactivate_mark = Vdeactivate_mark; + Lisp_Object old_Vdeactivate_mark = Vdeactivate_mark; int we_locked_file = 0; if (current_buffer->base_buffer && ! NILP (visit))
--- a/src/fns.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/fns.c Mon Jun 06 02:39:45 2005 +0000 @@ -2479,9 +2479,9 @@ else /* Must be a list, since Flength did not get an error */ { tail = seq; - for (i = 0; i < leni; i++) + for (i = 0; i < leni && CONSP (tail); i++) { - dummy = call1 (fn, Fcar (tail)); + dummy = call1 (fn, XCAR (tail)); if (vals) vals[i] = dummy; tail = XCDR (tail); @@ -2521,7 +2521,7 @@ mapcar1 (leni, args, function, sequence); UNGCPRO; - for (i = leni - 1; i >= 0; i--) + for (i = leni - 1; i > 0; i--) args[i + i] = args[i]; for (i = 1; i < nargs; i += 2)
--- a/src/image.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/image.c Mon Jun 06 02:39:45 2005 +0000 @@ -616,6 +616,10 @@ Lisp_Object Vimage_types; +/* An alist of image types and libraries that implement the type. */ + +Lisp_Object Vimage_library_alist; + /* Cache for delayed-loading image types. */ static Lisp_Object Vimage_type_cache; @@ -696,7 +700,7 @@ struct image_type *type; /* We must initialize the image-type if it hasn't been already. */ - if (NILP (Finit_image_library (symbol, Qnil))) + if (NILP (Finit_image_library (symbol, Vimage_library_alist))) return 0; /* unimplemented */ for (type = image_types; type; type = type->next) @@ -7985,6 +7989,8 @@ void syms_of_image () { + extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ + /* Must be defined now becase we're going to update it below, while defining the supported image types. */ DEFVAR_LISP ("image-types", &Vimage_types, @@ -7993,6 +7999,20 @@ To check whether it is really supported, use `image-type-available-p'. */); Vimage_types = Qnil; + DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, + doc: /* Alist of image types vs external libraries needed to display them. + +Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol +representing a supported image type, and the rest are strings giving +alternate filenames for the corresponding external libraries. + +Emacs tries to load the libraries in the order they appear on the +list; if none is loaded, the running session of Emacs won't +support the image type. Types 'pbm and 'xbm don't need to be +listed; they're always supported. */); + Vimage_library_alist = Qnil; + Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt); + Vimage_type_cache = Qnil; staticpro (&Vimage_type_cache);
--- a/src/keyboard.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/keyboard.c Mon Jun 06 02:39:45 2005 +0000 @@ -1020,7 +1020,7 @@ doc: /* Invoke the editor command loop recursively. To get out of the recursive edit, a command can do `(throw 'exit nil)'; that tells this function to return. -Alternately, `(throw 'exit t)' makes this function signal an error. +Alternatively, `(throw 'exit t)' makes this function signal an error. This function is called by the editor initialization to begin editing. */) () { @@ -10546,7 +10546,7 @@ DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, doc: /* Return position information for pixel coordinates X and Y. By default, X and Y are relative to text area of the selected window. -Optional third arg FRAME_OR_WINDOW non-nil specifies frame or window. +Optional third arg FRAME-OR-WINDOW non-nil specifies frame or window. If optional fourth arg WHOLE is non-nil, X is relative to the left edge of the window. @@ -10846,7 +10846,7 @@ staticpro (&Qdrag_n_drop); Qsave_session = intern ("save-session"); - staticpro(&Qsave_session); + staticpro (&Qsave_session); Qusr1_signal = intern ("usr1-signal"); staticpro (&Qusr1_signal);
--- a/src/macmenu.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/macmenu.c Mon Jun 06 02:39:45 2005 +0000 @@ -602,6 +602,13 @@ } } +static Lisp_Object +cleanup_popup_menu (arg) + Lisp_Object arg; +{ + discard_menu_items (); +} + DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, doc: /* Pop up a deck-of-cards menu and return user's selection. POSITION is a position specification. This is either a mouse button @@ -647,6 +654,8 @@ int keymaps = 0; int for_click = 0; struct gcpro gcpro1; + int specpdl_count = SPECPDL_INDEX (); + #ifdef HAVE_MENUS if (! NILP (position)) @@ -806,13 +815,13 @@ #ifdef HAVE_MENUS /* Display them in a menu. */ + record_unwind_protect (cleanup_popup_menu, Qnil); BLOCK_INPUT; selection = mac_menu_show (f, xpos, ypos, for_click, keymaps, title, &error_name); UNBLOCK_INPUT; - - discard_menu_items (); + unbind_to (specpdl_count, Qnil); UNGCPRO; #endif /* HAVE_MENUS */ @@ -1931,6 +1940,9 @@ } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; }
--- a/src/macterm.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/macterm.c Mon Jun 06 02:39:45 2005 +0000 @@ -6277,9 +6277,10 @@ strcpy(family, name); } - sprintf(xf, "-%s-%s-%s-%c-normal--%d-%d-75-75-m-%d-%s", + sprintf(xf, "-%s-%s-%s-%c-normal--%d-%d-%d-%d-m-%d-%s", foundry, family, style & bold ? "bold" : "medium", - style & italic ? 'i' : 'r', size, size * 10, size * 10, charset); + style & italic ? 'i' : 'r', size, size * 10, + size ? 75 : 0, size ? 75 : 0, size * 10, charset); result = (char *) xmalloc (strlen (xf) + 1); strcpy (result, xf); @@ -6738,7 +6739,7 @@ break; } else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 - && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) + && (ptr = strstr (font_name_table[i], "-0-0-0-0-m-0-"))) { int former_len = ptr - font_name_table[i]; @@ -6748,7 +6749,7 @@ scl_val[XLFD_SCL_PIXEL_SIZE], scl_val[XLFD_SCL_POINT_SIZE], scl_val[XLFD_SCL_AVGWIDTH], - ptr + sizeof ("-0-0-75-75-m-0-") - 1); + ptr + sizeof ("-0-0-0-0-m-0-") - 1); fontname = mac_c_string_match (pattern_regex, scaled, nonspecial, exact); if (!NILP (fontname))
--- a/src/makefile.w32-in Sun Jun 05 01:58:02 2005 +0000 +++ b/src/makefile.w32-in Mon Jun 06 02:39:45 2005 +0000 @@ -42,6 +42,8 @@ TRES = $(BLD)/emacs.res TLASTLIB = $(BLD)/lastfile.$(A) +DOC = $(OBJDIR)/etc/DOC-X + FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK) #
--- a/src/s/ms-w32.h Sun Jun 05 01:58:02 2005 +0000 +++ b/src/s/ms-w32.h Mon Jun 06 02:39:45 2005 +0000 @@ -354,7 +354,9 @@ #define fcloseall _fcloseall #define fdopen _fdopen #define fgetchar _fgetchar +#ifndef fileno #define fileno _fileno +#endif #define flushall _flushall #define fputchar _fputchar #define fsync _commit
--- a/src/w32.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/w32.c Mon Jun 06 02:39:45 2005 +0000 @@ -1273,7 +1273,7 @@ void gettimeofday (struct timeval *tv, struct timezone *tz) { - struct timeb tb; + struct _timeb tb; _ftime (&tb); tv->tv_sec = tb.time; @@ -1777,7 +1777,7 @@ nr.dwDisplayType = RESOURCEDISPLAYTYPE_SERVER; nr.dwUsage = RESOURCEUSAGE_CONTAINER; nr.lpLocalName = NULL; - nr.lpRemoteName = map_w32_filename (path, NULL); + nr.lpRemoteName = (LPSTR)map_w32_filename (path, NULL); nr.lpComment = NULL; nr.lpProvider = NULL; @@ -3207,7 +3207,7 @@ } int -sys_setsockopt (int s, int level, int optname, const char * optval, int optlen) +sys_setsockopt (int s, int level, int optname, const void * optval, int optlen) { if (winsock_lib == NULL) { @@ -3219,7 +3219,7 @@ if (fd_info[s].flags & FILE_SOCKET) { int rc = pfn_setsockopt (SOCK_HANDLE (s), level, optname, - optval, optlen); + (const char *)optval, optlen); if (rc == SOCKET_ERROR) set_errno (); return rc;
--- a/src/xdisp.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/xdisp.c Mon Jun 06 02:39:45 2005 +0000 @@ -846,8 +846,8 @@ struct text_pos)); static void reconsider_clip_changes P_ ((struct window *, struct buffer *)); static int text_outside_line_unchanged_p P_ ((struct window *, int, int)); -static void store_frame_title_char P_ ((char)); -static int store_frame_title P_ ((const unsigned char *, int, int)); +static void store_mode_line_noprop_char P_ ((char)); +static int store_mode_line_noprop P_ ((const unsigned char *, int, int)); static void x_consider_frame_title P_ ((Lisp_Object)); static void handle_stop P_ ((struct it *)); static int tool_bar_lines_needed P_ ((struct frame *)); @@ -8271,52 +8271,126 @@ /*********************************************************************** - Frame Titles + Mode Lines and Frame Titles ***********************************************************************/ - -/* The frame title buffering code is also used by Fformat_mode_line. - So it is not conditioned by HAVE_WINDOW_SYSTEM. */ - -/* A buffer for constructing frame titles in it; allocated from the - heap in init_xdisp and resized as needed in store_frame_title_char. */ - -static char *frame_title_buf; +/* A buffer for constructing non-propertized mode-line strings and + frame titles in it; allocated from the heap in init_xdisp and + resized as needed in store_mode_line_noprop_char. */ + +static char *mode_line_noprop_buf; /* The buffer's end, and a current output position in it. */ -static char *frame_title_buf_end; -static char *frame_title_ptr; - - -/* Store a single character C for the frame title in frame_title_buf. - Re-allocate frame_title_buf if necessary. */ +static char *mode_line_noprop_buf_end; +static char *mode_line_noprop_ptr; + +#define MODE_LINE_NOPROP_LEN(start) \ + ((mode_line_noprop_ptr - mode_line_noprop_buf) - start) + +static enum { + MODE_LINE_DISPLAY = 0, + MODE_LINE_TITLE, + MODE_LINE_NOPROP, + MODE_LINE_STRING +} mode_line_target; + +/* Alist that caches the results of :propertize. + Each element is (PROPERTIZED-STRING . PROPERTY-LIST). */ +static Lisp_Object mode_line_proptrans_alist; + +/* List of strings making up the mode-line. */ +static Lisp_Object mode_line_string_list; + +/* Base face property when building propertized mode line string. */ +static Lisp_Object mode_line_string_face; +static Lisp_Object mode_line_string_face_prop; + + +/* Unwind data for mode line strings */ + +static Lisp_Object Vmode_line_unwind_vector; + +static Lisp_Object +format_mode_line_unwind_data (obuf) + struct buffer *obuf; +{ + int i = 0; + Lisp_Object vector; + + /* Reduce consing by keeping one vector in + Vwith_echo_area_save_vector. */ + vector = Vmode_line_unwind_vector; + Vmode_line_unwind_vector = Qnil; + + if (NILP (vector)) + vector = Fmake_vector (make_number (7), Qnil); + + AREF (vector, 0) = make_number (mode_line_target); + AREF (vector, 1) = make_number (MODE_LINE_NOPROP_LEN (0)); + AREF (vector, 2) = mode_line_string_list; + AREF (vector, 3) = mode_line_proptrans_alist; + AREF (vector, 4) = mode_line_string_face; + AREF (vector, 5) = mode_line_string_face_prop; + + if (obuf) + XSETBUFFER (AREF (vector, 6), obuf); + else + AREF (vector, 6) = Qnil; + + return vector; +} + +static Lisp_Object +unwind_format_mode_line (vector) + Lisp_Object vector; +{ + mode_line_target = XINT (AREF (vector, 0)); + mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1)); + mode_line_string_list = AREF (vector, 2); + mode_line_proptrans_alist = AREF (vector, 3); + mode_line_string_face = AREF (vector, 4); + mode_line_string_face_prop = AREF (vector, 5); + + if (!NILP (AREF (vector, 6))) + { + set_buffer_internal_1 (XBUFFER (AREF (vector, 6))); + AREF (vector, 6) = Qnil; + } + + Vmode_line_unwind_vector = vector; + return Qnil; +} + + +/* Store a single character C for the frame title in mode_line_noprop_buf. + Re-allocate mode_line_noprop_buf if necessary. */ static void #ifdef PROTOTYPES -store_frame_title_char (char c) +store_mode_line_noprop_char (char c) #else -store_frame_title_char (c) +store_mode_line_noprop_char (c) char c; #endif { /* If output position has reached the end of the allocated buffer, double the buffer's size. */ - if (frame_title_ptr == frame_title_buf_end) - { - int len = frame_title_ptr - frame_title_buf; - int new_size = 2 * len * sizeof *frame_title_buf; - frame_title_buf = (char *) xrealloc (frame_title_buf, new_size); - frame_title_buf_end = frame_title_buf + new_size; - frame_title_ptr = frame_title_buf + len; - } - - *frame_title_ptr++ = c; -} - - -/* Store part of a frame title in frame_title_buf, beginning at - frame_title_ptr. STR is the string to store. Do not copy + if (mode_line_noprop_ptr == mode_line_noprop_buf_end) + { + int len = MODE_LINE_NOPROP_LEN (0); + int new_size = 2 * len * sizeof *mode_line_noprop_buf; + mode_line_noprop_buf = (char *) xrealloc (mode_line_noprop_buf, new_size); + mode_line_noprop_buf_end = mode_line_noprop_buf + new_size; + mode_line_noprop_ptr = mode_line_noprop_buf + len; + } + + *mode_line_noprop_ptr++ = c; +} + + +/* Store part of a frame title in mode_line_noprop_buf, beginning at + mode_line_noprop_ptr. STR is the string to store. Do not copy characters that yield more columns than PRECISION; PRECISION <= 0 means copy the whole string. Pad with spaces until FIELD_WIDTH number of characters have been copied; FIELD_WIDTH <= 0 means don't @@ -8324,7 +8398,7 @@ frame title. */ static int -store_frame_title (str, field_width, precision) +store_mode_line_noprop (str, field_width, precision) const unsigned char *str; int field_width, precision; { @@ -8335,19 +8409,23 @@ nbytes = strlen (str); n += c_string_width (str, nbytes, precision, &dummy, &nbytes); while (nbytes--) - store_frame_title_char (*str++); + store_mode_line_noprop_char (*str++); /* Fill up with spaces until FIELD_WIDTH reached. */ while (field_width > 0 && n < field_width) { - store_frame_title_char (' '); + store_mode_line_noprop_char (' '); ++n; } return n; } +/*********************************************************************** + Frame Titles + ***********************************************************************/ + #ifdef HAVE_WINDOW_SYSTEM /* Set the title of FRAME, if it has changed. The title format is @@ -8367,9 +8445,11 @@ /* Do we have more than one visible frame on this X display? */ Lisp_Object tail; Lisp_Object fmt; - struct buffer *obuf; + int title_start; + char *title; int len; struct it it; + int count = SPECPDL_INDEX (); for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { @@ -8388,18 +8468,22 @@ multiple_frames = CONSP (tail); /* Switch to the buffer of selected window of the frame. Set up - frame_title_ptr so that display_mode_element will output into it; - then display the title. */ - obuf = current_buffer; + mode_line_target so that display_mode_element will output into + mode_line_noprop_buf; then display the title. */ + record_unwind_protect (unwind_format_mode_line, + format_mode_line_unwind_data (current_buffer)); + set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->buffer)); fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format; - frame_title_ptr = frame_title_buf; + + mode_line_target = MODE_LINE_TITLE; + title_start = MODE_LINE_NOPROP_LEN (0); init_iterator (&it, XWINDOW (f->selected_window), -1, -1, NULL, DEFAULT_FACE_ID); display_mode_element (&it, 0, -1, -1, fmt, Qnil, 0); - len = frame_title_ptr - frame_title_buf; - frame_title_ptr = NULL; - set_buffer_internal_1 (obuf); + len = MODE_LINE_NOPROP_LEN (title_start); + title = mode_line_noprop_buf + title_start; + unbind_to (count, Qnil); /* Set the title only if it's changed. This avoids consing in the common case where it hasn't. (If it turns out that we've @@ -8408,8 +8492,8 @@ higher level than this.) */ if (! STRINGP (f->name) || SBYTES (f->name) != len - || bcmp (frame_title_buf, SDATA (f->name), len) != 0) - x_implicitly_set_name (f, make_string (frame_title_buf, len), Qnil); + || bcmp (title, SDATA (f->name), len) != 0) + x_implicitly_set_name (f, make_string (title, len), Qnil); } } @@ -15693,6 +15777,7 @@ { struct it it; struct face *face; + int count = SPECPDL_INDEX (); init_iterator (&it, w, -1, -1, NULL, face_id); prepare_desired_row (it.glyph_row); @@ -15703,6 +15788,11 @@ /* Force the mode-line to be displayed in the default face. */ it.base_face_id = it.face_id = DEFAULT_FACE_ID; + record_unwind_protect (unwind_format_mode_line, + format_mode_line_unwind_data (NULL)); + + mode_line_target = MODE_LINE_DISPLAY; + /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ @@ -15710,6 +15800,8 @@ display_mode_element (&it, 0, 0, 0, format, Qnil, 0); pop_frame_kboard (); + unbind_to (count, Qnil); + /* Fill up with spaces. */ display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); @@ -15732,18 +15824,6 @@ return it.glyph_row->height; } -/* Alist that caches the results of :propertize. - Each element is (PROPERTIZED-STRING . PROPERTY-LIST). */ -Lisp_Object mode_line_proptrans_alist; - -/* List of strings making up the mode-line. */ -Lisp_Object mode_line_string_list; - -/* Base face property when building propertized mode line string. */ -static Lisp_Object mode_line_string_face; -static Lisp_Object mode_line_string_face_prop; - - /* Contribute ELT to the mode line for window IT->w. How it translates into text depends on its data type. @@ -15764,8 +15844,9 @@ If RISKY is nonzero, remove (disregard) any properties in any string we encounter, and ignore :eval and :propertize. - If the global variable `frame_title_ptr' is non-NULL, then the output - is passed to `store_frame_title' instead of `display_string'. */ + The global variable `mode_line_target' determines whether the + output is passed to `store_mode_line_noprop', + `store_mode_line_string', or `display_string'. */ static int display_mode_element (it, depth, field_width, precision, elt, props, risky) @@ -15854,21 +15935,27 @@ if (literal) { prec = precision - n; - if (frame_title_ptr) - n += store_frame_title (SDATA (elt), -1, prec); - else if (!NILP (mode_line_string_list)) - n += store_mode_line_string (NULL, elt, 1, 0, prec, Qnil); - else - n += display_string (NULL, elt, Qnil, 0, 0, it, - 0, prec, 0, STRING_MULTIBYTE (elt)); + switch (mode_line_target) + { + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop (SDATA (elt), -1, prec); + break; + case MODE_LINE_STRING: + n += store_mode_line_string (NULL, elt, 1, 0, prec, Qnil); + break; + case MODE_LINE_DISPLAY: + n += display_string (NULL, elt, Qnil, 0, 0, it, + 0, prec, 0, STRING_MULTIBYTE (elt)); + break; + } break; } while ((precision <= 0 || n < precision) && *this - && (frame_title_ptr - || !NILP (mode_line_string_list) + && (mode_line_target != MODE_LINE_DISPLAY || it->current_x < it->last_visible_x)) { const unsigned char *last = this; @@ -15889,29 +15976,36 @@ prec = c_string_width (last, this - last, precision - n, &nchars, &nbytes); - if (frame_title_ptr) - n += store_frame_title (last, 0, prec); - else if (!NILP (mode_line_string_list)) + switch (mode_line_target) { - int bytepos = last - lisp_string; - int charpos = string_byte_to_char (elt, bytepos); - int endpos = (precision <= 0 - ? string_byte_to_char (elt, - this - lisp_string) - : charpos + nchars); - - n += store_mode_line_string (NULL, - Fsubstring (elt, make_number (charpos), - make_number (endpos)), - 0, 0, 0, Qnil); - } - else - { - int bytepos = last - lisp_string; - int charpos = string_byte_to_char (elt, bytepos); - n += display_string (NULL, elt, Qnil, 0, charpos, - it, 0, prec, 0, - STRING_MULTIBYTE (elt)); + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop (last, 0, prec); + break; + case MODE_LINE_STRING: + { + int bytepos = last - lisp_string; + int charpos = string_byte_to_char (elt, bytepos); + int endpos = (precision <= 0 + ? string_byte_to_char (elt, + this - lisp_string) + : charpos + nchars); + + n += store_mode_line_string (NULL, + Fsubstring (elt, make_number (charpos), + make_number (endpos)), + 0, 0, 0, Qnil); + } + break; + case MODE_LINE_DISPLAY: + { + int bytepos = last - lisp_string; + int charpos = string_byte_to_char (elt, bytepos); + n += display_string (NULL, elt, Qnil, 0, charpos, + it, 0, prec, 0, + STRING_MULTIBYTE (elt)); + } + break; } } else /* c == '%' */ @@ -15949,44 +16043,51 @@ spec = decode_mode_spec (it->w, c, field, prec, &multibyte); - if (frame_title_ptr) - n += store_frame_title (spec, field, prec); - else if (!NILP (mode_line_string_list)) - { - int len = strlen (spec); - Lisp_Object tem = make_string (spec, len); - props = Ftext_properties_at (make_number (charpos), elt); - /* Should only keep face property in props */ - n += store_mode_line_string (NULL, tem, 0, field, prec, props); - } - else + switch (mode_line_target) { - int nglyphs_before, nwritten; - - nglyphs_before = it->glyph_row->used[TEXT_AREA]; - nwritten = display_string (spec, Qnil, elt, - charpos, 0, it, - field, prec, 0, - multibyte); - - /* Assign to the glyphs written above the - string where the `%x' came from, position - of the `%'. */ - if (nwritten > 0) - { - struct glyph *glyph - = (it->glyph_row->glyphs[TEXT_AREA] - + nglyphs_before); - int i; - - for (i = 0; i < nwritten; ++i) - { - glyph[i].object = elt; - glyph[i].charpos = charpos; - } - - n += nwritten; - } + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop (spec, field, prec); + break; + case MODE_LINE_STRING: + { + int len = strlen (spec); + Lisp_Object tem = make_string (spec, len); + props = Ftext_properties_at (make_number (charpos), elt); + /* Should only keep face property in props */ + n += store_mode_line_string (NULL, tem, 0, field, prec, props); + } + break; + case MODE_LINE_DISPLAY: + { + int nglyphs_before, nwritten; + + nglyphs_before = it->glyph_row->used[TEXT_AREA]; + nwritten = display_string (spec, Qnil, elt, + charpos, 0, it, + field, prec, 0, + multibyte); + + /* Assign to the glyphs written above the + string where the `%x' came from, position + of the `%'. */ + if (nwritten > 0) + { + struct glyph *glyph + = (it->glyph_row->glyphs[TEXT_AREA] + + nglyphs_before); + int i; + + for (i = 0; i < nwritten; ++i) + { + glyph[i].object = elt; + glyph[i].charpos = charpos; + } + + n += nwritten; + } + } + break; } } else /* c == 0 */ @@ -16157,13 +16258,20 @@ /* Pad to FIELD_WIDTH. */ if (field_width > 0 && n < field_width) { - if (frame_title_ptr) - n += store_frame_title ("", field_width - n, 0); - else if (!NILP (mode_line_string_list)) - n += store_mode_line_string ("", Qnil, 0, field_width - n, 0, Qnil); - else - n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n, - 0, 0, 0); + switch (mode_line_target) + { + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop ("", field_width - n, 0); + break; + case MODE_LINE_STRING: + n += store_mode_line_string ("", Qnil, 0, field_width - n, 0, Qnil); + break; + case MODE_LINE_DISPLAY: + n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n, + 0, 0, 0); + break; + } } return n; @@ -16295,6 +16403,9 @@ struct buffer *old_buffer = NULL; int face_id = -1; int no_props = INTEGERP (face); + int count = SPECPDL_INDEX (); + Lisp_Object str; + int string_start = 0; if (NILP (window)) window = selected_window; @@ -16322,64 +16433,50 @@ face_id = DEFAULT_FACE_ID; if (XBUFFER (buffer) != current_buffer) - { - old_buffer = current_buffer; - set_buffer_internal_1 (XBUFFER (buffer)); - } + old_buffer = current_buffer; + + record_unwind_protect (unwind_format_mode_line, + format_mode_line_unwind_data (old_buffer)); + + if (old_buffer) + set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id); - if (!no_props) - { + if (no_props) + { + mode_line_target = MODE_LINE_NOPROP; + mode_line_string_face_prop = Qnil; + mode_line_string_list = Qnil; + string_start = MODE_LINE_NOPROP_LEN (0); + } + else + { + mode_line_target = MODE_LINE_STRING; + mode_line_string_list = Qnil; mode_line_string_face = face; mode_line_string_face_prop = (NILP (face) ? Qnil : Fcons (Qface, Fcons (face, Qnil))); - - /* We need a dummy last element in mode_line_string_list to - indicate we are building the propertized mode-line string. - Using mode_line_string_face_prop here GC protects it. */ - mode_line_string_list - = Fcons (mode_line_string_face_prop, Qnil); - frame_title_ptr = NULL; - } - else - { - mode_line_string_face_prop = Qnil; - mode_line_string_list = Qnil; - frame_title_ptr = frame_title_buf; } push_frame_kboard (it.f); display_mode_element (&it, 0, 0, 0, format, Qnil, 0); pop_frame_kboard (); - if (old_buffer) - set_buffer_internal_1 (old_buffer); - - if (!no_props) - { - Lisp_Object str; + if (no_props) + { + len = MODE_LINE_NOPROP_LEN (string_start); + str = make_string (mode_line_noprop_buf + string_start, len); + } + else + { mode_line_string_list = Fnreverse (mode_line_string_list); - str = Fmapconcat (intern ("identity"), XCDR (mode_line_string_list), + str = Fmapconcat (intern ("identity"), mode_line_string_list, make_string ("", 0)); - mode_line_string_face_prop = Qnil; - mode_line_string_list = Qnil; - return str; - } - - len = frame_title_ptr - frame_title_buf; - if (len > 0 && frame_title_ptr[-1] == '-') - { - /* Mode lines typically ends with numerous dashes; reduce to two dashes. */ - while (frame_title_ptr > frame_title_buf && *--frame_title_ptr == '-') - ; - frame_title_ptr += 3; /* restore last non-dash + two dashes */ - if (len > frame_title_ptr - frame_title_buf) - len = frame_title_ptr - frame_title_buf; - } - - frame_title_ptr = NULL; - return make_string (frame_title_buf, len); + } + + unbind_to (count, Qnil); + return str; } /* Write a null-terminated, right justified decimal representation of @@ -16698,7 +16795,8 @@ register int i; /* Let lots_of_dashes be a string of infinite length. */ - if (!NILP (mode_line_string_list)) + if (mode_line_target == MODE_LINE_NOPROP || + mode_line_target == MODE_LINE_STRING) return "--"; if (field_width <= 0 || field_width > sizeof (lots_of_dashes)) @@ -21547,7 +21645,7 @@ tmp_glyph->charpos >= XINT (b); tmp_glyph--, gpos++) { - if (tmp_glyph->object != glyph->object) + if (!EQ (tmp_glyph->object, glyph->object)) break; } @@ -21560,7 +21658,7 @@ tmp_glyph->charpos < XINT (e); tmp_glyph++, gseq_length++) { - if (tmp_glyph->object != glyph->object) + if (!EQ (tmp_glyph->object, glyph->object)) break; } @@ -21590,6 +21688,9 @@ 0, 0, 0, &ignore, glyph->face_id, 1); show_mouse_face (dpyinfo, DRAW_MOUSE_FACE); + + if (NILP (pointer)) + pointer = Qhand; } } @@ -22833,9 +22934,14 @@ mode_line_proptrans_alist = Qnil; staticpro (&mode_line_proptrans_alist); - mode_line_string_list = Qnil; staticpro (&mode_line_string_list); + mode_line_string_face = Qnil; + staticpro (&mode_line_string_face); + mode_line_string_face_prop = Qnil; + staticpro (&mode_line_string_face_prop); + Vmode_line_unwind_vector = Qnil; + staticpro (&Vmode_line_unwind_vector); help_echo_string = Qnil; staticpro (&help_echo_string); @@ -23185,9 +23291,10 @@ /* Allocate the buffer for frame titles. Also used for `format-mode-line'. */ int size = 100; - frame_title_buf = (char *) xmalloc (size); - frame_title_buf_end = frame_title_buf + size; - frame_title_ptr = NULL; + mode_line_noprop_buf = (char *) xmalloc (size); + mode_line_noprop_buf_end = mode_line_noprop_buf + size; + mode_line_noprop_ptr = mode_line_noprop_buf; + mode_line_target = MODE_LINE_DISPLAY; } help_echo_showing_p = 0;
--- a/src/xfaces.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/xfaces.c Mon Jun 06 02:39:45 2005 +0000 @@ -5128,8 +5128,8 @@ DEFUN ("internal-lisp-face-equal-p", Finternal_lisp_face_equal_p, Sinternal_lisp_face_equal_p, 2, 3, 0, doc: /* True if FACE1 and FACE2 are equal. -If the optional argument FRAME is given, report on face FACE in that frame. -If FRAME is t, report on the defaults for face FACE (for new frames). +If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame. +If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). If FRAME is omitted or nil, use the selected frame. */) (face1, face2, frame) Lisp_Object face1, face2, frame; @@ -5137,8 +5137,8 @@ int equal_p; Lisp_Object lface1, lface2; - lface1 = lface_from_face_name (NULL, face1, 1); - lface2 = lface_from_face_name (NULL, face2, 1); + lface1 = lface_from_face_name (f, face1, 1); + lface2 = lface_from_face_name (f, face2, 1); equal_p = lface_equal_p (XVECTOR (lface1)->contents, XVECTOR (lface2)->contents); return equal_p ? Qt : Qnil; @@ -6580,12 +6580,12 @@ if (font->numeric[XLFD_RESY] != 0) { pt = resy / font->numeric[XLFD_RESY] * specified_pt + 0.5; - pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt; + pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt + 0.5; } else { pt = specified_pt; - pixel_value = resy / (PT_PER_INCH * 10.0) * pt; + pixel_value = resy / (PT_PER_INCH * 10.0) * pt + 0.5; } /* We may need a font of the different size. */ pixel_value *= font->rescale_ratio;
--- a/src/xmenu.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/xmenu.c Mon Jun 06 02:39:45 2005 +0000 @@ -1235,6 +1235,10 @@ if (event.type == ButtonRelease && dpyinfo->display == event.xbutton.display) { + /* If the click is not on the menu, deactivate the menu. */ + if (x_any_window_to_frame (dpyinfo, event.xexpose.window)) + popup_activated_flag = 0; + dpyinfo->grabbed &= ~(1 << event.xbutton.button); #ifdef USE_MOTIF /* Pretending that the event came from a Btn1Down seems the only way to convince Motif to
--- a/src/xterm.c Sun Jun 05 01:58:02 2005 +0000 +++ b/src/xterm.c Mon Jun 06 02:39:45 2005 +0000 @@ -906,6 +906,7 @@ /* It's a program. */ struct ccl_program *ccl = font_info->font_encoder; + check_ccl_update (ccl); if (CHARSET_DIMENSION (charset) == 1) { ccl->reg[0] = CHARSET_ID (charset); @@ -6782,12 +6783,6 @@ { dpyinfo->grabbed |= (1 << event.xbutton.button); last_mouse_frame = f; - /* Ignore any mouse motion that happened - before this event; any subsequent mouse-movement - Emacs events should reflect only motion after - the ButtonPress. */ - if (f != 0) - f->mouse_moved = 0; if (!tool_bar_p) last_tool_bar_item = -1; @@ -6795,6 +6790,12 @@ else dpyinfo->grabbed &= ~(1 << event.xbutton.button); + /* Ignore any mouse motion that happened before this event; + any subsequent mouse-movement Emacs events should reflect + only motion after the ButtonPress/Release. */ + if (f != 0) + f->mouse_moved = 0; + #if defined (USE_X_TOOLKIT) || defined (USE_GTK) f = x_menubar_window_to_frame (dpyinfo, event.xbutton.window); /* For a down-event in the menu bar,