diff options
182 files changed, 2822 insertions, 1787 deletions
diff --git a/ChangeLog b/ChangeLog index 416c288669d..9892f121f3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-09 Kim F. Storm <storm@cua.dk> + + Change release version from 21.4 to 22.1 throughout. + Change development version from 21.3.50 to 22.0.50. + 2005-01-19 Steven Tamm <steventamm@mac.com> * configure.in: Check for <sys/utsname.h>. @@ -1,4 +1,4 @@ -This directory tree holds version 21.3.50 of GNU Emacs, the extensible, +This directory tree holds version 22.0.50 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. You may encounter bugs in this release. If you do, please report diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index facce8ec9a7..55505c1ae6b 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -65,6 +65,41 @@ further. I think in the near future we will see more of this problem, so it might be time to make anfe-ftp more intelligent. +** pcvs bug: + +In a CVS mode buffer created using the `cvs-examine' command, if I +commit a file in a subdirectory, after committing the line is not +updated with the version of the new revision. Instead, a line is added +in the buffer in the top directory listing. + +Example: I start with this: + +,---- +| In directory .: +| Unknown .htaccess +| Unknown 404.php +| Unknown rain.jpg +| In directory include: +| Modified include/foo.include +`---- + +I commit the file include/foo.include using `c' on the corresponding +line. I get: + +,---- +| In directory .: +| Unknown .htaccess +| Unknown 404.php +| committed Up-To-Date 1.13 foo.include +| Unknown rain.jpg +| In directory include: +| Modified include/foo.include +`---- + +There is no file named foo.include in the top directory. This bug +appeared sometime before October 2004 and now. + + * GTK RELATED BUGS @@ -178,26 +213,26 @@ people who have checked it. SECTION READERS ----------------------------- -man/abbrevs.texi +man/abbrevs.texi Chong Yidong man/anti.texi -man/basic.texi "Luc Teirlinck" +man/basic.texi "Luc Teirlinck" Chong Yidong man/buffers.texi "Luc Teirlinck" Chong Yidong man/building.texi "Ted Zlatanov" <tzz@lifelogs.com> man/calendar.texi Joakim Verona <joakim@verona.se> -man/cmdargs.texi +man/cmdargs.texi Chong Yidong man/commands.texi "Luc Teirlinck" -man/custom.texi +man/custom.texi Chong Yidong man/dired.texi man/display.texi "Luc Teirlinck" man/emacs.texi "Luc Teirlinck" -man/entering.texi "Luc Teirlinck" +man/entering.texi "Luc Teirlinck" Chong Yidong man/files.texi "Luc Teirlinck" Chong Yidong man/fixit.texi "Luc Teirlinck" man/frames.texi "Luc Teirlinck" Chong Yidong man/glossary.texi man/help.texi "Luc Teirlinck" man/indent.texi "Luc Teirlinck" -man/killing.texi "Luc Teirlinck" +man/killing.texi "Luc Teirlinck" Chong Yidong man/kmacro.texi "Luc Teirlinck" man/macos.texi man/maintaining.texi @@ -210,7 +245,7 @@ man/mule.texi "Luc Teirlinck" man/m-x.texi "Luc Teirlinck" man/picture.texi Joakim Verona <joakim@verona.se> man/programs.texi "Stephen Eglen" -man/regs.texi "Luc Teirlinck" +man/regs.texi "Luc Teirlinck" Chong Yidong man/rmail.texi man/screen.texi "Luc Teirlinck" man/search.texi "Luc Teirlinck" @@ -261,17 +296,17 @@ lispref/macros.texi "Luc Teirlinck" lispref/maps.texi lispref/markers.texi "Luc Teirlinck" lispref/minibuf.texi "Luc Teirlinck" -lispref/modes.texi +lispref/modes.texi Chong Yidong lispref/nonascii.texi "Luc Teirlinck" lispref/numbers.texi "Luc Teirlinck" lispref/objects.texi "Luc Teirlinck" lispref/os.texi "Luc Teirlinck" -lispref/positions.texi "Luc Teirlinck" +lispref/positions.texi "Luc Teirlinck" Chong Yidong lispref/processes.texi lispref/searching.texi "Luc Teirlinck" lispref/sequences.texi "Luc Teirlinck" lispref/streams.texi "Luc Teirlinck" -lispref/strings.texi "Luc Teirlinck" +lispref/strings.texi "Luc Teirlinck" Chong Yidong lispref/symbols.texi "Luc Teirlinck" lispref/syntax.texi "Luc Teirlinck" lispref/text.texi Chong Yidong diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 3af7cb81da3..30f5dc33082 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -4,7 +4,7 @@ Instructions to create pretest or release tarballs. For each step, check for possible errors. -1. cvs -q update -Pd +1. cvs -q update -Pd 2. Bootstrap to make 100% sure all elc files are up-to-date, and to make sure that the later tagged version will bootstrap, should it be @@ -19,51 +19,52 @@ For each step, check for possible errors. M-x set-version RET). For a release, add released change log entries (M-x add-release-logs RET). -5. rm configure; make bootstrap +5. rm configure; make bootstrap 6. Commit configure, README, AUTHORS, lisp/loaddefs.el, lisp/cus-load.el, lisp/finder-inf.el, lisp/version.el, man/emacs.texi. For a release, also commit the ChangeLog files in all directories. -7. make-dist --snapshot. Check the contents of the new tar with - admin/diff-tar-files against an older tar file. Some old pretest +7. make-dist --snapshot. Check the contents of the new tar with + admin/diff-tar-files against an older tar file. Some old pretest tarballs are kept under fencepost.gnu.org:~pot/emacs-pretest/, while old emacs tarballs are at <ftp://ftp.gnu.org/pub/gnu/emacs/>. -8. xdelta delta emacs-OLD.tar.gz emacs-NEW.tar.gz emacs-OLD-NEW.xdelta +8. xdelta delta emacs-OLD.tar.gz emacs-NEW.tar.gz emacs-OLD-NEW.xdelta -9. tar -zxf emacs-NEW.tar.gz; cd emacs-NEW - configure && make && make -n install +9. tar -zxf emacs-NEW.tar.gz; cd emacs-NEW + configure && make && make -n install Use `script' or M-x compile to save the compilation log in compile-NEW.log and compare it against an old one. The easiest way to do that is to visit the old log in Emacs, change the version number of the old Emacs to __, do the same with the new log and do M-x ediff. Especially check that Info files aren't built. -10. cd EMACS_ROOT_DIR; cvs tag TAG +10. cd EMACS_ROOT_DIR; cvs tag TAG TAG is EMACS_PRETEST_XX_YY_ZZZ for a pretest, EMACS_XX_YY for a release. -11. admin/make-announcement OLD NEW +11. admin/make-announcement OLD NEW This creates an announcement for pretests. OLD is the version used - to make deltas with respect to NEW. Anouncements for pretests need - to be crafted by hand. Use an older announcement to start with. - -12. For the moment, put the tarballs on a public site and send a GPG - signed email to <maintainers@gnu.org> with the URLs of the tarballs - and their md5sum signatures. As of 2003-10, the GNU maintainers are - working on a better procedure. For reference, here are the previous - instructions, which are no more valid after the break-in of 2003-08: - ==== - For a pretest, do: - rsync -aP emacs-NEW.tar.gz emacs-OLD-NEW.xdelta compile-NEW.log \ - emacs-NEW.announce alpha.gnu.org:/home/alpha/gnu/emacs/pretest/. - For a release, do: - rsync -aP emacs-NEW.tar.gz emacs-OLD-NEW.xdelta \ - alpha.gnu.org:/home/ftp/gnu/emacs/. - -13. Verify that the files are visible at + to make deltas with respect to NEW. Announcements for releases need + to be crafted by hand. Use an older announcement to start with: + look in ssh://fencepost.gnu.org/~pot/emacs-tarballs/. + +12. Now you should upload the files to the GNU ftp server. In order to + do that, you must be registered as an Emacs maintainer and have your + GPG key acknowledged by the ftp people. Mail <ftp-upload@gnu.org> + for instructions. Once you are there, for each file FILE to be + released, create a detached GPG binary signature and a clearsigned + directive file like this: + gpg -b FILE + echo directory: emacs/pretest > FILE.directive (for a pretest) + echo directory: emacs > FILE.directive (for a release) + gpg --clearsign FILE.directive + Upload by anonymous ftp to ftp://ftp-upload.gnu.org/incoming/ftp/ + the files FILE, FILE.sig, FILE.directive.asc + +13. After five minutes, verify that the files are visible at ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, at ftp://ftp.gnu.org/gnu/emacs/ for a release. diff --git a/etc/ChangeLog b/etc/ChangeLog index 47f20d8f03f..e464e75dbe1 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,14 @@ +2005-02-08 Lute Kamstra <lute@gnu.org> + + * TUTORIAL: Remove some uses of the term "buffer" before it is + properly introduced. Update the description of the mode line. + Consistently use "<ESC>" to denote the ESC key and "<SPC>" to + denote the Space bar. Capitalize all command descriptions. + +2005-02-06 Richard M. Stallman <rms@gnu.org> + + * DEBUG: Minor clarification. + 2005-02-05 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE> * emacs.bash: Update the name of the socket of the Emacs server. diff --git a/etc/DEBUG b/etc/DEBUG index cbe79ee3ab6..b242d1d028d 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -17,8 +17,8 @@ should read the Windows-specific section near the end of this document.] ** When you debug Emacs with GDB, you should start it in the directory -where you built Emacs. That directory has a .gdbinit file that defines -various "user-defined" commands for debugging Emacs. +where the executable was made. That directory has a .gdbinit file +that defines various "user-defined" commands for debugging Emacs. ** It is a good idea to run Emacs under GDB (or some other suitable debugger) *all the time*. Then, when Emacs crashes, you will be able diff --git a/etc/MACHINES b/etc/MACHINES index e87510f6d0a..63f341aade7 100644 --- a/etc/MACHINES +++ b/etc/MACHINES @@ -651,7 +651,7 @@ Intel 386 (i386-*-isc, i386-*-esix, i386-*-bsdi2, i386-unknown-isc3.0 as your configuration name. Use i386-*-esix for Esix; Emacs runs as of version 19.6. Use i386-*-linux-gnu for GNU/Linux systems; Emacs runs as of version 19.26. - Use i386-*-cygwin for Cygwin; Emacs builds as of version 21.4, in both X11 + Use i386-*-cygwin for Cygwin; Emacs builds as of version 22.1, in both X11 and non-X11 modes. (The Cygwin site has source and binaries for 21.2.) Use i386-intsys-sysv for Integrated Solutions 386 machines. It may also be correct for Microport systems. diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index f82bf4cb045..25f649b5434 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -1,7 +1,7 @@ * COPYRIGHT Copyright (C) 2003, 2004 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. @@ -392,7 +392,7 @@ has been fixed (closes SF #933954). * Changes in MH-E 7.4.4 Version 7.4.4 addresses programmatic issues from the FSF and prepares -MH-E for inclusion into an impending GNU Emacs release (21.4). There +MH-E for inclusion into an impending GNU Emacs release (22.1). There are no user-visible changes (unless you are using XEmacs on DOS or don't have the cl package installed). Filenames are now unique in their first 8 characters (DOS 8.3 requirement). The runtime dependency @@ -90,7 +90,7 @@ coding-system-spec eight-bit-control/eight-bit-graphic charsets aren't now in the range 128-255. -* Installation Changes in Emacs 21.4 +* Installation Changes in Emacs 22.1 ** Emacs includes now support for loading image libraries on demand. (Currently this feature is only used on MS Windows.) You can configure @@ -172,7 +172,7 @@ See the files mac/README and mac/INSTALL for build instructions. types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. -* Changes in Emacs 21.4 +* Changes in Emacs 22.1 ** Emacs now responds to mouse-clicks on the mode-line, header-line and display margin, when run in an xterm. @@ -214,7 +214,7 @@ Depending on the current mode, a Mouse-2 click in Emacs may do much more than just follow a link, so the new Mouse-1 behavior is only activated for modes which explicitly mark a clickable text as a "link" (see the new function `mouse-on-link-p' for details). The Lisp -packages that are included in release 21.4 have been adapted to do +packages that are included in release 22.1 have been adapted to do this, but external packages may not yet support this. However, there is no risk in using such packages, as the worst thing that could happen is that you get the original Mouse-1 behavior when you click @@ -2116,8 +2116,11 @@ whose names begin with space are omitted. +++ ** You can now customize fill-nobreak-predicate to control where -filling can break lines. We provide two sample predicates, -fill-single-word-nobreak-p and fill-french-nobreak-p. +filling can break lines. The value is now normally a list of +functions, but it can also be a single function, for compatibility. + +We provide two sample predicates, fill-single-word-nobreak-p and +fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. +++ ** New user option `add-log-always-start-new-record'. @@ -2304,7 +2307,7 @@ temporary overlay showing in the course of an isearch operation. coding system. -* New modes and packages in Emacs 21.4 +* New modes and packages in Emacs 22.1 ** The new package conf-mode.el handles thousands of configuration files, with varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, @@ -2548,7 +2551,7 @@ timing measurements of code (including the garbage collection component). ** `cfengine-mode' is a major mode for editing GNU Cfengine configuration files. -* Incompatible Lisp Changes in Emacs 21.4 +* Incompatible Lisp Changes in Emacs 22.1 +++ ** `suppress-keymap' now works by remapping `self-insert-command' to @@ -2561,7 +2564,7 @@ the command `undefined'. (In earlier Emacs versions, it used :propertize and :eval forms in the value of a variable whose `risky-local-variable' property is nil. -* Lisp Changes in Emacs 21.4 +* Lisp Changes in Emacs 22.1 ** An element of buffer-undo-list can now have the form (FUNNAME . ARGS), where FUNNAME is a symbol other than t or nil. That stands for diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 632a23f54b9..8d1bae6ba5e 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -735,7 +735,7 @@ introduced with Emacs 21.1, could significantly slow down scrolling through the buffer, especially scrolling backwards, and also jumping to the end of a very large buffer. -Beginning with version 21.4, a parenthesis or a brace in column zero +Beginning with version 22.1, a parenthesis or a brace in column zero is highlighted in bold-red face if it is inside a string or a comment, to indicate that it could interfere with Font Lock (and also with indentation) and should be moved or escaped with a backslash. @@ -1553,7 +1553,7 @@ entry that supports color is `xterm-color', so setting TERM's value to `xterm-color' might activate the color support on an xterm-compatible emulator. -Beginning with version 21.4, Emacs supports the --color command-line +Beginning with version 22.1, Emacs supports the --color command-line option which may be used to force Emacs to use one of a few popular modes for getting colors on a tty. For example, --color=ansi8 sets up for using the ANSI-standard escape sequences that support 8 colors. @@ -2873,7 +2873,7 @@ libraries. *** HP/UX versions before 11.0 -HP/UX 9 was end-of-lifed in December 1998. +HP/UX 9 was end-of-lifed in December 1998. HP/UX 10 was end-of-lifed in May 1999. **** HP/UX 9: Emacs crashes with SIGBUS or SIGSEGV after you delete a frame. @@ -2951,7 +2951,7 @@ the kernel bug. *** Irix 5 and earlier -Exactly when Irix-5 end-of-lifed is obscure. But since Irix 6.0 +Exactly when Irix-5 end-of-lifed is obscure. But since Irix 6.0 shipped in 1994, it has been some years. **** Irix 5.2: unexelfsgi.c can't find cmplrs/stsupport.h. diff --git a/etc/TUTORIAL b/etc/TUTORIAL index ee92a6ae233..b5632ae707b 100644 --- a/etc/TUTORIAL +++ b/etc/TUTORIAL @@ -1,5 +1,5 @@ You are looking at the Emacs tutorial. See end for copying conditions. -Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation. +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation. Emacs commands generally involve the CONTROL key (sometimes labeled CTRL or CTL) or the META key (sometimes labeled EDIT or ALT). Rather than @@ -259,9 +259,9 @@ If you type one of the disabled commands, Emacs displays a message saying what the command was, and asking you whether you want to go ahead and execute the command. -If you really want to try the command, type Space in answer to the -question. Normally, if you do not want to execute the disabled -command, answer the question with "n". +If you really want to try the command, type <SPC> (the Space bar) in +answer to the question. Normally, if you do not want to execute the +disabled command, answer the question with "n". >> Type C-x C-l (which is a disabled command), then type n to answer the question. @@ -352,27 +352,27 @@ You've now learned the most basic way of typing something in Emacs and correcting errors. You can delete by words or lines as well. Here is a summary of the delete operations: - <Delback> delete the character just before the cursor - C-d delete the next character after the cursor + <Delback> Delete the character just before the cursor + C-d Delete the next character after the cursor - M-<Delback> kill the word immediately before the cursor - M-d kill the next word after the cursor + M-<Delback> Kill the word immediately before the cursor + M-d Kill the next word after the cursor - C-k kill from the cursor position to end of line - M-k kill to the end of the current sentence + C-k Kill from the cursor position to end of line + M-k Kill to the end of the current sentence Notice that <Delback> and C-d vs M-<Delback> and M-d extend the parallel started by C-f and M-f (well, <Delback> is not really a control character, but let's not worry about that). C-k and M-k are like C-e and M-e, sort of, in that lines are opposite sentences. -You can also kill any part of the buffer with one uniform method. -Move to one end of that part, and type C-@ or C-SPC (either one). -(SPC is the Space bar.) Move to the other end of that part, and type -C-w. That kills all the text between the two positions. +You can also kill any part of the text with one uniform method. Move +to one end of that part, and type C-@ or C-<SPC> (either one). (<SPC> +is the Space bar.) Move to the other end of that part, and type C-w. +That kills all the text between the two positions. >> Move the cursor to the Y at the start of the previous paragraph. ->> Type C-SPC. Emacs should display a message "Mark set" +>> Type C-<SPC>. Emacs should display a message "Mark set" at the bottom of the screen. >> Move the cursor to the n in "end", on the second line of the paragraph. @@ -401,9 +401,9 @@ lines and their newlines; typing C-k twice would not do that. Bringing back killed text is called "yanking". (Think of it as yanking back, or pulling back, some text that was taken away.) You can yank the killed text either at the same place where it was killed, -or at some other place in the buffer, or even in a different file. -You can yank the same text several times; that makes multiple copies -of it. +or at some other place in the text you are editing, or even in a +different file. You can yank the same text several times; that makes +multiple copies of it. The command for yanking is C-y. It reinserts the last killed text, at the current cursor position. @@ -638,11 +638,12 @@ the X (eXtend) command. This comes in two flavors: M-x Named command eXtend. Followed by a long name. These are commands that are generally useful but used less than the -commands you have already learned about. You have already seen two of -them: the file commands C-x C-f to Find and C-x C-s to Save. Another -example is the command to end the Emacs session--this is the command -C-x C-c. (Do not worry about losing changes you have made; C-x C-c -offers to save each changed file before it kills the Emacs.) +commands you have already learned about. You have already seen a few +of them: the file commands C-x C-f to Find and C-x C-s to Save, for +example. Another example is the command to end the Emacs +session--this is the command C-x C-c. (Do not worry about losing +changes you have made; C-x C-c offers to save each changed file before +it kills the Emacs.) C-z is the command to exit Emacs *temporarily*--so that you can go back to the same Emacs session afterward. @@ -666,12 +667,14 @@ with C-z instead of exiting Emacs. There are many C-x commands. Here is a list of the ones you have learned: - C-x C-f Find file. - C-x C-s Save file. - C-x C-b List buffers. - C-x C-c Quit Emacs. - C-x 1 Delete all but one window. - C-x u Undo. + C-x C-f Find file + C-x C-s Save file + C-x s Save some buffers + C-x C-b List buffers + C-x b Switch buffer + C-x C-c Quit Emacs + C-x 1 Delete all but one window + C-x u Undo Named eXtended commands are commands which are used even less frequently, or commands which are used only in certain modes. An @@ -727,18 +730,18 @@ shows them to you at the bottom of the screen in an area called the The line immediately above the echo area is called the "mode line". The mode line says something like this: ---:** TUTORIAL (Fundamental)--L670--58%---------------- +--:** TUTORIAL 63% L749 (Fundamental)----------------------- This line gives useful information about the status of Emacs and the text you are editing. You already know what the filename means--it is the file you have -found. -NN%-- indicates your current position in the text; it means -that NN percent of the text is above the top of the screen. If the -top of the file is on the screen, it will say --Top-- instead of ---00%--. If the bottom of the text is on the screen, it will say ---Bot--. If you are looking at text so small that all of it fits on -the screen, the mode line says --All--. +found. NN% indicates your current position in the text; it means that +NN percent of the text is above the top of the screen. If the top of +the file is on the screen, it will say "Top" instead of " 0%". If the +bottom of the text is on the screen, it will say "Bot". If you are +looking at text so small that all of it fits on the screen, the mode +line says "All". The L and digits indicate position in another way: they give the current line number of point. @@ -767,6 +770,7 @@ switch to Fundamental mode. If you are going to be editing human-language text, such as this file, you should probably use Text Mode. + >> Type M-x text mode<Return>. Don't worry, none of the Emacs commands you have learned changes in @@ -897,7 +901,7 @@ window on the screen at the same time. Both windows display this tutorial. The cursor stays in the top window. >> Type C-M-v to scroll the bottom window. - (If you do not have a real META key, type ESC C-v.) + (If you do not have a real META key, type <ESC> C-v.) >> Type C-x o ("o" for "other") to move the cursor to the bottom window. >> Use C-v and M-v in the bottom window to scroll it. @@ -921,10 +925,10 @@ META key, you can type C-M-v by holding down both CONTROL and META while typing v. It does not matter whether CONTROL or META "comes first," because both of these keys act by modifying the characters you type. -If you do not have a real META key, and you use ESC instead, the order -does matter: you must type ESC followed by CONTROL-v, because -CONTROL-ESC v will not work. This is because ESC is a character in -its own right, not a modifier key. +If you do not have a real META key, and you use <ESC> instead, the +order does matter: you must type <ESC> followed by CONTROL-v, because +CONTROL-<ESC> v will not work. This is because <ESC> is a character +in its own right, not a modifier key. >> Type C-x 1 (in the top window) to get rid of the bottom window. @@ -955,11 +959,12 @@ level". This is indicated by square brackets in the mode line, surrounding the parentheses around the major mode name. For example, you might see [(Fundamental)] instead of (Fundamental). -To get out of the recursive editing level, type ESC ESC ESC. That is -an all-purpose "get out" command. You can also use it for eliminating -extra windows, and getting out of the minibuffer. +To get out of the recursive editing level, type <ESC> <ESC> <ESC>. +That is an all-purpose "get out" command. You can also use it for +eliminating extra windows, and getting out of the minibuffer. ->> Type M-x to get into a minibuffer; then type ESC ESC ESC to get out. +>> Type M-x to get into a minibuffer; then type <ESC> <ESC> <ESC> to + get out. You cannot use C-g to get out of a recursive editing level. This is because C-g is used for canceling commands and arguments WITHIN the @@ -1099,7 +1104,7 @@ starting with the one written by Stuart Cracraft for the original Emacs. This version of the tutorial, like GNU Emacs, is copyrighted, and comes with permission to distribute copies on certain conditions: -Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a38b40db6e1..831c0e9e747 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,128 @@ +2005-02-12 Luc Teirlinck <teirllm@auburn.edu> + + * custom.el (custom-theme-set-variables): Handle variable aliases. + + * frame.el (blink-cursor-timer): Doc fix. + (blink-cursor): Make it an alias for `blink-cursor-mode' and + declare obsolete. + (blink-cursor-mode): Define with defcustom and use correct + standard expression in that defcustom. + * startup.el (command-line): Adapt to above changes in frame.el. + +2005-02-11 Lute Kamstra <lute@gnu.org> + + * apropos.el (apropos-score-doc): Prevent division by zero. + +2005-02-11 Ulf Jasper <ulf.jasper@web.de> + + * calendar/icalendar.el (icalendar--get-event-property): Doc fix. + (icalendar--get-event-property-attributes) + (icalendar--get-event-properties) + (icalendar--datetime-to-diary-date): New functions. + (icalendar--split-value): Doc fix. + (icalendar--datetime-to-noneuropean-date) + (icalendar--datetime-to-european-date): New optional argument + SEPARATOR. Return result as a string instead of a list. + (icalendar--get-weekday-number): Check if ABBREVWEEKDAY is nil. + (icalendar--convert-string-for-export): Rename arg S to STRING. + (icalendar-export-region): Doc fix. Change name of error buffer. + Save output buffer. + (icalendar-import-file): Add blank at end of prompt. + (icalendar-import-buffer): Doc fix. Do not switch to error + buffer. Indicate status in return value. + (icalendar--convert-ical-to-diary): Doc fix. Change name of error + buffer. Save output buffer. Handle exception from recurrence + rules (EXDATE, EXRULE). Handle start- and end-date of recurring + events. Fix problems with weekly all-day events. + +2005-02-10 Richard M. Stallman <rms@gnu.org> + + * simple.el (eval-expression-print-format): + Avoid warning about edebug-active. + + * help.el (help-for-help-internal): Renamed from help-for-help. + (help-for-help): Define with defalias. + + * font-core.el (font-lock-default-function): Use with-no-warnings. + + * cus-edit.el (custom-buffer-create-internal): Improve help-echo. + + * custom.el (defface): Doc fix. + +2005-02-10 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-ann3): Re-instate GDB command "set + width 0" to prevent word wrapping problems. + +2005-02-09 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-file-extensions-order): New defcustom. + (ido-file-extension-lessp, ido-file-extension-aux) + (ido-file-extension-order): New advanced file ordering. + (ido-file-lessp): New simple file ordering. + (ido-sort-list): Remove. + (ido-make-file-list): Use ido-file-lessp or ido-file-extension-lessp. + (ido-make-dir-list, ido-completion-help): Use ido-file-lessp. + +2005-02-08 Dan Nicolaescu <dann@ics.uci.edu> + + * progmodes/grep.el (grep-regexp-alist): Match an optional ^[[K + that some versions of grep produce. + (grep-mode-font-lock-keywords): Likewise. + +2005-02-09 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-location-list): New variable. + (gdb-cdir): Delete + (gdb-info-breakpoints-custom, gdb-goto-breakpoint) + (gdb-source-info): Treat case when source file is in another + directory properly. + (gdb-get-location): New function. + +2005-02-07 Jay Belanger <belanger@truman.edu> + + * calc/calc-prog.el (calc-write-parse-table-part) + (calc-fix-token-name): Fix a check for language type. + + * calc/calccomp.el (math-compose-expr): Fix a check for language + type. + +2005-02-07 Andre Spiegel <spiegel@gnu.org> + + * vc-hooks.el (vc-make-version-backup): Ignore file-errors such + as directory not writable. + +2005-02-07 Kim F. Storm <storm@cua.dk> + + * emulation/cua-base.el (cua-max-undo, cua-undo): Remove. + (cua--standard-movement-commands): Remove list. + Instead, set CUA property value to move for movement commands. + (cua-movement-commands): Remove. Users must set CUA prop instead. + (cua--pre-command-handler): Check CUA property. + (cua--init-keymaps): Don't remap undo commands. + (cua-mode): Don't call cua--rectangle-on-off. + + * emulation/cua-rect.el (cua--undo-list, cua--tidy-undo-counter) + (cua--rect-undo, cua--tidy-undo-lists, cua--rectangle-on-off): Remove. + (cua--rect-undo-set-point): New var. + (cua--rectangle-undo-boundary): Setup undo apply entry. + (cua--rect-undo-handler): New function for rectangle undo. + (cua--rect-start-position, cua--rect-end-position): Add. + (cua--rectangle-post-command): Call cua--rectangle-set-corners + for restored rectangle. Set point if cua--rect-undo-set-point. + +2005-02-06 Jay Belanger <belanger@truman.edu> + + * calc/calc-lang.el (calc-tex-language): Display more information + in messages. + + * calc/calccomp.el (math-compose-expr): Allow multiline matrices + in TeX mode. + +2005-02-06 Richard M. Stallman <rms@gnu.org> + + * emacs-lisp/lisp.el (buffer-end): Doc fix. + 2005-02-05 Arne_J,Ax(Brgensen <arne@arnested.dk> (tiny change) * net/ldap.el (ldap-search-internal): Support attributes with @@ -6625,7 +6750,7 @@ (tramp-multi-action-process-alive): New defun. (tramp-multi-actions): Use it. (tramp-handle-find-backup-file-name): `copy-tree' is available - since Emacs 21.4 only (XEmacs has it). Implementation rewritten + since Emacs 22.1 only (XEmacs has it). Implementation rewritten in order to avoid this function. (tramp-handle-write-region): Set current buffer. If connection wasn't open, `file-modes' has changed it accidently. Reported by @@ -11256,7 +11381,7 @@ (tramp-async-proc): New variable. (tramp-handle-shell-command): Adding asynchronous processes. They are far from being perfect, but it works at least for - `find-grep-dired' and `find-name-dired' in Emacs 21.4. + `find-grep-dired' and `find-name-dired' in Emacs 22.1. (top-level): Require password.el if visible. Should be mandatory once No Gnus has found its way into (X)Emacs. (tramp-read-passwd): Invoke `password-read' if available, @@ -12867,7 +12992,7 @@ Apply `file-attributes' instead of `tramp-handle-file-attributes' in order to make the function more general. (tramp-handle-file-attributes): Replace proprietary optional - parameter NONNUMERIC by the recently (Emacs 21.4) introduced ID-FORMAT. + parameter NONNUMERIC by the recently (Emacs 22.1) introduced ID-FORMAT. (tramp-handle-file-attributes-with-perl): Handle parameter NONNUMERIC if set. This wasn't done in the past. (tramp-post-connection): Apply second parameter "$2" if @@ -12876,7 +13001,7 @@ * net/tramp-smb.el (tramp-smb-handle-delete-file): Correct cut'n'waste error (`filename' instead of `directory'). (tramp-smb-handle-directory-files-and-attributes) - (tramp-smb-handle-file-attributes): Add recently (Emacs 21.4) + (tramp-smb-handle-file-attributes): Add recently (Emacs 22.1) introduced parameter ID-FORMAT. (tramp-smb-handle-make-directory-internal): Correct cut'n'waste error (`directory' instead of `ldir'). diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10 index 70e149b51db..6467fef4e72 100644 --- a/lisp/ChangeLog.10 +++ b/lisp/ChangeLog.10 @@ -9439,7 +9439,7 @@ * progmodes/ada-stmt.el (ada-stmt-add-to-ada-menu): Handle the menu pseudo-keys generated by easymenu which are lowercase in - Emacs 21.4. + Emacs 22.1. * progmodes/ada-xref.el (ada-xref-update-project-menu,ada-add-ada-menu): Ditto. diff --git a/lisp/add-log.el b/lisp/add-log.el index 50be95d265a..ce98760222d 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -126,7 +126,7 @@ this variable." (defcustom add-log-always-start-new-record nil "*If non-nil, `add-change-log-entry' will always start a new record." - :version "21.4" + :version "22.1" :type 'boolean :group 'change-log) @@ -790,7 +790,7 @@ Has a preference of looking backwards." ;; between that end and the desired position. (when (save-excursion (and (> location (point)) - (re-search-forward "^DEFUN" + (re-search-forward "^DEFUN" (save-excursion (goto-char location) (line-end-position)) diff --git a/lisp/allout.el b/lisp/allout.el index fa88588ec36..4b1c152b6b1 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -69,7 +69,7 @@ "Extensive outline mode for use alone and with other modes." :prefix "allout-" :group 'editing - :version "21.4") + :version "22.1") ;;;_ + Layout, Mode, and Topic Header Configuration diff --git a/lisp/apropos.el b/lisp/apropos.el index 1befefe8814..ae8a4ad628c 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1,6 +1,6 @@ ;;; apropos.el --- apropos commands for users and programmers -;; Copyright (C) 1989,94,1995,2001,02,03,2004 Free Software Foundation, Inc. +;; Copyright (C) 1989,94,1995,2001,02,03,04,2005 Free Software Foundation, Inc. ;; Author: Joe Wells <jbw@bigbird.bu.edu> ;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org> @@ -322,13 +322,13 @@ Value is a list of offsets of the words into the string." (defun apropos-score-doc (doc) "Return apropos score for documentation string DOC." - (if doc - (let ((score 0) - (l (length doc)) - i) - (dolist (s (apropos-calc-scores doc apropos-all-words) score) - (setq score (+ score 50 (/ (* (- l s) 50) l))))) - 0)) + (let ((l (length doc))) + (if (> l 0) + (let ((score 0) + i) + (dolist (s (apropos-calc-scores doc apropos-all-words) score) + (setq score (+ score 50 (/ (* (- l s) 50) l))))) + 0))) (defun apropos-score-symbol (symbol &optional weight) "Return apropos score for SYMBOL." diff --git a/lisp/autorevert.el b/lisp/autorevert.el index f1014a7260d..8f209d8c488 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -174,7 +174,7 @@ When non-nil, a message is generated whenever a file is reverted." \(When the string is not empty, make sure that it has a leading space.)" :group 'auto-revert :type 'string - :version "21.4") + :version "22.1") (defcustom auto-revert-mode-hook nil "Functions to run when Auto-Revert Mode is activated." @@ -243,7 +243,7 @@ machine, if it does not apply to too many version controlled buffers. CPU usage depends on the version control system" :group 'auto-revert :type 'boolean - :version "21.4") + :version "22.1") (defvar global-auto-revert-ignore-buffer nil "*When non-nil, Global Auto-Revert Mode will not revert this buffer. diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 63d24bb76d5..2e5737349bc 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -291,11 +291,20 @@ (calc-wrapper (and n (setq n (prefix-numeric-value n))) (calc-set-language 'tex n) - (message (if (and n (/= n 0)) - (if (> n 0) - "TeX language mode with \\hbox{func}(\\hbox{var})" - "TeX language mode with \\func{\\hbox{var}}") - "TeX language mode")))) + (cond ((not n) + (message "TeX language mode")) + ((= n 0) + (message "TeX language mode with multiline matrices")) + ((= n 1) + (message "TeX language mode with \\hbox{func}(\\hbox{var})")) + ((> n 1) + (message + "TeX language mode with \\hbox{func}(\\hbox{var}) and multiline matrices")) + ((= n -1) + (message "TeX language mode with \\func(\\hbox{var})")) + ((< n -1) + (message + "TeX language mode with \\func(\\hbox{var}) and multiline matrices"))))) (defun calc-latex-language (n) (interactive "P") diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index d5d9123d04d..640fa5b665c 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -520,7 +520,7 @@ (cond ((stringp (car p)) (let ((s (car p))) (if (and (string-match "\\`\\\\dots\\>" s) - (not (eq calc-lang '(tex latex)))) + (not (memq calc-lang '(tex latex)))) (setq s (concat ".." (substring s 5)))) (if (or (and (string-match "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s) @@ -587,7 +587,7 @@ "(") ((and (equal name "}") (memq calc-lang '(tex latex eqn))) ")") - ((and (equal name "&") (eq calc-lang '(tex latex))) + ((and (equal name "&") (memq calc-lang '(tex latex))) ",") ((equal name "#") (search-backward "#") diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index dc46159b09b..eff7df2373d 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -266,12 +266,22 @@ (if (or calc-full-vectors (< (length a) 7)) (if (and (eq calc-language 'tex) (math-matrixp a)) - (append '(horiz "\\matrix{ ") - (math-compose-tex-matrix (cdr a)) - '(" }")) + (if (and (integerp calc-language-option) + (or (= calc-language-option 0) + (> calc-language-option 1) + (< calc-language-option -1))) + (append '(vleft 0 "\\matrix{") + (math-compose-tex-matrix (cdr a)) + '("}")) + (append '(horiz "\\matrix{ ") + (math-compose-tex-matrix (cdr a)) + '(" }"))) (if (and (eq calc-language 'latex) (math-matrixp a)) - (if (memq calc-language-option '(-2 0 2)) + (if (and (integerp calc-language-option) + (or (= calc-language-option 0) + (> calc-language-option 1) + (< calc-language-option -1))) (append '(vleft 0 "\\begin{pmatrix}") (math-compose-tex-matrix (cdr a)) '("\\end{pmatrix}")) @@ -898,7 +908,7 @@ (setq func (substring func 0 (- n))) (while (>= (setq n (1- n)) 0) (setq func (concat func " prime"))))) - (cond ((and (eq calc-language '(tex latex)) + (cond ((and (memq calc-language '(tex latex)) (or (> (length a) 2) (not (math-tex-expr-is-flat (nth 1 a))))) (setq left "\\left( " diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 0c911ca8b7d..e6ff2868592 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -88,7 +88,7 @@ documentation of the function `appt-check'." (make-obsolete-variable 'appt-issue-message "use the function `appt-activate', and the \ -variable `appt-display-format' instead." "21.4") +variable `appt-display-format' instead." "22.1") ;;;###autoload (defcustom appt-message-warning-time 12 @@ -109,7 +109,7 @@ This variable is only relevant if `appt-msg-window' is nil." :type 'boolean :group 'appt) -(make-obsolete-variable 'appt-visible 'appt-display-format "21.4") +(make-obsolete-variable 'appt-visible 'appt-display-format "22.1") ;;;###autoload (defcustom appt-msg-window t @@ -118,7 +118,7 @@ If non-nil, this variable overrides `appt-visible'." :type 'boolean :group 'appt) -(make-obsolete-variable 'appt-msg-window 'appt-display-format "21.4") +(make-obsolete-variable 'appt-msg-window 'appt-display-format "22.1") ;; TODO - add popup. (defcustom appt-display-format 'ignore @@ -136,7 +136,7 @@ of the (obsolete) variables `appt-msg-window' and `appt-visible'." (const :tag "Echo-area" echo) (const :tag "No visible display" nil)) :group 'appt - :version "21.4") + :version "22.1") ;;;###autoload (defcustom appt-display-mode-line t diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 511f82f8f2f..ecbafd24430 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -282,7 +282,7 @@ search." The format of the header is specified by `diary-header-line-format'." :group 'diary :type 'boolean - :version "21.4") + :version "22.1") (defcustom diary-header-line-format '(:eval (calendar-string-spread @@ -295,7 +295,7 @@ before edit/copy" Only used if `diary-header-line-flag' is non-nil." :group 'diary :type 'sexp - :version "21.4") + :version "22.1") (defvar diary-saved-point) ; internal @@ -546,7 +546,7 @@ changing the variable `diary-include-string'." (defface diary-button-face '((((type pc) (class color)) (:foreground "lightblue"))) "Default face used for buttons." - :version "21.4" + :version "22.1" :group 'diary) (define-button-type 'diary-entry @@ -1938,7 +1938,7 @@ template following the rules above." :value-type (choice (string :tag "Template for entry") (function :tag "Unary function providing template"))) - :version "21.4" + :version "22.1" :group 'diary) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index dc3bf016053..2f0be116ed1 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -1,6 +1,6 @@ ;;; icalendar.el --- iCalendar implementation -*-coding: utf-8 -*- -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Ulf Jasper <ulf.jasper@web.de> ;; Created: August 2002 @@ -90,7 +90,7 @@ ;;; Code: -(defconst icalendar-version 0.08 +(defconst icalendar-version 0.09 "Version number of icalendar.el.") ;; ====================================================================== @@ -268,7 +268,7 @@ it finds" ;; (car (cddr event))) (defun icalendar--get-event-property (event prop) - "For the given EVENT return the value of the property PROP." + "For the given EVENT return the value of the first occurence of PROP." (catch 'found (let ((props (car (cddr event))) pp) (while props @@ -278,6 +278,27 @@ it finds" (setq props (cdr props)))) nil)) +(defun icalendar--get-event-property-attributes (event prop) + "For the given EVENT return attributes of the first occurence of PROP." + (catch 'found + (let ((props (car (cddr event))) pp) + (while props + (setq pp (car props)) + (if (eq (car pp) prop) + (throw 'found (cadr pp))) + (setq props (cdr props)))) + nil)) + +(defun icalendar--get-event-properties (event prop) + "For the given EVENT return a list of all values of the property PROP." + (let ((props (car (cddr event))) pp result) + (while props + (setq pp (car props)) + (if (eq (car pp) prop) + (setq result (cons (car (cddr pp)) result))) + (setq props (cdr props))) + result)) + ;; (defun icalendar--set-event-property (event prop new-value) ;; "For the given EVENT set the property PROP to the value NEW-VALUE." ;; (catch 'found @@ -319,7 +340,7 @@ children." (icalendar--get-children (car icalendar) 'VEVENT)) (defun icalendar--split-value (value-string) - "Splits VALUE-STRING at ';='." + "Split VALUE-STRING at ';='." (let ((result '()) param-name param-value) (when value-string @@ -424,13 +445,11 @@ multiple comma-separated values should be allowed!" (if (match-beginning 11) (setq seconds (read (substring isodurationstring (match-beginning 12) - (match-end 12))))) - ) + (match-end 12)))))) ((match-beginning 13) ;weeks only (setq days (* 7 (read (substring isodurationstring (match-beginning 14) - (match-end 14)))))) - ) + (match-end 14))))))) (list seconds minutes hours days months years))) ;; isodatetimestring == nil nil)) @@ -452,27 +471,45 @@ valid (year > 1900 or something)." ;;(or (nth 6 time1) (nth 6 time2)) ;; FIXME? ))) -(defun icalendar--datetime-to-noneuropean-date (datetime) +(defun icalendar--datetime-to-noneuropean-date (datetime &optional separator) "Convert the decoded DATETIME to non-european-style format. -Non-European format: (month day year)." +Optional argument SEPARATOR gives the separator between month, +day, and year. If nil a blank character is used as separator. +Non-European format: \"month day year\"." (if datetime - (list (nth 4 datetime) ;month - (nth 3 datetime) ;day - (nth 5 datetime)) ;year + (format "%d%s%d%s%d" (nth 4 datetime) ;month + (or separator " ") + (nth 3 datetime) ;day + (or separator " ") + (nth 5 datetime)) ;year ;; datetime == nil nil)) -(defun icalendar--datetime-to-european-date (datetime) +(defun icalendar--datetime-to-european-date (datetime &optional separator) "Convert the decoded DATETIME to European format. +Optional argument SEPARATOR gives the separator between month, +day, and year. If nil a blank character is used as separator. European format: (day month year). FIXME" (if datetime - (format "%d %d %d" (nth 3 datetime) ; day + (format "%d%s%d%s%d" (nth 3 datetime) ;day + (or separator " ") (nth 4 datetime) ;month + (or separator " ") (nth 5 datetime)) ;year ;; datetime == nil nil)) +(defun icalendar--datetime-to-diary-date (datetime &optional separator) + "Convert the decoded DATETIME to diary format. +Optional argument SEPARATOR gives the separator between month, +day, and year. If nil a blank character is used as separator. +Call icalendar--datetime-to-(non)-european-date according to +value of `european-calendar-style'." + (if european-calendar-style + (icalendar--datetime-to-european-date datetime separator) + (icalendar--datetime-to-noneuropean-date datetime separator))) + (defun icalendar--datetime-to-colontime (datetime) "Extract the time part of a decoded DATETIME into 24-hour format. Note that this silently ignores seconds." @@ -495,15 +532,16 @@ Note that this silently ignores seconds." (defun icalendar--get-weekday-number (abbrevweekday) "Return the number for the ABBREVWEEKDAY." - (catch 'found - (let ((num 0) - (aw (downcase abbrevweekday))) - (mapc (lambda (day) - (let ((d (downcase day))) - (if (string-equal d aw) - (throw 'found num)) - (setq num (1+ num)))) - icalendar--weekday-array)) + (if abbrevweekday + (catch 'found + (let ((num 0) + (aw (downcase abbrevweekday))) + (mapc (lambda (day) + (let ((d (downcase day))) + (if (string-equal d aw) + (throw 'found num)) + (setq num (1+ num)))) + icalendar--weekday-array))) ;; Error: -1)) @@ -605,9 +643,9 @@ would be \"pm\"." (format "T%04d00" starttimenum)) nil)) -(defun icalendar--convert-string-for-export (s) - "Escape comma and other critical characters in string S." - (icalendar--rris "," "\\\\," s)) +(defun icalendar--convert-string-for-export (string) + "Escape comma and other critical characters in STRING." + (icalendar--rris "," "\\\\," string)) (defun icalendar--convert-string-for-import (string) "Remove escape chars for comma, semicolon etc. from STRING." @@ -641,9 +679,9 @@ Finto iCalendar file: ") All diary entries in the region from MIN to MAX in the current buffer are converted to iCalendar format. The result is appended to the file ICAL-FILENAME. - -Returns non-nil if an error occurred. In this case an error message is -written to the buffer ` *icalendar-errors*'." +This function attempts to return t if something goes wrong. In this +case an error string which describes all the errors and problems is +written into the buffer `*icalendar-errors*'." (interactive "r FExport diary data into iCalendar file: ") (let ((result "") @@ -659,6 +697,7 @@ FExport diary data into iCalendar file: ") (save-current-buffer (set-buffer (get-buffer-create " *icalendar-errors*")) (erase-buffer)) + ;; here we go (save-excursion (goto-char min) @@ -699,13 +738,15 @@ FExport diary data into iCalendar file: ") ;; but korganizer seems to expect this... ;( ;; and evolution doesn't understand it... :( ;; so... who is wrong?! - ";BYMONTH=" (substring startisostring 4 6) - ";BYMONTHDAY=" (substring startisostring 6 8) - ))) + ";BYMONTH=" + (substring startisostring 4 6) + ";BYMONTHDAY=" + (substring startisostring 6 8)))) (unless (string= entry-rest "") - (setq contents (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest))))) ;; cyclic events ;; %%(diary-cyclic ) ((string-match @@ -734,9 +775,10 @@ FExport diary data into iCalendar file: ") ;; BYSOMETHING here... ))) (unless (string= entry-rest "") - (setq contents (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest))))) ;; diary-date -- FIXME ((string-match (concat nonmarker @@ -754,13 +796,16 @@ FExport diary data into iCalendar file: ") ;; block events ((string-match (concat nonmarker - "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\) +" - "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") + "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)" + " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" + "\\(.*\\)") entry-main) (icalendar--dmsg "diary-block %s" entry-main) - (let* ((startstring (substring entry-main (match-beginning 1) + (let* ((startstring (substring entry-main + (match-beginning 1) (match-end 1))) - (endstring (substring entry-main (match-beginning 2) + (endstring (substring entry-main + (match-beginning 2) (match-end 2))) (summary (icalendar--convert-string-for-export (substring entry-main (match-beginning 3) @@ -772,12 +817,12 @@ FExport diary data into iCalendar file: ") (setq contents (concat "\nDTSTART;VALUE=DATE:" startisostring "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary - )) + "\nSUMMARY:" summary)) (unless (string= entry-rest "") - (setq contents (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest)))))) + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest)))))) ;; other sexp diary entries -- FIXME ((string-match (concat nonmarker @@ -790,14 +835,17 @@ FExport diary data into iCalendar file: ") ((and (string-match (concat nonmarker "\\([a-z]+\\)\\s-+" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\([ap]m\\)?" "\\(-0?" - "\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\([ap]m\\)?\\)?" "\\)?" "\\s-*\\(.*\\)$") entry-main) (icalendar--get-weekday-abbrev - (substring entry-main (match-beginning 1) (match-end 1)))) + (substring entry-main (match-beginning 1) + (match-end 1)))) (icalendar--dmsg "weekly %s" entry-main) (let* ((day (icalendar--get-weekday-abbrev (substring entry-main (match-beginning 1) @@ -829,9 +877,11 @@ FExport diary data into iCalendar file: ") (match-end 8))))) (when starttimestring (unless endtimestring - (let ((time (read (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" (+ 10000 time)))))) + (let ((time (read + (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) (setq contents (concat "\nDTSTART;" (if starttimestring @@ -854,12 +904,13 @@ FExport diary data into iCalendar file: ") (if endtimestring 2 3))) (or endtimestring "") "\nSUMMARY:" summary - "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" day - ))) + "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" + day))) (unless (string= entry-rest "") - (setq contents (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest))))) ;; yearly by day ;; 1 May Tag der Arbeit ((string-match @@ -878,10 +929,12 @@ FExport diary data into iCalendar file: ") (icalendar--dmsg "yearly %s" entry-main) (let* ((daypos (if european-calendar-style 1 2)) (monpos (if european-calendar-style 2 1)) - (day (read (substring entry-main (match-beginning daypos) + (day (read (substring entry-main + (match-beginning daypos) (match-end daypos)))) (month (icalendar--get-month-number - (substring entry-main (match-beginning monpos) + (substring entry-main + (match-beginning monpos) (match-end monpos)))) (starttimestring (icalendar--diarytime-to-isotime (if (match-beginning 4) @@ -910,9 +963,11 @@ FExport diary data into iCalendar file: ") (match-end 9))))) (when starttimestring (unless endtimestring - (let ((time (read (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" (+ 10000 time)))))) + (let ((time (read + (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) (setq contents (concat "\nDTSTART;" (if starttimestring "VALUE=DATE-TIME:" @@ -924,19 +979,20 @@ FExport diary data into iCalendar file: ") "VALUE=DATE:") ;; end is not included! shift by one day (icalendar--date-to-isodate - (list month day 1900) (if endtimestring 0 1)) + (list month day 1900) + (if endtimestring 0 1)) (or endtimestring "") "\nSUMMARY:" summary "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" (format "%2d" month) ";BYMONTHDAY=" - (format "%2d" day) - ))) + (format "%2d" day)))) (unless (string= entry-rest "") - (setq contents (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest))))) ;; "ordinary" events, start and end time given ;; 1 Feb 2003 Hs Hochzeitsfeier, Dreieich ((string-match @@ -982,9 +1038,11 @@ FExport diary data into iCalendar file: ") (error "Could not parse date")) (when starttimestring (unless endtimestring - (let ((time (read (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" (+ 10000 time)))))) + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) (setq contents (concat "\nDTSTART;" (if starttimestring "VALUE=DATE-TIME:" @@ -1004,9 +1062,10 @@ FExport diary data into iCalendar file: ") summary)) ;; could not parse the date (unless (string= entry-rest "") - (setq contents (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest)))))) + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest)))))) ;; everything else (t ;; Oops! what's that? @@ -1023,14 +1082,17 @@ FExport diary data into iCalendar file: ") entry-main)))))) ;; we're done, insert everything into the file - (let ((coding-system-for-write 'utf8)) - (set-buffer (find-file ical-filename)) - (goto-char (point-max)) - (insert "BEGIN:VCALENDAR") - (insert "\nPRODID:-//Emacs//NONSGML icalendar.el//EN") - (insert "\nVERSION:2.0") - (insert result) - (insert "\nEND:VCALENDAR\n"))) + (save-current-buffer + (let ((coding-system-for-write 'utf8)) + (set-buffer (find-file ical-filename)) + (goto-char (point-max)) + (insert "BEGIN:VCALENDAR") + (insert "\nPRODID:-//Emacs//NONSGML icalendar.el//EN") + (insert "\nVERSION:2.0") + (insert result) + (insert "\nEND:VCALENDAR\n") + ;; save the diary file + (save-buffer)))) found-error)) ;; ====================================================================== @@ -1046,7 +1108,7 @@ Argument DIARY-FILENAME input `diary-file'. Optional argument NON-MARKING determines whether events are created as non-marking or not." (interactive "fImport iCalendar data from file: -Finto diary file: +Finto diary file: p") ;; clean up the diary file (save-current-buffer @@ -1070,8 +1132,9 @@ DO-NOT-ASK is set to t, so that you are asked fore each event. NON-MARKING determines whether diary events are created as non-marking. -This function attempts to notify about problems that occur when -reading, parsing, or converting iCalendar data!" +Return code t means that importing worked well, return code nil +means that an error has occured. Error messages will be in the +buffer `*icalendar-errors*'." (interactive) (save-current-buffer ;; prepare ical @@ -1097,13 +1160,12 @@ reading, parsing, or converting iCalendar data!" (set-buffer (find-buffer-visiting diary-file)) (save-buffer))) (message "Converting icalendar...done") - (if (and ical-errors (y-or-n-p - (concat "Something went wrong -- " - "do you want to see the " - "error log? "))) - (switch-to-buffer " *icalendar-errors*"))) + ;; return t if no error occured + (not ical-errors)) (message - "Current buffer does not contain icalendar contents!")))) + "Current buffer does not contain icalendar contents!") + ;; return nil, i.e. import did not work + nil))) (defalias 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer) (make-obsolete 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer) @@ -1163,10 +1225,8 @@ written into the buffer ` *icalendar-errors*'." (condition-case error-val (let* ((dtstart (icalendar--decode-isodatetime (icalendar--get-event-property e 'DTSTART))) - (start-d (calendar-date-string - (icalendar--datetime-to-noneuropean-date - dtstart) - t t)) + (start-d (icalendar--datetime-to-diary-date + dtstart)) (start-t (icalendar--datetime-to-colontime dtstart)) (dtend (icalendar--decode-isodatetime (icalendar--get-event-property e 'DTEND))) @@ -1179,6 +1239,13 @@ written into the buffer ` *icalendar-errors*'." (rdate (icalendar--get-event-property e 'RDATE)) (duration (icalendar--get-event-property e 'DURATION))) (icalendar--dmsg "%s: %s" start-d subject) + ;; check whether start-time is missing + (if (and (icalendar--get-event-property-attributes + e 'DTSTART) + (string= (cadr (icalendar--get-event-property-attributes + e 'DTSTART)) + "DATE")) + (setq start-t nil)) (when duration (let ((dtend2 (icalendar--add-decoded-times dtstart @@ -1188,10 +1255,7 @@ written into the buffer ` *icalendar-errors*'." subject)) (setq dtend dtend2))) (setq end-d (if dtend - (calendar-date-string - (icalendar--datetime-to-noneuropean-date - dtend) - t t) + (icalendar--datetime-to-diary-date dtend) start-d)) (setq end-t (if dtend (icalendar--datetime-to-colontime dtend) @@ -1202,51 +1266,96 @@ written into the buffer ` *icalendar-errors*'." (rrule (icalendar--dmsg "recurring event") (let* ((rrule-props (icalendar--split-value rrule)) - (frequency (car (cdr (assoc 'FREQ rrule-props)))) - (until (car (cdr (assoc 'UNTIL rrule-props)))) - (interval (read (car (cdr (assoc 'INTERVAL - rrule-props)))))) + (frequency (cadr (assoc 'FREQ rrule-props))) + (until (cadr (assoc 'UNTIL rrule-props))) + (interval (read (cadr (assoc 'INTERVAL rrule-props))))) (cond ((string-equal frequency "WEEKLY") (if (not start-t) (progn ;; weekly and all-day (icalendar--dmsg "weekly all-day") + (if until + (let ((fro + (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime + (icalendar--get-event-property + e + 'DTSTART)))) + (unt + (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime + until)))) (setq diary-string (format - "%%%%(diary-cyclic %d %s)" + (concat "%%%%(and " + "(diary-cyclic %d %s) " + "(diary-block %s %s))") (* interval 7) - (icalendar--datetime-to-european-date - dtstart)))) + (icalendar--datetime-to-diary-date + dtstart) + (icalendar--datetime-to-diary-date + dtstart) + (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime + until))))) + (setq diary-string + (format "%%%%(and (diary-cyclic %d %s))" + (* interval 7) + (icalendar--datetime-to-diary-date + dtstart)))) + (setq event-ok t)) ;; weekly and not all-day (let* ((byday (cadr (assoc 'BYDAY rrule-props))) (weekday (icalendar--get-weekday-number byday))) (icalendar--dmsg "weekly not-all-day") - (if (> weekday -1) - (setq diary-string - (format "%s %s%s%s" - (aref calendar-day-name-array - weekday) - start-t (if end-t "-" "") - (or end-t ""))) + (if until + (let ((fro + (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime + (icalendar--get-event-property + e + 'DTSTART)))) + (unt + (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime + until)))) + (setq diary-string + (format + (concat "%%%%(and " + "(diary-cyclic %d %s) " + "(diary-block %s %s)) " + "%s%s%s") + (* interval 7) + (icalendar--datetime-to-diary-date + dtstart) + (icalendar--datetime-to-diary-date + dtstart) + (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime + until)) + start-t + (if end-t "-" "") (or end-t "")))) + ;; no limit ;; FIXME!!!! ;; DTSTART;VALUE=DATE-TIME:20030919T090000 ;; DTEND;VALUE=DATE-TIME:20030919T113000 (setq diary-string (format - "%%%%(diary-cyclic %s %s) %s%s%s" + "%%%%(and (diary-cyclic %s %s)) %s%s%s" (* interval 7) - (icalendar--datetime-to-european-date + (icalendar--datetime-to-diary-date dtstart) - start-t (if end-t "-" "") (or end-t "")))) + start-t + (if end-t "-" "") (or end-t "")))) (setq event-ok t)))) ;; yearly ((string-equal frequency "YEARLY") (icalendar--dmsg "yearly") (setq diary-string (format - "%%%%(diary-anniversary %s)" - (icalendar--datetime-to-european-date dtstart))) + "%%%%(and (diary-anniversary %s))" + (icalendar--datetime-to-diary-date dtstart))) (setq event-ok t)) ;; FIXME: war auskommentiert: ((and (string-equal frequency "DAILY") @@ -1254,20 +1363,40 @@ written into the buffer ` *icalendar-errors*'." ;;(not start-t) ;;(not end-t) ) - (let ((ds (icalendar--datetime-to-noneuropean-date + (let ((ds (icalendar--datetime-to-diary-date (icalendar--decode-isodatetime - (icalendar--get-event-property e - 'DTSTART)))) - (de (icalendar--datetime-to-noneuropean-date + (icalendar--get-event-property + e 'DTSTART)))) + (de (icalendar--datetime-to-diary-date (icalendar--decode-isodatetime until)))) (setq diary-string (format - "%%%%(diary-block %d %d %d %d %d %d)" - (nth 1 ds) (nth 0 ds) (nth 2 ds) - (nth 1 de) (nth 0 de) (nth 2 de)))) - (setq event-ok t))) - )) + "%%%%(and (diary-block %s %s))" + ds de))) + (setq event-ok t)))) + ;; Handle exceptions from recurrence rules + (let ((ex-dates (icalendar--get-event-properties e + 'EXDATE))) + (while ex-dates + (let* ((ex-start (icalendar--decode-isodatetime + (car ex-dates))) + (ex-d (icalendar--datetime-to-diary-date + ex-start))) + (setq diary-string + (icalendar--rris "^%%(\\(and \\)?" + (format + "%%%%(and (not (diary-date %s)) " + ex-d) + diary-string))) + (setq ex-dates (cdr ex-dates)))) + ;; FIXME: exception rules are not recognized + (if (icalendar--get-event-property e 'EXRULE) + (setq diary-string + (concat diary-string + "\n Exception rules: " + (icalendar--get-event-properties + e 'EXRULE))))) (rdate (icalendar--dmsg "rdate event") (setq diary-string "") @@ -1280,28 +1409,34 @@ written into the buffer ` *icalendar-errors*'." ;; long event ((not (string= start-d end-d)) (icalendar--dmsg "non-recurring event") - (let ((ds (icalendar--datetime-to-noneuropean-date dtstart)) - (de (icalendar--datetime-to-noneuropean-date dtend))) + (let ((ds (icalendar--datetime-to-diary-date dtstart)) + (de (icalendar--datetime-to-diary-date dtend))) (setq diary-string - (format "%%%%(diary-block %d %d %d %d %d %d)" - (nth 1 ds) (nth 0 ds) (nth 2 ds) - (nth 1 de) (nth 0 de) (nth 2 de)))) + (format "%%%%(and (diary-block %s %s))" + ds de))) (setq event-ok t)) ;; not all-day ((and start-t (or (not end-t) (not (string= start-t end-t)))) (icalendar--dmsg "not all day event") (cond (end-t - (setq diary-string (format "%s %s-%s" start-d - start-t end-t))) + (setq diary-string + (format "%s %s-%s" + (icalendar--datetime-to-diary-date + dtstart "/") + start-t end-t))) (t - (setq diary-string (format "%s %s" start-d - start-t)))) + (setq diary-string + (format "%s %s" + (icalendar--datetime-to-diary-date + dtstart "/") + start-t)))) (setq event-ok t)) ;; all-day event (t (icalendar--dmsg "all day event") - (setq diary-string start-d) + (setq diary-string (icalendar--datetime-to-diary-date + dtstart "/")) (setq event-ok t))) ;; add all other elements unless the user doesn't want to have ;; them @@ -1318,12 +1453,14 @@ written into the buffer ` *icalendar-errors*'." (setq error-string (format "%s\nCannot handle this event:%s" error-string e)))) + ;; FIXME: inform user about ignored event properties ;; handle errors (error (message "Ignoring event \"%s\"" e) (setq found-error t) - (setq error-string (format "%s\nCannot handle this event: %s" - error-string e))))) + (setq error-string (format "%s\n%s\nCannot handle this event: %s" + error-val error-string e)) + (message error-string)))) (if found-error (save-current-buffer (set-buffer (get-buffer-create " *icalendar-errors*")) @@ -1340,7 +1477,7 @@ determines whether diary events are created as non-marking. If SUBJECT is not nil it must be a string that gives the subject of the entry. In this case the user will be asked whether he wants to insert the entry." - (when (or (not subject) ; + (when (or (not subject) (y-or-n-p (format "Add appointment for `%s' to diary? " subject))) (when subject diff --git a/lisp/comint.el b/lisp/comint.el index f96da7fa0fd..ccd02db39cf 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -194,7 +194,7 @@ If you sometimes use comint-mode on text-only terminals or with `emacs-nw', you might wish to use another binding for `comint-kill-whole-line'." :type 'boolean :group 'comint - :version "21.4") + :version "22.1") (defvar comint-delimiter-argument-list () "List of characters to recognise as separate arguments in input. @@ -809,7 +809,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." ;; Insert the input at point (insert (buffer-substring-no-properties (previous-single-char-property-change (1+ pos) 'field) - (next-single-char-property-change pos 'field)))))) + (next-single-char-property-change pos 'field)))))) ;; Input history processing in a buffer diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 30d831ff039..9ac11a85803 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -34,6 +34,103 @@ ;; that interferes with completion. Use `customize-' for commands ;; that the user will run with M-x, and `Custom-' for interactive commands. +;; The identity of a customize option is represented by a Lisp symbol. +;; There is the following values associated with an option. + +;; 0. The current value. + +;; This is the value of the option as seen by "the rest of Emacs". + +;; Usually extracted by 'default-value', but can be extracted with +;; different means if the option symbol has the 'custom-get' +;; property. Similarly, set-default (or the 'custom-set' property) +;; can set it. + +;; 1. The widget value. + +;; This is the value shown in the widget in a customize buffer. + +;; 2. The customized value. + +;; This is the last value given to the option through customize. + +;; It is stored in the 'customized-value' property of the option, in a +;; cons-cell whose car evaluate to the customized value. + +;; 3. The saved value. + +;; This is last value saved from customize. + +;; It is stored in the 'saved-value' property of the option, in a +;; cons-cell whose car evaluate to the saved value. + +;; 4. The standard value. + +;; This is the value given in the 'defcustom' declaration. + +;; It is stored in the 'standard-value' property of the option, in a +;; cons-cell whose car evaluate to the standard value. + +;; 5. The "think" value. + +;; This is what customize think the current value should be. + +;; This is the customize value, if any such value exists, otherwise +;; the saved value, if that exists, and as a last resort the standard +;; value. + +;; The reason for storing values unevaluated: This is so you can have +;; values that depend on the environment. For example, you can have a +;; valiable that has one value when Emacs is running under a window +;; system, and another value on a tty. Since the evaluation is only done +;; when the variable is firsty initialized, this is only relevant for the +;; saved (and standard) values, but affect others values for +;; compatibility. + +;; You can see (and modify and save) this unevaluated value by selecting +;; "Show initial Lisp expression" from the Lisp interface. This will +;; give you the unevaluated saved value, if any, otherwise the +;; unevaluated standard value. + +;; The possible states for a customize widget are: + +;; 0. unknown + +;; The state has not been determined yet. + +;; 1. modified + +;; The widget value is different from the current value. + +;; 2. changed + +;; The current value is different from the "think" value. + +;; 3. set + +;; The "think" value is the customized value. + +;; 4. saved + +;; The "think" value is the saved value. + +;; 5. standard + +;; The "think" value is the standard value. + +;; 6. rogue + +;; There are no standard value. + +;; 7. hidden + +;; There is no widget value. + +;; 8. mismatch + +;; The widget value is not valid member of the :type specified for the +;; option. + ;;; Code: (require 'cus-face) @@ -1183,7 +1280,7 @@ links: groups have links to subgroups." (defcustom custom-buffer-done-kill nil "*Non-nil means exiting a Custom buffer should kill it." :type 'boolean - :version "21.4" + :version "22.1" :group 'custom-buffer) (defcustom custom-buffer-indent 3 @@ -1299,7 +1396,8 @@ Make your editing in this buffer take effect for this session." (widget-create 'push-button :tag "Save for Future Sessions" :help-echo "\ -Make your editing in this buffer take effect for future Emacs sessions." +Make your editing in this buffer take effect for future Emacs sessions. +This updates your Emacs initialization file or creates a new one one." :action (lambda (widget &optional event) (Custom-save))) (if custom-reset-button-menu diff --git a/lisp/cus-start.el b/lisp/cus-start.el index a7df119e497..9dcea001ae5 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -51,7 +51,7 @@ the undo info for the current command never gets discarded. This should only be chosen under exceptional circumstances, since it could result in memory overflow and make Emacs crash." nil)) - "21.4") + "22.1") (garbage-collection-messages alloc boolean) ;; buffer.c (mode-line-format modeline sexp) ;Hard to do right. @@ -135,10 +135,10 @@ since it could result in memory overflow and make Emacs crash." (const :tag "always" t))) ;; fileio.c (insert-default-directory minibuffer boolean) - (read-file-name-completion-ignore-case minibuffer boolean "21.4") + (read-file-name-completion-ignore-case minibuffer boolean "22.1") ;; fns.c (use-dialog-box menu boolean "21.1") - (use-file-dialog menu boolean "21.4") + (use-file-dialog menu boolean "22.1") ;; frame.c (default-frame-alist frames (repeat (cons :format "%v" @@ -280,13 +280,13 @@ since it could result in memory overflow and make Emacs crash." :format "%v") (other :tag "Unlimited" t))) (unibyte-display-via-language-environment mule boolean) - (blink-cursor-alist cursor alist "21.4") + (blink-cursor-alist cursor alist "22.1") ;; xfaces.c (scalable-fonts-allowed display boolean) ;; xfns.c (x-bitmap-file-path installation (repeat (directory :format "%v"))) - (x-use-old-gtk-file-dialog menu boolean "21.4") + (x-use-old-gtk-file-dialog menu boolean "22.1") ;; xterm.c (mouse-autoselect-window display boolean "21.3") (x-use-underline-position-properties display boolean "21.3") diff --git a/lisp/custom.el b/lisp/custom.el index e7aba88f72a..13195c7f78f 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -299,9 +299,10 @@ The possible attributes are `:family', `:width', `:height', `:weight', `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. DISPLAY can either be the symbol t, which will match all frames, or an -alist of the form \((REQ ITEM...)...). For the DISPLAY to match a -FRAME, the REQ property of the frame must match one of the ITEM. The -following REQ are defined: +alist of elements of the form \(REQ ITEM...). For the DISPLAY to match a +FRAME, each of these elements must be satisfied, meaning that the +REQ property of the frame must match one of the corresponding ITEMs. +These are the defined REQ values: `type' (the value of `window-system') Under X, in addition to the values `window-system' can take, @@ -776,7 +777,7 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (while args (let ((entry (car args))) (if (listp entry) - (let* ((symbol (nth 0 entry)) + (let* ((symbol (indirect-variable (nth 0 entry))) (value (nth 1 entry)) (now (nth 2 entry)) (requests (nth 3 entry)) @@ -808,7 +809,7 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (message "Warning: old format `custom-set-variables'") (ding) (sit-for 2) - (let ((symbol (nth 0 args)) + (let ((symbol (indirect-variable (nth 0 args))) (value (nth 1 args))) (put symbol 'saved-value (list value)) (custom-push-theme 'theme-value symbol theme 'set value)) diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index af310593124..22e81db9210 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -168,7 +168,7 @@ This variable has an effect only when the value of (const :tag "based on `case-replace'" case-replace) (other :tag "on" t)) :group 'dabbrev - :version "21.4") + :version "22.1") (defcustom dabbrev-case-replace 'case-replace "*Whether dabbrev applies the abbreviations's case pattern to the expansion. diff --git a/lisp/descr-text.el b/lisp/descr-text.el index c7c5dc43bf3..88eac3f0a14 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -246,7 +246,7 @@ This is a fairly large file, not typically present on GNU systems. At the time of writing it is at <URL:http://www.unicode.org/Public/UNIDATA/UnicodeData.txt>." :group 'mule - :version "21.4" + :version "22.1" :type '(choice (const :tag "None" nil) file)) diff --git a/lisp/desktop.el b/lisp/desktop.el index 163122a2d14..04fc7231c83 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -130,7 +130,7 @@ determine where the desktop is saved." (const :tag "Save if desktop file exists, else don't" if-exists) (const :tag "Never save" nil)) :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-base-file-name (convert-standard-filename ".emacs.desktop") @@ -144,7 +144,7 @@ determine where the desktop is saved." The base name of the file is specified in `desktop-base-file-name'." :type '(repeat directory) :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-missing-file-warning nil "*If non-nil then `desktop-read' asks if a non-existent file should be recreated. @@ -154,21 +154,21 @@ Also pause for a moment to display message about errors signaled in If nil, just print error messages in the message buffer." :type 'boolean :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-no-desktop-file-hook nil "Normal hook run when `desktop-read' can't find a desktop file. May e.g. be used to show a dired buffer." :type 'hook :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-after-read-hook nil "Normal hook run after a successful `desktop-read'. May e.g. be used to show a buffer list." :type 'hook :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-save-hook nil "Normal hook run before the desktop is saved in a desktop file. @@ -204,7 +204,7 @@ An element may be variable name (a symbol) or a cons cell of the form to the value obtained by evaluateing FORM." :type '(repeat (restricted-sexp :match-alternatives (symbolp consp))) :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-clear-preserve-buffers-regexp "^\\(\\*scratch\\*\\|\\*Messages\\*\\|\\*tramp/.+\\*\\)$" @@ -212,7 +212,7 @@ to the value obtained by evaluateing FORM." See also `desktop-clear-preserve-buffers'." :type 'regexp :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-clear-preserve-buffers nil "*List of buffer names that `desktop-clear' should not delete. @@ -265,7 +265,7 @@ Possible values are: local -- Relative to directory of desktop file." :type '(choice (const absolute) (const tilde) (const local)) :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-restore-eager t "Number of buffers to restore immediately. @@ -273,20 +273,20 @@ Remaining buffers are restored lazily (when Emacs is idle). If value is t, all buffers are restored immediately." :type '(choice (const t) integer) :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-lazy-verbose t "Verbose reporting of lazily created buffers." :type 'boolean :group 'desktop - :version "21.4") + :version "22.1") (defcustom desktop-lazy-idle-delay 5 "Idle delay before starting to create buffers. See `desktop-restore-eager'." :type 'integer :group 'desktop - :version "21.4") + :version "22.1") ;;;###autoload (defvar desktop-save-buffer nil @@ -795,7 +795,7 @@ directory DIRNAME." (desktop-kill) (desktop-clear) (desktop-read dirname)) - + ;; ---------------------------------------------------------------------------- ;;;###autoload (defun desktop-save-in-desktop-dir () diff --git a/lisp/dired.el b/lisp/dired.el index 461546ddac5..f64c2472067 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -291,7 +291,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-type-face))) "Face used for directory headers." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-header-face 'dired-header "Face name used for directory headers.") @@ -299,7 +299,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-constant-face))) "Face used for dired marks." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-mark-face 'dired-mark "Face name used for dired marks.") @@ -307,7 +307,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-warning-face))) "Face used for marked files." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-marked-face 'dired-marked "Face name used for marked files.") @@ -315,7 +315,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-warning-face))) "Face used for flagged files." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-flagged-face 'dired-flagged "Face name used for flagged files.") @@ -323,7 +323,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-comment-face))) "Face used to highlight a part of a buffer that needs user attention." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-warning-face 'dired-warning "Face name used for a part of a buffer that needs user attention.") @@ -331,7 +331,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-function-name-face))) "Face used for subdirectories." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-directory-face 'dired-directory "Face name used for subdirectories.") @@ -339,7 +339,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-keyword-face))) "Face used for symbolic links." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-symlink-face 'dired-symlink "Face name used for symbolic links.") @@ -347,7 +347,7 @@ Subexpression 2 must end right before the \\n or \\r.") '((t (:inherit font-lock-string-face))) "Face used for files suffixed with `completion-ignored-extensions'." :group 'dired-faces - :version "21.4") + :version "22.1") (defvar dired-ignored-face 'dired-ignored "Face name used for files suffixed with `completion-ignored-extensions'.") diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9ba613b267d..217f28f2a81 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1765,7 +1765,7 @@ With argument, insert value in current buffer after the form." (byte-compile-maxdepth 0) (byte-compile-output nil) ;; This allows us to get the positions of symbols read; it's - ;; new in Emacs 21.4. + ;; new in Emacs 22.1. (read-with-symbol-positions inbuffer) (read-symbol-positions-list nil) ;; #### This is bound in b-c-close-variables. diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 811511a1f00..a10b8546d03 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -249,7 +249,7 @@ is not very useful." (while (get mode 'derived-mode-parent) (setq mode (get mode 'derived-mode-parent))) mode) -(make-obsolete 'derived-mode-class 'derived-mode-p "21.4") +(make-obsolete 'derived-mode-class 'derived-mode-p "22.1") ;;; PRIVATE diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 7e2ac5aa883..18e5706dc3d 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -96,7 +96,7 @@ should insert the face name. Please send improvements and fixes to the maintainer." :type 'regexp :group 'find-function - :version "21.4") + :version "22.1") (defvar find-function-regexp-alist '((nil . find-function-regexp) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index d19eace5824..d0a2fdc01da 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -233,6 +233,9 @@ recipe (see `end-of-defun'). Major modes can define this if the normal method is not appropriate.") (defun buffer-end (arg) + "Return the \"far end\" position of the buffer, moving in direction ARG. +If ARG is positive, that's the end of the buffer. +Otherwise, that's the beginning of the buffer." (if (> arg 0) (point-max) (point-min))) (defun end-of-defun (&optional arg) diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 336a1ff82d0..79aad8bd121 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -151,7 +151,7 @@ fire repeatedly that many seconds apart." timer) (make-obsolete 'timer-set-time-with-usecs "use `timer-set-time' and `timer-inc-time' instead." - "21.4") + "22.1") (defun timer-set-function (timer function &optional args) "Make TIMER call FUNCTION with optional ARGS when triggering." diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index e2bf813f9ce..343eda970ce 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -31,7 +31,7 @@ (defgroup warnings nil "Log and display warnings." - :version "21.4" + :version "22.1" :group 'lisp) (defvar warning-levels @@ -77,7 +77,7 @@ the warning is logged in the warnings buffer, but the buffer is not immediately displayed. See also `warning-minimum-log-level'." :group 'warnings :type '(choice (const :emergency) (const :error) (const :warning)) - :version "21.4") + :version "22.1") (defvaralias 'display-warning-minimum-level 'warning-minimum-level) (defcustom warning-minimum-log-level :warning @@ -86,7 +86,7 @@ If a warning severity level is lower than this, the warning is completely ignored." :group 'warnings :type '(choice (const :emergency) (const :error) (const :warning)) - :version "21.4") + :version "22.1") (defvaralias 'log-warning-minimum-level 'warning-minimum-log-level) (defcustom warning-suppress-log-types nil @@ -100,7 +100,7 @@ If TYPE is a symbol FOO, that is equivalent to the list (FOO), so only the element (FOO) will match it." :group 'warnings :type '(repeat (repeat symbol)) - :version "21.4") + :version "22.1") (defcustom warning-suppress-types nil "List of warning types not to display immediately. @@ -115,7 +115,7 @@ so only the element (FOO) will match it. See also `warning-suppress-log-types'." :group 'warnings :type '(repeat (repeat symbol)) - :version "21.4") + :version "22.1") ;;; The autoload cookie is so that programs can bind this variable ;;; safely, testing the existing value, before they call one of the diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 24adae30040..76c0f860a00 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1,6 +1,6 @@ ;;; cua-base.el --- emulate CUA key bindings -;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> @@ -267,7 +267,7 @@ :group 'editing-basics :group 'convenience :group 'emulations - :version "21.4" + :version "22.1" :link '(emacs-commentary-link :tag "Commentary" "cua-base.el") :link '(emacs-library-link :tag "Lisp File" "cua-base.el")) @@ -392,11 +392,6 @@ and after the region marked by the rectangle to search." "*Font used by CUA for highlighting the non-selected rectangle lines." :group 'cua) -(defcustom cua-undo-max 64 - "*Max no of undoable CUA rectangle changes (including undo)." - :type 'integer - :group 'cua) - ;;; Global Mark Customization @@ -739,15 +734,6 @@ Repeating prefix key when region is active works as a single prefix key." (+ arg ?0))) (if cua--register nil arg)) -;;; Enhanced undo - restore rectangle selections - -(defun cua-undo (&optional arg) - "Undo some previous changes. -Knows about CUA rectangle highlighting in addition to standard undo." - (interactive "*P") - (if (fboundp 'cua--rectangle-undo) - (cua--rectangle-undo arg) - (undo arg))) ;;; Region specific commands @@ -988,21 +974,6 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark." (if cua-enable-region-auto-help (cua-help-for-region t))))) -(defvar cua--standard-movement-commands - '(forward-char backward-char - next-line previous-line - forward-word backward-word - end-of-line beginning-of-line - end-of-buffer beginning-of-buffer - scroll-up scroll-down cua-scroll-up cua-scroll-down - forward-sentence backward-sentence - forward-paragraph backward-paragraph) - "List of standard movement commands. -Extra commands should be added to `cua-movement-commands'") - -(defvar cua-movement-commands nil - "User may add additional movement commands to this list.") - ;;; Scrolling commands which does not signal errors at top/bottom ;;; of buffer at first key-press (instead moves to top/bottom ;;; of buffer). @@ -1025,6 +996,8 @@ If ARG is the atom `-', scroll downward by nearly full screen." (scroll-up arg) (end-of-buffer (goto-char (point-max))))))) +(put 'cua-scroll-up 'CUA 'move) + (defun cua-scroll-down (&optional arg) "Scroll text of current window downward ARG lines; or near full screen if no ARG. If window cannot be scrolled further, move cursor to top line instead. @@ -1043,6 +1016,8 @@ If ARG is the atom `-', scroll upward by nearly full screen." (scroll-down arg) (beginning-of-buffer (goto-char (point-min))))))) +(put 'cua-scroll-up 'CUA 'move) + ;;; Cursor indications (defun cua--update-indications () @@ -1073,8 +1048,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." (defun cua--pre-command-handler () (condition-case nil - (let ((movement (or (memq this-command cua--standard-movement-commands) - (memq this-command cua-movement-commands)))) + (let ((movement (eq (get this-command 'CUA) 'move))) ;; Cancel prefix key timeout if user enters another key. (when cua--prefix-override-timer @@ -1251,9 +1225,6 @@ If ARG is the atom `-', scroll upward by nearly full screen." (define-key cua-global-keymap [remap yank-pop] 'cua-paste-pop) ;; set mark (define-key cua-global-keymap [remap set-mark-command] 'cua-set-mark) - ;; undo - (define-key cua-global-keymap [remap undo] 'cua-undo) - (define-key cua-global-keymap [remap advertised-undo] 'cua-undo) ;; scrolling (define-key cua-global-keymap [remap scroll-up] 'cua-scroll-up) @@ -1305,6 +1276,20 @@ If ARG is the atom `-', scroll upward by nearly full screen." (define-key cua--region-keymap [remap keyboard-quit] 'cua-cancel) ) + +;; Setup standard movement commands to be recognized by CUA. + +(dolist (cmd + '(forward-char backward-char + next-line previous-line + forward-word backward-word + end-of-line beginning-of-line + end-of-buffer beginning-of-buffer + scroll-up scroll-down + forward-sentence backward-sentence + forward-paragraph backward-paragraph)) + (put cmd 'CUA 'move)) + ;; State prior to enabling cua-mode ;; Value is a list with the following elements: ;; transient-mark-mode @@ -1350,9 +1335,6 @@ paste (in addition to the normal emacs bindings)." (add-to-list 'emulation-mode-map-alists 'cua--keymap-alist) (cua--select-keymaps)) - (if (fboundp 'cua--rectangle-on-off) - (cua--rectangle-on-off cua-mode)) - (cond (cua-mode (setq cua--saved-state @@ -1389,7 +1371,7 @@ paste (in addition to the normal emacs bindings)." (setq cua--debug (not cua--debug))) ;; Install run-time check for older versions of CUA-mode which does not -;; work with GNU Emacs version 21.4 and newer. +;; work with GNU Emacs version 22.1 and newer. ;; ;; Except for version 1.2, all of the 1.x and 2.x version of cua-mode ;; provided the `CUA-mode' feature. Since this is no longer true, diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 742ae2033be..bfb51694db4 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -1,6 +1,6 @@ ;;; cua-rect.el --- CUA unified rectangle support -;; Copyright (C) 1997-2002, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1997-2002, 2004, 2005 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> ;; Keywords: keyboard emulations convenience CUA @@ -71,71 +71,28 @@ (defvar cua--virtual-edges-debug nil) -;; Per-buffer CUA mode undo list. -(defvar cua--undo-list nil) -(make-variable-buffer-local 'cua--undo-list) +;; Undo rectangle commands. + +(defvar cua--rect-undo-set-point nil) -;; Record undo boundary for rectangle undo. (defun cua--rectangle-undo-boundary () (when (listp buffer-undo-list) - (if (> (length cua--undo-list) cua-undo-max) - (setcdr (nthcdr (1- cua-undo-max) cua--undo-list) nil)) - (undo-boundary) - (setq cua--undo-list - (cons (cons (cdr buffer-undo-list) (copy-sequence cua--rectangle)) cua--undo-list)))) - -(defun cua--rectangle-undo (&optional arg) - "Undo some previous changes. -Knows about CUA rectangle highlighting in addition to standard undo." - (interactive "*P") - (if cua--rectangle - (cua--rectangle-undo-boundary)) - (undo arg) - (let ((l cua--undo-list)) - (while l - (if (eq (car (car l)) pending-undo-list) - (setq cua--restored-rectangle - (and (vectorp (cdr (car l))) (cdr (car l))) - l nil) - (setq l (cdr l))))) - (setq cua--buffer-and-point-before-command nil)) - -(defvar cua--tidy-undo-counter 0 - "Number of times `cua--tidy-undo-lists' have run successfully.") - -;; Clean out dangling entries from cua's undo list. -;; Since this list contains pointers into the standard undo list, -;; such references are only meningful as undo information if the -;; corresponding entry is still on the standard undo list. - -(defun cua--tidy-undo-lists (&optional clean) - (let ((buffers (buffer-list)) (cnt cua--tidy-undo-counter)) - (while (and buffers (or clean (not (input-pending-p)))) - (with-current-buffer (car buffers) - (when (local-variable-p 'cua--undo-list) - (if (or clean (null cua--undo-list) (eq buffer-undo-list t)) - (progn - (kill-local-variable 'cua--undo-list) - (setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter))) - (let* ((bul buffer-undo-list) - (cul (cons nil cua--undo-list)) - (cc (car (car (cdr cul))))) - (while (and bul cc) - (if (setq bul (memq cc bul)) - (setq cul (cdr cul) - cc (and (cdr cul) (car (car (cdr cul))))))) - (when cc - (if cua--debug - (setq cc (length (cdr cul)))) - (if (eq (cdr cul) cua--undo-list) - (setq cua--undo-list nil) - (setcdr cul nil)) - (setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter)) - (if cua--debug - (message "Clean undo list in %s (%d)" - (buffer-name) cc))))))) - (setq buffers (cdr buffers))) - (/= cnt cua--tidy-undo-counter))) + (let ((s (cua--rect-start-position)) + (e (cua--rect-end-position))) + (undo-boundary) + (push (list 'apply 0 s e + 'cua--rect-undo-handler + (copy-sequence cua--rectangle) t s e) + buffer-undo-list)))) + +(defun cua--rect-undo-handler (rect on s e) + (if (setq on (not on)) + (setq cua--rect-undo-set-point s) + (setq cua--restored-rectangle (copy-sequence rect)) + (setq cua--buffer-and-point-before-command nil)) + (push (list 'apply 0 s (if on e s) + 'cua--rect-undo-handler rect on s e) + buffer-undo-list)) ;;; Rectangle geometry @@ -287,6 +244,27 @@ Knows about CUA rectangle highlighting in addition to standard undo." (backward-char 1)) )) +(defun cua--rect-start-position () + ;; Return point of top left corner + (save-excursion + (goto-char (cua--rectangle-top)) + (and (> (move-to-column (cua--rectangle-left)) + (cua--rectangle-left)) + (not (bolp)) + (backward-char 1)) + (point))) + +(defun cua--rect-end-position () + ;; Return point of bottom right cornet + (save-excursion + (goto-char (cua--rectangle-bot)) + (and (= (move-to-column (cua--rectangle-right)) + (- (cua--rectangle-right) tab-width)) + (not (eolp)) + (not (bolp)) + (backward-char 1)) + (point))) + ;;; Rectangle resizing (defun cua--forward-line (n) @@ -1394,10 +1372,12 @@ With prefix arg, indent to that column." (defun cua--rectangle-post-command () (if cua--restored-rectangle - (setq cua--rectangle cua--restored-rectangle - cua--restored-rectangle nil - mark-active t - deactivate-mark nil) + (progn + (setq cua--rectangle cua--restored-rectangle + cua--restored-rectangle nil + mark-active t + deactivate-mark nil) + (cua--rectangle-set-corners)) (when (and cua--rectangle cua--buffer-and-point-before-command (equal (car cua--buffer-and-point-before-command) (current-buffer)) (not (= (cdr cua--buffer-and-point-before-command) (point)))) @@ -1411,20 +1391,16 @@ With prefix arg, indent to that column." (if (and mark-active (not deactivate-mark)) (cua--highlight-rectangle) - (cua--deactivate-rectangle)))) - + (cua--deactivate-rectangle))) + (when cua--rect-undo-set-point + (goto-char cua--rect-undo-set-point) + (setq cua--rect-undo-set-point nil))) ;;; Initialization (defun cua--rect-M/H-key (key cmd) (cua--M/H-key cua--rectangle-keymap key cmd)) -(defun cua--rectangle-on-off (on) - (cancel-function-timers 'cua--tidy-undo-lists) - (if on - (run-with-idle-timer 10 t 'cua--tidy-undo-lists) - (cua--tidy-undo-lists t))) - (defun cua--init-rectangles () (unless (face-background 'cua-rectangle-face) (copy-face 'region 'cua-rectangle-face) diff --git a/lisp/emulation/keypad.el b/lisp/emulation/keypad.el index 5cf1d7c2e53..e5209966bf9 100644 --- a/lisp/emulation/keypad.el +++ b/lisp/emulation/keypad.el @@ -108,7 +108,7 @@ decimal key must be specified." (keypad-setup value nil nil value))) :initialize 'custom-initialize-default :link '(emacs-commentary-link "keypad.el") - :version "21.4" + :version "22.1" :type '(choice (const :tag "Plain numeric keypad" numeric) (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) @@ -131,7 +131,7 @@ decimal key must be specified." (keypad-setup value t nil value))) :initialize 'custom-initialize-default :link '(emacs-commentary-link "keypad.el") - :version "21.4" + :version "22.1" :type '(choice (const :tag "Plain numeric keypad" numeric) (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) @@ -154,7 +154,7 @@ decimal key must be specified." (keypad-setup value nil t value))) :initialize 'custom-initialize-default :link '(emacs-commentary-link "keypad.el") - :version "21.4" + :version "22.1" :type '(choice (const :tag "Plain numeric keypad" numeric) (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) @@ -177,7 +177,7 @@ decimal key must be specified." (keypad-setup value t t value))) :initialize 'custom-initialize-default :link '(emacs-commentary-link "keypad.el") - :version "21.4" + :version "22.1" :type '(choice (const :tag "Plain numeric keypad" numeric) (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) diff --git a/lisp/faces.el b/lisp/faces.el index 0185541ecef..1f77acd3cf6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1823,7 +1823,7 @@ created." :box (:line-width -1 :color "grey40" :style nil) :foreground "grey80" :background "grey30")) "Basic mode line face for non-selected windows." - :version "21.4" + :version "22.1" :group 'modeline :group 'basic-faces) @@ -1884,7 +1884,7 @@ created." (((type pc)) :foreground "magenta") (t :foreground "dark blue")) "Face for minibuffer prompts." - :version "21.4" + :version "22.1" :group 'basic-faces) (setq minibuffer-prompt-properties diff --git a/lisp/files.el b/lisp/files.el index 045958bf9c5..a4bb4f86d4e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -305,7 +305,7 @@ Any other non-nil value means ask user whether to add a newline, when saving." (const :tag "When visiting or saving" visit-save) (other :tag "Ask" ask)) :group 'editing-basics - :version "21.4") + :version "22.1") (defcustom auto-save-default t "*Non-nil says by default do auto-saving of every file-visiting buffer." @@ -377,7 +377,7 @@ Variable `buffer-file-name' is already set up. The functions are called in the order given until one of them returns non-nil.") (defvaralias 'find-file-not-found-hooks 'find-file-not-found-functions) (make-obsolete-variable - 'find-file-not-found-hooks 'find-file-not-found-functions "21.4") + 'find-file-not-found-hooks 'find-file-not-found-functions "22.1") ;;;It is not useful to make this a local variable. ;;;(put 'find-file-hooks 'permanent-local t) @@ -388,9 +388,9 @@ functions are called." :group 'find-file :type 'hook :options '(auto-insert) - :version "21.4") + :version "22.1") (defvaralias 'find-file-hooks 'find-file-hook) -(make-obsolete-variable 'find-file-hooks 'find-file-hook "21.4") +(make-obsolete-variable 'find-file-hooks 'find-file-hook "22.1") (defvar write-file-functions nil "List of functions to be called before writing out a buffer to a file. @@ -409,12 +409,12 @@ node `(elisp)Saving Buffers'.) To perform various checks or updates before the buffer is saved, use `before-save-hook' .") (put 'write-file-functions 'permanent-local t) (defvaralias 'write-file-hooks 'write-file-functions) -(make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4") +(make-obsolete-variable 'write-file-hooks 'write-file-functions "22.1") (defvar local-write-file-hooks nil) (make-variable-buffer-local 'local-write-file-hooks) (put 'local-write-file-hooks 'permanent-local t) -(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "21.4") +(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1") (defvar write-contents-functions nil "List of functions to be called before writing out a buffer to a file. @@ -434,7 +434,7 @@ To perform various checks or updates before the buffer is saved, use `before-save-hook'.") (make-variable-buffer-local 'write-contents-functions) (defvaralias 'write-contents-hooks 'write-contents-functions) -(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4") +(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "22.1") (defcustom enable-local-variables t "*Control use of local variables in files you visit. @@ -1284,7 +1284,7 @@ suppresses this warning." When nil, never request confirmation." :group 'files :group 'find-file - :version "21.4" + :version "22.1" :type '(choice integer (const :tag "Never request confirmation" nil))) (defun find-file-noselect (filename &optional nowarn rawfile wildcards) @@ -2378,7 +2378,7 @@ Add expressions to this list if you want Emacs to evaluate them, when they appear in an `eval' local variable specification, without first asking you for confirmation." :group 'find-file - :version "21.4" + :version "22.1" :type '(repeat sexp)) (put 'c-set-style 'safe-local-eval-function t) @@ -3470,7 +3470,7 @@ change the additional actions you can take on files." (buffer-list) '("buffer" "buffers" "save") save-some-buffers-action-alist)) - ;; Maybe to save abbrevs, and record whether + ;; Maybe to save abbrevs, and record whether ;; we either saved them or asked to. (and save-abbrevs abbrevs-changed (progn diff --git a/lisp/filesets.el b/lisp/filesets.el index 8599cb01d93..dee662ee87d 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -296,7 +296,7 @@ key is supported." "The fileset swapper." :prefix "filesets-" :group 'convenience - :version "21.4") + :version "22.1") (defcustom filesets-menu-name "Filesets" "*Filesets' menu name." diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 2f499f243d7..d52305a500a 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -62,7 +62,7 @@ Use the \"-F\" or \"-b\" switches if and only if you also use them for `find-ls-option'." :type 'string :group 'find-dired - :version "21.4") + :version "22.1") ;;;###autoload (defcustom find-grep-options diff --git a/lisp/font-core.el b/lisp/font-core.el index bbe1961e51e..ea1880baac7 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -203,7 +203,8 @@ this function onto `change-major-mode-hook'." ;; `font-lock-defaults'. (when (or font-lock-defaults (and (boundp 'font-lock-keywords) font-lock-keywords) - (cdr (assq major-mode font-lock-defaults-alist))) + (with-no-warnings + (cdr (assq major-mode font-lock-defaults-alist)))) (font-lock-mode-internal mode))) (defun turn-on-font-lock () diff --git a/lisp/frame.el b/lisp/frame.el index 76049faddee..2aff4860cf3 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -135,7 +135,7 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." ;; (set-window-dedicated-p window t) window)) ;; If no window yet, make one in a new frame. - (let ((frame + (let ((frame (with-current-buffer buffer (make-frame (append args special-display-frame-alist))))) (set-window-buffer (frame-selected-window frame) buffer) @@ -593,7 +593,7 @@ The functions are run with one arg, the newly created frame.") ;; Alias, kept temporarily. (defalias 'new-frame 'make-frame) -(make-obsolete 'new-frame 'make-frame "21.4") +(make-obsolete 'new-frame 'make-frame "22.1") (defun make-frame (&optional parameters) "Return a newly created frame displaying the current buffer. @@ -1195,7 +1195,7 @@ left untouched. FRAME nil or omitted means use the selected frame." ;; miscellaneous obsolescence declarations (defvaralias 'delete-frame-hook 'delete-frame-functions) -(make-obsolete-variable 'delete-frame-hook 'delete-frame-functions "21.4") +(make-obsolete-variable 'delete-frame-hook 'delete-frame-functions "22.1") ;; Highlighting trailing whitespace. @@ -1253,10 +1253,36 @@ The function `blink-cursor-start' is called when the timer fires.") (defvar blink-cursor-timer nil "Timer started from `blink-cursor-start'. -This timer calls `blink-cursor' every `blink-cursor-interval' seconds.") +This timer calls `blink-cursor-timer-function' every +`blink-cursor-interval' seconds.") + +;; The strange sequence below is meant to set both the right temporary +;; value and the right "standard expression" , according to Custom, +;; for blink-cursor-mode. We do not know the standard _evaluated_ +;; value yet, because the standard expression uses values that are not +;; yet set. Evaluating it now would yield an error, but we make sure +;; that it is not evaluated, by ensuring that blink-cursor-mode is set +;; before the defcustom is evaluated and by using the right :initialize +;; function. The correct evaluated standard value will be installed +;; in startup.el using exactly the same expression as in the defcustom. +(defvar blink-cursor-mode) +(unless (boundp 'blink-cursor-mode) (setq blink-cursor-mode nil)) +(defcustom blink-cursor-mode + (not (or noninteractive + emacs-quick-startup + (eq system-type 'ms-dos) + (not (memq window-system '(x w32))))) + "*Non-nil means Blinking Cursor mode is active." + :group 'cursor + :tag "Blinking cursor" + :type 'boolean + :initialize 'custom-initialize-set + :set #'(lambda (symbol value) + (set-default symbol value) + (blink-cursor-mode (or value 0)))) -(defvar blink-cursor-mode nil - "Non-nil means blinking cursor is active.") +(defvaralias 'blink-cursor 'blink-cursor-mode) +(make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1") (defun blink-cursor-mode (arg) "Toggle blinking cursor mode. @@ -1289,18 +1315,6 @@ cursor display. On a text-only terminal, this is not implemented." (setq blink-cursor-mode t)) (internal-show-cursor nil t)))) -;; Note that this is really initialized from startup.el before -;; the init-file is read. - -(defcustom blink-cursor nil - "*Non-nil means blinking cursor mode is active." - :group 'cursor - :tag "Blinking cursor" - :type 'boolean - :set #'(lambda (symbol value) - (set-default symbol value) - (blink-cursor-mode (or value 0)))) - (defun blink-cursor-start () "Timer function called from the timer `blink-cursor-idle-timer'. This starts the timer `blink-cursor-timer', which makes the cursor blink diff --git a/lisp/fringe.el b/lisp/fringe.el index 3f1e9393136..3c554f1ca55 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -37,7 +37,7 @@ (defgroup fringe nil "Window fringes." - :version "21.4" + :version "22.1" :group 'frames) ;; Standard fringe bitmaps diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e0db7c194a7..7a4b1e68e58 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1174,7 +1174,7 @@ * pgg-gpg.el (pgg-gpg-lookup-all-secret-keys) (pgg-gpg-lookup-key): Use regexp match instead of split-string (split-string is different between emacs 21.2 and - 21.4). Reported by ultrasoul@ultrasoul.com (David D. Smith). + 22.1). Reported by ultrasoul@ultrasoul.com (David D. Smith). 2004-07-28 Simon Josefsson <jas@extundo.com> diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 2dbd6d306dd..57055426ce9 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -50,7 +50,7 @@ * gnus-sum.el (gnus-select-newsgroup): Use cat. * gnus-agent.el (gnus-agent-cat-enable-undownloaded-faces): New - cat. + cat. * gnus.el (gnus-user-agent): Moved here. @@ -108,7 +108,7 @@ 2003-12-31 Jeremy Maitin-Shepard <jbms@attbi.com> * mml.el (mml-generate-mime-1): Use mml-compute-boundary (tiny - change). + change). 2003-12-30 Reiner Steib <Reiner.Steib@gmx.de> @@ -391,7 +391,7 @@ * gnus-cus.el (gnus-agent-customize-category): Added missing agent-disable-undownloaded-faces parameter. - + * gnus-start.el (gnus-activate-group): Backed out my 2003-11-29 patch as it was too late at adjusting the active range. (gnus-get-unread-articles-in-group): Added call to new @@ -401,7 +401,7 @@ * message.el (message-get-reply-headers): Narrow to headers. -2003-12-10 Teodor Zlatanov <tzz@lifelogs.com> +2003-12-10 Teodor Zlatanov <tzz@lifelogs.com> * spam.el (spam-disable-spam-split-during-ham-respool): new variable. From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly) @@ -557,7 +557,7 @@ 2003-11-30 Lars Magne Ingebrigtsen <larsi@gnus.org> - * gnus-agent.el (gnus-agent-covered-methods): Remove nil methods. + * gnus-agent.el (gnus-agent-covered-methods): Remove nil methods. 2003-11-29 Kevin Greiner <kgreiner@xpediantsolutions.com> * gnus-start.el (gnus-activate-group): The active range of the @@ -813,16 +813,16 @@ nnmail-cache-insert * nnmh.el (nnmh-request-accept-article): pass sender to - nnmail-cache-insert + nnmail-cache-insert * nnmbox.el (nnmbox-request-accept-article): pass sender to - nnmail-cache-insert + nnmail-cache-insert * nnfolder.el (nnfolder-request-accept-article): pass sender to - nnmail-cache-insert + nnmail-cache-insert * nnbabyl.el (nnbabyl-request-accept-article): pass sender to - nnmail-cache-insert + nnmail-cache-insert * nnmail.el (nnmail-cache-insert): accept sender parameter and pass it to the nnmail-spool-hook @@ -887,7 +887,7 @@ * gnus.el (gnus-group-guess-full-name-from-command-method): new function * gnus-registry.el (gnus-registry-fetch-group): use long names if - requested + requested (gnus-registry-split-fancy-with-parent): when long names are in use, strip the name if we're in the native server, or else return nothing (gnus-registry-spool-action, gnus-registry-action): use @@ -990,7 +990,7 @@ 2003-10-27 Romain FRANCOISE <romain@orebokech.com> - * gnus-art.el (gnus-article-goto-prev-page): Doc fix. + * gnus-art.el (gnus-article-goto-prev-page): Doc fix. 2003-10-27 Simon Josefsson <jas@extundo.com> @@ -1069,7 +1069,7 @@ building with XEmacs so byte-compile it. (dgnushack-make-load): When building with XEmacs do nothing except byte-compile the autoload file and create a dummy gnus-load.el - file. + file. 2003-10-23 Katsumi Yamaoka <yamaoka@jpl.org> @@ -1128,7 +1128,7 @@ 2003-10-21 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-picon.el (gnus-picon-transform-address): Protect against - errors. + errors. 2003-10-20 Katsumi Yamaoka <yamaoka@jpl.org> @@ -1140,12 +1140,12 @@ 2003-10-20 Lars Magne Ingebrigtsen <larsi@gnus.org> * spam-report.el (spam-report-url-ping-plain): Include a - User-Agent. + User-Agent. * gnus-msg.el (gnus-extended-version): Use it. * gnus-util.el (gnus-emacs-version): Separated out into own - function. + function. 2003-10-19 Reiner Steib <Reiner.Steib@gmx.de> @@ -1181,15 +1181,15 @@ 2003-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org> * pop3.el (pop3-read-response): Check whether the process is - alive. + alive. * gnus-sum.el (gnus-summary-refer-article): Strip spaces. * rfc2047.el (rfc2047-encode-region): Do error out on invalid - strings. + strings. * nntp.el (nntp-retrieve-headers-with-xover): Get error messages - right. + right. * gnus-agent.el (gnus-agent-read-servers): Remove sit-for. @@ -1198,14 +1198,14 @@ * message.el (message-field-value): New function. (message-insert-disposition-notification-to): Use Reply-To, too. - * imap.el (imap-mailbox-status): Upcase STATUS commands. + * imap.el (imap-mailbox-status): Upcase STATUS commands. * gnus-sum.el (gnus-remove-odd-characters): New function. (gnus-nov-parse-line): Use it. 2003-10-18 Matt Swift <swift@alum.mit.edu> - * mm-decode.el (mm-inline-media-tests): Recognize pjpeg as jpeg. + * mm-decode.el (mm-inline-media-tests): Recognize pjpeg as jpeg. 2003-10-18 Romain FRANCOISE <romain@orebokech.com> @@ -1269,14 +1269,14 @@ 2003-10-17 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-summary-enter-digest-group): ogroup, nor - group. + group. * gnus-msg.el (gnus-inews-insert-archive-gcc): Use the parent name for gcc-self. (gnus-inews-insert-archive-gcc): Paren mistake. * gnus-sum.el (gnus-summary-enter-digest-group): Add - parent-group. + parent-group. * gnus-art.el (gnus-ignored-headers): Add more headers. @@ -1297,7 +1297,7 @@ (mail-source-fetch-imap): Use them. * nndraft.el (nndraft-request-move-article): Fix infinite - recursion. + recursion. * gnus-group.el (gnus-group-mark-regexp): Jump to groups. @@ -1310,7 +1310,7 @@ * message.el (message-inserted-headers): New variable. (message-mode): Make local. - (message-mode): Set all the local action variables to nil. + (message-mode): Set all the local action variables to nil. 2003-10-16 Katsumi Yamaoka <yamaoka@jpl.org> @@ -1368,7 +1368,7 @@ found (idea from Adrian Lanz <lanz@fowi.ethz.ch>) (spam-check-bogofilter-headers, spam-check-blackholes, spam-check-BBDB) (spam-from-listed-p): use nnmail-fetch-field instead of message-fetch-field - + 2003-10-03 Katsumi Yamaoka <yamaoka@jpl.org> @@ -1439,7 +1439,7 @@ to MML. MIME -> MML -> MIME does not work for PGP/MIME. * message.el (message-bounce, message-forward-show-mml): do. - + 2003-09-13 Jesper Harder <harder@ifa.au.dk> * rfc2047.el (rfc2047-charset-encoding-alist): Add viscii. @@ -1760,7 +1760,7 @@ 2003-07-25 Teodor Zlatanov <tzz@lifelogs.com> - * spam.el (spam-use-regex-body, spam-regex-body-spam) + * spam.el (spam-use-regex-body, spam-regex-body-spam) (spam-regex-body-ham): new variables, default to nil/empty/empty (spam-install-hooks): added spam-use-regex-body to list or pre-install conditions @@ -1947,7 +1947,7 @@ 2003-06-24 Lars Magne Ingebrigtsen <larsi@gnus.org> * gnus-ems.el (gnus-put-image): Mark the right text segment with - gnus-image-category. + gnus-image-category. * gnus-srvr.el (gnus-browse-unsubscribe-group): Strip prefix from native groups. @@ -4809,7 +4809,7 @@ 2003-02-20 Jesper Harder <harder@ifa.au.dk> * gnus-spec.el (gnus-xmas-format): Use insert instead of - insert-string which is obsolete in Emacs 21.4. + insert-string which is obsolete in Emacs 22.1. * message.el (message-cross-post-followup-to-header): do. diff --git a/lisp/gnus/binhex.el b/lisp/gnus/binhex.el index 17103c1b4f3..fe8d99dcc02 100644 --- a/lisp/gnus/binhex.el +++ b/lisp/gnus/binhex.el @@ -50,7 +50,7 @@ input and write the converted data to its standard output." (defcustom binhex-use-external (executable-find binhex-decoder-program) "*Use external binhex program." - :version "21.4" + :version "22.1" :group 'gnus-extract :type 'boolean) diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index a00151063de..0dc6e6d002a 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -146,7 +146,7 @@ ;; Hey, John. There's no in all your sentences! ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +;; ;; Usage ;; ----- ;; @@ -231,59 +231,59 @@ (defgroup gnus-outlook-deuglify nil "Deuglify articles generated by broken user agents like MS Outlook (Express)." - :version "21.4") + :version "22.1") ;;;###autoload (defcustom gnus-outlook-deuglify-unwrap-min 45 "Minimum length of the cited line above the (possibly) wrapped line." - :version "21.4" + :version "22.1" :type 'integer :group 'gnus-outlook-deuglify) ;;;###autoload (defcustom gnus-outlook-deuglify-unwrap-max 95 "Maximum length of the cited line after unwrapping." - :version "21.4" + :version "22.1" :type 'integer :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-cite-marks ">|#%" "Characters that indicate cited lines." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-unwrap-stop-chars nil ;; ".?!" or nil "Characters that inhibit unwrapping if they are the last one on the cited line above the possible wrapped line." - :version "21.4" + :version "22.1" :type '(radio (const :format "None " nil) (string :value ".?!")) :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-no-wrap-chars "`" "Characters that inhibit unwrapping if they are the first one in the possibly wrapped line." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-attrib-cut-regexp "\\(On \\|Am \\)?\\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\),[^,]+, " "Regular expression matching the beginning of an attribution line that should be cut off." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-attrib-verb-regexp "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef\\|escribió" "Regular expression matching the verb used in an attribution line." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-attrib-end-regexp ": *\\|\\.\\.\\." "Regular expression matching the end of an attribution line." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-outlook-deuglify) @@ -291,7 +291,7 @@ (defcustom gnus-outlook-display-hook nil "A hook called after an deuglified article has been prepared. It is run after `gnus-article-prepare-hook'." - :version "21.4" + :version "22.1" :type 'hook :group 'gnus-outlook-deuglify) diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el index 8a8098727fe..f39ba9edbbe 100644 --- a/lisp/gnus/flow-fill.el +++ b/lisp/gnus/flow-fill.el @@ -56,7 +56,7 @@ (defcustom fill-flowed-display-column 'fill-column "Column beyond which format=flowed lines are wrapped, when displayed. This can be a Lisp expression or an integer." - :version "21.4" + :version "22.1" :group 'mime-display :type '(choice (const :tag "Standard `fill-column'" fill-column) (const :tag "Fit Window" (- (window-width) 5)) @@ -67,7 +67,7 @@ This can be a Lisp expression or an integer." "Column beyond which format=flowed lines are wrapped, in outgoing messages. This can be a Lisp expression or an integer. RFC 2646 suggests 66 characters for readability." - :version "21.4" + :version "22.1" :group 'mime-display :type '(choice (const :tag "Standard fill-column" fill-column) (const :tag "RFC 2646 default (66)" 66) @@ -163,19 +163,19 @@ RFC 2646 suggests 66 characters for readability." '( ;; The syntax of each list element is: ;; (INPUT . EXPECTED-OUTPUT) - ("> Thou villainous ill-breeding spongy dizzy-eyed -> reeky elf-skinned pigeon-egg! ->> Thou artless swag-bellied milk-livered + ("> Thou villainous ill-breeding spongy dizzy-eyed +> reeky elf-skinned pigeon-egg! +>> Thou artless swag-bellied milk-livered >> dismal-dreaming idle-headed scut! ->>> Thou errant folly-fallen spleeny reeling-ripe +>>> Thou errant folly-fallen spleeny reeling-ripe >>> unmuzzled ratsbane! ->>>> Henceforth, the coding style is to be strictly +>>>> Henceforth, the coding style is to be strictly >>>> enforced, including the use of only upper case. ->>>>> I've noticed a lack of adherence to the coding +>>>>> I've noticed a lack of adherence to the coding >>>>> styles, of late. >>>>>> Any complaints? " . "> Thou villainous ill-breeding spongy dizzy-eyed reeky elf-skinned -> pigeon-egg! +> pigeon-egg! >> Thou artless swag-bellied milk-livered dismal-dreaming idle-headed >> scut! >>> Thou errant folly-fallen spleeny reeling-ripe unmuzzled ratsbane! @@ -186,8 +186,8 @@ RFC 2646 suggests 66 characters for readability." ") ; (" ;> foo -;> -;> +;> +;> ;> bar ;" . " ;> foo bar diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index aca9e4ec218..9a02f5b38aa 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -60,7 +60,7 @@ (defcustom gnus-agent-fetched-hook nil "Hook run when finished fetching articles." - :version "21.4" + :version "22.1" :group 'gnus-agent :type 'hook) @@ -152,7 +152,7 @@ whether unread articles are downloaded or not. If you enable this, groups with large active ranges may open slower and you may also want to look into the agent expiry settings to block the expiration of read articles as they would just be downloaded again." - :version "21.4" + :version "22.1" :type 'boolean :group 'gnus-agent) @@ -160,7 +160,7 @@ read articles as they would just be downloaded again." "Chunk size for `gnus-agent-fetch-session'. The function will split its article fetches into chunks smaller than this limit." - :version "21.4" + :version "22.1" :group 'gnus-agent :type 'integer) @@ -171,7 +171,7 @@ contents from a group's local storage. This value may be overridden to disable expiration in specific categories, topics, and groups. Of course, you could change gnus-agent-enable-expiration to DISABLE then enable expiration per categories, topics, and groups." - :version "21.4" + :version "22.1" :group 'gnus-agent :type '(radio (const :format "Enable " ENABLE) (const :format "Disable " DISABLE))) @@ -181,7 +181,7 @@ enable expiration per categories, topics, and groups." Have gnus-agent-expire scan the directories under \(gnus-agent-directory) for groups that are no longer agentized. When found, offer to remove them." - :version "21.4" + :version "22.1" :type 'boolean :group 'gnus-agent) @@ -189,7 +189,7 @@ When found, offer to remove them." "Initially, all servers from these methods are agentized. The user may remove or add servers using the Server buffer. See Info node `(gnus)Server Buffer'." - :version "21.4" + :version "22.1" :type '(repeat symbol) :group 'gnus-agent) @@ -197,7 +197,7 @@ See Info node `(gnus)Server Buffer'." "Whether and when outgoing mail should be queued by the agent. When `always', always queue outgoing mail. When nil, never queue. Otherwise, queue if and only if unplugged." - :version "21.4" + :version "22.1" :group 'gnus-agent :type '(radio (const :format "Always" always) (const :format "Never" nil) @@ -206,7 +206,7 @@ queue. Otherwise, queue if and only if unplugged." (defcustom gnus-agent-prompt-send-queue nil "If non-nil, `gnus-group-send-queue' will prompt if called when unplugged." - :version "21.4" + :version "22.1" :group 'gnus-agent :type 'boolean) @@ -215,13 +215,13 @@ unplugged." (defvar gnus-agent-history-buffers nil) (defvar gnus-agent-buffer-alist nil) (defvar gnus-agent-article-alist nil - "An assoc list identifying the articles whose headers have been fetched. + "An assoc list identifying the articles whose headers have been fetched. If successfully fetched, these headers will be stored in the group's overview file. The key of each assoc pair is the article ID, the value of each assoc pair is a flag indicating whether the identified article has been downloaded \(gnus-agent-fetch-articles sets the value to the day of the download). NOTES: -1) The last element of this list can not be expired as some +1) The last element of this list can not be expired as some routines (for example, get-agent-fetch-headers) use the last value to track which articles have had their headers retrieved. 2) The function `gnus-agent-regenerate' may destructively modify the value.") @@ -821,11 +821,11 @@ be a select method." (erase-buffer) (nnheader-insert-file-contents (gnus-agent-lib-file "flags")) (cond ((null gnus-plugged) - (gnus-message - 1 "You must be plugged to synchronize flags with server %s" + (gnus-message + 1 "You must be plugged to synchronize flags with server %s" (nth 1 gnus-command-method))) ((null (gnus-check-server gnus-command-method)) - (gnus-message + (gnus-message 1 "Couldn't open server %s" (nth 1 gnus-command-method))) (t (condition-case err @@ -873,7 +873,7 @@ next enabled. Depends upon the caller to determine whether group renaming is sup (gnus-agent-save-group-info old-command-method old-real-group nil) (gnus-agent-save-group-info new-command-method new-real-group old-active) - (let ((old-local (gnus-agent-get-local old-group + (let ((old-local (gnus-agent-get-local old-group old-real-group old-command-method))) (gnus-agent-set-local old-group nil nil @@ -896,7 +896,7 @@ next enabled. Depends upon the caller to determine whether group deletion is sup (let* ((real-group (gnus-group-real-name group))) (gnus-agent-save-group-info command-method real-group nil) - (let ((local (gnus-agent-get-local group + (let ((local (gnus-agent-get-local group real-group command-method))) (gnus-agent-set-local group nil nil @@ -937,7 +937,7 @@ next enabled. Depends upon the caller to determine whether group deletion is sup (unless (member named-server gnus-agent-covered-methods) (error "Server not in the agent program")) - (setq gnus-agent-covered-methods + (setq gnus-agent-covered-methods (delete named-server gnus-agent-covered-methods) gnus-agent-method-p-cache nil) @@ -947,7 +947,7 @@ next enabled. Depends upon the caller to determine whether group deletion is sup (defun gnus-agent-read-servers () "Read the alist of covered servers." - (setq gnus-agent-covered-methods + (setq gnus-agent-covered-methods (gnus-agent-read-file (nnheader-concat gnus-agent-directory "lib/servers")) gnus-agent-method-p-cache nil) @@ -1079,7 +1079,7 @@ article's mark is toggled." ;; imply that this article isn't in the agent. (gnus-agent-append-to-list tail-undownloaded h) (gnus-agent-append-to-list tail-unfetched h) - (setq headers (cdr headers))) + (setq headers (cdr headers))) ((cdar alist) (setq alist (cdr alist)) (setq headers (cdr headers)) @@ -1088,7 +1088,7 @@ article's mark is toggled." (t (setq alist (cdr alist)) (setq headers (cdr headers)) - + ;; This article isn't in the agent. Check to see ;; if it is in the cache. If it is, it's been ;; downloaded. @@ -1166,7 +1166,7 @@ Optional arg ALL, if non-nil, means to fetch all articles." gnus-newsgroup-name articles))))) (save-excursion (dolist (article articles) - (let ((was-marked-downloadable + (let ((was-marked-downloadable (memq article gnus-newsgroup-downloadable))) (cond (gnus-agent-mark-unread-after-downloaded (setq gnus-newsgroup-downloadable @@ -1206,8 +1206,8 @@ This can be added to `gnus-select-article-hook' or ;; trying to call gnus-request-set-mark, I have to ;; reconstruct the original group name. (or (gnus-get-info group) - (gnus-get-info - (setq group (gnus-group-full-name + (gnus-get-info + (setq group (gnus-group-full-name group gnus-command-method)))))) (gnus-request-set-mark group actions) @@ -1218,14 +1218,14 @@ This can be added to `gnus-select-article-hook' or (marks (nth 2 action))) (dolist (mark marks) (cond ((eq mark 'read) - (gnus-info-set-read + (gnus-info-set-read info (funcall (if (eq what 'add) 'gnus-range-add 'gnus-remove-from-range) (gnus-info-read info) range)) - (gnus-get-unread-articles-in-group + (gnus-get-unread-articles-in-group info (gnus-active (gnus-info-group info)))) ((memq mark '(tick)) @@ -1293,11 +1293,11 @@ downloaded into the agent." ;; file. (let ((read (gnus-info-read info))) - (gnus-info-set-read - info - (gnus-range-add - read - (list (cons (1+ agent-max) + (gnus-info-set-read + info + (gnus-range-add + read + (list (cons (1+ agent-max) (1- active-min)))))) ;; Lie about the agent's local range for this group to @@ -1370,7 +1370,7 @@ downloaded into the agent." (setq group (nnheader-translate-file-chars (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string + (nnheader-replace-chars-in-string (gnus-group-real-name group) ?/ ?_) ?. ?_))) @@ -1451,7 +1451,7 @@ downloaded into the agent." (unless (and (eq article (caar alist)) (cdar alist)) ;; Skip headers preceeding this article - (while (> article + (while (> article (setq header-number (let* ((header (car headers))) (if header @@ -2017,8 +2017,8 @@ doesn't exist, to valid the overview buffer." (setq prev (cdr prev))) (setq gnus-agent-article-alist (cdr all)) - (gnus-agent-set-local group - (caar gnus-agent-article-alist) + (gnus-agent-set-local group + (caar gnus-agent-article-alist) (caar (last gnus-agent-article-alist))) (gnus-make-directory (gnus-agent-article-name "" group)) @@ -2073,7 +2073,7 @@ modified) original contents, they are first saved to their own file." (defun gnus-agent-read-local (file) "Load FILE and do a `read' there." - (let ((my-obarray (gnus-make-hashtable (count-lines (point-min) + (let ((my-obarray (gnus-make-hashtable (count-lines (point-min) (point-max)))) (line 1)) (with-temp-buffer @@ -2090,7 +2090,7 @@ modified) original contents, they are first saved to their own file." (while (not (eobp)) (condition-case err - (let (group + (let (group min max (cur (current-buffer))) @@ -2108,7 +2108,7 @@ modified) original contents, they are first saved to their own file." file line (error-message-string err)))) (forward-line 1) (setq line (1+ line)))) - + (set (intern "+dirty" my-obarray) nil) (set (intern "+method" my-obarray) gnus-command-method) my-obarray)) @@ -2141,7 +2141,7 @@ modified) original contents, they are first saved to their own file." (princ (car range)) (princ " ") (princ (cdr range)) - (princ "\n"))))) + (princ "\n"))))) my-obarray)))))))) (defun gnus-agent-get-local (group &optional gmane method) @@ -2160,7 +2160,7 @@ modified) original contents, they are first saved to their own file." (setq minmax (cons (caar alist) (caar (last alist)))) - (gnus-agent-set-local group (car minmax) (cdr minmax) + (gnus-agent-set-local group (car minmax) (cdr minmax) gmane gnus-command-method local)))) minmax)) @@ -2170,7 +2170,7 @@ modified) original contents, they are first saved to their own file." (local (or local (gnus-agent-load-local))) (symb (intern gmane local)) (minmax (and (boundp symb) (symbol-value symb)))) - + (if (cond ((and minmax (or (not (eq min (car minmax))) (not (eq max (cdr minmax))))) @@ -2836,7 +2836,7 @@ The following commands are available: It is okay to miss some cases, but there must be no false positives. That is, if this predicate returns true, then indeed the predicate must return only unread articles." - (eq t (gnus-function-implies-unread-1 + (eq t (gnus-function-implies-unread-1 (gnus-category-make-function-1 predicate)))) (defun gnus-function-implies-unread-1 (function) @@ -2957,12 +2957,12 @@ FORCE is equivalent to setting the expiration predicates to true." (let ((dir (gnus-agent-group-pathname group))) (when (boundp 'gnus-agent-expire-current-dirs) - (set 'gnus-agent-expire-current-dirs - (cons dir + (set 'gnus-agent-expire-current-dirs + (cons dir (symbol-value 'gnus-agent-expire-current-dirs)))) (if (and (not force) - (eq 'DISABLE (gnus-agent-find-parameter group + (eq 'DISABLE (gnus-agent-find-parameter group 'agent-enable-expiration))) (gnus-message 5 "Expiry skipping over %s" group) (gnus-message 5 "Expiring articles in %s" group) @@ -3299,7 +3299,7 @@ The articles on which the expiration process runs are selected as follows: Setting GROUP will limit expiration to that group. FORCE is equivalent to setting the expiration predicates to true." (interactive) - + (if group (gnus-agent-expire-group group articles force) (if (or (not (eq articles t)) @@ -3328,7 +3328,7 @@ articles in every agentized group.")) gnus-command-method)) (let* ((active (gnus-gethash-safe expiring-group orig))) - + (when active (save-excursion (gnus-agent-expire-group-1 @@ -3349,9 +3349,9 @@ articles in every agentized group.")) units (cdr units))) (format "Expiry recovered %d NOV entries, deleted %d files,\ - and freed %f %s." - (nth 0 stats) - (nth 1 stats) + and freed %f %s." + (nth 0 stats) + (nth 1 stats) size (car units))) "Expiry...done")) @@ -3379,9 +3379,9 @@ articles in every agentized group.")) (checker (function (lambda (d) - "Given a directory, check it and its subdirectories for - membership in the keep hash. If it isn't found, add - it to to-remove." + "Given a directory, check it and its subdirectories for + membership in the keep hash. If it isn't found, add + it to to-remove." (let ((files (directory-files d)) file) (while (setq file (pop files)) @@ -3389,7 +3389,7 @@ articles in every agentized group.")) nil) ((equal file "..") ; Ignore parent nil) - ((equal file ".overview") + ((equal file ".overview") ;; Directory must contain .overview to be ;; agent's cache of a group. (let ((d (file-name-as-directory d)) @@ -3402,7 +3402,7 @@ articles in every agentized group.")) d (directory-file-name d))) ;; if ANY ancestor was NOT in keep hash and ;; it it's already in to-remove, add it to - ;; to-remove. + ;; to-remove. (if (and r (not (member r to-remove))) (push r to-remove)))) @@ -3854,7 +3854,7 @@ If REREAD is not nil, downloaded articles are marked as unread." (when regenerated (gnus-agent-save-alist group) - + ;; I have to alter the group's active range NOW as ;; gnus-make-ascending-articles-unread will use it to ;; recalculate the number of unread articles in the group diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 22d48c3eff0..0d0da23ea58 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -213,7 +213,7 @@ By default, if you set this t, then Gnus will display citations and signatures, but will never scroll down to show you a page consisting only of boring text. Boring text is controlled by `gnus-article-boring-faces'." - :version "21.4" + :version "22.1" :type 'boolean :group 'gnus-article-hiding) @@ -318,7 +318,7 @@ advertisements. For example: (symbol :tag "Item in `gnus-article-banner-alist'" none) regexp (const :tag "None" nil)))) - :version "21.4" + :version "22.1" :group 'gnus-article-washing) (defmacro gnus-emphasis-custom-with-format (&rest body) @@ -806,7 +806,7 @@ If set, this variable overrides `gnus-unbuttonized-mime-types'. To see e.g. security buttons you could set this to `(\"multipart/signed\")'. This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil." - :version "21.4" + :version "22.1" :group 'gnus-article-mime :type '(repeat regexp)) @@ -815,14 +815,14 @@ This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil." When nil (the default value), then some MIME parts do not get buttons, as described by the variables `gnus-buttonized-mime-types' and `gnus-unbuttonized-mime-types'." - :version "21.4" + :version "22.1" :type 'boolean) (defcustom gnus-body-boundary-delimiter "_" "String used to delimit header and body. This variable is used by `gnus-article-treat-body-boundary' which can be controlled by `gnus-treat-body-boundary'." - :version "21.4" + :version "22.1" :group 'gnus-article-various :type '(choice (item :tag "None" :value nil) string)) @@ -831,7 +831,7 @@ be controlled by `gnus-treat-body-boundary'." "Defines the location of the faces database. For information on obtaining this database of pretty pictures, please see http://www.cs.indiana.edu/picons/ftp/index.html" - :version "21.4" + :version "22.1" :type '(repeat directory) :link '(url-link :tag "download" "http://www.cs.indiana.edu/picons/ftp/index.html") @@ -972,7 +972,7 @@ See Info node `(gnus)Customizing Articles' for details." "Remove carriage returns. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -981,7 +981,7 @@ See Info node `(gnus)Customizing Articles' for details." "Remove newlines from within URLs. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -990,7 +990,7 @@ See Info node `(gnus)Customizing Articles' for details." "Remove leading whitespace in headers. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -1110,7 +1110,7 @@ See Info node `(gnus)Customizing Articles' for details." "Display the Date in a format that can be read aloud in English. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-head-custom) @@ -1186,7 +1186,7 @@ See Info node `(gnus)Customizing Articles' for details." "Unfold folded header lines. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -1195,7 +1195,7 @@ See Info node `(gnus)Customizing Articles' for details." "Fold headers. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -1204,7 +1204,7 @@ See Info node `(gnus)Customizing Articles' for details." "Fold the Newsgroups and Followup-To headers. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -1270,7 +1270,7 @@ Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' and Info node `(gnus)X-Face' for details." :group 'gnus-article-treat - :version "21.4" + :version "22.1" :link '(custom-manual "(gnus)Customizing Articles") :link '(custom-manual "(gnus)X-Face") :type gnus-article-treat-head-custom) @@ -1301,7 +1301,7 @@ See Info node `(gnus)Customizing Articles' and Info node Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' and Info node `(gnus)Picons' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :group 'gnus-picon :link '(custom-manual "(gnus)Customizing Articles") @@ -1317,7 +1317,7 @@ See Info node `(gnus)Customizing Articles' and Info node Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' and Info node `(gnus)Picons' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :group 'gnus-picon :link '(custom-manual "(gnus)Customizing Articles") @@ -1333,7 +1333,7 @@ See Info node `(gnus)Customizing Articles' and Info node Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' and Info node `(gnus)Picons' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :group 'gnus-picon :link '(custom-manual "(gnus)Customizing Articles") @@ -1349,7 +1349,7 @@ See Info node `(gnus)Customizing Articles' and Info node "Draw a boundary at the end of the headers. Valid values are nil and `head'. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-head-custom) @@ -1367,7 +1367,7 @@ See Info node `(gnus)Customizing Articles' for details." "Format as HTML. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) @@ -1403,7 +1403,7 @@ See Info node `(gnus)Customizing Articles' for details." To automatically treat X-PGP-Sig, set it to head. Valid values are nil, t, `head', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles' for details." - :version "21.4" + :version "22.1" :group 'gnus-article-treat :group 'mime-security :link '(custom-manual "(gnus)Customizing Articles") @@ -1417,7 +1417,7 @@ See Info node `(gnus)Customizing Articles' for details." (defcustom gnus-article-encrypt-protocol "PGP" "The protocol used for encrypt articles. It is a string, such as \"PGP\". If nil, ask user." - :version "21.4" + :version "22.1" :type 'string :group 'mime-security) @@ -1429,13 +1429,13 @@ It is a string, such as \"PGP\". If nil, ask user." (executable-find idna-program)) "Whether IDNA decoding of headers is used when viewing messages. This requires GNU Libidn, and by default only enabled if it is found." - :version "21.4" + :version "22.1" :group 'gnus-article-headers :type 'boolean) (defcustom gnus-article-over-scroll nil "If non-nil, allow scrolling the article buffer even when there no more text." - :version "21.4" + :version "22.1" :group 'gnus-article :type 'boolean) @@ -4703,7 +4703,7 @@ If t, it overrides nil values of (defcustom gnus-mime-display-multipart-alternative-as-mixed nil "Display \"multipart/alternative\" parts as \"multipart/mixed\"." - :version "21.4" + :version "22.1" :group 'gnus-article-mime :type 'boolean) @@ -4713,7 +4713,7 @@ If t, it overrides nil values of If displaying \"text/html\" is discouraged \(see `mm-discouraged-alternatives'\) images or other material inside a \"multipart/related\" part might be overlooked when this variable is nil." - :version "21.4" + :version "22.1" :group 'gnus-article-mime :type 'boolean) @@ -5821,7 +5821,7 @@ groups." (defcustom gnus-button-valid-fqdn-regexp message-valid-fqdn-regexp "Regular expression that matches a valid FQDN." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type 'regexp) @@ -5829,7 +5829,7 @@ groups." "Function to use for displaying man pages. The function must take at least one argument with a string naming the man page." - :version "21.4" + :version "22.1" :type '(choice (function-item :tag "Man" manual-entry) (function-item :tag "Woman" woman) (function :tag "Other")) @@ -5840,7 +5840,7 @@ man page." If the default site is too slow, try to find a CTAN mirror, see <URL:http://tug.ctan.org/tex-archive/CTAN.sites?action=/index.html>. See also the variable `gnus-button-handle-ctan'." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :link '(custom-manual "(gnus)Group Parameters") :type '(choice (const "http://www.tex.ac.uk/tex-archive/") @@ -5851,14 +5851,14 @@ the variable `gnus-button-handle-ctan'." (defcustom gnus-button-ctan-handler 'browse-url "Function to use for displaying CTAN links. The function must take one argument, the string naming the URL." - :version "21.4" + :version "22.1" :type '(choice (function-item :tag "Browse Url" browse-url) (function :tag "Other")) :group 'gnus-article-buttons) (defcustom gnus-button-handle-ctan-bogus-regexp "^/?tex-archive/\\|^/" "Bogus strings removed from CTAN URLs." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type '(choice (const "^/?tex-archive/\\|/") (regexp :tag "Other"))) @@ -5872,7 +5872,7 @@ The function must take one argument, the string naming the URL." "\\)") "Regular expression for ctan directories. It should match all directories in the top level of `gnus-ctan-url'." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type 'regexp) @@ -5882,7 +5882,7 @@ It should match all directories in the top level of `gnus-ctan-url'." gnus-button-valid-fqdn-regexp ">?\\)\\b") "Regular expression that matches a message ID or a mail address." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type 'regexp) @@ -5894,7 +5894,7 @@ message ID or a mail address, respectively. If this variable is set to the symbol `ask', always query the user what do do. If it is a function, this function will be called with the string as it's only argument. The function must return `mid', `mail', `invalid' or `ask'." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type '(choice (function-item :tag "Heuristic function" gnus-button-mid-or-mail-heuristic) @@ -5958,7 +5958,7 @@ must return `mid', `mail', `invalid' or `ask'." A negative RATE indicates a message IDs, whereas a positive indicates a mail address. The REGEXP is processed with `case-fold-search' set to nil." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type '(repeat (cons (number :tag "Rate") (regexp :tag "Regexp")))) @@ -6143,7 +6143,7 @@ positives are possible. Note that you can set this variable local to specific groups. Setting it higher in TeX groups is probably a good idea. See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on how to set variables in specific groups." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :link '(custom-manual "(gnus)Group Parameters") :type 'integer) @@ -6155,7 +6155,7 @@ positives are possible. Note that you can set this variable local to specific groups. Setting it higher in Unix groups is probably a good idea. See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on how to set variables in specific groups." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :link '(custom-manual "(gnus)Group Parameters") :type 'integer) @@ -6167,7 +6167,7 @@ positives are possible. Note that you can set this variable local to specific groups. Setting it higher in Emacs or Gnus related groups is probably a good idea. See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on how to set variables in specific groups." - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :link '(custom-manual "(gnus)Group Parameters") :type 'integer) @@ -6177,7 +6177,7 @@ probably a good idea. See Info node `(gnus)Group Parameters' and the variable The higher the number, the more buttons will appear and the more false positives are possible." ;; mail addresses, MIDs, URLs for news, ... - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type 'integer) @@ -6186,7 +6186,7 @@ positives are possible." The higher the number, the more buttons will appear and the more false positives are possible." ;; stuff handled by `browse-url' or `gnus-button-embedded-url' - :version "21.4" + :version "22.1" :group 'gnus-article-buttons :type 'integer) @@ -6716,10 +6716,10 @@ specified by `gnus-button-alist'." (if (string-match "\\([^#]+\\)#?\\(.*\\)" url) (gnus-info-find-node (concat "(" - (gnus-url-unhex-string + (gnus-url-unhex-string (match-string 1 url)) ")" - (or (gnus-url-unhex-string + (or (gnus-url-unhex-string (match-string 2 url)) "Top"))) (error "Can't parse %s" url))) diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 5306f3b17bf..e60ea32e126 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -124,7 +124,7 @@ The text matching the first grouping will be used as a button." (defcustom gnus-cite-unsightly-citation-regexp "^-----Original Message-----\nFrom: \\(.+\n\\)+\n" "Regexp matching Microsoft-type rest-of-message citations." - :version "21.4" + :version "22.1" :group 'gnus-cite :type 'regexp) @@ -132,7 +132,7 @@ The text matching the first grouping will be used as a button." "Non-nil means don't regard lines beginning with \">From \" as cited text. Those lines may have been quoted by MTAs in order not to mix up with the envelope From line." - :version "21.4" + :version "22.1" :group 'gnus-cite :type 'boolean) @@ -143,7 +143,7 @@ the envelope From line." (defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face "Face used for attribution lines. It is merged with the face for the cited text belonging to the attribution." - :version "21.4" + :version "22.1" :group 'gnus-cite :type 'face) diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index 8a566e3e5d8..acf7670b0ed 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el @@ -41,7 +41,7 @@ ;;;###autoload (defgroup gnus-delay nil "Arrange for sending postings later." - :version "21.4" + :version "22.1" :group 'gnus) (defcustom gnus-delay-group "delayed" @@ -61,7 +61,7 @@ (defcustom gnus-delay-default-hour 8 "*If deadline is given as date, then assume this time of day." - :version "21.4" + :version "22.1" :type 'integer :group 'gnus-delay) diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index 7d2df362bbc..093f4bd7806 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el @@ -103,7 +103,7 @@ (defgroup gnus-diary nil "Utilities on top of the nndiary backend for Gnus." - :version "21.4") + :version "22.1") (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n" "*Summary line format for nndiary groups." diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index 82282e084f7..6ece8f1911c 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -34,13 +34,13 @@ (defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory) "*Directory where X-Face PBM files are stored." - :version "21.4" + :version "22.1" :group 'gnus-fun :type 'directory) (defcustom gnus-convert-pbm-to-x-face-command "pbmtoxbm %s | compface" "Command for converting a PBM to an X-Face." - :version "21.4" + :version "22.1" :group 'gnus-fun :type 'string) @@ -48,7 +48,7 @@ "Command for converting an image to an X-Face. By default it takes a GIF filename and output the X-Face header data on stdout." - :version "21.4" + :version "22.1" :group 'gnus-fun :type 'string) @@ -56,7 +56,7 @@ on stdout." "Command for converting an image to an Face. By default it takes a JPEG filename and output the Face header data on stdout." - :version "21.4" + :version "22.1" :group 'gnus-fun :type 'string) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 336b635a6a0..2d6137c0bb5 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -435,7 +435,7 @@ For example: If non-nil, the value should be a string, e.g. \"nnml:\", in which case `gnus-group-jump-to-group' offers \"Group: nnml:\" in the minibuffer prompt." - :version "21.4" + :version "22.1" :group 'gnus-group-various :type '(choice (string :tag "Prompt string") (const :tag "Empty" nil))) @@ -1965,14 +1965,14 @@ Same as `gnus-large-newsgroup', but only used for ephemeral newsgroups. If the number of articles in a newsgroup is greater than this value, confirmation is required for selecting the newsgroup. If it is nil, no confirmation is required." - :version "21.4" + :version "22.1" :group 'gnus-group-select :type '(choice (const :tag "No limit" nil) integer)) (defcustom gnus-fetch-old-ephemeral-headers nil "Same as `gnus-fetch-old-headers', but only used for ephemeral newsgroups." - :version "21.4" + :version "22.1" :group 'gnus-thread :type '(choice (const :tag "off" nil) (const some) diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 7382fa7a090..32ea9919e86 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -47,7 +47,7 @@ If the server is covered by Gnus agent, the possible values are `denied', set the server denied; `offline', set the server offline; nil, ask user. If the server is not covered by Gnus agent, set the server denied." - :version "21.4" + :version "22.1" :group 'gnus-start :type '(choice (const :tag "Ask" nil) (const :tag "Deny server" denied) @@ -573,7 +573,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned." (gnus-agent-method-p gnus-command-method)) (gnus-agent-unfetch-articles group (list article))) result)) - + (defun gnus-request-accept-article (group &optional gnus-command-method last no-encode) ;; Make sure there's a newline at the end of the article. @@ -596,8 +596,8 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned." (message-encode-message-body))) (let ((gnus-command-method (or gnus-command-method (gnus-find-method-for-group group))) - (result - (funcall + (result + (funcall (gnus-get-function gnus-command-method 'request-accept-article) (if (stringp group) (gnus-group-real-name group) group) (cadr gnus-command-method) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 7948efc2572..65b3d78aca3 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -142,7 +142,7 @@ See Info node `(gnus)Posting Styles'." (defcustom gnus-gcc-mark-as-read nil "If non-nil, automatically mark Gcc articles as read." - :version "21.4" + :version "22.1" :group 'gnus-message :type 'boolean) @@ -154,7 +154,7 @@ See Info node `(gnus)Posting Styles'." If it is `all', attach files as external parts; if a regexp and matches the Gcc group name, attach files as external parts; if nil, attach files as normal parts." - :version "21.4" + :version "22.1" :group 'gnus-message :type '(choice (const nil :tag "None") (const all :tag "Any") @@ -212,7 +212,7 @@ List of charsets that are permitted to be unencoded.") "gnus-agent.el" "gnus-cache.el" "gnus-srvr.el" "mm-util.el" "mm-decode.el" "nnmail.el" "message.el") "Files whose variables will be reported in `gnus-bug'." - :version "21.4" + :version "22.1" :group 'gnus-message :type '(repeat (string :tag "File"))) @@ -220,7 +220,7 @@ List of charsets that are permitted to be unencoded.") '(mm-mime-mule-charset-alist nnmail-split-fancy message-minibuffer-local-map) "Variables that should not be reported in `gnus-bug'." - :version "21.4" + :version "22.1" :group 'gnus-message :type '(repeat (symbol :tag "Variable"))) @@ -228,7 +228,7 @@ List of charsets that are permitted to be unencoded.") '(nndraft nnml nnimap nnmaildir nnmh nnfolder nndir) "A list of back ends that are not used in \"real\" newsgroups. This variable is used only when `gnus-post-method' is `current'." - :version "21.4" + :version "22.1" :group 'gnus-group-foreign :type '(repeat (symbol :tag "Back end"))) @@ -260,7 +260,7 @@ This can also be a function receiving the group name as the only parameter which should return non-nil iff a confirmation is needed, or a regexp, in which case a confirmation is asked for iff the group name matches the regexp." - :version "21.4" + :version "22.1" :group 'gnus-message :type '(choice (const :tag "No" nil) (const :tag "Yes" t) @@ -273,7 +273,7 @@ matches the regexp." when replying by mail. See the `gnus-confirm-mail-reply-to-news' variable for fine-tuning this. If nil, Gnus will never ask for confirmation if replying to mail." - :version "21.4" + :version "22.1" :group 'gnus-message :type 'boolean) @@ -281,7 +281,7 @@ If nil, Gnus will never ask for confirmation if replying to mail." "If non-nil, Gnus tries to suggest a default address to resend to. If nil, the address field will always be empty after invoking `gnus-summary-resend-message'." - :version "21.4" + :version "22.1" :group 'gnus-message :type 'boolean) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 71e98a236bd..0971fea5485 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -66,7 +66,7 @@ (defgroup gnus-registry nil "The Gnus registry." - :version "21.4" + :version "22.1" :group 'gnus) (defvar gnus-registry-hashtb nil @@ -99,7 +99,7 @@ Registry entries are considered empty when they have no groups." The Subject and Sender (From:) headers are currently tracked this way." :group 'gnus-registry - :type + :type '(set :tag "Tracking choices" (const :tag "Track by subject (Subject: header)" subject) (const :tag "Track by sender (From: header)" sender))) @@ -188,12 +188,12 @@ way." "%s#tmp#%d")) working-dir (setq i (1+ i)))) (file-exists-p working-file))) - + (unwind-protect (progn (gnus-with-output-to-file working-file (gnus-gnus-to-quick-newsrc-format t "gnus registry startup file" 'gnus-registry-alist)) - + ;; These bindings will mislead the current buffer ;; into thinking that it is visiting the startup ;; file. @@ -203,14 +203,14 @@ way." (setmodes (file-modes startup-file))) ;; Backup the current version of the startup file. (backup-buffer) - + ;; Replace the existing startup file with the temp file. (rename-file working-file startup-file t) (set-file-modes startup-file setmodes))) (condition-case nil (delete-file working-file) (file-error nil))))) - + (gnus-kill-buffer (current-buffer)) (gnus-message 5 "Saving %s...done" file)))) @@ -238,10 +238,10 @@ way." (remhash key gnus-registry-hashtb))) gnus-registry-hashtb) ;; remove empty entries - (when gnus-registry-clean-empty + (when gnus-registry-clean-empty (gnus-registry-clean-empty-function)) ;; now trim the registry appropriately - (setq gnus-registry-alist (gnus-registry-trim + (setq gnus-registry-alist (gnus-registry-trim (hashtable-to-alist gnus-registry-hashtb))) ;; really save (gnus-registry-cache-save) @@ -283,15 +283,15 @@ way." (setq alist (nthcdr trim-length - (sort alist + (sort alist (lambda (a b) - (time-less-p + (time-less-p (cdr (gethash (car a) timehash)) (cdr (gethash (car b) timehash)))))))))) (defun alist-to-hashtable (alist) "Build a hashtable from the values in ALIST." - (let ((ht (make-hash-table + (let ((ht (make-hash-table :size 4096 :test 'equal))) (mapc @@ -311,7 +311,7 @@ way." (defun gnus-registry-action (action data-header from &optional to method) (let* ((id (mail-header-id data-header)) - (subject (gnus-registry-simplify-subject + (subject (gnus-registry-simplify-subject (mail-header-subject data-header))) (sender (mail-header-from data-header)) (from (gnus-group-guess-full-name-from-command-method from)) @@ -327,7 +327,7 @@ way." ;; All except copy will need a delete (gnus-registry-delete-group id from) - (when (equal 'copy action) + (when (equal 'copy action) (gnus-registry-add-group id from subject sender)) ; undo the delete (gnus-registry-add-group id to subject sender))) @@ -347,7 +347,7 @@ way." "Split this message into the same group as its parent. The parent is obtained from the registry. This function can be used as an entry in `nnmail-split-fancy' or `nnimap-split-fancy', for example like -this: (: gnus-registry-split-fancy-with-parent) +this: (: gnus-registry-split-fancy-with-parent) For a message to be split, it looks for the parent message in the References or In-Reply-To header and then looks in the registry to @@ -369,7 +369,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (when (or (gnus-registry-grep-in-list res gnus-registry-unfollowed-groups) - (gnus-registry-grep-in-list + (gnus-registry-grep-in-list res nnmail-split-fancy-with-parent-ignore-groups)) (setq res nil))) @@ -385,7 +385,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." sender) (maphash (lambda (key value) - (let ((this-sender (cdr + (let ((this-sender (cdr (gnus-registry-fetch-extra key 'sender)))) (when (and single-match this-sender @@ -408,7 +408,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (< gnus-registry-minimum-subject-length (length subject))) (maphash (lambda (key value) - (let ((this-subject (cdr + (let ((this-subject (cdr (gnus-registry-fetch-extra key 'subject)))) (when (and single-match this-subject @@ -432,26 +432,26 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." refstr) (setq res nil)))) (gnus-message - 5 + 5 "gnus-registry-split-fancy-with-parent traced %s to group %s" refstr (if res res "nil")) (when (and res gnus-registry-use-long-group-names) (let ((m1 (gnus-find-method-for-group res)) - (m2 (or gnus-command-method + (m2 (or gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name))) (short-res (gnus-group-short-name res))) (if (gnus-methods-equal-p m1 m2) (progn (gnus-message - 9 + 9 "gnus-registry-split-fancy-with-parent stripped group %s to %s" res short-res) (setq res short-res)) ;; else... (gnus-message - 5 + 5 "gnus-registry-split-fancy-with-parent ignored foreign group %s" res) (setq res nil)))) @@ -463,9 +463,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (dolist (article gnus-newsgroup-articles) (let ((id (gnus-registry-fetch-message-id-fast article))) (unless (gnus-registry-fetch-group id) - (gnus-message 9 "Registry: Registering article %d with group %s" + (gnus-message 9 "Registry: Registering article %d with group %s" article gnus-newsgroup-name) - (gnus-registry-add-group + (gnus-registry-add-group (gnus-registry-fetch-message-id-fast article) gnus-newsgroup-name (gnus-registry-fetch-simplified-message-subject-fast article) @@ -504,7 +504,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (when word (memq nil (mapcar 'not - (mapcar + (mapcar (lambda (x) (string-match x word)) list))))) @@ -540,7 +540,7 @@ Update the entry cache if needed." ;; get the entree from the hash table or from the alist (setq entree (gethash id entry-cache))) - + (unless entree (setq entree (assq entry alist)) (when gnus-registry-entry-caching @@ -581,8 +581,8 @@ Returns the first place where the trail finds a group name." (let ((trail (gethash id gnus-registry-hashtb))) (dolist (crumb trail) (when (stringp crumb) - (return (if gnus-registry-use-long-group-names - crumb + (return (if gnus-registry-use-long-group-names + crumb (gnus-group-short-name crumb)))))))) (defun gnus-registry-group-count (id) @@ -624,8 +624,8 @@ Returns the first place where the trail finds a group name." (when (and id (not (string-match "totally-fudged-out-message-id" id))) (let ((full-group group) - (group (if gnus-registry-use-long-group-names - group + (group (if gnus-registry-use-long-group-names + group (gnus-group-short-name group)))) (gnus-registry-delete-group id group) @@ -641,16 +641,16 @@ Returns the first place where the trail finds a group name." (when (and (gnus-registry-track-subject-p) subject) (gnus-registry-store-extra-entry - id - 'subject + id + 'subject (gnus-registry-simplify-subject subject))) (when (and (gnus-registry-track-sender-p) sender) (gnus-registry-store-extra-entry - id + id 'sender sender)) - + (gnus-registry-store-extra-entry id 'mtime (current-time))))))) (defun gnus-registry-clear () @@ -671,11 +671,11 @@ Returns the first place where the trail finds a group name." (defun gnus-registry-install-hooks () "Install the registry hooks." (interactive) - (add-hook 'gnus-summary-article-move-hook 'gnus-registry-action) + (add-hook 'gnus-summary-article-move-hook 'gnus-registry-action) (add-hook 'gnus-summary-article-delete-hook 'gnus-registry-action) (add-hook 'gnus-summary-article-expire-hook 'gnus-registry-action) (add-hook 'nnmail-spool-hook 'gnus-registry-spool-action) - + (add-hook 'gnus-save-newsrc-hook 'gnus-registry-save) (add-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read) @@ -684,11 +684,11 @@ Returns the first place where the trail finds a group name." (defun gnus-registry-unload-hook () "Uninstall the registry hooks." (interactive) - (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action) + (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action) (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action) (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action) (remove-hook 'nnmail-spool-hook 'gnus-registry-spool-action) - + (remove-hook 'gnus-save-newsrc-hook 'gnus-registry-save) (remove-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 21e59e4dbf3..3a22f9030e5 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -237,7 +237,7 @@ This variable allows the same syntax as `gnus-home-score-file'." (defcustom gnus-adaptive-word-length-limit nil "*Words of a length lesser than this limit will be ignored when doing adaptive scoring." - :version "21.4" + :version "22.1" :group 'gnus-score-adapt :type '(radio (const :format "Unlimited " nil) (integer :format "Maximum length: %v"))) diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index 9eeedf40cae..ff924139672 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -32,14 +32,14 @@ (defcustom gnus-use-correct-string-widths (featurep 'xemacs) "*If non-nil, use correct functions for dealing with wide characters." - :version "21.4" + :version "22.1" :group 'gnus-format :type 'boolean) (defcustom gnus-make-format-preserve-properties (featurep 'xemacs) "*If non-nil, use a replacement `format' function which preserves text properties. This is only needed on XEmacs, as FSF Emacs does this anyway." - :version "21.4" + :version "22.1" :group 'gnus-format :type 'boolean) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index d42c5d71cfd..e8c7d354145 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -71,7 +71,7 @@ See Info node `(gnus)Formatting Variables'." (defcustom gnus-server-browse-in-group-buffer nil "Whether server browsing should take place in the group buffer. If nil, a faster, but more primitive, buffer is used instead." - :version "21.4" + :version "22.1" :group 'gnus-server-visual :type 'boolean) @@ -205,31 +205,31 @@ If nil, a faster, but more primitive, buffer is used instead." (defcustom gnus-server-agent-face 'gnus-server-agent-face "Face name to use on AGENTIZED servers." - :version "21.4" + :version "22.1" :group 'gnus-server-visual :type 'face) (defcustom gnus-server-opened-face 'gnus-server-opened-face "Face name to use on OPENED servers." - :version "21.4" + :version "22.1" :group 'gnus-server-visual :type 'face) (defcustom gnus-server-closed-face 'gnus-server-closed-face "Face name to use on CLOSED servers." - :version "21.4" + :version "22.1" :group 'gnus-server-visual :type 'face) (defcustom gnus-server-denied-face 'gnus-server-denied-face "Face name to use on DENIED servers." - :version "21.4" + :version "22.1" :group 'gnus-server-visual :type 'face) (defcustom gnus-server-offline-face 'gnus-server-offline-face "Face name to use on OFFLINE servers." - :version "21.4" + :version "22.1" :group 'gnus-server-visual :type 'face) @@ -736,10 +736,10 @@ gnus-method-to-server." (if (eq (car method) 'nntp) (while (not (eobp)) (ignore-errors - (push (cons - (buffer-substring + (push (cons + (buffer-substring (point) - (progn + (progn (skip-chars-forward "^ \t") (point))) (let ((last (read cur))) @@ -903,7 +903,7 @@ buffer. (beginning-of-line) (let ((name (get-text-property (point) 'gnus-group))) (when (re-search-forward ": \\(.*\\)$" (gnus-point-at-eol) t) - (concat (gnus-method-to-server-name gnus-browse-current-method) ":" + (concat (gnus-method-to-server-name gnus-browse-current-method) ":" (or name (match-string-no-properties 1))))))) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index c1c79033267..31c4865b243 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -37,7 +37,7 @@ (autoload 'gnus-agent-save-local "gnus-agent") (autoload 'gnus-agent-possibly-alter-active "gnus-agent") -(eval-when-compile +(eval-when-compile (require 'cl) (defvar gnus-agent-covered-methods nil) @@ -54,7 +54,7 @@ "Whether to create backup files. This variable takes the same values as the `version-control' variable." - :version "21.4" + :version "22.1" :group 'gnus-start :type '(choice (const :tag "Never" never) (const :tag "If existing" nil) @@ -65,7 +65,7 @@ variable." the buffer or write directly to the file. The buffer is faster because all of the contents are written at once. The direct write uses considerably less memory." - :version "21.4" + :version "22.1" :group 'gnus-start :type '(choice (const :tag "Write via buffer" t) (const :tag "Write directly to file" nil))) @@ -299,7 +299,7 @@ claim them." (defcustom gnus-subscribe-newsgroup-hooks nil "*Hooks run after you subscribe to a new group. The hooks will be called with new group's name as argument." - :version "21.4" + :version "22.1" :group 'gnus-group-new :type 'hook) @@ -406,7 +406,7 @@ This hook is called as the first thing when Gnus is started." (defcustom gnus-get-top-new-news-hook nil "A hook run just before Gnus checks for new news globally." - :version "21.4" + :version "22.1" :group 'gnus-group-new :type 'hook) @@ -1908,7 +1908,7 @@ If SCAN, request a scan of that group as well." (setcdr range (1- article)) (setq modified t) ranges)))))))) - + (when modified (when (eq modified 'remove-null) (setq r (delq nil r))) @@ -2309,7 +2309,7 @@ If FORCE is non-nil, the .newsrc file is read." t))))) (funcall func convert-to))) - (gnus-dribble-enter + (gnus-dribble-enter (format ";Converted gnus from version '%s' to '%s'." gnus-newsrc-file-version gnus-version))))))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 1f6f5437841..1e7e962e32c 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -119,7 +119,7 @@ given by the `gnus-summary-same-subject' variable.)" (defcustom gnus-summary-make-false-root-always nil "Always make a false dummy root." - :version "21.4" + :version "22.1" :group 'gnus-thread :type 'boolean) @@ -220,7 +220,7 @@ If this variable is nil, scoring will be disabled." "*Default threshold for a high scored article. An article will be highlighted as high scored if its score is greater than this score." - :version "21.4" + :version "22.1" :group 'gnus-score-default :type 'integer) @@ -228,7 +228,7 @@ than this score." "*Default threshold for a low scored article. An article will be highlighted as low scored if its score is smaller than this score." - :version "21.4" + :version "22.1" :group 'gnus-score-default :type 'integer) @@ -324,7 +324,7 @@ the first unseen article), 'unseen-or-unread' (place point on the subject line of the first unseen article or, if all article have been seen, on the subject line of the first unread article), or a function to be called to place point on some subject line." - :version "21.4" + :version "22.1" :group 'gnus-group-select :type '(choice (const best) (const unread) @@ -368,7 +368,7 @@ ignores articles whose headers have not been fetched). NOTE: The list of unfetched articles will always be nil when plugged and, when unplugged, a subset of the undownloaded article list." - :version "21.4" + :version "22.1" :group 'gnus-summary-maneuvering :type '(choice (const :tag "None" nil) (const :tag "Undownloaded when unplugged" undownloaded) @@ -469,7 +469,7 @@ this variable specifies group names." (defcustom gnus-spam-mark ?$ "*Mark used for spam articles." - :version "21.4" + :version "22.1" :group 'gnus-summary-marks :type 'character) @@ -500,13 +500,13 @@ this variable specifies group names." (defcustom gnus-forwarded-mark ?F "*Mark used for articles that have been forwarded." - :version "21.4" + :version "22.1" :group 'gnus-summary-marks :type 'character) (defcustom gnus-recent-mark ?N "*Mark used for articles that are recent." - :version "21.4" + :version "22.1" :group 'gnus-summary-marks :type 'character) @@ -522,13 +522,13 @@ this variable specifies group names." (defcustom gnus-unseen-mark ?. "*Mark used for articles that haven't been seen." - :version "21.4" + :version "22.1" :group 'gnus-summary-marks :type 'character) (defcustom gnus-no-mark ? ;Whitespace "*Mark used for articles that have no other secondary mark." - :version "21.4" + :version "22.1" :group 'gnus-summary-marks :type 'character) @@ -554,7 +554,7 @@ this variable specifies group names." (defcustom gnus-undownloaded-mark ?- "*Mark used for articles that weren't downloaded." - :version "21.4" + :version "22.1" :group 'gnus-summary-marks :type 'character) @@ -893,19 +893,19 @@ automatically when it is selected." (defcustom gnus-summary-article-move-hook nil "*A hook called after an article is moved, copied, respooled, or crossposted." - :version "21.4" + :version "22.1" :group 'gnus-summary :type 'hook) (defcustom gnus-summary-article-delete-hook nil "*A hook called after an article is deleted." - :version "21.4" + :version "22.1" :group 'gnus-summary :type 'hook) (defcustom gnus-summary-article-expire-hook nil "*A hook called after an article is expired." - :version "21.4" + :version "22.1" :group 'gnus-summary :type 'hook) @@ -913,7 +913,7 @@ automatically when it is selected." (and (fboundp 'display-graphic-p) (display-graphic-p)) "*If non-nil, display an arrow highlighting the current article." - :version "21.4" + :version "22.1" :group 'gnus-summary :type 'boolean) @@ -1091,13 +1091,13 @@ type of files to save." This is mostly relevant for slow back ends where the user may wish to widen the summary buffer to include all headers that were fetched. Say, for nnultimate groups." - :version "21.4" + :version "22.1" :group 'gnus-summary :type '(choice boolean regexp)) (defcustom gnus-summary-muttprint-program "muttprint" "Command (and optional arguments) used to run Muttprint." - :version "21.4" + :version "22.1" :group 'gnus-summary :type 'string) @@ -1107,7 +1107,7 @@ Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not supply the MIME-Version header or deliberately strip it from the mail. Set it to non-nil, Gnus will treat some articles as MIME even if the MIME-Version header is missed." - :version "21.4" + :version "22.1" :type 'boolean :group 'gnus-article-mime) @@ -1116,7 +1116,7 @@ the MIME-Version header is missed." This means that Gnus will search message bodies for text that look like uuencoded bits, yEncoded bits, and so on, and present that using the normal Gnus MIME machinery." - :version "21.4" + :version "22.1" :type 'boolean :group 'gnus-article-mime) @@ -4639,39 +4639,39 @@ Unscored articles will be counted as having a score of zero." (defcustom gnus-sum-thread-tree-root "> " "With %B spec, used for the root of a thread. If nil, use subject instead." - :version "21.4" + :version "22.1" :type '(radio (const :format "%v " nil) string) :group 'gnus-thread) (defcustom gnus-sum-thread-tree-false-root "> " "With %B spec, used for a false root of a thread. If nil, use subject instead." - :version "21.4" + :version "22.1" :type '(radio (const :format "%v " nil) string) :group 'gnus-thread) (defcustom gnus-sum-thread-tree-single-indent "" "With %B spec, used for a thread with just one message. If nil, use subject instead." - :version "21.4" + :version "22.1" :type '(radio (const :format "%v " nil) string) :group 'gnus-thread) (defcustom gnus-sum-thread-tree-vertical "| " "With %B spec, used for drawing a vertical line." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-thread) (defcustom gnus-sum-thread-tree-indent " " "With %B spec, used for indenting." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-thread) (defcustom gnus-sum-thread-tree-leaf-with-other "+-> " "With %B spec, used for a leaf with brothers." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-thread) (defcustom gnus-sum-thread-tree-single-leaf "\\-> " "With %B spec, used for a leaf without brothers." - :version "21.4" + :version "22.1" :type 'string :group 'gnus-thread) @@ -9182,7 +9182,7 @@ If nil, use to the current newsgroup method." "If non-nil, show and update the summary buffer as it's being built. If the value is t, update the buffer after every line is inserted. If the value is an integer (N), update the display every N lines." - :version "21.4" + :version "22.1" :group 'gnus-thread :type '(choice (const :tag "off" nil) number diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 91e087f05d5..237e0507775 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1125,7 +1125,7 @@ Return the modified alist." (standard-output (lambda (c) (aset ,buffer ,leng c) - + (if (= ,size (setq ,leng (1+ ,leng))) (progn (write-region ,buffer nil ,file ,append 'no-msg) (setq ,leng 0 @@ -1194,7 +1194,7 @@ Return the modified alist." Setting it to nil has no effect after the first time `gnus-byte-compile' is run." :type 'boolean - :version "21.4" + :version "22.1" :group 'gnus-various) (defun gnus-byte-compile (form) @@ -1560,8 +1560,8 @@ empty directories from OLD-PATH." (setq temp (cdr temp))) (= (length temp) 0)) (delete-directory old-dir) - (setq old-dir (file-name-as-directory - (file-truename + (setq old-dir (file-name-as-directory + (file-truename (concat old-dir ".."))))))))) diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index 554c9dc3437..43fe77267c2 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -62,7 +62,7 @@ "*If non-nil, frames on all displays will be considered useable by Gnus. When nil, only frames on the same display as the selected frame will be used to display Gnus windows." - :version "21.4" + :version "22.1" :group 'gnus-windows :type 'boolean) @@ -199,7 +199,7 @@ See the Gnus manual for an explanation of the syntax used.") (defcustom gnus-configure-windows-hook nil "*A hook called when configuring windows." - :version "21.4" + :version "22.1" :group 'gnus-windows :type 'hook) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index c8dc878eacd..674c8d2c0ad 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -964,7 +964,7 @@ For example: (\"mail\\\\.me\" (gnus-use-scoring t)) (\"list\\\\..*\" (total-expire . t) (broken-reply-to . t)))" - :version "21.4" + :version "22.1" :group 'gnus-group-various :type '(repeat (cons regexp (repeat sexp)))) @@ -1314,7 +1314,7 @@ If the default site is too slow, try one of these: (gnus-replace-in-string name "\\." "-") "-charter.html"))) "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter. When FORM is evaluated `name' is bound to the name of the group." - :version "21.4" + :version "22.1" :group 'gnus-group-various :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form")))) @@ -1322,7 +1322,7 @@ When FORM is evaluated `name' is bound to the name of the group." "*Non-nil means that control messages are displayed using `browse-url'. Otherwise they are fetched with ange-ftp and displayed in an ephemeral group." - :version "21.4" + :version "22.1" :group 'gnus-group-various :type 'boolean) @@ -1781,7 +1781,7 @@ total number of articles in the group.") (list (regexp :tag "Group Name Regular Expression") (boolean :tag "Ignored"))) - + :parameter-type '(boolean :tag "Group Ignored by the Registry") :parameter-document "Whether the Gnus Registry should ignore this group.") @@ -1790,7 +1790,7 @@ total number of articles in the group.") (defcustom gnus-install-group-spam-parameters t "*Disable the group parameters for spam detection. Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report." - :version "21.4" + :version "22.1" :type 'boolean :group 'gnus-start) @@ -1891,8 +1891,8 @@ Only applicable to non-spam (unclassified and ham) groups.") (gnus-define-group-parameter spam-process :type list - :parameter-type - '(choice + :parameter-type + '(choice :tag "Spam Summary Exit Processor" :value nil (list :tag "Spam Summary Exit Processor Choices" @@ -1933,11 +1933,11 @@ a backend on summary exit. If non-nil, this should be a list of group name regexps that should match all groups in which to do automatic spam processing, associated with the appropriate processor." :variable-group spam - :variable-type + :variable-type '(repeat :tag "Spam/Ham Processors" (list :tag "Spam Summary Exit Processor Choices" (regexp :tag "Group Regexp") - (set + (set :tag "Spam/Ham Summary Exit Processor" (variable-item gnus-group-spam-exit-processor-ifile) (variable-item gnus-group-spam-exit-processor-stat) @@ -1972,7 +1972,7 @@ spam processing, associated with the appropriate processor." (gnus-define-group-parameter spam-autodetect :type list - :parameter-type + :parameter-type '(boolean :tag "Spam autodetection") :function-document "Should spam be autodetected (with spam-split) in this group?" @@ -1983,7 +1983,7 @@ spam processing, associated with the appropriate processor." Only unseen articles will be examined, unless spam-autodetect-recheck-messages is set." :variable-group spam - :variable-type + :variable-type '(repeat :tag "Autodetection setting" (list @@ -1997,7 +1997,7 @@ spam-autodetect-recheck-messages is set.") (gnus-define-group-parameter spam-autodetect-methods :type list - :parameter-type + :parameter-type '(choice :tag "Spam autodetection-specific methods" (const none) (const default) @@ -2024,7 +2024,7 @@ Requires the spam-autodetect parameter. Only unseen articles will be examined, unless spam-autodetect-recheck-messages is set." :variable-group spam - :variable-type + :variable-type '(repeat :tag "Autodetection methods" (list @@ -2046,7 +2046,7 @@ set." (variable-item spam-use-bogofilter-headers) (variable-item spam-use-bogofilter))))) :parameter-document - "Spam autodetection methods. + "Spam autodetection methods. Requires the spam-autodetect parameter. Only unseen articles will be examined, unless spam-autodetect-recheck-messages is set.") @@ -2054,7 +2054,7 @@ set.") (gnus-define-group-parameter spam-process-destination :type list - :parameter-type + :parameter-type '(choice :tag "Destination for spam-processed articles at summary exit" (string :tag "Move to a group") (repeat :tag "Move to multiple groups" @@ -2072,7 +2072,7 @@ to do spam-processed article moving, associated with the destination group or nil for explicit expiration. This only makes sense for mail groups." :variable-group spam - :variable-type + :variable-type '(repeat :tag "Spam-processed articles destination" (list @@ -2085,11 +2085,11 @@ mail groups." (const :tag "Expire" nil)))) :parameter-document "Where spam-processed articles will go at summary exit.") - + (gnus-define-group-parameter ham-process-destination :type list - :parameter-type + :parameter-type '(choice :tag "Destination for ham articles at summary exit from a spam group" (string :tag "Move to a group") @@ -2109,7 +2109,7 @@ to do ham article moving, associated with the destination group or nil for explicit ignoring. This only makes sense for mail groups, and only works in spam groups." :variable-group spam - :variable-type + :variable-type '(repeat :tag "Ham articles destination" (list @@ -2296,7 +2296,7 @@ face." When set, Gnus will prefer using the locally stored content rather than re-fetching it from the server. You also need to enable `gnus-agent' for this to have any affect." - :version "21.4" + :version "22.1" :group 'gnus-agent :type 'boolean) @@ -2315,7 +2315,7 @@ covered by that variable." You may customize gnus-agent to disable its use. However, some back ends have started to use the agent as a client-side cache. Disabling the agent may result in noticeable loss of performance." - :version "21.4" + :version "22.1" :group 'gnus-agent :type 'boolean) @@ -2347,7 +2347,7 @@ It can be one of the symbols `gnus' \(show only Gnus version\), `emacs-gnus' `emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as `emacs-gnus' plus system type\) or a custom string. If you set it to a string, be sure to use a valid format, see RFC 2616." - :version "21.4" + :version "22.1" :group 'gnus-message :type '(choice (item :tag "Show Gnus and Emacs versions and system type" @@ -3331,7 +3331,7 @@ that that variable is buffer-local to the summary buffers." ;; gnus-server-method-cache so this only happens once, ;; if at all. (let (match) - (mapcar + (mapcar (lambda (info) (let ((info-method (gnus-info-method info))) (unless (stringp info-method) @@ -3992,10 +3992,10 @@ Allow completion over sensible values." (defun gnus-agent-method-p (method) "Say whether METHOD is covered by the agent." (or (eq (car gnus-agent-method-p-cache) method) - (setq gnus-agent-method-p-cache + (setq gnus-agent-method-p-cache (cons method - (member (if (stringp method) - method + (member (if (stringp method) + method (gnus-method-to-server method)) gnus-agent-covered-methods)))) (cdr gnus-agent-method-p-cache)) diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index d14c673e7b9..18a7cdd090d 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -228,7 +228,7 @@ pipe, or t or `pty' to use a pty. The value has no effect if the system has no ptys or if all ptys are busy: then a pipe is used in any case. The value takes effect when a IMAP server is opened, changing it after that has no effect." - :version "21.4" + :version "22.1" :group 'imap :type 'boolean) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 740f4c9c3a3..6ff642ac24b 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -236,7 +236,7 @@ See Info node `(gnus)Mail Source Specifiers'." "*Ignore errors when querying mail sources. If nil, the user will be prompted when an error occurs. If non-nil, the error will be ignored." - :version "21.4" + :version "22.1" :group 'mail-source :type 'boolean) @@ -284,7 +284,7 @@ files older than number of days." "*If non-nil, ask for for confirmation before deleting old incoming files. This variable only applies when `mail-source-delete-incoming' is a positive number." - :version "21.4" + :version "22.1" :group 'mail-source :type 'boolean) @@ -305,7 +305,7 @@ number." (defcustom mail-source-movemail-program nil "If non-nil, name of program for fetching new mail." - :version "21.4" + :version "22.1" :group 'mail-source :type '(choice (const nil) string)) @@ -512,7 +512,7 @@ Return the number of files that were found." (format "Mail source %s error (%s). Continue? " (if (memq ':password source) (let ((s (copy-sequence source))) - (setcar (cdr (memq ':password s)) + (setcar (cdr (memq ':password s)) "********") s) source) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index d88fd54b144..e30e9a6b123 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -135,7 +135,7 @@ mailbox format." (defcustom message-fcc-externalize-attachments nil "If non-nil, attachments are included as external parts in Fcc copies." - :version "21.4" + :version "22.1" :type 'boolean :group 'message-sending) @@ -175,7 +175,7 @@ Otherwise, most addresses look like `angles', but they look like (defcustom message-insert-canlock t "Whether to insert a Cancel-Lock header in news postings." - :version "21.4" + :version "22.1" :group 'message-headers :type 'boolean) @@ -204,7 +204,7 @@ Checks include `subject-cmsg', `multiple-headers', `sendsys', "*Headers to be generated or prompted for when sending a message. Also see `message-required-news-headers' and `message-required-mail-headers'." - :version "21.4" + :version "22.1" :group 'message-news :group 'message-headers :link '(custom-manual "(message)Message Headers") @@ -212,7 +212,7 @@ Also see `message-required-news-headers' and (defcustom message-draft-headers '(References From) "*Headers to be generated when saving a draft message." - :version "21.4" + :version "22.1" :group 'message-news :group 'message-headers :link '(custom-manual "(message)Message Headers") @@ -300,7 +300,7 @@ the user what do do. In this case, the subject is matched against `message-subject-trailing-was-query' is t, always strip the trailing old subject. In this case, `message-subject-trailing-was-regexp' is used." - :version "21.4" + :version "22.1" :type '(choice (const :tag "never" nil) (const :tag "always strip" t) (const ask)) @@ -317,7 +317,7 @@ the variable is t instead of `ask', use `message-subject-trailing-was-regexp' instead. It is okay to create some false positives here, as the user is asked." - :version "21.4" + :version "22.1" :group 'message-various :link '(custom-manual "(message)Message Headers") :type 'regexp) @@ -330,7 +330,7 @@ If `message-subject-trailing-was-query' is set to t, the subject is matched against `message-subject-trailing-was-regexp' in `message-strip-subject-trailing-was'. You should use a regexp creating very few false positives here." - :version "21.4" + :version "22.1" :group 'message-various :link '(custom-manual "(message)Message Headers") :type 'regexp) @@ -343,7 +343,7 @@ few false positives here." (defcustom message-mark-insert-begin "--8<---------------cut here---------------start------------->8---\n" "How to mark the beginning of some inserted text." - :version "21.4" + :version "22.1" :type 'string :link '(custom-manual "(message)Insertion Variables") :group 'message-various) @@ -352,7 +352,7 @@ few false positives here." (defcustom message-mark-insert-end "--8<---------------cut here---------------end--------------->8---\n" "How to mark the end of some inserted text." - :version "21.4" + :version "22.1" :type 'string :link '(custom-manual "(message)Insertion Variables") :group 'message-various) @@ -362,7 +362,7 @@ few false positives here." "X-No-Archive: Yes\n" "Header to insert when you don't want your article to be archived. Archives \(such as groups.google.com\) respect this header." - :version "21.4" + :version "22.1" :type 'string :link '(custom-manual "(message)Header Commands") :group 'message-various) @@ -372,7 +372,7 @@ Archives \(such as groups.google.com\) respect this header." "X-No-Archive: Yes - save http://groups.google.com/" "Note to insert why you wouldn't want this posting archived. If nil, don't insert any text in the body." - :version "21.4" + :version "22.1" :type '(radio string (const nil)) :link '(custom-manual "(message)Header Commands") :group 'message-various) @@ -391,7 +391,7 @@ If nil, don't insert any text in the body." If nil, `message-cross-post-followup-to' will only do a followup. Note that you can explicitly override this setting by calling `message-cross-post-followup-to' with a prefix." - :version "21.4" + :version "22.1" :type 'boolean :group 'message-various) @@ -399,7 +399,7 @@ you can explicitly override this setting by calling (defcustom message-cross-post-note "Crosspost & Followup-To: " "Note to insert before signature to notify of cross-post and follow-up." - :version "21.4" + :version "22.1" :type 'string :group 'message-various) @@ -407,7 +407,7 @@ you can explicitly override this setting by calling (defcustom message-followup-to-note "Followup-To: " "Note to insert before signature to notify of follow-up only." - :version "21.4" + :version "22.1" :type 'string :group 'message-various) @@ -418,7 +418,7 @@ you can explicitly override this setting by calling The function will be called with four arguments. The function should not only insert a note, but also ensure old notes are deleted. See the documentation for `message-cross-post-insert-note'." - :version "21.4" + :version "22.1" :type 'function :group 'message-various) @@ -586,7 +586,7 @@ Done before generating the new subject of a forward." non-word-constituents "]\\)+>+\\|[ \t]*[]>|}+]\\)+")))) "*Regexp matching the longest possible citation prefix on a line." - :version "21.4" + :version "22.1" :group 'message-insertion :link '(custom-manual "(message)Insertion Variables") :type 'regexp) @@ -671,7 +671,7 @@ always query the user whether to use the value. If it is the symbol If nil, always ignore the header. If it is the symbol `ask', always query the user whether to use the value. If it is the symbol `use', always use the value." - :version "21.4" + :version "22.1" :group 'message-interface :link '(custom-manual "(message)Mailing Lists") :type '(choice (const :tag "ignore" nil) @@ -685,7 +685,7 @@ If non-nil, this variable contains a list of functions which return regular expressions to match lists. These functions can be used in conjunction with `message-subscribed-regexps' and `message-subscribed-addresses'." - :version "21.4" + :version "22.1" :group 'message-interface :link '(custom-manual "(message)Mailing Lists") :type '(repeat sexp)) @@ -694,7 +694,7 @@ conjunction with `message-subscribed-regexps' and "*A file containing addresses the user is subscribed to. If nil, do not look at any files to determine list subscriptions. If non-nil, each line of this file should be a mailing list address." - :version "21.4" + :version "22.1" :group 'message-interface :link '(custom-manual "(message)Mailing Lists") :type '(radio file (const nil))) @@ -704,7 +704,7 @@ non-nil, each line of this file should be a mailing list address." If nil, do not use any predefined list subscriptions. This list of addresses can be used in conjunction with `message-subscribed-address-functions' and `message-subscribed-regexps'." - :version "21.4" + :version "22.1" :group 'message-interface :link '(custom-manual "(message)Mailing Lists") :type '(repeat string)) @@ -714,7 +714,7 @@ addresses can be used in conjunction with If nil, do not use any predefined list subscriptions. This list of regular expressions can be used in conjunction with `message-subscribed-address-functions' and `message-subscribed-addresses'." - :version "21.4" + :version "22.1" :group 'message-interface :link '(custom-manual "(message)Mailing Lists") :type '(repeat regexp)) @@ -724,7 +724,7 @@ regular expressions can be used in conjunction with If it is the symbol `always', the posting is allowed. If it is the symbol `never', the posting is not allowed. If it is the symbol `ask', you are prompted." - :version "21.4" + :version "22.1" :group 'message-interface :link '(custom-manual "(message)Message Headers") :type '(choice (const always) @@ -742,7 +742,7 @@ Doing so would be even more evil than leaving it out." "*Envelope-from when sending mail with sendmail. If this is nil, use `user-mail-address'. If it is the symbol `header', use the From: header of the message." - :version "21.4" + :version "22.1" :type '(choice (string :tag "From name") (const :tag "Use From: header from message" header) (const :tag "Use `user-mail-address'" nil)) @@ -856,7 +856,7 @@ the signature is inserted." (set-keymap-parent map minibuffer-local-map) map) "Keymap for `message-read-from-minibuffer'." - :version "21.4") + :version "22.1") ;;;###autoload (defcustom message-citation-line-function 'message-insert-citation-line @@ -883,7 +883,7 @@ See also `message-yank-cited-prefix'." "*Prefix inserted on cited or empty lines of yanked messages. Fix `message-cite-prefix-regexp' if it is set to an abnormal value. See also `message-yank-prefix'." - :version "21.4" + :version "22.1" :type 'string :link '(custom-manual "(message)Insertion Variables") :group 'message-insertion) @@ -940,7 +940,7 @@ If nil, don't insert a signature." ;;;###autoload (defcustom message-signature-insert-empty-line t "*If non-nil, insert an empty line before the signature separator." - :version "21.4" + :version "22.1" :type 'boolean :link '(custom-manual "(message)Insertion Variables") :group 'message-insertion) @@ -1121,7 +1121,7 @@ candidates: "Regexp of headers to be hidden when composing new messages. This can also be a list of regexps to match headers. Or a list starting with `not' and followed by regexps." - :version "21.4" + :version "22.1" :group 'message :link '(custom-manual "(message)Message Headers") :type '(repeat regexp)) @@ -1397,7 +1397,7 @@ subaddresses. So if the first address appears in the recipient list for a message, the subaddresses will be removed (if present) before the mail is sent. All addresses in this structure should be downcased." - :version "21.4" + :version "22.1" :group 'message-headers :type '(repeat (repeat string))) @@ -1405,7 +1405,7 @@ downcased." "Like `mail-user-agent'. Except if it is nil, use Gnus native MUA; if it is t, use `mail-user-agent'." - :version "21.4" + :version "22.1" :type '(radio (const :tag "Gnus native" :format "%t\n" nil) @@ -1429,14 +1429,14 @@ If this variable is non-nil, pose the question \"Reply to all recipients?\" before a wide reply to multiple recipients. If the user answers yes, reply to all recipients as usual. If the user answers no, only reply back to the author." - :version "21.4" + :version "22.1" :group 'message-headers :link '(custom-manual "(message)Wide Reply") :type 'boolean) (defcustom message-user-fqdn nil "*Domain part of Messsage-Ids." - :version "21.4" + :version "22.1" :group 'message-headers :link '(custom-manual "(message)News Headers") :type '(radio (const :format "%v " nil) @@ -1448,7 +1448,7 @@ no, only reply back to the author." (executable-find idna-program) 'ask) "Whether to encode non-ASCII in domain names into ASCII according to IDNA." - :version "21.4" + :version "22.1" :group 'message-headers :link '(custom-manual "(message)IDNA") :type '(choice (const :tag "Ask" ask) @@ -1574,7 +1574,7 @@ no, only reply back to the author." "\\)") "Regular expression that matches a valid FQDN." ;; see also: gnus-button-valid-fqdn-regexp - :version "21.4" + :version "22.1" :group 'message-headers :type 'regexp) @@ -2384,7 +2384,7 @@ these properties from the message composition buffer. However, some packages requires these properties to be present in order to work. If you use one of these packages, turn this option off, and hope the message composition doesn't break too bad." - :version "21.4" + :version "22.1" :group 'message-various :link '(custom-manual "(message)Various Message Variables") :type 'boolean) @@ -2731,7 +2731,7 @@ prefix FORCE is given." E.g., if this list contains a member list with elements `Cc' and `To', then `message-carefully-insert-headers' will not insert a `To' header when the message is already `Cc'ed to the recipient." - :version "21.4" + :version "22.1" :group 'message-headers :link '(custom-manual "(message)Message Headers") :type '(repeat sexp)) @@ -5176,10 +5176,10 @@ Headers already prepared in the buffer are not modified." If the current line has `message-yank-prefix', insert it on the new line." (interactive "*") (condition-case nil - (split-line message-yank-prefix) ;; Emacs 21.3.50+ supports arg. + (split-line message-yank-prefix) ;; Emacs 22.1+ supports arg. (error (split-line)))) - + (defun message-fill-header (header value) (let ((begin (point)) (fill-column 78) @@ -5281,7 +5281,7 @@ than 988 characters long, and if they are not, trim them until they are." (defcustom message-beginning-of-line t "Whether \\<message-mode-map>\\[message-beginning-of-line]\ goes to beginning of header values." - :version "21.4" + :version "22.1" :group 'message-buffers :link '(custom-manual "(message)Movement") :type 'boolean) @@ -6593,14 +6593,14 @@ which specify the range to operate on." '("^\\(Disposition-Notification-To\\|Return-Receipt-To\\):" . message-expand-name)) "Alist of (RE . FUN). Use FUN for completion on header lines matching RE." - :version "21.4" + :version "22.1" :group 'message :type '(alist :key-type regexp :value-type function)) (defcustom message-tab-body-function nil "*Function to execute when `message-tab' (TAB) is executed in the body. If nil, the function bound in `text-mode-map' or `global-map' is executed." - :version "21.4" + :version "22.1" :group 'message :link '(custom-manual "(message)Various Commands") :type 'function) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 569890b8097..579571e16aa 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -115,7 +115,7 @@ The defined renderer types are: `lynx' : use lynx; `html2text' : use html2text; nil : use external viewer." - :version "21.4" + :version "22.1" :type '(choice (const w3) (const w3m) (const w3m-standalone) @@ -134,7 +134,7 @@ It is suggested to customize `mm-text-html-renderer' instead.") "If non-nil, Gnus will allow retrieving images in HTML contents with the <img> tags. It has no effect on Emacs/w3. See also the documentation for the `mm-w3m-safe-url-regexp' variable." - :version "21.4" + :version "22.1" :type 'boolean :group 'mime-display) @@ -150,14 +150,14 @@ when displaying the image. The default value is \"\\\\`cid:\" which only matches parts embedded to the Multipart/Related type MIME contents and Gnus will never connect to the spammer's site arbitrarily. You may set this variable to nil if you consider all urls to be safe." - :version "21.4" + :version "22.1" :type '(choice (regexp :tag "Regexp") (const :tag "All URLs are safe" nil)) :group 'mime-display) (defcustom mm-inline-text-html-with-w3m-keymap t "If non-nil, use emacs-w3m command keys in the article buffer." - :version "21.4" + :version "22.1" :type 'boolean :group 'mime-display) @@ -167,7 +167,7 @@ set this variable to nil if you consider all urls to be safe." If t, all defined external MIME handlers are used. If nil, files are saved by `mailcap-save-binary-file'. If it is the symbol `ask', you are prompted before the external MIME handler is invoked." - :version "21.4" + :version "22.1" :type '(choice (const :tag "Always" t) (const :tag "Never" nil) (const :tag "Ask" ask)) @@ -283,7 +283,7 @@ type inline." "application/pdf" "application/x-dvi") "List of media types for which the external viewer will not be killed when selecting a different article." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'mime-display) @@ -380,13 +380,13 @@ If not set, `default-directory' will be used." (defcustom mm-attachment-file-modes 384 "Set the mode bits of saved attachments to this integer." - :version "21.4" + :version "22.1" :type 'integer :group 'mime-display) (defcustom mm-external-terminal-program "xterm" "The program to start an external terminal." - :version "21.4" + :version "22.1" :type 'string :group 'mime-display) @@ -419,7 +419,7 @@ If not set, `default-directory' will be used." "Option of verifying signed parts. `never', not verify; `always', always verify; `known', only verify known protocols. Otherwise, ask user." - :version "21.4" + :version "22.1" :type '(choice (item always) (item never) (item :tag "only known protocols" known) @@ -438,7 +438,7 @@ If not set, `default-directory' will be used." "Option of decrypting encrypted parts. `never', not decrypt; `always', always decrypt; `known', only decrypt known protocols. Otherwise, ask user." - :version "21.4" + :version "22.1" :type '(choice (item always) (item never) (item :tag "only known protocols" known) diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el index 1388371c981..29d956ba64f 100644 --- a/lisp/gnus/mm-url.el +++ b/lisp/gnus/mm-url.el @@ -49,7 +49,7 @@ (require 'url) (error nil))) "*If non-nil, use external grab program `mm-url-program'." - :version "21.4" + :version "22.1" :type 'boolean :group 'mm-url) @@ -68,7 +68,7 @@ (t "GET")) "The url grab program. Likely values are `wget', `w3m', `lynx' and `curl'." - :version "21.4" + :version "22.1" :type '(choice (symbol :tag "wget" wget) (symbol :tag "w3m" w3m) @@ -79,7 +79,7 @@ Likely values are `wget', `w3m', `lynx' and `curl'." (defcustom mm-url-arguments nil "The arguments for `mm-url-program'." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'mm-url) diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index b140cb76df5..5152d7138fb 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -80,7 +80,7 @@ This can be either \"inline\" or \"attachment\".") (defcustom mm-uu-diff-groups-regexp "gnus\\.commits" "*Regexp matching diff groups." - :version "21.4" + :version "22.1" :type 'regexp :group 'gnus-article-mime) diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el index 8bd2ed784ad..cdfc378bab3 100644 --- a/lisp/gnus/mml-sec.el +++ b/lisp/gnus/mml-sec.el @@ -43,7 +43,7 @@ (defcustom mml-default-sign-method "pgpmime" "Default sign method. The string must have an entry in `mml-sign-alist'." - :version "21.4" + :version "22.1" :type '(choice (const "smime") (const "pgp") (const "pgpauto") @@ -61,7 +61,7 @@ The string must have an entry in `mml-sign-alist'." (defcustom mml-default-encrypt-method "pgpmime" "Default encryption method. The string must have an entry in `mml-encrypt-alist'." - :version "21.4" + :version "22.1" :type '(choice (const "smime") (const "pgp") (const "pgpauto") @@ -85,7 +85,7 @@ Note that the output generated by using a `combined' mode is NOT understood by all PGP implementations, in particular PGP version 2 does not support it! See Info node `(message)Security' for details." - :version "21.4" + :version "22.1" :group 'message :type '(repeat (list (choice (const :tag "S/MIME" "smime") (const :tag "PGP" "pgp") diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index c4c4ccdbd81..010acc63a2b 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -44,7 +44,7 @@ '(name access-type expiration size permission format) "*A list of acceptable parameters in MML tag. These parameters are generated in Content-Type header if exists." - :version "21.4" + :version "22.1" :type '(repeat (symbol :tag "Parameter")) :group 'message) @@ -52,14 +52,14 @@ These parameters are generated in Content-Type header if exists." '(filename creation-date modification-date read-date) "*A list of acceptable parameters in MML tag. These parameters are generated in Content-Disposition header if exists." - :version "21.4" + :version "22.1" :type '(repeat (symbol :tag "Parameter")) :group 'message) (defcustom mml-insert-mime-headers-always nil "If non-nil, always put Content-Type: text/plain at top of empty parts. It is necessary to work against a bug in certain clients." - :version "21.4" + :version "22.1" :type 'boolean :group 'message) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index e083c2c9d9c..a0e47dd2f2c 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -83,7 +83,7 @@ ("TRUST_FULLY" . t) ("TRUST_ULTIMATE" . t)) "Map GnuPG trust output values to a boolean saying if you trust the key." - :version "21.4" + :version "22.1" :group 'mime-security :type '(repeat (cons (regexp :tag "GnuPG output regexp") (boolean :tag "Trust key")))) @@ -585,7 +585,7 @@ ;; set up a function to call the correct gpg encrypt routine ;; with the right arguments. (FIXME: this should be done ;; differently.) - (flet ((gpg-encrypt-func + (flet ((gpg-encrypt-func (sign plaintext ciphertext result recipients &optional passphrase sign-with-key armor textmode) (if sign @@ -656,7 +656,7 @@ (if (condition-case err (prog1 (pgg-decrypt-region (point-min) (point-max)) - (setq decrypt-status + (setq decrypt-status (with-current-buffer mml2015-result-buffer (buffer-string))) (mm-set-handle-multipart-parameter @@ -740,7 +740,7 @@ (mm-insert-part signature)) (if (condition-case err (prog1 - (pgg-verify-region (point-min) (point-max) + (pgg-verify-region (point-min) (point-max) signature-file t) (goto-char (point-min)) (while (search-forward "\r\n" nil t) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 13000a8ad19..de33cd156c6 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -223,7 +223,7 @@ (defgroup nndiary nil "The Gnus Diary backend." - :version "21.4" + :version "22.1" :group 'gnus-diary) (defcustom nndiary-mail-sources @@ -760,7 +760,7 @@ all. This may very well take some time.") (when (nndiary-schedule) (let (result) (when nnmail-cache-accepted-message-ids - (nnmail-cache-insert (nnmail-fetch-field "message-id") + (nnmail-cache-insert (nnmail-fetch-field "message-id") group (nnmail-fetch-field "subject"))) (if (stringp group) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 56272a1472b..c3afd6381ca 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -211,7 +211,7 @@ variable is the symbol `default' the default behaviour is used (which currently is nil, unless you use a statistical spam.el test); if this variable is another non-nil value bodies will be downloaded." - :version "21.4" + :version "22.1" :group 'nnimap :type '(choice (const :tag "Let system decide" deault) boolean)) @@ -223,7 +223,7 @@ will be downloaded." This means that errors caught by nnimap when closing the mailbox will not prevent Gnus from updating the group status, which may be harmful. However, it increases speed." - :version "21.4" + :version "22.1" :type 'boolean :group 'nnimap) @@ -232,7 +232,7 @@ However, it increases speed." This increases the speed of closing mailboxes (quiting group) but may decrease the speed of selecting another mailbox later. Re-selecting the same mailbox will be faster though." - :version "21.4" + :version "22.1" :type 'boolean :group 'nnimap) @@ -245,7 +245,7 @@ more carefully for new mail. In summary, the default is O((1-p)*k+p*n) and changing it to nil makes it O(n). If p is small, then the default is probably faster." - :version "21.4" + :version "22.1" :type 'boolean :group 'nnimap) @@ -826,7 +826,7 @@ function is generally only called when Gnus is shutting down." (defun nnimap-make-callback (article gnus-callback buffer) "Return a callback function." - `(lambda () + `(lambda () (nnimap-callback ,article ,gnus-callback ,buffer))) (defun nnimap-callback (article gnus-callback buffer) @@ -876,8 +876,8 @@ function is generally only called when Gnus is shutting down." (imap-error-text nnimap-server-buffer)) (cons group article))) (add-hook 'imap-fetch-data-hook - (nnimap-make-callback article - nnheader-callback-function + (nnimap-make-callback article + nnheader-callback-function nntp-server-buffer)) (imap-fetch-asynch article part nil nnimap-server-buffer) (cons group article)))))) @@ -930,7 +930,7 @@ function is generally only called when Gnus is shutting down." "Update the unseen count in `nnimap-mailbox-info'." (gnus-sethash (gnus-group-prefixed-name group server) - (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server) + (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server) nnimap-mailbox-info))) (list (nth 0 old) (nth 1 old) (imap-mailbox-status group 'unseen nnimap-server-buffer) @@ -1043,7 +1043,7 @@ function is generally only called when Gnus is shutting down." 'asyncgroups 'slowgroups) (list group (imap-mailbox-status-asynch - group '(uidvalidity uidnext unseen) + group '(uidvalidity uidnext unseen) nnimap-server-buffer)))) (dolist (asyncgroup asyncgroups) (let ((group (nth 0 asyncgroup)) @@ -1054,7 +1054,7 @@ function is generally only called when Gnus is shutting down." (nth 0 (gnus-gethash (gnus-group-prefixed-name group server) nnimap-mailbox-info)) - (imap-mailbox-get 'uidvalidity group + (imap-mailbox-get 'uidvalidity group nnimap-server-buffer))) (not (string= (nth 1 (gnus-gethash (gnus-group-prefixed-name @@ -1310,7 +1310,7 @@ function is generally only called when Gnus is shutting down." (let (msgid) (and (setq msgid (nnmail-fetch-field "message-id")) - (nnmail-cache-insert msgid + (nnmail-cache-insert msgid to-group (nnmail-fetch-field "subject")))))) ;; Add the group-art list to the history list. @@ -1418,12 +1418,12 @@ function is generally only called when Gnus is shutting down." nnmail-expiry-wait))) (cond ((or force (eq days 'immediate)) (let ((oldarts (imap-search - (concat "UID " + (concat "UID " (imap-range-to-message-set artseq))))) (when oldarts (nnimap-expiry-target oldarts group server) (when (imap-message-flags-add - (imap-range-to-message-set + (imap-range-to-message-set (gnus-compress-sequence oldarts)) "\\Deleted") (setq articles (gnus-set-difference articles oldarts)))))) @@ -1437,9 +1437,9 @@ function is generally only called when Gnus is shutting down." (when oldarts (nnimap-expiry-target oldarts group server) (when (imap-message-flags-add - (imap-range-to-message-set + (imap-range-to-message-set (gnus-compress-sequence oldarts)) "\\Deleted") - (setq articles (gnus-set-difference + (setq articles (gnus-set-difference articles oldarts))))))))))) ;; return articles not deleted articles) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 471a0f3aa21..c0689335f67 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -119,7 +119,7 @@ If nil, the first match found will be used." (defcustom nnmail-split-fancy-with-parent-ignore-groups nil "Regexp that matches group names to be ignored when applying `nnmail-split-fancy-with-parent'. This can also be a list of regexps." - :version "21.4" + :version "22.1" :group 'nnmail-split :type '(choice (const :tag "none" nil) (regexp :value ".*") @@ -128,7 +128,7 @@ This can also be a list of regexps." (defcustom nnmail-cache-ignore-groups nil "Regexp that matches group names to be ignored when inserting message ids into the cache (`nnmail-cache-insert'). This can also be a list of regexps." - :version "21.4" + :version "22.1" :group 'nnmail-split :type '(choice (const :tag "none" nil) (regexp :value ".*") @@ -226,7 +226,7 @@ From header will be expired to the group \"nnfolder:Work\"; articles containing the sting \"IMPORTANT\" in the Subject header will be expired to the group \"nnfolder:IMPORTANT.YYYY.MMM\"; and everything else will be expired to \"nnfolder:Archive-YYYY\"." - :version "21.4" + :version "22.1" :group 'nnmail-expire :type '(repeat (list (choice :tag "Match against" (string :tag "Header") @@ -355,7 +355,7 @@ discarded after running the split process." (defcustom nnmail-spool-hook nil "*A hook called when a new article is spooled." - :version "21.4" + :version "22.1" :group 'nnmail :type 'hook) @@ -370,14 +370,14 @@ messages will be shown to indicate the current status." (define-widget 'nnmail-lazy 'default "Base widget for recursive datastructures. -This is copy of the `lazy' widget in Emacs 21.4 provided for compatibility." +This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility." :format "%{%t%}: %v" :convert-widget 'widget-value-convert-widget :value-create (lambda (widget) (let ((value (widget-get widget :value)) (type (widget-get widget :type))) - (widget-put widget :children - (list (widget-create-child-value + (widget-put widget :children + (list (widget-create-child-value widget (widget-convert type) value))))) :value-delete 'widget-children-value-delete :value-get (lambda (widget) @@ -409,7 +409,7 @@ This is copy of the `lazy' widget in Emacs 21.4 provided for compatibility." (list :tag "Function with fixed arguments (:)" :value (: nil) (const :format "" :value :) - function + function (editable-list :inline t (sexp :tag "Arg")) ) (list :tag "Function with split arguments (!)" @@ -417,11 +417,11 @@ This is copy of the `lazy' widget in Emacs 21.4 provided for compatibility." (const :format "" !) function (editable-list :inline t nnmail-split-fancy)) - (list :tag "Field match" - (choice :tag "Field" + (list :tag "Field match" + (choice :tag "Field" regexp symbol) (choice :tag "Match" - regexp + regexp (symbol :value mail)) (repeat :inline t :tag "Restrictions" @@ -562,13 +562,13 @@ parameter. It should return nil, `warn' or `delete'." (defcustom nnmail-mail-splitting-charset nil "Default charset to be used when splitting incoming mail." - :version "21.4" + :version "22.1" :group 'nnmail :type 'symbol) (defcustom nnmail-mail-splitting-decodes nil "Whether the nnmail splitting functionality should MIME decode headers." - :version "21.4" + :version "22.1" :group 'nnmail :type 'boolean) @@ -578,7 +578,7 @@ Normally, regexes given in `nnmail-split-fancy' are implicitly surrounded by \"\\=\\<...\\>\". If this variable is true, they are not implicitly\ surrounded by anything." - :version "21.4" + :version "22.1" :group 'nnmail :type 'boolean) @@ -586,7 +586,7 @@ by anything." "Whether to lowercase expanded entries (i.e. \\N) when splitting mails. This avoids the creation of multiple groups when users send to an address using different case (i.e. mailing-list@domain vs Mailing-List@Domain)." - :version "21.4" + :version "22.1" :group 'nnmail :type 'boolean) @@ -1580,7 +1580,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." (when (stringp id) ;; this will handle cases like `B r' where the group is nil (let ((grp (or grp gnus-newsgroup-name "UNKNOWN"))) - (run-hook-with-args 'nnmail-spool-hook + (run-hook-with-args 'nnmail-spool-hook id grp subject sender)) (when nnmail-treat-duplicates ;; Store some information about the group this message is written @@ -1603,7 +1603,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." (unless (and regexp (string-match regexp grp)) (insert id "\t" grp "\n"))) (insert id "\n")))))) - + (defun nnmail-cache-primary-mail-backend () (let ((be-list (cons gnus-select-method gnus-secondary-select-methods)) (be nil) diff --git a/lisp/gnus/pgg-def.el b/lisp/gnus/pgg-def.el index 046f57dbbfe..ab82126f32e 100644 --- a/lisp/gnus/pgg-def.el +++ b/lisp/gnus/pgg-def.el @@ -30,7 +30,7 @@ (defgroup pgg () "Glue for the various PGP implementations." :group 'mime - :version "21.4") + :version "22.1") (defcustom pgg-default-scheme 'gpg "Default PGP scheme." @@ -51,7 +51,7 @@ (defcustom pgg-query-keyserver nil "Whether PGG queries keyservers for missing keys when verifying messages." - :version "21.4" + :version "22.1" :group 'pgg :type 'boolean) diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 4aa387f375f..b21b3dcd5ae 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -46,26 +46,26 @@ (getenv "LOGNAME") (getenv "USER")) "*POP3 maildrop." - :version "21.4" ;; Oort Gnus + :version "22.1" ;; Oort Gnus :type 'string :group 'pop3) (defcustom pop3-mailhost (or (getenv "MAILHOST") ;; nil -> mismatch "pop3") "*POP3 mailhost." - :version "21.4" ;; Oort Gnus + :version "22.1" ;; Oort Gnus :type 'string :group 'pop3) (defcustom pop3-port 110 "*POP3 port." - :version "21.4" ;; Oort Gnus + :version "22.1" ;; Oort Gnus :type 'number :group 'pop3) (defcustom pop3-password-required t "*Non-nil if a password is required when connecting to POP server." - :version "21.4" ;; Oort Gnus + :version "22.1" ;; Oort Gnus :type 'boolean :group 'pop3) @@ -77,7 +77,7 @@ "*POP3 authentication scheme. Defaults to 'pass, for the standard USER/PASS authentication. Other valid values are 'apop." - :version "21.4" ;; Oort Gnus + :version "22.1" ;; Oort Gnus :type '(choice (const :tag "USER/PASS" pass) (const :tag "APOP" apop)) :group 'pop3) @@ -91,7 +91,7 @@ maintain no state information between sessions, so what the client believes is there and what is actually there may not match up. If they do not, then the whole thing can fall apart and leave you with a corrupt mailbox." - :version "21.4" ;; Oort Gnus + :version "22.1" ;; Oort Gnus :type 'boolean :group 'pop3) diff --git a/lisp/gnus/sha1.el b/lisp/gnus/sha1.el index 51a826fe5fc..346bf9a268e 100644 --- a/lisp/gnus/sha1.el +++ b/lisp/gnus/sha1.el @@ -60,7 +60,7 @@ (defgroup sha1 nil "Elisp interface for SHA1 hash computation." - :version "21.4" + :version "22.1" :group 'extensions) (defcustom sha1-maximum-internal-length 500 diff --git a/lisp/gnus/sieve.el b/lisp/gnus/sieve.el index c37ffb616db..97acf4727ea 100644 --- a/lisp/gnus/sieve.el +++ b/lisp/gnus/sieve.el @@ -65,7 +65,7 @@ (defgroup sieve nil "Manage sieve scripts." - :version "21.4" + :version "22.1" :group 'tools) (defcustom sieve-new-script "<new script>" diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index 4564db294f1..74a4d9cf596 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el @@ -78,7 +78,7 @@ regexp to replace with IMAGE. IMAGE is the name of a PBM file in (push "xpm" types)) types) "*List of suffixes on picon file names to try." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'smiley) diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 954447702bd..1d20a3f5c58 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -150,7 +150,7 @@ certificate." (defcustom smime-CA-file nil "*Files containing certificates for CAs you trust. File should contain certificates in PEM format." - :version "21.4" + :version "22.1" :type '(choice (const :tag "none" nil) file) :group 'smime) @@ -178,7 +178,7 @@ and the files themself should be in PEM format." (defcustom smime-encrypt-cipher "-des3" "*Cipher algorithm used for encryption." - :version "21.4" + :version "22.1" :type '(choice (const :tag "Triple DES" "-des3") (const :tag "DES" "-des") (const :tag "RC2 40 bits" "-rc2-40") @@ -210,7 +210,7 @@ At least OpenSSL version 0.9.7 is required for this to work." (defcustom smime-dns-server nil "*DNS server to query certificates from. If nil, use system defaults." - :version "21.4" + :version "22.1" :type '(choice (const :tag "System defaults") string) :group 'smime) diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index eb33b7ad0b3..ca1cdc6ce60 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el @@ -128,7 +128,7 @@ Use the functions to build a dictionary of words and their statistical distribution in spam and non-spam mails. Then use a function to determine whether a buffer contains spam or not." - :version "21.4" + :version "22.1" :group 'gnus) (defcustom spam-stat-file "~/.spam-stat.el" diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 9a55ba9f318..e36bf8b26c8 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -77,7 +77,7 @@ (defgroup spam nil "Spam configuration." - :version "21.4") + :version "22.1") (defcustom spam-directory (nnheader-concat gnus-directory "spam/") "Directory for spam whitelists and blacklists." diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index 7a2eef5e7d0..f2b72fbef1c 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el @@ -126,7 +126,7 @@ "Name of GNUTLS command line tool. This program is used when GNUTLS is used, i.e. when `starttls-use-gnutls' is non-nil." - :version "21.4" + :version "22.1" :type 'string :group 'starttls) @@ -139,7 +139,7 @@ i.e. when `starttls-use-gnutls' is nil." (defcustom starttls-use-gnutls (not (executable-find starttls-program)) "*Whether to use GNUTLS instead of the `starttls' command." - :version "21.4" + :version "22.1" :type 'boolean :group 'starttls) @@ -158,13 +158,13 @@ This program is used when GNUTLS is used, i.e. when For example, non-TLS compliant servers may require '(\"--protocols\" \"ssl3\"). Invoke \"gnutls-cli --help\" to find out which parameters are available." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'starttls) (defcustom starttls-process-connection-type nil "*Value for `process-connection-type' to use when starting STARTTLS process." - :version "21.4" + :version "22.1" :type 'boolean :group 'starttls) @@ -174,7 +174,7 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." ;; GNUTLS cli.c:main() print this string when it is starting to run ;; in the application read/write phase. If the logic, or the string ;; itself, is modified, this must be updated. - :version "21.4" + :version "22.1" :type 'regexp :group 'starttls) @@ -183,7 +183,7 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." The default is what GNUTLS's \"gnutls-cli\" outputs." ;; GNUTLS cli.c:do_handshake() print this string on failure. If the ;; logic, or the string itself, is modified, this must be updated. - :version "21.4" + :version "22.1" :type 'regexp :group 'starttls) @@ -194,7 +194,7 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." ;; common.c:print_info(), that unconditionally print this string ;; last. If that logic, or the string itself, is modified, this ;; must be updated. - :version "21.4" + :version "22.1" :type 'regexp :group 'starttls) diff --git a/lisp/gnus/utf7.el b/lisp/gnus/utf7.el index 18e7774a578..65f364acfbb 100644 --- a/lisp/gnus/utf7.el +++ b/lisp/gnus/utf7.el @@ -59,7 +59,7 @@ ;; $ echo "a+£"|iconv -f iso-8859-1 -t utf-7 ;; a+-+AKM ;; -;; -- fx +;; -- fx ;;; Code: @@ -78,7 +78,7 @@ (defconst utf7-utf-16-coding-system (cond ((mm-coding-system-p 'utf-16-be-no-signature) ; Mule-UCS 'utf-16-be-no-signature) - ((and (mm-coding-system-p 'utf-16-be) ; Emacs 21.4 (?), Emacs 22 + ((and (mm-coding-system-p 'utf-16-be) ; Emacs 22.1 ;; Avoid versions with BOM. (= 2 (length (encode-coding-string "a" 'utf-16-be)))) 'utf-16-be) diff --git a/lisp/gnus/uudecode.el b/lisp/gnus/uudecode.el index c969dfa17a1..7f269132775 100644 --- a/lisp/gnus/uudecode.el +++ b/lisp/gnus/uudecode.el @@ -51,7 +51,7 @@ input and write the converted data to its standard output." (defcustom uudecode-use-external (executable-find uudecode-decoder-program) "*Use external uudecode program." - :version "21.4" + :version "22.1" :group 'gnus-extract :type 'boolean) diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el index 53af1bdd579..00c62abe9ca 100644 --- a/lisp/help-at-pt.el +++ b/lisp/help-at-pt.el @@ -53,7 +53,7 @@ (defgroup help-at-pt nil "Features for displaying local help." :group 'help - :version "21.4") + :version "22.1") ;;;###autoload (defun help-at-pt-string (&optional kbd) diff --git a/lisp/help.el b/lisp/help.el index 5da7ef0c03a..de5ac093dd5 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -179,8 +179,11 @@ If FUNCTION is nil, it applies `message', thus displaying the message." ;; So keyboard macro definitions are documented correctly (fset 'defining-kbd-macro (symbol-function 'start-kbd-macro)) -(defalias 'help 'help-for-help) -(make-help-screen help-for-help +(defalias 'help 'help-for-help-internal) +;; find-function can find this. +(defalias 'help-for-help 'help-for-help-internal) +;; It can't find this, but nobody will look. +(make-help-screen help-for-help-internal "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w . or ? :" "You have typed %THIS-KEY%, the help character. Type a Help option: \(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.) diff --git a/lisp/hl-line.el b/lisp/hl-line.el index 5ed334f4049..a3e786dd801 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el @@ -58,7 +58,7 @@ ;; mode is used. ;; In default whole the line is highlighted. The range of highlighting -;; can be changed by defining an appropriate function as the +;; can be changed by defining an appropriate function as the ;; buffer-local value of `hl-line-range-function'. ;;; Code: @@ -79,13 +79,13 @@ Otherwise Hl-Line mode will highlight only in the selected window. Setting this variable takes effect the next time you use the command `hl-line-mode' to turn Hl-Line mode on." :type 'boolean - :version "21.4" + :version "22.1" :group 'hl-line) (defvar hl-line-range-function nil "If non-nil, function to call to return highlight range. The function of no args should return a cons cell; its car value -is the beginning position of highlight and its cdr value is the +is the beginning position of highlight and its cdr value is the end position of highlight in the buffer. It should return nil if there's no region to be highlighted. diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 6dce953df0f..f2ebb5db324 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -45,7 +45,7 @@ Ibuffer allows you to operate on buffers in a manner much like Dired. Operations include sorting, marking by regular expression, and the ability to filter the displayed buffers by various criteria." - :version "21.4" + :version "22.1" :group 'convenience) (defcustom ibuffer-formats '((mark modified read-only " " (name 18 18 :left :elide) @@ -215,7 +215,7 @@ If a function, it will be called with the buffer as an argument, and should return non-nil if this buffer should be shown. Viewing of buffers hidden because of these predicates may be customized -via `ibuffer-default-display-maybe-show-predicates' and is toggled by +via `ibuffer-default-display-maybe-show-predicates' and is toggled by giving a non-nil prefix argument to `ibuffer-update'. Note that this specialized filtering occurs before real filtering." :type '(repeat (choice regexp function)) diff --git a/lisp/ido.el b/lisp/ido.el index 10fac08196a..389ddb0b9a1 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -338,7 +338,7 @@ "Switch between files using substrings." :group 'extensions :group 'convenience - :version "21.4" + :version "22.1" :link '(emacs-commentary-link :tag "Commentary" "ido.el") :link '(emacs-library-link :tag "Lisp File" "ido.el")) @@ -410,6 +410,15 @@ This allows the current directory to be opened immediate with `dired'." :type 'boolean :group 'ido) +(defcustom ido-file-extensions-order nil + "*List of file extensions specifying preferred order of file selections. +Each element is either a string with `.' as the first char, an empty +string matching files without extension, or t which is the default order +of for files with an unlisted file extension." + :type '(repeat (choice string + (const :tag "Default order" t))) + :group 'ido) + (defcustom ido-ignore-directories '("\\`CVS/" "\\`\\.\\./" "\\`\\./") "*List of regexps or functions matching sub-directory names to ignore." @@ -2629,10 +2638,69 @@ for first matching file." (t nil)))) -(defun ido-sort-list (items) - ;; Simple list of file or buffer names - (sort items (lambda (a b) (string-lessp (ido-no-final-slash a) - (ido-no-final-slash b))))) +;; File list sorting + +(defun ido-file-lessp (a b) + ;; Simple compare two file names. + (string-lessp (ido-no-final-slash a) (ido-no-final-slash b))) + + +(defun ido-file-extension-lessp (a b) + ;; Compare file names according to ido-file-extensions-order list. + (let ((n (compare-strings a 0 nil b 0 nil nil)) + lessp p) + (if (eq n t) + nil + (if (< n 0) + (setq n (1- (- n)) + p a a b b p + lessp t) + (setq n (1- n))) + (cond + ((= n 0) + lessp) + ((= (aref a n) ?.) + (ido-file-extension-aux a b n lessp)) + (t + (while (and (> n 2) (/= (aref a n) ?.)) + (setq n (1- n))) + (if (> n 1) + (ido-file-extension-aux a b n lessp) + lessp)))))) + +(defun ido-file-extension-aux (a b n lessp) + (let ((oa (ido-file-extension-order a n)) + (ob (ido-file-extension-order b n))) + (cond + ((= oa ob) + lessp) + ((and oa ob) + (if lessp + (> oa ob) + (< oa ob))) + (oa + (not lessp)) + (ob + lessp) + (t + lessp)))) + +(defun ido-file-extension-order (s n) + (let ((l ido-file-extensions-order) + (i 0) o do) + (while l + (cond + ((eq (car l) t) + (setq do i + l (cdr l))) + ((eq (compare-strings s n nil (car l) 0 nil nil) t) + (setq o i + l nil)) + (t + (setq l (cdr l)))) + (setq i (1+ i))) + (or o do))) + (defun ido-sort-merged-list (items promote) ;; Input is list of ("file" . "dir") cons cells. @@ -2905,7 +2973,10 @@ for first matching file." ;; 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))) - (setq ido-temp-list (ido-sort-list ido-temp-list)) + (setq ido-temp-list (sort ido-temp-list + (if ido-file-extensions-order + #'ido-file-extension-lessp + #'ido-file-lessp))) (let ((default-directory ido-current-directory)) (ido-to-end ;; move ftp hosts and visited files to end (delq nil (mapcar @@ -2954,7 +3025,7 @@ for first matching file." ;; 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))) - (setq ido-temp-list (ido-sort-list ido-temp-list)) + (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp)) (ido-to-end ;; move . files to end (delq nil (mapcar (lambda (x) (if (string-equal (substring x 0 1) ".") x)) @@ -3184,14 +3255,15 @@ for first matching file." (setq display-it t)) (if display-it (with-output-to-temp-buffer ido-completion-buffer - (let ((completion-list (ido-sort-list + (let ((completion-list (sort (cond (ido-use-merged-list (ido-flatten-merged-list (or ido-matches ido-cur-list))) ((or full-list ido-completion-buffer-all-completions) (ido-all-completions)) (t - (copy-sequence (or ido-matches ido-cur-list))))))) + (copy-sequence (or ido-matches ido-cur-list)))) + #'ido-file-lessp))) (if (featurep 'xemacs) ;; XEmacs extents are put on by default, doesn't seem to be ;; any way of switching them off. diff --git a/lisp/ielm.el b/lisp/ielm.el index 96969bfc878..cbfbf57e36f 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -77,7 +77,7 @@ text-only terminals or with `emacs -nw', you might wish to use another binding for `comint-kill-whole-line'." :type 'boolean :group 'ielm - :version "21.4") + :version "22.1") (defcustom ielm-prompt "ELISP> " "Prompt used in IELM. diff --git a/lisp/imenu.el b/lisp/imenu.el index 6ee72a88bc4..85430bbdbfc 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -107,7 +107,7 @@ This variable is buffer-local." (defvar imenu-always-use-completion-buffer-p nil) (make-obsolete-variable 'imenu-always-use-completion-buffer-p - 'imenu-use-popup-menu "21.4") + 'imenu-use-popup-menu "22.1") (defcustom imenu-use-popup-menu (if imenu-always-use-completion-buffer-p @@ -126,7 +126,7 @@ If `on-mouse' use a popup menu when `imenu' was invoked with the mouse." "If non-nil, eagerly popup the completion buffer." :type 'boolean :group 'imenu - :version "21.4") + :version "22.1") (defcustom imenu-after-jump-hook nil "*Hooks called after jumping to a place in the buffer. diff --git a/lisp/info.el b/lisp/info.el index 4fcbdeb6330..e6f85d19fe1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -98,7 +98,7 @@ The Lisp code is executed when the node is selected.") (defcustom Info-fontify-visited-nodes t "*Non-nil means to fontify visited nodes in a different face." - :version "21.4" + :version "22.1" :type 'boolean :group 'info) @@ -169,7 +169,7 @@ that you visit a subnode before getting to the end of the menu. Setting this option to nil results in behavior similar to the stand-alone Info reader program, which visits the first subnode from the menu only when you hit the end of the current node." - :version "21.4" + :version "22.1" :type 'boolean :group 'info) @@ -177,7 +177,7 @@ when you hit the end of the current node." "*If non-nil, hide the tag and section reference in *note and * menu items. If value is non-nil but not `hide', also replaces the \"*note\" with \"see\". If value is non-nil but not t or `hide', the reference section is still shown." - :version "21.4" + :version "22.1" :type '(choice (const :tag "No hiding" nil) (const :tag "Replace tag and hide reference" t) (const :tag "Hide tag and reference" hide) @@ -188,7 +188,7 @@ If value is non-nil but not t or `hide', the reference section is still shown." "*If non-nil, attempt to refill paragraphs with hidden references. This refilling may accidentally remove explicit line breaks in the info file, so be prepared for a few surprises if you enable this feature." - :version "21.4" + :version "22.1" :type 'boolean :group 'info) diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 132f11d485b..86f5bf7a726 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -156,7 +156,7 @@ input sequences." (defcustom latin1-display-face 'default "Face to use for displaying substituted ASCII sequences." :type 'face - :version "21.4" + :version "22.1" :group 'latin1-display) (defun latin1-display-char (char display &optional alt-display) @@ -225,7 +225,7 @@ character set: `latin-2', `hebrew' etc." ;; Backwards compatibility. (defalias 'latin1-char-displayable-p 'char-displayable-p) -(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "21.4") +(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "22.1") (defun latin1-display-setup (set &optional force) "Set up Latin-1 display for characters in the given SET. diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index abf9027ef7c..14358926968 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -64,7 +64,7 @@ TYPE should be `list' or `vector'." ;;;###autoload (make-obsolete 'string-to-sequence "use `string-to-list' or `string-to-vector'." - "21.4") + "22.1") ;;;###autoload (defsubst string-to-list (string) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 50d8740b44c..70840654b40 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1252,7 +1252,7 @@ use either \\[customize] or \\[set-keyboard-coding-system]." (if (or value (boundp 'encoded-kbd-mode)) (set-keyboard-coding-system value) (set-default 'keyboard-coding-system nil))) ; must initialize - :version "21.4" + :version "22.1" :group 'keyboard :group 'mule) @@ -1866,7 +1866,7 @@ Part of the job of this function is setting `buffer-undo-list' appropriately." ;; Otherwise, if we can recognize the undo elt for the insertion, ;; remove it and get ready to replace it later. ;; In the mean time, turn off undo recording. - (let ((last (car-safe buffer-undo-list))) + (let ((last (car-safe buffer-undo-list))) (if (and (consp last) (eql (car last) from) (eql (cdr last) to)) (setq undo-list-saved (cdr buffer-undo-list) buffer-undo-list t)))) diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 3f4ff73177f..c6a97bb3d34 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -120,7 +120,7 @@ "Simplified keyboard macro user interface." :group 'keyboard :group 'convenience - :version "21.4" + :version "22.1" :link '(emacs-commentary-link :tag "Commentary" "kmacro.el") :link '(emacs-library-link :tag "Lisp File" "kmacro.el")) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index bf583727a75..8e944569a70 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -3054,7 +3054,7 @@ The frame setup of the calendar. The choices are: `one-frame' (calendar and diary together in one separate, dedicated frame); `two-frames' (calendar and diary in separate, dedicated frames); `calendar-only' (calendar in a separate, dedicated frame); with -any other value the current frame is used. Using any of the first +any other value the current frame is used. Using any of the first three options overrides the value of `view-diary-entries-initially'.") (custom-autoload (quote calendar-setup) "calendar") @@ -10508,7 +10508,7 @@ next enabled. Depends upon the caller to determine whether group deletion is sup ;;;;;; "gnus-delay" "gnus/gnus-delay.el" (16775 26712)) ;;; Generated autoloads from gnus/gnus-delay.el -(defgroup gnus-delay nil "Arrange for sending postings later." :version "21.4" :group (quote gnus)) +(defgroup gnus-delay nil "Arrange for sending postings later." :version "22.1" :group (quote gnus)) (autoload (quote gnus-delay-article) "gnus-delay" "\ Delay this article by some time. @@ -12917,7 +12917,7 @@ The main features of this mode are \\i IF statement template \\elif IF-ELSE statement template \\b BEGIN - + For a full list, use \\[idlwave-list-abbrevs]. Some templates also have direct keybindings - see the list of keybindings below. @@ -13602,7 +13602,7 @@ for more information. ;;; Generated autoloads from language/ind-util.el (autoload (quote indian-compose-region) "ind-util" "\ -Compose the region according to `composition-function-table'. +Compose the region according to `composition-function-table'. \(fn FROM TO)" t nil) @@ -16343,7 +16343,7 @@ Not documented (autoload (quote malayalam-composition-function) "mlm-util" "\ Compose Malayalam characters in REGION, or STRING if specified. -Assume that the REGION or STRING must fully match the composable +Assume that the REGION or STRING must fully match the composable PATTERN regexp. \(fn FROM TO PATTERN &optional STRING)" nil nil) @@ -16782,7 +16782,7 @@ TYPE should be `list' or `vector'. \(fn STRING TYPE)" nil nil) -(make-obsolete (quote string-to-sequence) "use `string-to-list' or `string-to-vector'." "21.4") +(make-obsolete (quote string-to-sequence) "use `string-to-list' or `string-to-vector'." "22.1") (defsubst string-to-list (string) "\ Return a list of characters in STRING." (append string nil)) @@ -17503,7 +17503,7 @@ The Custom feature is intended to make this obsolete. ;;; Generated autoloads from textmodes/org.el (autoload (quote org-mode) "org" "\ -Outline-based notes management and organizer, alias +Outline-based notes management and organizer, alias \"Carstens outline-mode for keeping track of everything.\" Org-mode develops organizational tasks around a NOTES file which @@ -25170,7 +25170,7 @@ Not documented (autoload (quote tamil-composition-function) "tml-util" "\ Compose Tamil characters in REGION, or STRING if specified. -Assume that the REGION or STRING must fully match the composable +Assume that the REGION or STRING must fully match the composable PATTERN regexp. \(fn FROM TO PATTERN &optional STRING)" nil nil) diff --git a/lisp/locate.el b/lisp/locate.el index 3a18d77f089..42463a160fa 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -157,7 +157,7 @@ This should contain the \"-l\" switch, but not the \"-F\" or \"-b\" switches." :type 'string :group 'locate - :version "21.4") + :version "22.1") (defcustom locate-update-command "updatedb" "The command used to update the locate database." diff --git a/lisp/log-edit.el b/lisp/log-edit.el index e2d3762ff77..1fa48b65aee 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -281,19 +281,19 @@ automatically." ;; Compatibility with old names. (defvaralias 'vc-comment-ring 'log-edit-comment-ring) -(make-obsolete-variable 'vc-comment-ring 'log-edit-comment-ring "21.4") +(make-obsolete-variable 'vc-comment-ring 'log-edit-comment-ring "22.1") (defvaralias 'vc-comment-ring-index 'log-edit-comment-ring-index) -(make-obsolete-variable 'vc-comment-ring-index 'log-edit-comment-ring-index "21.4") +(make-obsolete-variable 'vc-comment-ring-index 'log-edit-comment-ring-index "22.1") (defalias 'vc-previous-comment 'log-edit-previous-comment) -(make-obsolete 'vc-previous-comment 'log-edit-previous-comment "21.4") +(make-obsolete 'vc-previous-comment 'log-edit-previous-comment "22.1") (defalias 'vc-next-comment 'log-edit-next-comment) -(make-obsolete 'vc-next-comment 'log-edit-next-comment "21.4") +(make-obsolete 'vc-next-comment 'log-edit-next-comment "22.1") (defalias 'vc-comment-search-reverse 'log-edit-comment-search-backward) -(make-obsolete 'vc-comment-search-reverse 'log-edit-comment-search-backward "21.4") +(make-obsolete 'vc-comment-search-reverse 'log-edit-comment-search-backward "22.1") (defalias 'vc-comment-search-forward 'log-edit-comment-search-forward) -(make-obsolete 'vc-comment-search-forward 'log-edit-comment-search-forward "21.4") +(make-obsolete 'vc-comment-search-forward 'log-edit-comment-search-forward "22.1") (defalias 'vc-comment-to-change-log 'log-edit-comment-to-change-log) -(make-obsolete 'vc-comment-to-change-log 'log-edit-comment-to-change-log "21.4") +(make-obsolete 'vc-comment-to-change-log 'log-edit-comment-to-change-log "22.1") ;;; ;;; Actual code diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index b5ec6f02260..d85ca45bf19 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -89,7 +89,7 @@ If nil, no blank line will be inserted." (defcustom footnote-section-tag "Footnotes: " "*Tag inserted at beginning of footnote section." - :version "21.4" + :version "22.1" :type 'string :group 'footnote) diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index b7521ad8e91..2291ed454bf 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -231,7 +231,7 @@ we will assume that \"John Q. Smith\" is the fellow's name." If true, then when we see an address like \"Idiot <dumb@stupid.com>\" we will act as though we couldn't find a full name in the address." :type 'boolean - :version "21.4" + :version "22.1" :group 'mail-extr) (defcustom mail-extr-ignore-realname-equals-mailbox-name t @@ -1411,7 +1411,7 @@ consing a string.)" (setq names-match-flag nil)) (setq i (1+ i))) (delete-region (+ (point-min) buffer-length) (point-max)) - (and names-match-flag + (and names-match-flag mail-extr-ignore-realname-equals-mailbox-name (narrow-to-region (point) (point))))) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index c97f048a940..1b04c7ab010 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -117,7 +117,7 @@ (const :tag "Not Required" nil)) :set-after '(rmail-pop-password) :set #'(lambda (symbol value) - (set-default symbol + (set-default symbol (if (and (not value) (boundp 'rmail-pop-password) rmail-pop-password) @@ -125,14 +125,14 @@ value)) (setq rmail-pop-password nil)) :group 'rmail-retrieve - :version "21.3.50.1") + :version "22.1") (defcustom rmail-remote-password-required nil "*Non-nil if a password is required when reading mail from a remote server." :type 'boolean :set-after '(rmail-pop-password-required) :set #'(lambda (symbol value) - (set-default symbol + (set-default symbol (if (and (not value) (boundp 'rmail-pop-password-required) rmail-pop-password-required) @@ -140,7 +140,7 @@ value)) (setq rmail-pop-password-required nil)) :group 'rmail-retrieve - :version "21.3.50.1") + :version "22.1") (defcustom rmail-movemail-flags nil "*List of flags to pass to movemail. @@ -1621,7 +1621,7 @@ supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD is non-nil if the user has supplied the password interactively. " (if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file) - (let (got-password supplied-password + (let (got-password supplied-password (proto (match-string 1 file)) (user (match-string 3 file)) (pass (match-string 5 file)) @@ -1632,7 +1632,7 @@ is non-nil if the user has supplied the password interactively. (setq got-password (not (rmail-have-password))) (setq supplied-password (rmail-get-remote-password (string-equal proto "imap"))))) - + (if (rmail-movemail-variant-p 'emacs) (if (string-equal proto "pop") (list (concat "po:" user ":" host) @@ -1671,7 +1671,7 @@ is non-nil if the user has supplied the password interactively. ;; Generate name to move to from inbox name, ;; in case of multiple inboxes that need moving. (concat ".newmail-" - (file-name-nondirectory + (file-name-nondirectory (if (memq system-type '(windows-nt cygwin)) ;; cannot have "po:" in file name (substring file 3) @@ -1777,14 +1777,14 @@ is non-nil if the user has supplied the password interactively. (goto-char (point-min)) (when (looking-at "[A-Z][A-Z0-9_]*:") (delete-region (point-min) (match-end 0)))) - + (message "movemail: %s" (buffer-substring (point-min) (point-max))) - + (sit-for 3) nil))))) - + ;; At this point, TOFILE contains the name to read: ;; Either the alternate name (if we renamed) ;; or the actual inbox (if not renaming). diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 9009b5a3c87..b456f8543b1 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -282,7 +282,7 @@ Value of `default-directory' for mail buffers. This directory is used for auto-save files of mail buffers." :type '(directory :tag "Directory") :group 'sendmail - :version "21.4") + :version "22.1") (defvar mail-reply-action nil) (defvar mail-send-actions nil @@ -324,7 +324,7 @@ support Delivery Status Notification." :type '(repeat (radio (const :tag "Failure" failure) (const :tag "Delay" delay) (const :tag "Success" success))) - :version "21.4") + :version "22.1") ;; Note: could use /usr/ucb/mail instead of sendmail; ;; options -t, and -v if not interactive. diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 7e6d4746e8d..605af6cdbe7 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -170,7 +170,7 @@ looks like `user@realm'." (string :tag "Username") (choice (const :tag "Query when needed" nil) (string :tag "Password"))))) - :version "21.4" + :version "22.1" :group 'smtpmail) (defcustom smtpmail-starttls-credentials '(("" 25 "" "")) diff --git a/lisp/mouse.el b/lisp/mouse.el index 7d94b678ca2..96c1b85f98b 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -46,7 +46,7 @@ (defcustom mouse-drag-copy-region t "*If non-nil, mouse drag copies region to kill-ring." :type 'boolean - :version "21.4" + :version "22.1" :group 'mouse) (defcustom mouse-1-click-follows-link 350 @@ -75,7 +75,7 @@ Note that dragging the mouse never follows the link. This feature only works in modes that specifically identify clickable text as links, so it may not work with some external packages. See `mouse-on-link-p' for details." - :version "21.4" + :version "22.1" :type '(choice (const :tag "Disabled" nil) (const :tag "Double click" double) (number :tag "Single click time limit" :value 350) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 16a4826b8ae..8b4ed89e7b0 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -1004,7 +1004,7 @@ or nil meaning don't change it." :type '(repeat (cons regexp (choice (const :tag "On" "on") (const :tag "Off" "off") (const :tag "Don't change" nil)))) - :version "21.4") + :version "22.1") ;;;; ------------------------------------------------------------ ;;;; Hash table support. diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 16af42ffc27..b0409df2b7c 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -1,9 +1,9 @@ ;;; ldap.el --- client interface to LDAP for Emacs -;; Copyright (C) 1998, 1999, 2000, 02, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo <oscar@cpe.fr> -;; Maintainer: Pavel Janík <Pavel@Janik.cz> +;; Maintainer: FSF ;; Created: April 1998 ;; Keywords: comm diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 1b58760c17c..fd747387100 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -67,21 +67,21 @@ after successful negotiation." (defcustom tls-process-connection-type nil "*Value for `process-connection-type' to use when starting TLS process." - :version "21.4" + :version "22.1" :type 'boolean :group 'tls) (defcustom tls-success "- Handshake was completed" "*Regular expression indicating completed TLS handshakes. The default is what GNUTLS's \"gnutls-cli\" outputs." - :version "21.4" + :version "22.1" :type 'regexp :group 'tls) (defcustom tls-certtool-program (executable-find "certtool") "Name of GnuTLS certtool. Used by `tls-certificate-information'." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'tls) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 6fa0433a574..55ab9e693f1 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -340,11 +340,11 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server." (mapcar (lambda (x) ;; We cannot call `file-attributes' for backward compatibility reasons. - ;; Its optional parameter ID-FORMAT is introduced with Emacs 21.4. + ;; Its optional parameter ID-FORMAT is introduced with Emacs 22.1. (cons x (tramp-smb-handle-file-attributes (if full x (concat (file-name-as-directory directory) x)) id-format))) (directory-files directory full match nosort))) - + (defun tramp-smb-handle-file-attributes (filename &optional id-format) "Like `file-attributes' for tramp files." ; (with-parsed-tramp-file-name filename nil @@ -500,7 +500,7 @@ WILDCARD and FULL-DIRECTORY-P are not handled." (entries (tramp-smb-get-file-entries user host share file))) ;; Delete dummy "" entry, useless entries - (setq entries + (setq entries (if (file-directory-p filename) (delq (assoc "" entries) entries) ;; We just need the only and only entry FILENAME. diff --git a/lisp/net/tramp-util.el b/lisp/net/tramp-util.el index 1cd7f14dcd6..8f195fe4ad8 100644 --- a/lisp/net/tramp-util.el +++ b/lisp/net/tramp-util.el @@ -34,7 +34,7 @@ ;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp ;; specific functions, like compilation. -;; The key remapping works since Emacs 21.4 only. Unknown for XEmacs. +;; The key remapping works since Emacs 22.1 only. Unknown for XEmacs. (when (fboundp 'define-minor-mode) @@ -59,7 +59,7 @@ If remapping functionality for keymaps is defined, this happens for all bindings. Otherwise, only bindings active during invocation are taken into account. XEmacs menubar bindings are not changed by this." (if (functionp 'command-remapping) - ;; Emacs 21.4 + ;; Emacs 22.1 (eval `(define-key tramp-minor-mode-map [remap ,old-command] new-command)) ;; previous Emacs 21 versions. diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el index c2a9ae737df..7c75b0f01c9 100644 --- a/lisp/net/tramp-vc.el +++ b/lisp/net/tramp-vc.el @@ -51,7 +51,7 @@ ;; This used to blow away the file-name-handler-alist and reinstall ;; TRAMP into it. This was intended to let VC work remotely. It didn't, ;; at least not in my XEmacs 21.2 install. -;; +;; ;; In any case, tramp-run-real-handler now deals correctly with disabling ;; the things that should be, making this a no-op. ;; @@ -96,7 +96,7 @@ See `vc-do-command' for more information." (set (make-local-variable 'vc-parent-buffer-name) (concat " from " (buffer-name camefrom))) (setq default-directory olddir) - + (erase-buffer) (mapcar @@ -230,7 +230,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (if (or (and (stringp file) (tramp-tramp-file-p file)) (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) (setq ad-return-value - (apply 'tramp-vc-do-command-new buffer okstatus command + (apply 'tramp-vc-do-command-new buffer okstatus command file ;(or file (buffer-file-name)) flags)) ad-do-it))) @@ -243,7 +243,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (if (or (and (stringp file) (tramp-tramp-file-p file)) (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) (setq ad-return-value - (apply 'tramp-vc-do-command buffer okstatus command + (apply 'tramp-vc-do-command buffer okstatus command (or file (buffer-file-name)) last flags)) ad-do-it))))) ;;-) @@ -298,7 +298,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (tramp-wait-for-output) (setq exec-status (read (current-buffer))) (message "Command %s returned status %d." command exec-status))) - + ;; Maybe okstatus can be `async' here. But then, maybe the ;; async thing is new in Emacs 21, but this function is only ;; used in Emacs 20. @@ -319,7 +319,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (if (or (and (stringp file) (tramp-tramp-file-p file)) (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) (setq ad-return-value - (apply 'tramp-vc-simple-command okstatus command + (apply 'tramp-vc-simple-command okstatus command (or file (buffer-file-name)) args)) ad-do-it))) @@ -381,17 +381,17 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." ;; Do we need to advise the vc-user-login-name function anyway? -;; This will return the correct login name for the owner of a +;; This will return the correct login name for the owner of a ;; file. It does not deal with the default remote user name... ;; -;; That is, when vc calls (vc-user-login-name), we return the +;; That is, when vc calls (vc-user-login-name), we return the ;; local login name, something that may be different to the remote -;; default. +;; default. ;; ;; The remote VC operations will occur as the user that we logged ;; in with however - not always the same as the local user. ;; -;; In the end, I did advise the function. This is because, well, +;; In the end, I did advise the function. This is because, well, ;; the thing didn't work right otherwise ;) ;; ;; Daniel Pittman <daniel@danann.net> @@ -409,7 +409,7 @@ filename we are thinking about..." ;; boundness-checking into this function? (let* ((file (symbol-value 'file)) (remote-uid - ;; With Emacs 21.4, `file-attributes' has got an optional parameter + ;; With Emacs 22.1, `file-attributes' has got an optional parameter ;; ID-FORMAT. Handle this case backwards compatible. (if (and (functionp 'subr-arity) (= 2 (cdr (funcall (symbol-function 'subr-arity) @@ -444,11 +444,11 @@ filename we are thinking about..." (tramp-handle-vc-user-login-name uid)))) ; get the owner name ad-do-it))) ; else call the original - + ;; Determine the name of the user owning a file. (defun tramp-file-owner (filename) "Return who owns FILE (user name, as a string)." - (let ((v (tramp-dissect-file-name + (let ((v (tramp-dissect-file-name (expand-file-name filename)))) (if (not (file-exists-p filename)) nil ; file cannot be opened diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 90bc30744c7..583b5fa2afe 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -34,7 +34,7 @@ ;; ;; Notes: ;; ----- -;; +;; ;; This package only works for Emacs 20 and higher, and for XEmacs 21 ;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs ;; 19 is reported to have other problems. For XEmacs 21, you need the @@ -160,7 +160,7 @@ Nil means to use a separate filename syntax for Tramp.") (defgroup tramp nil "Edit remote files with a combination of rsh and rcp or similar programs." :group 'files - :version "21.4") + :version "22.1") (defcustom tramp-verbose 9 "*Verbosity level for tramp.el. 0 means be silent, 10 is most verbose." @@ -205,7 +205,7 @@ file name, the backup directory is prepended with Tramp file name prefix gives the same backup policy for Tramp files on their hosts like the policy for local files." - :type '(repeat + :type '(repeat (list (regexp :tag "File regexp") (string :tag "Backup Dir") (set :inline t @@ -506,7 +506,7 @@ This variable defaults to the value of `tramp-encoding-shell'." (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line "xy")) ;see docstring for "xy" - ("fcp" + ("fcp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "fsh") (tramp-copy-program "fcp") @@ -633,7 +633,7 @@ variable `tramp-methods'." ("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") ("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n") ("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") - ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") + ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") ("su" tramp-multi-connect-su "su - %u%n") ("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n")) "*List of connection functions for multi-hop methods. @@ -777,7 +777,7 @@ the info pages.") "sudo" tramp-completion-function-alist-su) (tramp-set-completion-function "multi" nil) - (tramp-set-completion-function + (tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh) (tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh) @@ -2064,7 +2064,7 @@ target of the symlink differ." (setq filename (tramp-file-name-localname (tramp-dissect-file-name (expand-file-name filename))))) - + ;; Right, they are on the same host, regardless of user, method, etc. ;; We now make the link on the remote machine. This will occur as the user ;; that FILENAME belongs to. @@ -2073,7 +2073,7 @@ target of the symlink differ." l-multi-method l-method l-user l-host (format "cd %s && %s -sf %s %s" cwd ln - filename + filename l-localname) t))))) @@ -2419,7 +2419,7 @@ of." (let* ((attr (file-attributes f)) (modtime (nth 5 attr)) (mt (visited-file-modtime))) - + (cond ;; file exists, and has a known modtime. ((and attr (not (equal modtime '(0 0)))) @@ -2766,7 +2766,7 @@ if the remote host can't provide the modtime." (push (buffer-substring (point) (tramp-line-end-position)) result)) - + (tramp-send-command multi-method method user host "cd") (tramp-wait-for-output) @@ -3211,7 +3211,7 @@ This is like `dired-recursive-delete-directory' for tramp files." 'file-error (list "Removing old file name" "no such directory" filename))) ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>) - (tramp-send-command multi-method method user host + (tramp-send-command multi-method method user host (format "rm -r %s" (tramp-shell-quote-argument localname))) ;; Wait for the remote system to return to us... ;; This might take a while, allow it plenty of time. @@ -3219,7 +3219,7 @@ This is like `dired-recursive-delete-directory' for tramp files." ;; Make sure that it worked... (and (file-exists-p filename) (error "Failed to recursively delete %s" filename)))) - + (defun tramp-handle-dired-call-process (program discard &rest arguments) "Like `dired-call-process' for tramp files." (with-parsed-tramp-file-name default-directory nil @@ -3241,7 +3241,7 @@ This is like `dired-recursive-delete-directory' for tramp files." (tramp-send-command-and-check multi-method method user host nil) (tramp-send-command multi-method method user host "cd") (tramp-wait-for-output))))) - + (defun tramp-handle-dired-compress-file (file &rest ok-flag) "Like `dired-compress-file' for tramp files." ;; OK-FLAG is valid for XEmacs only, but not implemented. @@ -3501,7 +3501,7 @@ Used in `tramp-handle-shell-command'") This will break if COMMAND prints a newline, followed by the value of `tramp-end-of-output', followed by another newline." ;; Asynchronous processes are far from being perfect. But it works at least - ;; for `find-grep-dired' and `find-name-dired' in Emacs 21.4. + ;; for `find-grep-dired' and `find-name-dired' in Emacs 22.1. (if (tramp-tramp-file-p default-directory) (with-parsed-tramp-file-name default-directory nil (let ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) @@ -3609,7 +3609,7 @@ This will break if COMMAND prints a newline, followed by the value of (when (and (numberp buffer) (zerop buffer)) (error "Implementation does not handle immediate return")) (when (consp buffer) (error "Implementation does not handle error files")) - (shell-command + (shell-command (mapconcat 'tramp-shell-quote-argument (cons program args) " ") @@ -4213,7 +4213,7 @@ Falls back to normal file name handler if no tramp file name handler exists." (defun tramp-repair-jka-compr () "If jka-compr is already loaded, move it to the front of -`file-name-handler-alist'. On Emacs 21.4 or so this will not be +`file-name-handler-alist'. On Emacs 22.1 or so this will not be necessary anymore." (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist))) (when jka @@ -4293,7 +4293,7 @@ necessary anymore." ;; `tramp-completion-file-name-regexp-unified' aren't different. ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'. -;; Using `last-input-event' is a little bit risky, because completing a file +;; Using `last-input-event' is a little bit risky, because completing a file ;; might require loading other files, like "~/.netrc", and for them it ;; shouldn't be decided based on that variable. On the other hand, those files ;; shouldn't have partial tramp file name syntax. Maybe another variable should @@ -4397,7 +4397,7 @@ necessary anymore." (funcall (nth 0 x) (nth 1 x))))) (tramp-get-completion-function m)) - (setq result (append result + (setq result (append result (mapcar (lambda (x) (tramp-get-completion-user-host @@ -4438,7 +4438,7 @@ necessary anymore." ;; [nil nil "x" nil nil] ;; [nil "x" nil nil nil] -;; "/x:" "/x:y" "/x:y:" +;; "/x:" "/x:y" "/x:y:" ;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""] ;; "/[x/" "/[x/y" ;; [nil "x" nil "" nil] [nil "x" nil "y" nil] @@ -4907,7 +4907,7 @@ TIME is an Emacs internal time value as returned by `current-time'." "touch" nil (current-buffer) nil "-t" touch-time file)) (pop-to-buffer (current-buffer)) (error "tramp-touch: touch failed")))))) - + (defun tramp-buffer-name (multi-method method user host) "A name for the connection buffer for USER at HOST using METHOD." (if multi-method @@ -5072,7 +5072,7 @@ file exists and nonzero exit status otherwise." (file-exists-p existing) (not (file-exists-p nonexisting)))) (error "Couldn't find command to check if file exists.")))) - + ;; CCC test ksh or bash found for tilde expansion? (defun tramp-find-shell (multi-method method user host) @@ -5171,9 +5171,9 @@ Returns nil if none was found, else the command is returned." (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path) (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path))) -;; ------------------------------------------------------------ -;; -- Functions for establishing connection -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- Functions for establishing connection -- +;; ------------------------------------------------------------ ;; The following functions are actions to be taken when seeing certain ;; prompts from the remote host. See the variable @@ -5422,7 +5422,7 @@ Maybe the different regular expressions need to be tuned. (when multi-method (error "Cannot multi-connect using telnet connection method")) (tramp-pre-connection multi-method method user host) - (tramp-message 7 "Opening connection for %s@%s using %s..." + (tramp-message 7 "Opening connection for %s@%s using %s..." (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) @@ -5456,7 +5456,7 @@ Maybe the different regular expressions need to be tuned. p multi-method method user host) (tramp-post-connection multi-method method user host))))) - + (defun tramp-open-connection-rsh (multi-method method user host) "Open a connection using an rsh METHOD. This starts the command `rsh HOST -l USER'[*], then waits for a remote @@ -5481,7 +5481,7 @@ arguments, and xx will be used as the host name to connect to. (error "Cannot multi-connect using rsh connection method")) (tramp-pre-connection multi-method method user host) (if (and user (not (string= user ""))) - (tramp-message 7 "Opening connection for %s@%s using %s..." + (tramp-message 7 "Opening connection for %s@%s using %s..." user host method) (tramp-message 7 "Opening connection at %s using %s..." host method)) (let ((process-environment (copy-sequence process-environment)) @@ -5510,9 +5510,9 @@ arguments, and xx will be used as the host name to connect to. (> emacs-major-version 20)) tramp-dos-coding-system)) (p (if (and user (not (string= user ""))) - (apply #'start-process bufnam buf login-program + (apply #'start-process bufnam buf login-program real-host "-l" user login-args) - (apply #'start-process bufnam buf login-program + (apply #'start-process bufnam buf login-program real-host login-args))) (found nil)) (tramp-set-process-query-on-exit-flag p nil) @@ -5582,10 +5582,10 @@ prompt than you do, so it is not at all unlikely that the variable tramp-actions-before-shell) (tramp-open-connection-setup-interactive-shell p multi-method method user host) - (tramp-post-connection multi-method method + (tramp-post-connection multi-method method user host))))) -;; HHH: Not Changed. Multi method. It is not clear to me how this can +;; HHH: Not Changed. Multi method. It is not clear to me how this can ;; handle not giving a user name in the "file name". ;; ;; This is more difficult than for the single-hop method. In the @@ -5655,7 +5655,7 @@ log in as u2 to h2." (tramp-post-connection multi-method method user host))))) ;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-telnet (p method user host command) @@ -5677,8 +5677,8 @@ If USER is nil, uses the return value of (user-login-name) instead." (tramp-process-multi-actions p method user host tramp-multi-actions))) -;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; HHH: Changed. Multi method. Don't know how to handle this in the case +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-rlogin (p method user host command) @@ -5703,8 +5703,8 @@ If USER is nil, uses the return value of (user-login-name) instead." (tramp-process-multi-actions p method user host tramp-multi-actions))) -;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; HHH: Changed. Multi method. Don't know how to handle this in the case +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-su (p method user host command) @@ -6334,7 +6334,7 @@ Sends COMMAND, then waits 30 seconds for shell prompt." (tramp-barf-if-no-shell-prompt nil 30 "Couldn't `%s', see buffer `%s'" command (buffer-name))) - + (defun tramp-wait-for-output (&optional timeout) "Wait for output from remote rsh command." (let ((proc (get-buffer-process (current-buffer))) @@ -6667,9 +6667,9 @@ Not actually used. Use `(format \"%o\" i)' instead?" "")) -;; ------------------------------------------------------------ -;; -- TRAMP file names -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- TRAMP file names -- +;; ------------------------------------------------------------ ;; Conversion functions between external representation and ;; internal data structure. Convenience functions for internal ;; data structure. @@ -6680,7 +6680,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" "Return t iff NAME is a tramp file." (save-match-data (string-match tramp-file-name-regexp name))) - + ;; HHH: Changed. Used to assign the return value of (user-login-name) ;; to the `user' part of the structure if a user name was not ;; provided, now it assigns nil. @@ -6733,7 +6733,7 @@ This is MULTI-METHOD, if non-nil. Otherwise, it is METHOD, if non-nil. If both MULTI-METHOD and METHOD are nil, do a lookup in `tramp-default-method-alist'." (or multi-method method (tramp-find-default-method user host))) - + ;; HHH: Not Changed. Multi method. Will probably not handle the case where ;; a user name is not provided in the "file name" very well. (defun tramp-dissect-multi-file-name (name) @@ -6905,7 +6905,7 @@ as default." (if entry (second entry) (symbol-value param)))) - + ;; Auto saving to a special directory. @@ -6937,7 +6937,7 @@ as default." (tramp-make-auto-save-file-name (buffer-file-name))) ad-do-it)) -;; In Emacs < 21.4 and XEmacs < 21.5 autosaved remote files have +;; In Emacs < 22.1 and XEmacs < 21.5 autosaved remote files have ;; permission 666 minus umask. This is a security threat. (defun tramp-set-auto-save-file-modes () @@ -7097,9 +7097,9 @@ exiting if process is running." process flag))) -;; ------------------------------------------------------------ -;; -- Kludges section -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- Kludges section -- +;; ------------------------------------------------------------ ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' ;; does not deal well with newline characters. Newline is replaced by @@ -7362,7 +7362,7 @@ report. ;; strange when doing zerop, we should kill the process and start ;; again. (Greg Stark) ;; * Add caching for filename completion. (Greg Stark) -;; Of course, this has issues with usability (stale cache bites) +;; Of course, this has issues with usability (stale cache bites) ;; -- <daniel@danann.net> ;; * Provide a local cache of old versions of remote files for the rsync ;; transfer method to use. (Greg Stark) diff --git a/lisp/novice.el b/lisp/novice.el index b2a0bec0204..e9db95bd619 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -44,7 +44,7 @@ If nil, the feature is disabled, i.e., all commands work normally.") (defvaralias 'disabled-command-hook 'disabled-command-function) (make-obsolete-variable 'disabled-command-hook - 'disabled-command-function "21.4") + 'disabled-command-function "22.1") ;;;###autoload (defun disabled-command-function (&rest ignore) diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 17cb7c78316..968dc1a9e23 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -186,7 +186,7 @@ Special commands: (delete-horizontal-space) (tab-to-tab-stop)))) -;; Obsolete since Emacs-21.4. +;; Obsolete since Emacs-22.1. (defalias 'asm-newline 'newline-and-indent) (defun asm-comment () diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 3f6c24c85c6..a9e86de44aa 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -175,7 +175,7 @@ Intended as the value of `indent-line-function'." (if (> (- (point-max) pos) (point)) (goto-char (- (point-max) pos))))) -;; This doesn't work too well in Emacs 21.2. See 21.4 development +;; This doesn't work too well in Emacs 21.2. See 22.1 development ;; code. (defun cfengine-fill-paragraph (&optional justify) "Fill `paragraphs' in Cfengine code." diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 7b401da794e..79a6b4b43be 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -459,7 +459,7 @@ starting the compilation process.") (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces - :version "21.4") + :version "22.1") (defface compilation-info-face '((((class color) (min-colors 16) (background light)) @@ -470,7 +470,7 @@ starting the compilation process.") (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces - :version "21.4") + :version "22.1") (defvar compilation-message-face nil "Face name to use for whole messages. @@ -1133,7 +1133,7 @@ info, are considered errors." (const :tag "Info" 1) (const :tag "None" 0)) :group 'compilation - :version "21.4") + :version "22.1") (defcustom compilation-skip-visited nil "*Compilation motion commands skip visited messages if this is t. @@ -1142,7 +1142,7 @@ to from the current content in the current compilation buffer, even if it was from a different message." :type 'boolean :group 'compilation - :version "21.4") + :version "22.1") ;;;###autoload (defun compilation-mode (&optional name-of-mode) @@ -1557,7 +1557,7 @@ region and the first line of the next region." If nil, don't scroll the compilation output window." :type '(choice integer (const :tag "No window scrolling" nil)) :group 'compilation - :version "21.4") + :version "22.1") (defsubst compilation-set-window (w mk) "Align the compilation output window W with marker MK near top." diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 3ded7758b90..768012c736c 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -147,7 +147,7 @@ You might want to change this to \"*\", for instance." "*Regexp to match a directive line. The matching text will be fontified with `font-lock-keyword-face'. The matching line will be given zero indentation." - :version "21.4" + :version "22.1" :type 'regexp :group 'fortran-indent) @@ -952,7 +952,7 @@ Auto-indent does not happen if a numeric ARG is used." fortran-minimum-statement-indent-tab fortran-minimum-statement-indent-fixed) (current-column)) ;; In col 8 with a single tab to the left. - (eq ?\t (char-after (line-beginning-position))) + (eq ?\t (char-after (line-beginning-position))) (not (or (eq last-command 'fortran-indent-line) (eq last-command 'fortran-indent-new-line)))) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 9c15fc5be52..97511376086 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -59,7 +59,7 @@ ;; of 'info registers'. ;; 3) Use tree-widget.el instead of the speedbar for watch-expressions? ;; 4) Mark breakpoint locations on scroll-bar of source buffer? -;; 5) After release of 21.4 use '-var-list-children --all-values' +;; 5) After release of 22.1 use '-var-list-children --all-values' ;; and '-stack-list-locals 2' which need GDB 6.1 onwards. ;;; Code: @@ -183,13 +183,13 @@ detailed description of this mode. "Non-nil means record the process input and output in `gdb-debug-log'." :type 'boolean :group 'gud - :version "21.4") + :version "22.1") (defcustom gdb-use-inferior-io-buffer nil "Non-nil means display output from the inferior in a separate buffer." :type 'boolean :group 'gud - :version "21.4") + :version "22.1") (defun gdb-ann3 () (setq gdb-debug-log nil) @@ -248,6 +248,7 @@ detailed description of this mode. (setq gdb-output-sink 'user) (setq gdb-server-prefix "server ") (setq gdb-flush-pending-output nil) + (setq gdb-location-list nil) ;; (setq gdb-buffer-type 'gdba) ;; @@ -256,6 +257,7 @@ detailed description of this mode. (if (eq window-system 'w32) (gdb-enqueue-input (list "set new-console off\n" 'ignore))) (gdb-enqueue-input (list "set height 0\n" 'ignore)) + (gdb-enqueue-input (list "set width 0\n" 'ignore)) ;; find source file and compilation directory here (gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program @@ -267,7 +269,7 @@ detailed description of this mode. "If non-nil use FUN::VAR format to display variables in the speedbar." ; :type 'boolean :group 'gud - :version "21.4") + :version "22.1") (defun gud-watch () "Watch expression at point." @@ -440,7 +442,7 @@ detailed description of this mode. The highlighting is done with `font-lock-warning-face'." :type 'boolean :group 'gud - :version "21.4") + :version "22.1") (defun gdb-speedbar-expand-node (text token indent) "Expand the node the user clicked on. @@ -490,7 +492,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." (name (funcall (gdb-rules-name-maker rules))) (new (get-buffer-create name))) (with-current-buffer new - (let ((trigger)) + (let ((trigger)) (if (cdr (cdr rules)) (setq trigger (funcall (car (cdr (cdr rules)))))) (set (make-local-variable 'gdb-buffer-type) key) @@ -690,7 +692,7 @@ This filter may simply queue input for a later time." "Default command to execute an executable under the GDB-UI debugger." :type 'string :group 'gud - :version "21.4") + :version "22.1") (defvar gdb-annotation-rules '(("pre-prompt" gdb-pre-prompt) @@ -788,7 +790,7 @@ not GDB." (setq gud-running t) (if gdb-use-inferior-io-buffer (setq gdb-output-sink 'inferior)))) - (t + (t (gdb-resync) (error "Unexpected `starting' annotation"))))) @@ -1046,7 +1048,7 @@ happens to be appropriate." ;; buffer specific functions gdb-info-breakpoints-custom) -(defvar gdb-cdir nil "Compilation directory.") +(defvar gdb-location-list nil "List of directories for source files.") (defconst breakpoint-xpm-data "/* XPM */ @@ -1145,7 +1147,7 @@ static char *magick[] = { (setq bptno (match-string 1)) (setq flag (char-after (match-beginning 2))) (beginning-of-line) - (if (re-search-forward "in.*at\\s-+" nil t) + (if (re-search-forward " in .* at\\s-+" nil t) (progn (looking-at "\\(\\S-+\\):\\([0-9]+\\)") (let ((line (match-string 2)) (buffer-read-only nil) @@ -1153,18 +1155,30 @@ static char *magick[] = { (add-text-properties (point-at-bol) (point-at-eol) '(mouse-face highlight help-echo "mouse-2, RET: visit breakpoint")) - (with-current-buffer - (find-file-noselect - (if (file-exists-p file) file - (expand-file-name file gdb-cdir))) - (save-current-buffer - (set (make-local-variable 'gud-minor-mode) 'gdba) - (set (make-local-variable 'tool-bar-map) - gud-tool-bar-map)) - ;; only want one breakpoint icon at each location - (save-excursion - (goto-line (string-to-number line)) - (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) + (unless (file-exists-p file) + (setq file (cdr (assoc bptno gdb-location-list)))) + (unless (string-equal file "File not found") + (if file + (with-current-buffer + (find-file-noselect file) + (save-current-buffer + (set (make-local-variable 'gud-minor-mode) + 'gdba) + (set (make-local-variable 'tool-bar-map) + gud-tool-bar-map)) + ;; only want one breakpoint icon at each location + (save-excursion + (goto-line (string-to-number line)) + (gdb-put-breakpoint-icon (eq flag ?y) bptno))) + (gdb-enqueue-input + (list (concat gdb-server-prefix "list " + (match-string-no-properties 1) ":1\n") + 'ignore)) + (gdb-enqueue-input + (list (concat gdb-server-prefix "info source\n") + `(lambda () + (gdb-get-location + ,bptno ,line ,flag))))))))))) (end-of-line))))) (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom))) @@ -1192,7 +1206,7 @@ static char *magick[] = { (with-selected-window (posn-window posn) (save-excursion (goto-char (posn-point posn)) - (if + (if ; (or (posn-object posn) ; (eq (car (fringe-bitmaps-at-pos (posn-point posn))) @@ -1300,15 +1314,16 @@ static char *magick[] = { (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at ".*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]+\\)")) - (let ((line (match-string 2)) - (file (match-string 1))) + "\\([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))) (save-selected-window (let* ((buf (find-file-noselect (if (file-exists-p file) file - (expand-file-name file gdb-cdir)))) + (cdr (assoc bptno gdb-location-list))))) (window (display-buffer buf))) (with-current-buffer buf (goto-line (string-to-number line)) @@ -1530,7 +1545,7 @@ static char *magick[] = { "Number of data items in memory window." :type 'integer :group 'gud - :version "21.4") + :version "22.1") (defcustom gdb-memory-format "x" "Display format of data items in memory window." @@ -1540,7 +1555,7 @@ static char *magick[] = { (const :tag "Octal" "o") (const :tag "Binary" "t")) :group 'gud - :version "21.4") + :version "22.1") (defcustom gdb-memory-unit "w" "Unit size of data items in memory window." @@ -1549,7 +1564,7 @@ static char *magick[] = { (const :tag "Word" "w") (const :tag "Giant word" "g")) :group 'gud - :version "21.4") + :version "22.1") (gdb-set-buffer-rules 'gdb-memory-buffer 'gdb-memory-buffer-name @@ -1739,7 +1754,7 @@ corresponding to the mode line clicked." (use-local-map gdb-memory-mode-map) (setq header-line-format '(:eval - (concat + (concat "Read address: " (propertize gdb-memory-address 'face font-lock-warning-face @@ -1943,7 +1958,7 @@ corresponding to the mode line clicked." "Nil means don't display source file containing the main routine." :type 'boolean :group 'gud - :version "21.4") + :version "22.1") (defun gdb-set-window-buffer (name) (set-window-buffer (selected-window) (get-buffer name)) @@ -1987,7 +2002,7 @@ of the inferior. Non-nil means display the layout shown for `gdba'." :type 'boolean :group 'gud - :version "21.4") + :version "22.1") (defun gdb-many-windows (arg) "Toggle the number of windows in the basic arrangement." @@ -2039,21 +2054,37 @@ Kills the gdb buffers and resets the source buffers." "Find the source file where the program starts and displays it with related buffers." (goto-char (point-min)) - (if (search-forward "directory is " nil t) - (if (looking-at "\\S-*:\\(\\S-*\\)") - (setq gdb-cdir (match-string 1)) - (looking-at "\\S-*") - (setq gdb-cdir (match-string 0)))) (if (search-forward "Located in " nil t) (if (looking-at "\\S-*") (setq gdb-main-file (match-string 0)))) (if gdb-many-windows (gdb-setup-windows) - (gdb-get-create-buffer 'gdb-breakpoints-buffer) + (gdb-get-create-buffer 'gdb-breakpoints-buffer) (if gdb-show-main (let ((pop-up-windows t)) (display-buffer (gud-find-file gdb-main-file)))))) +(defun gdb-get-location (bptno line flag) + "Find the directory containing the relevant source file. +Put in buffer and place breakpoint icon." + (goto-char (point-min)) + (if (search-forward "Located in " nil t) + (if (looking-at "\\S-*") + (push (cons bptno (match-string 0)) gdb-location-list)) + (gdb-resync) + (push (cons bptno "File not found") gdb-location-list) + (error "Cannot find source file for breakpoint location. +Add directory to search path for source files using the GDB command, dir.")) + (with-current-buffer + (find-file-noselect (match-string 0)) + (save-current-buffer + (set (make-local-variable 'gud-minor-mode) 'gdba) + (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)) + ;; only want one breakpoint icon at each location + (save-excursion + (goto-line (string-to-number line)) + (gdb-put-breakpoint-icon (eq flag ?y) bptno)))) + ;;from put-image (defun gdb-put-string (putstring pos &optional dprop) "Put string PUTSTRING in front of POS in the current buffer. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index a3b1ab3abdd..ab705212397 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -44,7 +44,7 @@ "*Number of lines in a grep window. If nil, use `compilation-window-height'." :type '(choice (const :tag "Default" nil) integer) - :version "21.4" + :version "22.1" :group 'grep) (defcustom grep-auto-highlight t @@ -61,7 +61,7 @@ will be parsed and highlighted as soon as you try to move to them." :type '(choice (const :tag "All" t) (const :tag "None" nil) (integer :tag "First N lines")) - :version "21.4" + :version "22.1" :group 'grep) (defcustom grep-highlight-matches 'auto-detect @@ -81,7 +81,7 @@ call that function before using this variable in your program." :type '(choice (const :tag "Do not highlight matches with grep markers" nil) (const :tag "Highlight matches with grep markers" t) (other :tag "Not Set" auto-detect)) - :version "21.4" + :version "22.1" :group 'grep) (defcustom grep-scroll-output nil @@ -91,7 +91,7 @@ Setting it causes the grep commands to put point at the end of their output window so that the end of the output is always visible rather than the begining." :type 'boolean - :version "21.4" + :version "22.1" :group 'grep) ;;;###autoload @@ -141,7 +141,7 @@ The following place holders should be present in the string: <R> - the regular expression searched for." :type '(choice string (const :tag "Not Set" nil)) - :version "21.4" + :version "22.1" :group 'grep) (defcustom grep-tree-files-aliases '( @@ -172,7 +172,7 @@ The following place holders should be present in the string: See `compilation-error-screen-columns'" :type '(choice (const :tag "Default" nil) integer) - :version "21.4" + :version "22.1" :group 'grep) ;;;###autoload @@ -253,7 +253,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies '(("^\\(.+?\\)[: \t]+\ \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6)) - ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" + ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" 1 2 ;; Calculate column positions (beg . end) of first grep match on a line ((lambda () @@ -293,7 +293,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies (1 compilation-warning-face) (2 compilation-line-face)) ;; Highlight grep matches and delete markers - ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" + ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" (2 grep-match-face) ((lambda (p)) (progn diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f73ccdda9eb..745bc57a9b0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -72,7 +72,7 @@ (defgroup python nil "Silly walks in the Python language" :group 'languages - :version "21.4" + :version "22.1" :link '(emacs-commentary-link "python")) ;;;###autoload diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 0e0d89b07e1..902cd920ead 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -617,7 +617,7 @@ The program can also specify a TCP connection. See `make-comint'." ;; -w is the linesize "*List of additional options for `sql-ms-program'." :type '(repeat string) - :version "21.4" + :version "22.1" :group 'SQL) ;; Customization for Postgres diff --git a/lisp/recentf.el b/lisp/recentf.el index 2fee8e637a8..169fee99529 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -192,7 +192,7 @@ elements (see `recentf-make-menu-element' for menu element form)." 'recentf-menu-append-commands-flag) (make-obsolete-variable 'recentf-menu-append-commands-p 'recentf-menu-append-commands-flag - "21.4") + "22.1") (defcustom recentf-keep-non-readable-files-flag nil "*non-nil means to keep non readable files in the recent list." @@ -203,7 +203,7 @@ elements (see `recentf-make-menu-element' for menu element form)." 'recentf-keep-non-readable-files-flag) (make-obsolete-variable 'recentf-keep-non-readable-files-p 'recentf-keep-non-readable-files-flag - "21.4") + "22.1") (defcustom recentf-auto-cleanup 'mode "*Define when to automatically cleanup the recent list. @@ -740,7 +740,7 @@ Arrange them in sub-menus following rules in `recentf-arrange-rules'." elts (cdr elts))) (unless menu (push elt others))) - + (setq l nil min (if (natnump recentf-arrange-by-rules-min-items) recentf-arrange-by-rules-min-items 0)) @@ -755,7 +755,7 @@ Arrange them in sub-menus following rules in `recentf-arrange-rules'." menu (recentf-apply-menu-filter recentf-arrange-by-rule-subfilter (nreverse elts))) (push menu l)))) - + (if (and (stringp recentf-arrange-by-rule-others) others) (nreverse (cons diff --git a/lisp/replace.el b/lisp/replace.el index 82b2a993fdb..42480b656d6 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -62,7 +62,7 @@ strings or patterns." "*Non-nil means `query-replace' and friends ignore read-only matches." :type 'boolean :group 'matching - :version "21.4") + :version "22.1") (defcustom query-replace-highlight t "*Non-nil means to highlight matches during query replacement." @@ -77,13 +77,13 @@ is highlighted lazily using isearch lazy highlighting (see :type 'boolean :group 'lazy-highlight :group 'matching - :version "21.4") + :version "22.1") (defface query-replace '((t (:inherit isearch))) "Face for highlighting query replacement matches." :group 'matching - :version "21.4") + :version "22.1") (defun query-replace-descr (string) (mapconcat 'isearch-text-char-description string "")) @@ -789,7 +789,7 @@ Compatibility function for \\[next-error] invocations." (t :background "gray")) "Face used to highlight matches permanently." :group 'matching - :version "21.4") + :version "22.1") (defcustom list-matching-lines-default-context-lines 0 "*Default number of context lines included around `list-matching-lines' matches. diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index a7cdc327e85..e4e52bbd746 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -116,7 +116,7 @@ (defgroup ruler-mode nil "Display a ruler in the header line." - :version "21.4" + :version "22.1" :group 'convenience) (defcustom ruler-mode-show-tab-stops nil diff --git a/lisp/server.el b/lisp/server.el index 2c946b90275..a0f41e59ff8 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -123,7 +123,7 @@ If it is a frame, use the frame's selected window. It is not meaningful to set this to a specific frame or window with Custom. Only programs can do so." :group 'server - :version "21.4" + :version "22.1" :type '(choice (const :tag "Use selected window" :match (lambda (widget value) (not (functionp value))) @@ -282,7 +282,7 @@ Server mode runs a process that accepts commands from the `emacsclient' program. See `server-start' and Info node `Emacs server'." :global t :group 'server - :version "21.4" + :version "22.1" ;; Fixme: Should this check for an existing server socket and do ;; nothing if there is one (for multiple Emacs sessions)? (server-start (not server-mode))) diff --git a/lisp/simple.el b/lisp/simple.el index 67e93c86230..25168baa9e0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -71,13 +71,13 @@ (defgroup next-error nil "next-error support framework." :group 'compilation - :version "21.4") + :version "22.1") (defface next-error '((t (:inherit region))) "Face used to highlight next error locus." :group 'next-error - :version "21.4") + :version "22.1") (defcustom next-error-highlight 0.1 "*Highlighting of locations in selected source buffers. @@ -90,7 +90,7 @@ If `fringe-arrow', indicate the locus by the fringe arrow." (const :tag "No highlighting" nil) (const :tag "Fringe arrow" 'fringe-arrow)) :group 'next-error - :version "21.4") + :version "22.1") (defcustom next-error-highlight-no-select 0.1 "*Highlighting of locations in non-selected source buffers. @@ -103,7 +103,7 @@ If `fringe-arrow', indicate the locus by the fringe arrow." (const :tag "No highlighting" nil) (const :tag "Fringe arrow" 'fringe-arrow)) :group 'next-error - :version "21.4") + :version "22.1") (defvar next-error-last-buffer nil "The most recent next-error buffer. @@ -902,7 +902,7 @@ display the result of expression evaluation." (eq this-command last-command) (if (boundp 'edebug-active) edebug-active))) (let ((char-string - (if (or (and (boundp 'edebug-active) edebug-active) + (if (or (if (boundp 'edebug-active) edebug-active) (memq this-command '(eval-last-sexp eval-print-last-sexp))) (prin1-char value)))) (if char-string @@ -1540,7 +1540,7 @@ leak memory. So you should make sure that you do not wait excessively long before answering the question." :type 'boolean :group 'undo - :version "21.4") + :version "22.1") (defvar undo-extra-outer-limit nil "If non-nil, an extra level of size that's ok in an undo item. @@ -2461,7 +2461,7 @@ The value should be a list of text properties to discard or t, which means to discard all text properties." :type '(choice (const :tag "All" t) (repeat symbol)) :group 'killing - :version "21.4") + :version "22.1") (defvar yank-window-start nil) (defvar yank-undo-function nil @@ -4674,7 +4674,8 @@ of the differing parts is, by contrast, slightly highlighted." (point-min) 'mouse-face)) (element-common-end - (+ (or element-start nil) common-string-length)) + (and element-start + (+ (or element-start nil) common-string-length))) (maxp (point-max))) (while (and element-start (< element-common-end maxp)) (when (and (get-char-property element-start 'mouse-face) @@ -5094,7 +5095,7 @@ Various Emacs features that update auxiliary information when point moves wait this many seconds after Emacs becomes idle before doing an update." :type 'number :group 'display - :version "21.4") + :version "22.1") (defvar vis-mode-saved-buffer-invisibility-spec nil "Saved value of `buffer-invisibility-spec' when Visible mode is on.") diff --git a/lisp/speedbar.el b/lisp/speedbar.el index a8f74de0b11..ecb213d52fd 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -711,7 +711,7 @@ incurs extra I/O, hence it slows down directory display proportionally to the number of subdirs." :group 'speedbar :type 'boolean - :version 21.4) + :version 22.1) (defun speedbar-add-supported-extension (extension) "Add EXTENSION as a new supported extension for speedbar tagging. diff --git a/lisp/startup.el b/lisp/startup.el index 9dc60f4705f..fee05350098 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -735,12 +735,14 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (<= (frame-parameter nil 'tool-bar-lines) 0)) (tool-bar-mode 1)) - ;; Can't do this init in defcustom because window-system isn't set. + ;; Can't do this init in defcustom because the relevant variables + ;; are not set. If you make any changes to the `or' form below, + ;; you should also change the corresponding expression in the + ;; defcustom in frame.el, or Custom will be badly confused. (unless (or noninteractive emacs-quick-startup (eq system-type 'ms-dos) (not (memq window-system '(x w32)))) - (setq-default blink-cursor t) (blink-cursor-mode 1)) (unless noninteractive diff --git a/lisp/subr.el b/lisp/subr.el index 2a5154b533e..0c3515cb731 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -810,9 +810,9 @@ Like the function `insert' except that any argument that is a number is converted into a string by expressing it in decimal." (dolist (el args) (insert (if (integerp el) (number-to-string el) el)))) -(make-obsolete 'insert-string 'insert "21.4") +(make-obsolete 'insert-string 'insert "22.1") (defun makehash (&optional test) (make-hash-table :test (or test 'eql))) -(make-obsolete 'makehash 'make-hash-table "21.4") +(make-obsolete 'makehash 'make-hash-table "22.1") ;; Some programs still use this as a function. (defun baud-rate () @@ -837,9 +837,9 @@ is converted into a string by expressing it in decimal." "use timers instead, with `run-with-idle-timer'." "before 19.34") (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) -(make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4") +(make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "22.1") (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) -(make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4") +(make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "22.1") (defvaralias 'messages-buffer-max-lines 'message-log-max) @@ -1156,7 +1156,7 @@ Optional args SENTINEL and FILTER specify the sentinel and filter (make-obsolete 'process-kill-without-query "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'." - "21.4") + "22.1") (defun process-kill-without-query (process &optional flag) "Say no query needed if PROCESS is running when Emacs is exited. Optional second argument if non-nil says to require a query. diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index 59ffbb29a4c..3b8687ce670 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -36,7 +36,7 @@ (defgroup conf nil "Configuration files." :group 'data - :version "21.4") + :version "22.1") (defcustom conf-assignment-column 24 "Align assignments to this column by default with \\[conf-align-assignments]. diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index b1a1b70397a..0dc7e932543 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -350,7 +350,7 @@ If this variable is customized, the custom value is used always. Otherwise, it is set to be buffer-local when the file has a DOCTYPE or an XML declaration." :type 'boolean - :version "21.4" + :version "22.1" :group 'sgml) (defvar sgml-empty-tags nil @@ -1213,7 +1213,7 @@ not the case, the first tag returned is the one inside which we are." (if (cdr tmp) (setcdr tmp (cddr tmp))))) (message "Unmatched tags <%s> and </%s>" (sgml-tag-name tag-info) (pop stack))))) - + (if (and (null stack) (sgml-unclosed-tag-p (sgml-tag-name tag-info))) ;; This is a top-level open of an implicitly closed tag, so any ;; occurrence of such an open tag at the same level can be ignored diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index f064dd4dee0..2c685753f1f 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -646,7 +646,7 @@ See `table-insert' for examples about how to use." :group 'wp :group 'paragraphs :group 'fill - :version "21.4") + :version "22.1") (defgroup table-hooks nil "Hooks for table manipulation utilities" diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index ee975c100b7..1b7533b939b 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -127,7 +127,7 @@ and the input file name, with no separating space and are not shell-quoted. If nil, TeX runs with no options. See the documentation of `tex-command'." :type 'string :group 'tex-run - :version "21.4") + :version "22.1") ;;;###autoload (defcustom tex-start-commands "\\nonstopmode\\input" @@ -139,7 +139,7 @@ If nil, no commands are used. See the documentation of `tex-command'." "\\nonstopmode\\input") (string :tag "String at your choice")) :group 'tex-run - :version "21.4") + :version "22.1") (defvar latex-standard-block-names '("abstract" "array" "center" "description" @@ -199,7 +199,7 @@ use." (defcustom tex-dvi-view-command '(cond ((eq window-system 'x) "xdvi") - ((eq window-system 'w32) "yap") + ((eq window-system 'w32) "yap") (t "dvi2tty * | cat -s")) "*Command used by \\[tex-view] to display a `.dvi' file. If it is a string, that specifies the command directly. @@ -1776,7 +1776,7 @@ FILE is typically the output DVI or PDF file." (when (file-newer-than-file-p f file) (setq uptodate nil))))) uptodate))) - + (autoload 'format-spec "format-spec") diff --git a/lisp/thumbs.el b/lisp/thumbs.el index b6a68df33c4..5ceb4f2c148 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -21,7 +21,7 @@ ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;; +;; ;; Thanks: Alex Schroeder <alex@gnu.org> for maintaining the package at some time ;; The peoples at #emacs@freenode.net for numerous help ;; RMS for emacs and the GNU project. @@ -62,7 +62,7 @@ (defgroup thumbs nil "Thumbnails previewer." - :version "21.4" + :version "22.1" :group 'multimedia) (defcustom thumbs-thumbsdir diff --git a/lisp/time.el b/lisp/time.el index ebc883b3d8e..850843402ca 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -131,7 +131,7 @@ background colour is the background of this face. Set this to make the mail indicator stand out on a colour display." :group 'faces :group 'display-time - :version "21.4" + :version "22.1" :type '(choice (const :tag "None" nil) face)) (defvar display-time-mail-icon @@ -153,7 +153,7 @@ of the mode line. It is specified by `display-time-mail-icon'." "String to use as the mail indicator in `display-time-string-forms'. This can use the Unicode letter character if you can display it." :group 'display-time - :version "21.4" + :version "22.1" :type '(choice (const "Mail") ;; Use :tag here because the Lucid menu won't display ;; multibyte text. diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index 54323e41dd3..2a20e708729 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el @@ -112,7 +112,7 @@ ;; (defgroup tree-widget nil "Customization support for the Tree Widget Library." - :version "21.4" + :version "22.1" :group 'widgets) (defcustom tree-widget-image-enable diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index e4073db4271..c3e17365242 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -30,7 +30,7 @@ (defgroup url nil "Uniform Resource Locator tool" - :version "21.4" + :version "22.1" :group 'hypermedia) (defgroup url-file nil diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 2bca3fb90b1..ec24282702b 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -42,7 +42,7 @@ (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-cvs-register-switches nil @@ -106,7 +106,7 @@ by these regular expressions." Format is according to `format-time-string'. Only used if `vc-cvs-sticky-tag-display' is t." :type '(string) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-cvs-sticky-tag-display t @@ -145,7 +145,7 @@ displayed. Date and time is displayed for sticky dates. See also variable `vc-cvs-sticky-date-format-string'." :type '(choice boolean function) - :version "21.4" + :version "22.1" :group 'vc) ;;; @@ -548,7 +548,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (append (vc-switches nil 'diff) '("/dev/null"))) ;; Even if it's empty, it's locally modified. 1) - (let* ((async (and (not vc-disable-async-diff) + (let* ((async (and (not vc-disable-async-diff) (vc-stay-local-p file) (fboundp 'start-process))) (status (apply 'vc-cvs-command (or buffer "*vc-diff*") diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 2dc8e1533f0..81a18eadd87 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -149,7 +149,7 @@ by these regular expressions." (set :format "%v" :inline t (const :format "%t" :tag "don't" except)) (regexp :format " stay local,\n%t: %v" :tag "if it matches") (repeat :format "%v%i\n" :inline t (regexp :tag "or")))) - :version "21.4" + :version "22.1" :group 'vc) (defun vc-stay-local-p (file) @@ -632,8 +632,15 @@ Before doing that, check if there are any old backups and get rid of them." (unless (and (fboundp 'msdos-long-file-names) (not (with-no-warnings (msdos-long-file-names)))) (vc-delete-automatic-version-backups file) - (copy-file file (vc-version-backup-file-name file) - nil 'keep-date))) + (condition-case nil + (copy-file file (vc-version-backup-file-name file) + nil 'keep-date) + ;; It's ok if it doesn't work (e.g. directory not writable), + ;; since this is just for efficiency. + (file-error + (message + (concat "Warning: Cannot make version backup; " + "diff/revert therefore not local")))))) (defun vc-before-save () "Function to be called by `basic-save-buffer' (in files.el)." diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el index aca8bcd66f0..eef01f2aad5 100644 --- a/lisp/vc-mcvs.el +++ b/lisp/vc-mcvs.el @@ -70,7 +70,7 @@ (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-mcvs-register-switches nil @@ -82,7 +82,7 @@ A string or list of strings passed to the checkin program by (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-mcvs-diff-switches nil @@ -92,13 +92,13 @@ A string or list of strings passed to the checkin program by (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-mcvs-header (or (cdr (assoc 'MCVS vc-header-alist)) vc-cvs-header) "*Header keywords to be inserted by `vc-insert-headers'." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'vc) @@ -107,7 +107,7 @@ A string or list of strings passed to the checkin program by This is only meaningful if you don't use the implicit checkout model \(i.e. if you have $CVSREAD set)." :type 'boolean - :version "21.4" + :version "22.1" :group 'vc) ;;; @@ -447,7 +447,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." ;; Even if it's empty, it's locally modified. 1) (let* ((async (and (not vc-disable-async-diff) - (vc-stay-local-p file) + (vc-stay-local-p file) (fboundp 'start-process))) ;; Run the command from the root dir so that `mcvs filt' returns ;; valid relative names. diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index f783066b39b..b6e3ac29568 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -51,7 +51,7 @@ (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-svn-register-switches nil @@ -63,7 +63,7 @@ A string or list of strings passed to the checkin program by (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-svn-diff-switches @@ -77,12 +77,12 @@ If you want to force an empty list of arguments, use t." (repeat :tag "Argument List" :value ("") string)) - :version "21.4" + :version "22.1" :group 'vc) (defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$")) "*Header keywords to be inserted by `vc-insert-headers'." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'vc) @@ -92,7 +92,7 @@ If you want to force an empty list of arguments, use t." This is only meaningful if you don't use the implicit checkout model \(i.e. if you have $SVNREAD set)." ;; :type 'boolean - ;; :version "21.4" + ;; :version "22.1" ;; :group 'vc ) diff --git a/lisp/vc.el b/lisp/vc.el index 4a26b88c0e3..2daf100ff57 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -573,7 +573,7 @@ if the local changes in the file have not been found and displayed yet." :type '(choice (const :tag "No" nil) (const :tag "Yes" t)) :group 'vc - :version "21.4") + :version "22.1") ;;;###autoload (defcustom vc-checkout-hook nil @@ -1827,7 +1827,7 @@ actually call the backend, but performs a local diff." ;; Old def for compatibility with Emacs-21.[123]. (defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff)) -(make-obsolete 'vc-diff-switches-list 'vc-switches "21.4") +(make-obsolete 'vc-diff-switches-list 'vc-switches "22.1") (defun vc-default-diff-tree (backend dir rev1 rev2) "List differences for all registered files at and below DIR. diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el index 72c4d30cc88..6a3ff36108e 100644 --- a/lisp/w32-vars.el +++ b/lisp/w32-vars.el @@ -30,7 +30,7 @@ (defgroup w32 nil "MS-Windows specific features" :group 'environment - :version "21.4" + :version "22.1" :prefix "w32") ;; Redefine the font selection to use the standard W32 dialog diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index a540c1b7af3..ef7cc1ccc73 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -47,7 +47,7 @@ The function shall return nil to reject the drop or a cons with two values, the wanted action as car and the wanted type as cdr. The wanted action can be copy, move, link, ask or private. The default value for this variable is `x-dnd-default-test-function'." - :version "21.4" + :version "22.1" :type 'symbol :group 'x) @@ -70,7 +70,7 @@ Insertion of text is not handeled by these functions, see `x-dnd-types-alist' for that. The function shall return the action done (move, copy, link or private) if some action was made, or nil if the URL is ignored." - :version "21.4" + :version "22.1" :type 'alist :group 'x) @@ -98,13 +98,13 @@ this drop (copy, move, link, private or ask) as determined by a previous call to `x-dnd-test-function'. DATA is the drop data. The function shall return the action used (copy, move, link or private) if drop is successful, nil if not." - :version "21.4" + :version "22.1" :type 'alist :group 'x) (defcustom x-dnd-open-file-other-window nil "If non-nil, always use find-file-other-window to open dropped files." - :version "21.4" + :version "22.1" :type 'boolean :group 'x) @@ -124,7 +124,7 @@ is successful, nil if not." ) "The types accepted by default for dropped data. The types are chosen in the order they appear in the list." - :version "21.4" + :version "22.1" :type '(repeat string) :group 'x ) @@ -135,10 +135,10 @@ The types are chosen in the order they appear in the list." "The current state for a drop. This is an alist with one entry for each display. The value for each display is a vector that contains the state for drag and drop for that display. -Elements in the vector are: +Elements in the vector are: Last buffer drag was in, last window drag was in, -types available for drop, +types available for drop, the action suggested by the source, the type we want for the drop, the action we want for the drop, @@ -209,7 +209,7 @@ action and type we got from `x-dnd-test-function'." (handler (cdr (assoc (cdr action-type) x-dnd-types-alist)))) ;; Ignore action-type if we have no handler. (setq current-state - (x-dnd-save-state window + (x-dnd-save-state window action (when handler action-type))))))) (let ((current-state (x-dnd-get-state-for-frame window))) @@ -300,13 +300,13 @@ Return nil if URI is not a local file." ((string-match "^file:" uri) ; Old KDE, Motif, Sun (substring uri (match-end 0)))))) (when (and f must-exist) - (let* ((decoded-f (decode-coding-string + (let* ((decoded-f (decode-coding-string f (or file-name-coding-system default-file-name-coding-system))) (try-f (if (file-readable-p decoded-f) decoded-f f))) (when (file-readable-p try-f) try-f))))) - + (defun x-dnd-open-local-file (uri action) "Open a local file. @@ -590,7 +590,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." (frame-parameter frame 'outer-window-id)) accept ;; 1 = Accept, 0 = reject. (x-dnd-get-drop-x-y frame window) - (x-dnd-get-drop-width-height + (x-dnd-get-drop-width-height frame window (eq accept 1)) (or reply-action 0) ))) @@ -612,9 +612,9 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." (setq action (if value (condition-case info - (x-dnd-drop-data event frame window value + (x-dnd-drop-data event frame window value (x-dnd-current-type window)) - (error + (error (message "Error: %s" info) nil)))) @@ -738,7 +738,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." ((eq message-type 'XmDRAG_MOTION) (let* ((state (x-dnd-get-state-for-frame frame)) (timestamp (x-dnd-motif-value-to-list - (x-dnd-get-motif-value data 4 4 + (x-dnd-get-motif-value data 4 4 source-byteorder) 4 my-byteorder)) (x (x-dnd-motif-value-to-list @@ -757,7 +757,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." (reply-flags (x-dnd-motif-value-to-list (if reply-action - (+ reply-action + (+ reply-action ?\x30 ; 30: valid drop site ?\x700) ; 700: can do copy, move or link ?\x30) ; 30: drop site, but noop. @@ -794,7 +794,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." (reply-flags (x-dnd-motif-value-to-list (if reply-action - (+ reply-action + (+ reply-action ?\x30 ; 30: valid drop site ?\x700) ; 700: can do copy, move or link ?\x30) ; 30: drop site, but noop @@ -833,7 +833,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." (reply-flags (x-dnd-motif-value-to-list (if reply-action - (+ reply-action + (+ reply-action ?\x30 ; 30: valid drop site ?\x700) ; 700: can do copy, move or link (+ ?\x30 ; 30: drop site, but noop. @@ -847,7 +847,7 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." reply-flags x y)) - (timestamp (x-dnd-get-motif-value + (timestamp (x-dnd-get-motif-value data 4 4 source-byteorder)) action) @@ -857,26 +857,26 @@ FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." "_MOTIF_DRAG_AND_DROP_MESSAGE" 8 reply) - (setq action + (setq action (when (and reply-action atom-name) (let* ((value (x-get-selection-internal (intern atom-name) (intern (x-dnd-current-type window))))) (when value (condition-case info - (x-dnd-drop-data event frame window value + (x-dnd-drop-data event frame window value (x-dnd-current-type window)) (error (message "Error: %s" info) nil)))))) (x-get-selection-internal - (intern atom-name) + (intern atom-name) (if action 'XmTRANSFER_SUCCESS 'XmTRANSFER_FAILURE) timestamp) (x-dnd-forget-drop frame))) (t (error "Unknown Motif DND message %s %s" message-atom data))))) - + ;;; diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b74ef44b0aa..ec5129e0b91 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,39 @@ +2005-02-10 Richard M. Stallman <rms@gnu.org> + + * objects.texi (Symbol Type): Minor correction. + +2005-02-06 Lute Kamstra <lute@gnu.org> + + * modes.texi (Example Major Modes): Fix typos. + +2005-02-06 Richard M. Stallman <rms@gnu.org> + + * text.texi (Margins): fill-nobreak-predicate can be one function. + + * strings.texi (Modifying Strings): clear-string can make unibyte. + (Formatting Strings): format gives error if values missing. + + * positions.texi (Character Motion): Mention default arg + for forward-char. backward-char refers to forward-char. + (Word Motion): Mention default arg for forward-word. + (Buffer End Motion): Mention default arg for beginning-of-buffer. + Simplify end-of-buffer. + (Text Lines): Mention default arg for forward-line. + (List Motion): Mention default arg for beginning/end-of-defun. + (Skipping Characters): Minor fixes in explaining character-set. + + * modes.texi (Major Mode Conventions): Mention "system abbrevs". + Mode inheritance applies only when default-major-mode is nil. + Clarifications. + (Example Major Modes): Update Text mode and Lisp mode examples. + (Minor Mode Conventions): Mention define-minor-mode at top. + (Defining Minor Modes): In Hungry example, don't define C-M-DEL. + (Mode Line Format): Update mode line face display info. + (Properties in Mode): Mention effect of risky vars. + (Imenu): Define imenu-add-to-menubar. + (Font Lock Mode): Add descriptions to menu lines. + (Faces for Font Lock): Add font-lock-doc-face. + 2005-02-05 Lute Kamstra <lute@gnu.org> * text.texi (Maintaining Undo): Remove obsolete function. diff --git a/lispref/modes.texi b/lispref/modes.texi index 24cf95d6985..d3f12d158b7 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -235,9 +235,11 @@ Comments,, Options Controlling Comments, emacs, The GNU Emacs Manual}. @item @cindex abbrev tables in modes The mode may have its own abbrev table or may share one with other -related modes. If it has its own abbrev table, it should store this in -a variable named @code{@var{modename}-mode-abbrev-table}. @xref{Abbrev -Tables}. +related modes. If it has its own abbrev table, it should store this +in a variable named @code{@var{modename}-mode-abbrev-table}. If the +major mode command defines any abbrevs itself, it should pass @code{t} +for the @var{system-flag} argument to @code{define-abbrev}. +@xref{Abbrev Tables}. @item The mode should specify how to do highlighting for Font Lock mode, by @@ -308,8 +310,9 @@ with value @code{special}, put on as follows: @end example @noindent -This tells Emacs that new buffers created while the current buffer is in -Funny mode should not inherit Funny mode. Modes such as Dired, Rmail, +This tells Emacs that new buffers created while the current buffer is +in Funny mode should not inherit Funny mode, in case +@code{default-major-mode} is @code{nil}. Modes such as Dired, Rmail, and Buffer List use this feature. @item @@ -321,9 +324,10 @@ autoload, you should add this element in the same file that calls file that contains the mode definition. @xref{Auto Major Mode}. @item -In the documentation, you should provide a sample @code{autoload} form -and an example of how to add to @code{auto-mode-alist}, that users can -include in their init files (@pxref{Init File}). +In the comments that document the file, you should provide a sample +@code{autoload} form and an example of how to add to +@code{auto-mode-alist}, that users can include in their init files +(@pxref{Init File}). @item @cindex mode loading @@ -341,46 +345,65 @@ the conventions listed above: @smallexample @group -;; @r{Create mode-specific tables.} -(defvar text-mode-syntax-table nil - "Syntax table used while in text mode.") +;; @r{Create the syntax table for this mode.} +(defvar text-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\" ". " st) + (modify-syntax-entry ?\\ ". " st) + ;; We add `p' so that M-c on 'hello' leads to 'Hello' rather than 'hello'. + (modify-syntax-entry ?' "w p" st) + st) + "Syntax table used while in `text-mode'.") @end group +;; @r{Create the keymap for this mode.} @group -(if text-mode-syntax-table - () ; @r{Do not change the table if it is already set up.} - (setq text-mode-syntax-table (make-syntax-table)) - (modify-syntax-entry ?\" ". " text-mode-syntax-table) - (modify-syntax-entry ?\\ ". " text-mode-syntax-table) - (modify-syntax-entry ?' "w " text-mode-syntax-table)) +(defvar text-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\e\t" 'ispell-complete-word) + (define-key map "\es" 'center-line) + (define-key map "\eS" 'center-paragraph) + map) + "Keymap for `text-mode'. +Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode', +inherit all the commands defined in this map.") @end group +@end smallexample + Here is how the actual mode command is defined now: + +@smallexample @group -(defvar text-mode-abbrev-table nil - "Abbrev table used while in text mode.") -(define-abbrev-table 'text-mode-abbrev-table ()) +(define-derived-mode text-mode nil "Text" + "Major mode for editing text written for humans to read. +In this mode, paragraphs are delimited only by blank or white lines. +You can thus get the full benefit of adaptive filling + (see the variable `adaptive-fill-mode'). +\\@{text-mode-map@} +Turning on Text mode runs the normal hook `text-mode-hook'." @end group - @group -(defvar text-mode-map nil ; @r{Create a mode-specific keymap.} - "Keymap for Text mode. -Many other modes, such as Mail mode, Outline mode and Indented Text mode, -inherit all the commands defined in this map.") - -(if text-mode-map - () ; @r{Do not change the keymap if it is already set up.} - (setq text-mode-map (make-sparse-keymap)) - (define-key text-mode-map "\e\t" 'ispell-complete-word) - (define-key text-mode-map "\t" 'indent-relative) - (define-key text-mode-map "\es" 'center-line) - (define-key text-mode-map "\eS" 'center-paragraph)) + (make-local-variable 'text-mode-variant) + (setq text-mode-variant t) + ;; @r{These two lines are a feature added recently.} + (set (make-local-variable 'require-final-newline) + mode-require-final-newline) + (set (make-local-variable 'indent-line-function) 'indent-relative)) @end group @end smallexample - This was formerly the complete major mode function definition for Text mode: + But here is how it was defined formerly, before +@code{define-derived-mode} existed: @smallexample @group +;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.} +(defvar text-mode-abbrev-table nil + "Abbrev table used while in text mode.") +(define-abbrev-table 'text-mode-abbrev-table ()) +@end group + +@group (defun text-mode () "Major mode for editing text intended for humans to read... Special commands: \\@{text-mode-map@} @@ -396,6 +419,9 @@ Turning on text-mode runs the hook `text-mode-hook'." (set-syntax-table text-mode-syntax-table) @end group @group + ;; @r{These four lines are absent from the current version} + ;; @r{not because this is done some other way, but rather} + ;; @r{because nowadays Text mode uses the normal definition of paragraphs.} (make-local-variable 'paragraph-start) (setq paragraph-start (concat "[ \t]*$\\|" page-delimiter)) (make-local-variable 'paragraph-separate) @@ -422,36 +448,48 @@ correspondingly more complicated. Here are excerpts from @group ;; @r{Create mode-specific table variables.} (defvar lisp-mode-syntax-table nil "") -(defvar emacs-lisp-mode-syntax-table nil "") (defvar lisp-mode-abbrev-table nil "") @end group @group -(if (not emacs-lisp-mode-syntax-table) ; @r{Do not change the table} - ; @r{if it is already set.} +(defvar emacs-lisp-mode-syntax-table + (let ((table (make-syntax-table))) (let ((i 0)) - (setq emacs-lisp-mode-syntax-table (make-syntax-table)) @end group @group - ;; @r{Set syntax of chars up to 0 to class of chars that are} + ;; @r{Set syntax of chars up to @samp{0} to say they are} ;; @r{part of symbol names but not words.} - ;; @r{(The number 0 is @code{48} in the @acronym{ASCII} character set.)} + ;; @r{(The digit @samp{0} is @code{48} in the @acronym{ASCII} character set.)} (while (< i ?0) - (modify-syntax-entry i "_ " emacs-lisp-mode-syntax-table) - (setq i (1+ i))) - @dots{} + (modify-syntax-entry i "_ " table) + (setq i (1+ i))) + ;; @r{@dots{} similar code follows for other character ranges.} @end group @group - ;; @r{Set the syntax for other characters.} - (modify-syntax-entry ? " " emacs-lisp-mode-syntax-table) - (modify-syntax-entry ?\t " " emacs-lisp-mode-syntax-table) - @dots{} + ;; @r{Then set the syntax codes for characters that are special in Lisp.} + (modify-syntax-entry ? " " table) + (modify-syntax-entry ?\t " " table) + (modify-syntax-entry ?\f " " table) + (modify-syntax-entry ?\n "> " table) +@end group +@group + ;; @r{Give CR the same syntax as newline, for selective-display.} + (modify-syntax-entry ?\^m "> " table) + (modify-syntax-entry ?\; "< " table) + (modify-syntax-entry ?` "' " table) + (modify-syntax-entry ?' "' " table) + (modify-syntax-entry ?, "' " table) +@end group +@group + ;; @r{@dots{}likewise for many other characters@dots{}} + (modify-syntax-entry ?\( "() " table) + (modify-syntax-entry ?\) ")( " table) + (modify-syntax-entry ?\[ "(] " table) + (modify-syntax-entry ?\] ")[ " table)) + table)) @end group @group - (modify-syntax-entry ?\( "() " emacs-lisp-mode-syntax-table) - (modify-syntax-entry ?\) ")( " emacs-lisp-mode-syntax-table) - @dots{})) ;; @r{Create an abbrev table for lisp-mode.} (define-abbrev-table 'lisp-mode-abbrev-table ()) @end group @@ -464,8 +502,8 @@ mode functions: @smallexample @group (defun lisp-mode-variables (lisp-syntax) - (cond (lisp-syntax - (set-syntax-table lisp-mode-syntax-table))) + (when lisp-syntax + (set-syntax-table lisp-mode-syntax-table)) (setq local-abbrev-table lisp-mode-abbrev-table) @dots{} @end group @@ -504,6 +542,7 @@ common. The following code sets up the common commands: (defvar shared-lisp-mode-map () "Keymap for commands shared by all sorts of Lisp modes.") +;; @r{Putting this @code{if} after the @code{defvar} is an older style.} (if shared-lisp-mode-map () (setq shared-lisp-mode-map (make-sparse-keymap)) @@ -557,6 +596,11 @@ if that value is non-nil." ; @r{finds out what to describe.} (setq mode-name "Lisp") ; @r{This goes into the mode line.} (lisp-mode-variables t) ; @r{This defines various variables.} + (make-local-variable 'comment-start-skip) + (setq comment-start-skip + "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") + (make-local-variable 'font-lock-keywords-case-fold-search) + (setq font-lock-keywords-case-fold-search t) @end group @group (setq imenu-case-fold-search t) @@ -911,7 +955,8 @@ function, the names of global symbols, and the use of keymaps and other tables. In addition, there are several conventions that are specific to -minor modes. +minor modes. (The easiest way to follow all the conventions is to use +the macro @code{define-minor-mode}; @ref{Defining Minor Modes}.) @itemize @bullet @item @@ -1001,7 +1046,7 @@ specify @code{:type boolean}. If just setting the variable is not sufficient to enable the mode, you should also specify a @code{:set} method which enables the mode by -invoke the mode command. Note in the variable's documentation string that +invoking the mode command. Note in the variable's documentation string that setting the variable other than via Custom may not take effect. Also mark the definition with an autoload cookie (@pxref{Autoload}), @@ -1124,11 +1169,7 @@ See the command \\[hungry-electric-delete]." ;; The indicator for the mode line. " Hungry" ;; The minor mode bindings. - '(("\C-\^?" . hungry-electric-delete) - ("\C-\M-\^?" - . (lambda () - (interactive) - (hungry-electric-delete t)))) + '(("\C-\^?" . hungry-electric-delete)) :group 'hunger) @end smallexample @@ -1137,10 +1178,10 @@ This defines a minor mode named ``Hungry mode'', a command named @code{hungry-mode} to toggle it, a variable named @code{hungry-mode} which indicates whether the mode is enabled, and a variable named @code{hungry-mode-map} which holds the keymap that is active when the -mode is enabled. It initializes the keymap with key bindings for -@kbd{C-@key{DEL}} and @kbd{C-M-@key{DEL}}. It puts the variable -@code{hungry-mode} into custom group @code{hunger}. There are no -@var{body} forms---many minor modes don't need any. +mode is enabled. It initializes the keymap with a key binding for +@kbd{C-@key{DEL}}. It puts the variable @code{hungry-mode} into +custom group @code{hunger}. There are no @var{body} forms---many +minor modes don't need any. Here's an equivalent way to write it: @@ -1216,8 +1257,9 @@ This function also forces recomputation of the menu bar menus and the frame title. @end defun - The mode line is usually displayed in inverse video; see -@code{mode-line-inverse-video} in @ref{Inverse Video}. + The selected window's mode line is usually displayed in a different +color using the face @code{mode-line}. Other windows' mode lines +appear in the face @code{mode-line-inactive} instead. @xref{Faces}. A window that is just one line tall does not display either a mode line or a header line, even if the variables call for one. A window @@ -1313,8 +1355,7 @@ A list whose first element is the symbol @code{:propertize} says to process the mode-line construct @var{elt} recursively and add the text properties specified by @var{props} to the result. The argument @var{props} should consist of zero or more pairs @var{text-property} -@var{value}. (This feature is new as of Emacs 21.4.) -@c FIXME: This might be Emacs 21.5. +@var{value}. (This feature is new as of Emacs 22.1.) @item (@var{symbol} @var{then} @var{else}) A list whose first element is a symbol that is not a keyword specifies a @@ -1703,6 +1744,13 @@ keymap, it can bind character keys and function keys; but that has no effect, since it is impossible to move point into the mode line. This keymap can only take real effect for mouse clicks. + When the mode line refers to a variable which does not have a +non-@code{nil} @code{risky-local-variable} property, any text +properties given or specified within that variable's values are +ignored. This is because such properties could otherwise specify +functions to be called, and those functions could come from file +local variables. + @node Header Lines @subsection Window Header Lines @cindex header line (of a window) @@ -1770,11 +1818,18 @@ section in the buffer, from a menu which lists all of them, to go directly to that location in the buffer. Imenu works by constructing a buffer index which lists the names and buffer positions of the definitions, or other named portions of the buffer; then the user can -choose one of them and move point to it. The user-level commands for -using Imenu are described in the Emacs Manual (@pxref{Imenu,, Imenu, -emacs, the Emacs Manual}). This section explains how to customize -Imenu's method of finding definitions or buffer portions for a -particular major mode. +choose one of them and move point to it. Major modes can add a menu +bar item to use Imenu using @code{imenu-add-to-menubar}. + +@defun imenu-add-to-menubar name +This function defines a local menu bar item named @var{name} +to run Imenu. +@end defun + + The user-level commands for using Imenu are described in the Emacs +Manual (@pxref{Imenu,, Imenu, emacs, the Emacs Manual}). This section +explains how to customize Imenu's method of finding definitions or +buffer portions for a particular major mode. The usual and simplest way is to set the variable @code{imenu-generic-expression}: @@ -1967,13 +2022,16 @@ comments and string constants, and highlights them using (@pxref{Faces for Font Lock}). Search-based fontification follows. @menu -* Font Lock Basics:: -* Search-based Fontification:: -* Other Font Lock Variables:: -* Levels of Font Lock:: -* Precalculated Fontification:: -* Faces for Font Lock:: -* Syntactic Font Lock:: +* Font Lock Basics:: Overview of customizing Font Lock. +* Search-based Fontification:: Fontification based on regexps. +* Other Font Lock Variables:: Additional customization facilities. +* Levels of Font Lock:: Each mode can define alternative levels + so that the user can select more or less. +* Precalculated Fontification:: How Lisp programs that produce the buffer + contents can also specify how to fontify it. +* Faces for Font Lock:: Special faces specifically for Font Lock. +* Syntactic Font Lock:: Defining character syntax based on context + using the Font Lock mechanism. @end menu @node Font Lock Basics @@ -2357,7 +2415,7 @@ wherever they appear. @node Precalculated Fontification @subsection Precalculated Fontification -In addition to using @code{font-lock-defaults} for search-based + In addition to using @code{font-lock-defaults} for search-based fontification, you may use the special character property @code{font-lock-face} (@pxref{Special Properties}). This property acts just like the explicit @code{face} property, but its activation @@ -2394,6 +2452,10 @@ Thus, the default value of @code{font-lock-comment-face} is @vindex font-lock-comment-face Used (typically) for comments. +@item font-lock-doc-face +@vindex font-lock-doc-face +Used (typically) for documentation strings in the code. + @item font-lock-string-face @vindex font-lock-string-face Used (typically) for string constants. diff --git a/lispref/objects.texi b/lispref/objects.texi index e945f075e65..43ecb02f09e 100644 --- a/lispref/objects.texi +++ b/lispref/objects.texi @@ -517,7 +517,7 @@ Lisp, upper case and lower case letters are distinct. Here are several examples of symbol names. Note that the @samp{+} in the fifth example is escaped to prevent it from being read as a number. -This is not necessary in the seventh example because the rest of the name +This is not necessary in the fourth example because the rest of the name makes it invalid as a number. @example diff --git a/lispref/positions.texi b/lispref/positions.texi index 32e423efdbc..282f897ebab 100644 --- a/lispref/positions.texi +++ b/lispref/positions.texi @@ -165,23 +165,20 @@ minibuffer. @c @kindex end-of-buffer This function moves point @var{count} characters forward, towards the end of the buffer (or backward, towards the beginning of the buffer, if -@var{count} is negative). If the function attempts to move point past -the beginning or end of the buffer (or the limits of the accessible -portion, when narrowing is in effect), an error is signaled with error -code @code{beginning-of-buffer} or @code{end-of-buffer}. +@var{count} is negative). If @var{count} is @code{nil}, the default +is 1. + +If this attempts to move past the beginning or end of the buffer (or +the limits of the accessible portion, when narrowing is in effect), it +signals an error with error symbol @code{beginning-of-buffer} or +@code{end-of-buffer}. In an interactive call, @var{count} is the numeric prefix argument. @end deffn @deffn Command backward-char &optional count -This function moves point @var{count} characters backward, towards the -beginning of the buffer (or forward, towards the end of the buffer, if -@var{count} is negative). If the function attempts to move point past -the beginning or end of the buffer (or the limits of the accessible -portion, when narrowing is in effect), an error is signaled with error -code @code{beginning-of-buffer} or @code{end-of-buffer}. - -In an interactive call, @var{count} is the numeric prefix argument. +This is just like @code{forward-char} except that it moves +in the opposite direction. @end deffn @node Word Motion @@ -192,12 +189,15 @@ whether a given character is part of a word. @xref{Syntax Tables}. @deffn Command forward-word &optional count This function moves point forward @var{count} words (or backward if -@var{count} is negative). ``Moving one word'' means moving until point -crosses a word-constituent character and then encounters a -word-separator character. However, this function cannot move point past -the boundary of the accessible portion of the buffer, or across a field -boundary (@pxref{Fields}). The most common case of a field boundary is -the end of the prompt in the minibuffer. +@var{count} is negative). If @var{count} is @code{nil}, it moves +forward one word. + +``Moving one word'' means moving until point crosses a +word-constituent character and then encounters a word-separator +character. However, this function cannot move point past the boundary +of the accessible portion of the buffer, or across a field boundary +(@pxref{Fields}). The most common case of a field boundary is the end +of the prompt in the minibuffer. If it is possible to move @var{count} words, without being stopped prematurely by the buffer boundary or a field boundary, the value is @@ -258,22 +258,24 @@ they set the mark and display messages in the echo area. @deffn Command beginning-of-buffer &optional n This function moves point to the beginning of the buffer (or the limits of the accessible portion, when narrowing is in effect), setting the -mark at the previous position. If @var{n} is non-@code{nil}, then it -puts point @var{n} tenths of the way from the beginning of the -accessible portion of the buffer. +mark at the previous position (except in Transient Mark mode, if +the mark is already active, it does not set the mark.) -In an interactive call, @var{n} is the numeric prefix argument, -if provided; otherwise @var{n} defaults to @code{nil}. +If @var{n} is non-@code{nil}, then it puts point @var{n} tenths of the +way from the beginning of the accessible portion of the buffer. In an +interactive call, @var{n} is the numeric prefix argument, if provided; +otherwise @var{n} defaults to @code{nil}. @strong{Warning:} Don't use this function in Lisp programs! @end deffn @deffn Command end-of-buffer &optional n -This function moves point to the end of the buffer (or the limits of the -accessible portion, when narrowing is in effect), setting the mark at -the previous position. If @var{n} is non-@code{nil}, then it puts point -@var{n} tenths of the way from the end of the accessible portion of the -buffer. +This function moves point to the end of the buffer (or the limits of +the accessible portion, when narrowing is in effect), setting the mark +at the previous position (except in Transient Mark mode when the mark +is already active). If @var{n} is non-@code{nil}, then it puts point +@var{n} tenths of the way from the end of the accessible portion of +the buffer. In an interactive call, @var{n} is the numeric prefix argument, if provided; otherwise @var{n} defaults to @code{nil}. @@ -373,7 +375,7 @@ This function moves point forward @var{count} lines, to the beginning of the line. If @var{count} is negative, it moves point @minus{}@var{count} lines backward, to the beginning of a line. If @var{count} is zero, it moves point to the beginning of the current -line. +line. If @var{count} is @code{nil}, that means 1. If @code{forward-line} encounters the beginning or end of the buffer (or of the accessible portion) before finding that many lines, it sets point @@ -703,13 +705,15 @@ This function moves backward across @var{arg} (default 1) balanced expressions. @deffn Command beginning-of-defun &optional arg This function moves back to the @var{arg}th beginning of a defun. If @var{arg} is negative, this actually moves forward, but it still moves -to the beginning of a defun, not to the end of one. +to the beginning of a defun, not to the end of one. @var{arg} defaults +to 1. @end deffn @deffn Command end-of-defun &optional arg This function moves forward to the @var{arg}th end of a defun. If @var{arg} is negative, this actually moves backward, but it still moves -to the end of a defun, not to the beginning of one. +to the end of a defun, not to the beginning of one. @var{arg} defaults +to 1. @end deffn @defopt defun-prompt-regexp @@ -761,12 +765,12 @@ then advances point if the character matches @var{character-set}. This continues until it reaches a character that does not match. The function returns the number of characters moved over. -The argument @var{character-set} is like the inside of a -@samp{[@dots{}]} in a regular expression except that @samp{]} is never -special and @samp{\} quotes @samp{^}, @samp{-} or @samp{\}. Thus, -@code{"a-zA-Z"} skips over all letters, stopping before the first -nonletter, and @code{"^a-zA-Z"} skips nonletters stopping before the -first letter. @xref{Regular Expressions}. +The argument @var{character-set} is a string, like the inside of a +@samp{[@dots{}]} in a regular expression except that @samp{]} does not +terminate it, and @samp{\} quotes @samp{^}, @samp{-} or @samp{\}. +Thus, @code{"a-zA-Z"} skips over all letters, stopping before the +first nonletter, and @code{"^a-zA-Z"} skips nonletters stopping before +the first letter. @xref{Regular Expressions}. If @var{limit} is supplied (it must be a number or a marker), it specifies the maximum position in the buffer that point can be skipped diff --git a/lispref/processes.texi b/lispref/processes.texi index 51d3d4c9845..d0d65fbfc2d 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi @@ -1314,7 +1314,7 @@ Not all operating systems support waiting periods other than multiples of a second; on those that do not, you get an error if you specify nonzero @var{millisec}. -@c Emacs 21.4 feature +@c Emacs 22.1 feature If @var{process} is a process, and the argument @var{just-this-one} is non-@code{nil}, only output from that process is handled, suspending output from other processes until some output has been received from that diff --git a/lispref/strings.texi b/lispref/strings.texi index a29e84f8edd..cca19ffbe92 100644 --- a/lispref/strings.texi +++ b/lispref/strings.texi @@ -383,8 +383,9 @@ character currently present at that point in @var{string}. @code{clear-string}: @defun clear-string string -This clears the contents of @var{string} to zeros -and may change its length. +This clears the contents of @var{string} to zeros. +It may also change @var{string}'s length and convert it to +a unibyte string. @end defun @need 2000 @@ -714,8 +715,8 @@ format specifications correspond to successive values from @var{objects}. Thus, the first format specification in @var{string} uses the first such value, the second format specification uses the second such value, and so on. Any extra format specifications (those -for which there are no corresponding values) cause unpredictable -behavior. Any extra values to be formatted are ignored. +for which there are no corresponding values) cause an error. Any +extra values to be formatted are ignored. Certain format specifications require values of particular types. If you supply a value that doesn't fit the requirements, an error is diff --git a/lispref/text.texi b/lispref/text.texi index 0e636d4ba58..f60dd9282b8 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -1598,11 +1598,13 @@ becomes buffer-local when set in any fashion. @end defvar @defvar fill-nobreak-predicate -This variable gives major modes a way to specify not to break a line at -certain places. Its value should be a function. This function is -called during filling, with no arguments and with point located at the -place where a break is being considered. If the function returns -non-@code{nil}, then the line won't be broken there. +This variable gives major modes a way to specify not to break a line +at certain places. Its value should be a list of functions, but a +single function is also supported for compatibility. Whenever filling +considers breaking the line at a certain place in the buffer, it calls +each of these functions with no arguments and with point located at +that place. If any of the functions returns non-@code{nil}, then the +line won't be broken there. @end defvar @node Adaptive Fill @@ -2884,7 +2886,7 @@ Strictly speaking, @code{font-lock-face} is not a built-in text property; rather, it is implemented in Font Lock mode using @code{char-property-alias-alist}. @xref{Examining Properties}. -This property is new in Emacs 21.4. +This property is new in Emacs 22.1. @item mouse-face @kindex mouse-face @r{(text property)} diff --git a/man/ChangeLog b/man/ChangeLog index 71185265be5..c2dc393be1d 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,74 @@ +2005-02-10 Jay Belanger <belanger@truman.edu> + + * calc.texi: Change @LaTeX to La@TeX throughout. + Redefine @expr as @math for TeX output. + Redefine @texline as a no-op for TeX output. + Define @tfn, replace @t by @tfn throughout. + +2005-02-09 Jay Belanger <belanger@truman.edu> + + * calc.texi: Add macro for LaTeX for info output. + +2005-02-08 Kim F. Storm <storm@cua.dk> + + * texinfo.tex (LaTex): Add def. + +2005-02-06 Jay Belanger <belanger@truman.edu> + + * calc.texi (TeX Language Mode): Add mention of LaTeX mode, and + change name to "TeX and LaTeX Language Modes." Mention LaTeX mode + throughout manual. + +2005-02-06 Lute Kamstra <lute@gnu.org> + + * basic.texi (Undo): Fix typo. + + * cmdargs.texi (Emacs Invocation): Fix typo. + + * custom.texi (Init Examples): Fix typo. + + * abbrevs.texi (Expanding Abbrevs): Fix typo. + +2005-02-06 Richard M. Stallman <rms@gnu.org> + + * regs.texi (Registers): Registers can hold numbers, too. + + * killing.texi (Other Kill Commands): Cleanup. + Delete redundant explanation of kill in read-only buffer. + (Yanking): Mention term "copying". + (Accumulating Text): Fix typo. + + * entering.texi (Entering Emacs): Update rationale at start. + (Exiting): Treat iconifying on a par with suspension. + + * custom.texi (Minor Modes): Fix typo. + (Easy Customization): Fix menu style. + (Variables): Add xref. + (Examining): Setting for future sessions works through .emacs. + (Keymaps): "Text terminals", not "Many". + (Init Rebinding): Explain \C-. Show example of \M-. + Fix minor wording errors. + (Function Keys): Explain vector syntax just once. + (Named ASCII Chars): Clarify history of TAB/C-i connection. + (Init File): Mention .emacs.d directory. + (Init Examples): Add xref. + (Find Init): Mention .emacs.d directory. + + * cmdargs.texi (Emacs Invocation): +LINENUM is also an option. + (Action Arguments): Explain which kinds of -l args are found how. + (Initial Options): --batch does not inhibit site-start. + Add xrefs. + (Command Example): Use --batch, not -batch. + + * basic.texi (Inserting Text): Cleanup wording. + (Moving Point): Doc PRIOR, PAGEUP, NEXT, PAGEDOWN more systematically. + C-n is not error at end of buffer. + (Undo): Doc C-/ like C-_. Add xrefs. + (Arguments): META key may be labeled ALT. + Peculiar arg meanings are explained in doc strings. + + * abbrevs.texi (Expanding Abbrevs): Clarify. + 2005-02-05 Eli Zaretskii <eliz@gnu.org> * frames.texi (Frame Parameters): Add an xref to the description @@ -129,7 +200,7 @@ remote files. 2005-01-15 Sergey Poznyakoff <gray@Mirddin.farlep.net> - + * man/rmail.texi (Movemail): Explain differences between standard and mailutils versions of movemail. Describe command line and configuration options introduced @@ -140,7 +211,7 @@ user names and user passwords for rmail. (Remote Mailboxes): New section. Describe how movemail handles remote mailboxes. Describe configuration - options used to control its behavior. + options used to control its behavior. (Other Mailbox Formats): Explain handling of various mailbox formats. @@ -324,7 +395,7 @@ 2004-12-08 Luc Teirlinck <teirllm@auburn.edu> * custom.texi (Saving Customizations): Emacs only loads the custom - file automatically after the init file in version 21.4 or later. + file automatically after the init file in version 22.1 or later. Adapt text and examples to this fact. * makefile.w32-in (INFO_TARGETS, DVI_TARGETS, $(infodir)/org) @@ -877,7 +948,7 @@ * reftex.texi (AUCTeX): Update links, section name. - * faq.texi (Calc): Update availability (included in 21.4). + * faq.texi (Calc): Update availability (included in 22.1). (AUCTeX): Update availability, information, versions, description. 2004-08-21 Luc Teirlinck <teirllm@auburn.edu> diff --git a/man/abbrevs.texi b/man/abbrevs.texi index e8cf2dc9c49..9ecdac7044f 100644 --- a/man/abbrevs.texi +++ b/man/abbrevs.texi @@ -153,14 +153,14 @@ point and you type a self-inserting whitespace or punctuation character (@key{SPC}, comma, etc.@:). More precisely, any character that is not a word constituent expands an abbrev, and any word-constituent character can be part of an abbrev. The most common way to use an abbrev is to -insert it and then insert a punctuation character to expand it. +insert it and then insert a punctuation or whitespace character to expand it. @vindex abbrev-all-caps Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find outer otter}; @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into @samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the -variable @code{abbrev-all-caps} (a non-@code{nil} value chooses the first -of the two expansions). +variable @code{abbrev-all-caps} (setting it non-@code{nil} specifies +@samp{FIND OUTER OTTER}). These commands are used to control abbrev expansion: diff --git a/man/basic.texi b/man/basic.texi index 1598de2632a..6a8ffc0000f 100644 --- a/man/basic.texi +++ b/man/basic.texi @@ -73,7 +73,7 @@ point, the one underneath the cursor, like @kbd{C-d} (see below). @cindex newline To end a line and start typing a new one, type @key{RET}. This inserts a newline character in the buffer. If point is in the middle of -a line, @key{RET} splits the line. Typing @key{DEL} when the cursor is +a line, the effect is to split the line. Typing @key{DEL} when the cursor is at the beginning of a line deletes the preceding newline, thus joining the line with the preceding line. @@ -219,17 +219,21 @@ numeric argument @var{n}, move to @var{n}/10 of the way from the top. @item M-> Move to the end of the buffer (@code{end-of-buffer}). @item C-v -Scroll the display one screen forward, and move point if necessary to put -it on the screen (@code{scroll-up}). This doesn't always -move point, but it is commonly used to do so. -If your keyboard has a @key{PAGEDOWN} key, it does the same thing. +@itemx @key{PAGEDOWN} +@itemx @key{PRIOR} +Scroll the display one screen forward, and move point if necessary to +put it on the screen (@code{scroll-up}). This doesn't always move +point, but it is commonly used to do so. If your keyboard has a +@key{PAGEDOWN} or @key{PRIOR} key, it does the same thing. Scrolling commands are further described in @ref{Scrolling}. @item M-v +@itemx @key{PAGEUP} +@itemx @key{NEXT} Scroll one screen backward, and move point if necessary to put it on the screen (@code{scroll-down}). This doesn't always move point, but -it is commonly used to do so. The @key{PAGEUP} key has the same -effect. +it is commonly used to do so. If your keyboard has a @key{PAGEUP} or +@key{NEXT} key, it does the same thing. @item M-x goto-char Read a number @var{n} and move point to buffer position @var{n}. Position 1 is the beginning of the buffer. @@ -256,11 +260,11 @@ to the end of another line. Normally, @code{track-eol} is @code{nil}. @xref{Variables}, for how to set variables such as @code{track-eol}. @vindex next-line-add-newlines - @kbd{C-n} normally gets an error when you use it on the last line of -the buffer (just as @kbd{C-p} gets an error on the first line). But -if you set the variable @code{next-line-add-newlines} to a -non-@code{nil} value, @kbd{C-n} on the last line of a buffer creates -an additional line at the end and moves down onto it. + @kbd{C-n} normally stops at the end of the bufer when you use it on +the last line of the buffer. But if you set the variable +@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on +the last line of a buffer creates an additional line at the end and +moves down onto it. @node Erasing @section Erasing Text @@ -319,6 +323,7 @@ tedious. @item C-x u Undo one batch of changes---usually, one command worth (@code{undo}). @item C-_ +@itemx C-/ The same. @item C-u C-x u Undo one batch of changes in the region. @@ -326,10 +331,12 @@ Undo one batch of changes in the region. @kindex C-x u @kindex C-_ +@kindex C-/ @findex undo - The command @kbd{C-x u} or @kbd{C-_} is how you undo. The first time -you give this command, it undoes the last change. Point moves back to -where it was before the command that made the change. + The command @kbd{C-x u} (or @kbd{C-_} or @kbd{C-/}) is how you undo. +The first time you give this command, it undoes the last change. +Point moves back to where it was before the command that made the +change. Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and earlier changes, back to the limit of the undo information available. @@ -345,14 +352,16 @@ the sequence of undoing, then type more undo commands. @cindex selective undo @kindex C-u C-x u Ordinary undo applies to all changes made in the current buffer. You -can also perform @dfn{selective undo}, limited to the current region. +can also perform @dfn{selective undo}, limited to the current region +(@pxref{Mark}). To do this, specify the region you want, then run the @code{undo} command with a prefix argument (the value does not matter): @kbd{C-u C-x u} or @kbd{C-u C-_}. This undoes the most recent change in the region. To undo further changes in the same region, repeat the @code{undo} -command (no prefix argument is needed). In Transient Mark mode, any use -of @code{undo} when there is an active region performs selective undo; -you do not need a prefix argument. +command (no prefix argument is needed). In Transient Mark mode +(@pxref{Transient Mark}), any use of @code{undo} when there is an +active region performs selective undo; you do not need a prefix +argument. If you notice that a buffer has been modified accidentally, the easiest way to recover is to type @kbd{C-_} repeatedly until the stars @@ -407,11 +416,10 @@ future. But if you didn't expect the command to create such large undo data, then it is probably a bug and you should report it. @xref{Bugs,, Reporting Bugs}. - The reason the @code{undo} command has two keys, @kbd{C-x u} and -@kbd{C-_}, set up to run it is that it is worthy of a single-character -key, but on some keyboards it is not obvious how to type @kbd{C-_}. -@kbd{C-x u} is an alternative you can type straightforwardly on any -terminal. + The reason the @code{undo} command has three key bindings, @kbd{C-x +u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a +single-character key, but @kbd{C-x u} is more straightforward for +beginners to type. @node Basic Files @section Files @@ -722,9 +730,10 @@ act in the opposite direction. @kindex M-@t{-} @findex digit-argument @findex negative-argument - If your terminal keyboard has a @key{META} key, the easiest way to -specify a numeric argument is to type digits and/or a minus sign while -holding down the @key{META} key. For example, + If your terminal keyboard has a @key{META} key (labeled @key{ALT} on +PC keyboards), the easiest way to specify a numeric argument is to +type digits and/or a minus sign while holding down the @key{META} key. +For example, @example M-5 C-n @@ -777,8 +786,9 @@ with an argument of one. (@xref{Killing}, for more information on A few commands treat a plain @kbd{C-u} differently from an ordinary argument. A few others may treat an argument of just a minus sign differently from an argument of @minus{}1. These unusual cases are -described when they come up; they are always for reasons of convenience -of use of the individual command. +described when they come up; they are always for reasons of +convenience of use of the individual command, and they are documented +in the command's documentation string. You can use a numeric argument to insert multiple copies of a character. This is straightforward unless the character is a digit; for diff --git a/man/calc.texi b/man/calc.texi index 6278d5a8d97..a816f1559a6 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -17,15 +17,11 @@ @c $x$ in TeX, @samp{x} otherwise. @iftex -@macro texline{stuff} -\stuff\ +@macro texline @end macro @alias infoline=comment -@tex -\gdef\exprsetup{\tex \let\t\ttfont \turnoffactive} -\gdef\expr{\exprsetup$\exprfinish} -\gdef\exprfinish#1{#1$\endgroup} -@end tex +@alias expr=math +@alias tfn=code @alias mathit=expr @macro cpi{} @math{@pi{}} @@ -41,6 +37,7 @@ \stuff\ @end macro @alias expr=samp +@alias tfn=t @alias mathit=i @macro cpi{} @expr{pi} @@ -663,7 +660,7 @@ Click on the @key{2}, @key{ENTER}, @key{3}, @key{+}, and @key{SQRT} ``buttons'' using your left mouse button. @noindent -Click on @key{PI}, @key{2}, and @t{y^x}. +Click on @key{PI}, @key{2}, and @tfn{y^x}. @noindent Click on @key{INV}, then @key{ENTER} to swap the two results. @@ -734,9 +731,10 @@ these equations for the variables @expr{x} and @expr{y}. @noindent Type @kbd{d B} to view the solutions in more readable notation. -Type @w{@kbd{d C}} to view them in C language notation, and @kbd{d T} -to view them in the notation for the @TeX{} typesetting system. -Type @kbd{d N} to return to normal notation. +Type @w{@kbd{d C}} to view them in C language notation, @kbd{d T} +to view them in the notation for the @TeX{} typesetting system, +and @kbd{d L} to view them in the notation for the La@TeX{} typesetting +system. Type @kbd{d N} to return to normal notation. @noindent Type @kbd{7.5}, then @kbd{s l a @key{RET}} to let @expr{a = 7.5} in these formulas. @@ -1119,10 +1117,10 @@ is Calc has added annotations to the file to help it remember the modes that were used for this formula. They are formatted like comments -in the @TeX{} typesetting language, just in case you are using @TeX{}. -(In this example @TeX{} is not being used, so you might want to move -these comments up to the top of the file or otherwise put them out -of the way.) +in the @TeX{} typesetting language, just in case you are using @TeX{} or +La@TeX{}. (In this example @TeX{} is not being used, so you might want +to move these comments up to the top of the file or otherwise put them +out of the way.) As an extra flourish, we can add an equation number using a righthand label: Type @kbd{d @} (1) @key{RET}}. @@ -5216,7 +5214,8 @@ One more mode that makes reading formulas easier is Big mode. Here things like powers, square roots, and quotients and fractions are displayed in a two-dimensional pictorial form. Calc has other -language modes as well, such as C mode, FORTRAN mode, and @TeX{} mode. +language modes as well, such as C mode, FORTRAN mode, @TeX{} mode +and La@TeX{} mode. @smallexample @group @@ -9069,9 +9068,9 @@ apply and the rewrites will stop right away. @starindex @end ignore @tindex nterms -If @expr{x} is the sum @expr{a + b}, then `@t{nterms(}@var{x}@t{)}' must -be `@t{nterms(}@var{a}@t{)}' plus `@t{nterms(}@var{b}@t{)}'. If @expr{x} -is not a sum, then `@t{nterms(}@var{x}@t{)}' = 1. +If @expr{x} is the sum @expr{a + b}, then `@tfn{nterms(}@var{x}@tfn{)}' must +be `@tfn{nterms(}@var{a}@tfn{)}' plus `@tfn{nterms(}@var{b}@tfn{)}'. If @expr{x} +is not a sum, then `@tfn{nterms(}@var{x}@tfn{)}' = 1. @smallexample @group @@ -10870,8 +10869,8 @@ Rectangular complex numbers can also be displayed in @samp{@var{a}+@var{b}i} notation; @pxref{Complex Formats}. Polar complex numbers are displayed in the form -@texline `@t{(}@var{r}@t{;}@math{\theta}@t{)}' -@infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}' +@texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}' +@infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}' where @var{r} is the nonnegative magnitude and @texline @math{\theta} @infoline @var{theta} @@ -11288,7 +11287,7 @@ conversions. A @dfn{modulo form} is a real number which is taken modulo (i.e., within an integer multiple of) some value @var{M}. Arithmetic modulo @var{M} often arises in number theory. Modulo forms are written -`@var{a} @t{mod} @var{M}', +`@var{a} @tfn{mod} @var{M}', where @var{a} and @var{M} are real numbers or HMS forms, and @texline @math{0 \le a < M}. @infoline @expr{0 <= a < @var{M}}. @@ -11312,15 +11311,15 @@ are integers, this calculation is done much more efficiently than actually computing the power and then reducing.) @cindex Modulo division -Two modulo forms `@var{a} @t{mod} @var{M}' and `@var{b} @t{mod} @var{M}' +Two modulo forms `@var{a} @tfn{mod} @var{M}' and `@var{b} @tfn{mod} @var{M}' can be divided if @expr{a}, @expr{b}, and @expr{M} are all integers. The result is the modulo form which, when multiplied by -`@var{b} @t{mod} @var{M}', produces `@var{a} @t{mod} @var{M}'. If +`@var{b} @tfn{mod} @var{M}', produces `@var{a} @tfn{mod} @var{M}'. If there is no solution to this equation (which can happen only when @expr{M} is non-prime), or if any of the arguments are non-integers, the division is left in symbolic form. Other operations, such as square roots, are not yet supported for modulo forms. (Note that, although -@w{`@t{(}@var{a} @t{mod} @var{M}@t{)^.5}'} will compute a ``modulo square root'' +@w{`@tfn{(}@var{a} @tfn{mod} @var{M}@tfn{)^.5}'} will compute a ``modulo square root'' in the sense of reducing @texline @math{\sqrt a} @infoline @expr{sqrt(a)} @@ -11372,8 +11371,8 @@ The algebraic function @samp{makemod(a, m)} builds the modulo form @cindex Standard deviations An @dfn{error form} is a number with an associated standard deviation, as in @samp{2.3 +/- 0.12}. The notation -@texline `@var{x} @t{+/-} @math{\sigma}' -@infoline `@var{x} @t{+/-} sigma' +@texline `@var{x} @tfn{+/-} @math{\sigma}' +@infoline `@var{x} @tfn{+/-} sigma' stands for an uncertain value which follows a normal or Gaussian distribution of mean @expr{x} and standard deviation or ``error'' @@ -11419,11 +11418,11 @@ Consult a good text on error analysis for a discussion of the proper use of standard deviations. Actual errors often are neither Gaussian-distributed nor uncorrelated, and the above formulas are valid only when errors are small. As an example, the error arising from -@texline `@t{sin(}@var{x} @t{+/-} @math{\sigma}@t{)}' -@infoline `@t{sin(}@var{x} @t{+/-} @var{sigma}@t{)}' +@texline `@tfn{sin(}@var{x} @tfn{+/-} @math{\sigma}@tfn{)}' +@infoline `@tfn{sin(}@var{x} @tfn{+/-} @var{sigma}@tfn{)}' is -@texline `@math{\sigma} @t{abs(cos(}@var{x}@t{))}'. -@infoline `@var{sigma} @t{abs(cos(}@var{x}@t{))}'. +@texline `@math{\sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. +@infoline `@var{sigma} @tfn{abs(cos(}@var{x}@tfn{))}'. When @expr{x} is close to zero, @texline @math{\cos x} @infoline @expr{cos(x)} @@ -11555,14 +11554,14 @@ contain zero inside them Calc is forced to give the result, While it may seem that intervals and error forms are similar, they are based on entirely different concepts of inexact quantities. An error form -@texline `@var{x} @t{+/-} @math{\sigma}' -@infoline `@var{x} @t{+/-} @var{sigma}' +@texline `@var{x} @tfn{+/-} @math{\sigma}' +@infoline `@var{x} @tfn{+/-} @var{sigma}' means a variable is random, and its value could be anything but is ``probably'' within one @texline @math{\sigma} @infoline @var{sigma} of the mean value @expr{x}. An interval -`@t{[}@var{a} @t{..@:} @var{b}@t{]}' means a +`@tfn{[}@var{a} @tfn{..@:} @var{b}@tfn{]}' means a variable's value is unknown, but guaranteed to lie in the specified range. Error forms are statistical or ``average case'' approximations; interval arithmetic tends to produce ``worst case'' bounds on an @@ -12740,9 +12739,7 @@ The @kbd{m D} (@code{calc-default-simplify-mode}) command restores the default simplifications for all formulas. This includes many easy and fast algebraic simplifications such as @expr{a+0} to @expr{a}, and @expr{a + 2 a} to @expr{3 a}, as well as evaluating functions like -@texline @t{deriv}@expr{(x^2,x)} -@infoline @expr{@t{deriv}(x^2, x)} -to @expr{2 x}. +@expr{@tfn{deriv}(x^2, x)} to @expr{2 x}. @kindex m B @pindex calc-bin-simplify-mode @@ -13920,7 +13917,7 @@ left or right as you prefer. @noindent The commands in this section change Calc to use a different notation for entry and display of formulas, corresponding to the conventions of some -other common language such as Pascal or @TeX{}. Objects displayed on the +other common language such as Pascal or La@TeX{}. Objects displayed on the stack or yanked from the Calculator to an editing buffer will be formatted in the current language; objects entered in algebraic entry or yanked from another buffer will be interpreted according to the current language. @@ -13945,10 +13942,10 @@ the brackets in @samp{a[1]} and @samp{a[2]}, would not have known that and would have written the formula back with notations (like implicit multiplication) which would not have been legal for a C program. -As another example, suppose you are maintaining a C program and a @TeX{} +As another example, suppose you are maintaining a C program and a La@TeX{} document, each of which needs a copy of the same formula. You can grab the -formula from the program in C mode, switch to @TeX{} mode, and yank the -formula into the document in @TeX{} math-mode format. +formula from the program in C mode, switch to La@TeX{} mode, and yank the +formula into the document in La@TeX{} math-mode format. Language modes are selected by typing the letter @kbd{d} followed by a shifted letter key. @@ -13956,7 +13953,7 @@ shifted letter key. @menu * Normal Language Modes:: * C FORTRAN Pascal:: -* TeX Language Mode:: +* TeX and LaTeX Language Modes:: * Eqn Language Mode:: * Mathematica Language Mode:: * Maple Language Mode:: @@ -14066,7 +14063,7 @@ all four modes, and unformatted notation works in any language mode (except that Mathematica mode expects square brackets instead of parentheses). -@node C FORTRAN Pascal, TeX Language Mode, Normal Language Modes, Language Modes +@node C FORTRAN Pascal, TeX and LaTeX Language Modes, Normal Language Modes, Language Modes @subsection C, FORTRAN, and Pascal Modes @noindent @@ -14141,72 +14138,122 @@ modes will use upper-case letters exclusively for display, and will convert to lower-case on input. With a negative prefix, these modes convert to lower-case for display and input. -@node TeX Language Mode, Eqn Language Mode, C FORTRAN Pascal, Language Modes -@subsection @TeX{} Language Mode +@node TeX and LaTeX Language Modes, Eqn Language Mode, C FORTRAN Pascal, Language Modes +@subsection @TeX{} and La@TeX{} Language Modes @noindent @kindex d T @pindex calc-tex-language @cindex TeX language +@kindex d L +@pindex calc-latex-language +@cindex LaTeX language The @kbd{d T} (@code{calc-tex-language}) command selects the conventions -of ``math mode'' in the @TeX{} typesetting language, by Donald Knuth. -Formulas are entered -and displayed in @TeX{} notation, as in @samp{\sin\left( a \over b \right)}. -Math formulas are usually enclosed by @samp{$ $} signs in @TeX{}; these -should be omitted when interfacing with Calc. To Calc, the @samp{$} sign -has the same meaning it always does in algebraic formulas (a reference to -an existing entry on the stack). +of ``math mode'' in Donald Knuth's @TeX{} typesetting language, +and the @kbd{d L} (@code{calc-latex-language}) command selects the +conventions of ``math mode'' in La@TeX{}, a typesetting language that +uses @TeX{} as its formatting engine. Calc's La@TeX{} language mode can +read any formula that the @TeX{} language mode can, although La@TeX{} +mode may display it differently. + +Formulas are entered and displayed in the appropriate notation; +@texline @math{\sin(a/b)} +@infoline @expr{sin(a/b)} +will appear as @samp{\sin\left( a \over b \right)} in @TeX{} mode and +@samp{\sin\left(\frac@{a@}@{b@}\right)} in La@TeX{} mode. +Math formulas are often enclosed by @samp{$ $} signs in @TeX{} and +La@TeX{}; these should be omitted when interfacing with Calc. To Calc, +the @samp{$} sign has the same meaning it always does in algebraic +formulas (a reference to an existing entry on the stack). Complex numbers are displayed as in @samp{3 + 4i}. Fractions and -quotients are written using @code{\over}; -binomial coefficients are written with @code{\choose}. -Interval forms are written with @code{\ldots}, and -error forms are written with @code{\pm}. -Absolute values are written as in @samp{|x + 1|}, and the floor and -ceiling functions are written with @code{\lfloor}, @code{\rfloor}, etc. -The words @code{\left} and @code{\right} are ignored when reading -formulas in @TeX{} mode. Both @code{inf} and @code{uinf} are written -as @code{\infty}; when read, @code{\infty} always translates to -@code{inf}. +quotients are written using @code{\over} in @TeX{} mode (as in +@code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in +@code{\frac@{a@}@{b@}}); binomial coefficients are written with +@code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and +@code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}). +Interval forms are written with @code{\ldots}, and error forms are +written with @code{\pm}. Absolute values are written as in +@samp{|x + 1|}, and the floor and ceiling functions are written with +@code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and +@code{\right} are ignored when reading formulas in @TeX{} and La@TeX{} +modes. Both @code{inf} and @code{uinf} are written as @code{\infty}; +when read, @code{\infty} always translates to @code{inf}. Function calls are written the usual way, with the function name followed -by the arguments in parentheses. However, functions for which @TeX{} has -special names (like @code{\sin}) will use curly braces instead of -parentheses for very simple arguments. During input, curly braces and -parentheses work equally well for grouping, but when the document is -formatted the curly braces will be invisible. Thus the printed result is +by the arguments in parentheses. However, functions for which @TeX{} +and La@TeX{} have special names (like @code{\sin}) will use curly braces +instead of parentheses for very simple arguments. During input, curly +braces and parentheses work equally well for grouping, but when the +document is formatted the curly braces will be invisible. Thus the +printed result is @texline @math{\sin{2 x}} @infoline @expr{sin 2x} but @texline @math{\sin(2 + x)}. @infoline @expr{sin(2 + x)}. -Function and variable names not treated specially by @TeX{} are simply -written out as-is, which will cause them to come out in italic letters -in the printed document. If you invoke @kbd{d T} with a positive numeric -prefix argument, names of more than one character will instead be written -@samp{\hbox@{@var{name}@}}. The @samp{\hbox@{ @}} notation is ignored -during reading. If you use a negative prefix argument, such function -names are written @samp{\@var{name}}, and function names that begin -with @code{\} during reading have the @code{\} removed. (Note that -in this mode, long variable names are still written with @code{\hbox}. -However, you can always make an actual variable name like @code{\bar} -in any @TeX{} mode.) +Function and variable names not treated specially by @TeX{} and La@TeX{} +are simply written out as-is, which will cause them to come out in +italic letters in the printed document. If you invoke @kbd{d T} or +@kbd{d L} with a positive numeric prefix argument, names of more than +one character will instead be enclosed in a protective commands that +will prevent them from being typeset in the math italics; they will be +written @samp{\hbox@{@var{name}@}} in @TeX{} mode and +@samp{\text@{@var{name}@}} in La@TeX{} mode. The +@samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during +reading. If you use a negative prefix argument, such function names are +written @samp{\@var{name}}, and function names that begin with @code{\} during +reading have the @code{\} removed. (Note that in this mode, long +variable names are still written with @code{\hbox} or @code{\text}. +However, you can always make an actual variable name like @code{\bar} in +any @TeX{} mode.) During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced by @samp{[ ...@: ]}. The same also applies to @code{\pmatrix} and -@code{\bmatrix}. The symbol @samp{&} is interpreted as a comma, +@code{\bmatrix}. In La@TeX{} mode this also applies to +@samp{\begin@{matrix@} ... \end@{matrix@}}, +@samp{\begin@{bmatrix@} ... \end@{bmatrix@}}, +@samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as +@samp{\begin@{smallmatrix@} ... \end@{smallmatrix@}}. +The symbol @samp{&} is interpreted as a comma, and the symbols @samp{\cr} and @samp{\\} are interpreted as semicolons. During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}} -format; you may need to edit this afterwards to change @code{\matrix} -to @code{\pmatrix} or @code{\\} to @code{\cr}. +format in @TeX{} mode and in +@samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in +La@TeX{} mode; you may need to edit this afterwards to change to your +preferred matrix form. If you invoke @kbd{d T} or @kbd{d L} with an +argument of 2 or -2, then matrices will be displayed in two-dimensional +form, such as + +@example +\begin@{pmatrix@} +a & b \\ +c & d +\end@{pmatrix@} +@end example + +@noindent +This may be convenient for isolated matrices, but could lead to +expressions being displayed like + +@example +\begin@{pmatrix@} \times x +a & b \\ +c & d +\end@{pmatrix@} +@end example + +@noindent +While this wouldn't bother Calc, it is incorrect La@TeX{}. +(Similarly for @TeX{}.) Accents like @code{\tilde} and @code{\bar} translate into function calls internally (@samp{tilde(x)}, @samp{bar(x)}). The @code{\underline} sequence is treated as an accent. The @code{\vec} accent corresponds to the function name @code{Vec}, because @code{vec} is the name of a built-in Calc function. The following table shows the accents -in Calc, @TeX{}, and @dfn{eqn} (described in the next section): +in Calc, @TeX{}, La@TeX{} and @dfn{eqn} (described in the next section): @iftex @begingroup @@ -14220,26 +14267,58 @@ in Calc, @TeX{}, and @dfn{eqn} (described in the next section): @ignore @starindex @end ignore +@tindex Acute +@ignore +@starindex +@end ignore @tindex bar @ignore @starindex @end ignore +@tindex Bar +@ignore +@starindex +@end ignore @tindex breve @ignore @starindex @end ignore +@tindex Breve +@ignore +@starindex +@end ignore @tindex check @ignore @starindex @end ignore +@tindex Check +@ignore +@starindex +@end ignore +@tindex dddot +@ignore +@starindex +@end ignore +@tindex ddddot +@ignore +@starindex +@end ignore @tindex dot @ignore @starindex @end ignore +@tindex Dot +@ignore +@starindex +@end ignore @tindex dotdot @ignore @starindex @end ignore +@tindex DotDot +@ignore +@starindex +@end ignore @tindex dyad @ignore @starindex @@ -14248,10 +14327,18 @@ in Calc, @TeX{}, and @dfn{eqn} (described in the next section): @ignore @starindex @end ignore +@tindex Grave +@ignore +@starindex +@end ignore @tindex hat @ignore @starindex @end ignore +@tindex Hat +@ignore +@starindex +@end ignore @tindex Prime @ignore @starindex @@ -14260,30 +14347,50 @@ in Calc, @TeX{}, and @dfn{eqn} (described in the next section): @ignore @starindex @end ignore +@tindex Tilde +@ignore +@starindex +@end ignore @tindex under @ignore @starindex @end ignore @tindex Vec +@ignore +@starindex +@end ignore +@tindex VEC @iftex @endgroup @end iftex @example -Calc TeX eqn ----- --- --- -acute \acute -bar \bar bar -breve \breve -check \check -dot \dot dot -dotdot \ddot dotdot -dyad dyad -grave \grave -hat \hat hat -Prime prime -tilde \tilde tilde -under \underline under -Vec \vec vec +Calc TeX LaTeX eqn +---- --- ----- --- +acute \acute \acute +Acute \Acute +bar \bar \bar bar +Bar \Bar +breve \breve \breve +Breve \Breve +check \check \check +Check \Check +dddot \dddot +ddddot \ddddot +dot \dot \dot dot +Dot \Dot +dotdot \ddot \ddot dotdot +DotDot \Ddot +dyad dyad +grave \grave \grave +Grave \Grave +hat \hat \hat hat +Hat \Hat +Prime prime +tilde \tilde \tilde tilde +Tilde \Tilde +under \underline \underline under +Vec \vec \vec vec +VEC \Vec @end example The @samp{=>} (evaluates-to) operator appears as a @code{\to} symbol: @@ -14320,8 +14427,9 @@ reading is: \evalto @end example -Note that, because these symbols are ignored, reading a @TeX{} formula -into Calc and writing it back out may lose spacing and font information. +Note that, because these symbols are ignored, reading a @TeX{} or +La@TeX{} formula into Calc and writing it back out may lose spacing and +font information. Also, the ``discretionary multiplication sign'' @samp{\*} is read the same as @samp{*}. @@ -14449,7 +14557,7 @@ $$ \pmatrix{ {a \over b} & 0 \cr 0 & 2^{(x + 1)} } $$ @sp 2 @end iftex -@node Eqn Language Mode, Mathematica Language Mode, TeX Language Mode, Language Modes +@node Eqn Language Mode, Mathematica Language Mode, TeX and LaTeX Language Modes, Language Modes @subsection Eqn Language Mode @noindent @@ -14491,7 +14599,7 @@ treated the same as a space in @dfn{eqn} mode, as is the @samp{~} symbol (these are used to introduce spaces of various widths into the typeset output of @dfn{eqn}). -As in @TeX{} mode, Calc's formatter omits parentheses around the +As in La@TeX{} mode, Calc's formatter omits parentheses around the arguments of functions like @code{ln} and @code{sin} if they are ``simple-looking''; in this case Calc surrounds the argument with braces, separated by a @samp{~} from the function name: @samp{sin~@{x@}}. @@ -14505,17 +14613,17 @@ are treated the same as curly braces: @samp{sqrt "1+x"} is equivalent to of quotes in @dfn{eqn}, but it is good enough for most uses. Accent codes (@samp{@var{x} dot}) are handled by treating them as -function calls (@samp{dot(@var{x})}) internally. @xref{TeX Language -Mode}, for a table of these accent functions. The @code{prime} accent -is treated specially if it occurs on a variable or function name: -@samp{f prime prime @w{( x prime )}} is stored internally as -@samp{f'@w{'}(x')}. For example, taking the derivative of @samp{f(2 x)} -with @kbd{a d x} will produce @samp{2 f'(2 x)}, which @dfn{eqn} mode -will display as @samp{2 f prime ( 2 x )}. +function calls (@samp{dot(@var{x})}) internally. +@xref{TeX and LaTeX Language Modes}, for a table of these accent +functions. The @code{prime} accent is treated specially if it occurs on +a variable or function name: @samp{f prime prime @w{( x prime )}} is +stored internally as @samp{f'@w{'}(x')}. For example, taking the +derivative of @samp{f(2 x)} with @kbd{a d x} will produce @samp{2 f'(2 +x)}, which @dfn{eqn} mode will display as @samp{2 f prime ( 2 x )}. Assignments are written with the @samp{<-} (left-arrow) symbol, and @code{evalto} operators are written with @samp{->} or -@samp{evalto ... ->} (@pxref{TeX Language Mode}, for a discussion +@samp{evalto ... ->} (@pxref{TeX and LaTeX Language Modes}, for a discussion of this). The regular Calc symbols @samp{:=} and @samp{=>} are also recognized for these operators during reading. @@ -15820,7 +15928,10 @@ Pascal language mode (@kbd{d P}). FORTRAN language mode (@kbd{d F}). @item TeX -@TeX{} language mode (@kbd{d T}; @pxref{TeX Language Mode}). +@TeX{} language mode (@kbd{d T}; @pxref{TeX and LaTeX Language Modes}). + +@item LaTeX +La@TeX{} language mode (@kbd{d L}; @pxref{TeX and LaTeX Language Modes}). @item Eqn @dfn{Eqn} language mode (@kbd{d E}; @pxref{Eqn Language Mode}). @@ -16396,7 +16507,7 @@ no second argument at all. @cindex Fractional part of a number To compute the fractional part of a number (i.e., the amount which, when -added to `@t{floor(}@var{n}@t{)}', will produce @var{n}) just take @var{n} +added to `@tfn{floor(}@var{n}@tfn{)}', will produce @var{n}) just take @var{n} modulo 1 using the @code{%} command. Note also the @kbd{\} (integer quotient), @kbd{f I} (integer logarithm), @@ -16423,8 +16534,8 @@ this command replaces each element by its complex conjugate. The @kbd{G} (@code{calc-argument}) [@code{arg}] command computes the ``argument'' or polar angle of a complex number. For a number in polar notation, this is simply the second component of the pair -@texline `@t{(}@var{r}@t{;}@math{\theta}@t{)}'. -@infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}'. +@texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}'. +@infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}'. The result is expressed according to the current angular mode and will be in the range @mathit{-180} degrees (exclusive) to @mathit{+180} degrees (inclusive), or the equivalent range in radians. @@ -18692,7 +18803,7 @@ where @var{m} and are both real numbers, the result uses a Gaussian distribution with mean @var{m} and standard deviation @texline @math{\sigma}. -@var{s}. +@infoline @var{s}. If @expr{M} is an interval form, the lower and upper bounds specify the acceptable limits of the random numbers. If both bounds are integers, @@ -20372,7 +20483,7 @@ has an infinite weight, next to which an error form with a finite weight is completely negligible.) This function also works for distributions (error forms or -intervals). The mean of an error form `@var{a} @t{+/-} @var{b}' is simply +intervals). The mean of an error form `@var{a} @tfn{+/-} @var{b}' is simply @expr{a}. The mean of an interval is the mean of the minimum and maximum values of the interval. @@ -22144,17 +22255,17 @@ Manipulation}. The @kbd{m D} command turns the default simplifications back on. The most basic default simplification is the evaluation of functions. -For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@t{sqrt}(9)} +For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@tfn{sqrt}(9)} is evaluated to @expr{3}. Evaluation does not occur if the arguments -to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}), -range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), -or if the function name is not recognized (@expr{@t{f}(5)}), or if +to a function are somehow of the wrong type @expr{@tfn{tan}([2,3,4])}), +range (@expr{@tfn{tan}(90)}), or number (@expr{@tfn{tan}(3,5)}), +or if the function name is not recognized (@expr{@tfn{f}(5)}), or if Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation -(@expr{@t{sqrt}(2)}). +(@expr{@tfn{sqrt}(2)}). Calc simplifies (evaluates) the arguments to a function before it -simplifies the function itself. Thus @expr{@t{sqrt}(5+4)} is -simplified to @expr{@t{sqrt}(9)} before the @code{sqrt} function +simplifies the function itself. Thus @expr{@tfn{sqrt}(5+4)} is +simplified to @expr{@tfn{sqrt}(9)} before the @code{sqrt} function itself is applied. There are very few exceptions to this rule: @code{quote}, @code{lambda}, and @code{condition} (the @code{::} operator) do not evaluate their arguments, @code{if} (the @code{? :} @@ -22279,7 +22390,7 @@ terms of the product: @expr{x^a x^b} goes to @texline @math{x^{a+b}} @infoline @expr{x^(a+b)} where @expr{a} is a number, or an implicit 1 (as in @expr{x}), -or the implicit one-half of @expr{@t{sqrt}(x)}, and similarly for +or the implicit one-half of @expr{@tfn{sqrt}(x)}, and similarly for @expr{b}. The result is written using @samp{sqrt} or @samp{1/sqrt} if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively. If the sum of the powers is zero, the product is simplified to @@ -22370,20 +22481,20 @@ is safe to simplify, but is not.) @xref{Declarations}, for ways to inform Calc that your variables satisfy these requirements. -As a special case of this rule, @expr{@t{sqrt}(x)^n} is simplified to +As a special case of this rule, @expr{@tfn{sqrt}(x)^n} is simplified to @texline @math{x^{n/2}} @infoline @expr{x^(n/2)} only for even integers @expr{n}. If @expr{a} is known to be real, @expr{b} is an even integer, and @expr{c} is a half- or quarter-integer, then @expr{(a^b)^c} is -simplified to @expr{@t{abs}(a^(b c))}. +simplified to @expr{@tfn{abs}(a^(b c))}. Also, @expr{(-a)^b} is simplified to @expr{a^b} if @expr{b} is an even integer, or to @expr{-(a^b)} if @expr{b} is an odd integer, for any negative-looking expression @expr{-a}. -Square roots @expr{@t{sqrt}(x)} generally act like one-half powers +Square roots @expr{@tfn{sqrt}(x)} generally act like one-half powers @texline @math{x^{1:2}} @infoline @expr{x^1:2} for the purposes of the above-listed simplifications. @@ -22394,21 +22505,21 @@ Also, note that is changed to @texline @math{x^{-1:2}}, @infoline @expr{x^(-1:2)}, -but @expr{1 / @t{sqrt}(x)} is left alone. +but @expr{1 / @tfn{sqrt}(x)} is left alone. @tex \bigskip @end tex Generic identity matrices (@pxref{Matrix Mode}) are simplified by the -following rules: @expr{@t{idn}(a) + b} to @expr{a + b} if @expr{b} +following rules: @expr{@tfn{idn}(a) + b} to @expr{a + b} if @expr{b} is provably scalar, or expanded out if @expr{b} is a matrix; -@expr{@t{idn}(a) + @t{idn}(b)} to @expr{@t{idn}(a + b)}; -@expr{-@t{idn}(a)} to @expr{@t{idn}(-a)}; @expr{a @t{idn}(b)} to -@expr{@t{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} -if @expr{a} is provably non-scalar; @expr{@t{idn}(a) @t{idn}(b)} to -@expr{@t{idn}(a b)}; analogous simplifications for quotients involving -@code{idn}; and @expr{@t{idn}(a)^n} to @expr{@t{idn}(a^n)} where +@expr{@tfn{idn}(a) + @tfn{idn}(b)} to @expr{@tfn{idn}(a + b)}; +@expr{-@tfn{idn}(a)} to @expr{@tfn{idn}(-a)}; @expr{a @tfn{idn}(b)} to +@expr{@tfn{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} +if @expr{a} is provably non-scalar; @expr{@tfn{idn}(a) @tfn{idn}(b)} to +@expr{@tfn{idn}(a b)}; analogous simplifications for quotients involving +@code{idn}; and @expr{@tfn{idn}(a)^n} to @expr{@tfn{idn}(a^n)} where @expr{n} is an integer. @tex @@ -22417,27 +22528,27 @@ if @expr{a} is provably non-scalar; @expr{@t{idn}(a) @t{idn}(b)} to The @code{floor} function and other integer truncation functions vanish if the argument is provably integer-valued, so that -@expr{@t{floor}(@t{round}(x))} simplifies to @expr{@t{round}(x)}. +@expr{@tfn{floor}(@tfn{round}(x))} simplifies to @expr{@tfn{round}(x)}. Also, combinations of @code{float}, @code{floor} and its friends, and @code{ffloor} and its friends, are simplified in appropriate ways. @xref{Integer Truncation}. -The expression @expr{@t{abs}(-x)} changes to @expr{@t{abs}(x)}. -The expression @expr{@t{abs}(@t{abs}(x))} changes to -@expr{@t{abs}(x)}; in fact, @expr{@t{abs}(x)} changes to @expr{x} or +The expression @expr{@tfn{abs}(-x)} changes to @expr{@tfn{abs}(x)}. +The expression @expr{@tfn{abs}(@tfn{abs}(x))} changes to +@expr{@tfn{abs}(x)}; in fact, @expr{@tfn{abs}(x)} changes to @expr{x} or @expr{-x} if @expr{x} is provably nonnegative or nonpositive (@pxref{Declarations}). While most functions do not recognize the variable @code{i} as an imaginary number, the @code{arg} function does handle the two cases -@expr{@t{arg}(@t{i})} and @expr{@t{arg}(-@t{i})} just for convenience. +@expr{@tfn{arg}(@tfn{i})} and @expr{@tfn{arg}(-@tfn{i})} just for convenience. -The expression @expr{@t{conj}(@t{conj}(x))} simplifies to @expr{x}. +The expression @expr{@tfn{conj}(@tfn{conj}(x))} simplifies to @expr{x}. Various other expressions involving @code{conj}, @code{re}, and @code{im} are simplified, especially if some of the arguments are provably real or involve the constant @code{i}. For example, -@expr{@t{conj}(a + b i)} is changed to -@expr{@t{conj}(a) - @t{conj}(b) i}, or to @expr{a - b i} if @expr{a} +@expr{@tfn{conj}(a + b i)} is changed to +@expr{@tfn{conj}(a) - @tfn{conj}(b) i}, or to @expr{a - b i} if @expr{a} and @expr{b} are known to be real. Functions like @code{sin} and @code{arctan} generally don't have @@ -22447,13 +22558,13 @@ described in the next section does provide some simplifications for these functions, though. One important simplification that does occur is that -@expr{@t{ln}(@t{e})} is simplified to 1, and @expr{@t{ln}(@t{e}^x)} is +@expr{@tfn{ln}(@tfn{e})} is simplified to 1, and @expr{@tfn{ln}(@tfn{e}^x)} is simplified to @expr{x} for any @expr{x}. This occurs even if you have stored a different value in the Calc variable @samp{e}; but this would be a bad idea in any case if you were also using natural logarithms! -Among the logical functions, @t{(@var{a} <= @var{b})} changes to -@t{@var{a} > @var{b}} and so on. Equations and inequalities where both sides +Among the logical functions, @tfn{(@var{a} <= @var{b})} changes to +@tfn{@var{a} > @var{b}} and so on. Equations and inequalities where both sides are either negative-looking or zero are simplified by negating both sides and reversing the inequality. While it might seem reasonable to simplify @expr{!!x} to @expr{x}, this would not be valid in general because @@ -22577,17 +22688,17 @@ user might not have been thinking of. Square roots of integer or rational arguments are simplified in several ways. (Note that these will be left unevaluated only in Symbolic mode.) First, square integer or rational factors are -pulled out so that @expr{@t{sqrt}(8)} is rewritten as -@texline @math{2\,\t{sqrt}(2)}. +pulled out so that @expr{@tfn{sqrt}(8)} is rewritten as +@texline @math{2\,@tfn{sqrt}(2)}. @infoline @expr{2 sqrt(2)}. Conceptually speaking this implies factoring the argument into primes and moving pairs of primes out of the square root, but for reasons of efficiency Calc only looks for primes up to 29. Square roots in the denominator of a quotient are moved to the -numerator: @expr{1 / @t{sqrt}(3)} changes to @expr{@t{sqrt}(3) / 3}. +numerator: @expr{1 / @tfn{sqrt}(3)} changes to @expr{@tfn{sqrt}(3) / 3}. The same effect occurs for the square root of a fraction: -@expr{@t{sqrt}(2:3)} changes to @expr{@t{sqrt}(6) / 3}. +@expr{@tfn{sqrt}(2:3)} changes to @expr{@tfn{sqrt}(6) / 3}. @tex \bigskip @@ -22620,16 +22731,16 @@ declared to be an integer. @end tex Trigonometric functions are simplified in several ways. First, -@expr{@t{sin}(@t{arcsin}(x))} is simplified to @expr{x}, and +@expr{@tfn{sin}(@tfn{arcsin}(x))} is simplified to @expr{x}, and similarly for @code{cos} and @code{tan}. If the argument to @code{sin} is negative-looking, it is simplified to -@expr{-@t{sin}(x),}, and similarly for @code{cos} and @code{tan}. +@expr{-@tfn{sin}(x),}, and similarly for @code{cos} and @code{tan}. Finally, certain special values of the argument are recognized; @pxref{Trigonometric and Hyperbolic Functions}. Trigonometric functions of inverses of different trigonometric -functions can also be simplified, as in @expr{@t{sin}(@t{arccos}(x))} -to @expr{@t{sqrt}(1 - x^2)}. +functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))} +to @expr{@tfn{sqrt}(1 - x^2)}. Hyperbolic functions of their inverses and of negative-looking arguments are also handled, as are exponentials of inverse @@ -22638,29 +22749,29 @@ hyperbolic functions. No simplifications for inverse trigonometric and hyperbolic functions are known, except for negative arguments of @code{arcsin}, @code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that -@expr{@t{arcsin}(@t{sin}(x))} can @emph{not} safely change to +@expr{@tfn{arcsin}(@tfn{sin}(x))} can @emph{not} safely change to @expr{x}, since this only correct within an integer multiple of @texline @math{2 \pi} @infoline @expr{2 pi} -radians or 360 degrees. However, @expr{@t{arcsinh}(@t{sinh}(x))} is +radians or 360 degrees. However, @expr{@tfn{arcsinh}(@tfn{sinh}(x))} is simplified to @expr{x} if @expr{x} is known to be real. Several simplifications that apply to logarithms and exponentials -are that @expr{@t{exp}(@t{ln}(x))}, -@texline @t{e}@math{^{\ln(x)}}, -@infoline @expr{e^@t{ln}(x)}, +are that @expr{@tfn{exp}(@tfn{ln}(x))}, +@texline @tfn{e}@math{^{\ln(x)}}, +@infoline @expr{e^@tfn{ln}(x)}, and @texline @math{10^{{\rm log10}(x)}} -@infoline @expr{10^@t{log10}(x)} -all reduce to @expr{x}. Also, @expr{@t{ln}(@t{exp}(x))}, etc., can +@infoline @expr{10^@tfn{log10}(x)} +all reduce to @expr{x}. Also, @expr{@tfn{ln}(@tfn{exp}(x))}, etc., can reduce to @expr{x} if @expr{x} is provably real. The form -@expr{@t{exp}(x)^y} is simplified to @expr{@t{exp}(x y)}. If @expr{x} +@expr{@tfn{exp}(x)^y} is simplified to @expr{@tfn{exp}(x y)}. If @expr{x} is a suitable multiple of @texline @math{\pi i} @infoline @expr{pi i} (as described above for the trigonometric functions), then -@expr{@t{exp}(x)} or @expr{e^x} will be expanded. Finally, -@expr{@t{ln}(x)} is simplified to a form involving @code{pi} and +@expr{@tfn{exp}(x)} or @expr{e^x} will be expanded. Finally, +@expr{@tfn{ln}(x)} is simplified to a form involving @code{pi} and @code{i} where @expr{x} is provably negative, positive imaginary, or negative imaginary. @@ -22732,9 +22843,9 @@ by @kbd{a e}. Inverse trigonometric or hyperbolic functions, called with their corresponding non-inverse functions as arguments, are simplified -by @kbd{a e}. For example, @expr{@t{arcsin}(@t{sin}(x))} changes -to @expr{x}. Also, @expr{@t{arcsin}(@t{cos}(x))} and -@expr{@t{arccos}(@t{sin}(x))} both change to @expr{@t{pi}/2 - x}. +by @kbd{a e}. For example, @expr{@tfn{arcsin}(@tfn{sin}(x))} changes +to @expr{x}. Also, @expr{@tfn{arcsin}(@tfn{cos}(x))} and +@expr{@tfn{arccos}(@tfn{sin}(x))} both change to @expr{@tfn{pi}/2 - x}. These simplifications are unsafe because they are valid only for values of @expr{x} in a certain range; outside that range, values are folded down to the 360-degree range that the inverse trigonometric @@ -22750,22 +22861,22 @@ in a restricted range of @expr{x}; for example, in the powers cancel to get @expr{x}, which is valid for positive values of @expr{x} but not for negative or complex values. -Similarly, @expr{@t{sqrt}(x^a)} and @expr{@t{sqrt}(x)^a} are both +Similarly, @expr{@tfn{sqrt}(x^a)} and @expr{@tfn{sqrt}(x)^a} are both simplified (possibly unsafely) to @texline @math{x^{a/2}}. @infoline @expr{x^(a/2)}. -Forms like @expr{@t{sqrt}(1 - sin(x)^2)} are simplified to, e.g., -@expr{@t{cos}(x)}. Calc has identities of this sort for @code{sin}, +Forms like @expr{@tfn{sqrt}(1 - sin(x)^2)} are simplified to, e.g., +@expr{@tfn{cos}(x)}. Calc has identities of this sort for @code{sin}, @code{cos}, @code{tan}, @code{sinh}, and @code{cosh}. Arguments of square roots are partially factored to look for squared terms that can be extracted. For example, -@expr{@t{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to -@expr{a b @t{sqrt}(a+b)}. +@expr{@tfn{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to +@expr{a b @tfn{sqrt}(a+b)}. -The simplifications of @expr{@t{ln}(@t{exp}(x))}, -@expr{@t{ln}(@t{e}^x)}, and @expr{@t{log10}(10^x)} to @expr{x} are also +The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))}, +@expr{@tfn{ln}(@tfn{e}^x)}, and @expr{@tfn{log10}(10^x)} to @expr{x} are also unsafe because of problems with principal values (although these simplifications are safe if @expr{x} is known to be real). @@ -24317,8 +24428,8 @@ contain error forms. The data values must either all include errors or all be plain numbers. Error forms can go anywhere but generally go on the numbers in the last row of the data matrix. If the last row contains error forms -@texline `@var{y_i}@w{ @t{+/-} }@math{\sigma_i}', -@infoline `@var{y_i}@w{ @t{+/-} }@var{sigma_i}', +@texline `@var{y_i}@w{ @tfn{+/-} }@math{\sigma_i}', +@infoline `@var{y_i}@w{ @tfn{+/-} }@var{sigma_i}', then the @texline @math{\chi^2} @infoline @expr{chi^2} @@ -24470,17 +24581,17 @@ Linear or multilinear. @mathit{a + b x + c y + d z}. @item 2-9 Polynomials. @mathit{a + b x + c x^2 + d x^3}. @item e -Exponential. @mathit{a} @t{exp}@mathit{(b x)} @t{exp}@mathit{(c y)}. +Exponential. @mathit{a} @tfn{exp}@mathit{(b x)} @tfn{exp}@mathit{(c y)}. @item E -Base-10 exponential. @mathit{a} @t{10^}@mathit{(b x)} @t{10^}@mathit{(c y)}. +Base-10 exponential. @mathit{a} @tfn{10^}@mathit{(b x)} @tfn{10^}@mathit{(c y)}. @item x -Exponential (alternate notation). @t{exp}@mathit{(a + b x + c y)}. +Exponential (alternate notation). @tfn{exp}@mathit{(a + b x + c y)}. @item X -Base-10 exponential (alternate). @t{10^}@mathit{(a + b x + c y)}. +Base-10 exponential (alternate). @tfn{10^}@mathit{(a + b x + c y)}. @item l -Logarithmic. @mathit{a + b} @t{ln}@mathit{(x) + c} @t{ln}@mathit{(y)}. +Logarithmic. @mathit{a + b} @tfn{ln}@mathit{(x) + c} @tfn{ln}@mathit{(y)}. @item L -Base-10 logarithmic. @mathit{a + b} @t{log10}@mathit{(x) + c} @t{log10}@mathit{(y)}. +Base-10 logarithmic. @mathit{a + b} @tfn{log10}@mathit{(x) + c} @tfn{log10}@mathit{(y)}. @item ^ General exponential. @mathit{a b^x c^y}. @item p @@ -28234,7 +28345,7 @@ since the evaluation step will also evaluate @code{pi}. @cindex @samp{=>} operator The special algebraic symbol @samp{=>} is known as the @dfn{evaluates-to operator}. (It will show up as an @code{evalto} function call in -other language modes like Pascal and @TeX{}.) This is a binary +other language modes like Pascal and La@TeX{}.) This is a binary operator, that is, it has a lefthand and a righthand argument, although it can be entered with the righthand argument omitted. @@ -28349,7 +28460,7 @@ operators in Algebraic mode, or by using the @kbd{s :} (@code{calc-assign}) [@code{assign}] command which takes a variable and value from the stack and replaces them with an assignment. -@xref{TeX Language Mode}, for the way @samp{=>} appears in +@xref{TeX and LaTeX Language Modes}, for the way @samp{=>} appears in @TeX{} language output. The @dfn{eqn} mode gives similar treatment to @samp{=>}. @@ -29752,7 +29863,7 @@ understands are: The @TeX{} and La@TeX{} math delimiters @samp{$ $}, @samp{$$ $$}, @samp{\[ \]}, and @samp{\( \)}; @item -Lines beginning with @samp{\begin} and @samp{\end}; +Lines beginning with @samp{\begin} and @samp{\end} (except matrix delimiters); @item Lines beginning with @samp{@@} (Texinfo delimiters). @item @@ -29889,16 +30000,16 @@ you haven't done anything with this formula yet. When Embedded mode ``activates'' a formula, i.e., when it examines the formula for the first time since the buffer was created or loaded, Calc tries to sense the language in which the formula was -written. If the formula contains any @TeX{}-like @samp{\} sequences, -it is parsed (i.e., read) in @TeX{} mode. If the formula appears to +written. If the formula contains any La@TeX{}-like @samp{\} sequences, +it is parsed (i.e., read) in La@TeX{} mode. If the formula appears to be written in multi-line Big mode, it is parsed in Big mode. Otherwise, it is parsed according to the current language mode. Note that Calc does not change the current language mode according -to what it finds. Even though it can read a @TeX{} formula when -not in @TeX{} mode, it will immediately rewrite this formula using -whatever language mode is in effect. You must then type @kbd{d T} -to switch Calc permanently into @TeX{} mode if that is what you +to what it finds. Even though it can read a La@TeX{} formula when +not in La@TeX{} mode, it will immediately rewrite this formula using +whatever language mode is in effect. You must then type @kbd{d L} +to switch Calc permanently into La@TeX{} mode if that is what you desire. @tex @@ -29919,8 +30030,8 @@ version. Plain formulas are preceded and followed by @samp{%%%} signs by default. This notation has the advantage that the @samp{%} -character begins a comment in @TeX{}, so if your formula is -embedded in a @TeX{} document its plain version will be +character begins a comment in @TeX{} and La@TeX{}, so if your formula is +embedded in a @TeX{} or La@TeX{} document its plain version will be invisible in the final printed copy. @xref{Customizing Embedded Mode}, to see how to change the ``plain'' formula delimiters, say to something that @dfn{eqn} or some other @@ -30210,7 +30321,7 @@ a few lines that look like this: @noindent where the leading and trailing @samp{---} can be replaced by any suitable strings (which must be the same on all three lines) -or omitted altogether; in a @TeX{} file, @samp{%} would be a good +or omitted altogether; in a @TeX{} or La@TeX{} file, @samp{%} would be a good leading string and no trailing string would be necessary. In a C program, @samp{/*} and @samp{*/} would be good leading and trailing strings. @@ -34667,7 +34778,7 @@ keystrokes are not listed in this summary. @r{ @: . @:number @: @:@:0.number} @r{ @: _ @:number @: @:-@:number} @r{ @: e @:number @: @:@:1e number} -@r{ @: # @:number @: @:@:current-radix@t{#}number} +@r{ @: # @:number @: @:@:current-radix@tfn{#}number} @r{ @: P @:(in number) @: @:+/-@:} @r{ @: M @:(in number) @: @:mod@:} @r{ @: @@ ' " @: (in number)@: @:@:HMS form} @@ -34976,6 +35087,7 @@ keystrokes are not listed in this summary. @r{ @: d O @: @: 50 @:calc-flat-language@:} @r{ @: d P @: @: 50 @:calc-pascal-language@:} @r{ @: d T @: @: 50 @:calc-tex-language@:} +@r{ @: d L @: @: 50 @:calc-latex-language@:} @r{ @: d U @: @: 50 @:calc-unformatted-language@:} @r{ @: d W @: @: 50 @:calc-maple-language@:} @@ -35226,8 +35338,8 @@ keystrokes are not listed in this summary. @r{ @: s & @:var @: 29,47 @:calc-store-inv@: (v^-1)} @r{ @: s [ @:var @: 29,47 @:calc-store-decr@: (v-1)} @r{ @: s ] @:var @: 29,47 @:calc-store-incr@: (v-(-1))} -@r{ a b@: s : @: @: 2 @:assign@:(a,b) a @t{:=} b} -@r{ a@: s = @: @: 1 @:evalto@:(a,b) a @t{=>}} +@r{ a b@: s : @: @: 2 @:assign@:(a,b) a @tfn{:=} b} +@r{ a@: s = @: @: 1 @:evalto@:(a,b) a @tfn{=>}} @c @r{ @: t [ @: @: 4 @:calc-trail-first@:} diff --git a/man/cc-mode.texi b/man/cc-mode.texi index 89e49d67442..a0016aab121 100644 --- a/man/cc-mode.texi +++ b/man/cc-mode.texi @@ -41,7 +41,7 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment +@comment @comment Texinfo manual for CC Mode @comment Generated from the original README file by Krishna Padmasola @comment <krishna@earth-gw.njit.edu> @@ -51,7 +51,7 @@ @comment Martin Stjernholm @comment @comment Maintained by Martin Stjernholm <bug-cc-mode@gnu.org> -@comment +@comment @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @comment Define an index for syntactic symbols. @@ -1951,9 +1951,9 @@ for commands concerning those bits. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The following list of commands reindent C constructs. Note that when -you change your coding style, either interactively or through some other +you change your coding style, either interactively or through some other means, your file does @emph{not} automatically get reindented. You -will need to execute one of the following commands to see the effects of +will need to execute one of the following commands to see the effects of your changes. @cindex GNU indent program @@ -2865,9 +2865,9 @@ looked up. If it's found then the associated style is used. If @samp{other} is not found then the @samp{gnu} style is used. @item -In all cases, the style described in @code{c-default-style} is installed +In all cases, the style described in @code{c-default-style} is installed @emph{before} the language hooks are run, so you can always override -this setting by including an explicit call to @code{c-set-style} in your +this setting by including an explicit call to @code{c-set-style} in your language mode hook, or in @code{c-mode-common-hook}. @end enumerate @end defopt @@ -3051,7 +3051,7 @@ are simply indented two spaces to the right of line 3. But perhaps we'd like @ccmode{} to be a little more intelligent so that it aligns all the @samp{<<} symbols in lines 3 through 6. To do this, we have to write a custom indentation function which finds the column of the first -stream operator on the first line of the statement. Here is sample +stream operator on the first line of the statement. Here is sample lisp code implementing this: @example @@ -3878,19 +3878,19 @@ calls. This example illustrates these: @example 1: void a_function( int line1, 2: int line2 ); - 3: + 3: 4: void a_longer_function( 5: int line1, 6: int line2 7: ); - 8: + 8: 9: void call_them( int line1, int line2 ) 10: @{ 11: a_function( 12: line1, 13: line2 14: ); -15: +15: 16: a_longer_function( line1, 17: line2 ); 18: @} @@ -3927,10 +3927,10 @@ covered are illustrated by this C++ example: 3: @{ 4: /* this line starts a multiline 5: * comment. This line should get `c' syntax */ - 6: + 6: 7: char* a_multiline_string = "This line starts a multiline \ 8: string. This line should get `string' syntax."; - 9: + 9: 10: note: 11: @{ 12: #ifdef LOCK @@ -4243,7 +4243,7 @@ Indent a multiline block @code{c-basic-offset} extra. E.g: @example @group int *foo[] = @{ - NULL, + NULL, @{17@}, @hereFn{c-indent-multi-line-block} @end group @end example @@ -4474,7 +4474,7 @@ indentation is added. E.g: @example @group main (int, - char ** + char ** ) @hereFn{c-lineup-close-paren} @end group @end example @@ -4684,7 +4684,7 @@ E.g: @example @group class Foo - extends + extends Bar @hereFn{c-lineup-java-inher} @sssTBasicOffset{} @end group @@ -5548,7 +5548,7 @@ other top-level block constructs in the @ccmode{} languages). (@xref{Defuns,,, emacs, The Emacs Editor}, in the Emacs 20 manual). This heuristic is built into the core syntax analysis routines in -(X)Emacs, so it's not really a @ccmode{} issue. However, in Emacs 21.4 +(X)Emacs, so it's not really a @ccmode{} issue. However, in Emacs 22.1 it has become possible to turn it off@footnote{Using the variable @code{open-paren-in-column-0-is-defun-start}.} and @ccmode{} does so there since it got its own system to keep track of blocks. diff --git a/man/cmdargs.texi b/man/cmdargs.texi index d131baa094a..a8d13da3563 100644 --- a/man/cmdargs.texi +++ b/man/cmdargs.texi @@ -14,15 +14,16 @@ when invoking Emacs. These are for compatibility with other editors and for sophisticated activities. We don't recommend using them for ordinary editing. - Arguments starting with @samp{-} are @dfn{options}. Other arguments -specify files to visit. Emacs visits the specified files while it -starts up. The last file name on your command line becomes the -current buffer; the other files are also visited in other buffers. If -there are two files, they are both displayed; otherwise the last file -is displayed along with a buffer list that shows what other buffers -there are. As with most programs, the special argument @samp{--} says -that all subsequent arguments are file names, not options, even if -they start with @samp{-}. + Arguments starting with @samp{-} are @dfn{options}, and so is +@samp{+@var{linenum}}. All other arguments specify files to visit. +Emacs visits the specified files while it starts up. The last file +name on your command line becomes the current buffer; the other files +are also visited in other buffers. If there are two files, they are +both displayed; otherwise the last file is displayed along with a +buffer list that shows what other buffers there are. As with most +programs, the special argument @samp{--} says that all subsequent +arguments are file names, not options, even if they start with +@samp{-}. Emacs command options can specify many things, such as the size and position of the X window Emacs uses, its colors, and so on. A few @@ -111,9 +112,10 @@ Visit @var{file} using @code{find-file}, then go to line number @opindex --load @cindex loading Lisp libraries, command-line argument Load a Lisp library named @var{file} with the function @code{load}. -@xref{Lisp Libraries}. The library can be found either in the current -directory, or in the Emacs library search path as specified -with @env{EMACSLOADPATH} (@pxref{General Variables}). +@xref{Lisp Libraries}. If @var{file} is not an absolute file name, +the library can be found either in the current directory, or in the +Emacs library search path as specified with @env{EMACSLOADPATH} +(@pxref{General Variables}). @item -L @var{dir} @opindex -L @@ -218,10 +220,11 @@ echo area, while @code{message} and error messages output to @code{stderr}. Functions that would normally read from the minibuffer take their input from @code{stdin} instead. -@samp{--batch} implies @samp{-q} (do not load an init file). It also -causes Emacs to exit after processing all the command options. In -addition, it disables auto-saving except in buffers for which it has -been explicitly requested. +@samp{--batch} implies @samp{-q} (do not load an init file), but +@file{site-start.el} is loaded nonetheless. It also causes Emacs to +exit after processing all the command options. In addition, it +disables auto-saving except in buffers for which it has been +explicitly requested. @item --script @var{file} @opindex --script @@ -301,7 +304,8 @@ All buffers and strings are unibyte unless you (or a Lisp program) explicitly ask for a multibyte buffer or string. (Note that Emacs always loads Lisp files in multibyte mode, even if @samp{--unibyte} is specified; see @ref{Enabling Multibyte}.) Setting the environment -variable @env{EMACS_UNIBYTE} has the same effect. +variable @env{EMACS_UNIBYTE} has the same effect +(@pxref{General Variables}). @item --multibyte @opindex --multibyte @@ -320,7 +324,7 @@ loaded, performs some useful operation on the current buffer, expected to be a C program. @example -emacs -batch foo.c -l hack-c -f save-buffer >& log +emacs --batch foo.c -l hack-c -f save-buffer >& log @end example @noindent diff --git a/man/custom.texi b/man/custom.texi index 2b9710ea512..a6a4490d467 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -83,7 +83,7 @@ documentation on the variable name. These minor-mode variables provide a good way for Lisp programs to turn minor modes on and off; they are also useful in a file's local variables list. But please think twice before setting minor modes with a local -variables list, because most minor modes are matter of user +variables list, because most minor modes are a matter of user preference---other users editing the same file might not want the same minor modes you prefer. @@ -198,8 +198,7 @@ different under a window system, since faces are then used to indicate the active fields and other features. @menu -* Groups: Customization Groups. - How options are classified in a structure. +* Groups: Customization Groups. How options are classified in a structure. * Changing a Variable:: How to edit a value and set an option. * Saving Customizations:: Details of saving customizations. * Face Customization:: How to edit the attributes of a face. @@ -507,9 +506,12 @@ customization files for different Emacs versions, like this: ((and (= emacs-major-version 21) (< emacs-minor-version 4)) ;; @r{Emacs 21 customization, before version 21.4.} (setq custom-file "~/.custom-21.el")) - (t + ((< emacs-major-version 22) ;; @r{Emacs version 21.4 or later.} - (setq custom-file "~/.custom-21.4.el"))) + (setq custom-file "~/.custom-21.4.el")) + (t + ;; @r{Emacs version 22.1 or later.} + (setq custom-file "~/.custom-22.el"))) (load custom-file) @end example @@ -687,8 +689,9 @@ change. Each user option that you can set with the customization buffer is (if it is not a face) in fact a Lisp variable. Emacs does not (usually) change the values of these variables; instead, you set the values, and thereby alter and control the behavior of certain -Emacs commands. Use of the customization buffer is explained above; -here we describe other aspects of Emacs variables. +Emacs commands. Use of the customization buffer is explained above +(@pxref{Easy Customization}); here we describe other aspects of Emacs +variables. @menu * Examining:: Examining or setting one variable's value. @@ -761,7 +764,9 @@ buffer, type in the expression, and then type @kbd{C-j}. @xref{Lisp Interaction}. Setting variables, like all means of customizing Emacs except where -otherwise stated, affects only the current Emacs session. +otherwise stated, affects only the current Emacs session. The only +way to alter the variable in future sessions is to put something in +the @file{~/.emacs} file to set it those sessions (@pxref{Init File}). @node Hooks @subsection Hooks @@ -1179,7 +1184,7 @@ historical, and we might change it someday. Function keys send input events just as character keys do, and keymaps can have bindings for them. - On many terminals, typing a function key actually sends the computer a + On text terminals, typing a function key actually sends the computer a sequence of characters; the precise details of the sequence depends on which function key and on the model of terminal you are using. (Often the sequence starts with @kbd{@key{ESC} [}.) If Emacs understands your @@ -1464,16 +1469,17 @@ to bind @kbd{C-z} to @code{shell}: @end example @noindent -This example uses a string constant containing one character, @kbd{C-z}. -The single-quote before the command name, @code{shell}, marks it as a +This example uses a string constant containing one character, +@kbd{C-z}. (@samp{\C-} is string syntax for a control character.) The +single-quote before the command name, @code{shell}, marks it as a constant symbol rather than a variable. If you omit the quote, Emacs would try to evaluate @code{shell} immediately as a variable. This probably causes an error; it certainly isn't what you want. - Here is another example that binds a key sequence two characters long: + Here is another example that binds the key sequence @kbd{C-x M-l}: @example -(global-set-key "\C-xl" 'make-symbolic-link) +(global-set-key "\C-x\M-l" 'make-symbolic-link) @end example To put @key{TAB}, @key{RET}, @key{ESC}, or @key{DEL} in the @@ -1521,8 +1527,7 @@ keyboard-modified mouse button): @end example You can use a vector for the simple cases too. Here's how to -rewrite the first three examples above, using vectors to bind -@kbd{C-z}, @kbd{C-x l}, and @kbd{C-x @key{TAB}}: +rewrite the first six examples above to use vectors: @example (global-set-key [?\C-z] 'shell) @@ -1535,7 +1540,7 @@ rewrite the first three examples above, using vectors to bind @noindent As you see, you represent a multi-character key sequence with a vector -by listing each of the characters within the square brackets that +by listing all of the characters in order within the square brackets that delimit the vector. Language and coding systems can cause problems with key bindings @@ -1584,10 +1589,9 @@ given function key on your terminal, type @kbd{C-h c} followed by that key. A key sequence which contains function key symbols (or anything but -@acronym{ASCII} characters) must be a vector rather than a string. The vector -syntax uses spaces between the elements, and square brackets around the -whole vector. Thus, to bind function key @samp{f1} to the command -@code{rmail}, write the following: +@acronym{ASCII} characters) must be a vector rather than a string. +Thus, to bind function key @samp{f1} to the command @code{rmail}, +write the following: @example (global-set-key [f1] 'rmail) @@ -1635,18 +1639,21 @@ word: @subsection Named @acronym{ASCII} Control Characters @key{TAB}, @key{RET}, @key{BS}, @key{LFD}, @key{ESC} and @key{DEL} -started out as names for certain @acronym{ASCII} control characters, used so often -that they have special keys of their own. Later, users found it +started out as names for certain @acronym{ASCII} control characters, +used so often that they have special keys of their own. For instance, +@key{TAB} was another name for @kbd{C-i}. Later, users found it convenient to distinguish in Emacs between these keys and the ``same'' -control characters typed with the @key{CTRL} key. - - Emacs distinguishes these two kinds of input, when the keyboard -reports these keys to Emacs. It treats the ``special'' keys as function -keys named @code{tab}, @code{return}, @code{backspace}, @code{linefeed}, -@code{escape}, and @code{delete}. These function keys translate -automatically into the corresponding @acronym{ASCII} characters @emph{if} they -have no bindings of their own. As a result, neither users nor Lisp -programs need to pay attention to the distinction unless they care to. +control characters typed with the @key{CTRL} key. Therefore, on most +modern terminals, they are no longer the same, and @key{TAB} is +distinguishable from @kbd{C-i}. + + Emacs can distinguish these two kinds of input if the keyboard does. +It treats the ``special'' keys as function keys named @code{tab}, +@code{return}, @code{backspace}, @code{linefeed}, @code{escape}, and +@code{delete}. These function keys translate automatically into the +corresponding @acronym{ASCII} characters @emph{if} they have no +bindings of their own. As a result, neither users nor Lisp programs +need to pay attention to the distinction unless they care to. If you do not want to distinguish between (for example) @key{TAB} and @kbd{C-i}, make just one binding, for the @acronym{ASCII} character @key{TAB} @@ -1950,12 +1957,14 @@ Reference Manual}. @cindex rebinding keys, permanently @cindex startup (init file) - When Emacs is started, it normally loads a Lisp program from the file -@file{.emacs} or @file{.emacs.el} in your home directory. We call this -file your @dfn{init file} because it specifies how to initialize Emacs -for you. You can use the command line switch @samp{-q} to prevent -loading your init file, and @samp{-u} (or @samp{--user}) to specify a -different user's init file (@pxref{Initial Options}). + When Emacs is started, it normally loads a Lisp program from the +file @file{.emacs} or @file{.emacs.el} in your home directory. (You +can also put it in a subdirectory @file{~/.emacs.d} and Emacs will +still find it.) We call this file your @dfn{init file} because it +specifies how to initialize Emacs for you. You can use the command +line switch @samp{-q} to prevent loading your init file, and @samp{-u} +(or @samp{--user}) to specify a different user's init file +(@pxref{Initial Options}). @cindex @file{default.el}, the default init file There can also be a @dfn{default init file}, which is the library @@ -2223,7 +2232,8 @@ If the function is not interactive, omit the @code{t} or use @code{nil}. @item -Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link}. +Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link} +(@pxref{Init Rebinding}). @example (global-set-key "\C-xl" 'make-symbolic-link) @@ -2326,11 +2336,14 @@ library. @xref{Hooks}. @subsection How Emacs Finds Your Init File Normally Emacs uses the environment variable @env{HOME} to find -@file{.emacs}; that's what @samp{~} means in a file name. But if you -run Emacs from a shell started by @code{su}, Emacs tries to find your -own @file{.emacs}, not that of the user you are currently pretending -to be. The idea is that you should get your own editor customizations -even if you are running as the super user. +@file{.emacs}; that's what @samp{~} means in a file name. If @file{.emacs} +is not found directly inside @file{~/}, Emacs looks for it in +@file{~/.emacs.d/}. + + However, if you run Emacs from a shell started by @code{su}, Emacs +tries to find your own @file{.emacs}, not that of the user you are +currently pretending to be. The idea is that you should get your own +editor customizations even if you are running as the super user. More precisely, Emacs first determines which user's init file to use. It gets the user name from the environment variables @env{LOGNAME} and diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi index 9dff3d9efd8..a1ccf101bd6 100644 --- a/man/emacs-xtra.texi +++ b/man/emacs-xtra.texi @@ -274,7 +274,7 @@ You can insert subdirectories with specified @code{ls} switches in Dired buffers, using @kbd{C-u i}. You can change the @code{ls} switches of an already inserted subdirectory using @kbd{C-u l}. -In Emacs versions 21.4 and later, Dired remembers the switches, so +In Emacs versions 22.1 and later, Dired remembers the switches, so that reverting the buffer will not change them back to the main directory's switches. Deleting a subdirectory forgets about its switches. diff --git a/man/emacs.texi b/man/emacs.texi index 340bcd76516..3bfc95aac5a 100644 --- a/man/emacs.texi +++ b/man/emacs.texi @@ -5,7 +5,7 @@ @c The edition number appears in several places in this file @set EDITION Fourteenth -@set EMACSVER 21.3.50 +@set EMACSVER 22.0.50 @copying This is the @value{EDITION} edition of the @cite{GNU Emacs Manual}, diff --git a/man/entering.texi b/man/entering.texi index ba031980410..fe76bf34844 100644 --- a/man/entering.texi +++ b/man/entering.texi @@ -40,11 +40,11 @@ the editor again. With these editors, it makes sense to use a command-line argument to say which file to edit. But starting a new Emacs each time you want to edit a different file -does not make sense. For one thing, this would be annoyingly slow. -For another, this would fail to take advantage of Emacs's ability to -visit more than one file in a single editing session. And it would -lose the other accumulated context, such as the kill ring, registers, -undo history, and mark ring. +does not make sense. This would fail to take advantage of Emacs's +ability to visit more than one file in a single editing session, and +it would lose the other accumulated context, such as the kill ring, +registers, undo history, and mark ring, that are useful for operating +on multiple files. The recommended way to use GNU Emacs is to start it only once, just after you log in, and do all your editing in the same Emacs session. @@ -71,13 +71,19 @@ information on editing files with Emacs from other programs. @cindex leaving Emacs @cindex quitting Emacs - There are two commands for exiting Emacs because there are two kinds -of exiting: @dfn{suspending} Emacs and @dfn{killing} Emacs. + There are two commands for exiting Emacs because there are three +kinds of exiting: @dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and +@dfn{killing} Emacs. @dfn{Suspending} means stopping Emacs temporarily and returning control to its parent process (usually a shell), allowing you to resume editing later in the same Emacs job, with the same buffers, same kill -ring, same undo history, and so on. This is the usual way to exit. +ring, same undo history, and so on. This is the usual way to exit Emacs +when running on a text terminal. + + @dfn{Iconifying} means replacing the Emacs frame with a small box +somewhere on the screen. This is the usual way to exit Emacs when you're +using a graphics terminal. @dfn{Killing} Emacs means destroying the Emacs job. You can run Emacs again later, but you will get a fresh Emacs; there is no way to resume @@ -93,31 +99,33 @@ Kill Emacs (@code{save-buffers-kill-emacs}). @kindex C-z @findex suspend-emacs - To suspend Emacs, type @kbd{C-z} (@code{suspend-emacs}). This takes -you back to the shell from which you invoked Emacs. You can resume -Emacs with the shell command @command{%emacs} in most common shells. - - On systems that do not support suspending programs, @kbd{C-z} starts -an inferior shell that communicates directly with the terminal. -Emacs waits until you exit the subshell. (The way to do that is -probably with @kbd{C-d} or @command{exit}, but it depends on which shell -you use.) The only way on these systems to get back to the shell from -which Emacs was run (to log out, for example) is to kill Emacs. - - Suspending also fails if you run Emacs under a shell that doesn't -support suspending programs, even if the system itself does support it. -In such a case, you can set the variable @code{cannot-suspend} to a -non-@code{nil} value to force @kbd{C-z} to start an inferior shell. + To suspend or iconify Emacs, type @kbd{C-z} (@code{suspend-emacs}). +On text terminals, this suspends Emacs. On graphics terminals, +it iconifies the Emacs frame. + + Suspending Emacs takes you back to the shell from which you invoked +Emacs. You can resume Emacs with the shell command @command{%emacs} +in most common shells. On systems that don't support suspending +programs, @kbd{C-z} starts an inferior shell that communicates +directly with the terminal. Emacs waits until you exit the subshell. +(The way to do that is probably with @kbd{C-d} or @command{exit}, but +it depends on which shell you use.) The only way on these systems to +get back to the shell from which Emacs was run (to log out, for +example) is to kill Emacs. + + Suspending can fail if you run Emacs under a shell that doesn't +support suspending programs, even if the system itself does support +it. In such a case, you can set the variable @code{cannot-suspend} to +a non-@code{nil} value to force @kbd{C-z} to start an inferior shell. (One might also describe Emacs's parent shell as ``inferior'' for -failing to support job control properly, but that is a matter of taste.) - - When Emacs communicates directly with an X server and creates its own -dedicated X windows, @kbd{C-z} has a different meaning. Suspending an -application that uses its own X windows is not meaningful or useful. -Instead, @kbd{C-z} runs the command @code{iconify-or-deiconify-frame}, -which temporarily iconifies (or ``minimizes'') the selected Emacs -frame (@pxref{Frames}). Then you can use the window manager to get -back to a shell window. +failing to support job control properly, but that is a matter of +taste.) + + On graphics terminals, @kbd{C-z} has a different meaning: it runs +the command @code{iconify-or-deiconify-frame}, which temporarily +iconifies (or ``minimizes'') the selected Emacs frame +(@pxref{Frames}). Then you can use the window manager to get back to +a shell window. @kindex C-x C-c @findex save-buffers-kill-emacs diff --git a/man/faq.texi b/man/faq.texi index 061441fe994..dc55c4b89b3 100644 --- a/man/faq.texi +++ b/man/faq.texi @@ -424,7 +424,7 @@ individual postings from, but pretty much everything is there. The archive is at @uref{ftp://ftp-mailing-list-archives.gnu.org}. -The archive can be browsed over the web at +The archive can be browsed over the web at @uref{http://mail.gnu.org/archive/html/, the GNU mail archive}. Web-based Usenet search services, such as @@ -2633,7 +2633,7 @@ on DOS and Windows, where the DOS end-of-line (EOL) format is the default, a backslash (@samp{\}) will appear in the mode line. If you are running a version of Emacs before 20.1, get @code{crypt++} -(@pxref{Packages that do not come with Emacs}). Among other things, +(@pxref{Packages that do not come with Emacs}). Among other things, @code{crypt++} transparently modifies MS-DOS files as they are loaded and saved, allowing you to ignore the different conventions that Unix and MS-DOS have for delineating the end of a line. @@ -3300,10 +3300,10 @@ distribution site, sources are available as @uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-@value{VER}.tar.gz} The above will obviously change as new versions of Emacs come out. For -instance, when Emacs 21.42 is released, it will most probably be +instance, when Emacs 22.42 is released, it will most probably be available as -@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.42.tar.gz} +@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-22.42.tar.gz} Again, you should use one of the GNU mirror sites (see @ref{Current GNU distributions}, and adjust the URL accordingly) so as to reduce load on @@ -3543,7 +3543,7 @@ see @ref{Packages that do not come with Emacs}. List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen}, aims to provide one compact list with links to all of the current Emacs Lisp files on the internet. The ELL can be browsed over the web, or -from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, +from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, the @file{ell} package}. Many authors post their packages to the @uref{news:gnu.emacs.sources, @@ -3805,7 +3805,7 @@ available at @uref{http://vms.gnu.org/}. Most of these modes are now available in standard Emacs distribution. To get additional modes, see @ref{Finding a package with particular -functionality}. +functionality}. Barry Warsaw's @code{cc-mode} now works for C, C@t{++}, Objective-C, and Java code. It is distributed with Emacs, but has @@ -3932,7 +3932,7 @@ Superyank is an old version of Supercite. @email{daveg@@csvax.cs.caltech.edu, Dave Gillespie} @item Latest version -2.02g (part of Emacs since version 21.4) +2.02g (part of Emacs since version 22.1) @item Distribution No separate distribution outside of Emacs. Older versions diff --git a/man/killing.texi b/man/killing.texi index ba136831adf..51e352dec6b 100644 --- a/man/killing.texi +++ b/man/killing.texi @@ -222,10 +222,10 @@ Kill the following balanced expression (@code{kill-sexp}). @xref{Expressions}. Kill through the next occurrence of @var{char} (@code{zap-to-char}). @end table - A kill command which is very general is @kbd{C-w} -(@code{kill-region}), which kills everything between point and the -mark. With this command, you can kill any contiguous sequence of -characters, if you first set the region around them. + The most general kill command is @kbd{C-w} (@code{kill-region}), +which kills everything between point and the mark. With this command, +you can kill any contiguous sequence of characters, if you first set +the region around them. @kindex M-z @findex zap-to-char @@ -240,13 +240,6 @@ and @kbd{M-d} (@pxref{Words}); balanced expressions, with @kbd{C-M-k} (@pxref{Expressions}); and sentences, with @kbd{C-x @key{DEL}} and @kbd{M-k} (@pxref{Sentences}).@refill - You can use kill commands in read-only buffers. They don't actually -change the buffer, and they beep to warn you of that, but they do copy -the text you tried to kill into the kill ring, so you can yank it into -other buffers. Most of the kill commands move point across the text -they copy in this way, so that successive kill commands build up a -single kill ring entry as usual. - @node Graphical Kill @subsection Killing on Graphical Terminals @@ -289,7 +282,7 @@ Replace text just yanked with an earlier batch of killed text (@code{yank-pop}). @item M-w Save region as last killed text without actually killing it -(@code{kill-ring-save}). +(@code{kill-ring-save}). Some systems call this ``copying''. @item C-M-w Append next kill to last batch of killed text (@code{append-next-kill}). @end table @@ -466,7 +459,7 @@ the command @kbd{C-h v kill-ring}. @cindex accumulating scattered text Usually we copy or move text by killing it and yanking it, but there -are other methods convenient for copying one block of text in many +are other convenient methods for copying one block of text in many places, or for copying many scattered blocks of text into one place. To copy one block to many places, store it in a register (@pxref{Registers}). Here we describe the commands to accumulate diff --git a/man/regs.texi b/man/regs.texi index 7268dd72446..41b2e639855 100644 --- a/man/regs.texi +++ b/man/regs.texi @@ -12,13 +12,12 @@ once, or many times; you can move point to a position saved in a register once, or many times. @findex view-register - Each register has a name, which consists of a single character. -A register can -store a piece of text, a rectangle, a position, a window configuration, -or a file name, but only one thing at any given time. Whatever you -store in a register remains there until you store something else in that -register. To see what a register @var{r} contains, use @kbd{M-x -view-register}. + Each register has a name, which consists of a single character. A +register can store a number, a piece of text, a rectangle, a position, +a window configuration, or a file name, but only one thing at any +given time. Whatever you store in a register remains there until you +store something else in that register. To see what a register @var{r} +contains, use @kbd{M-x view-register}. @table @kbd @item M-x view-register @key{RET} @var{r} diff --git a/man/texinfo.tex b/man/texinfo.tex index 27f804eb55f..15e2ac309ca 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2003-10-06.16} +\def\texinfoversion{2005-02-08.10} % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, % 2000, 01, 02 Free Software Foundation, Inc. @@ -2845,6 +2845,7 @@ width0pt\relax} \fi \def\r##1{\realbackslash r {##1}}% % \def\TeX{\realbackslash TeX}% +\def\LaTeX{\realbackslash LaTeX}% \def\acronym##1{\realbackslash acronym {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\code##1{\realbackslash code {##1}}% diff --git a/man/tramp.texi b/man/tramp.texi index ac6fb4d5436..afd5fd273e6 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -381,7 +381,7 @@ behind the scenes when you open a file with @value{tramp}. may be downloaded from @uref{http://savannah.nongnu.org/download/tramp/}. This release includes the full documentation and code for @value{tramp}, -suitable for installation. But Emacs (21.4 or later) includes +suitable for installation. But Emacs (22.1 or later) includes @value{tramp} already, and there is a @value{tramp} package for XEmacs, as well. So maybe it is easier to just use those. But if you want the bleeding edge, read on@dots{...} diff --git a/src/ChangeLog b/src/ChangeLog index b15fba5254c..d2afed264eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,70 @@ +2005-02-12 Dan Nicolaescu <dann@ics.uci.edu> + + * keyboard.c: If HAVE_FCNTL_H include fcntl.h. + +2005-02-12 Kim F. Storm <storm@cua.dk> + + * xdisp.c (expose_window): Don't fix overlaps for mode lines. + +2005-02-10 Kim F. Storm <storm@cua.dk> + + * xdisp.c (try_window_id): Set first_unchanged_at_end_row to NULL + if it moves outside window or it doesn't display text. + +2005-02-09 Kim F. Storm <storm@cua.dk> + + * undo.c (Fprimitive_undo): Check that undo function does not + switch buffer. + +2005-02-08 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xselect.c (selection_data_to_lisp_data): For the special case + type == XA_ATOM, data contains array of int, not array of Atom. + (x_property_data_to_lisp, selection_data_to_lisp_data): Comment + update: data must be array of int for format == 32. + +2005-02-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * undo.c (Fprimitive_undo): Check veracity of delta,start,end. + +2005-02-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xfns.c (Fx_change_window_property): Use long array when format is 32. + (Fx_window_property): If format is 32 and long is bigger than 32 bits, + convert long array returned from XGetWindowProperty to an int array. + (x_set_tool_bar_lines): Check that width and height is greater than + zero before clearing area. + + * xselect.c (x_reply_selection_request): Pass long array to + XChangeProperty so that 64 bit longs are handeled correctly. + (x_get_window_property): If format is 32 and long is bigger than 32 + bits convert data from XGetWindowProperty from long array to int array. + (lisp_data_to_selection_data): When the input is a vector and the + format is 32, allocate a long array even if long is bigger than 32 bits. + (x_fill_property_data): Use char, short and long as the man page + for XChangeProperty specifies. This way the data returned is OK for + both 32 and 64 bit machines. + (x_handle_dnd_message): Calculate size correctly even for 64 bit + machines. + (Fx_send_client_event): Undo change from 2005-02-05, + x_fill_property_data now handles that case. + + * xfns.c (Fx_backspace_delete_keys_p): Add comment about the + reason for the approach in the code. + +2005-02-07 Kim F. Storm <storm@cua.dk> + + * undo.c (Fprimitive_undo): Record max one dummmy apply element. + +2005-02-06 Richard M. Stallman <rms@gnu.org> + + * eval.c (Frun_hook_with_args) + (Frun_hook_with_args_until_success) + (Frun_hook_with_args_until_failure): Doc fixes. + 2005-02-05 Andreas Schwab <schwab@suse.de> - * sysdep.c (sys_subshell): Properly terminate execlp argument - list. + * sysdep.c (sys_subshell): Properly terminate execlp argument list. 2005-02-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> @@ -41,8 +104,7 @@ * macfns.c (x_create_tip_frame): Likewise. - * macterm.c (mac_draw_string_common, x_make_frame_visible): - Likewise. + * macterm.c (mac_draw_string_common, x_make_frame_visible): Likewise. 2005-02-03 Richard M. Stallman <rms@gnu.org> @@ -9915,7 +9977,7 @@ * search.c (Fmatch_data): Doc fix. Explicitly state that match-data is undefined if last search failed. - * keymap.c (Fcommand_remapping): Renamed from Fremap_command. + * keymap.c (Fcommand_remapping): Rename from Fremap_command. All uses changed. 2003-02-12 Juanma Barranquero <lektu@terra.es> @@ -10622,7 +10684,7 @@ selected frame. * keymap.c (apropos_predicate, apropos_accumulate): Make them static. - (syms_of_keymap): staticpro them. + (syms_of_keymap): Staticpro them. (Fapropos_internal): Initialize them and clear them out. Don't GCPRO them. @@ -12724,9 +12786,9 @@ * fns.c (concat): Likewise. * lread.c (read_vector): Likewise. - * lisp.h (SMBP): Deleted. All uses changed to STRING_MULTIBYTE. + * lisp.h (SMBP): Delete. All uses changed to STRING_MULTIBYTE. (STRING_SET_UNIBYTE): New macro. - (SET_STRING_BYTES): Deleted. Callers (all of which supplied a + (SET_STRING_BYTES): Delete. Callers (all of which supplied a length of -1) changed to use STRING_SET_UNIBYTE. * abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c, casefiddle.c, category.c, ccl.c, charset.c, charset.h, coding.c, @@ -12769,7 +12831,7 @@ 2002-07-11 Richard M. Stallman <rms@gnu.org> * alloc.c (Vmemory_full): New variable. - (Vmemory_signal_data): Renamed from memory_signal_data. + (Vmemory_signal_data): Rename from memory_signal_data. Uses changed. (syms_of_alloc): Defvar them. (memory_full, buffer_memory_full): Set Vmemory_full. @@ -12787,7 +12849,7 @@ (reseat_at_next_visible_line_start, next_element_from_buffer): Use `double', not `float', when calling indented_beyond_p. - * s/hpux11.h (BROKEN_SA_RESTART): Defined. + * s/hpux11.h (BROKEN_SA_RESTART): Define. * sysdep.c (sys_signal): Test BROKEN_SA_RESTART. @@ -13545,7 +13607,7 @@ 2002-05-11 Kim F. Storm <storm@cua.dk> - * keymap.c (current_minor_maps): Fixed resizing of cmm_maps; + * keymap.c (current_minor_maps): Fix resizing of cmm_maps; only update cmm_size if realloc actually succeeds. Testing with initial size of 2 elements revealed that using realloc on GNU/Linux would cause a random trap in xmalloc @@ -14784,7 +14846,7 @@ 2002-02-24 Kim F. Storm <storm@cua.dk> - * keymap.c (Flookup_key): Fixed problem in 2001-12-28 patch: + * keymap.c (Flookup_key): Fix problem in 2001-12-28 patch: The validation of the event type was too strict as it didn't allow string events; buffer names are used in bindings for menu-bar-select-buffer (see `menu-bar-update-buffers'). @@ -14797,7 +14859,7 @@ prefix in the keymaps, i.e. [remap COMMAND]. * keymap.c (Qremap, remap_command_vector): New variables. - (is_command_symbol): Removed function. + (is_command_symbol): Remove function. (Fdefine_key): No longer accept a symbol for KEY. Added validation of [remap COMMAND] argument for KEY. The DEF is no longer required to be a symbol when remapping a command. @@ -15155,7 +15217,7 @@ Doc updated. Callers changed. Pass arg to where_is_internal. * keymap.h (Fkey_binding, Fwhere_is_internal): Update prototype. - (is_command_symbol): Added prototype. + (is_command_symbol): Add prototype. * keyboard.c (Vthis_original_command): New variable. (syms_of_keyboard): DEFVAR_LISP it. @@ -15572,7 +15634,7 @@ 2002-01-03 Kim F. Storm <storm@cua.dk> - * keyboard.c (read_key_sequence): Fixed cast of submaps arg to bcopy. + * keyboard.c (read_key_sequence): Fix cast of submaps arg to bcopy. 2002-01-02 Richard M. Stallman <rms@gnu.org> diff --git a/src/eval.c b/src/eval.c index 9c27caa29ca..83e16360473 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2323,7 +2323,7 @@ called to run the hook. If the value is a function, it is called with the given arguments and its return value is returned. If it is a list of functions, those functions are called, in order, with the given arguments ARGS. -It is best not to depend on the value return by `run-hook-with-args', +It is best not to depend on the value returned by `run-hook-with-args', as that may change. Do not use `make-local-variable' to make a hook variable buffer-local. @@ -2339,11 +2339,14 @@ usage: (run-hook-with-args HOOK &rest ARGS) */) DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, Srun_hook_with_args_until_success, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. -HOOK should be a symbol, a hook variable. Its value should -be a list of functions. We call those functions, one by one, -passing arguments ARGS to each of them, until one of them +HOOK should be a symbol, a hook variable. If HOOK has a non-nil +value, that value may be a function or a list of functions to be +called to run the hook. If the value is a function, it is called with +the given arguments and its return value is returned. +If it is a list of functions, those functions are called, in order, +with the given arguments ARGS, until one of them returns a non-nil value. Then we return that value. -If all the functions return nil, we return nil. +However, if they all return nil, we return nil. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. @@ -2358,11 +2361,13 @@ usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, Srun_hook_with_args_until_failure, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. -HOOK should be a symbol, a hook variable. Its value should -be a list of functions. We call those functions, one by one, -passing arguments ARGS to each of them, until one of them -returns nil. Then we return nil. -If all the functions return non-nil, we return non-nil. +HOOK should be a symbol, a hook variable. If HOOK has a non-nil +value, that value may be a function or a list of functions to be +called to run the hook. If the value is a function, it is called with +the given arguments and its return value is returned. +If it is a list of functions, those functions are called, in order, +with the given arguments ARGS, until one of them returns nil. +Then we return nil. However, if they all return non-nil, we return non-nil. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. diff --git a/src/keyboard.c b/src/keyboard.c index 8abc38b1072..e10b111d12d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -65,6 +65,10 @@ Boston, MA 02111-1307, USA. */ #include <unistd.h> #endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif + /* This is to get the definitions of the XK_ symbols. */ #ifdef HAVE_X_WINDOWS #include "xterm.h" diff --git a/src/undo.c b/src/undo.c index eaf312be676..b4e16bfd0e5 100644 --- a/src/undo.c +++ b/src/undo.c @@ -1,5 +1,6 @@ /* undo handling for GNU Emacs. - Copyright (C) 1990, 1993, 1994, 2000 Free Software Foundation, Inc. + Copyright (C) 1990, 1993, 1994, 2000, 2002, 2004, 2005 + Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -454,6 +455,8 @@ Return what remains of the list. */) Lisp_Object next; int count = SPECPDL_INDEX (); register int arg; + Lisp_Object oldlist; + int did_apply = 0; #if 0 /* This is a good feature, but would make undo-start unable to do what is expected. */ @@ -470,6 +473,8 @@ Return what remains of the list. */) arg = XINT (n); next = Qnil; GCPRO2 (next, list); + /* I don't think we need to gcpro oldlist, as we use it only + to check for EQ. ++kfs */ /* In a writable buffer, enable undoing read-only text that is so because of text properties. */ @@ -479,6 +484,8 @@ Return what remains of the list. */) /* Don't let `intangible' properties interfere with undo. */ specbind (Qinhibit_point_motion_hooks, Qt); + oldlist = current_buffer->undo_list; + while (arg > 0) { while (CONSP (list)) @@ -549,24 +556,38 @@ Return what remains of the list. */) } else if (EQ (car, Qapply)) { - Lisp_Object oldlist = current_buffer->undo_list; - /* Element (apply FUNNAME . ARGS) means call FUNNAME to undo. */ + /* Element (apply FUN . ARGS) means call FUN to undo. */ + struct buffer *save_buffer = current_buffer; + car = Fcar (cdr); + cdr = Fcdr (cdr); if (INTEGERP (car)) { - /* Long format: (apply DELTA START END FUNNAME . ARGS). */ - cdr = Fcdr (Fcdr (Fcdr (cdr))); - car = Fcar (cdr); + /* Long format: (apply DELTA START END FUN . ARGS). */ + Lisp_Object delta = car; + Lisp_Object start = Fcar (cdr); + Lisp_Object end = Fcar (Fcdr (cdr)); + Lisp_Object start_mark = Fcopy_marker (start, Qnil); + Lisp_Object end_mark = Fcopy_marker (end, Qt); + + cdr = Fcdr (Fcdr (cdr)); + apply1 (Fcar (cdr), Fcdr (cdr)); + + /* Check that the function did what the entry said it + would do. */ + if (!EQ (start, Fmarker_position (start_mark)) + || (XINT (delta) + XINT (end) + != marker_position (end_mark))) + error ("Changes to be undone by function different than announced"); + Fset_marker (start_mark, Qnil, Qnil); + Fset_marker (end_mark, Qnil, Qnil); } - cdr = Fcdr (cdr); - apply1 (car, cdr); - - /* Make sure this produces at least one undo entry, - so the test in `undo' for continuing an undo series - will work right. */ - if (EQ (oldlist, current_buffer->undo_list)) - current_buffer->undo_list - = Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list); + else + apply1 (car, cdr); + + if (save_buffer != current_buffer) + error ("Undo function switched buffer"); + did_apply = 1; } else if (STRINGP (car) && INTEGERP (cdr)) { @@ -611,6 +632,15 @@ Return what remains of the list. */) arg--; } + + /* Make sure an apply entry produces at least one undo entry, + so the test in `undo' for continuing an undo series + will work right. */ + if (did_apply + && EQ (oldlist, current_buffer->undo_list)) + current_buffer->undo_list + = Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list); + UNGCPRO; return unbind_to (count, list); } diff --git a/src/xdisp.c b/src/xdisp.c index 6ee9efafc62..a90483aae1e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13927,7 +13927,12 @@ try_window_id (w) bottom_vpos, dy); if (first_unchanged_at_end_row) - first_unchanged_at_end_row += dvpos; + { + first_unchanged_at_end_row += dvpos; + if (first_unchanged_at_end_row->y >= it.last_visible_y + || !MATRIX_ROW_DISPLAYS_TEXT_P (first_unchanged_at_end_row)) + first_unchanged_at_end_row = NULL; + } /* If scrolling up, there may be some lines to display at the end of the window. */ @@ -13984,7 +13989,6 @@ try_window_id (w) /* Update window_end_pos and window_end_vpos. */ if (first_unchanged_at_end_row - && first_unchanged_at_end_row->y < it.last_visible_y && !last_text_row_at_end) { /* Window end line if one of the preserved rows from the current @@ -22235,7 +22239,9 @@ expose_window (w, fr) || (r.y >= y0 && r.y < y1) || (r.y + r.height > y0 && r.y + r.height < y1)) { - if (row->overlapping_p) + /* A header line may be overlapping, but there is no need + to fix overlapping areas for them. KFS 2005-02-12 */ + if (row->overlapping_p && !row->mode_line_p) { if (first_overlapping_row == NULL) first_overlapping_row = row; diff --git a/src/xfns.c b/src/xfns.c index 2732a1be051..d1edf554feb 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1399,10 +1399,14 @@ x_set_tool_bar_lines (f, value, oldval) int width = FRAME_PIXEL_WIDTH (f); int y = nlines * FRAME_LINE_HEIGHT (f); - BLOCK_INPUT; - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - 0, y, width, height, False); - UNBLOCK_INPUT; + /* height can be zero here. */ + if (height > 0 && width > 0) + { + BLOCK_INPUT; + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + 0, y, width, height, False); + UNBLOCK_INPUT; + } if (WINDOWP (f->tool_bar_window)) clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix); @@ -4051,8 +4055,13 @@ Value is VALUE. */) data = (unsigned char *) xmalloc (nelements); else if (element_format == 16) data = (unsigned char *) xmalloc (nelements*2); - else - data = (unsigned char *) xmalloc (nelements*4); + else /* format == 32 */ + /* The man page for XChangeProperty: + "If the specified format is 32, the property data must be a + long array." + This applies even if long is more than 64 bits. The X library + converts to 32 bits before sending to the X server. */ + data = (unsigned char *) xmalloc (nelements * sizeof(long)); x_fill_property_data (FRAME_X_DISPLAY (f), value, data, element_format); } @@ -4187,6 +4196,30 @@ no value of TYPE. */) (unsigned char **) &tmp_data); if (rc == Success && tmp_data) { + /* The man page for XGetWindowProperty says: + "If the returned format is 32, the returned data is represented + as a long array and should be cast to that type to obtain the + elements." + This applies even if long is more than 32 bits, the X library + converts from 32 bit elements received from the X server to long + and passes the long array to us. Thus, for that case bcopy can not + be used. We convert to a 32 bit type here, because so much code + assume on that. + + The bytes and offsets passed to XGetWindowProperty refers to the + property and those are indeed in 32 bit quantities if format is + 32. */ + + if (actual_format == 32 && actual_format < BITS_PER_LONG) + { + unsigned long i; + int *idata = (int *) tmp_data; + long *ldata = (long *) tmp_data; + + for (i = 0; i < actual_size; ++i) + idata[i]= (int) ldata[i]; + } + if (NILP (vector_ret_p)) prop_value = make_string (tmp_data, size); else @@ -5387,6 +5420,22 @@ usual X keysyms. */) return Qnil; } + /* In this code we check that the keyboard has physical keys with names + that start with BKSP (Backspace) and DELE (Delete), and that they + generate keysym XK_BackSpace and XK_Delete respectively. + This function is used to test if normal-erase-is-backspace should be + turned on. + An alternative approach would be to just check if XK_BackSpace and + XK_Delete are mapped to any key. But if any of those are mapped to + some non-intuitive key combination (Meta-Shift-Ctrl-whatever) and the + user doesn't know about it, it is better to return false here. + It is more obvious to the user what to do if she/he has two keys + clearly marked with names/symbols and one key does something not + expected (i.e. she/he then tries the other). + The cases where Backspace/Delete is mapped to some other key combination + are rare, and in those cases, normal-erase-is-backspace can be turned on + manually. */ + have_keys = Qnil; kb = XkbGetMap (dpy, XkbAllMapComponentsMask, XkbUseCoreKbd); if (kb) diff --git a/src/xselect.c b/src/xselect.c index daae84b276c..bf37cde4d0b 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -173,12 +173,6 @@ static Lisp_Object Vselection_converter_alist; /* If the selection owner takes too long to reply to a selection request, we give up on it. This is in milliseconds (0 = no timeout.) */ static EMACS_INT x_selection_timeout; - -/* Utility functions */ - -static void lisp_data_to_selection_data (); -static Lisp_Object selection_data_to_lisp_data (); -static Lisp_Object x_get_window_property_as_lisp_data (); @@ -769,9 +763,17 @@ x_reply_selection_request (event, format, data, size, type) TRACE1 ("Set %s to number of bytes to send", XGetAtomName (display, reply.property)); - XChangeProperty (display, window, reply.property, dpyinfo->Xatom_INCR, - 32, PropModeReplace, - (unsigned char *) &bytes_remaining, 1); + { + /* XChangeProperty expects an array of long even if long is more than + 32 bits. */ + long value[1]; + + value[0] = bytes_remaining; + XChangeProperty (display, window, reply.property, dpyinfo->Xatom_INCR, + 32, PropModeReplace, + (unsigned char *) value, 1); + } + XSelectInput (display, window, PropertyChangeMask); /* Tell 'em the INCR data is there... */ @@ -796,9 +798,9 @@ x_reply_selection_request (event, format, data, size, type) TRACE0 ("Got ACK"); while (bytes_remaining) { - int i = ((bytes_remaining < max_bytes) - ? bytes_remaining - : max_bytes); + int i = ((bytes_remaining < max_bytes) + ? bytes_remaining + : max_bytes); BLOCK_INPUT; @@ -1523,9 +1525,38 @@ x_get_window_property (display, window, property, data_ret, bytes_ret, reading it. Deal with that, I guess.... */ if (result != Success) break; - *actual_size_ret *= *actual_format_ret / 8; - bcopy (tmp_data, (*data_ret) + offset, *actual_size_ret); - offset += *actual_size_ret; + + /* The man page for XGetWindowProperty says: + "If the returned format is 32, the returned data is represented + as a long array and should be cast to that type to obtain the + elements." + This applies even if long is more than 32 bits, the X library + converts from 32 bit elements received from the X server to long + and passes the long array to us. Thus, for that case bcopy can not + be used. We convert to a 32 bit type here, because so much code + assume on that. + + The bytes and offsets passed to XGetWindowProperty refers to the + property and those are indeed in 32 bit quantities if format is 32. */ + + if (*actual_format_ret == 32 && *actual_format_ret < BITS_PER_LONG) + { + unsigned long i; + int *idata = (int *) ((*data_ret) + offset); + long *ldata = (long *) tmp_data; + + for (i = 0; i < *actual_size_ret; ++i) + { + idata[i]= (int) ldata[i]; + offset += 4; + } + } + else + { + *actual_size_ret *= *actual_format_ret / 8; + bcopy (tmp_data, (*data_ret) + offset, *actual_size_ret); + offset += *actual_size_ret; + } /* This was allocated by Xlib, so use XFree. */ XFree ((char *) tmp_data); @@ -1738,7 +1769,11 @@ x_get_window_property_as_lisp_data (display, window, property, target_type, When converting an object to C, it may be of the form (SYMBOL . <data>) where SYMBOL is what we should claim that the type is. Format and - representation are as above. */ + representation are as above. + + Important: When format is 32, data should contain an array of int, + not an array of long as the X library returns. This makes a difference + when sizeof(long) != sizeof(int). */ @@ -1780,15 +1815,21 @@ selection_data_to_lisp_data (display, data, size, type, format) else if (type == XA_ATOM) { int i; - if (size == sizeof (Atom)) - return x_atom_to_symbol (display, *((Atom *) data)); + /* On a 64 bit machine sizeof(Atom) == sizeof(long) == 8. + But the callers of these function has made sure the data for + format == 32 is an array of int. Thus, use int instead + of Atom. */ + int *idata = (int *) data; + + if (size == sizeof (int)) + return x_atom_to_symbol (display, (Atom) idata[0]); else { - Lisp_Object v = Fmake_vector (make_number (size / sizeof (Atom)), + Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)), make_number (0)); - for (i = 0; i < size / sizeof (Atom); i++) + for (i = 0; i < size / sizeof (int); i++) Faset (v, make_number (i), - x_atom_to_symbol (display, ((Atom *) data) [i])); + x_atom_to_symbol (display, (Atom) idata[i])); return v; } } @@ -1970,6 +2011,7 @@ lisp_data_to_selection_data (display, obj, else /* This vector is an INTEGER set, or something like it */ { + int data_size = 2; *size_ret = XVECTOR (obj)->size; if (NILP (type)) type = QINTEGER; *format_ret = 16; @@ -1982,7 +2024,11 @@ lisp_data_to_selection_data (display, obj, ("elements of selection vector must be integers or conses of integers"), Fcons (obj, Qnil))); - *data_ret = (unsigned char *) xmalloc (*size_ret * (*format_ret/8)); + /* Use sizeof(long) even if it is more than 32 bits. See comment + in x_get_window_property and x_fill_property_data. */ + + if (*format_ret == 32) data_size = sizeof(long); + *data_ret = (unsigned char *) xmalloc (*size_ret * data_size); for (i = 0; i < *size_ret; i++) if (*format_ret == 32) (*((unsigned long **) data_ret)) [i] @@ -2469,8 +2515,10 @@ x_check_property_data (data) DATA is a Lisp list of values to be converted. RET is the C array that contains the converted values. It is assumed it is big enough to hold all values. - FORMAT is 8, 16 or 32 and gives the size in bits for each C value to - be stored in RET. */ + FORMAT is 8, 16 or 32 and denotes char/short/long for each C value to + be stored in RET. Note that long is used for 32 even if long is more + than 32 bits (see man pages for XChangeProperty, XGetWindowProperty and + XClientMessageEvent). */ void x_fill_property_data (dpy, data, ret, format) @@ -2479,10 +2527,10 @@ x_fill_property_data (dpy, data, ret, format) void *ret; int format; { - CARD32 val; - CARD32 *d32 = (CARD32 *) ret; - CARD16 *d16 = (CARD16 *) ret; - CARD8 *d08 = (CARD8 *) ret; + long val; + long *d32 = (long *) ret; + short *d16 = (short *) ret; + char *d08 = (char *) ret; Lisp_Object iter; for (iter = data; CONSP (iter); iter = XCDR (iter)) @@ -2490,24 +2538,24 @@ x_fill_property_data (dpy, data, ret, format) Lisp_Object o = XCAR (iter); if (INTEGERP (o)) - val = (CARD32) XFASTINT (o); + val = (long) XFASTINT (o); else if (FLOATP (o)) - val = (CARD32) XFLOAT_DATA (o); + val = (long) XFLOAT_DATA (o); else if (CONSP (o)) - val = (CARD32) cons_to_long (o); + val = (long) cons_to_long (o); else if (STRINGP (o)) { BLOCK_INPUT; - val = XInternAtom (dpy, (char *) SDATA (o), False); + val = (long) XInternAtom (dpy, (char *) SDATA (o), False); UNBLOCK_INPUT; } else error ("Wrong type, must be string, number or cons"); if (format == 8) - *d08++ = (CARD8) val; + *d08++ = (char) val; else if (format == 16) - *d16++ = (CARD16) val; + *d16++ = (short) val; else *d32++ = val; } @@ -2522,6 +2570,10 @@ x_fill_property_data (dpy, data, ret, format) be stored in RET. SIZE is the number of elements in DATA. + Important: When format is 32, data should contain an array of int, + not an array of long as the X library returns. This makes a difference + when sizeof(long) != sizeof(int). + Also see comment for selection_data_to_lisp_data above. */ Lisp_Object @@ -2633,7 +2685,8 @@ x_handle_dnd_message (f, event, dpyinfo, bufp) { Lisp_Object vec; Lisp_Object frame; - unsigned long size = (8*sizeof (event->data))/event->format; + /* format 32 => size 5, format 16 => size 10, format 8 => size 20 */ + unsigned long size = 160/event->format; int x, y; unsigned char *data = (unsigned char *) event->data.b; int idata[5]; @@ -2712,8 +2765,6 @@ are ignored. */) struct frame *f = check_x_frame (from); int count; int to_root; - int idata[5]; - void *data; CHECK_STRING (message_type); CHECK_NUMBER (format); @@ -2774,30 +2825,10 @@ are ignored. */) event.xclient.window = to_root ? FRAME_OUTER_WINDOW (f) : wdest; - if (event.xclient.format == 32 && event.xclient.format < BITS_PER_LONG) - { - /* x_fill_property_data expects data to hold 32 bit values when - format == 32, but on a 64 bit machine long is 64 bits. - event.xclient.l is an array of long, so we must compensate. */ - - memset (idata, 0, sizeof (idata)); - data = idata; - } - else - { - memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b)); - data = event.xclient.data.b; - } - - x_fill_property_data (dpyinfo->display, values, data, event.xclient.format); + memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b)); + x_fill_property_data (dpyinfo->display, values, event.xclient.data.b, + event.xclient.format); - if (data == idata) - { - int i; - for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */ - event.xclient.data.l[i] = (long) idata[i]; - } - /* If event mask is 0 the event is sent to the client that created the destination window. But if we are sending to the root window, there is no such client. Then we set the event mask to 0xffff. The |