diff options
| author | Miles Bader | 2007-08-13 13:48:35 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-08-13 13:48:35 +0000 |
| commit | b2e6b10fe2d40020a75ab0025af98a4abf339cd2 (patch) | |
| tree | db265e5ea93cdc13f8e3b54ed5c7ad2869d50ec9 | |
| parent | 905350bef3ebc514a418658dd155c1d062664b56 (diff) | |
| parent | 37cc095b6a175fb5a2fb18fa029eaf3aa3b3fa53 (diff) | |
| download | emacs-b2e6b10fe2d40020a75ab0025af98a4abf339cd2.tar.gz emacs-b2e6b10fe2d40020a75ab0025af98a4abf339cd2.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 846-851)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 88-92)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 242-244)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-246
294 files changed, 3395 insertions, 1349 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 51332e21cdc..3cb98270c8b 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-08-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * FOR-RELEASE (http): Add Gtk+ tool bar and GUD focus problem. | ||
| 4 | |||
| 1 | 2007-07-25 Glenn Morris <rgm@gnu.org> | 5 | 2007-07-25 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * Relicense all FSF files to GPLv3 or later. | 7 | * Relicense all FSF files to GPLv3 or later. |
| @@ -19,7 +23,7 @@ | |||
| 19 | * nt/makedist.bat: Change EOL format to DOS. Don't use | 23 | * nt/makedist.bat: Change EOL format to DOS. Don't use |
| 20 | redirection characters in REM lines. | 24 | redirection characters in REM lines. |
| 21 | 25 | ||
| 22 | 2007-01-27 Jan Dj,Ad(Brv <jhd@winter.localdomain> | 26 | 2007-01-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 23 | 27 | ||
| 24 | * FOR-RELEASE: Removed Gtk/Xft issue. | 28 | * FOR-RELEASE: Removed Gtk/Xft issue. |
| 25 | 29 | ||
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 9d67f20240a..6ddf0bb54dd 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -48,19 +48,23 @@ that branch. Do not make manual changes to this file on the trunk. | |||
| 48 | http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html | 48 | http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html |
| 49 | 49 | ||
| 50 | ** davby@ida.liu.se, 6 July: Bug in pos-visible-in-window-p | 50 | ** davby@ida.liu.se, 6 July: Bug in pos-visible-in-window-p |
| 51 | |||
| 52 | ** dak@gnu.org, 30 May: Redraw problem with overlapping frames | 51 | ** dak@gnu.org, 30 May: Redraw problem with overlapping frames |
| 53 | 52 | ||
| 54 | ** dksw@eircom.net, 3 Jul: Telnet mode (rsh/ssh) | ||
| 55 | |||
| 56 | ** bojohan+news@dd.chalmers.se, 1 Aug: n_schumacher@web.de: modification hooks called only once in | 53 | ** bojohan+news@dd.chalmers.se, 1 Aug: n_schumacher@web.de: modification hooks called only once in |
| 57 | 54 | ||
| 58 | ** sdl.web@gmail.com: problem with transparent PNG image display | 55 | ** ams@gnu.org, 9 July: eshell and external commands |
| 56 | |||
| 57 | ** timh@insightful.com, 25 June: undigestify-rmail-message in emacs 22.1 doesn't split a digest | ||
| 58 | |||
| 59 | ** andreas.roehler@online.de, 24 Jul: CVS build on Suse 10.0 failed | ||
| 60 | |||
| 61 | ** Gtk+ tool bar looses focus when pressing next tool bar button in GUD. | ||
| 62 | http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-08/msg00008.html | ||
| 59 | 63 | ||
| 60 | * FIXES FOR EMACS 22.2 | 64 | * FIXES FOR EMACS 22.2 |
| 61 | 65 | ||
| 62 | Here we list small fixes that arrived too late for Emacs 22.1, but | 66 | Here we list small fixes that arrived too late for Emacs 22.2, but |
| 63 | that should be installed on the release branch after 22.1 is released. | 67 | that should be installed on the release branch after 22.2 is released. |
| 64 | 68 | ||
| 65 | ** Changes to six pbm icons in etc/images. | 69 | ** Changes to six pbm icons in etc/images. |
| 66 | Sync change from trunk 2007-05-19. | 70 | Sync change from trunk 2007-05-19. |
diff --git a/admin/nt/README-ftp-server b/admin/nt/README-ftp-server index 92f2920ba6c..470c78fd41d 100644 --- a/admin/nt/README-ftp-server +++ b/admin/nt/README-ftp-server | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | Precompiled Distributions of | 1 | Precompiled Distributions of |
| 2 | Emacs for Windows | 2 | Emacs for Windows |
| 3 | 3 | ||
| 4 | Version 22.1 | 4 | Version 22.2 |
| 5 | 5 | ||
| 6 | May 22, 2007 | 6 | May 22, 2007 |
| 7 | 7 | ||
| @@ -26,9 +26,9 @@ | |||
| 26 | 26 | ||
| 27 | If you want to redistribute any of the precompiled distributions of | 27 | If you want to redistribute any of the precompiled distributions of |
| 28 | Emacs, be careful to check the implications of the GPL. For instance, | 28 | Emacs, be careful to check the implications of the GPL. For instance, |
| 29 | if you put the emacs-22.1-bin-i386.tar.gz file from this directory on | 29 | if you put the emacs-22.2-bin-i386.tar.gz file from this directory on |
| 30 | an Internet site, you must arrange to distribute the source files of | 30 | an Internet site, you must arrange to distribute the source files of |
| 31 | the SAME version (i.e. ../emacs-22.1.tar.gz). | 31 | the SAME version (i.e. ../emacs-22.2.tar.gz). |
| 32 | 32 | ||
| 33 | Making a link to our copy of the source is NOT sufficient, since we | 33 | Making a link to our copy of the source is NOT sufficient, since we |
| 34 | might upgrade to a new version while you are still distributing the | 34 | might upgrade to a new version while you are still distributing the |
| @@ -37,8 +37,8 @@ | |||
| 37 | 37 | ||
| 38 | * Files in this directory | 38 | * Files in this directory |
| 39 | 39 | ||
| 40 | + emacs-22.1-bin-i386.zip | 40 | + emacs-22.2-bin-i386.zip |
| 41 | Windows binaries of Emacs-22.1, with all lisp code and documentation | 41 | Windows binaries of Emacs-22.2, with all lisp code and documentation |
| 42 | included. | 42 | included. |
| 43 | 43 | ||
| 44 | Download this file if you want a single installation package, and | 44 | Download this file if you want a single installation package, and |
| @@ -49,8 +49,8 @@ | |||
| 49 | If you need the C source code at a later date, it will be safe to | 49 | If you need the C source code at a later date, it will be safe to |
| 50 | unpack the source distribution on top of this installation. | 50 | unpack the source distribution on top of this installation. |
| 51 | 51 | ||
| 52 | + emacs-22.1-barebin-i386.zip | 52 | + emacs-22.2-barebin-i386.zip |
| 53 | Windows binaries of Emacs-22.1, without lisp code or documentation. | 53 | Windows binaries of Emacs-22.2, without lisp code or documentation. |
| 54 | 54 | ||
| 55 | Download this file if you already have the source distribution, or | 55 | Download this file if you already have the source distribution, or |
| 56 | if you need to redump the emacs.exe executable. | 56 | if you need to redump the emacs.exe executable. |
| @@ -60,12 +60,22 @@ | |||
| 60 | file, plus temacs.exe and dump.bat, which are required if you want to | 60 | file, plus temacs.exe and dump.bat, which are required if you want to |
| 61 | redump emacs without recompiling it. | 61 | redump emacs without recompiling it. |
| 62 | 62 | ||
| 63 | + libxpm-src.zip | ||
| 64 | Source code for libXpm-X11R7.2-3.5.6 modified to compile on Windows. | ||
| 65 | This corresponds to the libXpm.dll in emacs-22.2-bin-i386.zip | ||
| 66 | and emacs-22.2-barebin-i386.zip. | ||
| 67 | |||
| 68 | |||
| 69 | The following are provided for users who require older versions. | ||
| 70 | |||
| 71 | + emacs-22.1-bin-i386.zip | ||
| 72 | + emacs-22-1-barebin-i386.zip | ||
| 73 | Windows binaries of Emacs 22.1, contents as above. | ||
| 74 | |||
| 63 | + emacs-21.3-bin-i386.tar.gz | 75 | + emacs-21.3-bin-i386.tar.gz |
| 64 | Windows binaries of Emacs 21.3, with compiled lisp code and some | 76 | Windows binaries of Emacs 21.3, with compiled lisp code and some |
| 65 | documentation included. | 77 | documentation included. |
| 66 | 78 | ||
| 67 | This is provided for users who require the older version. | ||
| 68 | |||
| 69 | + emacs-21.3-leim.tar.gz | 79 | + emacs-21.3-leim.tar.gz |
| 70 | Compiled lisp input methods. This optional addition to Emacs-21.3 | 80 | Compiled lisp input methods. This optional addition to Emacs-21.3 |
| 71 | is required if you want to enter languages that are not directly | 81 | is required if you want to enter languages that are not directly |
| @@ -73,7 +83,7 @@ | |||
| 73 | 83 | ||
| 74 | * Image support | 84 | * Image support |
| 75 | 85 | ||
| 76 | Emacs 22.1 contains support for images, however for most image formats | 86 | Emacs 22.2 contains support for images, however for most image formats |
| 77 | supporting libraries are required. This distribution has been tested | 87 | supporting libraries are required. This distribution has been tested |
| 78 | with the libraries that are distributed with GTK for Windows, and the | 88 | with the libraries that are distributed with GTK for Windows, and the |
| 79 | libraries found at http://gnuwin32.sourceforge.net/. The following image | 89 | libraries found at http://gnuwin32.sourceforge.net/. The following image |
| @@ -82,10 +92,10 @@ | |||
| 82 | PBM/PGM/PPM: Supported natively by Emacs. This format is used for | 92 | PBM/PGM/PPM: Supported natively by Emacs. This format is used for |
| 83 | the black and white versions of the toolbar icons. | 93 | the black and white versions of the toolbar icons. |
| 84 | 94 | ||
| 85 | XPM: requires a Windows port of the XPM library 3.4 or later, | 95 | XPM: a Windows port of the XPM library corresponding to the x.org |
| 86 | which will be named xpm4.dll, libxpm-nox4.dll or | 96 | release of X11R7.2 is included with the binary distribution, but |
| 87 | libxpm.dll. This format is used for the color versions of the | 97 | can be replaced by other versions with the name xpm4.dll, |
| 88 | toolbar icons, and other images in Emacs. | 98 | libxpm-nox4.dll or libxpm.dll. |
| 89 | 99 | ||
| 90 | PNG: requires the PNG reference library 1.2 or later, which will | 100 | PNG: requires the PNG reference library 1.2 or later, which will |
| 91 | be named libpng13d.dll, libpng13.dll, libpng12d.dll, libpng12.dll | 101 | be named libpng13d.dll, libpng13.dll, libpng12d.dll, libpng12.dll |
| @@ -222,7 +232,7 @@ | |||
| 222 | about the Windows port and related software packages. Note that as | 232 | about the Windows port and related software packages. Note that as |
| 223 | of writing, most of the information in that FAQ was for Emacs-21.3 | 233 | of writing, most of the information in that FAQ was for Emacs-21.3 |
| 224 | and earlier versions, so some information may not be relevant to | 234 | and earlier versions, so some information may not be relevant to |
| 225 | Emacs-22.1. | 235 | Emacs-22.2. |
| 226 | 236 | ||
| 227 | In addition to the FAQ, there is a mailing list for discussing issues | 237 | In addition to the FAQ, there is a mailing list for discussing issues |
| 228 | related to the Windows port of Emacs. For information about the | 238 | related to the Windows port of Emacs. For information about the |
diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat index 87e151dd06a..5afef00e9b3 100755 --- a/admin/nt/makedist.bat +++ b/admin/nt/makedist.bat | |||
| @@ -35,8 +35,8 @@ copy %3\README.W32 emacs-%1\README.W32 | |||
| 35 | rem Info-ZIP zip seems to be broken on Windows. | 35 | rem Info-ZIP zip seems to be broken on Windows. |
| 36 | rem It always writes to zip.zip and treats the zipfile argument as one | 36 | rem It always writes to zip.zip and treats the zipfile argument as one |
| 37 | rem of the files to go in it. | 37 | rem of the files to go in it. |
| 38 | rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS | 38 | rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/INSTALL emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS |
| 39 | 7z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim emacs-%1/site-lisp | 39 | 7z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/INSTALL emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim emacs-%1/site-lisp |
| 40 | del emacs-%1\README.W32 | 40 | del emacs-%1\README.W32 |
| 41 | if not (%4) == () goto end | 41 | if not (%4) == () goto end |
| 42 | 42 | ||
diff --git a/etc/ChangeLog b/etc/ChangeLog index 7da5459c40c..9fd1a50736c 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * TODO: `iff' item is dealt with. | ||
| 4 | * GNUS-NEWS, NEWS, NEWS.1-17, NEWS.19, NEWS.21: Replace `iff'. | ||
| 5 | |||
| 1 | 2007-08-01 Glenn Morris <rgm@gnu.org> | 6 | 2007-08-01 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * NEWS: Add fortran-line-length, plus some more sections. | 8 | * NEWS: Add fortran-line-length, plus some more sections. |
diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index fce326fc0d0..f09451af805 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS | |||
| @@ -30,7 +30,7 @@ or remove them using `make remove-installed-shadows'. | |||
| 30 | 30 | ||
| 31 | Use `make.bat' if you want to install Gnus under MS Windows, the first | 31 | Use `make.bat' if you want to install Gnus under MS Windows, the first |
| 32 | argument to the batch-program should be the directory where `xemacs.exe' | 32 | argument to the batch-program should be the directory where `xemacs.exe' |
| 33 | respectively `emacs.exe' is located, iff you want to install Gnus after | 33 | respectively `emacs.exe' is located, if you want to install Gnus after |
| 34 | compiling it, give `make.bat' `/copy' as the second parameter. | 34 | compiling it, give `make.bat' `/copy' as the second parameter. |
| 35 | 35 | ||
| 36 | `make.bat' has been rewritten from scratch, it now features automatic | 36 | `make.bat' has been rewritten from scratch, it now features automatic |
| @@ -308,7 +308,7 @@ as external parts. | |||
| 308 | 308 | ||
| 309 | ** Gnus no longer generate the Sender: header automatically. | 309 | ** Gnus no longer generate the Sender: header automatically. |
| 310 | 310 | ||
| 311 | Earlier it was generated iff the user configurable email address was | 311 | Earlier it was generated when the user configurable email address was |
| 312 | different from the Gnus guessed default user address. As the guessing | 312 | different from the Gnus guessed default user address. As the guessing |
| 313 | algorithm is rarely correct these days, and (more controversially) the | 313 | algorithm is rarely correct these days, and (more controversially) the |
| 314 | only use of the Sender: header was to check if you are entitled to | 314 | only use of the Sender: header was to check if you are entitled to |
| @@ -77,8 +77,6 @@ history element containing the search string becomes the current. | |||
| 77 | 77 | ||
| 78 | * New Modes and Packages in Emacs 23.1 | 78 | * New Modes and Packages in Emacs 23.1 |
| 79 | 79 | ||
| 80 | ** bibtex-style-mode helps you write BibTeX's *.bst files. | ||
| 81 | |||
| 82 | ** minibuffer-indicate-depth-mode shows the minibuffer depth in the prompt. | 80 | ** minibuffer-indicate-depth-mode shows the minibuffer depth in the prompt. |
| 83 | 81 | ||
| 84 | 82 | ||
| @@ -99,8 +97,6 @@ considered for update. | |||
| 99 | *** VC backends can provide extra menu entries to be added to the "Version Control" menu. | 97 | *** VC backends can provide extra menu entries to be added to the "Version Control" menu. |
| 100 | This can be used to add menu entries for backend specific functions. | 98 | This can be used to add menu entries for backend specific functions. |
| 101 | 99 | ||
| 102 | *** VC has some support for Bazaar (bzr). | ||
| 103 | |||
| 104 | ** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs. | 100 | ** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs. |
| 105 | 101 | ||
| 106 | ** BibTeX mode: | 102 | ** BibTeX mode: |
| @@ -198,10 +194,6 @@ like this: | |||
| 198 | Use this instead of "~/.emacs.d". | 194 | Use this instead of "~/.emacs.d". |
| 199 | 195 | ||
| 200 | +++ | 196 | +++ |
| 201 | ** The new function `image-refresh' refreshes all images associated | ||
| 202 | with a given image specification. | ||
| 203 | |||
| 204 | +++ | ||
| 205 | ** The new function `start-file-process is similar to `start-process', | 197 | ** The new function `start-file-process is similar to `start-process', |
| 206 | but obeys file handlers. The file handler is chosen based on | 198 | but obeys file handlers. The file handler is chosen based on |
| 207 | `default-directory'. The functions `start-file-process-shell-command' | 199 | `default-directory'. The functions `start-file-process-shell-command' |
diff --git a/etc/NEWS.1-17 b/etc/NEWS.1-17 index 4e5243ea0c4..7bc30e5d228 100644 --- a/etc/NEWS.1-17 +++ b/etc/NEWS.1-17 | |||
| @@ -1208,7 +1208,7 @@ whether and where a line has a comment. | |||
| 1208 | 1208 | ||
| 1209 | * New function `auto-save-file-name-p' | 1209 | * New function `auto-save-file-name-p' |
| 1210 | 1210 | ||
| 1211 | Should return non-`nil' iff given a string which is the name of an | 1211 | Should return non-`nil' if given a string which is the name of an |
| 1212 | auto-save file (sans directory name). If you redefine | 1212 | auto-save file (sans directory name). If you redefine |
| 1213 | `make-auto-save-file-name', you should redefine this accordingly. By | 1213 | `make-auto-save-file-name', you should redefine this accordingly. By |
| 1214 | default, this function returns `t' for filenames beginning with | 1214 | default, this function returns `t' for filenames beginning with |
diff --git a/etc/NEWS.19 b/etc/NEWS.19 index 2f3e83fb946..08573703c04 100644 --- a/etc/NEWS.19 +++ b/etc/NEWS.19 | |||
| @@ -5133,8 +5133,8 @@ using X). | |||
| 5133 | ** It is now simpler to tell Emacs to display accented characters under | 5133 | ** It is now simpler to tell Emacs to display accented characters under |
| 5134 | X windows. M-x standard-display-european toggles the display of | 5134 | X windows. M-x standard-display-european toggles the display of |
| 5135 | buffer text according to the ISO Latin-1 standard. With a prefix | 5135 | buffer text according to the ISO Latin-1 standard. With a prefix |
| 5136 | argument, this command enables European character display iff the | 5136 | argument, this command enables European character display if and only |
| 5137 | argument is positive. | 5137 | if the argument is positive. |
| 5138 | 5138 | ||
| 5139 | ** The `-i' command-line argument tells Emacs to use a picture of the | 5139 | ** The `-i' command-line argument tells Emacs to use a picture of the |
| 5140 | GNU gnu as its icon, instead of letting the window manager choose an | 5140 | GNU gnu as its icon, instead of letting the window manager choose an |
diff --git a/etc/NEWS.21 b/etc/NEWS.21 index 91a37be8276..a4c42a6479a 100644 --- a/etc/NEWS.21 +++ b/etc/NEWS.21 | |||
| @@ -2502,7 +2502,7 @@ value is returned. If no window satisfies PREDICATE, DEFAULT is | |||
| 2502 | returned. | 2502 | returned. |
| 2503 | 2503 | ||
| 2504 | Optional second arg MINIBUF t means count the minibuffer window even | 2504 | Optional second arg MINIBUF t means count the minibuffer window even |
| 2505 | if not active. MINIBUF nil or omitted means count the minibuffer iff | 2505 | if not active. MINIBUF nil or omitted means count the minibuffer if |
| 2506 | it is active. MINIBUF neither t nor nil means not to count the | 2506 | it is active. MINIBUF neither t nor nil means not to count the |
| 2507 | minibuffer even if it is active. | 2507 | minibuffer even if it is active. |
| 2508 | 2508 | ||
diff --git a/etc/NEWS.22 b/etc/NEWS.22 index ae31b2489e1..6e227639fed 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 | |||
| @@ -55,6 +55,8 @@ in to make it use the scrollbars from the system theme. | |||
| 55 | 55 | ||
| 56 | * New Modes and Packages in Emacs 22.2 | 56 | * New Modes and Packages in Emacs 22.2 |
| 57 | 57 | ||
| 58 | ** bibtex-style-mode helps you write BibTeX's *.bst files. | ||
| 59 | |||
| 58 | ** The new package css-mode.el provides a major mode for editing CSS files. | 60 | ** The new package css-mode.el provides a major mode for editing CSS files. |
| 59 | 61 | ||
| 60 | ** The new package vera-mode.el provides a major mode for editing Vera files. | 62 | ** The new package vera-mode.el provides a major mode for editing Vera files. |
| @@ -67,8 +69,21 @@ in to make it use the scrollbars from the system theme. | |||
| 67 | 69 | ||
| 68 | *** VC has some support for Mercurial (hg). | 70 | *** VC has some support for Mercurial (hg). |
| 69 | 71 | ||
| 72 | *** VC has some support for Bazaar (Bzr). | ||
| 73 | |||
| 70 | *** VC has some support for Git. | 74 | *** VC has some support for Git. |
| 71 | 75 | ||
| 76 | * Lisp Changes in Emacs 22.2. | ||
| 77 | |||
| 78 | ** New function `window-full-width-p' returns t if a window is as wide | ||
| 79 | as its frame. | ||
| 80 | |||
| 81 | ** The new function `image-refresh' refreshes all images associated | ||
| 82 | with a given image specification. | ||
| 83 | |||
| 84 | ** The new function `split-string-and-unquote' does (what?) | ||
| 85 | |||
| 86 | ** The new function `combine-and-quote-strings' does (what?) | ||
| 72 | 87 | ||
| 73 | * Installation Changes in Emacs 22.1 | 88 | * Installation Changes in Emacs 22.1 |
| 74 | 89 | ||
| @@ -3550,8 +3565,8 @@ that is, floats are compared by value and other elements with `eq'. | |||
| 3550 | 3565 | ||
| 3551 | *** New functions `string-or-null-p' and `booleanp'. | 3566 | *** New functions `string-or-null-p' and `booleanp'. |
| 3552 | 3567 | ||
| 3553 | `string-or-null-p' returns non-nil iff OBJECT is a string or nil. | 3568 | `string-or-null-p' returns non-nil if OBJECT is a string or nil. |
| 3554 | `booleanp' returns non-nil iff OBJECT is t or nil. | 3569 | `booleanp' returns non-nil if OBJECT is t or nil. |
| 3555 | 3570 | ||
| 3556 | *** `makehash' is now obsolete. Use `make-hash-table' instead. | 3571 | *** `makehash' is now obsolete. Use `make-hash-table' instead. |
| 3557 | 3572 | ||
| @@ -19,8 +19,6 @@ I.e. mouse-set-font should use customize-face. | |||
| 19 | 19 | ||
| 20 | ** Compute the list of active keymaps *after* reading the first event. | 20 | ** Compute the list of active keymaps *after* reading the first event. |
| 21 | 21 | ||
| 22 | ** Avoid using "iff" in doc strings. | ||
| 23 | |||
| 24 | ** mouse-autoselect-window should wait to select the window until | 22 | ** mouse-autoselect-window should wait to select the window until |
| 25 | the mouse is put to rest or after a delay or both, so that moving over | 23 | the mouse is put to rest or after a delay or both, so that moving over |
| 26 | a window doesn't select it. | 24 | a window doesn't select it. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index f4322e8c0f8..0412137496f 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -2883,7 +2883,7 @@ static void make_C_tag __P((bool)); | |||
| 2883 | * function or variable, or corresponds to a typedef, or | 2883 | * function or variable, or corresponds to a typedef, or |
| 2884 | * is a struct/union/enum tag, or #define, or an enum constant. | 2884 | * is a struct/union/enum tag, or #define, or an enum constant. |
| 2885 | * | 2885 | * |
| 2886 | * *IS_FUNC gets TRUE iff the token is a function or #define macro | 2886 | * *IS_FUNC gets TRUE if the token is a function or #define macro |
| 2887 | * with args. C_EXTP points to which language we are looking at. | 2887 | * with args. C_EXTP points to which language we are looking at. |
| 2888 | * | 2888 | * |
| 2889 | * Globals | 2889 | * Globals |
| @@ -4803,7 +4803,7 @@ Pascal_functions (inf) | |||
| 4803 | int save_lineno, namelen, taglen; | 4803 | int save_lineno, namelen, taglen; |
| 4804 | char c, *name; | 4804 | char c, *name; |
| 4805 | 4805 | ||
| 4806 | bool /* each of these flags is TRUE iff: */ | 4806 | bool /* each of these flags is TRUE if: */ |
| 4807 | incomment, /* point is inside a comment */ | 4807 | incomment, /* point is inside a comment */ |
| 4808 | inquote, /* point is inside '..' string */ | 4808 | inquote, /* point is inside '..' string */ |
| 4809 | get_tagname, /* point is after PROCEDURE/FUNCTION | 4809 | get_tagname, /* point is after PROCEDURE/FUNCTION |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c3af441f34..8daf2daf71f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,194 @@ | |||
| 1 | 2007-08-13 Nick Roberts <nickrob@snap.net.nz> | ||
| 2 | |||
| 3 | * progmodes/gdb-ui.el (gdb-send): Handle CTRL-D more carefully. | ||
| 4 | |||
| 5 | 2007-08-12 Richard Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * pcvs.el (cvs-reread-cvsrc, cvs-checkout, cvs-mode-checkout) | ||
| 8 | (cvs-execute-single-file): Use new name split-string-and-unquote. | ||
| 9 | (cvs-header-msg): Use new name combine-and-quote-strings. | ||
| 10 | |||
| 11 | * emulation/vi.el (vi-next-line): Ignore return value of line-move. | ||
| 12 | |||
| 13 | * progmodes/gud.el (gud-common-init): Use new name | ||
| 14 | split-string-and-unquote. | ||
| 15 | |||
| 16 | * progmodes/flymake.el (flymake-err-line-patterns): Fix infloop | ||
| 17 | in javac regexp. | ||
| 18 | |||
| 19 | * pcvs-util.el (cvs-qtypedesc-strings): Use new names | ||
| 20 | combine-and-quote-strings and split-string-and-unquote. | ||
| 21 | |||
| 22 | * subr.el (combine-and-quote-strings): Renamed from strings->string. | ||
| 23 | (split-string-and-unquote): Renamed from string->strings. | ||
| 24 | |||
| 25 | 2007-08-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 26 | |||
| 27 | * log-view.el (log-view-font-lock-keywords): Use `eval' so as to adapt | ||
| 28 | to buffer-local settings. | ||
| 29 | |||
| 30 | * emacs-lisp/backquote.el (backquote-delay-process): New function. | ||
| 31 | (backquote-process): Add internal arg `level'. Use the two to | ||
| 32 | correctly handle nested backquotes. | ||
| 33 | |||
| 34 | 2007-08-09 Riccardo Murri <riccardo.murri@gmail.com> | ||
| 35 | |||
| 36 | * vc-bzr.el (vc-bzr-registered): Use \0 instead of literal NULs. | ||
| 37 | (vc-bzr-state-words): Add "kind changed" state word. | ||
| 38 | (vc-bzr-status): New function. Return Bzr idea of file status, | ||
| 39 | which is different from VC's. | ||
| 40 | (vc-bzr-state): Use vc-bzr-status. | ||
| 41 | (vc-workfile-unchanged-p): Use vc-bzr-status. | ||
| 42 | (vc-bzr-revert): Use synchronous process; expect exitcode 0. | ||
| 43 | (vc-dired-state): Process "kind changed" state word. | ||
| 44 | |||
| 45 | 2007-08-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 46 | |||
| 47 | * vc-hooks.el (vc-default-find-file-not-found-hook): Do nothing. | ||
| 48 | |||
| 49 | * vc-rcs.el (vc-rcs-find-file-not-found-hook): | ||
| 50 | Move from vc-default-find-file-not-found-hook. | ||
| 51 | |||
| 52 | 2007-08-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 53 | |||
| 54 | * man.el: Remove spurious * in docstrings. | ||
| 55 | Merge defvars and toplevel setq-defaults. | ||
| 56 | (Man-highlight-references0): Limit=nil rather than point-max. | ||
| 57 | (Man-mode-map): Move initialization into the declaration. | ||
| 58 | (Man-strip-page-headers, Man-unindent): Use dolist & inhibit-read-only. | ||
| 59 | (Man-view-header-file): Use expand-file-name rather than concat. | ||
| 60 | (Man-notify-when-ready, Man-bgproc-sentinel): Use with-current-buffer. | ||
| 61 | |||
| 62 | * man.el (Man-next-section): Make sure we do not move backward. | ||
| 63 | |||
| 64 | 2007-08-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 65 | |||
| 66 | * files.el (auto-mode-alist): Use the purecopied text (duh!). | ||
| 67 | |||
| 68 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 69 | |||
| 70 | * Replace `iff' in doc-strings and comments. | ||
| 71 | |||
| 72 | 2007-08-08 Martin Rudalics <rudalics@gmx.at> | ||
| 73 | |||
| 74 | * dired.el (dired-pop-to-buffer): | ||
| 75 | * mouse-drag.el (mouse-drag-should-do-col-scrolling): | ||
| 76 | * calendar/calendar.el (generate-calendar-window): | ||
| 77 | * progmodes/compile.el (compilation-set-window-height): | ||
| 78 | * textmodes/two-column.el (2C-two-columns, 2C-merge): | ||
| 79 | Use window-full-width-p instead of comparing frame-width and | ||
| 80 | window-width. | ||
| 81 | |||
| 82 | * progmodes/compile.el (compilation-find-buffer): Remove extra | ||
| 83 | argument in call to compilation-buffer-internal-p. | ||
| 84 | |||
| 85 | 2007-08-07 Tom Tromey <tromey@redhat.com> | ||
| 86 | |||
| 87 | * progmodes/tcl.el (tcl-indent-level, tcl-continued-indent-level): | ||
| 88 | Add safe-local-variable property. | ||
| 89 | |||
| 90 | 2007-08-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 91 | |||
| 92 | * image-mode.el (image-toggle-display): Use image-refresh. | ||
| 93 | |||
| 94 | 2007-08-07 Riccardo Murri <riccardo.murri@gmail.com> | ||
| 95 | |||
| 96 | * vc-bzr.el: Remove comments about vc-bzr.el being a modified | ||
| 97 | unofficial version. | ||
| 98 | (vc-bzr-command): Remove redundant setting of process-connection-type. | ||
| 99 | (vc-bzr-admin-checkout-format-file): Add autoload. | ||
| 100 | (vc-bzr-root-dir): Remove in favor of vc-bzr-root. | ||
| 101 | (vc-bzr-root): Switch to implementation of vc-bzr-root-dir. | ||
| 102 | (vc-bzr-registered): Compare dirstate format tag with known good | ||
| 103 | value, abort parsing if match fails. Warn user in docstring. | ||
| 104 | (vc-bzr-workfile-version): Case for different Bzr branch formats. | ||
| 105 | See bzrlib/branch.py in Bzr sources. | ||
| 106 | (vc-bzr-diff): First argument FILES may be a string rather than a list. | ||
| 107 | (vc-bzr-shell-command): Remove in favor of | ||
| 108 | vc-bzr-command-discarding-stderr. | ||
| 109 | (vc-bzr-command-discarding-stderr): New function. | ||
| 110 | |||
| 111 | 2007-08-06 Riccardo Murri <riccardo.murri@gmail.com> | ||
| 112 | |||
| 113 | * vc-bzr.el (vc-bzr-registered): Gracefully handle missing "bzr" | ||
| 114 | program, and return nil | ||
| 115 | (vc-bzr-state): Gracefully handle missing "bzr" program, and return nil. | ||
| 116 | (vc-bzr-state): Look for path names relative to the repository | ||
| 117 | root after status keyword. | ||
| 118 | (vc-bzr-file-name-relative): New function. | ||
| 119 | (vc-bzr-admin-dirname): Reinstate, as other vc-bzr-admin-... paths | ||
| 120 | depend on it. | ||
| 121 | (vc-bzr-admin-dirname, ...-checkout-format-file) | ||
| 122 | (...-branch-format-file, ...-revhistory): Paths to some Bzr internal | ||
| 123 | files that we now parse directly for speed. | ||
| 124 | (vc-bzr-root-dir): Use `vc-bzr-admin-checkout-format-file' as witness. | ||
| 125 | (vc-bzr-registered): Only parse vc-bzr-admin-dirstate file if it exists. | ||
| 126 | (vc-bzr-state): "bzr status" successful only if exitcode is 0 | ||
| 127 | (vc-bzr-root): Use `vc-bzr-shell-command'. Stderr may contain | ||
| 128 | Bzr warnings, so we must discard it. | ||
| 129 | (vc-bzr-workfile-version): Speedup counting lines from | ||
| 130 | `vc-bzr-admin-revhistory' file, but fallback to spawning "bzr revno" | ||
| 131 | if that file doesn't exist. | ||
| 132 | (vc-bzr-responsible-p): Use `vc-bzr-root' instead of | ||
| 133 | `vc-bzr-root-dir' for speed. Add `vc-bzr-admin-dirname' | ||
| 134 | (not ".bzr"!) to `vc-directory-exclusion-list' | ||
| 135 | (vc-bzr-shell-command): New function. | ||
| 136 | |||
| 137 | 2007-08-06 Tom Tromey <tromey@redhat.com> | ||
| 138 | |||
| 139 | * diff-mode.el (diff-unified->context, diff-reverse-direction) | ||
| 140 | (diff-fixup-modifs): Typo in docstring. | ||
| 141 | |||
| 142 | 2007-08-06 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 143 | |||
| 144 | * emulation/tpu-edt.el (tpu-current-line): Use posn-at-point and | ||
| 145 | count-screen-lines. | ||
| 146 | (tpu-edt-off): Disable relevant pieces of advice. | ||
| 147 | |||
| 148 | * emulation/tpu-extras.el (tpu-before-save-hook): Rename from | ||
| 149 | tpu-write-file-hook. Activate it with add-hook on buffer-save-hook. | ||
| 150 | (newline, newline-and-indent, do-auto-fill): Use advice instead of | ||
| 151 | redefining the function. | ||
| 152 | (tpu-set-scroll-margins): Activate the pieces of advice. | ||
| 153 | |||
| 154 | 2007-08-06 Martin Rudalics <rudalics@gmx.at> | ||
| 155 | |||
| 156 | * help.el (resize-temp-buffer-window): Use window-full-width-p | ||
| 157 | instead of comparing frame-width and window-width. | ||
| 158 | |||
| 159 | 2007-08-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 160 | |||
| 161 | * emacs-lisp/autoload.el (autoload-print-form): Use print-quoted. | ||
| 162 | |||
| 163 | 2007-08-12 Richard Stallman <rms@gnu.org> | ||
| 164 | |||
| 165 | * progmodes/sh-script.el (sh): Delete group `unix'. | ||
| 166 | |||
| 167 | * progmodes/gud.el (gud): Change to group `processes'. | ||
| 168 | |||
| 169 | 2007-08-11 Glenn Morris <rgm@gnu.org> | ||
| 170 | |||
| 171 | * progmodes/compile.el (compilation-buffer-name): Don't check | ||
| 172 | compilation-arguments. It is superfluous, and the variable isn't | ||
| 173 | even set when this function is called. | ||
| 174 | |||
| 175 | 2007-08-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 176 | |||
| 177 | * term/mac-win.el (mac-ae-reopen-application): New function. | ||
| 178 | (mac-apple-event-map): Bind "reopen application" Apple event to it. | ||
| 179 | |||
| 180 | 2007-08-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 181 | |||
| 182 | * textmodes/tex-mode.el (tex-font-lock-unfontify-region): Fix to | ||
| 183 | take tex-font-script-display into account. | ||
| 184 | (tex-font-script-display, tex-font-lock-suscript): Change from a cons | ||
| 185 | cell to a list of 2 elements to simplify the unfontify code. | ||
| 186 | |||
| 187 | 2007-08-09 Edward O'Connor <hober0@gmail.com> (tiny change) | ||
| 188 | |||
| 189 | * url/url-auth.el (url-basic-auth): When prompting for username | ||
| 190 | and password, default to the username and password in the URL. | ||
| 191 | |||
| 1 | 2007-08-08 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 192 | 2007-08-08 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 193 | ||
| 3 | * ps-print.el (ps-default-fg, ps-default-bg): Docstring fix. | 194 | * ps-print.el (ps-default-fg, ps-default-bg): Docstring fix. |
| @@ -5,11 +196,177 @@ | |||
| 5 | ps-print-color-p is neither nil nor black-white. Reported by Christian | 196 | ps-print-color-p is neither nil nor black-white. Reported by Christian |
| 6 | Schlauer <cs-muelleimer-rubbish.bin@arcor.de>. | 197 | Schlauer <cs-muelleimer-rubbish.bin@arcor.de>. |
| 7 | 198 | ||
| 199 | 2007-08-08 Andreas Schwab <schwab@suse.de> | ||
| 200 | |||
| 201 | * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): Check for | ||
| 202 | self-insert-command, not self-insert. | ||
| 203 | |||
| 204 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 205 | |||
| 206 | * emacs-lisp/eldoc.el (eldoc-get-fnsym-args-string): Make second | ||
| 207 | argument optional, for backwards compatibility, and only highlight | ||
| 208 | args when present. Fix symbol name typo (doc/args). | ||
| 209 | |||
| 210 | * help-mode.el (help-make-xrefs): Search for symbol constituents, | ||
| 211 | rather than just `-'. | ||
| 212 | |||
| 213 | 2007-08-07 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 214 | |||
| 215 | * calc/calc-units.el (calc-convert-temperature): | ||
| 216 | Use `/' to create fractions. | ||
| 217 | |||
| 218 | 2007-08-07 Michael Albinus <michael.albinus@gmx.de> | ||
| 219 | |||
| 220 | * net/tramp.el (tramp-wrong-passwd-regexp): Make the regexp more | ||
| 221 | global matching. | ||
| 222 | (tramp-handle-shell-command): Handle OUTPUT-BUFFER and | ||
| 223 | ERROR-BUFFER more robust. Display output. | ||
| 224 | (tramp-file-name-handler): Add a connection property when we found | ||
| 225 | a foreign file name handler. This allows backends like ftp to | ||
| 226 | profit also from usr/host name completion based on connection | ||
| 227 | cache. | ||
| 228 | (tramp-send-command-and-read): Search for trash after the regexp | ||
| 229 | until eol only. In XEmacs, there is a problem with \n. | ||
| 230 | |||
| 231 | * net/tramp-cache.el (top): Read persistent connection history | ||
| 232 | when cache is empty. | ||
| 233 | |||
| 234 | 2007-08-07 Nic Ferrier <nferrier@tapsellferrier.co.uk> (tiny change) | ||
| 235 | |||
| 236 | * net/tramp.el (tramp-handle-process-file): Fix bug inserting | ||
| 237 | resulting output. | ||
| 238 | |||
| 239 | 2007-08-07 Sam Steingold <sds@gnu.org> | ||
| 240 | |||
| 241 | * progmodes/compile.el (compilation-start): Pass nil as startfile | ||
| 242 | to comint-exec. | ||
| 243 | |||
| 244 | 2007-08-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 245 | |||
| 246 | * longlines.el (longlines-decoded): New variable. | ||
| 247 | (longlines-mode): Avoid encoding or decoding the buffer twice. | ||
| 248 | |||
| 249 | 2007-08-07 Martin Rudalics <rudalics@gmx.at> | ||
| 250 | |||
| 251 | * format.el (format-insert-file): Make sure that at most one undo | ||
| 252 | entry is recorded for the insertion. Inhibit point-motion and | ||
| 253 | modification hooks around call to insert-file-contents. | ||
| 254 | |||
| 255 | 2007-08-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 256 | |||
| 257 | * vc.el (vc-annotate): Select temp-buffer before running vc-exec-after. | ||
| 258 | Select the buffer's window before moving point. | ||
| 259 | |||
| 260 | 2007-08-07 Richard Stallman <rms@gnu.org> | ||
| 261 | |||
| 262 | * term.el (term): Remove parent group `unix'. | ||
| 263 | |||
| 264 | * simple.el (default-indent-new-line): New function. | ||
| 265 | It calls comment-line-break-function if there are comments. | ||
| 266 | (do-auto-fill): Use that. | ||
| 267 | |||
| 268 | 2007-08-07 Ivan Kanis <apple@kanis.eu> | ||
| 269 | |||
| 270 | * time.el (display-time-world-mode, display-time-world-display) | ||
| 271 | (display-time-world, display-time-world-list) | ||
| 272 | (display-time-world-time-format, display-time-world-buffer-name) | ||
| 273 | (display-time-world-timer-enable) | ||
| 274 | (display-time-world-timer-second, display-time-world-mode-map): | ||
| 275 | New. | ||
| 276 | |||
| 277 | 2007-08-07 Sean O'Rourke <sorourke@cs.ucsd.edu> | ||
| 278 | |||
| 279 | * complete.el (PC-lisp-complete-symbol): Complete symbol around point. | ||
| 280 | (PC-do-completion): Add "acronym completion" for symbols and | ||
| 281 | filenames, so e.g. "mvbl" expands to "make-variable-buffer-local". | ||
| 282 | |||
| 283 | 2007-08-06 Sam Steingold <sds@gnu.org> | ||
| 284 | |||
| 285 | * mouse.el (mouse-buffer-menu): Pass mode-name through | ||
| 286 | format-mode-line because it may be a list, | ||
| 287 | e.g., (sgml-xml-mode "XML" "SGML"), and not a string. | ||
| 288 | |||
| 8 | 2007-08-06 Vinicius Jose Latorre <viniciusig@ig.com.br> | 289 | 2007-08-06 Vinicius Jose Latorre <viniciusig@ig.com.br> |
| 9 | 290 | ||
| 291 | * printing.el (pr-update-menus): Docstring fix. | ||
| 292 | |||
| 293 | 2007-08-06 Jason Rumney <jasonr@gnu.org> | ||
| 294 | |||
| 295 | * menu-bar.el (menu-bar-vc-filter): Use vc-call-backend. | ||
| 296 | |||
| 297 | * vc-hooks.el (vc-call): Add doc string. | ||
| 298 | |||
| 299 | 2007-08-06 Michael Albinus <michael.albinus@gmx.de> | ||
| 300 | |||
| 301 | * net/ange-ftp.el (ange-ftp-hook-function): Catch also errors in | ||
| 302 | process-filter. | ||
| 303 | |||
| 304 | 2007-08-06 Kenichi Handa <handa@m17n.org> | ||
| 305 | |||
| 306 | * international/quail.el: Wrap (require 'help-mode) by | ||
| 307 | eval-when-compile. | ||
| 308 | (quail-help-init): New function. | ||
| 309 | (quail-help): Call quail-help-init. | ||
| 310 | (quail-store-decode-map-key): Change it to a function. | ||
| 311 | |||
| 312 | 2007-08-05 Jason Rumney <jasonr@gnu.org> | ||
| 313 | |||
| 314 | * vc.el (vc-rollback): Add norevert argument back. | ||
| 315 | (vc-revert-buffer): Add back as obsolete alias. | ||
| 316 | |||
| 317 | 2007-08-05 Peter Povinec <ppovinec@yahoo.com> (tiny change) | ||
| 318 | |||
| 319 | * term.el: Honor term-default-fg-color and term-default-bg-color | ||
| 320 | settings when modifying term-current-face. | ||
| 321 | (term-default-fg-color, term-default-bg-color): Initialize from | ||
| 322 | default term-current-face. | ||
| 323 | (term-mode, term-reset-terminal): Set term-current-face with | ||
| 324 | term-default-fg-color and term-default-bg-color. | ||
| 325 | (term-handle-colors-array): term-current-face has term-default-fg-color | ||
| 326 | and term-default-bg-color after reset escape sequence. | ||
| 327 | (term-handle-colors-array): Set term-current-color with | ||
| 328 | term-default-fg/bg-color instead of ansi-term-color-vector when the | ||
| 329 | index (term-ansi-current-color or term-ansi-current-bg-color) is zero. | ||
| 330 | |||
| 331 | 2007-08-05 Jay Belanger <belanger@localhost.localdomain> | ||
| 332 | |||
| 333 | * calc/calc-nlfit.el (math-nlfit-curve): | ||
| 334 | Remove unnecessary variables. | ||
| 335 | (math-nlfit-givens): Let bind free variables. | ||
| 336 | |||
| 337 | 2007-08-05 Vinicius Jose Latorre <viniciusig@ig.com.br> | ||
| 338 | |||
| 10 | * printing.el: Require lpr and ps-print when loading printing package. | 339 | * printing.el: Require lpr and ps-print when loading printing package. |
| 11 | Reported by Glenn Morris <rgm@gnu.org>. | 340 | Reported by Glenn Morris <rgm@gnu.org>. |
| 12 | (pr-update-menus): Docstring fix. | 341 | |
| 342 | 2007-08-05 Michael Albinus <michael.albinus@gmx.de> | ||
| 343 | |||
| 344 | * files.el (set-auto-mode): Handle also remote files wrt | ||
| 345 | `auto-mode-alist'. | ||
| 346 | |||
| 347 | 2007-08-04 Jay Belanger <belanger@localhost.localdomain> | ||
| 348 | |||
| 349 | * calc/calcalg3.el (calc-curve-fit): Add support for nonlinear | ||
| 350 | curves and plotting. | ||
| 351 | |||
| 352 | * calc/calc-nlfit.el: New file. | ||
| 353 | |||
| 354 | 2007-08-04 Glenn Morris <rgm@gnu.org> | ||
| 355 | |||
| 356 | * autorevert.el (auto-revert-tail-mode): auto-revert-tail-pos is | ||
| 357 | zero, not nil, when the library is first loaded. Check for a file | ||
| 358 | that has been modified on disk. | ||
| 359 | |||
| 360 | * progmodes/cperl-mode.el (cperl-compilation-error-regexp-alist): | ||
| 361 | Remove duplicate defvar preventing initialization. | ||
| 362 | (cperl-mode): Fix compilation-error-regexp-alist-alist setting. | ||
| 363 | |||
| 364 | 2007-08-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 365 | |||
| 366 | * diff-mode.el (diff-font-lock-keywords): Fix up false positives. | ||
| 367 | (diff-beginning-of-file): Adjust to the fact that diff-file-header-re | ||
| 368 | may match up to 4 lines. | ||
| 369 | (diff-beginning-of-file-and-junk): Rewrite. | ||
| 13 | 370 | ||
| 14 | 2007-08-03 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 371 | 2007-08-03 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 15 | 372 | ||
| @@ -18,6 +375,11 @@ | |||
| 18 | (deactivate-mark): Replace (defvar VAR nil) by (defvar VAR). | 375 | (deactivate-mark): Replace (defvar VAR nil) by (defvar VAR). |
| 19 | (pr-global-menubar): Fix code. | 376 | (pr-global-menubar): Fix code. |
| 20 | 377 | ||
| 378 | 2007-08-03 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 379 | |||
| 380 | * term.el (term-erase-in-display): Fix case when point is not at | ||
| 381 | the beginning of the line. | ||
| 382 | |||
| 21 | 2007-08-03 Jay Belanger <jay.p.belanger@gmail.com> | 383 | 2007-08-03 Jay Belanger <jay.p.belanger@gmail.com> |
| 22 | 384 | ||
| 23 | * calc/calc-ext.el (math-get-value,math-get-sdev) | 385 | * calc/calc-ext.el (math-get-value,math-get-sdev) |
| @@ -38,7 +400,7 @@ | |||
| 38 | * vc-bzr.el (vc-bzr-dir-state, vc-bzr-dired-state-info) | 400 | * vc-bzr.el (vc-bzr-dir-state, vc-bzr-dired-state-info) |
| 39 | (vc-bzr-unload-hook): Use `Bzr' as VC backend name, not `BZR'. | 401 | (vc-bzr-unload-hook): Use `Bzr' as VC backend name, not `BZR'. |
| 40 | 402 | ||
| 41 | 2007-08-02 Richard Stallman <rms@gnu.org> | 403 | 2007-08-03 Richard Stallman <rms@gnu.org> |
| 42 | 404 | ||
| 43 | * mail/rmailsum.el (rmail-make-summary-line): Find end of msg number | 405 | * mail/rmailsum.el (rmail-make-summary-line): Find end of msg number |
| 44 | to update deleted flag. | 406 | to update deleted flag. |
| @@ -58,13 +420,13 @@ | |||
| 58 | buffer immediately if suitable. | 420 | buffer immediately if suitable. |
| 59 | (compile, compilation-buffer-name, compilation-start): Doc fixes. | 421 | (compile, compilation-buffer-name, compilation-start): Doc fixes. |
| 60 | 422 | ||
| 61 | 2007-07-31 Daiki Ueno <ueno@unixuser.org> | 423 | 2007-08-03 Daiki Ueno <ueno@unixuser.org> |
| 62 | 424 | ||
| 63 | * faces.el (face-normalize-spec): New function. | 425 | * faces.el (face-normalize-spec): New function. |
| 64 | (frame-set-background-mode): Normalize face-spec before calling | 426 | (frame-set-background-mode): Normalize face-spec before calling |
| 65 | face-spec-match-p. | 427 | face-spec-match-p. |
| 66 | 428 | ||
| 67 | 2007-07-31 Stefan Monnier <monnier@iro.umontreal.ca> | 429 | 2007-08-03 Stefan Monnier <monnier@iro.umontreal.ca> |
| 68 | 430 | ||
| 69 | * server.el (server-window): Add switch-to-buffer-other-frame option. | 431 | * server.el (server-window): Add switch-to-buffer-other-frame option. |
| 70 | 432 | ||
| @@ -118,16 +480,15 @@ | |||
| 118 | (fortran-mode): Use fortran-line-length, and | 480 | (fortran-mode): Use fortran-line-length, and |
| 119 | fortran-font-lock-syntactic-keywords as a function. Add a | 481 | fortran-font-lock-syntactic-keywords as a function. Add a |
| 120 | hack-local-variables-hook function. | 482 | hack-local-variables-hook function. |
| 121 | (fortran-line-length, fortran-hack-local-variables): New | 483 | (fortran-line-length, fortran-hack-local-variables): New functions. |
| 122 | functions. | 484 | (fortran-window-create, fortran-strip-sequence-nos): Doc fix. |
| 123 | (fortran-window-create, fortran-strip-sequence-nos): Doc fix. Use | 485 | Use fortran-line-length rather than 72. |
| 124 | fortran-line-length rather than 72. | ||
| 125 | (fortran-window-create-momentarily): Doc fix. | 486 | (fortran-window-create-momentarily): Doc fix. |
| 126 | 487 | ||
| 127 | 2007-07-31 Drew Adams <drew.adams@oracle.com> (tiny change) | 488 | 2007-07-31 Drew Adams <drew.adams@oracle.com> (tiny change) |
| 128 | 489 | ||
| 129 | * cus-edit.el (custom-group-value-create, custom-goto-parent): Fix | 490 | * cus-edit.el (custom-group-value-create, custom-goto-parent): |
| 130 | parent groups link. | 491 | Fix parent groups link. |
| 131 | 492 | ||
| 132 | 2007-07-31 Paul Pogonyshev <pogonyshev@gmx.net> | 493 | 2007-07-31 Paul Pogonyshev <pogonyshev@gmx.net> |
| 133 | 494 | ||
| @@ -180,21 +541,21 @@ | |||
| 180 | 541 | ||
| 181 | 2007-07-29 Michael Albinus <michael.albinus@gmx.de> | 542 | 2007-07-29 Michael Albinus <michael.albinus@gmx.de> |
| 182 | 543 | ||
| 183 | * tramp.el: | 544 | * net/tramp.el: |
| 184 | * tramp-uu.el: | 545 | * net/tramp-uu.el: |
| 185 | * trampver.el: Use utf-8 encoding with coding cookie. | 546 | * net/trampver.el: Use utf-8 encoding with coding cookie. |
| 186 | 547 | ||
| 187 | * tramp-cache.el: | 548 | * net/tramp-cache.el: |
| 188 | * tramp-fish.el: | 549 | * net/tramp-fish.el: |
| 189 | * tramp-ftp.el: | 550 | * net/tramp-ftp.el: |
| 190 | * tramp-gw.el: | 551 | * net/tramp-gw.el: |
| 191 | * tramp-smb.el: Remove coding cookie. | 552 | * net/tramp-smb.el: Remove coding cookie. |
| 192 | 553 | ||
| 193 | * tramp.el (tramp-handle-verify-visited-file-modtime): | 554 | * net/tramp.el (tramp-handle-verify-visited-file-modtime): |
| 194 | Flush buffer file-name's file property. | 555 | Flush buffer file-name's file property. |
| 195 | (tramp-handle-file-remote-p): The first parameter is FILENAME. | 556 | (tramp-handle-file-remote-p): The first parameter is FILENAME. |
| 196 | 557 | ||
| 197 | * trampver.el: Update release number. | 558 | * net/trampver.el: Update release number. |
| 198 | 559 | ||
| 199 | 2007-07-29 Juri Linkov <juri@jurta.org> | 560 | 2007-07-29 Juri Linkov <juri@jurta.org> |
| 200 | 561 | ||
| @@ -748,9 +1109,9 @@ | |||
| 748 | 1109 | ||
| 749 | Sync with Tramp 2.1.10. | 1110 | Sync with Tramp 2.1.10. |
| 750 | 1111 | ||
| 751 | * tramp.el (tramp-get-ls-command): Fyx typo. | 1112 | * net/tramp.el (tramp-get-ls-command): Fyx typo. |
| 752 | 1113 | ||
| 753 | * trampver.el: Update release number. | 1114 | * net/trampver.el: Update release number. |
| 754 | 1115 | ||
| 755 | 2007-07-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 1116 | 2007-07-22 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 756 | 1117 | ||
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 1471ca7bebd..b2b03fe63bb 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -39,9 +39,9 @@ define global abbrevs instead." | |||
| 39 | 39 | ||
| 40 | (defun abbrev-mode (&optional arg) | 40 | (defun abbrev-mode (&optional arg) |
| 41 | "Toggle Abbrev mode in the current buffer. | 41 | "Toggle Abbrev mode in the current buffer. |
| 42 | With argument ARG, turn abbrev mode on iff ARG is positive. | 42 | With optional argument ARG, turn abbrev mode on if ARG is |
| 43 | In Abbrev mode, inserting an abbreviation causes it to expand | 43 | positive, otherwise turn it off. In Abbrev mode, inserting an |
| 44 | and be replaced by its expansion." | 44 | abbreviation causes it to expand and be replaced by its expansion." |
| 45 | (interactive "P") | 45 | (interactive "P") |
| 46 | (setq abbrev-mode | 46 | (setq abbrev-mode |
| 47 | (if (null arg) (not abbrev-mode) | 47 | (if (null arg) (not abbrev-mode) |
diff --git a/lisp/allout.el b/lisp/allout.el index f6598063e97..d243a188812 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -1658,8 +1658,9 @@ the following two lines in your Emacs init file: | |||
| 1658 | "Toggle minor mode for controlling exposure and editing of text outlines. | 1658 | "Toggle minor mode for controlling exposure and editing of text outlines. |
| 1659 | \\<allout-mode-map> | 1659 | \\<allout-mode-map> |
| 1660 | 1660 | ||
| 1661 | Optional arg forces mode to re-initialize iff arg is positive num or | 1661 | Optional prefix argument TOGGLE forces the mode to re-initialize |
| 1662 | symbol. Allout outline mode always runs as a minor mode. | 1662 | if it is positive, otherwise it turns the mode off. Allout |
| 1663 | outline mode always runs as a minor mode. | ||
| 1663 | 1664 | ||
| 1664 | Allout outline mode provides extensive outline oriented formatting and | 1665 | Allout outline mode provides extensive outline oriented formatting and |
| 1665 | manipulation. It enables structural editing of outlines, as well as | 1666 | manipulation. It enables structural editing of outlines, as well as |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 473e8e1976b..f1e5b146058 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -276,9 +276,9 @@ the list of old buffers.") | |||
| 276 | "Position of last known end of file.") | 276 | "Position of last known end of file.") |
| 277 | 277 | ||
| 278 | (add-hook 'find-file-hook | 278 | (add-hook 'find-file-hook |
| 279 | (lambda () | 279 | (lambda () |
| 280 | (set (make-local-variable 'auto-revert-tail-pos) | 280 | (set (make-local-variable 'auto-revert-tail-pos) |
| 281 | (nth 7 (file-attributes buffer-file-name))))) | 281 | (nth 7 (file-attributes buffer-file-name))))) |
| 282 | 282 | ||
| 283 | ;; Functions: | 283 | ;; Functions: |
| 284 | 284 | ||
| @@ -315,7 +315,7 @@ This function is designed to be added to hooks, for example: | |||
| 315 | ;;;###autoload | 315 | ;;;###autoload |
| 316 | (define-minor-mode auto-revert-tail-mode | 316 | (define-minor-mode auto-revert-tail-mode |
| 317 | "Toggle reverting tail of buffer when file on disk grows. | 317 | "Toggle reverting tail of buffer when file on disk grows. |
| 318 | With arg, turn Tail mode on iff arg is positive. | 318 | With arg, turn Tail mode on if arg is positive, otherwise turn it off. |
| 319 | 319 | ||
| 320 | When Tail mode is enabled, the tail of the file is constantly | 320 | When Tail mode is enabled, the tail of the file is constantly |
| 321 | followed, as with the shell command `tail -f'. This means that | 321 | followed, as with the shell command `tail -f'. This means that |
| @@ -334,9 +334,25 @@ Use `auto-revert-mode' for changes other than appends!" | |||
| 334 | (auto-revert-tail-mode 0) | 334 | (auto-revert-tail-mode 0) |
| 335 | (error "This buffer is not visiting a file")) | 335 | (error "This buffer is not visiting a file")) |
| 336 | (if (and (buffer-modified-p) | 336 | (if (and (buffer-modified-p) |
| 337 | (not auto-revert-tail-pos) ; library was loaded only after finding file | 337 | (zerop auto-revert-tail-pos) ; library was loaded only after finding file |
| 338 | (not (y-or-n-p "Buffer is modified, so tail offset may be wrong. Proceed? "))) | 338 | (not (y-or-n-p "Buffer is modified, so tail offset may be wrong. Proceed? "))) |
| 339 | (auto-revert-tail-mode 0) | 339 | (auto-revert-tail-mode 0) |
| 340 | ;; a-r-tail-pos stores the size of the file at the time of the | ||
| 341 | ;; last revert. After this package loads, it adds a | ||
| 342 | ;; find-file-hook to set this variable every time a file is | ||
| 343 | ;; loaded. If the package is loaded only _after_ visiting the | ||
| 344 | ;; file to be reverted, then we have no idea what the value of | ||
| 345 | ;; a-r-tail-pos should have been when the file was visited. If | ||
| 346 | ;; the file has changed on disk in the meantime, all we can do | ||
| 347 | ;; is offer to revert the whole thing. If you choose not to | ||
| 348 | ;; revert, then you might miss some output then happened | ||
| 349 | ;; between visiting the file and activating a-r-t-mode. | ||
| 350 | (and (zerop auto-revert-tail-pos) | ||
| 351 | (not (verify-visited-file-modtime (current-buffer))) | ||
| 352 | (y-or-n-p "File changed on disk, content may be missing. \ | ||
| 353 | Perform a full revert? ") | ||
| 354 | ;; Use this (not just revert-buffer) for point-preservation. | ||
| 355 | (auto-revert-handler)) | ||
| 340 | ;; else we might reappend our own end when we save | 356 | ;; else we might reappend our own end when we save |
| 341 | (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) | 357 | (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) |
| 342 | (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position | 358 | (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 8a492d665a1..9fd4b3b9569 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -493,7 +493,7 @@ Menu of mode operations in the mode line.") | |||
| 493 | (defvar minor-mode-alist nil "\ | 493 | (defvar minor-mode-alist nil "\ |
| 494 | Alist saying how to show minor modes in the mode line. | 494 | Alist saying how to show minor modes in the mode line. |
| 495 | Each element looks like (VARIABLE STRING); | 495 | Each element looks like (VARIABLE STRING); |
| 496 | STRING is included in the mode line iff VARIABLE's value is non-nil. | 496 | STRING is included in the mode line if VARIABLE's value is non-nil. |
| 497 | 497 | ||
| 498 | Actually, STRING need not be a string; any possible mode-line element | 498 | Actually, STRING need not be a string; any possible mode-line element |
| 499 | is okay. See `mode-line-format'.") | 499 | is okay. See `mode-line-format'.") |
diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el new file mode 100644 index 00000000000..489599781f6 --- /dev/null +++ b/lisp/calc/calc-nlfit.el | |||
| @@ -0,0 +1,817 @@ | |||
| 1 | ;;; calc-nlfit.el --- nonlinear curve fitting for Calc | ||
| 2 | |||
| 3 | ;; Copyright (C) 2007 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | |||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 3, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | |||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | |||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 22 | ;; Boston, MA 02110-1301, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;; This code uses the Levenberg-Marquardt method, as described in | ||
| 27 | ;; _Numerical Analysis_ by H. R. Schwarz, to fit data to | ||
| 28 | ;; nonlinear curves. Currently, the only the following curves are | ||
| 29 | ;; supported: | ||
| 30 | ;; The logistic S curve, y=a/(1+exp(b*(t-c))) | ||
| 31 | ;; Here, y is usually interpreted as the population of some | ||
| 32 | ;; quantity at time t. So we will think of the data as consisting | ||
| 33 | ;; of quantities q0, q1, ..., qn and their respective times | ||
| 34 | ;; t0, t1, ..., tn. | ||
| 35 | |||
| 36 | ;; The logistic bell curve, y=A*exp(B*(t-C))/(1+exp(B*(t-C)))^2 | ||
| 37 | ;; Note that this is the derivative of the formula for the S curve. | ||
| 38 | ;; We get A=-a*b, B=b and C=c. Here, y is interpreted as the rate | ||
| 39 | ;; of growth of a population at time t. So we will think of the | ||
| 40 | ;; data as consisting of rates p0, p1, ..., pn and their | ||
| 41 | ;; respective times t0, t1, ..., tn. | ||
| 42 | |||
| 43 | ;; The Hubbert Linearization, y/x=A*(1-x/B) | ||
| 44 | ;; Here, y is thought of as the rate of growth of a population | ||
| 45 | ;; and x represents the actual population. This is essentially | ||
| 46 | ;; the differential equation describing the actual population. | ||
| 47 | |||
| 48 | ;; The Levenberg-Marquardt method is an iterative process: it takes | ||
| 49 | ;; an initial guess for the parameters and refines them. To get an | ||
| 50 | ;; initial guess for the parameters, we'll use a method described by | ||
| 51 | ;; Luis de Sousa in "Hubbert's Peak Mathematics". The idea is that | ||
| 52 | ;; given quantities Q and the corresponding rates P, they should | ||
| 53 | ;; satisfy P/Q= mQ+a. We can use the parameter a for an | ||
| 54 | ;; approximation for the parameter a in the S curve, and | ||
| 55 | ;; approximations for b and c are found using least squares on the | ||
| 56 | ;; linearization log((a/y)-1) = log(bb) + cc*t of | ||
| 57 | ;; y=a/(1+bb*exp(cc*t)), which is equivalent to the above s curve | ||
| 58 | ;; formula, and then tranlating it to b and c. From this, we can | ||
| 59 | ;; also get approximations for the bell curve parameters. | ||
| 60 | |||
| 61 | ;;; Code: | ||
| 62 | |||
| 63 | (require 'calc-arith) | ||
| 64 | |||
| 65 | (defun math-nlfit-least-squares (xdata ydata &optional sdata sigmas) | ||
| 66 | "Return the parameters A and B for the best least squares fit y=a+bx." | ||
| 67 | (let* ((n (length xdata)) | ||
| 68 | (s2data (if sdata | ||
| 69 | (mapcar 'calcFunc-sqr sdata) | ||
| 70 | (make-list n 1))) | ||
| 71 | (S (if sdata 0 n)) | ||
| 72 | (Sx 0) | ||
| 73 | (Sy 0) | ||
| 74 | (Sxx 0) | ||
| 75 | (Sxy 0) | ||
| 76 | D) | ||
| 77 | (while xdata | ||
| 78 | (let ((x (car xdata)) | ||
| 79 | (y (car ydata)) | ||
| 80 | (s (car s2data))) | ||
| 81 | (setq Sx (math-add Sx (if s (math-div x s) x))) | ||
| 82 | (setq Sy (math-add Sy (if s (math-div y s) y))) | ||
| 83 | (setq Sxx (math-add Sxx (if s (math-div (math-mul x x) s) | ||
| 84 | (math-mul x x)))) | ||
| 85 | (setq Sxy (math-add Sxy (if s (math-div (math-mul x y) s) | ||
| 86 | (math-mul x y)))) | ||
| 87 | (if sdata | ||
| 88 | (setq S (math-add S (math-div 1 s))))) | ||
| 89 | (setq xdata (cdr xdata)) | ||
| 90 | (setq ydata (cdr ydata)) | ||
| 91 | (setq s2data (cdr s2data))) | ||
| 92 | (setq D (math-sub (math-mul S Sxx) (math-mul Sx Sx))) | ||
| 93 | (let ((A (math-div (math-sub (math-mul Sxx Sy) (math-mul Sx Sxy)) D)) | ||
| 94 | (B (math-div (math-sub (math-mul S Sxy) (math-mul Sx Sy)) D))) | ||
| 95 | (if sigmas | ||
| 96 | (let ((C11 (math-div Sxx D)) | ||
| 97 | (C12 (math-neg (math-div Sx D))) | ||
| 98 | (C22 (math-div S D))) | ||
| 99 | (list (list 'sdev A (calcFunc-sqrt C11)) | ||
| 100 | (list 'sdev B (calcFunc-sqrt C22)) | ||
| 101 | (list 'vec | ||
| 102 | (list 'vec C11 C12) | ||
| 103 | (list 'vec C12 C22)))) | ||
| 104 | (list A B))))) | ||
| 105 | |||
| 106 | ;;; The methods described by de Sousa require the cumulative data qdata | ||
| 107 | ;;; and the rates pdata. We will assume that we are given either | ||
| 108 | ;;; qdata and the corresponding times tdata, or pdata and the corresponding | ||
| 109 | ;;; tdata. The following two functions will find pdata or qdata, | ||
| 110 | ;;; given the other.. | ||
| 111 | |||
| 112 | ;;; First, given two lists; one of values q0, q1, ..., qn and one of | ||
| 113 | ;;; corresponding times t0, t1, ..., tn; return a list | ||
| 114 | ;;; p0, p1, ..., pn of the rates of change of the qi with respect to t. | ||
| 115 | ;;; p0 is the right hand derivative (q1 - q0)/(t1 - t0). | ||
| 116 | ;;; pn is the left hand derivative (qn - q(n-1))/(tn - t(n-1)). | ||
| 117 | ;;; The other pis are the averages of the two: | ||
| 118 | ;;; (1/2)((qi - q(i-1))/(ti - t(i-1)) + (q(i+1) - qi)/(t(i+1) - ti)). | ||
| 119 | |||
| 120 | (defun math-nlfit-get-rates-from-cumul (tdata qdata) | ||
| 121 | (let ((pdata (list | ||
| 122 | (math-div | ||
| 123 | (math-sub (nth 1 qdata) | ||
| 124 | (nth 0 qdata)) | ||
| 125 | (math-sub (nth 1 tdata) | ||
| 126 | (nth 0 tdata)))))) | ||
| 127 | (while (> (length qdata) 2) | ||
| 128 | (setq pdata | ||
| 129 | (cons | ||
| 130 | (math-mul | ||
| 131 | '(float 5 -1) | ||
| 132 | (math-add | ||
| 133 | (math-div | ||
| 134 | (math-sub (nth 2 qdata) | ||
| 135 | (nth 1 qdata)) | ||
| 136 | (math-sub (nth 2 tdata) | ||
| 137 | (nth 1 tdata))) | ||
| 138 | (math-div | ||
| 139 | (math-sub (nth 1 qdata) | ||
| 140 | (nth 0 qdata)) | ||
| 141 | (math-sub (nth 1 tdata) | ||
| 142 | (nth 0 tdata))))) | ||
| 143 | pdata)) | ||
| 144 | (setq qdata (cdr qdata))) | ||
| 145 | (setq pdata | ||
| 146 | (cons | ||
| 147 | (math-div | ||
| 148 | (math-sub (nth 1 qdata) | ||
| 149 | (nth 0 qdata)) | ||
| 150 | (math-sub (nth 1 tdata) | ||
| 151 | (nth 0 tdata))) | ||
| 152 | pdata)) | ||
| 153 | (reverse pdata))) | ||
| 154 | |||
| 155 | ;;; Next, given two lists -- one of rates p0, p1, ..., pn and one of | ||
| 156 | ;;; corresponding times t0, t1, ..., tn -- and an initial values q0, | ||
| 157 | ;;; return a list q0, q1, ..., qn of the cumulative values. | ||
| 158 | ;;; q0 is the initial value given. | ||
| 159 | ;;; For i>0, qi is computed using the trapezoid rule: | ||
| 160 | ;;; qi = q(i-1) + (1/2)(pi + p(i-1))(ti - t(i-1)) | ||
| 161 | |||
| 162 | (defun math-nlfit-get-cumul-from-rates (tdata pdata q0) | ||
| 163 | (let* ((qdata (list q0))) | ||
| 164 | (while (cdr pdata) | ||
| 165 | (setq qdata | ||
| 166 | (cons | ||
| 167 | (math-add (car qdata) | ||
| 168 | (math-mul | ||
| 169 | (math-mul | ||
| 170 | '(float 5 -1) | ||
| 171 | (math-add (nth 1 pdata) (nth 0 pdata))) | ||
| 172 | (math-sub (nth 1 tdata) | ||
| 173 | (nth 0 tdata)))) | ||
| 174 | qdata)) | ||
| 175 | (setq pdata (cdr pdata)) | ||
| 176 | (setq tdata (cdr tdata))) | ||
| 177 | (reverse qdata))) | ||
| 178 | |||
| 179 | ;;; Given the qdata, pdata and tdata, find the parameters | ||
| 180 | ;;; a, b and c that fit q = a/(1+b*exp(c*t)). | ||
| 181 | ;;; a is found using the method described by de Sousa. | ||
| 182 | ;;; b and c are found using least squares on the linearization | ||
| 183 | ;;; log((a/q)-1) = log(b) + c*t | ||
| 184 | ;;; In some cases (where the logistic curve may well be the wrong | ||
| 185 | ;;; model), the computed a will be less than or equal to the maximum | ||
| 186 | ;;; value of q in qdata; in which case the above linearization won't work. | ||
| 187 | ;;; In this case, a will be replaced by a number slightly above | ||
| 188 | ;;; the maximum value of q. | ||
| 189 | |||
| 190 | (defun math-nlfit-find-qmax (qdata pdata tdata) | ||
| 191 | (let* ((ratios (mapcar* 'math-div pdata qdata)) | ||
| 192 | (lsdata (math-nlfit-least-squares ratios tdata)) | ||
| 193 | (qmax (math-max-list (car qdata) (cdr qdata))) | ||
| 194 | (a (math-neg (math-div (nth 1 lsdata) (nth 0 lsdata))))) | ||
| 195 | (if (math-lessp a qmax) | ||
| 196 | (math-add '(float 5 -1) qmax) | ||
| 197 | a))) | ||
| 198 | |||
| 199 | (defun math-nlfit-find-logistic-parameters (qdata pdata tdata) | ||
| 200 | (let* ((a (math-nlfit-find-qmax qdata pdata tdata)) | ||
| 201 | (newqdata | ||
| 202 | (mapcar (lambda (q) (calcFunc-ln (math-sub (math-div a q) 1))) | ||
| 203 | qdata)) | ||
| 204 | (bandc (math-nlfit-least-squares tdata newqdata))) | ||
| 205 | (list | ||
| 206 | a | ||
| 207 | (calcFunc-exp (nth 0 bandc)) | ||
| 208 | (nth 1 bandc)))) | ||
| 209 | |||
| 210 | ;;; Next, given the pdata and tdata, we can find the qdata if we know q0. | ||
| 211 | ;;; We first try to find q0, using the fact that when p takes on its largest | ||
| 212 | ;;; value, q is half of its maximum value. So we'll find the maximum value | ||
| 213 | ;;; of q given various q0, and use bisection to approximate the correct q0. | ||
| 214 | |||
| 215 | ;;; First, given pdata and tdata, find what half of qmax would be if q0=0. | ||
| 216 | |||
| 217 | (defun math-nlfit-find-qmaxhalf (pdata tdata) | ||
| 218 | (let ((pmax (math-max-list (car pdata) (cdr pdata))) | ||
| 219 | (qmh 0)) | ||
| 220 | (while (math-lessp (car pdata) pmax) | ||
| 221 | (setq qmh | ||
| 222 | (math-add qmh | ||
| 223 | (math-mul | ||
| 224 | (math-mul | ||
| 225 | '(float 5 -1) | ||
| 226 | (math-add (nth 1 pdata) (nth 0 pdata))) | ||
| 227 | (math-sub (nth 1 tdata) | ||
| 228 | (nth 0 tdata))))) | ||
| 229 | (setq pdata (cdr pdata)) | ||
| 230 | (setq tdata (cdr tdata))) | ||
| 231 | qmh)) | ||
| 232 | |||
| 233 | ;;; Next, given pdata and tdata, approximate q0. | ||
| 234 | |||
| 235 | (defun math-nlfit-find-q0 (pdata tdata) | ||
| 236 | (let* ((qhalf (math-nlfit-find-qmaxhalf pdata tdata)) | ||
| 237 | (q0 (math-mul 2 qhalf)) | ||
| 238 | (qdata (math-nlfit-get-cumul-from-rates tdata pdata q0))) | ||
| 239 | (while (math-lessp (math-nlfit-find-qmax | ||
| 240 | (mapcar | ||
| 241 | (lambda (q) (math-add q0 q)) | ||
| 242 | qdata) | ||
| 243 | pdata tdata) | ||
| 244 | (math-mul | ||
| 245 | '(float 5 -1) | ||
| 246 | (math-add | ||
| 247 | q0 | ||
| 248 | qhalf))) | ||
| 249 | (setq q0 (math-add q0 qhalf))) | ||
| 250 | (let* ((qmin (math-sub q0 qhalf)) | ||
| 251 | (qmax q0) | ||
| 252 | (qt (math-nlfit-find-qmax | ||
| 253 | (mapcar | ||
| 254 | (lambda (q) (math-add q0 q)) | ||
| 255 | qdata) | ||
| 256 | pdata tdata)) | ||
| 257 | (i 0)) | ||
| 258 | (while (< i 10) | ||
| 259 | (setq q0 (math-mul '(float 5 -1) (math-add qmin qmax))) | ||
| 260 | (if (math-lessp | ||
| 261 | (math-nlfit-find-qmax | ||
| 262 | (mapcar | ||
| 263 | (lambda (q) (math-add q0 q)) | ||
| 264 | qdata) | ||
| 265 | pdata tdata) | ||
| 266 | (math-mul '(float 5 -1) (math-add qhalf q0))) | ||
| 267 | (setq qmin q0) | ||
| 268 | (setq qmax q0)) | ||
| 269 | (setq i (1+ i))) | ||
| 270 | (math-mul '(float 5 -1) (math-add qmin qmax))))) | ||
| 271 | |||
| 272 | ;;; To improve the approximations to the parameters, we can use | ||
| 273 | ;;; Marquardt method as described in Schwarz's book. | ||
| 274 | |||
| 275 | ;;; Small numbers used in the Givens algorithm | ||
| 276 | (defvar math-nlfit-delta '(float 1 -8)) | ||
| 277 | |||
| 278 | (defvar math-nlfit-epsilon '(float 1 -5)) | ||
| 279 | |||
| 280 | ;;; Maximum number of iterations | ||
| 281 | (defvar math-nlfit-max-its 100) | ||
| 282 | |||
| 283 | ;;; Next, we need some functions for dealing with vectors and | ||
| 284 | ;;; matrices. For convenience, we'll work with Emacs lists | ||
| 285 | ;;; as vectors, rather than Calc's vectors. | ||
| 286 | |||
| 287 | (defun math-nlfit-set-elt (vec i x) | ||
| 288 | (setcar (nthcdr (1- i) vec) x)) | ||
| 289 | |||
| 290 | (defun math-nlfit-get-elt (vec i) | ||
| 291 | (nth (1- i) vec)) | ||
| 292 | |||
| 293 | (defun math-nlfit-make-matrix (i j) | ||
| 294 | (let ((row (make-list j 0)) | ||
| 295 | (mat nil) | ||
| 296 | (k 0)) | ||
| 297 | (while (< k i) | ||
| 298 | (setq mat (cons (copy-list row) mat)) | ||
| 299 | (setq k (1+ k))) | ||
| 300 | mat)) | ||
| 301 | |||
| 302 | (defun math-nlfit-set-matx-elt (mat i j x) | ||
| 303 | (setcar (nthcdr (1- j) (nth (1- i) mat)) x)) | ||
| 304 | |||
| 305 | (defun math-nlfit-get-matx-elt (mat i j) | ||
| 306 | (nth (1- j) (nth (1- i) mat))) | ||
| 307 | |||
| 308 | ;;; For solving the linearized system. | ||
| 309 | ;;; (The Givens method, from Schwarz.) | ||
| 310 | |||
| 311 | (defun math-nlfit-givens (C d) | ||
| 312 | (let* ((C (copy-tree C)) | ||
| 313 | (d (copy-tree d)) | ||
| 314 | (n (length (car C))) | ||
| 315 | (N (length C)) | ||
| 316 | (j 1) | ||
| 317 | (r (make-list N 0)) | ||
| 318 | (x (make-list N 0)) | ||
| 319 | w | ||
| 320 | gamma | ||
| 321 | sigma | ||
| 322 | rho) | ||
| 323 | (while (<= j n) | ||
| 324 | (let ((i (1+ j))) | ||
| 325 | (while (<= i N) | ||
| 326 | (let ((cij (math-nlfit-get-matx-elt C i j)) | ||
| 327 | (cjj (math-nlfit-get-matx-elt C j j))) | ||
| 328 | (when (not (math-equal 0 cij)) | ||
| 329 | (if (math-lessp (calcFunc-abs cjj) | ||
| 330 | (math-mul math-nlfit-delta (calcFunc-abs cij))) | ||
| 331 | (setq w (math-neg cij) | ||
| 332 | gamma 0 | ||
| 333 | sigma 1 | ||
| 334 | rho 1) | ||
| 335 | (setq w (math-mul | ||
| 336 | (calcFunc-sign cjj) | ||
| 337 | (calcFunc-sqrt | ||
| 338 | (math-add | ||
| 339 | (math-mul cjj cjj) | ||
| 340 | (math-mul cij cij)))) | ||
| 341 | gamma (math-div cjj w) | ||
| 342 | sigma (math-neg (math-div cij w))) | ||
| 343 | (if (math-lessp (calcFunc-abs sigma) gamma) | ||
| 344 | (setq rho sigma) | ||
| 345 | (setq rho (math-div (calcFunc-sign sigma) gamma)))) | ||
| 346 | (setq cjj w | ||
| 347 | cij rho) | ||
| 348 | (math-nlfit-set-matx-elt C j j w) | ||
| 349 | (math-nlfit-set-matx-elt C i j rho) | ||
| 350 | (let ((k (1+ j))) | ||
| 351 | (while (<= k n) | ||
| 352 | (let* ((cjk (math-nlfit-get-matx-elt C j k)) | ||
| 353 | (cik (math-nlfit-get-matx-elt C i k)) | ||
| 354 | (h (math-sub | ||
| 355 | (math-mul gamma cjk) (math-mul sigma cik)))) | ||
| 356 | (setq cik (math-add | ||
| 357 | (math-mul sigma cjk) | ||
| 358 | (math-mul gamma cik))) | ||
| 359 | (setq cjk h) | ||
| 360 | (math-nlfit-set-matx-elt C i k cik) | ||
| 361 | (math-nlfit-set-matx-elt C j k cjk) | ||
| 362 | (setq k (1+ k))))) | ||
| 363 | (let* ((di (math-nlfit-get-elt d i)) | ||
| 364 | (dj (math-nlfit-get-elt d j)) | ||
| 365 | (h (math-sub | ||
| 366 | (math-mul gamma dj) | ||
| 367 | (math-mul sigma di)))) | ||
| 368 | (setq di (math-add | ||
| 369 | (math-mul sigma dj) | ||
| 370 | (math-mul gamma di))) | ||
| 371 | (setq dj h) | ||
| 372 | (math-nlfit-set-elt d i di) | ||
| 373 | (math-nlfit-set-elt d j dj)))) | ||
| 374 | (setq i (1+ i)))) | ||
| 375 | (setq j (1+ j))) | ||
| 376 | (let ((i n) | ||
| 377 | s) | ||
| 378 | (while (>= i 1) | ||
| 379 | (math-nlfit-set-elt r i 0) | ||
| 380 | (setq s (math-nlfit-get-elt d i)) | ||
| 381 | (let ((k (1+ i))) | ||
| 382 | (while (<= k n) | ||
| 383 | (setq s (math-add s (math-mul (math-nlfit-get-matx-elt C i k) | ||
| 384 | (math-nlfit-get-elt x k)))) | ||
| 385 | (setq k (1+ k)))) | ||
| 386 | (math-nlfit-set-elt x i | ||
| 387 | (math-neg | ||
| 388 | (math-div s | ||
| 389 | (math-nlfit-get-matx-elt C i i)))) | ||
| 390 | (setq i (1- i)))) | ||
| 391 | (let ((i (1+ n))) | ||
| 392 | (while (<= i N) | ||
| 393 | (math-nlfit-set-elt r i (math-nlfit-get-elt d i)) | ||
| 394 | (setq i (1+ i)))) | ||
| 395 | (let ((j n)) | ||
| 396 | (while (>= j 1) | ||
| 397 | (let ((i N)) | ||
| 398 | (while (>= i (1+ j)) | ||
| 399 | (setq rho (math-nlfit-get-matx-elt C i j)) | ||
| 400 | (if (math-equal rho 1) | ||
| 401 | (setq gamma 0 | ||
| 402 | sigma 1) | ||
| 403 | (if (math-lessp (calcFunc-abs rho) 1) | ||
| 404 | (setq sigma rho | ||
| 405 | gamma (calcFunc-sqrt | ||
| 406 | (math-sub 1 (math-mul sigma sigma)))) | ||
| 407 | (setq gamma (math-div 1 (calcFunc-abs rho)) | ||
| 408 | sigma (math-mul (calcFunc-sign rho) | ||
| 409 | (calcFunc-sqrt | ||
| 410 | (math-sub 1 (math-mul gamma gamma))))))) | ||
| 411 | (let ((ri (math-nlfit-get-elt r i)) | ||
| 412 | (rj (math-nlfit-get-elt r j)) | ||
| 413 | h) | ||
| 414 | (setq h (math-add (math-mul gamma rj) | ||
| 415 | (math-mul sigma ri))) | ||
| 416 | (setq ri (math-sub | ||
| 417 | (math-mul gamma ri) | ||
| 418 | (math-mul sigma rj))) | ||
| 419 | (setq rj h) | ||
| 420 | (math-nlfit-set-elt r i ri) | ||
| 421 | (math-nlfit-set-elt r j rj)) | ||
| 422 | (setq i (1- i)))) | ||
| 423 | (setq j (1- j)))) | ||
| 424 | |||
| 425 | x)) | ||
| 426 | |||
| 427 | (defun math-nlfit-jacobian (grad xlist parms &optional slist) | ||
| 428 | (let ((j nil)) | ||
| 429 | (while xlist | ||
| 430 | (let ((row (apply grad (car xlist) parms))) | ||
| 431 | (setq j | ||
| 432 | (cons | ||
| 433 | (if slist | ||
| 434 | (mapcar (lambda (x) (math-div x (car slist))) row) | ||
| 435 | row) | ||
| 436 | j))) | ||
| 437 | (setq slist (cdr slist)) | ||
| 438 | (setq xlist (cdr xlist))) | ||
| 439 | (reverse j))) | ||
| 440 | |||
| 441 | (defun math-nlfit-make-ident (l n) | ||
| 442 | (let ((m (math-nlfit-make-matrix n n)) | ||
| 443 | (i 1)) | ||
| 444 | (while (<= i n) | ||
| 445 | (math-nlfit-set-matx-elt m i i l) | ||
| 446 | (setq i (1+ i))) | ||
| 447 | m)) | ||
| 448 | |||
| 449 | (defun math-nlfit-chi-sq (xlist ylist parms fn &optional slist) | ||
| 450 | (let ((cs 0)) | ||
| 451 | (while xlist | ||
| 452 | (let ((c | ||
| 453 | (math-sub | ||
| 454 | (apply fn (car xlist) parms) | ||
| 455 | (car ylist)))) | ||
| 456 | (if slist | ||
| 457 | (setq c (math-div c (car slist)))) | ||
| 458 | (setq cs | ||
| 459 | (math-add cs | ||
| 460 | (math-mul c c)))) | ||
| 461 | (setq xlist (cdr xlist)) | ||
| 462 | (setq ylist (cdr ylist)) | ||
| 463 | (setq slist (cdr slist))) | ||
| 464 | cs)) | ||
| 465 | |||
| 466 | (defun math-nlfit-init-lambda (C) | ||
| 467 | (let ((l 0) | ||
| 468 | (n (length (car C))) | ||
| 469 | (N (length C))) | ||
| 470 | (while C | ||
| 471 | (let ((row (car C))) | ||
| 472 | (while row | ||
| 473 | (setq l (math-add l (math-mul (car row) (car row)))) | ||
| 474 | (setq row (cdr row)))) | ||
| 475 | (setq C (cdr C))) | ||
| 476 | (calcFunc-sqrt (math-div l (math-mul n N))))) | ||
| 477 | |||
| 478 | (defun math-nlfit-make-Ctilda (C l) | ||
| 479 | (let* ((n (length (car C))) | ||
| 480 | (bot (math-nlfit-make-ident l n))) | ||
| 481 | (append C bot))) | ||
| 482 | |||
| 483 | (defun math-nlfit-make-d (fn xdata ydata parms &optional sdata) | ||
| 484 | (let ((d nil)) | ||
| 485 | (while xdata | ||
| 486 | (setq d (cons | ||
| 487 | (let ((dd (math-sub (apply fn (car xdata) parms) | ||
| 488 | (car ydata)))) | ||
| 489 | (if sdata (math-div dd (car sdata)) dd)) | ||
| 490 | d)) | ||
| 491 | (setq xdata (cdr xdata)) | ||
| 492 | (setq ydata (cdr ydata)) | ||
| 493 | (setq sdata (cdr sdata))) | ||
| 494 | (reverse d))) | ||
| 495 | |||
| 496 | (defun math-nlfit-make-dtilda (d n) | ||
| 497 | (append d (make-list n 0))) | ||
| 498 | |||
| 499 | (defun math-nlfit-fit (xlist ylist parms fn grad &optional slist) | ||
| 500 | (let* | ||
| 501 | ((C (math-nlfit-jacobian grad xlist parms slist)) | ||
| 502 | (d (math-nlfit-make-d fn xlist ylist parms slist)) | ||
| 503 | (chisq (math-nlfit-chi-sq xlist ylist parms fn slist)) | ||
| 504 | (lambda (math-nlfit-init-lambda C)) | ||
| 505 | (really-done nil) | ||
| 506 | (iters 0)) | ||
| 507 | (while (and | ||
| 508 | (not really-done) | ||
| 509 | (< iters math-nlfit-max-its)) | ||
| 510 | (setq iters (1+ iters)) | ||
| 511 | (let ((done nil)) | ||
| 512 | (while (not done) | ||
| 513 | (let* ((Ctilda (math-nlfit-make-Ctilda C lambda)) | ||
| 514 | (dtilda (math-nlfit-make-dtilda d (length (car C)))) | ||
| 515 | (zeta (math-nlfit-givens Ctilda dtilda)) | ||
| 516 | (newparms (mapcar* 'math-add (copy-tree parms) zeta)) | ||
| 517 | (newchisq (math-nlfit-chi-sq xlist ylist newparms fn slist))) | ||
| 518 | (if (math-lessp newchisq chisq) | ||
| 519 | (progn | ||
| 520 | (if (math-lessp | ||
| 521 | (math-div | ||
| 522 | (math-sub chisq newchisq) newchisq) math-nlfit-epsilon) | ||
| 523 | (setq really-done t)) | ||
| 524 | (setq lambda (math-div lambda 10)) | ||
| 525 | (setq chisq newchisq) | ||
| 526 | (setq parms newparms) | ||
| 527 | (setq done t)) | ||
| 528 | (setq lambda (math-mul lambda 10))))) | ||
| 529 | (setq C (math-nlfit-jacobian grad xlist parms slist)) | ||
| 530 | (setq d (math-nlfit-make-d fn xlist ylist parms slist)))) | ||
| 531 | (list chisq parms))) | ||
| 532 | |||
| 533 | ;;; The functions that describe our models, and their gradients. | ||
| 534 | |||
| 535 | (defun math-nlfit-s-logistic-fn (x a b c) | ||
| 536 | (math-div a (math-add 1 (math-mul b (calcFunc-exp (math-mul c x)))))) | ||
| 537 | |||
| 538 | (defun math-nlfit-s-logistic-grad (x a b c) | ||
| 539 | (let* ((ep (calcFunc-exp (math-mul c x))) | ||
| 540 | (d (math-add 1 (math-mul b ep))) | ||
| 541 | (d2 (math-mul d d))) | ||
| 542 | (list | ||
| 543 | (math-div 1 d) | ||
| 544 | (math-neg (math-div (math-mul a ep) d2)) | ||
| 545 | (math-neg (math-div (math-mul a (math-mul b (math-mul x ep))) d2))))) | ||
| 546 | |||
| 547 | (defun math-nlfit-b-logistic-fn (x a c d) | ||
| 548 | (let ((ex (calcFunc-exp (math-mul c (math-sub x d))))) | ||
| 549 | (math-div | ||
| 550 | (math-mul a ex) | ||
| 551 | (math-sqr | ||
| 552 | (math-add | ||
| 553 | 1 ex))))) | ||
| 554 | |||
| 555 | (defun math-nlfit-b-logistic-grad (x a c d) | ||
| 556 | (let* ((ex (calcFunc-exp (math-mul c (math-sub x d)))) | ||
| 557 | (ex1 (math-add 1 ex)) | ||
| 558 | (xd (math-sub x d))) | ||
| 559 | (list | ||
| 560 | (math-div | ||
| 561 | ex | ||
| 562 | (math-sqr ex1)) | ||
| 563 | (math-sub | ||
| 564 | (math-div | ||
| 565 | (math-mul a (math-mul xd ex)) | ||
| 566 | (math-sqr ex1)) | ||
| 567 | (math-div | ||
| 568 | (math-mul 2 (math-mul a (math-mul xd (math-sqr ex)))) | ||
| 569 | (math-pow ex1 3))) | ||
| 570 | (math-sub | ||
| 571 | (math-div | ||
| 572 | (math-mul 2 (math-mul a (math-mul c (math-sqr ex)))) | ||
| 573 | (math-pow ex1 3)) | ||
| 574 | (math-div | ||
| 575 | (math-mul a (math-mul c ex)) | ||
| 576 | (math-sqr ex1)))))) | ||
| 577 | |||
| 578 | ;;; Functions to get the final covariance matrix and the sdevs | ||
| 579 | |||
| 580 | (defun math-nlfit-find-covar (grad xlist pparms) | ||
| 581 | (let ((j nil)) | ||
| 582 | (while xlist | ||
| 583 | (setq j (cons (cons 'vec (apply grad (car xlist) pparms)) j)) | ||
| 584 | (setq xlist (cdr xlist))) | ||
| 585 | (setq j (cons 'vec (reverse j))) | ||
| 586 | (setq j | ||
| 587 | (math-mul | ||
| 588 | (calcFunc-trn j) j)) | ||
| 589 | (calcFunc-inv j))) | ||
| 590 | |||
| 591 | (defun math-nlfit-get-sigmas (grad xlist pparms chisq) | ||
| 592 | (let* ((sgs nil) | ||
| 593 | (covar (math-nlfit-find-covar grad xlist pparms)) | ||
| 594 | (n (1- (length covar))) | ||
| 595 | (N (length xlist)) | ||
| 596 | (i 1)) | ||
| 597 | (when (> N n) | ||
| 598 | (while (<= i n) | ||
| 599 | (setq sgs (cons (calcFunc-sqrt (nth i (nth i covar))) sgs)) | ||
| 600 | (setq i (1+ i))) | ||
| 601 | (setq sgs (reverse sgs))) | ||
| 602 | (list sgs covar))) | ||
| 603 | |||
| 604 | ;;; Now the Calc functions | ||
| 605 | |||
| 606 | (defun math-nlfit-s-logistic-params (xdata ydata) | ||
| 607 | (let ((pdata (math-nlfit-get-rates-from-cumul xdata ydata))) | ||
| 608 | (math-nlfit-find-logistic-parameters ydata pdata xdata))) | ||
| 609 | |||
| 610 | (defun math-nlfit-b-logistic-params (xdata ydata) | ||
| 611 | (let* ((q0 (math-nlfit-find-q0 ydata xdata)) | ||
| 612 | (qdata (math-nlfit-get-cumul-from-rates xdata ydata q0)) | ||
| 613 | (abc (math-nlfit-find-logistic-parameters qdata ydata xdata)) | ||
| 614 | (B (nth 1 abc)) | ||
| 615 | (C (nth 2 abc)) | ||
| 616 | (A (math-neg | ||
| 617 | (math-mul | ||
| 618 | (nth 0 abc) | ||
| 619 | (math-mul B C)))) | ||
| 620 | (D (math-neg (math-div (calcFunc-ln B) C))) | ||
| 621 | (A (math-div A B))) | ||
| 622 | (list A C D))) | ||
| 623 | |||
| 624 | ;;; Some functions to turn the parameter lists and variables | ||
| 625 | ;;; into the appropriate functions. | ||
| 626 | |||
| 627 | (defun math-nlfit-s-logistic-solnexpr (pms var) | ||
| 628 | (let ((a (nth 0 pms)) | ||
| 629 | (b (nth 1 pms)) | ||
| 630 | (c (nth 2 pms))) | ||
| 631 | (list '/ a | ||
| 632 | (list '+ | ||
| 633 | 1 | ||
| 634 | (list '* | ||
| 635 | b | ||
| 636 | (calcFunc-exp | ||
| 637 | (list '* | ||
| 638 | c | ||
| 639 | var))))))) | ||
| 640 | |||
| 641 | (defun math-nlfit-b-logistic-solnexpr (pms var) | ||
| 642 | (let ((a (nth 0 pms)) | ||
| 643 | (c (nth 1 pms)) | ||
| 644 | (d (nth 2 pms))) | ||
| 645 | (list '/ | ||
| 646 | (list '* | ||
| 647 | a | ||
| 648 | (calcFunc-exp | ||
| 649 | (list '* | ||
| 650 | c | ||
| 651 | (list '- var d)))) | ||
| 652 | (list '^ | ||
| 653 | (list '+ | ||
| 654 | 1 | ||
| 655 | (calcFunc-exp | ||
| 656 | (list '* | ||
| 657 | c | ||
| 658 | (list '- var d)))) | ||
| 659 | 2)))) | ||
| 660 | |||
| 661 | (defun math-nlfit-enter-result (n prefix vals) | ||
| 662 | (setq calc-aborted-prefix prefix) | ||
| 663 | (calc-pop-push-record-list n prefix vals) | ||
| 664 | (calc-handle-whys)) | ||
| 665 | |||
| 666 | (defun math-nlfit-fit-curve (fn grad solnexpr initparms &optional sdv) | ||
| 667 | (calc-slow-wrapper | ||
| 668 | (let* ((sdevv (or (eq sdv 'calcFunc-efit) (eq sdv 'calcFunc-xfit))) | ||
| 669 | (calc-display-working-message nil) | ||
| 670 | (data (calc-top 1)) | ||
| 671 | (xdata (cdr (car (cdr data)))) | ||
| 672 | (ydata (cdr (car (cdr (cdr data))))) | ||
| 673 | (sdata (if (math-contains-sdev-p ydata) | ||
| 674 | (mapcar (lambda (x) (math-get-sdev x t)) ydata) | ||
| 675 | nil)) | ||
| 676 | (ydata (mapcar (lambda (x) (math-get-value x)) ydata)) | ||
| 677 | (calc-curve-varnames nil) | ||
| 678 | (calc-curve-coefnames nil) | ||
| 679 | (calc-curve-nvars 1) | ||
| 680 | (fitvars (calc-get-fit-variables 1 3)) | ||
| 681 | (var (nth 1 calc-curve-varnames)) | ||
| 682 | (parms (cdr calc-curve-coefnames)) | ||
| 683 | (parmguess | ||
| 684 | (funcall initparms xdata ydata)) | ||
| 685 | (fit (math-nlfit-fit xdata ydata parmguess fn grad sdata)) | ||
| 686 | (finalparms (nth 1 fit)) | ||
| 687 | (sigmacovar | ||
| 688 | (if sdevv | ||
| 689 | (math-nlfit-get-sigmas grad xdata finalparms (nth 0 fit)))) | ||
| 690 | (sigmas | ||
| 691 | (if sdevv | ||
| 692 | (nth 0 sigmacovar))) | ||
| 693 | (finalparms | ||
| 694 | (if sigmas | ||
| 695 | (mapcar* (lambda (x y) (list 'sdev x y)) finalparms sigmas) | ||
| 696 | finalparms)) | ||
| 697 | (soln (funcall solnexpr finalparms var))) | ||
| 698 | (let ((calc-fit-to-trail t) | ||
| 699 | (traillist nil)) | ||
| 700 | (while parms | ||
| 701 | (setq traillist (cons (list 'calcFunc-eq (car parms) (car finalparms)) | ||
| 702 | traillist)) | ||
| 703 | (setq finalparms (cdr finalparms)) | ||
| 704 | (setq parms (cdr parms))) | ||
| 705 | (setq traillist (calc-normalize (cons 'vec (nreverse traillist)))) | ||
| 706 | (cond ((eq sdv 'calcFunc-efit) | ||
| 707 | (math-nlfit-enter-result 1 "efit" soln)) | ||
| 708 | ((eq sdv 'calcFunc-xfit) | ||
| 709 | (let (sln) | ||
| 710 | (setq sln | ||
| 711 | (list 'vec | ||
| 712 | soln | ||
| 713 | traillist | ||
| 714 | (nth 1 sigmacovar) | ||
| 715 | '(vec) | ||
| 716 | (nth 0 fit) | ||
| 717 | (let ((n (length xdata)) | ||
| 718 | (m (length finalparms))) | ||
| 719 | (if (and sdata (> n m)) | ||
| 720 | (calcFunc-utpc (nth 0 fit) | ||
| 721 | (- n m)) | ||
| 722 | '(var nan var-nan))))) | ||
| 723 | (math-nlfit-enter-result 1 "xfit" sln))) | ||
| 724 | (t | ||
| 725 | (math-nlfit-enter-result 1 "fit" soln))) | ||
| 726 | (calc-record traillist "parm"))))) | ||
| 727 | |||
| 728 | (defun calc-fit-s-shaped-logistic-curve (arg) | ||
| 729 | (interactive "P") | ||
| 730 | (math-nlfit-fit-curve 'math-nlfit-s-logistic-fn | ||
| 731 | 'math-nlfit-s-logistic-grad | ||
| 732 | 'math-nlfit-s-logistic-solnexpr | ||
| 733 | 'math-nlfit-s-logistic-params | ||
| 734 | arg)) | ||
| 735 | |||
| 736 | (defun calc-fit-bell-shaped-logistic-curve (arg) | ||
| 737 | (interactive "P") | ||
| 738 | (math-nlfit-fit-curve 'math-nlfit-b-logistic-fn | ||
| 739 | 'math-nlfit-b-logistic-grad | ||
| 740 | 'math-nlfit-b-logistic-solnexpr | ||
| 741 | 'math-nlfit-b-logistic-params | ||
| 742 | arg)) | ||
| 743 | |||
| 744 | (defun calc-fit-hubbert-linear-curve (&optional sdv) | ||
| 745 | (calc-slow-wrapper | ||
| 746 | (let* ((sdevv (or (eq sdv 'calcFunc-efit) (eq sdv 'calcFunc-xfit))) | ||
| 747 | (calc-display-working-message nil) | ||
| 748 | (data (calc-top 1)) | ||
| 749 | (qdata (cdr (car (cdr data)))) | ||
| 750 | (pdata (cdr (car (cdr (cdr data))))) | ||
| 751 | (sdata (if (math-contains-sdev-p pdata) | ||
| 752 | (mapcar (lambda (x) (math-get-sdev x t)) pdata) | ||
| 753 | nil)) | ||
| 754 | (pdata (mapcar (lambda (x) (math-get-value x)) pdata)) | ||
| 755 | (poverqdata (mapcar* 'math-div pdata qdata)) | ||
| 756 | (parmvals (math-nlfit-least-squares qdata poverqdata sdata sdevv)) | ||
| 757 | (finalparms (list (nth 0 parmvals) | ||
| 758 | (math-neg | ||
| 759 | (math-div (nth 0 parmvals) | ||
| 760 | (nth 1 parmvals))))) | ||
| 761 | (calc-curve-varnames nil) | ||
| 762 | (calc-curve-coefnames nil) | ||
| 763 | (calc-curve-nvars 1) | ||
| 764 | (fitvars (calc-get-fit-variables 1 2)) | ||
| 765 | (var (nth 1 calc-curve-varnames)) | ||
| 766 | (parms (cdr calc-curve-coefnames)) | ||
| 767 | (soln (list '* (nth 0 finalparms) | ||
| 768 | (list '- 1 | ||
| 769 | (list '/ var (nth 1 finalparms)))))) | ||
| 770 | (let ((calc-fit-to-trail t) | ||
| 771 | (traillist nil)) | ||
| 772 | (setq traillist | ||
| 773 | (list 'vec | ||
| 774 | (list 'calcFunc-eq (nth 0 parms) (nth 0 finalparms)) | ||
| 775 | (list 'calcFunc-eq (nth 1 parms) (nth 1 finalparms)))) | ||
| 776 | (cond ((eq sdv 'calcFunc-efit) | ||
| 777 | (math-nlfit-enter-result 1 "efit" soln)) | ||
| 778 | ((eq sdv 'calcFunc-xfit) | ||
| 779 | (let (sln | ||
| 780 | (chisq | ||
| 781 | (math-nlfit-chi-sq | ||
| 782 | qdata poverqdata | ||
| 783 | (list (nth 1 (nth 0 finalparms)) | ||
| 784 | (nth 1 (nth 1 finalparms))) | ||
| 785 | (lambda (x a b) | ||
| 786 | (math-mul a | ||
| 787 | (math-sub | ||
| 788 | 1 | ||
| 789 | (math-div x b)))) | ||
| 790 | sdata))) | ||
| 791 | (setq sln | ||
| 792 | (list 'vec | ||
| 793 | soln | ||
| 794 | traillist | ||
| 795 | (nth 2 parmvals) | ||
| 796 | (list | ||
| 797 | 'vec | ||
| 798 | '(calcFunc-fitdummy 1) | ||
| 799 | (list 'calcFunc-neg | ||
| 800 | (list '/ | ||
| 801 | '(calcFunc-fitdummy 1) | ||
| 802 | '(calcFunc-fitdummy 2)))) | ||
| 803 | chisq | ||
| 804 | (let ((n (length qdata))) | ||
| 805 | (if (and sdata (> n 2)) | ||
| 806 | (calcFunc-utpc | ||
| 807 | chisq | ||
| 808 | (- n 2)) | ||
| 809 | '(var nan var-nan))))) | ||
| 810 | (math-nlfit-enter-result 1 "xfit" sln))) | ||
| 811 | (t | ||
| 812 | (math-nlfit-enter-result 1 "fit" soln))) | ||
| 813 | (calc-record traillist "parm"))))) | ||
| 814 | |||
| 815 | (provide 'calc-nlfit) | ||
| 816 | |||
| 817 | ;; arch-tag: 6eba3cd6-f48b-4a84-8174-10c15a024928 | ||
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 82769a66b13..e823a57aef0 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | (defvar math-standard-units | 49 | (defvar math-standard-units |
| 50 | '( ;; Length | 50 | '( ;; Length |
| 51 | ( m nil "*Meter" ) | 51 | ( m nil "*Meter" ) |
| 52 | ( in "2.54 cm" "Inch" ) | 52 | ( in "2.54 cm" "Inch" ) |
| 53 | ( ft "12 in" "Foot" ) | 53 | ( ft "12 in" "Foot" ) |
| 54 | ( yd "3 ft" "Yard" ) | 54 | ( yd "3 ft" "Yard" ) |
| 55 | ( mi "5280 ft" "Mile" ) | 55 | ( mi "5280 ft" "Mile" ) |
| @@ -971,17 +971,17 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).") | |||
| 971 | (symbol-name v))))))) | 971 | (symbol-name v))))))) |
| 972 | (or (eq (nth 3 uold) (nth 3 unew)) | 972 | (or (eq (nth 3 uold) (nth 3 unew)) |
| 973 | (cond ((eq (nth 3 uold) 'K) | 973 | (cond ((eq (nth 3 uold) 'K) |
| 974 | (setq expr (list '- expr '(float 27315 -2))) | 974 | (setq expr (list '- expr '(/ 27315 100))) |
| 975 | (if (eq (nth 3 unew) 'F) | 975 | (if (eq (nth 3 unew) 'F) |
| 976 | (setq expr (list '+ (list '* expr '(frac 9 5)) 32)))) | 976 | (setq expr (list '+ (list '* expr '(/ 9 5)) 32)))) |
| 977 | ((eq (nth 3 uold) 'C) | 977 | ((eq (nth 3 uold) 'C) |
| 978 | (if (eq (nth 3 unew) 'F) | 978 | (if (eq (nth 3 unew) 'F) |
| 979 | (setq expr (list '+ (list '* expr '(frac 9 5)) 32)) | 979 | (setq expr (list '+ (list '* expr '(/ 9 5)) 32)) |
| 980 | (setq expr (list '+ expr '(float 27315 -2))))) | 980 | (setq expr (list '+ expr '(/ 27315 100))))) |
| 981 | (t | 981 | (t |
| 982 | (setq expr (list '* (list '- expr 32) '(frac 5 9))) | 982 | (setq expr (list '* (list '- expr 32) '(/ 5 9))) |
| 983 | (if (eq (nth 3 unew) 'K) | 983 | (if (eq (nth 3 unew) 'K) |
| 984 | (setq expr (list '+ expr '(float 27315 -2))))))) | 984 | (setq expr (list '+ expr '(/ 27315 100))))))) |
| 985 | (if pure | 985 | (if pure |
| 986 | expr | 986 | expr |
| 987 | (list '* expr new)))) | 987 | (list '* expr new)))) |
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index 9f263a2281a..5aa410be19e 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el | |||
| @@ -115,6 +115,8 @@ | |||
| 115 | (if (calc-is-hyperbolic) 'calcFunc-efit | 115 | (if (calc-is-hyperbolic) 'calcFunc-efit |
| 116 | 'calcFunc-fit))) | 116 | 'calcFunc-fit))) |
| 117 | key (which 0) | 117 | key (which 0) |
| 118 | (nonlinear nil) | ||
| 119 | (plot nil) | ||
| 118 | n calc-curve-nvars temp data | 120 | n calc-curve-nvars temp data |
| 119 | (homog nil) | 121 | (homog nil) |
| 120 | (msgs '( "(Press ? for help)" | 122 | (msgs '( "(Press ? for help)" |
| @@ -125,12 +127,18 @@ | |||
| 125 | "E = a 10^(b x), X = 10^(a + b x), L = a + b log10(x)" | 127 | "E = a 10^(b x), X = 10^(a + b x), L = a + b log10(x)" |
| 126 | "q = a + b (x-c)^2" | 128 | "q = a + b (x-c)^2" |
| 127 | "g = (a/b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)" | 129 | "g = (a/b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)" |
| 130 | "s = a/(1 + exp(b (x - c)))" | ||
| 131 | "b = a exp(b (x - c))/(1 + exp(b (x - c)))^2" | ||
| 132 | "o = (y/x) = a (1 - x/b)" | ||
| 128 | "h prefix = homogeneous model (no constant term)" | 133 | "h prefix = homogeneous model (no constant term)" |
| 134 | "P prefix = plot result" | ||
| 129 | "' = alg entry, $ = stack, u = Model1, U = Model2"))) | 135 | "' = alg entry, $ = stack, u = Model1, U = Model2"))) |
| 130 | (while (not calc-curve-model) | 136 | (while (not calc-curve-model) |
| 131 | (message "Fit to model: %s:%s" | 137 | (message |
| 132 | (nth which msgs) | 138 | "Fit to model: %s:%s%s" |
| 133 | (if homog " h" "")) | 139 | (nth which msgs) |
| 140 | (if plot "P" " ") | ||
| 141 | (if homog "h" "")) | ||
| 134 | (setq key (read-char)) | 142 | (setq key (read-char)) |
| 135 | (cond ((= key ?\C-g) | 143 | (cond ((= key ?\C-g) |
| 136 | (keyboard-quit)) | 144 | (keyboard-quit)) |
| @@ -138,6 +146,16 @@ | |||
| 138 | (setq which (% (1+ which) (length msgs)))) | 146 | (setq which (% (1+ which) (length msgs)))) |
| 139 | ((memq key '(?h ?H)) | 147 | ((memq key '(?h ?H)) |
| 140 | (setq homog (not homog))) | 148 | (setq homog (not homog))) |
| 149 | ((= key ?P) | ||
| 150 | (if plot | ||
| 151 | (setq plot nil) | ||
| 152 | (let ((data (calc-top 1))) | ||
| 153 | (if (or | ||
| 154 | (calc-is-hyperbolic) | ||
| 155 | (calc-is-inverse) | ||
| 156 | (not (= (length data) 3))) | ||
| 157 | (setq plot "Can't plot") | ||
| 158 | (setq plot data))))) | ||
| 141 | ((progn | 159 | ((progn |
| 142 | (if (eq key ?\$) | 160 | (if (eq key ?\$) |
| 143 | (setq n 1) | 161 | (setq n 1) |
| @@ -164,8 +182,9 @@ | |||
| 164 | ((= key ?1) ; linear or multilinear | 182 | ((= key ?1) ; linear or multilinear |
| 165 | (calc-get-fit-variables calc-curve-nvars | 183 | (calc-get-fit-variables calc-curve-nvars |
| 166 | (1+ calc-curve-nvars) (and homog 0)) | 184 | (1+ calc-curve-nvars) (and homog 0)) |
| 167 | (setq calc-curve-model (math-mul calc-curve-coefnames | 185 | (setq calc-curve-model |
| 168 | (cons 'vec (cons 1 (cdr calc-curve-varnames)))))) | 186 | (math-mul calc-curve-coefnames |
| 187 | (cons 'vec (cons 1 (cdr calc-curve-varnames)))))) | ||
| 169 | ((and (>= key ?2) (<= key ?9)) ; polynomial | 188 | ((and (>= key ?2) (<= key ?9)) ; polynomial |
| 170 | (calc-get-fit-variables 1 (- key ?0 -1) (and homog 0)) | 189 | (calc-get-fit-variables 1 (- key ?0 -1) (and homog 0)) |
| 171 | (setq calc-curve-model | 190 | (setq calc-curve-model |
| @@ -180,58 +199,88 @@ | |||
| 180 | ((= key ?p) ; power law | 199 | ((= key ?p) ; power law |
| 181 | (calc-get-fit-variables calc-curve-nvars | 200 | (calc-get-fit-variables calc-curve-nvars |
| 182 | (1+ calc-curve-nvars) (and homog 1)) | 201 | (1+ calc-curve-nvars) (and homog 1)) |
| 183 | (setq calc-curve-model (math-mul (nth 1 calc-curve-coefnames) | 202 | (setq calc-curve-model |
| 184 | (calcFunc-reduce | 203 | (math-mul |
| 185 | '(var mul var-mul) | 204 | (nth 1 calc-curve-coefnames) |
| 186 | (calcFunc-map | 205 | (calcFunc-reduce |
| 187 | '(var pow var-pow) | 206 | '(var mul var-mul) |
| 188 | calc-curve-varnames | 207 | (calcFunc-map |
| 189 | (cons 'vec (cdr (cdr calc-curve-coefnames)))))))) | 208 | '(var pow var-pow) |
| 209 | calc-curve-varnames | ||
| 210 | (cons 'vec (cdr (cdr calc-curve-coefnames)))))))) | ||
| 190 | ((= key ?^) ; exponential law | 211 | ((= key ?^) ; exponential law |
| 191 | (calc-get-fit-variables calc-curve-nvars | 212 | (calc-get-fit-variables calc-curve-nvars |
| 192 | (1+ calc-curve-nvars) (and homog 1)) | 213 | (1+ calc-curve-nvars) (and homog 1)) |
| 193 | (setq calc-curve-model (math-mul (nth 1 calc-curve-coefnames) | 214 | (setq calc-curve-model |
| 194 | (calcFunc-reduce | 215 | (math-mul (nth 1 calc-curve-coefnames) |
| 195 | '(var mul var-mul) | 216 | (calcFunc-reduce |
| 196 | (calcFunc-map | 217 | '(var mul var-mul) |
| 197 | '(var pow var-pow) | 218 | (calcFunc-map |
| 198 | (cons 'vec (cdr (cdr calc-curve-coefnames))) | 219 | '(var pow var-pow) |
| 199 | calc-curve-varnames))))) | 220 | (cons 'vec (cdr (cdr calc-curve-coefnames))) |
| 221 | calc-curve-varnames))))) | ||
| 222 | ((= key ?s) | ||
| 223 | (setq nonlinear t) | ||
| 224 | (setq calc-curve-model t) | ||
| 225 | (require 'calc-nlfit) | ||
| 226 | (calc-fit-s-shaped-logistic-curve func)) | ||
| 227 | ((= key ?b) | ||
| 228 | (setq nonlinear t) | ||
| 229 | (setq calc-curve-model t) | ||
| 230 | (require 'calc-nlfit) | ||
| 231 | (calc-fit-bell-shaped-logistic-curve func)) | ||
| 232 | ((= key ?o) | ||
| 233 | (setq nonlinear t) | ||
| 234 | (setq calc-curve-model t) | ||
| 235 | (require 'calc-nlfit) | ||
| 236 | (if (and plot (not (stringp plot))) | ||
| 237 | (setq plot | ||
| 238 | (list 'vec | ||
| 239 | (nth 1 plot) | ||
| 240 | (cons | ||
| 241 | 'vec | ||
| 242 | (mapcar* 'calcFunc-div | ||
| 243 | (cdr (nth 2 plot)) | ||
| 244 | (cdr (nth 1 plot))))))) | ||
| 245 | (calc-fit-hubbert-linear-curve func)) | ||
| 200 | ((memq key '(?e ?E)) | 246 | ((memq key '(?e ?E)) |
| 201 | (calc-get-fit-variables calc-curve-nvars | 247 | (calc-get-fit-variables calc-curve-nvars |
| 202 | (1+ calc-curve-nvars) (and homog 1)) | 248 | (1+ calc-curve-nvars) (and homog 1)) |
| 203 | (setq calc-curve-model (math-mul (nth 1 calc-curve-coefnames) | 249 | (setq calc-curve-model |
| 204 | (calcFunc-reduce | 250 | (math-mul (nth 1 calc-curve-coefnames) |
| 205 | '(var mul var-mul) | 251 | (calcFunc-reduce |
| 206 | (calcFunc-map | 252 | '(var mul var-mul) |
| 207 | (if (eq key ?e) | 253 | (calcFunc-map |
| 208 | '(var exp var-exp) | 254 | (if (eq key ?e) |
| 209 | '(calcFunc-lambda | 255 | '(var exp var-exp) |
| 210 | (var a var-a) | 256 | '(calcFunc-lambda |
| 211 | (^ 10 (var a var-a)))) | 257 | (var a var-a) |
| 212 | (calcFunc-map | 258 | (^ 10 (var a var-a)))) |
| 213 | '(var mul var-mul) | 259 | (calcFunc-map |
| 214 | (cons 'vec (cdr (cdr calc-curve-coefnames))) | 260 | '(var mul var-mul) |
| 215 | calc-curve-varnames)))))) | 261 | (cons 'vec (cdr (cdr calc-curve-coefnames))) |
| 262 | calc-curve-varnames)))))) | ||
| 216 | ((memq key '(?x ?X)) | 263 | ((memq key '(?x ?X)) |
| 217 | (calc-get-fit-variables calc-curve-nvars | 264 | (calc-get-fit-variables calc-curve-nvars |
| 218 | (1+ calc-curve-nvars) (and homog 0)) | 265 | (1+ calc-curve-nvars) (and homog 0)) |
| 219 | (setq calc-curve-model (math-mul calc-curve-coefnames | 266 | (setq calc-curve-model |
| 220 | (cons 'vec (cons 1 (cdr calc-curve-varnames))))) | 267 | (math-mul calc-curve-coefnames |
| 268 | (cons 'vec (cons 1 (cdr calc-curve-varnames))))) | ||
| 221 | (setq calc-curve-model (if (eq key ?x) | 269 | (setq calc-curve-model (if (eq key ?x) |
| 222 | (list 'calcFunc-exp calc-curve-model) | 270 | (list 'calcFunc-exp calc-curve-model) |
| 223 | (list '^ 10 calc-curve-model)))) | 271 | (list '^ 10 calc-curve-model)))) |
| 224 | ((memq key '(?l ?L)) | 272 | ((memq key '(?l ?L)) |
| 225 | (calc-get-fit-variables calc-curve-nvars | 273 | (calc-get-fit-variables calc-curve-nvars |
| 226 | (1+ calc-curve-nvars) (and homog 0)) | 274 | (1+ calc-curve-nvars) (and homog 0)) |
| 227 | (setq calc-curve-model (math-mul calc-curve-coefnames | 275 | (setq calc-curve-model |
| 228 | (cons 'vec | 276 | (math-mul calc-curve-coefnames |
| 229 | (cons 1 (cdr (calcFunc-map | 277 | (cons 'vec |
| 230 | (if (eq key ?l) | 278 | (cons 1 (cdr (calcFunc-map |
| 231 | '(var ln var-ln) | 279 | (if (eq key ?l) |
| 232 | '(var log10 | 280 | '(var ln var-ln) |
| 233 | var-log10)) | 281 | '(var log10 |
| 234 | calc-curve-varnames))))))) | 282 | var-log10)) |
| 283 | calc-curve-varnames))))))) | ||
| 235 | ((= key ?q) | 284 | ((= key ?q) |
| 236 | (calc-get-fit-variables calc-curve-nvars | 285 | (calc-get-fit-variables calc-curve-nvars |
| 237 | (1+ (* 2 calc-curve-nvars)) (and homog 0)) | 286 | (1+ (* 2 calc-curve-nvars)) (and homog 0)) |
| @@ -247,12 +296,14 @@ | |||
| 247 | (list '- (car v) (nth 1 c)) | 296 | (list '- (car v) (nth 1 c)) |
| 248 | 2))))))) | 297 | 2))))))) |
| 249 | ((= key ?g) | 298 | ((= key ?g) |
| 250 | (setq calc-curve-model | 299 | (setq |
| 251 | (math-read-expr "(AFit / BFit sqrt(2 pi)) exp(-0.5 * ((XFit - CFit) / BFit)^2)") | 300 | calc-curve-model |
| 252 | calc-curve-varnames '(vec (var XFit var-XFit)) | 301 | (math-read-expr |
| 253 | calc-curve-coefnames '(vec (var AFit var-AFit) | 302 | "(AFit / BFit sqrt(2 pi)) exp(-0.5 * ((XFit - CFit) / BFit)^2)") |
| 254 | (var BFit var-BFit) | 303 | calc-curve-varnames '(vec (var XFit var-XFit)) |
| 255 | (var CFit var-CFit))) | 304 | calc-curve-coefnames '(vec (var AFit var-AFit) |
| 305 | (var BFit var-BFit) | ||
| 306 | (var CFit var-CFit))) | ||
| 256 | (calc-get-fit-variables 1 (1- (length calc-curve-coefnames)) | 307 | (calc-get-fit-variables 1 (1- (length calc-curve-coefnames)) |
| 257 | (and homog 1))) | 308 | (and homog 1))) |
| 258 | ((memq key '(?\$ ?\' ?u ?U)) | 309 | ((memq key '(?\$ ?\' ?u ?U)) |
| @@ -262,8 +313,9 @@ | |||
| 262 | (let* ((calc-dollar-values calc-arg-values) | 313 | (let* ((calc-dollar-values calc-arg-values) |
| 263 | (calc-dollar-used 0) | 314 | (calc-dollar-used 0) |
| 264 | (calc-hashes-used 0)) | 315 | (calc-hashes-used 0)) |
| 265 | (setq calc-curve-model (calc-do-alg-entry "" "Model formula: " | 316 | (setq calc-curve-model |
| 266 | nil 'calc-curve-fit-history)) | 317 | (calc-do-alg-entry "" "Model formula: " |
| 318 | nil 'calc-curve-fit-history)) | ||
| 267 | (if (/= (length calc-curve-model) 1) | 319 | (if (/= (length calc-curve-model) 1) |
| 268 | (error "Bad format")) | 320 | (error "Bad format")) |
| 269 | (setq calc-curve-model (car calc-curve-model) | 321 | (setq calc-curve-model (car calc-curve-model) |
| @@ -296,11 +348,13 @@ | |||
| 296 | (or (nth 3 calc-curve-model) | 348 | (or (nth 3 calc-curve-model) |
| 297 | (cons 'vec | 349 | (cons 'vec |
| 298 | (math-all-vars-but | 350 | (math-all-vars-but |
| 299 | calc-curve-model calc-curve-varnames))) | 351 | calc-curve-model |
| 352 | calc-curve-varnames))) | ||
| 300 | calc-curve-model (nth 1 calc-curve-model)) | 353 | calc-curve-model (nth 1 calc-curve-model)) |
| 301 | (error "Incorrect model specifier"))))) | 354 | (error "Incorrect model specifier"))))) |
| 302 | (or calc-curve-varnames | 355 | (or calc-curve-varnames |
| 303 | (let ((with-y (eq (car-safe calc-curve-model) 'calcFunc-eq))) | 356 | (let ((with-y |
| 357 | (eq (car-safe calc-curve-model) 'calcFunc-eq))) | ||
| 304 | (if calc-curve-coefnames | 358 | (if calc-curve-coefnames |
| 305 | (calc-get-fit-variables | 359 | (calc-get-fit-variables |
| 306 | (if with-y (1+ calc-curve-nvars) calc-curve-nvars) | 360 | (if with-y (1+ calc-curve-nvars) calc-curve-nvars) |
| @@ -310,7 +364,10 @@ | |||
| 310 | nil with-y) | 364 | nil with-y) |
| 311 | (let* ((coefs (math-all-vars-but calc-curve-model nil)) | 365 | (let* ((coefs (math-all-vars-but calc-curve-model nil)) |
| 312 | (vars nil) | 366 | (vars nil) |
| 313 | (n (- (length coefs) calc-curve-nvars (if with-y 2 1))) | 367 | (n (- |
| 368 | (length coefs) | ||
| 369 | calc-curve-nvars | ||
| 370 | (if with-y 2 1))) | ||
| 314 | p) | 371 | p) |
| 315 | (if (< n 0) | 372 | (if (< n 0) |
| 316 | (error "Not enough variables in model")) | 373 | (error "Not enough variables in model")) |
| @@ -326,18 +383,43 @@ | |||
| 326 | calc-curve-varnames calc-curve-coefnames) | 383 | calc-curve-varnames calc-curve-coefnames) |
| 327 | "modl")))) | 384 | "modl")))) |
| 328 | (t (beep)))) | 385 | (t (beep)))) |
| 329 | (let ((calc-fit-to-trail t)) | 386 | (unless nonlinear |
| 330 | (calc-enter-result n (substring (symbol-name func) 9) | 387 | (let ((calc-fit-to-trail t)) |
| 331 | (list func calc-curve-model | 388 | (calc-enter-result n (substring (symbol-name func) 9) |
| 332 | (if (= (length calc-curve-varnames) 2) | 389 | (list func calc-curve-model |
| 333 | (nth 1 calc-curve-varnames) | 390 | (if (= (length calc-curve-varnames) 2) |
| 334 | calc-curve-varnames) | 391 | (nth 1 calc-curve-varnames) |
| 335 | (if (= (length calc-curve-coefnames) 2) | 392 | calc-curve-varnames) |
| 336 | (nth 1 calc-curve-coefnames) | 393 | (if (= (length calc-curve-coefnames) 2) |
| 337 | calc-curve-coefnames) | 394 | (nth 1 calc-curve-coefnames) |
| 338 | data)) | 395 | calc-curve-coefnames) |
| 339 | (if (consp calc-fit-to-trail) | 396 | data)) |
| 340 | (calc-record (calc-normalize calc-fit-to-trail) "parm")))))) | 397 | (if (consp calc-fit-to-trail) |
| 398 | (calc-record (calc-normalize calc-fit-to-trail) "parm")))) | ||
| 399 | (when plot | ||
| 400 | (if (stringp plot) | ||
| 401 | (message plot) | ||
| 402 | (let ((calc-graph-no-auto-view t)) | ||
| 403 | (calc-graph-delete t) | ||
| 404 | (calc-graph-add-curve | ||
| 405 | (calc-graph-lookup (nth 1 plot)) | ||
| 406 | (calc-graph-lookup (nth 2 plot))) | ||
| 407 | (unless (math-contains-sdev-p (nth 2 data)) | ||
| 408 | (calc-graph-set-styles nil nil) | ||
| 409 | (calc-graph-point-style nil)) | ||
| 410 | (setq plot (cdr (nth 1 plot))) | ||
| 411 | (setq plot | ||
| 412 | (list 'intv | ||
| 413 | 3 | ||
| 414 | (math-sub | ||
| 415 | (math-min-list (car plot) (cdr plot)) | ||
| 416 | '(float 5 -1)) | ||
| 417 | (math-add | ||
| 418 | '(float 5 -1) | ||
| 419 | (math-max-list (car plot) (cdr plot))))) | ||
| 420 | (calc-graph-add-curve (calc-graph-lookup plot) | ||
| 421 | (calc-graph-lookup (calc-top-n 1))) | ||
| 422 | (calc-graph-plot nil))))))) | ||
| 341 | 423 | ||
| 342 | (defun calc-invent-independent-variables (n &optional but) | 424 | (defun calc-invent-independent-variables (n &optional but) |
| 343 | (calc-invent-variables n but '(x y z t) "x")) | 425 | (calc-invent-variables n but '(x y z t) "x")) |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 7611e40f8ef..ea495777f19 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -2080,7 +2080,7 @@ Or, for optional MON, YR." | |||
| 2080 | ;; Don't do any window-related stuff if we weren't called from a | 2080 | ;; Don't do any window-related stuff if we weren't called from a |
| 2081 | ;; window displaying the calendar | 2081 | ;; window displaying the calendar |
| 2082 | (when in-calendar-window | 2082 | (when in-calendar-window |
| 2083 | (if (or (one-window-p t) (/= (frame-width) (window-width))) | 2083 | (if (or (one-window-p t) (not (window-full-width-p))) |
| 2084 | ;; Don't mess with the window size, but ensure that the first | 2084 | ;; Don't mess with the window size, but ensure that the first |
| 2085 | ;; line is fully visible | 2085 | ;; line is fully visible |
| 2086 | (set-window-vscroll nil 0) | 2086 | (set-window-vscroll nil 0) |
diff --git a/lisp/complete.el b/lisp/complete.el index 9be68d833e5..75774b65db0 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -450,6 +450,7 @@ GOTO-END is non-nil, however, it instead replaces up to END." | |||
| 450 | env-on | 450 | env-on |
| 451 | regex | 451 | regex |
| 452 | p offset | 452 | p offset |
| 453 | abbreviated | ||
| 453 | (poss nil) | 454 | (poss nil) |
| 454 | helpposs | 455 | helpposs |
| 455 | (case-fold-search completion-ignore-case)) | 456 | (case-fold-search completion-ignore-case)) |
| @@ -586,17 +587,42 @@ GOTO-END is non-nil, however, it instead replaces up to END." | |||
| 586 | pred nil)) | 587 | pred nil)) |
| 587 | 588 | ||
| 588 | ;; Find an initial list of possible completions | 589 | ;; Find an initial list of possible completions |
| 589 | (if (not (setq p (string-match (concat PC-delim-regex | 590 | (unless (setq p (string-match (concat PC-delim-regex |
| 590 | (if filename "\\|\\*" "")) | 591 | (if filename "\\|\\*" "")) |
| 591 | str | 592 | str |
| 592 | (+ (length dirname) offset)))) | 593 | (+ (length dirname) offset))) |
| 593 | 594 | ||
| 594 | ;; Minibuffer contains no hyphens -- simple case! | 595 | ;; Minibuffer contains no hyphens -- simple case! |
| 595 | (setq poss (all-completions (if env-on | 596 | (setq poss (all-completions (if env-on basestr str) |
| 596 | basestr str) | ||
| 597 | table | 597 | table |
| 598 | pred)) | 598 | pred)) |
| 599 | 599 | (unless poss | |
| 600 | ;; Try completion as an abbreviation, e.g. "mvb" -> | ||
| 601 | ;; "m-v-b" -> "multiple-value-bind" | ||
| 602 | (setq origstr str | ||
| 603 | abbreviated t) | ||
| 604 | (if filename | ||
| 605 | (cond | ||
| 606 | ;; "alpha" or "/alpha" -> expand whole path. | ||
| 607 | ((string-match "^/?\\([A-Za-z0-9]+\\)$" str) | ||
| 608 | (setq | ||
| 609 | basestr "" | ||
| 610 | p nil | ||
| 611 | poss (PC-expand-many-files | ||
| 612 | (concat "/" | ||
| 613 | (mapconcat #'list (match-string 1 str) "*/") | ||
| 614 | "*")) | ||
| 615 | beg (1- beg))) | ||
| 616 | ;; Alphanumeric trailer -> expand trailing file | ||
| 617 | ((string-match "^\\(.+/\\)\\([A-Za-z0-9]+\\)$" str) | ||
| 618 | (setq regex (concat "\\`" | ||
| 619 | (mapconcat #'list | ||
| 620 | (match-string 2 str) | ||
| 621 | "[A-Za-z0-9]*[^A-Za-z0-9]")) | ||
| 622 | p (1+ (length (match-string 1 str)))))) | ||
| 623 | (setq regex (concat "\\`" (mapconcat #'list str "[^-]*-")) | ||
| 624 | p 1)))) | ||
| 625 | (when p | ||
| 600 | ;; Use all-completions to do an initial cull. This is a big win, | 626 | ;; Use all-completions to do an initial cull. This is a big win, |
| 601 | ;; since all-completions is written in C! | 627 | ;; since all-completions is written in C! |
| 602 | (let ((compl (all-completions (if env-on | 628 | (let ((compl (all-completions (if env-on |
| @@ -605,12 +631,24 @@ GOTO-END is non-nil, however, it instead replaces up to END." | |||
| 605 | table | 631 | table |
| 606 | pred))) | 632 | pred))) |
| 607 | (setq p compl) | 633 | (setq p compl) |
| 634 | (when (and compl abbreviated) | ||
| 635 | (if filename | ||
| 636 | (progn | ||
| 637 | (setq p nil) | ||
| 638 | (dolist (x compl) | ||
| 639 | (when (string-match regex x) | ||
| 640 | (push x p))) | ||
| 641 | (setq basestr (try-completion "" p))) | ||
| 642 | (setq basestr (mapconcat 'list str "-")) | ||
| 643 | (delete-region beg end) | ||
| 644 | (setq end (+ beg (length basestr))) | ||
| 645 | (insert basestr)))) | ||
| 608 | (while p | 646 | (while p |
| 609 | (and (string-match regex (car p)) | 647 | (and (string-match regex (car p)) |
| 610 | (progn | 648 | (progn |
| 611 | (set-text-properties 0 (length (car p)) '() (car p)) | 649 | (set-text-properties 0 (length (car p)) '() (car p)) |
| 612 | (setq poss (cons (car p) poss)))) | 650 | (setq poss (cons (car p) poss)))) |
| 613 | (setq p (cdr p))))) | 651 | (setq p (cdr p)))) |
| 614 | 652 | ||
| 615 | ;; If table had duplicates, they can be here. | 653 | ;; If table had duplicates, they can be here. |
| 616 | (delete-dups poss) | 654 | (delete-dups poss) |
| @@ -644,6 +682,7 @@ GOTO-END is non-nil, however, it instead replaces up to END." | |||
| 644 | (and p (setq poss p)))) | 682 | (and p (setq poss p)))) |
| 645 | 683 | ||
| 646 | ;; Now we have a list of possible completions | 684 | ;; Now we have a list of possible completions |
| 685 | |||
| 647 | (cond | 686 | (cond |
| 648 | 687 | ||
| 649 | ;; No valid completions found | 688 | ;; No valid completions found |
| @@ -653,6 +692,9 @@ GOTO-END is non-nil, however, it instead replaces up to END." | |||
| 653 | (let ((PC-word-failed-flag t)) | 692 | (let ((PC-word-failed-flag t)) |
| 654 | (delete-backward-char 1) | 693 | (delete-backward-char 1) |
| 655 | (PC-do-completion 'word)) | 694 | (PC-do-completion 'word)) |
| 695 | (when abbreviated | ||
| 696 | (delete-region beg end) | ||
| 697 | (insert origstr)) | ||
| 656 | (beep) | 698 | (beep) |
| 657 | (PC-temp-minibuffer-message (if ambig | 699 | (PC-temp-minibuffer-message (if ambig |
| 658 | " [Ambiguous dir name]" | 700 | " [Ambiguous dir name]" |
| @@ -789,13 +831,18 @@ GOTO-END is non-nil, however, it instead replaces up to END." | |||
| 789 | (setq completion-base-size (if dirname | 831 | (setq completion-base-size (if dirname |
| 790 | dirlength | 832 | dirlength |
| 791 | (- beg prompt-end)))))) | 833 | (- beg prompt-end)))))) |
| 792 | (PC-temp-minibuffer-message " [Next char not unique]")) | 834 | (PC-temp-minibuffer-message " [Next char not unique]")))))) |
| 793 | nil))))) | 835 | ;; Expansion of filenames is not reversible, so just keep |
| 836 | ;; the prefix. | ||
| 837 | (when (and abbreviated filename) | ||
| 838 | (delete-region (point) end)) | ||
| 839 | nil) | ||
| 794 | 840 | ||
| 795 | ;; Only one possible completion | 841 | ;; Only one possible completion |
| 796 | (t | 842 | (t |
| 797 | (if (and (equal basestr (car poss)) | 843 | (if (and (equal basestr (car poss)) |
| 798 | (not (and env-on filename))) | 844 | (not (and env-on filename)) |
| 845 | (not abbreviated)) | ||
| 799 | (if (null mode) | 846 | (if (null mode) |
| 800 | (PC-temp-minibuffer-message " [Sole completion]")) | 847 | (PC-temp-minibuffer-message " [Sole completion]")) |
| 801 | (delete-region beg end) | 848 | (delete-region beg end) |
| @@ -853,13 +900,11 @@ only symbols with function definitions are considered. | |||
| 853 | Otherwise, all symbols with function definitions, values | 900 | Otherwise, all symbols with function definitions, values |
| 854 | or properties are considered." | 901 | or properties are considered." |
| 855 | (interactive) | 902 | (interactive) |
| 856 | (let* ((end (point)) | 903 | (let* ((end |
| 857 | ;; To complete the word under point, rather than just the portion | 904 | (save-excursion |
| 858 | ;; before point, use this: | 905 | (with-syntax-table lisp-mode-syntax-table |
| 859 | ;;; (save-excursion | 906 | (skip-syntax-forward "_w") |
| 860 | ;;; (with-syntax-table lisp-mode-syntax-table | 907 | (point)))) |
| 861 | ;;; (forward-sexp 1) | ||
| 862 | ;;; (point)))) | ||
| 863 | (beg (save-excursion | 908 | (beg (save-excursion |
| 864 | (with-syntax-table lisp-mode-syntax-table | 909 | (with-syntax-table lisp-mode-syntax-table |
| 865 | (backward-sexp 1) | 910 | (backward-sexp 1) |
diff --git a/lisp/custom.el b/lisp/custom.el index a5a455c2f32..5138f800972 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -642,7 +642,7 @@ this sets the local binding in that buffer instead." | |||
| 642 | (funcall variable (if value 1 0)))) | 642 | (funcall variable (if value 1 0)))) |
| 643 | 643 | ||
| 644 | (defun custom-quote (sexp) | 644 | (defun custom-quote (sexp) |
| 645 | "Quote SEXP iff it is not self quoting." | 645 | "Quote SEXP if it is not self quoting." |
| 646 | (if (or (memq sexp '(t nil)) | 646 | (if (or (memq sexp '(t nil)) |
| 647 | (keywordp sexp) | 647 | (keywordp sexp) |
| 648 | (and (listp sexp) | 648 | (and (listp sexp) |
| @@ -665,14 +665,14 @@ default value. Otherwise, set it to nil. | |||
| 665 | 665 | ||
| 666 | To actually save the value, call `custom-save-all'. | 666 | To actually save the value, call `custom-save-all'. |
| 667 | 667 | ||
| 668 | Return non-nil iff the `saved-value' property actually changed." | 668 | Return non-nil if the `saved-value' property actually changed." |
| 669 | (custom-load-symbol symbol) | 669 | (custom-load-symbol symbol) |
| 670 | (let* ((get (or (get symbol 'custom-get) 'default-value)) | 670 | (let* ((get (or (get symbol 'custom-get) 'default-value)) |
| 671 | (value (funcall get symbol)) | 671 | (value (funcall get symbol)) |
| 672 | (saved (get symbol 'saved-value)) | 672 | (saved (get symbol 'saved-value)) |
| 673 | (standard (get symbol 'standard-value)) | 673 | (standard (get symbol 'standard-value)) |
| 674 | (comment (get symbol 'customized-variable-comment))) | 674 | (comment (get symbol 'customized-variable-comment))) |
| 675 | ;; Save default value iff different from standard value. | 675 | ;; Save default value if different from standard value. |
| 676 | (if (or (null standard) | 676 | (if (or (null standard) |
| 677 | (not (equal value (condition-case nil | 677 | (not (equal value (condition-case nil |
| 678 | (eval (car standard)) | 678 | (eval (car standard)) |
| @@ -694,13 +694,13 @@ or else if it is different from the standard value, set the | |||
| 694 | `customized-value' property to a list whose car evaluates to the | 694 | `customized-value' property to a list whose car evaluates to the |
| 695 | default value. Otherwise, set it to nil. | 695 | default value. Otherwise, set it to nil. |
| 696 | 696 | ||
| 697 | Return non-nil iff the `customized-value' property actually changed." | 697 | Return non-nil if the `customized-value' property actually changed." |
| 698 | (custom-load-symbol symbol) | 698 | (custom-load-symbol symbol) |
| 699 | (let* ((get (or (get symbol 'custom-get) 'default-value)) | 699 | (let* ((get (or (get symbol 'custom-get) 'default-value)) |
| 700 | (value (funcall get symbol)) | 700 | (value (funcall get symbol)) |
| 701 | (customized (get symbol 'customized-value)) | 701 | (customized (get symbol 'customized-value)) |
| 702 | (old (or (get symbol 'saved-value) (get symbol 'standard-value)))) | 702 | (old (or (get symbol 'saved-value) (get symbol 'standard-value)))) |
| 703 | ;; Mark default value as set iff different from old value. | 703 | ;; Mark default value as set if different from old value. |
| 704 | (if (not (and old | 704 | (if (not (and old |
| 705 | (equal value (condition-case nil | 705 | (equal value (condition-case nil |
| 706 | (eval (car old)) | 706 | (eval (car old)) |
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index cfac6517209..be4c7e7b905 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -349,8 +349,11 @@ when editing big diffs)." | |||
| 349 | ("^--- .+ ----$" . diff-hunk-header-face) ;context | 349 | ("^--- .+ ----$" . diff-hunk-header-face) ;context |
| 350 | ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal | 350 | ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) ;normal |
| 351 | ("^---$" . diff-hunk-header-face) ;normal | 351 | ("^---$" . diff-hunk-header-face) ;normal |
| 352 | ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\([^\t\n]+\\)\\(.*[^*-]\\)?\n" | 352 | ;; For file headers, accept files with spaces, but be careful to rule |
| 353 | (0 diff-header-face) (2 diff-file-header-face prepend)) | 353 | ;; out false-positives when matching hunk headers. |
| 354 | ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\([^\t\n]+?\\)\\(?:\t.*\\| \\(\\*\\*\\*\\*\\|----\\)\\)?\n" | ||
| 355 | (0 diff-header-face) | ||
| 356 | (2 (if (not (match-end 3)) diff-file-header-face) prepend)) | ||
| 354 | ("^\\([-<]\\)\\(.*\n\\)" | 357 | ("^\\([-<]\\)\\(.*\n\\)" |
| 355 | (1 diff-indicator-removed-face) (2 diff-removed-face)) | 358 | (1 diff-indicator-removed-face) (2 diff-removed-face)) |
| 356 | ("^\\([+>]\\)\\(.*\n\\)" | 359 | ("^\\([+>]\\)\\(.*\n\\)" |
| @@ -425,10 +428,20 @@ but in the file header instead, in which case move forward to the first hunk." | |||
| 425 | (defun diff-beginning-of-file () | 428 | (defun diff-beginning-of-file () |
| 426 | (beginning-of-line) | 429 | (beginning-of-line) |
| 427 | (unless (looking-at diff-file-header-re) | 430 | (unless (looking-at diff-file-header-re) |
| 428 | (forward-line 2) | 431 | (let ((start (point)) |
| 429 | (condition-case () | 432 | res) |
| 430 | (re-search-backward diff-file-header-re) | 433 | ;; diff-file-header-re may need to match up to 4 lines, so in case |
| 431 | (error (error "Can't find the beginning of the file"))))) | 434 | ;; we're inside the header, we need to move up to 3 lines forward. |
| 435 | (forward-line 3) | ||
| 436 | (if (and (setq res (re-search-backward diff-file-header-re nil t)) | ||
| 437 | ;; Maybe the 3 lines forward were too much and we matched | ||
| 438 | ;; a file header after our starting point :-( | ||
| 439 | (or (<= (point) start) | ||
| 440 | (setq res (re-search-backward diff-file-header-re nil t)))) | ||
| 441 | res | ||
| 442 | (goto-char start) | ||
| 443 | (error "Can't find the beginning of the file"))))) | ||
| 444 | |||
| 432 | 445 | ||
| 433 | (defun diff-end-of-file () | 446 | (defun diff-end-of-file () |
| 434 | (re-search-forward "^[-+#!<>0-9@* \\]" nil t) | 447 | (re-search-forward "^[-+#!<>0-9@* \\]" nil t) |
| @@ -481,26 +494,34 @@ If the prefix ARG is given, restrict the view to the current file instead." | |||
| 481 | "Go to the beginning of file-related diff-info. | 494 | "Go to the beginning of file-related diff-info. |
| 482 | This is like `diff-beginning-of-file' except it tries to skip back over leading | 495 | This is like `diff-beginning-of-file' except it tries to skip back over leading |
| 483 | data such as \"Index: ...\" and such." | 496 | data such as \"Index: ...\" and such." |
| 484 | (let ((start (point)) | 497 | (let* ((start (point)) |
| 485 | (file (condition-case err (progn (diff-beginning-of-file) (point)) | 498 | (prevfile (condition-case err |
| 486 | (error err))) | 499 | (save-excursion (diff-beginning-of-file) (point)) |
| 487 | ;; prevhunk is one of the limits. | 500 | (error err))) |
| 488 | (prevhunk (save-excursion (ignore-errors (diff-hunk-prev) (point)))) | 501 | (err (if (consp prevfile) prevfile)) |
| 489 | err) | 502 | (nextfile (ignore-errors |
| 490 | (when (consp file) | 503 | (save-excursion |
| 491 | ;; Presumably, we started before the file header, in the leading junk. | 504 | (goto-char start) (diff-file-next) (point)))) |
| 492 | (setq err file) | 505 | ;; prevhunk is one of the limits. |
| 493 | (diff-file-next) | 506 | (prevhunk (save-excursion |
| 494 | (setq file (point))) | 507 | (ignore-errors |
| 495 | (let ((index (save-excursion | 508 | (if (numberp prevfile) (goto-char prevfile)) |
| 496 | (re-search-backward "^Index: " prevhunk t)))) | 509 | (diff-hunk-prev) (point)))) |
| 497 | (when index (setq file index)) | 510 | (previndex (save-excursion |
| 498 | (if (<= file start) | 511 | (re-search-backward "^Index: " prevhunk t)))) |
| 499 | (goto-char file) | 512 | ;; If we're in the junk, we should use nextfile instead of prevfile. |
| 500 | ;; File starts *after* the starting point: we really weren't in | 513 | (if (and (numberp nextfile) |
| 501 | ;; a file diff but elsewhere. | 514 | (or (not (numberp prevfile)) |
| 502 | (goto-char start) | 515 | (and previndex (> previndex prevfile)))) |
| 503 | (signal (car err) (cdr err)))))) | 516 | (setq prevfile nextfile)) |
| 517 | (if (and previndex (numberp prevfile) (< previndex prevfile)) | ||
| 518 | (setq prevfile previndex)) | ||
| 519 | (if (and (numberp prevfile) (<= prevfile start)) | ||
| 520 | (goto-char prevfile) | ||
| 521 | ;; File starts *after* the starting point: we really weren't in | ||
| 522 | ;; a file diff but elsewhere. | ||
| 523 | (goto-char start) | ||
| 524 | (signal (car err) (cdr err))))) | ||
| 504 | 525 | ||
| 505 | (defun diff-file-kill () | 526 | (defun diff-file-kill () |
| 506 | "Kill current file's hunks." | 527 | "Kill current file's hunks." |
| @@ -703,7 +724,7 @@ PREFIX is only used internally: don't use it." | |||
| 703 | (defun diff-unified->context (start end) | 724 | (defun diff-unified->context (start end) |
| 704 | "Convert unified diffs to context diffs. | 725 | "Convert unified diffs to context diffs. |
| 705 | START and END are either taken from the region (if a prefix arg is given) or | 726 | START and END are either taken from the region (if a prefix arg is given) or |
| 706 | else cover the whole bufer." | 727 | else cover the whole buffer." |
| 707 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) | 728 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 708 | (list (region-beginning) (region-end)) | 729 | (list (region-beginning) (region-end)) |
| 709 | (list (point-min) (point-max)))) | 730 | (list (point-min) (point-max)))) |
| @@ -886,7 +907,7 @@ With a prefix argument, convert unified format to context format." | |||
| 886 | (defun diff-reverse-direction (start end) | 907 | (defun diff-reverse-direction (start end) |
| 887 | "Reverse the direction of the diffs. | 908 | "Reverse the direction of the diffs. |
| 888 | START and END are either taken from the region (if a prefix arg is given) or | 909 | START and END are either taken from the region (if a prefix arg is given) or |
| 889 | else cover the whole bufer." | 910 | else cover the whole buffer." |
| 890 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) | 911 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 891 | (list (region-beginning) (region-end)) | 912 | (list (region-beginning) (region-end)) |
| 892 | (list (point-min) (point-max)))) | 913 | (list (point-min) (point-max)))) |
| @@ -948,7 +969,7 @@ else cover the whole bufer." | |||
| 948 | (defun diff-fixup-modifs (start end) | 969 | (defun diff-fixup-modifs (start end) |
| 949 | "Fixup the hunk headers (in case the buffer was modified). | 970 | "Fixup the hunk headers (in case the buffer was modified). |
| 950 | START and END are either taken from the region (if a prefix arg is given) or | 971 | START and END are either taken from the region (if a prefix arg is given) or |
| 951 | else cover the whole bufer." | 972 | else cover the whole buffer." |
| 952 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) | 973 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 953 | (list (region-beginning) (region-end)) | 974 | (list (region-beginning) (region-end)) |
| 954 | (list (point-min) (point-max)))) | 975 | (list (point-min) (point-max)))) |
diff --git a/lisp/diff.el b/lisp/diff.el index 3013f0d769e..b063c07b40f 100644 --- a/lisp/diff.el +++ b/lisp/diff.el | |||
| @@ -62,7 +62,8 @@ | |||
| 62 | 62 | ||
| 63 | (defun diff-sentinel (code) | 63 | (defun diff-sentinel (code) |
| 64 | "Code run when the diff process exits. | 64 | "Code run when the diff process exits. |
| 65 | CODE is the exit code of the process. It should be 0 iff no diffs were found." | 65 | CODE is the exit code of the process. It should be 0 only if no diffs |
| 66 | were found." | ||
| 66 | (if diff-old-temp-file (delete-file diff-old-temp-file)) | 67 | (if diff-old-temp-file (delete-file diff-old-temp-file)) |
| 67 | (if diff-new-temp-file (delete-file diff-new-temp-file)) | 68 | (if diff-new-temp-file (delete-file diff-new-temp-file)) |
| 68 | (save-excursion | 69 | (save-excursion |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 4d06acdcf6c..124c53b44c5 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -1993,8 +1993,8 @@ of marked files. If KILL-ROOT is non-nil, kill DIRNAME as well." | |||
| 1993 | 1993 | ||
| 1994 | (defun dired-tree-lessp (dir1 dir2) | 1994 | (defun dired-tree-lessp (dir1 dir2) |
| 1995 | ;; Lexicographic order on file name components, like `ls -lR': | 1995 | ;; Lexicographic order on file name components, like `ls -lR': |
| 1996 | ;; DIR1 < DIR2 iff DIR1 comes *before* DIR2 in an `ls -lR' listing, | 1996 | ;; DIR1 < DIR2 if DIR1 comes *before* DIR2 in an `ls -lR' listing, |
| 1997 | ;; i.e., iff DIR1 is a (grand)parent dir of DIR2, | 1997 | ;; i.e., if DIR1 is a (grand)parent dir of DIR2, |
| 1998 | ;; or DIR1 and DIR2 are in the same parentdir and their last | 1998 | ;; or DIR1 and DIR2 are in the same parentdir and their last |
| 1999 | ;; components are string-lessp. | 1999 | ;; components are string-lessp. |
| 2000 | ;; Thus ("/usr/" "/usr/bin") and ("/usr/a/" "/usr/b/") are tree-lessp. | 2000 | ;; Thus ("/usr/" "/usr/bin") and ("/usr/a/" "/usr/b/") are tree-lessp. |
diff --git a/lisp/dired.el b/lisp/dired.el index 1a906093a7a..d263f0b3044 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -2560,12 +2560,12 @@ non-empty directories is allowed." | |||
| 2560 | (cond ;; if split-height-threshold is enabled, use the largest window | 2560 | (cond ;; if split-height-threshold is enabled, use the largest window |
| 2561 | ((and (> (window-height (setq w2 (get-largest-window))) | 2561 | ((and (> (window-height (setq w2 (get-largest-window))) |
| 2562 | split-height-threshold) | 2562 | split-height-threshold) |
| 2563 | (= (frame-width) (window-width w2))) | 2563 | (window-full-width-p w2)) |
| 2564 | (setq window w2)) | 2564 | (setq window w2)) |
| 2565 | ;; if the least-recently-used window is big enough, use it | 2565 | ;; if the least-recently-used window is big enough, use it |
| 2566 | ((and (> (window-height (setq w2 (get-lru-window))) | 2566 | ((and (> (window-height (setq w2 (get-lru-window))) |
| 2567 | (* 2 window-min-height)) | 2567 | (* 2 window-min-height)) |
| 2568 | (= (frame-width) (window-width w2))) | 2568 | (window-full-width-p w2)) |
| 2569 | (setq window w2))) | 2569 | (setq window w2))) |
| 2570 | (save-excursion | 2570 | (save-excursion |
| 2571 | (set-buffer buf) | 2571 | (set-buffer buf) |
diff --git a/lisp/double.el b/lisp/double.el index 4b1d59ff1ec..0b5cf110fbd 100644 --- a/lisp/double.el +++ b/lisp/double.el | |||
| @@ -186,7 +186,8 @@ use either \\[customize] or the function `double-mode'." | |||
| 186 | ;;;###autoload | 186 | ;;;###autoload |
| 187 | (defun double-mode (arg) | 187 | (defun double-mode (arg) |
| 188 | "Toggle Double mode. | 188 | "Toggle Double mode. |
| 189 | With prefix arg, turn Double mode on iff arg is positive. | 189 | With prefix argument ARG, turn Double mode on if ARG is positive, otherwise |
| 190 | turn it off. | ||
| 190 | 191 | ||
| 191 | When Double mode is on, some keys will insert different strings | 192 | When Double mode is on, some keys will insert different strings |
| 192 | when pressed twice. See variable `double-map' for details." | 193 | when pressed twice. See variable `double-map' for details." |
diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 48cd7c79d4e..ec153fde625 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el | |||
| @@ -867,7 +867,7 @@ one optional arguments, diff-number to refine.") | |||
| 867 | (ediff-make-fine-diffs n 'noforce) | 867 | (ediff-make-fine-diffs n 'noforce) |
| 868 | (ediff-make-fine-diffs n 'skip))) | 868 | (ediff-make-fine-diffs n 'skip))) |
| 869 | 869 | ||
| 870 | ;; highlight iff fine diffs already exist | 870 | ;; highlight if fine diffs already exist |
| 871 | ((eq ediff-auto-refine 'off) | 871 | ((eq ediff-auto-refine 'off) |
| 872 | (ediff-make-fine-diffs n 'skip)))) | 872 | (ediff-make-fine-diffs n 'skip)))) |
| 873 | 873 | ||
| @@ -1459,7 +1459,7 @@ arguments to `skip-chars-forward'." | |||
| 1459 | 1459 | ||
| 1460 | 1460 | ||
| 1461 | (defun ediff-same-contents (d1 d2 &optional filter-re) | 1461 | (defun ediff-same-contents (d1 d2 &optional filter-re) |
| 1462 | "Returns t iff D1 and D2 have the same content. | 1462 | "Return t if D1 and D2 have the same content. |
| 1463 | D1 and D2 can either be both directories or both regular files. | 1463 | D1 and D2 can either be both directories or both regular files. |
| 1464 | Symlinks and the likes are not handled. | 1464 | Symlinks and the likes are not handled. |
| 1465 | If FILTER-RE is non-nil, recursive checking in directories | 1465 | If FILTER-RE is non-nil, recursive checking in directories |
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index d39b0bd9e4a..669c055de26 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -209,6 +209,7 @@ put the output in." | |||
| 209 | (setcdr p nil) | 209 | (setcdr p nil) |
| 210 | (princ "\n(" outbuf) | 210 | (princ "\n(" outbuf) |
| 211 | (let ((print-escape-newlines t) | 211 | (let ((print-escape-newlines t) |
| 212 | (print-quoted t) | ||
| 212 | (print-escape-nonascii t)) | 213 | (print-escape-nonascii t)) |
| 213 | (dolist (elt form) | 214 | (dolist (elt form) |
| 214 | (prin1 elt outbuf) | 215 | (prin1 elt outbuf) |
| @@ -232,6 +233,7 @@ put the output in." | |||
| 232 | outbuf)) | 233 | outbuf)) |
| 233 | (terpri outbuf))) | 234 | (terpri outbuf))) |
| 234 | (let ((print-escape-newlines t) | 235 | (let ((print-escape-newlines t) |
| 236 | (print-quoted t) | ||
| 235 | (print-escape-nonascii t)) | 237 | (print-escape-nonascii t)) |
| 236 | (print form outbuf))))))) | 238 | (print form outbuf))))))) |
| 237 | 239 | ||
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index 54fcfc3df8a..6daaf001433 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el | |||
| @@ -118,10 +118,28 @@ Vectors work just like lists. Nested backquotes are permitted." | |||
| 118 | ;; constant, 1 => to be unquoted, 2 => to be spliced in. | 118 | ;; constant, 1 => to be unquoted, 2 => to be spliced in. |
| 119 | ;; The top-level backquote macro just discards the tag. | 119 | ;; The top-level backquote macro just discards the tag. |
| 120 | 120 | ||
| 121 | (defun backquote-process (s) | 121 | (defun backquote-delay-process (s level) |
| 122 | "Process a (un|back|splice)quote inside a backquote. | ||
| 123 | This simply recurses through the body." | ||
| 124 | (let ((exp (backquote-listify (list (backquote-process (nth 1 s) level) | ||
| 125 | (cons 0 (list 'quote (car s)))) | ||
| 126 | '(0)))) | ||
| 127 | (if (eq (car-safe exp) 'quote) | ||
| 128 | (cons 0 (list 'quote s)) | ||
| 129 | (cons 1 exp)))) | ||
| 130 | |||
| 131 | (defun backquote-process (s &optional level) | ||
| 132 | "Process the body of a backquote. | ||
| 133 | S is the body. Returns a cons cell whose cdr is piece of code which | ||
| 134 | is the macro-expansion of S, and whose car is a small integer whose value | ||
| 135 | can either indicate that the code is constant (0), or not (1), or returns | ||
| 136 | a list which should be spliced into its environment (2). | ||
| 137 | LEVEL is only used internally and indicates the nesting level: | ||
| 138 | 0 (the default) is for the toplevel nested inside a single backquote." | ||
| 139 | (unless level (setq level 0)) | ||
| 122 | (cond | 140 | (cond |
| 123 | ((vectorp s) | 141 | ((vectorp s) |
| 124 | (let ((n (backquote-process (append s ())))) | 142 | (let ((n (backquote-process (append s ()) level))) |
| 125 | (if (= (car n) 0) | 143 | (if (= (car n) 0) |
| 126 | (cons 0 s) | 144 | (cons 0 s) |
| 127 | (cons 1 (cond | 145 | (cons 1 (cond |
| @@ -138,11 +156,15 @@ Vectors work just like lists. Nested backquotes are permitted." | |||
| 138 | s | 156 | s |
| 139 | (list 'quote s)))) | 157 | (list 'quote s)))) |
| 140 | ((eq (car s) backquote-unquote-symbol) | 158 | ((eq (car s) backquote-unquote-symbol) |
| 141 | (cons 1 (nth 1 s))) | 159 | (if (<= level 0) |
| 160 | (cons 1 (nth 1 s)) | ||
| 161 | (backquote-delay-process s (1- level)))) | ||
| 142 | ((eq (car s) backquote-splice-symbol) | 162 | ((eq (car s) backquote-splice-symbol) |
| 143 | (cons 2 (nth 1 s))) | 163 | (if (<= level 0) |
| 164 | (cons 2 (nth 1 s)) | ||
| 165 | (backquote-delay-process s (1- level)))) | ||
| 144 | ((eq (car s) backquote-backquote-symbol) | 166 | ((eq (car s) backquote-backquote-symbol) |
| 145 | (backquote-process (cdr (backquote-process (nth 1 s))))) | 167 | (backquote-delay-process s (1+ level))) |
| 146 | (t | 168 | (t |
| 147 | (let ((rest s) | 169 | (let ((rest s) |
| 148 | item firstlist list lists expression) | 170 | item firstlist list lists expression) |
| @@ -154,11 +176,13 @@ Vectors work just like lists. Nested backquotes are permitted." | |||
| 154 | ;; at the beginning, put them in FIRSTLIST, | 176 | ;; at the beginning, put them in FIRSTLIST, |
| 155 | ;; as a list of tagged values (TAG . FORM). | 177 | ;; as a list of tagged values (TAG . FORM). |
| 156 | ;; If there are any at the end, they go in LIST, likewise. | 178 | ;; If there are any at the end, they go in LIST, likewise. |
| 157 | (while (consp rest) | 179 | (while (and (consp rest) |
| 158 | ;; Turn . (, foo) into (,@ foo). | 180 | ;; Stop if the cdr is an expression inside a backquote or |
| 159 | (if (eq (car rest) backquote-unquote-symbol) | 181 | ;; unquote since this needs to go recursively through |
| 160 | (setq rest (list (list backquote-splice-symbol (nth 1 rest))))) | 182 | ;; backquote-process. |
| 161 | (setq item (backquote-process (car rest))) | 183 | (not (or (eq (car rest) backquote-unquote-symbol) |
| 184 | (eq (car rest) backquote-backquote-symbol)))) | ||
| 185 | (setq item (backquote-process (car rest) level)) | ||
| 162 | (cond | 186 | (cond |
| 163 | ((= (car item) 2) | 187 | ((= (car item) 2) |
| 164 | ;; Put the nonspliced items before the first spliced item | 188 | ;; Put the nonspliced items before the first spliced item |
| @@ -168,8 +192,8 @@ Vectors work just like lists. Nested backquotes are permitted." | |||
| 168 | list nil)) | 192 | list nil)) |
| 169 | ;; Otherwise, put any preceding nonspliced items into LISTS. | 193 | ;; Otherwise, put any preceding nonspliced items into LISTS. |
| 170 | (if list | 194 | (if list |
| 171 | (setq lists (cons (backquote-listify list '(0 . nil)) lists))) | 195 | (push (backquote-listify list '(0 . nil)) lists)) |
| 172 | (setq lists (cons (cdr item) lists)) | 196 | (push (cdr item) lists) |
| 173 | (setq list nil)) | 197 | (setq list nil)) |
| 174 | (t | 198 | (t |
| 175 | (setq list (cons item list)))) | 199 | (setq list (cons item list)))) |
| @@ -177,8 +201,8 @@ Vectors work just like lists. Nested backquotes are permitted." | |||
| 177 | ;; Handle nonsplicing final elements, and the tail of the list | 201 | ;; Handle nonsplicing final elements, and the tail of the list |
| 178 | ;; (which remains in REST). | 202 | ;; (which remains in REST). |
| 179 | (if (or rest list) | 203 | (if (or rest list) |
| 180 | (setq lists (cons (backquote-listify list (backquote-process rest)) | 204 | (push (backquote-listify list (backquote-process rest level)) |
| 181 | lists))) | 205 | lists)) |
| 182 | ;; Turn LISTS into a form that produces the combined list. | 206 | ;; Turn LISTS into a form that produces the combined list. |
| 183 | (setq expression | 207 | (setq expression |
| 184 | (if (or (cdr lists) | 208 | (if (or (cdr lists) |
| @@ -221,5 +245,5 @@ Vectors work just like lists. Nested backquotes are permitted." | |||
| 221 | tail)) | 245 | tail)) |
| 222 | (t (cons 'list heads))))) | 246 | (t (cons 'list heads))))) |
| 223 | 247 | ||
| 224 | ;;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a | 248 | ;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a |
| 225 | ;;; backquote.el ends here | 249 | ;;; backquote.el ends here |
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 588501aad97..6db7aaf1183 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -564,7 +564,7 @@ | |||
| 564 | (cons fn args))))))) | 564 | (cons fn args))))))) |
| 565 | 565 | ||
| 566 | (defun byte-optimize-all-constp (list) | 566 | (defun byte-optimize-all-constp (list) |
| 567 | "Non-nil iff all elements of LIST satisfy `byte-compile-constp'." | 567 | "Non-nil if all elements of LIST satisfy `byte-compile-constp'." |
| 568 | (let ((constant t)) | 568 | (let ((constant t)) |
| 569 | (while (and list constant) | 569 | (while (and list constant) |
| 570 | (unless (byte-compile-constp (car list)) | 570 | (unless (byte-compile-constp (car list)) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 862a7efe046..e1835d75fcb 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -1243,7 +1243,8 @@ generating a buffered list of errors." | |||
| 1243 | ;;;###autoload | 1243 | ;;;###autoload |
| 1244 | (define-minor-mode checkdoc-minor-mode | 1244 | (define-minor-mode checkdoc-minor-mode |
| 1245 | "Toggle Checkdoc minor mode, a mode for checking Lisp doc strings. | 1245 | "Toggle Checkdoc minor mode, a mode for checking Lisp doc strings. |
| 1246 | With prefix ARG, turn Checkdoc minor mode on iff ARG is positive. | 1246 | With prefix ARG, turn Checkdoc minor mode on if ARG is positive, otherwise |
| 1247 | turn it off. | ||
| 1247 | 1248 | ||
| 1248 | In Checkdoc minor mode, the usual bindings for `eval-defun' which is | 1249 | In Checkdoc minor mode, the usual bindings for `eval-defun' which is |
| 1249 | bound to \\<checkdoc-minor-mode-map>\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include | 1250 | bound to \\<checkdoc-minor-mode-map>\\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include |
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 12514b43534..4a0c17c0a4c 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p | 10 | ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p |
| 11 | ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively | 11 | ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively |
| 12 | ;;;;;; notevery notany every some mapcon mapcan mapl maplist map | 12 | ;;;;;; notevery notany every some mapcon mapcan mapl maplist map |
| 13 | ;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "47c92504dda976a632c2c10bedd4b6a4") | 13 | ;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "53c2b3ede19dac62cff13a37f58cdf9c") |
| 14 | ;;; Generated autoloads from cl-extra.el | 14 | ;;; Generated autoloads from cl-extra.el |
| 15 | 15 | ||
| 16 | (autoload (quote coerce) "cl-extra" "\ | 16 | (autoload (quote coerce) "cl-extra" "\ |
| @@ -745,7 +745,7 @@ Not documented | |||
| 745 | ;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not | 745 | ;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not |
| 746 | ;;;;;; substitute-if substitute delete-duplicates remove-duplicates | 746 | ;;;;;; substitute-if substitute delete-duplicates remove-duplicates |
| 747 | ;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove* | 747 | ;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove* |
| 748 | ;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "8805f76626399794931f5db36ddf855f") | 748 | ;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "c972a97c053d4e001ac1d1012c315b28") |
| 749 | ;;; Generated autoloads from cl-seq.el | 749 | ;;; Generated autoloads from cl-seq.el |
| 750 | 750 | ||
| 751 | (autoload (quote reduce) "cl-seq" "\ | 751 | (autoload (quote reduce) "cl-seq" "\ |
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 5a7dc53e917..b802d8acd43 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -546,7 +546,7 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'." | |||
| 546 | (easy-menu-define-key map (easy-menu-intern (car item)) (cdr item) before))) | 546 | (easy-menu-define-key map (easy-menu-intern (car item)) (cdr item) before))) |
| 547 | 547 | ||
| 548 | (defun easy-menu-item-present-p (map path name) | 548 | (defun easy-menu-item-present-p (map path name) |
| 549 | "In submenu of MAP with path PATH, return non-nil iff item NAME is present. | 549 | "In submenu of MAP with path PATH, return non-nil if item NAME is present. |
| 550 | MAP and PATH are defined as in `easy-menu-add-item'. | 550 | MAP and PATH are defined as in `easy-menu-add-item'. |
| 551 | NAME should be a string, the name of the element to be looked for." | 551 | NAME should be a string, the name of the element to be looked for." |
| 552 | (easy-menu-return-item (easy-menu-get-map map path) name)) | 552 | (easy-menu-return-item (easy-menu-get-map map path) name)) |
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index c1bc6dae515..2ff273ebab3 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -267,13 +267,13 @@ Emacs Lisp mode) that support Eldoc.") | |||
| 267 | ;; Return a string containing the function parameter list, or 1-line | 267 | ;; Return a string containing the function parameter list, or 1-line |
| 268 | ;; docstring if function is a subr and no arglist is obtainable from the | 268 | ;; docstring if function is a subr and no arglist is obtainable from the |
| 269 | ;; docstring or elsewhere. | 269 | ;; docstring or elsewhere. |
| 270 | (defun eldoc-get-fnsym-args-string (sym argument-index) | 270 | (defun eldoc-get-fnsym-args-string (sym &optional argument-index) |
| 271 | (let ((args nil) | 271 | (let ((args nil) |
| 272 | (doc nil)) | 272 | (doc nil)) |
| 273 | (cond ((not (and sym (symbolp sym) (fboundp sym)))) | 273 | (cond ((not (and sym (symbolp sym) (fboundp sym)))) |
| 274 | ((and (eq sym (aref eldoc-last-data 0)) | 274 | ((and (eq sym (aref eldoc-last-data 0)) |
| 275 | (eq 'function (aref eldoc-last-data 2))) | 275 | (eq 'function (aref eldoc-last-data 2))) |
| 276 | (setq args (aref eldoc-last-data 1))) | 276 | (setq doc (aref eldoc-last-data 1))) |
| 277 | ((setq doc (help-split-fundoc (documentation sym t) sym)) | 277 | ((setq doc (help-split-fundoc (documentation sym t) sym)) |
| 278 | (setq args (car doc)) | 278 | (setq args (car doc)) |
| 279 | (string-match "\\`[^ )]* ?" args) | 279 | (string-match "\\`[^ )]* ?" args) |
| @@ -281,8 +281,9 @@ Emacs Lisp mode) that support Eldoc.") | |||
| 281 | (eldoc-last-data-store sym args 'function)) | 281 | (eldoc-last-data-store sym args 'function)) |
| 282 | (t | 282 | (t |
| 283 | (setq args (eldoc-function-argstring sym)))) | 283 | (setq args (eldoc-function-argstring sym)))) |
| 284 | (when args | 284 | (and args |
| 285 | (setq doc (eldoc-highlight-function-argument sym args argument-index))) | 285 | argument-index |
| 286 | (setq doc (eldoc-highlight-function-argument sym args argument-index))) | ||
| 286 | doc)) | 287 | doc)) |
| 287 | 288 | ||
| 288 | ;; Highlight argument INDEX in ARGS list for SYM. | 289 | ;; Highlight argument INDEX in ARGS list for SYM. |
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 957c5b23541..ae150078785 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el | |||
| @@ -554,7 +554,7 @@ appended to R will apply to all of R. For example, \"a\" | |||
| 554 | 554 | ||
| 555 | This function may return false negatives, but it will not | 555 | This function may return false negatives, but it will not |
| 556 | return false positives. It is nevertheless useful in | 556 | return false positives. It is nevertheless useful in |
| 557 | situations where an efficiency shortcut can be taken iff a | 557 | situations where an efficiency shortcut can be taken only if a |
| 558 | regexp is atomic. The function can be improved to detect | 558 | regexp is atomic. The function can be improved to detect |
| 559 | more cases of atomic regexps. Presently, this function | 559 | more cases of atomic regexps. Presently, this function |
| 560 | detects the following categories of atomic regexp; | 560 | detects the following categories of atomic regexp; |
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index bf52acef382..d7dd1f19300 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el | |||
| @@ -212,7 +212,7 @@ of symbols with local bindings." | |||
| 212 | 212 | ||
| 213 | 213 | ||
| 214 | (defun unsafep-function (fun) | 214 | (defun unsafep-function (fun) |
| 215 | "Return nil iff FUN is a safe function. | 215 | "Return nil if FUN is a safe function. |
| 216 | \(either a safe lambda or a symbol that names a safe function). Otherwise | 216 | \(either a safe lambda or a symbol that names a safe function). Otherwise |
| 217 | result is a reason code." | 217 | result is a reason code." |
| 218 | (cond | 218 | (cond |
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index f3792b92e42..81187112a66 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el | |||
| @@ -792,10 +792,13 @@ Create the key map if necessary." | |||
| 792 | (use-local-map tpu-buffer-local-map))) | 792 | (use-local-map tpu-buffer-local-map))) |
| 793 | (local-set-key key func)) | 793 | (local-set-key key func)) |
| 794 | 794 | ||
| 795 | (defun tpu-current-line nil | 795 | (defun tpu-current-line () |
| 796 | "Return the vertical position of point in the selected window. | 796 | "Return the vertical position of point in the selected window. |
| 797 | Top line is 0. Counts each text line only once, even if it wraps." | 797 | Top line is 0. Counts each text line only once, even if it wraps." |
| 798 | (+ (count-lines (window-start) (point)) (if (= (current-column) 0) 1 0) -1)) | 798 | (or |
| 799 | (cdr (nth 6 (posn-at-point))) | ||
| 800 | (if (eq (window-start) (point)) 0 | ||
| 801 | (1- (count-screen-lines (window-start) (point) 'count-final-newline))))) | ||
| 799 | 802 | ||
| 800 | 803 | ||
| 801 | ;;; | 804 | ;;; |
| @@ -2422,6 +2425,7 @@ If FILE is nil, try to load a default file. The default file names are | |||
| 2422 | (if (eq tpu-global-map parent) | 2425 | (if (eq tpu-global-map parent) |
| 2423 | (set-keymap-parent map (keymap-parent parent)) | 2426 | (set-keymap-parent map (keymap-parent parent)) |
| 2424 | (setq map parent))))) | 2427 | (setq map parent))))) |
| 2428 | (ad-disable-regexp "\\`tpu-") | ||
| 2425 | (setq tpu-edt-mode nil)) | 2429 | (setq tpu-edt-mode nil)) |
| 2426 | 2430 | ||
| 2427 | (provide 'tpu-edt) | 2431 | (provide 'tpu-edt) |
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 019896c0eb2..609ce2e203b 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el | |||
| @@ -141,13 +141,11 @@ the previous line when starting from a line beginning." | |||
| 141 | 141 | ||
| 142 | (add-hook 'picture-mode-hook 'tpu-set-cursor-free) | 142 | (add-hook 'picture-mode-hook 'tpu-set-cursor-free) |
| 143 | 143 | ||
| 144 | (defun tpu-write-file-hook nil | 144 | (defun tpu-before-save-hook () |
| 145 | "Eliminate whitespace at ends of lines, if the cursor is free." | 145 | "Eliminate whitespace at ends of lines, if the cursor is free." |
| 146 | (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends))) | 146 | (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends))) |
| 147 | 147 | ||
| 148 | (or (memq 'tpu-write-file-hook write-file-functions) | 148 | (add-hook 'before-save-hook 'tpu-before-save-hook) |
| 149 | (setq write-file-functions | ||
| 150 | (cons 'tpu-write-file-hook write-file-functions))) | ||
| 151 | 149 | ||
| 152 | 150 | ||
| 153 | ;;; Utility routines for implementing scroll margins | 151 | ;;; Utility routines for implementing scroll margins |
| @@ -246,7 +244,7 @@ Accepts a prefix argument for the number of lines to move." | |||
| 246 | (end-of-line (- 1 num)))) | 244 | (end-of-line (- 1 num)))) |
| 247 | (tpu-top-check beg num))) | 245 | (tpu-top-check beg num))) |
| 248 | 246 | ||
| 249 | (defun tpu-current-end-of-line nil | 247 | (defun tpu-current-end-of-line () |
| 250 | "Move point to end of current line." | 248 | "Move point to end of current line." |
| 251 | (interactive) | 249 | (interactive) |
| 252 | (let ((beg (point))) | 250 | (let ((beg (point))) |
| @@ -392,41 +390,24 @@ A repeat count means scroll that many sections." | |||
| 392 | 390 | ||
| 393 | 391 | ||
| 394 | 392 | ||
| 395 | ;;; Replace the newline, newline-and-indent, and do-auto-fill functions | 393 | ;; Advise the newline, newline-and-indent, and do-auto-fill functions. |
| 396 | 394 | (defadvice newline (around tpu-respect-bottom-scroll-margin activate disable) | |
| 397 | (or (fboundp 'tpu-old-newline) | 395 | "Respect `tpu-bottom-scroll-margin'." |
| 398 | (fset 'tpu-old-newline (symbol-function 'newline))) | 396 | (let ((beg (tpu-current-line)) |
| 399 | (or (fboundp 'tpu-old-do-auto-fill) | 397 | (num (prefix-numeric-value (ad-get-arg 0)))) |
| 400 | (fset 'tpu-old-do-auto-fill (symbol-function 'do-auto-fill))) | 398 | ad-do-it |
| 401 | (or (fboundp 'tpu-old-newline-and-indent) | ||
| 402 | (fset 'tpu-old-newline-and-indent (symbol-function 'newline-and-indent))) | ||
| 403 | |||
| 404 | (defun newline (&optional num) | ||
| 405 | "Insert a newline. With arg, insert that many newlines. | ||
| 406 | In Auto Fill mode, can break the preceding line if no numeric arg. | ||
| 407 | This is the TPU-edt version that respects the bottom scroll margin." | ||
| 408 | (interactive "p") | ||
| 409 | (let ((beg (tpu-current-line))) | ||
| 410 | (or num (setq num 1)) | ||
| 411 | (tpu-old-newline num) | ||
| 412 | (tpu-bottom-check beg num))) | 399 | (tpu-bottom-check beg num))) |
| 413 | 400 | ||
| 414 | (defun newline-and-indent nil | 401 | (defadvice newline-and-indent (around tpu-respect-bottom-scroll-margin) |
| 415 | "Insert a newline, then indent according to major mode. | 402 | "Respect `tpu-bottom-scroll-margin'." |
| 416 | Indentation is done using the current indent-line-function. | ||
| 417 | In programming language modes, this is the same as TAB. | ||
| 418 | In some text modes, where TAB inserts a tab, this indents | ||
| 419 | to the specified left-margin column. This is the TPU-edt | ||
| 420 | version that respects the bottom scroll margin." | ||
| 421 | (interactive) | ||
| 422 | (let ((beg (tpu-current-line))) | 403 | (let ((beg (tpu-current-line))) |
| 423 | (tpu-old-newline-and-indent) | 404 | ad-do-it |
| 424 | (tpu-bottom-check beg 1))) | 405 | (tpu-bottom-check beg 1))) |
| 425 | 406 | ||
| 426 | (defun do-auto-fill nil | 407 | (defadvice do-auto-fill (around tpu-respect-bottom-scroll-margin) |
| 427 | "TPU-edt version that respects the bottom scroll margin." | 408 | "Respect `tpu-bottom-scroll-margin'." |
| 428 | (let ((beg (tpu-current-line))) | 409 | (let ((beg (tpu-current-line))) |
| 429 | (tpu-old-do-auto-fill) | 410 | ad-do-it |
| 430 | (tpu-bottom-check beg 1))) | 411 | (tpu-bottom-check beg 1))) |
| 431 | 412 | ||
| 432 | 413 | ||
| @@ -440,18 +421,21 @@ version that respects the bottom scroll margin." | |||
| 440 | \nsEnter bottom scroll margin (N lines or N%% or RETURN for current value): ") | 421 | \nsEnter bottom scroll margin (N lines or N%% or RETURN for current value): ") |
| 441 | ;; set top scroll margin | 422 | ;; set top scroll margin |
| 442 | (or (string= top "") | 423 | (or (string= top "") |
| 443 | (if (string= "%" (substring top -1)) | 424 | (setq tpu-top-scroll-margin |
| 444 | (setq tpu-top-scroll-margin (string-to-number top)) | 425 | (if (string= "%" (substring top -1)) |
| 445 | (setq tpu-top-scroll-margin | 426 | (string-to-number top) |
| 446 | (/ (1- (+ (* (string-to-number top) 100) (window-height))) | 427 | (/ (1- (+ (* (string-to-number top) 100) (window-height))) |
| 447 | (window-height))))) | 428 | (window-height))))) |
| 448 | ;; set bottom scroll margin | 429 | ;; set bottom scroll margin |
| 449 | (or (string= bottom "") | 430 | (or (string= bottom "") |
| 450 | (if (string= "%" (substring bottom -1)) | 431 | (setq tpu-bottom-scroll-margin |
| 451 | (setq tpu-bottom-scroll-margin (string-to-number bottom)) | 432 | (if (string= "%" (substring bottom -1)) |
| 452 | (setq tpu-bottom-scroll-margin | 433 | (string-to-number bottom) |
| 453 | (/ (1- (+ (* (string-to-number bottom) 100) (window-height))) | 434 | (/ (1- (+ (* (string-to-number bottom) 100) (window-height))) |
| 454 | (window-height))))) | 435 | (window-height))))) |
| 436 | (dolist (f '(newline newline-and-indent do-auto-fill)) | ||
| 437 | (ad-enable-advice f 'around 'tpu-respect-bottom-scroll-margin) | ||
| 438 | (ad-activate f)) | ||
| 455 | ;; report scroll margin settings if running interactively | 439 | ;; report scroll margin settings if running interactively |
| 456 | (and (interactive-p) | 440 | (and (interactive-p) |
| 457 | (message "Scroll margins set. Top = %s%%, Bottom = %s%%" | 441 | (message "Scroll margins set. Top = %s%%, Bottom = %s%%" |
| @@ -461,7 +445,7 @@ version that respects the bottom scroll margin." | |||
| 461 | ;;; Functions to set cursor bound or free | 445 | ;;; Functions to set cursor bound or free |
| 462 | 446 | ||
| 463 | ;;;###autoload | 447 | ;;;###autoload |
| 464 | (defun tpu-set-cursor-free nil | 448 | (defun tpu-set-cursor-free () |
| 465 | "Allow the cursor to move freely about the screen." | 449 | "Allow the cursor to move freely about the screen." |
| 466 | (interactive) | 450 | (interactive) |
| 467 | (setq tpu-cursor-free t) | 451 | (setq tpu-cursor-free t) |
| @@ -471,7 +455,7 @@ version that respects the bottom scroll margin." | |||
| 471 | (message "The cursor will now move freely about the screen.")) | 455 | (message "The cursor will now move freely about the screen.")) |
| 472 | 456 | ||
| 473 | ;;;###autoload | 457 | ;;;###autoload |
| 474 | (defun tpu-set-cursor-bound nil | 458 | (defun tpu-set-cursor-bound () |
| 475 | "Constrain the cursor to the flow of the text." | 459 | "Constrain the cursor to the flow of the text." |
| 476 | (interactive) | 460 | (interactive) |
| 477 | (tpu-trim-line-ends) | 461 | (tpu-trim-line-ends) |
| @@ -481,5 +465,5 @@ version that respects the bottom scroll margin." | |||
| 481 | GOLD-map) | 465 | GOLD-map) |
| 482 | (message "The cursor is now bound to the flow of your text.")) | 466 | (message "The cursor is now bound to the flow of your text.")) |
| 483 | 467 | ||
| 484 | ;;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a | 468 | ;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a |
| 485 | ;;; tpu-extras.el ends here | 469 | ;;; tpu-extras.el ends here |
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 54fb2d1e997..977a7980803 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el | |||
| @@ -788,7 +788,7 @@ The given COUNT is remembered for future scrollings." | |||
| 788 | "Go down count lines, try to keep at the same column." | 788 | "Go down count lines, try to keep at the same column." |
| 789 | (interactive "p") | 789 | (interactive "p") |
| 790 | (setq this-command 'next-line) ; this is a needed trick | 790 | (setq this-command 'next-line) ; this is a needed trick |
| 791 | (if (= (point) (or (line-move count) (point))) | 791 | (if (= (point) (progn (line-move count) (point))) |
| 792 | (ding) ; no moving, already at end of buffer | 792 | (ding) ; no moving, already at end of buffer |
| 793 | (setq last-command 'next-line))) | 793 | (setq last-command 'next-line))) |
| 794 | 794 | ||
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index a5b2a8100a8..43f4c230d14 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * erc-log.el, erc.el: Replace `iff' in doc-strings and comments. | ||
| 4 | |||
| 1 | 2007-07-30 Michael Olson <mwolson@gnu.org> | 5 | 2007-07-30 Michael Olson <mwolson@gnu.org> |
| 2 | 6 | ||
| 3 | * erc-nicklist.el: Remove from the Emacs source tree. This file | 7 | * erc-nicklist.el: Remove from the Emacs source tree. This file |
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 194f8ae6bf1..88132afae0c 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el | |||
| @@ -261,7 +261,7 @@ The current buffer is given by BUFFER." | |||
| 261 | 261 | ||
| 262 | (defun erc-log-all-but-server-buffers (buffer) | 262 | (defun erc-log-all-but-server-buffers (buffer) |
| 263 | "Returns t if logging should be enabled in BUFFER. | 263 | "Returns t if logging should be enabled in BUFFER. |
| 264 | Returns nil iff `erc-server-buffer-p' returns t." | 264 | Returns nil if `erc-server-buffer-p' returns t." |
| 265 | (save-excursion | 265 | (save-excursion |
| 266 | (save-window-excursion | 266 | (save-window-excursion |
| 267 | (set-buffer buffer) | 267 | (set-buffer buffer) |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index d5a823ac825..c26bdf2a19f 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -3958,7 +3958,7 @@ and always returns t." | |||
| 3958 | (defun erc-echo-notice-in-target-buffer (s parsed buffer sender) | 3958 | (defun erc-echo-notice-in-target-buffer (s parsed buffer sender) |
| 3959 | "Echos a private notice in BUFFER, if BUFFER is non-nil. This | 3959 | "Echos a private notice in BUFFER, if BUFFER is non-nil. This |
| 3960 | function is designed to be added to either `erc-echo-notice-hook' | 3960 | function is designed to be added to either `erc-echo-notice-hook' |
| 3961 | or `erc-echo-notice-always-hook', and returns non-nil iff BUFFER | 3961 | or `erc-echo-notice-always-hook', and returns non-nil if BUFFER |
| 3962 | is non-nil." | 3962 | is non-nil." |
| 3963 | (if buffer | 3963 | (if buffer |
| 3964 | (progn (erc-display-message parsed nil buffer s) t) | 3964 | (progn (erc-display-message parsed nil buffer s) t) |
| @@ -3982,7 +3982,7 @@ designed to be added to either `erc-echo-notice-hook' or | |||
| 3982 | "Echos a private notice in the active buffer if the active | 3982 | "Echos a private notice in the active buffer if the active |
| 3983 | buffer is not the server buffer. This function is designed to be | 3983 | buffer is not the server buffer. This function is designed to be |
| 3984 | added to either `erc-echo-notice-hook' or | 3984 | added to either `erc-echo-notice-hook' or |
| 3985 | `erc-echo-notice-always-hook', and returns non-nil iff the active | 3985 | `erc-echo-notice-always-hook', and returns non-nil if the active |
| 3986 | buffer is not the server buffer." | 3986 | buffer is not the server buffer." |
| 3987 | (if (not (eq (erc-server-buffer) (erc-active-buffer))) | 3987 | (if (not (eq (erc-server-buffer) (erc-active-buffer))) |
| 3988 | (progn (erc-display-message parsed nil 'active s) t) | 3988 | (progn (erc-display-message parsed nil 'active s) t) |
| @@ -3999,7 +3999,7 @@ designed to be added to either `erc-echo-notice-hook' or | |||
| 3999 | "Echos a private notice in all of the buffers for which SENDER | 3999 | "Echos a private notice in all of the buffers for which SENDER |
| 4000 | is a member. This function is designed to be added to either | 4000 | is a member. This function is designed to be added to either |
| 4001 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and | 4001 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and |
| 4002 | returns non-nil iff there is at least one buffer for which the | 4002 | returns non-nil if there is at least one buffer for which the |
| 4003 | sender is a member. | 4003 | sender is a member. |
| 4004 | 4004 | ||
| 4005 | See also: `erc-echo-notice-in-first-user-buffer', | 4005 | See also: `erc-echo-notice-in-first-user-buffer', |
| @@ -4013,7 +4013,7 @@ See also: `erc-echo-notice-in-first-user-buffer', | |||
| 4013 | "Echos a private notice in BUFFER and in all of the buffers for | 4013 | "Echos a private notice in BUFFER and in all of the buffers for |
| 4014 | which SENDER is a member. This function is designed to be added | 4014 | which SENDER is a member. This function is designed to be added |
| 4015 | to either `erc-echo-notice-hook' or | 4015 | to either `erc-echo-notice-hook' or |
| 4016 | `erc-echo-notice-always-hook', and returns non-nil iff there is | 4016 | `erc-echo-notice-always-hook', and returns non-nil if there is |
| 4017 | at least one buffer for which the sender is a member or the | 4017 | at least one buffer for which the sender is a member or the |
| 4018 | default target. | 4018 | default target. |
| 4019 | 4019 | ||
| @@ -4029,7 +4029,7 @@ See also: `erc-echo-notice-in-user-buffers', | |||
| 4029 | "Echos a private notice in one of the buffers for which SENDER | 4029 | "Echos a private notice in one of the buffers for which SENDER |
| 4030 | is a member. This function is designed to be added to either | 4030 | is a member. This function is designed to be added to either |
| 4031 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and | 4031 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and |
| 4032 | returns non-nil iff there is at least one buffer for which the | 4032 | returns non-nil if there is at least one buffer for which the |
| 4033 | sender is a member. | 4033 | sender is a member. |
| 4034 | 4034 | ||
| 4035 | See also: `erc-echo-notice-in-user-buffers', | 4035 | See also: `erc-echo-notice-in-user-buffers', |
| @@ -4938,7 +4938,7 @@ Specifically, return the position of `erc-insert-marker'." | |||
| 4938 | (defun erc-send-input (input) | 4938 | (defun erc-send-input (input) |
| 4939 | "Treat INPUT as typed in by the user. It is assumed that the input | 4939 | "Treat INPUT as typed in by the user. It is assumed that the input |
| 4940 | and the prompt is already deleted. | 4940 | and the prompt is already deleted. |
| 4941 | This returns non-nil only iff we actually send anything." | 4941 | This returns non-nil only if we actually send anything." |
| 4942 | ;; Handle different kinds of inputs | 4942 | ;; Handle different kinds of inputs |
| 4943 | (cond | 4943 | (cond |
| 4944 | ;; Ignore empty input | 4944 | ;; Ignore empty input |
diff --git a/lisp/files.el b/lisp/files.el index 9cc64284d15..94a8c383c5a 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1937,7 +1937,7 @@ since only a single case-insensitive search through the alist is made." | |||
| 1937 | ;; c++-mode, java-mode and more) are added through autoload | 1937 | ;; c++-mode, java-mode and more) are added through autoload |
| 1938 | ;; directives in that file. That way is discouraged since it | 1938 | ;; directives in that file. That way is discouraged since it |
| 1939 | ;; spreads out the definition of the initial value. | 1939 | ;; spreads out the definition of the initial value. |
| 1940 | (mapc | 1940 | (mapcar |
| 1941 | (lambda (elt) | 1941 | (lambda (elt) |
| 1942 | (cons (purecopy (car elt)) (cdr elt))) | 1942 | (cons (purecopy (car elt)) (cdr elt))) |
| 1943 | `(;; do this first, so that .html.pl is Polish html, not Perl | 1943 | `(;; do this first, so that .html.pl is Polish html, not Perl |
| @@ -2310,7 +2310,12 @@ we don't actually set it to the same mode the buffer already has." | |||
| 2310 | ;; Next compare the filename against the entries in auto-mode-alist. | 2310 | ;; Next compare the filename against the entries in auto-mode-alist. |
| 2311 | (unless done | 2311 | (unless done |
| 2312 | (if buffer-file-name | 2312 | (if buffer-file-name |
| 2313 | (let ((name buffer-file-name)) | 2313 | (let ((name buffer-file-name) |
| 2314 | (remote-id (file-remote-p buffer-file-name))) | ||
| 2315 | ;; Remove remote file name identification. | ||
| 2316 | (when (and (stringp remote-id) | ||
| 2317 | (string-match (regexp-quote remote-id) name)) | ||
| 2318 | (setq name (substring name (match-end 0)))) | ||
| 2314 | ;; Remove backup-suffixes from file name. | 2319 | ;; Remove backup-suffixes from file name. |
| 2315 | (setq name (file-name-sans-versions name)) | 2320 | (setq name (file-name-sans-versions name)) |
| 2316 | (while name | 2321 | (while name |
| @@ -3988,8 +3993,9 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'." | |||
| 3988 | 3993 | ||
| 3989 | (defun toggle-read-only (&optional arg) | 3994 | (defun toggle-read-only (&optional arg) |
| 3990 | "Change whether this buffer is visiting its file read-only. | 3995 | "Change whether this buffer is visiting its file read-only. |
| 3991 | With arg, set read-only iff arg is positive. | 3996 | With prefix argument ARG, make the buffer read-only if ARG is |
| 3992 | If visiting file read-only and `view-read-only' is non-nil, enter view mode." | 3997 | positive, otherwise make it writable. If visiting file read-only |
| 3998 | and `view-read-only' is non-nil, enter view mode." | ||
| 3993 | (interactive "P") | 3999 | (interactive "P") |
| 3994 | (if (and arg | 4000 | (if (and arg |
| 3995 | (if (> (prefix-numeric-value arg) 0) buffer-read-only | 4001 | (if (> (prefix-numeric-value arg) 0) buffer-read-only |
| @@ -4632,7 +4638,7 @@ FILENAME should lack slashes. You can redefine this for customization." | |||
| 4632 | 4638 | ||
| 4633 | (defun wildcard-to-regexp (wildcard) | 4639 | (defun wildcard-to-regexp (wildcard) |
| 4634 | "Given a shell file name pattern WILDCARD, return an equivalent regexp. | 4640 | "Given a shell file name pattern WILDCARD, return an equivalent regexp. |
| 4635 | The generated regexp will match a filename iff the filename | 4641 | The generated regexp will match a filename only if the filename |
| 4636 | matches that wildcard according to shell rules. Only wildcards known | 4642 | matches that wildcard according to shell rules. Only wildcards known |
| 4637 | by `sh' are supported." | 4643 | by `sh' are supported." |
| 4638 | (let* ((i (string-match "[[.*+\\^$?]" wildcard)) | 4644 | (let* ((i (string-match "[[.*+\\^$?]" wildcard)) |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 32a63e598d7..e254b040ce7 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -355,7 +355,7 @@ Each element in a user-level keywords list should have one of these forms: | |||
| 355 | 355 | ||
| 356 | where MATCHER can be either the regexp to search for, or the function name to | 356 | where MATCHER can be either the regexp to search for, or the function name to |
| 357 | call to make the search (called with one argument, the limit of the search; | 357 | call to make the search (called with one argument, the limit of the search; |
| 358 | it should return non-nil, move point, and set `match-data' appropriately iff | 358 | it should return non-nil, move point, and set `match-data' appropriately if |
| 359 | it succeeds; like `re-search-forward' would). | 359 | it succeeds; like `re-search-forward' would). |
| 360 | MATCHER regexps can be generated via the function `regexp-opt'. | 360 | MATCHER regexps can be generated via the function `regexp-opt'. |
| 361 | 361 | ||
| @@ -1068,7 +1068,7 @@ that tries to find such elements and move the boundaries such that they do | |||
| 1068 | not fall in the middle of one. | 1068 | not fall in the middle of one. |
| 1069 | Each function is called with no argument; it is expected to adjust the | 1069 | Each function is called with no argument; it is expected to adjust the |
| 1070 | dynamically bound variables `font-lock-beg' and `font-lock-end'; and return | 1070 | dynamically bound variables `font-lock-beg' and `font-lock-end'; and return |
| 1071 | non-nil iff it did make such an adjustment. | 1071 | non-nil if it did make such an adjustment. |
| 1072 | These functions are run in turn repeatedly until they all return nil. | 1072 | These functions are run in turn repeatedly until they all return nil. |
| 1073 | Put first the functions more likely to cause a change and cheaper to compute.") | 1073 | Put first the functions more likely to cause a change and cheaper to compute.") |
| 1074 | ;; Mark it as a special hook which doesn't use any global setting | 1074 | ;; Mark it as a special hook which doesn't use any global setting |
| @@ -1746,7 +1746,7 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to | |||
| 1746 | "Set fontification defaults appropriately for this mode. | 1746 | "Set fontification defaults appropriately for this mode. |
| 1747 | Sets various variables using `font-lock-defaults' (or, if nil, using | 1747 | Sets various variables using `font-lock-defaults' (or, if nil, using |
| 1748 | `font-lock-defaults-alist') and `font-lock-maximum-decoration'." | 1748 | `font-lock-defaults-alist') and `font-lock-maximum-decoration'." |
| 1749 | ;; Set fontification defaults iff not previously set for correct major mode. | 1749 | ;; Set fontification defaults if not previously set for correct major mode. |
| 1750 | (unless (and font-lock-set-defaults | 1750 | (unless (and font-lock-set-defaults |
| 1751 | (eq font-lock-mode-major-mode major-mode)) | 1751 | (eq font-lock-mode-major-mode major-mode)) |
| 1752 | (setq font-lock-mode-major-mode major-mode) | 1752 | (setq font-lock-mode-major-mode major-mode) |
diff --git a/lisp/format.el b/lisp/format.el index af708bd9a0c..d18afd7e8be 100644 --- a/lisp/format.el +++ b/lisp/format.el | |||
| @@ -420,13 +420,34 @@ a list (ABSOLUTE-FILE-NAME SIZE)." | |||
| 420 | (fmt (format-read (format "Read file `%s' in format: " | 420 | (fmt (format-read (format "Read file `%s' in format: " |
| 421 | (file-name-nondirectory file))))) | 421 | (file-name-nondirectory file))))) |
| 422 | (list file fmt))) | 422 | (list file fmt))) |
| 423 | (let (value size) | 423 | (let (value size old-undo) |
| 424 | (let ((format-alist nil)) | 424 | ;; Record only one undo entry for the insertion. Inhibit point-motion and |
| 425 | (setq value (insert-file-contents filename nil beg end)) | 425 | ;; modification hooks as with `insert-file-contents'. |
| 426 | (setq size (nth 1 value))) | 426 | (let ((inhibit-point-motion-hooks t) |
| 427 | (if format | 427 | (inhibit-modification-hooks t)) |
| 428 | (setq size (format-decode format size) | 428 | ;; Don't bind `buffer-undo-list' to t here to assert that |
| 429 | value (list (car value) size))) | 429 | ;; `insert-file-contents' may record whether the buffer was unmodified |
| 430 | ;; before. | ||
| 431 | (let ((format-alist nil)) | ||
| 432 | (setq value (insert-file-contents filename nil beg end)) | ||
| 433 | (setq size (nth 1 value))) | ||
| 434 | (when (consp buffer-undo-list) | ||
| 435 | (let ((head (car buffer-undo-list))) | ||
| 436 | (when (and (consp head) | ||
| 437 | (equal (car head) (point)) | ||
| 438 | (equal (cdr head) (+ (point) size))) | ||
| 439 | ;; Remove first entry from `buffer-undo-list', we shall insert | ||
| 440 | ;; another one below. | ||
| 441 | (setq old-undo (cdr buffer-undo-list))))) | ||
| 442 | (when format | ||
| 443 | (let ((buffer-undo-list t)) | ||
| 444 | (setq size (format-decode format size) | ||
| 445 | value (list (car value) size))) | ||
| 446 | (unless (eq buffer-undo-list t) | ||
| 447 | (setq buffer-undo-list | ||
| 448 | (cons (cons (point) (+ (point) size)) old-undo))))) | ||
| 449 | (unless inhibit-modification-hooks | ||
| 450 | (run-hook-with-args 'after-change-functions (point) (+ (point) size) 0)) | ||
| 430 | value)) | 451 | value)) |
| 431 | 452 | ||
| 432 | (defun format-read (&optional prompt) | 453 | (defun format-read (&optional prompt) |
diff --git a/lisp/frame.el b/lisp/frame.el index 863524d8add..3246efc31a1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1332,9 +1332,9 @@ itself as a pre-command hook." | |||
| 1332 | 1332 | ||
| 1333 | (define-minor-mode blink-cursor-mode | 1333 | (define-minor-mode blink-cursor-mode |
| 1334 | "Toggle blinking cursor mode. | 1334 | "Toggle blinking cursor mode. |
| 1335 | With a numeric argument, turn blinking cursor mode on iff ARG is positive. | 1335 | With a numeric argument, turn blinking cursor mode on if ARG is positive, |
| 1336 | When blinking cursor mode is enabled, the cursor of the selected | 1336 | otherwise turn it off. When blinking cursor mode is enabled, the |
| 1337 | window blinks. | 1337 | cursor of the selected window blinks. |
| 1338 | 1338 | ||
| 1339 | Note that this command is effective only when Emacs | 1339 | Note that this command is effective only when Emacs |
| 1340 | displays through a window system, because then Emacs does its own | 1340 | displays through a window system, because then Emacs does its own |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 83ca62ca0de..7fd187a4aeb 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2007-08-10 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * nntp.el (nntp-xref-number-is-evil): New server variable. | ||
| 4 | (nntp-find-group-and-number): If it is non-nil, don't trust article | ||
| 5 | numbers in the Xref header. | ||
| 6 | |||
| 7 | 2007-08-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 8 | |||
| 9 | * gnus-ems.el (gnus-x-splash): Bind inhibit-read-only to t. | ||
| 10 | |||
| 11 | 2007-08-04 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 12 | |||
| 13 | * gnus-art.el (article-hide-headers): Bind inhibit-read-only to t. | ||
| 14 | |||
| 15 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 16 | |||
| 17 | * gmm-utils.el, gnus-async.el, gnus-msg.el, gnus-score.el | ||
| 18 | * gnus-util.el, imap.el, mailcap.el, nnimap.el: Replace `iff' in | ||
| 19 | doc-strings and comments. | ||
| 20 | |||
| 1 | 2007-07-25 Glenn Morris <rgm@gnu.org> | 21 | 2007-07-25 Glenn Morris <rgm@gnu.org> |
| 2 | 22 | ||
| 3 | * Relicense all FSF files to GPLv3 or later. | 23 | * Relicense all FSF files to GPLv3 or later. |
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index d7e3c344b0e..71a0662f35a 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el | |||
| @@ -79,7 +79,7 @@ ARGS are passed to `message'." | |||
| 79 | 79 | ||
| 80 | ;;;###autoload | 80 | ;;;###autoload |
| 81 | (defun gmm-widget-p (symbol) | 81 | (defun gmm-widget-p (symbol) |
| 82 | "Non-nil iff SYMBOL is a widget." | 82 | "Non-nil if SYMBOL is a widget." |
| 83 | (get symbol 'widget-type)) | 83 | (get symbol 'widget-type)) |
| 84 | 84 | ||
| 85 | ;; Copy of the `nnmail-lazy' code from `nnmail.el': | 85 | ;; Copy of the `nnmail-lazy' code from `nnmail.el': |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 40de10187f3..6ccba3b108f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1743,7 +1743,7 @@ Initialized from `text-mode-syntax-table.") | |||
| 1743 | (interactive) | 1743 | (interactive) |
| 1744 | ;; This function might be inhibited. | 1744 | ;; This function might be inhibited. |
| 1745 | (unless gnus-inhibit-hiding | 1745 | (unless gnus-inhibit-hiding |
| 1746 | (let ((inhibit-read-only nil) | 1746 | (let ((inhibit-read-only t) |
| 1747 | (case-fold-search t) | 1747 | (case-fold-search t) |
| 1748 | (max (1+ (length gnus-sorted-header-list))) | 1748 | (max (1+ (length gnus-sorted-header-list))) |
| 1749 | (inhibit-point-motion-hooks t) | 1749 | (inhibit-point-motion-hooks t) |
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 3493d51950d..a06724855c5 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el | |||
| @@ -320,7 +320,7 @@ It should return non-nil if the article is to be prefetched." | |||
| 320 | (pop alist)))))) | 320 | (pop alist)))))) |
| 321 | 321 | ||
| 322 | (defun gnus-async-prefetched-article-entry (group article) | 322 | (defun gnus-async-prefetched-article-entry (group article) |
| 323 | "Return the entry for ARTICLE in GROUP iff it has been prefetched." | 323 | "Return the entry for ARTICLE in GROUP if it has been prefetched." |
| 324 | (let ((entry (save-excursion | 324 | (let ((entry (save-excursion |
| 325 | (gnus-async-set-buffer) | 325 | (gnus-async-set-buffer) |
| 326 | (assq (intern (format "%s-%d" group article) | 326 | (assq (intern (format "%s-%d" group article) |
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index bacf5581e0d..88190b8085b 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el | |||
| @@ -179,7 +179,7 @@ | |||
| 179 | (interactive-p)) | 179 | (interactive-p)) |
| 180 | "*gnus-x-splash*" | 180 | "*gnus-x-splash*" |
| 181 | gnus-group-buffer))) | 181 | gnus-group-buffer))) |
| 182 | (let ((inhibit-read-only nil) | 182 | (let ((inhibit-read-only t) |
| 183 | (file (nnheader-find-etc-directory "images/gnus/x-splash" t)) | 183 | (file (nnheader-find-etc-directory "images/gnus/x-splash" t)) |
| 184 | pixmap fcw fch width height fringes sbars left yoffset top ls) | 184 | pixmap fcw fch width height fringes sbars left yoffset top ls) |
| 185 | (erase-buffer) | 185 | (erase-buffer) |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index c9aedab7019..f8e4a7a67d0 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -260,15 +260,15 @@ See also the `mml-default-encrypt-method' variable." | |||
| 260 | This is done because new users often reply by mistake when reading | 260 | This is done because new users often reply by mistake when reading |
| 261 | news. | 261 | news. |
| 262 | This can also be a function receiving the group name as the only | 262 | This can also be a function receiving the group name as the only |
| 263 | parameter which should return non-nil iff a confirmation is needed, or | 263 | parameter, which should return non-nil if a confirmation is needed; or |
| 264 | a regexp, in which case a confirmation is asked for iff the group name | 264 | a regexp, in which case a confirmation is asked for if the group name |
| 265 | matches the regexp." | 265 | matches the regexp." |
| 266 | :version "22.1" | 266 | :version "22.1" |
| 267 | :group 'gnus-message | 267 | :group 'gnus-message |
| 268 | :type '(choice (const :tag "No" nil) | 268 | :type '(choice (const :tag "No" nil) |
| 269 | (const :tag "Yes" t) | 269 | (const :tag "Yes" t) |
| 270 | (regexp :tag "Iff group matches regexp") | 270 | (regexp :tag "If group matches regexp") |
| 271 | (function :tag "Iff function evaluates to non-nil"))) | 271 | (function :tag "If function evaluates to non-nil"))) |
| 272 | 272 | ||
| 273 | (defcustom gnus-confirm-treat-mail-like-news | 273 | (defcustom gnus-confirm-treat-mail-like-news |
| 274 | nil | 274 | nil |
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index e833c8ccc6a..f7ba9222937 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el | |||
| @@ -381,7 +381,7 @@ If nil, the user will be asked for a match type." | |||
| 381 | (const :tag "ask" nil))) | 381 | (const :tag "ask" nil))) |
| 382 | 382 | ||
| 383 | (defcustom gnus-score-default-fold nil | 383 | (defcustom gnus-score-default-fold nil |
| 384 | "Use case folding for new score file entries iff not nil." | 384 | "Non-nil means use case folding for new score file entries." |
| 385 | :group 'gnus-score-default | 385 | :group 'gnus-score-default |
| 386 | :type 'boolean) | 386 | :type 'boolean) |
| 387 | 387 | ||
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index d065acd75ea..74aacdd2860 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1108,7 +1108,7 @@ Return the modified alist." | |||
| 1108 | `(setq ,alist (delq (,fun ,key ,alist) ,alist)))) | 1108 | `(setq ,alist (delq (,fun ,key ,alist) ,alist)))) |
| 1109 | 1109 | ||
| 1110 | (defun gnus-globalify-regexp (re) | 1110 | (defun gnus-globalify-regexp (re) |
| 1111 | "Return a regexp that matches a whole line, iff RE matches a part of it." | 1111 | "Return a regexp that matches a whole line, if RE matches a part of it." |
| 1112 | (concat (unless (string-match "^\\^" re) "^.*") | 1112 | (concat (unless (string-match "^\\^" re) "^.*") |
| 1113 | re | 1113 | re |
| 1114 | (unless (string-match "\\$$" re) ".*$"))) | 1114 | (unless (string-match "\\$$" re) ".*$"))) |
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index abe1c7e1c9e..f60801e9ba8 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el | |||
| @@ -1581,7 +1581,7 @@ is non-nil return these properties." | |||
| 1581 | (imap-mailbox-get-1 'search imap-current-mailbox))))) | 1581 | (imap-mailbox-get-1 'search imap-current-mailbox))))) |
| 1582 | 1582 | ||
| 1583 | (defun imap-message-flag-permanent-p (flag &optional mailbox buffer) | 1583 | (defun imap-message-flag-permanent-p (flag &optional mailbox buffer) |
| 1584 | "Return t iff FLAG can be permanently (between IMAP sessions) saved on articles, in MAILBOX on server in BUFFER." | 1584 | "Return t if FLAG can be permanently (between IMAP sessions) saved on articles, in MAILBOX on server in BUFFER." |
| 1585 | (with-current-buffer (or buffer (current-buffer)) | 1585 | (with-current-buffer (or buffer (current-buffer)) |
| 1586 | (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox)) | 1586 | (or (member "\\*" (imap-mailbox-get 'permanentflags mailbox)) |
| 1587 | (member flag (imap-mailbox-get 'permanentflags mailbox))))) | 1587 | (member flag (imap-mailbox-get 'permanentflags mailbox))))) |
diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 422b99d0e0f..e8b624aa546 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el | |||
| @@ -538,7 +538,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus | |||
| 538 | results))) | 538 | results))) |
| 539 | 539 | ||
| 540 | (defun mailcap-mailcap-entry-passes-test (info) | 540 | (defun mailcap-mailcap-entry-passes-test (info) |
| 541 | "Return non-nil iff mailcap entry INFO passes its test clause. | 541 | "Return non-nil if mailcap entry INFO passes its test clause. |
| 542 | Also return non-nil if no test clause is present." | 542 | Also return non-nil if no test clause is present." |
| 543 | (let ((test (assq 'test info)) ; The test clause | 543 | (let ((test (assq 'test info)) ; The test clause |
| 544 | status) | 544 | status) |
| @@ -631,7 +631,7 @@ Also return non-nil if no test clause is present." | |||
| 631 | (defvar mailcap-viewer-test-cache nil) | 631 | (defvar mailcap-viewer-test-cache nil) |
| 632 | 632 | ||
| 633 | (defun mailcap-viewer-passes-test (viewer-info type-info) | 633 | (defun mailcap-viewer-passes-test (viewer-info type-info) |
| 634 | "Return non-nil iff viewer specified by VIEWER-INFO passes its test clause. | 634 | "Return non-nil if viewer specified by VIEWER-INFO passes its test clause. |
| 635 | Also return non-nil if it has no test clause. TYPE-INFO is an argument | 635 | Also return non-nil if it has no test clause. TYPE-INFO is an argument |
| 636 | to supply to the test." | 636 | to supply to the test." |
| 637 | (let* ((test-info (assq 'test viewer-info)) | 637 | (let* ((test-info (assq 'test viewer-info)) |
| @@ -704,7 +704,7 @@ If TEST is not given, it defaults to t." | |||
| 704 | ;;; | 704 | ;;; |
| 705 | 705 | ||
| 706 | (defun mailcap-viewer-lessp (x y) | 706 | (defun mailcap-viewer-lessp (x y) |
| 707 | "Return t iff viewer X is more desirable than viewer Y." | 707 | "Return t if viewer X is more desirable than viewer Y." |
| 708 | (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) ""))) | 708 | (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) ""))) |
| 709 | (y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) ""))) | 709 | (y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) ""))) |
| 710 | (x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) "")))) | 710 | (x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) "")))) |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 235039c3ee9..ba23280658a 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -1645,7 +1645,7 @@ be used in a STORE FLAGS command." | |||
| 1645 | result))) | 1645 | result))) |
| 1646 | 1646 | ||
| 1647 | (defun nnimap-mark-permanent-p (mark &optional group) | 1647 | (defun nnimap-mark-permanent-p (mark &optional group) |
| 1648 | "Return t iff MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." | 1648 | "Return t if MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." |
| 1649 | (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) | 1649 | (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) |
| 1650 | 1650 | ||
| 1651 | (when nnimap-debug | 1651 | (when nnimap-debug |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 869213c9ae5..2623df58e4d 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -183,6 +183,14 @@ by one.") | |||
| 183 | If the gap between two consecutive articles is bigger than this | 183 | If the gap between two consecutive articles is bigger than this |
| 184 | variable, split the XOVER request into two requests.") | 184 | variable, split the XOVER request into two requests.") |
| 185 | 185 | ||
| 186 | (defvoo nntp-xref-number-is-evil nil | ||
| 187 | "*If non-nil, Gnus never trusts article numbers in the Xref header. | ||
| 188 | Some news servers, e.g., ones running Diablo, run multiple engines | ||
| 189 | having the same articles but article numbers are not kept synchronized | ||
| 190 | between them. If you connect to such a server, set this to a non-nil | ||
| 191 | value, and Gnus never uses article numbers (that appear in the Xref | ||
| 192 | header and vary by which engine is chosen) to refer to articles.") | ||
| 193 | |||
| 186 | (defvoo nntp-prepare-server-hook nil | 194 | (defvoo nntp-prepare-server-hook nil |
| 187 | "*Hook run before a server is opened. | 195 | "*Hook run before a server is opened. |
| 188 | If can be used to set up a server remotely, for instance. Say you | 196 | If can be used to set up a server remotely, for instance. Say you |
| @@ -1632,7 +1640,8 @@ password contained in '~/.nntp-authinfo'." | |||
| 1632 | (match-string 1 xref)) | 1640 | (match-string 1 xref)) |
| 1633 | (t ""))) | 1641 | (t ""))) |
| 1634 | (cond | 1642 | (cond |
| 1635 | ((and (setq xref (mail-fetch-field "xref")) | 1643 | ((and (not nntp-xref-number-is-evil) |
| 1644 | (setq xref (mail-fetch-field "xref")) | ||
| 1636 | (string-match | 1645 | (string-match |
| 1637 | (if group | 1646 | (if group |
| 1638 | (concat "\\(" (regexp-quote group) "\\):\\([0-9]+\\)") | 1647 | (concat "\\(" (regexp-quote group) "\\):\\([0-9]+\\)") |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 28ac693f870..1435eb019ec 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -461,9 +461,11 @@ that." | |||
| 461 | ;; An obvious case of a key substitution: | 461 | ;; An obvious case of a key substitution: |
| 462 | (save-excursion | 462 | (save-excursion |
| 463 | (while (re-search-forward | 463 | (while (re-search-forward |
| 464 | ;; Assume command name is only word characters | 464 | ;; Assume command name is only word and symbol |
| 465 | ;; and dashes to get things like `use M-x foo.'. | 465 | ;; characters to get things like `use M-x foo->bar'. |
| 466 | "\\<M-x\\s-+\\(\\sw\\(\\sw\\|-\\)+\\)" nil t) | 466 | ;; Command required to end with word constituent |
| 467 | ;; to avoid `.' at end of a sentence. | ||
| 468 | "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)*\\sw\\)" nil t) | ||
| 467 | (let ((sym (intern-soft (match-string 1)))) | 469 | (let ((sym (intern-soft (match-string 1)))) |
| 468 | (if (fboundp sym) | 470 | (if (fboundp sym) |
| 469 | (help-xref-button 1 'help-function sym))))) | 471 | (help-xref-button 1 'help-function sym))))) |
| @@ -489,7 +491,7 @@ that." | |||
| 489 | (end-of-line) | 491 | (end-of-line) |
| 490 | (skip-chars-backward "^ \t\n") | 492 | (skip-chars-backward "^ \t\n") |
| 491 | (if (and (>= (current-column) col) | 493 | (if (and (>= (current-column) col) |
| 492 | (looking-at "\\(\\sw\\|-\\)+$")) | 494 | (looking-at "\\(\\sw\\|\\s_\\)+$")) |
| 493 | (let ((sym (intern-soft (match-string 0)))) | 495 | (let ((sym (intern-soft (match-string 0)))) |
| 494 | (if (fboundp sym) | 496 | (if (fboundp sym) |
| 495 | (help-xref-button 0 'help-function sym)))) | 497 | (help-xref-button 0 'help-function sym)))) |
diff --git a/lisp/help.el b/lisp/help.el index f75e26f93e6..4a94fd35bc7 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -958,14 +958,14 @@ This applies to `help', `apropos' and `completion' buffers, and some others." | |||
| 958 | (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) | 958 | (remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window))) |
| 959 | 959 | ||
| 960 | (defun resize-temp-buffer-window () | 960 | (defun resize-temp-buffer-window () |
| 961 | "Resize the current window to fit its contents. | 961 | "Resize the selected window to fit its contents. |
| 962 | Will not make it higher than `temp-buffer-max-height' nor smaller than | 962 | Will not make it higher than `temp-buffer-max-height' nor smaller than |
| 963 | `window-min-height'. Do nothing if it is the only window on its frame, if it | 963 | `window-min-height'. Do nothing if it is the only window on its frame, if it |
| 964 | is not as wide as the frame or if some of the window's contents are scrolled | 964 | is not as wide as the frame or if some of the window's contents are scrolled |
| 965 | out of view." | 965 | out of view." |
| 966 | (unless (or (one-window-p 'nomini) | 966 | (unless (or (one-window-p 'nomini) |
| 967 | (not (pos-visible-in-window-p (point-min))) | 967 | (not (pos-visible-in-window-p (point-min))) |
| 968 | (/= (frame-width) (window-width))) | 968 | (not (window-full-width-p))) |
| 969 | (fit-window-to-buffer | 969 | (fit-window-to-buffer |
| 970 | (selected-window) | 970 | (selected-window) |
| 971 | (if (functionp temp-buffer-max-height) | 971 | (if (functionp temp-buffer-max-height) |
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index b1238b66419..a167b2bc1e7 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el | |||
| @@ -131,7 +131,7 @@ | |||
| 131 | ;; an example, if the value is `buffer-file-name' then all buffers | 131 | ;; an example, if the value is `buffer-file-name' then all buffers |
| 132 | ;; who are visiting files are suitable, but others (like dired | 132 | ;; who are visiting files are suitable, but others (like dired |
| 133 | ;; buffers) are not; | 133 | ;; buffers) are not; |
| 134 | ;; * a list -- then the buffer is suitable iff its mode is in the | 134 | ;; * a list -- then the buffer is suitable if its mode is in the |
| 135 | ;; list, except if the first element is `not', in which case the test | 135 | ;; list, except if the first element is `not', in which case the test |
| 136 | ;; is reversed (i.e. it is a list of unsuitable modes). | 136 | ;; is reversed (i.e. it is a list of unsuitable modes). |
| 137 | ;; * Otherwise, the buffer is suitable if its name does not begin with | 137 | ;; * Otherwise, the buffer is suitable if its name does not begin with |
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index b077342e5f5..7847bed6f2d 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el | |||
| @@ -1331,7 +1331,7 @@ If a buffer has no filename, it is ignored. | |||
| 1331 | With no prefix arg, use the filename sans its directory of each marked file. | 1331 | With no prefix arg, use the filename sans its directory of each marked file. |
| 1332 | With a zero prefix arg, use the complete filename of each marked file. | 1332 | With a zero prefix arg, use the complete filename of each marked file. |
| 1333 | With \\[universal-argument], use the filename of each marked file relative | 1333 | With \\[universal-argument], use the filename of each marked file relative |
| 1334 | to `ibuffer-default-directory' iff non-nil, otherwise `default-directory'. | 1334 | to `ibuffer-default-directory' if non-nil, otherwise `default-directory'. |
| 1335 | 1335 | ||
| 1336 | You can then feed the file name(s) to other commands with \\[yank]." | 1336 | You can then feed the file name(s) to other commands with \\[yank]." |
| 1337 | (interactive "p") | 1337 | (interactive "p") |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c4842b9d982..80133d227ab 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -1835,7 +1835,7 @@ If point is on a group name, this function operates on that group." | |||
| 1835 | 1835 | ||
| 1836 | (defun ibuffer-map-lines (function &optional nomodify group) | 1836 | (defun ibuffer-map-lines (function &optional nomodify group) |
| 1837 | "Call FUNCTION for each buffer. | 1837 | "Call FUNCTION for each buffer. |
| 1838 | Don't set the ibuffer modification flag iff NOMODIFY is non-nil. | 1838 | Set the ibuffer modification flag unless NOMODIFY is non-nil. |
| 1839 | 1839 | ||
| 1840 | If optional argument GROUP is non-nil, then only call FUNCTION on | 1840 | If optional argument GROUP is non-nil, then only call FUNCTION on |
| 1841 | buffers in filtering group GROUP. | 1841 | buffers in filtering group GROUP. |
| @@ -2267,7 +2267,7 @@ If optional arg SILENT is non-nil, do not display progress messages." | |||
| 2267 | 2267 | ||
| 2268 | (defun ibuffer-quit () | 2268 | (defun ibuffer-quit () |
| 2269 | "Quit this `ibuffer' session. | 2269 | "Quit this `ibuffer' session. |
| 2270 | Try to restore the previous window configuration iff | 2270 | Try to restore the previous window configuration if |
| 2271 | `ibuffer-restore-window-config-on-quit' is non-nil." | 2271 | `ibuffer-restore-window-config-on-quit' is non-nil." |
| 2272 | (interactive) | 2272 | (interactive) |
| 2273 | (if ibuffer-restore-window-config-on-quit | 2273 | (if ibuffer-restore-window-config-on-quit |
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index d1e8f9cc3f8..44c854f2f46 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -99,7 +99,7 @@ completions - see `icomplete-delay-completions-threshold'." | |||
| 99 | (defcustom icomplete-minibuffer-setup-hook nil | 99 | (defcustom icomplete-minibuffer-setup-hook nil |
| 100 | "*Icomplete-specific customization of minibuffer setup. | 100 | "*Icomplete-specific customization of minibuffer setup. |
| 101 | 101 | ||
| 102 | This hook is run during minibuffer setup iff icomplete will be active. | 102 | This hook is run during minibuffer setup if icomplete is active. |
| 103 | It is intended for use in customizing icomplete for interoperation | 103 | It is intended for use in customizing icomplete for interoperation |
| 104 | with other features and packages. For instance: | 104 | with other features and packages. For instance: |
| 105 | 105 | ||
| @@ -168,7 +168,8 @@ except those on this list.") | |||
| 168 | ;;;###autoload | 168 | ;;;###autoload |
| 169 | (define-minor-mode icomplete-mode | 169 | (define-minor-mode icomplete-mode |
| 170 | "Toggle incremental minibuffer completion for this Emacs session. | 170 | "Toggle incremental minibuffer completion for this Emacs session. |
| 171 | With a numeric argument, turn Icomplete mode on iff ARG is positive." | 171 | With a numeric argument, turn Icomplete mode on if ARG is positive, |
| 172 | otherwise turn it off." | ||
| 172 | :global t :group 'icomplete | 173 | :global t :group 'icomplete |
| 173 | (if icomplete-mode | 174 | (if icomplete-mode |
| 174 | ;; The following is not really necessary after first time - | 175 | ;; The following is not really necessary after first time - |
diff --git a/lisp/ido.el b/lisp/ido.el index e5c4b644f95..ca44e99b594 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -898,7 +898,7 @@ See documentation of `walk-windows' for useful values.") | |||
| 898 | (defcustom ido-minibuffer-setup-hook nil | 898 | (defcustom ido-minibuffer-setup-hook nil |
| 899 | "*Ido-specific customization of minibuffer setup. | 899 | "*Ido-specific customization of minibuffer setup. |
| 900 | 900 | ||
| 901 | This hook is run during minibuffer setup iff `ido' will be active. | 901 | This hook is run during minibuffer setup if `ido' is active. |
| 902 | It is intended for use in customizing ido for interoperation | 902 | It is intended for use in customizing ido for interoperation |
| 903 | with other packages. For instance: | 903 | with other packages. For instance: |
| 904 | 904 | ||
diff --git a/lisp/image.el b/lisp/image.el index 3b0dd87d1ef..6763cf151fe 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -327,7 +327,7 @@ Image types are symbols like `xbm' or `jpeg'." | |||
| 327 | 327 | ||
| 328 | ;;;###autoload | 328 | ;;;###autoload |
| 329 | (defun image-type-auto-detected-p () | 329 | (defun image-type-auto-detected-p () |
| 330 | "Return t iff the current buffer contains an auto-detectable image. | 330 | "Return t if the current buffer contains an auto-detectable image. |
| 331 | This function is intended to be used from `magic-fallback-mode-alist'. | 331 | This function is intended to be used from `magic-fallback-mode-alist'. |
| 332 | 332 | ||
| 333 | The buffer is considered to contain an auto-detectable image if | 333 | The buffer is considered to contain an auto-detectable image if |
diff --git a/lisp/imenu.el b/lisp/imenu.el index 9aa1f5ea088..6c1de967e66 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -727,7 +727,7 @@ definitions, etc. It contains a substring which is the name to | |||
| 727 | appear in the menu. See the info section on Regexps for more | 727 | appear in the menu. See the info section on Regexps for more |
| 728 | information. REGEXP may also be a function, called without | 728 | information. REGEXP may also be a function, called without |
| 729 | arguments. It is expected to search backwards. It shall return | 729 | arguments. It is expected to search backwards. It shall return |
| 730 | true and set `match-data' iff it finds another element. | 730 | true and set `match-data' if it finds another element. |
| 731 | 731 | ||
| 732 | INDEX points to the substring in REGEXP that contains the | 732 | INDEX points to the substring in REGEXP that contains the |
| 733 | name (of the function, variable or type) that is to appear in the | 733 | name (of the function, variable or type) that is to appear in the |
diff --git a/lisp/info-look.el b/lisp/info-look.el index 8ace7730a12..4ed13ba08e0 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -144,7 +144,7 @@ to `symbol', and the help mode defaults to the current major mode." | |||
| 144 | (apply 'info-lookup-add-help* nil arg)) | 144 | (apply 'info-lookup-add-help* nil arg)) |
| 145 | 145 | ||
| 146 | (defun info-lookup-maybe-add-help (&rest arg) | 146 | (defun info-lookup-maybe-add-help (&rest arg) |
| 147 | "Add a help specification iff none is defined. | 147 | "Add a help specification if none is defined. |
| 148 | See the documentation of the function `info-lookup-add-help' | 148 | See the documentation of the function `info-lookup-add-help' |
| 149 | for more details." | 149 | for more details." |
| 150 | (apply 'info-lookup-add-help* t arg)) | 150 | (apply 'info-lookup-add-help* t arg)) |
diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 357cf8f7d1e..9daa00410c3 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el | |||
| @@ -216,8 +216,8 @@ | |||
| 216 | ;; Return t if substring of STR (between FROM and TO) can be broken up | 216 | ;; Return t if substring of STR (between FROM and TO) can be broken up |
| 217 | ;; to chunks all of which can be derived from another entry in SKK | 217 | ;; to chunks all of which can be derived from another entry in SKK |
| 218 | ;; dictionary. SKKBUF is the buffer where the original SKK dictionary | 218 | ;; dictionary. SKKBUF is the buffer where the original SKK dictionary |
| 219 | ;; is visited, KANA is the current entry for STR. FIRST is t iff this | 219 | ;; is visited, KANA is the current entry for STR. FIRST is t only if |
| 220 | ;; is called at top level. | 220 | ;; this is called at top level. |
| 221 | 221 | ||
| 222 | (defun skkdic-breakup-string (skkbuf kana str from to &optional first) | 222 | (defun skkdic-breakup-string (skkbuf kana str from to &optional first) |
| 223 | (let ((len (- to from))) | 223 | (let ((len (- to from))) |
diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 515695bf503..ebeef71b0b7 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el | |||
| @@ -777,9 +777,9 @@ use either \\[customize] or the function `latin1-display'." | |||
| 777 | "Set up Latin-1/ASCII display for Unicode characters. | 777 | "Set up Latin-1/ASCII display for Unicode characters. |
| 778 | This uses the transliterations of the Lynx browser. | 778 | This uses the transliterations of the Lynx browser. |
| 779 | 779 | ||
| 780 | With argument ARG, turn such display on iff ARG is positive, otherwise | 780 | With argument ARG, turn such display on if ARG is positive, otherwise |
| 781 | turn it off and display Unicode characters literally. The display | 781 | turn it off and display Unicode characters literally. The display |
| 782 | is't changed if the display can render Unicode characters." | 782 | isn't changed if the display can render Unicode characters." |
| 783 | (interactive "p") | 783 | (interactive "p") |
| 784 | (if (> arg 0) | 784 | (if (> arg 0) |
| 785 | (unless (char-displayable-p | 785 | (unless (char-displayable-p |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index d80b6ead81a..acff5057f72 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -436,11 +436,11 @@ non-nil, it is used to sort CODINGS instead." | |||
| 436 | (let ((base (coding-system-base x))) | 436 | (let ((base (coding-system-base x))) |
| 437 | ;; We calculate the priority number 0..255 by | 437 | ;; We calculate the priority number 0..255 by |
| 438 | ;; using the 8 bits PMMLCEII as this: | 438 | ;; using the 8 bits PMMLCEII as this: |
| 439 | ;; P: 1 iff most preferred. | 439 | ;; P: 1 if most preferred. |
| 440 | ;; MM: greater than 0 iff mime-charset. | 440 | ;; MM: greater than 0 if mime-charset. |
| 441 | ;; L: 1 iff one of the current lang. env.'s codings. | 441 | ;; L: 1 if one of the current lang. env.'s codings. |
| 442 | ;; C: 1 iff one of codings listed in the category list. | 442 | ;; C: 1 if one of codings listed in the category list. |
| 443 | ;; E: 1 iff not XXX-with-esc | 443 | ;; E: 1 if not XXX-with-esc |
| 444 | ;; II: if iso-2022 based, 0..3, else 1. | 444 | ;; II: if iso-2022 based, 0..3, else 1. |
| 445 | (logior | 445 | (logior |
| 446 | (lsh (if (eq base most-preferred) 1 0) 7) | 446 | (lsh (if (eq base most-preferred) 1 0) 7) |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index b91a6297f21..1975397359a 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -55,7 +55,7 @@ | |||
| 55 | 55 | ||
| 56 | ;;; Code: | 56 | ;;; Code: |
| 57 | 57 | ||
| 58 | (require 'help-mode) | 58 | (eval-when-compile (require 'help-mode)) |
| 59 | 59 | ||
| 60 | (defgroup quail nil | 60 | (defgroup quail nil |
| 61 | "Quail: multilingual input method." | 61 | "Quail: multilingual input method." |
| @@ -1935,7 +1935,7 @@ Remaining args are for FUNC." | |||
| 1935 | (overlay-put quail-overlay 'face 'highlight)))) | 1935 | (overlay-put quail-overlay 'face 'highlight)))) |
| 1936 | 1936 | ||
| 1937 | (defun quail-require-guidance-buf () | 1937 | (defun quail-require-guidance-buf () |
| 1938 | "Return t iff the current Quail package requires showing guidance buffer." | 1938 | "Return t if the current Quail package requires showing guidance buffer." |
| 1939 | (and input-method-verbose-flag | 1939 | (and input-method-verbose-flag |
| 1940 | (if (eq input-method-verbose-flag 'default) | 1940 | (if (eq input-method-verbose-flag 'default) |
| 1941 | (not (and (eq (selected-window) (minibuffer-window)) | 1941 | (not (and (eq (selected-window) (minibuffer-window)) |
| @@ -2426,22 +2426,27 @@ should be made by `quail-build-decode-map' (which see)." | |||
| 2426 | (insert ?\n)) | 2426 | (insert ?\n)) |
| 2427 | (insert ?\n)))) | 2427 | (insert ?\n)))) |
| 2428 | 2428 | ||
| 2429 | (define-button-type 'quail-keyboard-layout-button | 2429 | (defun quail-help-init () |
| 2430 | :supertype 'help-xref | 2430 | (unless (featurep 'help-mode) |
| 2431 | 'help-function '(lambda (layout) | 2431 | (require 'help-mode) |
| 2432 | (help-setup-xref `(quail-keyboard-layout-button ,layout) nil) | 2432 | (define-button-type 'quail-keyboard-layout-button |
| 2433 | (quail-show-keyboard-layout layout)) | 2433 | :supertype 'help-xref |
| 2434 | 'help-echo (purecopy "mouse-2, RET: show keyboard layout")) | 2434 | 'help-function '(lambda (layout) |
| 2435 | 2435 | (help-setup-xref `(quail-keyboard-layout-button ,layout) | |
| 2436 | (define-button-type 'quail-keyboard-customize-button | 2436 | nil) |
| 2437 | :supertype 'help-customize-variable | 2437 | (quail-show-keyboard-layout layout)) |
| 2438 | 'help-echo (purecopy "mouse-2, RET: customize keyboard layout")) | 2438 | 'help-echo (purecopy "mouse-2, RET: show keyboard layout")) |
| 2439 | |||
| 2440 | (define-button-type 'quail-keyboard-customize-button | ||
| 2441 | :supertype 'help-customize-variable | ||
| 2442 | 'help-echo (purecopy "mouse-2, RET: customize keyboard layout")))) | ||
| 2439 | 2443 | ||
| 2440 | (defun quail-help (&optional package) | 2444 | (defun quail-help (&optional package) |
| 2441 | "Show brief description of the current Quail package. | 2445 | "Show brief description of the current Quail package. |
| 2442 | Optional arg PACKAGE specifies the name of alternative Quail | 2446 | Optional arg PACKAGE specifies the name of alternative Quail |
| 2443 | package to describe." | 2447 | package to describe." |
| 2444 | (interactive) | 2448 | (interactive) |
| 2449 | (quail-help-init) | ||
| 2445 | (let ((help-xref-mule-regexp help-xref-mule-regexp-template) | 2450 | (let ((help-xref-mule-regexp help-xref-mule-regexp-template) |
| 2446 | (default-enable-multibyte-characters enable-multibyte-characters) | 2451 | (default-enable-multibyte-characters enable-multibyte-characters) |
| 2447 | (package-def | 2452 | (package-def |
| @@ -2624,7 +2629,7 @@ KEY BINDINGS FOR CONVERSION | |||
| 2624 | ;; it is not yet stored. As a result, the element is a string or a | 2629 | ;; it is not yet stored. As a result, the element is a string or a |
| 2625 | ;; list of strings. | 2630 | ;; list of strings. |
| 2626 | 2631 | ||
| 2627 | (defsubst quail-store-decode-map-key (table char key) | 2632 | (defun quail-store-decode-map-key (table char key) |
| 2628 | (let ((elt (aref table char))) | 2633 | (let ((elt (aref table char))) |
| 2629 | (if elt | 2634 | (if elt |
| 2630 | (if (consp elt) | 2635 | (if (consp elt) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index fa094caf099..3b9218077f3 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -821,7 +821,7 @@ NOPUSH is t and EDIT is t." | |||
| 821 | (run-hooks 'isearch-mode-end-hook)) | 821 | (run-hooks 'isearch-mode-end-hook)) |
| 822 | 822 | ||
| 823 | ;; If there was movement, mark the starting position. | 823 | ;; If there was movement, mark the starting position. |
| 824 | ;; Maybe should test difference between and set mark iff > threshold. | 824 | ;; Maybe should test difference between and set mark only if > threshold. |
| 825 | (if (/= (point) isearch-opoint) | 825 | (if (/= (point) isearch-opoint) |
| 826 | (or (and transient-mark-mode mark-active) | 826 | (or (and transient-mark-mode mark-active) |
| 827 | (progn | 827 | (progn |
| @@ -2325,7 +2325,7 @@ since they have special meaning in a regexp." | |||
| 2325 | ;; - the direction of the current search is expected to be given by | 2325 | ;; - the direction of the current search is expected to be given by |
| 2326 | ;; `isearch-forward'; | 2326 | ;; `isearch-forward'; |
| 2327 | ;; - the variable `isearch-error' is expected to be true | 2327 | ;; - the variable `isearch-error' is expected to be true |
| 2328 | ;; iff `isearch-string' is an invalid regexp. | 2328 | ;; only if `isearch-string' is an invalid regexp. |
| 2329 | 2329 | ||
| 2330 | (defvar isearch-lazy-highlight-overlays nil) | 2330 | (defvar isearch-lazy-highlight-overlays nil) |
| 2331 | (defvar isearch-lazy-highlight-wrapped nil) | 2331 | (defvar isearch-lazy-highlight-wrapped nil) |
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 068f5fff2cd..233997285c9 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el | |||
| @@ -396,7 +396,7 @@ See documentation of `walk-windows' for useful values.") | |||
| 396 | (defcustom iswitchb-minibuffer-setup-hook nil | 396 | (defcustom iswitchb-minibuffer-setup-hook nil |
| 397 | "Iswitchb-specific customization of minibuffer setup. | 397 | "Iswitchb-specific customization of minibuffer setup. |
| 398 | 398 | ||
| 399 | This hook is run during minibuffer setup iff `iswitchb' will be active. | 399 | This hook is run during minibuffer setup if `iswitchb' is active. |
| 400 | For instance: | 400 | For instance: |
| 401 | \(add-hook 'iswitchb-minibuffer-setup-hook | 401 | \(add-hook 'iswitchb-minibuffer-setup-hook |
| 402 | '\(lambda () (set (make-local-variable 'max-mini-window-height) 3))) | 402 | '\(lambda () (set (make-local-variable 'max-mini-window-height) 3))) |
| @@ -1440,7 +1440,7 @@ This is an example function which can be hooked on to | |||
| 1440 | (iswitchb-to-end summaries))) | 1440 | (iswitchb-to-end summaries))) |
| 1441 | 1441 | ||
| 1442 | (defun iswitchb-case () | 1442 | (defun iswitchb-case () |
| 1443 | "Return non-nil iff we should ignore case when matching. | 1443 | "Return non-nil if we should ignore case when matching. |
| 1444 | See the variable `iswitchb-case' for details." | 1444 | See the variable `iswitchb-case' for details." |
| 1445 | (if iswitchb-case | 1445 | (if iswitchb-case |
| 1446 | (if (featurep 'xemacs) | 1446 | (if (featurep 'xemacs) |
| @@ -1450,7 +1450,7 @@ See the variable `iswitchb-case' for details." | |||
| 1450 | ;;;###autoload | 1450 | ;;;###autoload |
| 1451 | (define-minor-mode iswitchb-mode | 1451 | (define-minor-mode iswitchb-mode |
| 1452 | "Toggle Iswitchb global minor mode. | 1452 | "Toggle Iswitchb global minor mode. |
| 1453 | With arg, turn Iswitchb mode on if and only iff ARG is positive. | 1453 | With arg, turn Iswitchb mode on if ARG is positive, otherwise turn it off. |
| 1454 | This mode enables switching between buffers using substrings. See | 1454 | This mode enables switching between buffers using substrings. See |
| 1455 | `iswitchb' for details." | 1455 | `iswitchb' for details." |
| 1456 | nil nil iswitchb-global-map :global t :group 'iswitchb | 1456 | nil nil iswitchb-global-map :global t :group 'iswitchb |
diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 7b07b590a4f..5c2cf989f62 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el | |||
| @@ -568,7 +568,7 @@ for more details." | |||
| 568 | (defvar user-mail-address) | 568 | (defvar user-mail-address) |
| 569 | (defun log-edit-changelog-ours-p () | 569 | (defun log-edit-changelog-ours-p () |
| 570 | "See if ChangeLog entry at point is for the current user, today. | 570 | "See if ChangeLog entry at point is for the current user, today. |
| 571 | Return non-nil iff it is." | 571 | Return non-nil if it is." |
| 572 | ;; Code adapted from add-change-log-entry. | 572 | ;; Code adapted from add-change-log-entry. |
| 573 | (let ((name (or (and (boundp 'add-log-full-name) add-log-full-name) | 573 | (let ((name (or (and (boundp 'add-log-full-name) add-log-full-name) |
| 574 | (and (fboundp 'user-full-name) (user-full-name)) | 574 | (and (fboundp 'user-full-name) (user-full-name)) |
diff --git a/lisp/log-view.el b/lisp/log-view.el index 7520e13a1f6..51861da2ae6 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el | |||
| @@ -174,6 +174,7 @@ The match group number 1 should match the revision number itself.") | |||
| 174 | (1 (if (boundp 'cvs-filename-face) cvs-filename-face)) | 174 | (1 (if (boundp 'cvs-filename-face) cvs-filename-face)) |
| 175 | (0 log-view-file-face append))) | 175 | (0 log-view-file-face append))) |
| 176 | (eval . `(,log-view-message-re . log-view-message-face)))) | 176 | (eval . `(,log-view-message-re . log-view-message-face)))) |
| 177 | |||
| 177 | (defconst log-view-font-lock-defaults | 178 | (defconst log-view-font-lock-defaults |
| 178 | '(log-view-font-lock-keywords t nil nil nil)) | 179 | '(log-view-font-lock-keywords t nil nil nil)) |
| 179 | 180 | ||
diff --git a/lisp/longlines.el b/lisp/longlines.el index fa73ef7057d..07977910a22 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el | |||
| @@ -79,11 +79,13 @@ This is used when `longlines-show-hard-newlines' is on." | |||
| 79 | (defvar longlines-wrap-end nil) | 79 | (defvar longlines-wrap-end nil) |
| 80 | (defvar longlines-wrap-point nil) | 80 | (defvar longlines-wrap-point nil) |
| 81 | (defvar longlines-showing nil) | 81 | (defvar longlines-showing nil) |
| 82 | (defvar longlines-decoded nil) | ||
| 82 | 83 | ||
| 83 | (make-variable-buffer-local 'longlines-wrap-beg) | 84 | (make-variable-buffer-local 'longlines-wrap-beg) |
| 84 | (make-variable-buffer-local 'longlines-wrap-end) | 85 | (make-variable-buffer-local 'longlines-wrap-end) |
| 85 | (make-variable-buffer-local 'longlines-wrap-point) | 86 | (make-variable-buffer-local 'longlines-wrap-point) |
| 86 | (make-variable-buffer-local 'longlines-showing) | 87 | (make-variable-buffer-local 'longlines-showing) |
| 88 | (make-variable-buffer-local 'longlines-decoded) | ||
| 87 | 89 | ||
| 88 | ;; Mode | 90 | ;; Mode |
| 89 | 91 | ||
| @@ -128,7 +130,9 @@ are indicated with a symbol." | |||
| 128 | ;; longlines-wrap-lines that we'll never encounter from here | 130 | ;; longlines-wrap-lines that we'll never encounter from here |
| 129 | (save-restriction | 131 | (save-restriction |
| 130 | (widen) | 132 | (widen) |
| 131 | (longlines-decode-buffer) | 133 | (unless longlines-decoded |
| 134 | (longlines-decode-buffer) | ||
| 135 | (setq longlines-decoded t)) | ||
| 132 | (longlines-wrap-region (point-min) (point-max))) | 136 | (longlines-wrap-region (point-min) (point-max))) |
| 133 | (set-buffer-modified-p mod)) | 137 | (set-buffer-modified-p mod)) |
| 134 | (when (and longlines-show-hard-newlines | 138 | (when (and longlines-show-hard-newlines |
| @@ -161,9 +165,11 @@ are indicated with a symbol." | |||
| 161 | (let ((buffer-undo-list t) | 165 | (let ((buffer-undo-list t) |
| 162 | (after-change-functions nil) | 166 | (after-change-functions nil) |
| 163 | (inhibit-read-only t)) | 167 | (inhibit-read-only t)) |
| 164 | (save-restriction | 168 | (if longlines-decoded |
| 165 | (widen) | 169 | (save-restriction |
| 166 | (longlines-encode-region (point-min) (point-max)))) | 170 | (widen) |
| 171 | (longlines-encode-region (point-min) (point-max)) | ||
| 172 | (setq longlines-decoded nil)))) | ||
| 167 | (remove-hook 'change-major-mode-hook 'longlines-mode-off t) | 173 | (remove-hook 'change-major-mode-hook 'longlines-mode-off t) |
| 168 | (remove-hook 'after-change-functions 'longlines-after-change-function t) | 174 | (remove-hook 'after-change-functions 'longlines-after-change-function t) |
| 169 | (remove-hook 'post-command-hook 'longlines-post-command-function t) | 175 | (remove-hook 'post-command-hook 'longlines-post-command-function t) |
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index b3e2c051e7d..8862e6ca2d2 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el | |||
| @@ -495,7 +495,7 @@ of a mail alias. The value is set up, buffer-local, when first needed.") | |||
| 495 | 495 | ||
| 496 | (or (and (integerp last-command-char) | 496 | (or (and (integerp last-command-char) |
| 497 | ;; Some commands such as M-> may want to expand first. | 497 | ;; Some commands such as M-> may want to expand first. |
| 498 | (equal this-command 'self-insert) | 498 | (equal this-command 'self-insert-command) |
| 499 | (or (eq (char-syntax last-command-char) ?_) | 499 | (or (eq (char-syntax last-command-char) ?_) |
| 500 | ;; Don't expand on @. | 500 | ;; Don't expand on @. |
| 501 | (memq last-command-char '(?@ ?. ?% ?! ?_ ?-)))) | 501 | (memq last-command-char '(?@ ?. ?% ?! ?_ ?-)))) |
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index d14be55735f..988ce2f8e02 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el | |||
| @@ -398,7 +398,7 @@ nil." | |||
| 398 | )) | 398 | )) |
| 399 | 399 | ||
| 400 | (defun mspools-size-folder (spool) | 400 | (defun mspools-size-folder (spool) |
| 401 | "Return (SPOOL . SIZE ) iff SIZE of spool file is non-zero." | 401 | "Return (SPOOL . SIZE ), if SIZE of spool file is non-zero." |
| 402 | ;; 7th file attribute is the size of the file in bytes. | 402 | ;; 7th file attribute is the size of the file in bytes. |
| 403 | (let ((file (concat mspools-folder-directory spool)) | 403 | (let ((file (concat mspools-folder-directory spool)) |
| 404 | size) | 404 | size) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index e4475f5be62..2dd381fdafb 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -3992,13 +3992,13 @@ specifying headers which should not be copied into the new message." | |||
| 3992 | (mail-position-on-field (if resending "Resent-To" "To") t)))))) | 3992 | (mail-position-on-field (if resending "Resent-To" "To") t)))))) |
| 3993 | 3993 | ||
| 3994 | (defun rmail-summary-exists () | 3994 | (defun rmail-summary-exists () |
| 3995 | "Non-nil iff in an RMAIL buffer and an associated summary buffer exists. | 3995 | "Non-nil if in an RMAIL buffer and an associated summary buffer exists. |
| 3996 | In fact, the non-nil value returned is the summary buffer itself." | 3996 | In fact, the non-nil value returned is the summary buffer itself." |
| 3997 | (and rmail-summary-buffer (buffer-name rmail-summary-buffer) | 3997 | (and rmail-summary-buffer (buffer-name rmail-summary-buffer) |
| 3998 | rmail-summary-buffer)) | 3998 | rmail-summary-buffer)) |
| 3999 | 3999 | ||
| 4000 | (defun rmail-summary-displayed () | 4000 | (defun rmail-summary-displayed () |
| 4001 | "t iff in RMAIL buffer and an associated summary buffer is displayed." | 4001 | "t if in RMAIL buffer and an associated summary buffer is displayed." |
| 4002 | (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) | 4002 | (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) |
| 4003 | 4003 | ||
| 4004 | (defcustom rmail-redisplay-summary nil | 4004 | (defcustom rmail-redisplay-summary nil |
diff --git a/lisp/man.el b/lisp/man.el index 56539072439..c7593e88dda 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | ;; ========== Credits and History ========== | 38 | ;; ========== Credits and History ========== |
| 39 | ;; In mid 1991, several people posted some interesting improvements to | 39 | ;; In mid 1991, several people posted some interesting improvements to |
| 40 | ;; man.el from the standard emacs 18.57 distribution. I liked many of | 40 | ;; man.el from the standard Emacs 18.57 distribution. I liked many of |
| 41 | ;; these, but wanted everything in one single package, so I decided | 41 | ;; these, but wanted everything in one single package, so I decided |
| 42 | ;; to incorporate them into a single manual browsing mode. While | 42 | ;; to incorporate them into a single manual browsing mode. While |
| 43 | ;; much of the code here has been rewritten, and some features added, | 43 | ;; much of the code here has been rewritten, and some features added, |
| @@ -64,7 +64,7 @@ | |||
| 64 | ;; ========== Features ========== | 64 | ;; ========== Features ========== |
| 65 | ;; + Runs "man" in the background and pipes the results through a | 65 | ;; + Runs "man" in the background and pipes the results through a |
| 66 | ;; series of sed and awk scripts so that all retrieving and cleaning | 66 | ;; series of sed and awk scripts so that all retrieving and cleaning |
| 67 | ;; is done in the background. The cleaning commands are configurable. | 67 | ;; is done in the background. The cleaning commands are configurable. |
| 68 | ;; + Syntax is the same as Un*x man | 68 | ;; + Syntax is the same as Un*x man |
| 69 | ;; + Functionality is the same as Un*x man, including "man -k" and | 69 | ;; + Functionality is the same as Un*x man, including "man -k" and |
| 70 | ;; "man <section>", etc. | 70 | ;; "man <section>", etc. |
| @@ -109,8 +109,6 @@ | |||
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | (defvar Man-notify) | 111 | (defvar Man-notify) |
| 112 | (defvar Man-current-page) | ||
| 113 | (defvar Man-page-list) | ||
| 114 | (defcustom Man-filter-list nil | 112 | (defcustom Man-filter-list nil |
| 115 | "*Manpage cleaning filter command phrases. | 113 | "*Manpage cleaning filter command phrases. |
| 116 | This variable contains a list of the following form: | 114 | This variable contains a list of the following form: |
| @@ -127,13 +125,8 @@ the manpage buffer." | |||
| 127 | (string :tag "Phrase String")))) | 125 | (string :tag "Phrase String")))) |
| 128 | :group 'man) | 126 | :group 'man) |
| 129 | 127 | ||
| 130 | (defvar Man-original-frame) | ||
| 131 | (defvar Man-arguments) | ||
| 132 | (defvar Man-sections-alist) | ||
| 133 | (defvar Man-refpages-alist) | ||
| 134 | (defvar Man-uses-untabify-flag t | 128 | (defvar Man-uses-untabify-flag t |
| 135 | "Non-nil means use `untabify' instead of `Man-untabify-command'.") | 129 | "Non-nil means use `untabify' instead of `Man-untabify-command'.") |
| 136 | (defvar Man-page-mode-string) | ||
| 137 | (defvar Man-sed-script nil | 130 | (defvar Man-sed-script nil |
| 138 | "Script for sed to nuke backspaces and ANSI codes from manpages.") | 131 | "Script for sed to nuke backspaces and ANSI codes from manpages.") |
| 139 | 132 | ||
| @@ -141,28 +134,28 @@ the manpage buffer." | |||
| 141 | ;; user variables | 134 | ;; user variables |
| 142 | 135 | ||
| 143 | (defcustom Man-fontify-manpage-flag t | 136 | (defcustom Man-fontify-manpage-flag t |
| 144 | "*Non-nil means make up the manpage with fonts." | 137 | "Non-nil means make up the manpage with fonts." |
| 145 | :type 'boolean | 138 | :type 'boolean |
| 146 | :group 'man) | 139 | :group 'man) |
| 147 | 140 | ||
| 148 | (defcustom Man-overstrike-face 'bold | 141 | (defcustom Man-overstrike-face 'bold |
| 149 | "*Face to use when fontifying overstrike." | 142 | "Face to use when fontifying overstrike." |
| 150 | :type 'face | 143 | :type 'face |
| 151 | :group 'man) | 144 | :group 'man) |
| 152 | 145 | ||
| 153 | (defcustom Man-underline-face 'underline | 146 | (defcustom Man-underline-face 'underline |
| 154 | "*Face to use when fontifying underlining." | 147 | "Face to use when fontifying underlining." |
| 155 | :type 'face | 148 | :type 'face |
| 156 | :group 'man) | 149 | :group 'man) |
| 157 | 150 | ||
| 158 | (defcustom Man-reverse-face 'highlight | 151 | (defcustom Man-reverse-face 'highlight |
| 159 | "*Face to use when fontifying reverse video." | 152 | "Face to use when fontifying reverse video." |
| 160 | :type 'face | 153 | :type 'face |
| 161 | :group 'man) | 154 | :group 'man) |
| 162 | 155 | ||
| 163 | ;; Use the value of the obsolete user option Man-notify, if set. | 156 | ;; Use the value of the obsolete user option Man-notify, if set. |
| 164 | (defcustom Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly) | 157 | (defcustom Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly) |
| 165 | "*Selects the behavior when manpage is ready. | 158 | "Selects the behavior when manpage is ready. |
| 166 | This variable may have one of the following values, where (sf) means | 159 | This variable may have one of the following values, where (sf) means |
| 167 | that the frames are switched, so the manpage is displayed in the frame | 160 | that the frames are switched, so the manpage is displayed in the frame |
| 168 | where the man command was called from: | 161 | where the man command was called from: |
| @@ -183,7 +176,7 @@ Any other value of `Man-notify-method' is equivalent to `meek'." | |||
| 183 | :group 'man) | 176 | :group 'man) |
| 184 | 177 | ||
| 185 | (defcustom Man-width nil | 178 | (defcustom Man-width nil |
| 186 | "*Number of columns for which manual pages should be formatted. | 179 | "Number of columns for which manual pages should be formatted. |
| 187 | If nil, the width of the window selected at the moment of man | 180 | If nil, the width of the window selected at the moment of man |
| 188 | invocation is used. If non-nil, the width of the frame selected | 181 | invocation is used. If non-nil, the width of the frame selected |
| 189 | at the moment of man invocation is used. The value also can be a | 182 | at the moment of man invocation is used. The value also can be a |
| @@ -194,12 +187,12 @@ positive integer." | |||
| 194 | :group 'man) | 187 | :group 'man) |
| 195 | 188 | ||
| 196 | (defcustom Man-frame-parameters nil | 189 | (defcustom Man-frame-parameters nil |
| 197 | "*Frame parameter list for creating a new frame for a manual page." | 190 | "Frame parameter list for creating a new frame for a manual page." |
| 198 | :type 'sexp | 191 | :type 'sexp |
| 199 | :group 'man) | 192 | :group 'man) |
| 200 | 193 | ||
| 201 | (defcustom Man-downcase-section-letters-flag t | 194 | (defcustom Man-downcase-section-letters-flag t |
| 202 | "*Non-nil means letters in sections are converted to lower case. | 195 | "Non-nil means letters in sections are converted to lower case. |
| 203 | Some Un*x man commands can't handle uppercase letters in sections, for | 196 | Some Un*x man commands can't handle uppercase letters in sections, for |
| 204 | example \"man 2V chmod\", but they are often displayed in the manpage | 197 | example \"man 2V chmod\", but they are often displayed in the manpage |
| 205 | with the upper case letter. When this variable is t, the section | 198 | with the upper case letter. When this variable is t, the section |
| @@ -209,7 +202,7 @@ being sent to the man background process." | |||
| 209 | :group 'man) | 202 | :group 'man) |
| 210 | 203 | ||
| 211 | (defcustom Man-circular-pages-flag t | 204 | (defcustom Man-circular-pages-flag t |
| 212 | "*Non-nil means the manpage list is treated as circular for traversal." | 205 | "Non-nil means the manpage list is treated as circular for traversal." |
| 213 | :type 'boolean | 206 | :type 'boolean |
| 214 | :group 'man) | 207 | :group 'man) |
| 215 | 208 | ||
| @@ -220,7 +213,7 @@ being sent to the man background process." | |||
| 220 | ;; '("3X" . "3") ; Xlib man pages | 213 | ;; '("3X" . "3") ; Xlib man pages |
| 221 | '("3X11" . "3") | 214 | '("3X11" . "3") |
| 222 | '("1-UCB" . "")) | 215 | '("1-UCB" . "")) |
| 223 | "*Association list of bogus sections to real section numbers. | 216 | "Association list of bogus sections to real section numbers. |
| 224 | Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in | 217 | Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in |
| 225 | their references which Un*x `man' does not recognize. This | 218 | their references which Un*x `man' does not recognize. This |
| 226 | association list is used to translate those sections, when found, to | 219 | association list is used to translate those sections, when found, to |
| @@ -250,9 +243,6 @@ the associated section number." | |||
| 250 | (defvar Man-awk-command "awk" | 243 | (defvar Man-awk-command "awk" |
| 251 | "Command used for processing awk scripts.") | 244 | "Command used for processing awk scripts.") |
| 252 | 245 | ||
| 253 | (defvar Man-mode-map nil | ||
| 254 | "Keymap for Man mode.") | ||
| 255 | |||
| 256 | (defvar Man-mode-hook nil | 246 | (defvar Man-mode-hook nil |
| 257 | "Hook run when Man mode is enabled.") | 247 | "Hook run when Man mode is enabled.") |
| 258 | 248 | ||
| @@ -349,20 +339,22 @@ Otherwise, the value is whatever the function | |||
| 349 | ;; end user variables | 339 | ;; end user variables |
| 350 | 340 | ||
| 351 | ;; other variables and keymap initializations | 341 | ;; other variables and keymap initializations |
| 342 | (defvar Man-original-frame) | ||
| 343 | (make-variable-buffer-local 'Man-original-frame) | ||
| 344 | (defvar Man-arguments) | ||
| 345 | (make-variable-buffer-local 'Man-arguments) | ||
| 346 | (put 'Man-arguments 'permanent-local t) | ||
| 347 | |||
| 348 | (defvar Man-sections-alist nil) | ||
| 352 | (make-variable-buffer-local 'Man-sections-alist) | 349 | (make-variable-buffer-local 'Man-sections-alist) |
| 350 | (defvar Man-refpages-alist nil) | ||
| 353 | (make-variable-buffer-local 'Man-refpages-alist) | 351 | (make-variable-buffer-local 'Man-refpages-alist) |
| 352 | (defvar Man-page-list nil) | ||
| 354 | (make-variable-buffer-local 'Man-page-list) | 353 | (make-variable-buffer-local 'Man-page-list) |
| 354 | (defvar Man-current-page 0) | ||
| 355 | (make-variable-buffer-local 'Man-current-page) | 355 | (make-variable-buffer-local 'Man-current-page) |
| 356 | (defvar Man-page-mode-string "1 of 1") | ||
| 356 | (make-variable-buffer-local 'Man-page-mode-string) | 357 | (make-variable-buffer-local 'Man-page-mode-string) |
| 357 | (make-variable-buffer-local 'Man-original-frame) | ||
| 358 | (make-variable-buffer-local 'Man-arguments) | ||
| 359 | (put 'Man-arguments 'permanent-local t) | ||
| 360 | |||
| 361 | (setq-default Man-sections-alist nil) | ||
| 362 | (setq-default Man-refpages-alist nil) | ||
| 363 | (setq-default Man-page-list nil) | ||
| 364 | (setq-default Man-current-page 0) | ||
| 365 | (setq-default Man-page-mode-string "1 of 1") | ||
| 366 | 358 | ||
| 367 | (defconst Man-sysv-sed-script "\ | 359 | (defconst Man-sysv-sed-script "\ |
| 368 | /\b/ { s/_\b//g | 360 | /\b/ { s/_\b//g |
| @@ -398,30 +390,32 @@ Otherwise, the value is whatever the function | |||
| 398 | table) | 390 | table) |
| 399 | "Syntax table used in Man mode buffers.") | 391 | "Syntax table used in Man mode buffers.") |
| 400 | 392 | ||
| 401 | (unless Man-mode-map | 393 | (defvar Man-mode-map |
| 402 | (setq Man-mode-map (make-sparse-keymap)) | 394 | (let ((map (make-sparse-keymap))) |
| 403 | (suppress-keymap Man-mode-map) | 395 | (suppress-keymap map) |
| 404 | (set-keymap-parent Man-mode-map button-buffer-map) | 396 | (set-keymap-parent map button-buffer-map) |
| 405 | 397 | ||
| 406 | (define-key Man-mode-map " " 'scroll-up) | 398 | (define-key map " " 'scroll-up) |
| 407 | (define-key Man-mode-map "\177" 'scroll-down) | 399 | (define-key map "\177" 'scroll-down) |
| 408 | (define-key Man-mode-map "n" 'Man-next-section) | 400 | (define-key map "n" 'Man-next-section) |
| 409 | (define-key Man-mode-map "p" 'Man-previous-section) | 401 | (define-key map "p" 'Man-previous-section) |
| 410 | (define-key Man-mode-map "\en" 'Man-next-manpage) | 402 | (define-key map "\en" 'Man-next-manpage) |
| 411 | (define-key Man-mode-map "\ep" 'Man-previous-manpage) | 403 | (define-key map "\ep" 'Man-previous-manpage) |
| 412 | (define-key Man-mode-map ">" 'end-of-buffer) | 404 | (define-key map ">" 'end-of-buffer) |
| 413 | (define-key Man-mode-map "<" 'beginning-of-buffer) | 405 | (define-key map "<" 'beginning-of-buffer) |
| 414 | (define-key Man-mode-map "." 'beginning-of-buffer) | 406 | (define-key map "." 'beginning-of-buffer) |
| 415 | (define-key Man-mode-map "r" 'Man-follow-manual-reference) | 407 | (define-key map "r" 'Man-follow-manual-reference) |
| 416 | (define-key Man-mode-map "g" 'Man-goto-section) | 408 | (define-key map "g" 'Man-goto-section) |
| 417 | (define-key Man-mode-map "s" 'Man-goto-see-also-section) | 409 | (define-key map "s" 'Man-goto-see-also-section) |
| 418 | (define-key Man-mode-map "k" 'Man-kill) | 410 | (define-key map "k" 'Man-kill) |
| 419 | (define-key Man-mode-map "q" 'Man-quit) | 411 | (define-key map "q" 'Man-quit) |
| 420 | (define-key Man-mode-map "m" 'man) | 412 | (define-key map "m" 'man) |
| 421 | ;; Not all the man references get buttons currently. The text in the | 413 | ;; Not all the man references get buttons currently. The text in the |
| 422 | ;; manual page can contain references to other man pages | 414 | ;; manual page can contain references to other man pages |
| 423 | (define-key Man-mode-map "\r" 'man-follow) | 415 | (define-key map "\r" 'man-follow) |
| 424 | (define-key Man-mode-map "?" 'describe-mode)) | 416 | (define-key map "?" 'describe-mode) |
| 417 | map) | ||
| 418 | "Keymap for Man mode.") | ||
| 425 | 419 | ||
| 426 | ;; buttons | 420 | ;; buttons |
| 427 | (define-button-type 'Man-abstract-xref-man-page | 421 | (define-button-type 'Man-abstract-xref-man-page |
| @@ -730,8 +724,7 @@ all sections related to a subject, put something appropriate into the | |||
| 730 | (require 'env) | 724 | (require 'env) |
| 731 | (message "Invoking %s %s in the background" manual-program man-args) | 725 | (message "Invoking %s %s in the background" manual-program man-args) |
| 732 | (setq buffer (generate-new-buffer bufname)) | 726 | (setq buffer (generate-new-buffer bufname)) |
| 733 | (save-excursion | 727 | (with-current-buffer buffer |
| 734 | (set-buffer buffer) | ||
| 735 | (setq buffer-undo-list t) | 728 | (setq buffer-undo-list t) |
| 736 | (setq Man-original-frame (selected-frame)) | 729 | (setq Man-original-frame (selected-frame)) |
| 737 | (setq Man-arguments man-args)) | 730 | (setq Man-arguments man-args)) |
| @@ -802,8 +795,7 @@ all sections related to a subject, put something appropriate into the | |||
| 802 | (defun Man-notify-when-ready (man-buffer) | 795 | (defun Man-notify-when-ready (man-buffer) |
| 803 | "Notify the user when MAN-BUFFER is ready. | 796 | "Notify the user when MAN-BUFFER is ready. |
| 804 | See the variable `Man-notify-method' for the different notification behaviors." | 797 | See the variable `Man-notify-method' for the different notification behaviors." |
| 805 | (let ((saved-frame (save-excursion | 798 | (let ((saved-frame (with-current-buffer man-buffer |
| 806 | (set-buffer man-buffer) | ||
| 807 | Man-original-frame))) | 799 | Man-original-frame))) |
| 808 | (cond | 800 | (cond |
| 809 | ((eq Man-notify-method 'newframe) | 801 | ((eq Man-notify-method 'newframe) |
| @@ -975,7 +967,7 @@ default type, `Man-xref-man-page' is used for the buttons." | |||
| 975 | (Man-next-section 1) | 967 | (Man-next-section 1) |
| 976 | (point))) | 968 | (point))) |
| 977 | (goto-char (point-min)) | 969 | (goto-char (point-min)) |
| 978 | (point-max)))) | 970 | nil))) |
| 979 | (while (re-search-forward regexp end t) | 971 | (while (re-search-forward regexp end t) |
| 980 | (make-text-button | 972 | (make-text-button |
| 981 | (match-beginning button-pos) | 973 | (match-beginning button-pos) |
| @@ -1031,8 +1023,7 @@ manpage command." | |||
| 1031 | (or (stringp process) | 1023 | (or (stringp process) |
| 1032 | (set-process-buffer process nil)) | 1024 | (set-process-buffer process nil)) |
| 1033 | 1025 | ||
| 1034 | (save-excursion | 1026 | (with-current-buffer Man-buffer |
| 1035 | (set-buffer Man-buffer) | ||
| 1036 | (let ((case-fold-search nil)) | 1027 | (let ((case-fold-search nil)) |
| 1037 | (goto-char (point-min)) | 1028 | (goto-char (point-min)) |
| 1038 | (cond ((or (looking-at "No \\(manual \\)*entry for") | 1029 | (cond ((or (looking-at "No \\(manual \\)*entry for") |
| @@ -1223,13 +1214,10 @@ The following key bindings are currently in effect in the buffer: | |||
| 1223 | 1214 | ||
| 1224 | (defun Man-strip-page-headers () | 1215 | (defun Man-strip-page-headers () |
| 1225 | "Strip all the page headers but the first from the manpage." | 1216 | "Strip all the page headers but the first from the manpage." |
| 1226 | (let ((buffer-read-only nil) | 1217 | (let ((inhibit-read-only t) |
| 1227 | (case-fold-search nil) | 1218 | (case-fold-search nil) |
| 1228 | (page-list Man-page-list) | ||
| 1229 | (page ()) | ||
| 1230 | (header "")) | 1219 | (header "")) |
| 1231 | (while page-list | 1220 | (dolist (page Man-page-list) |
| 1232 | (setq page (car page-list)) | ||
| 1233 | (and (nth 2 page) | 1221 | (and (nth 2 page) |
| 1234 | (goto-char (car page)) | 1222 | (goto-char (car page)) |
| 1235 | (re-search-forward Man-first-heading-regexp nil t) | 1223 | (re-search-forward Man-first-heading-regexp nil t) |
| @@ -1243,17 +1231,14 @@ The following key bindings are currently in effect in the buffer: | |||
| 1243 | ;; line. | 1231 | ;; line. |
| 1244 | ;; (setq header (concat "\n" header))) | 1232 | ;; (setq header (concat "\n" header))) |
| 1245 | (while (search-forward header (nth 1 page) t) | 1233 | (while (search-forward header (nth 1 page) t) |
| 1246 | (replace-match ""))) | 1234 | (replace-match "")))))) |
| 1247 | (setq page-list (cdr page-list))))) | ||
| 1248 | 1235 | ||
| 1249 | (defun Man-unindent () | 1236 | (defun Man-unindent () |
| 1250 | "Delete the leading spaces that indent the manpage." | 1237 | "Delete the leading spaces that indent the manpage." |
| 1251 | (let ((buffer-read-only nil) | 1238 | (let ((inhibit-read-only t) |
| 1252 | (case-fold-search nil) | 1239 | (case-fold-search nil)) |
| 1253 | (page-list Man-page-list)) | 1240 | (dolist (page Man-page-list) |
| 1254 | (while page-list | 1241 | (let ((indent "") |
| 1255 | (let ((page (car page-list)) | ||
| 1256 | (indent "") | ||
| 1257 | (nindent 0)) | 1242 | (nindent 0)) |
| 1258 | (narrow-to-region (car page) (car (cdr page))) | 1243 | (narrow-to-region (car page) (car (cdr page))) |
| 1259 | (if Man-uses-untabify-flag | 1244 | (if Man-uses-untabify-flag |
| @@ -1281,7 +1266,6 @@ The following key bindings are currently in effect in the buffer: | |||
| 1281 | (or (eolp) | 1266 | (or (eolp) |
| 1282 | (delete-char nindent)) | 1267 | (delete-char nindent)) |
| 1283 | (forward-line 1))) | 1268 | (forward-line 1))) |
| 1284 | (setq page-list (cdr page-list)) | ||
| 1285 | )))) | 1269 | )))) |
| 1286 | 1270 | ||
| 1287 | 1271 | ||
| @@ -1291,14 +1275,18 @@ The following key bindings are currently in effect in the buffer: | |||
| 1291 | (defun Man-next-section (n) | 1275 | (defun Man-next-section (n) |
| 1292 | "Move point to Nth next section (default 1)." | 1276 | "Move point to Nth next section (default 1)." |
| 1293 | (interactive "p") | 1277 | (interactive "p") |
| 1294 | (let ((case-fold-search nil)) | 1278 | (let ((case-fold-search nil) |
| 1279 | (start (point))) | ||
| 1295 | (if (looking-at Man-heading-regexp) | 1280 | (if (looking-at Man-heading-regexp) |
| 1296 | (forward-line 1)) | 1281 | (forward-line 1)) |
| 1297 | (if (re-search-forward Man-heading-regexp (point-max) t n) | 1282 | (if (re-search-forward Man-heading-regexp (point-max) t n) |
| 1298 | (beginning-of-line) | 1283 | (beginning-of-line) |
| 1299 | (goto-char (point-max)) | 1284 | (goto-char (point-max)) |
| 1300 | ;; The last line doesn't belong to any section. | 1285 | ;; The last line doesn't belong to any section. |
| 1301 | (forward-line -1)))) | 1286 | (forward-line -1)) |
| 1287 | ;; But don't move back from the starting point (can happen if `start' | ||
| 1288 | ;; is somewhere on the last line). | ||
| 1289 | (if (< (point) start) (goto-char start)))) | ||
| 1302 | 1290 | ||
| 1303 | (defun Man-previous-section (n) | 1291 | (defun Man-previous-section (n) |
| 1304 | "Move point to Nth previous section (default 1)." | 1292 | "Move point to Nth previous section (default 1)." |
| @@ -1462,7 +1450,7 @@ Specify which REFERENCE to use; default is based on word at point." | |||
| 1462 | (let ((path Man-header-file-path) | 1450 | (let ((path Man-header-file-path) |
| 1463 | complete-path) | 1451 | complete-path) |
| 1464 | (while path | 1452 | (while path |
| 1465 | (setq complete-path (concat (car path) "/" file) | 1453 | (setq complete-path (expand-file-name file (car path)) |
| 1466 | path (cdr path)) | 1454 | path (cdr path)) |
| 1467 | (if (file-readable-p complete-path) | 1455 | (if (file-readable-p complete-path) |
| 1468 | (progn (view-file complete-path) | 1456 | (progn (view-file complete-path) |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 48f4613287b..8bc0bd86a41 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1170,7 +1170,7 @@ mail status in mode line")) | |||
| 1170 | 1170 | ||
| 1171 | (defun menu-bar-vc-filter (orig-binding) | 1171 | (defun menu-bar-vc-filter (orig-binding) |
| 1172 | (let ((ext-binding | 1172 | (let ((ext-binding |
| 1173 | (if vc-mode (vc-call 'extra-menu buffer-file-name)))) | 1173 | (if vc-mode (vc-call-backend (vc-backend buffer-file-name) 'extra-menu)))) |
| 1174 | ;; Give the VC backend a chance to add menu entries | 1174 | ;; Give the VC backend a chance to add menu entries |
| 1175 | ;; specific for that backend. | 1175 | ;; specific for that backend. |
| 1176 | (if (null ext-binding) | 1176 | (if (null ext-binding) |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 254b44f9a03..b7fe48ccd7c 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mh-folder.el, mh-letter.el, mh-show.el: Replace `iff' in | ||
| 4 | doc-strings and comments. | ||
| 5 | |||
| 1 | 2007-07-25 Glenn Morris <rgm@gnu.org> | 6 | 2007-07-25 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Relicense all FSF files to GPLv3 or later. | 8 | * Relicense all FSF files to GPLv3 or later. |
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 63d55459cf4..42abad4536a 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el | |||
| @@ -1495,7 +1495,7 @@ function doesn't recenter the folder buffer." | |||
| 1495 | 1495 | ||
| 1496 | (defun mh-update-unseen () | 1496 | (defun mh-update-unseen () |
| 1497 | "Synchronize the unseen sequence with MH. | 1497 | "Synchronize the unseen sequence with MH. |
| 1498 | Return non-nil iff the MH folder was set. | 1498 | Return non-nil if the MH folder was set. |
| 1499 | The hook `mh-unseen-updated-hook' is called after the unseen sequence | 1499 | The hook `mh-unseen-updated-hook' is called after the unseen sequence |
| 1500 | is updated." | 1500 | is updated." |
| 1501 | (if mh-seen-list | 1501 | (if mh-seen-list |
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index c70c9d8c7e4..7b2cab77d04 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el | |||
| @@ -844,7 +844,7 @@ body." | |||
| 844 | (defun mh-position-on-field (field &optional ignored) | 844 | (defun mh-position-on-field (field &optional ignored) |
| 845 | "Move to the end of the FIELD in the header. | 845 | "Move to the end of the FIELD in the header. |
| 846 | Move to end of entire header if FIELD not found. | 846 | Move to end of entire header if FIELD not found. |
| 847 | Returns non-nil iff FIELD was found. | 847 | Returns non-nil if FIELD was found. |
| 848 | The optional second arg is for pre-version 4 compatibility and is | 848 | The optional second arg is for pre-version 4 compatibility and is |
| 849 | IGNORED." | 849 | IGNORED." |
| 850 | (cond ((mh-goto-header-field field) | 850 | (cond ((mh-goto-header-field field) |
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index d3b93ca65ab..4e1a19c3a06 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el | |||
| @@ -161,7 +161,7 @@ displayed." | |||
| 161 | (defun mh-showing-mode (&optional arg) | 161 | (defun mh-showing-mode (&optional arg) |
| 162 | "Change whether messages should be displayed. | 162 | "Change whether messages should be displayed. |
| 163 | 163 | ||
| 164 | With ARG, display messages iff ARG is positive." | 164 | With ARG, display messages if ARG is positive, otherwise don't display them." |
| 165 | (setq mh-showing-mode | 165 | (setq mh-showing-mode |
| 166 | (if (null arg) | 166 | (if (null arg) |
| 167 | (not mh-showing-mode) | 167 | (not mh-showing-mode) |
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index f1d56eccc66..bfb199ab897 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el | |||
| @@ -158,7 +158,7 @@ Keep the cursor on the screen as needed." | |||
| 158 | Basically, we check for existing horizontal scrolling." | 158 | Basically, we check for existing horizontal scrolling." |
| 159 | (or truncate-lines | 159 | (or truncate-lines |
| 160 | (> (window-hscroll (selected-window)) 0) | 160 | (> (window-hscroll (selected-window)) 0) |
| 161 | (< (window-width) (frame-width)) | 161 | (not (window-full-width-p)) |
| 162 | (and | 162 | (and |
| 163 | mouse-drag-electric-col-scrolling | 163 | mouse-drag-electric-col-scrolling |
| 164 | (save-excursion ;; on a long line? | 164 | (save-excursion ;; on a long line? |
diff --git a/lisp/mouse.el b/lisp/mouse.el index cbbaf73fcbb..27c5dd901f7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1814,27 +1814,23 @@ and selects that window." | |||
| 1814 | (mouse-minibuffer-check event) | 1814 | (mouse-minibuffer-check event) |
| 1815 | (let ((buffers (buffer-list)) alist menu split-by-major-mode sum-of-squares) | 1815 | (let ((buffers (buffer-list)) alist menu split-by-major-mode sum-of-squares) |
| 1816 | ;; Make an alist of elements that look like (MENU-ITEM . BUFFER). | 1816 | ;; Make an alist of elements that look like (MENU-ITEM . BUFFER). |
| 1817 | (let ((tail buffers)) | 1817 | (dolist (buf buffers) |
| 1818 | (while tail | 1818 | ;; Divide all buffers into buckets for various major modes. |
| 1819 | ;; Divide all buffers into buckets for various major modes. | 1819 | ;; Each bucket looks like (MODE NAMESTRING BUFFERS...). |
| 1820 | ;; Each bucket looks like (MODE NAMESTRING BUFFERS...). | 1820 | (with-current-buffer buf |
| 1821 | (with-current-buffer (car tail) | 1821 | (let* ((adjusted-major-mode major-mode) elt) |
| 1822 | (let* ((adjusted-major-mode major-mode) elt) | 1822 | (dolist (group mouse-buffer-menu-mode-groups) |
| 1823 | (let ((tail mouse-buffer-menu-mode-groups)) | 1823 | (when (string-match (car group) (format-mode-line mode-name)) |
| 1824 | (while tail | 1824 | (setq adjusted-major-mode (cdr group)))) |
| 1825 | (if (string-match (car (car tail)) mode-name) | 1825 | (setq elt (assoc adjusted-major-mode split-by-major-mode)) |
| 1826 | (setq adjusted-major-mode (cdr (car tail)))) | 1826 | (unless elt |
| 1827 | (setq tail (cdr tail)))) | 1827 | (setq elt (list adjusted-major-mode |
| 1828 | (setq elt (assoc adjusted-major-mode split-by-major-mode)) | 1828 | (if (stringp adjusted-major-mode) |
| 1829 | (if (null elt) | 1829 | adjusted-major-mode |
| 1830 | (setq elt (list adjusted-major-mode | 1830 | mode-name)) |
| 1831 | (if (stringp adjusted-major-mode) | 1831 | split-by-major-mode (cons elt split-by-major-mode))) |
| 1832 | adjusted-major-mode | 1832 | (or (memq buf (cdr (cdr elt))) |
| 1833 | mode-name)) | 1833 | (setcdr (cdr elt) (cons buf (cdr (cdr elt)))))))) |
| 1834 | split-by-major-mode (cons elt split-by-major-mode))) | ||
| 1835 | (or (memq (car tail) (cdr (cdr elt))) | ||
| 1836 | (setcdr (cdr elt) (cons (car tail) (cdr (cdr elt))))))) | ||
| 1837 | (setq tail (cdr tail)))) | ||
| 1838 | ;; Compute the sum of squares of sizes of the major-mode buckets. | 1834 | ;; Compute the sum of squares of sizes of the major-mode buckets. |
| 1839 | (let ((tail split-by-major-mode)) | 1835 | (let ((tail split-by-major-mode)) |
| 1840 | (setq sum-of-squares 0) | 1836 | (setq sum-of-squares 0) |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index fd7f0682622..2f06344ccda 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -4285,7 +4285,12 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4285 | ;;;###autoload | 4285 | ;;;###autoload |
| 4286 | (defun ange-ftp-hook-function (operation &rest args) | 4286 | (defun ange-ftp-hook-function (operation &rest args) |
| 4287 | (let ((fn (get operation 'ange-ftp))) | 4287 | (let ((fn (get operation 'ange-ftp))) |
| 4288 | (if fn (save-match-data (apply fn args)) | 4288 | (if fn |
| 4289 | ;; Catch also errors in process-filter. | ||
| 4290 | (condition-case err | ||
| 4291 | (let ((debug-on-error t)) | ||
| 4292 | (save-match-data (apply fn args))) | ||
| 4293 | (error (signal (car err) (cdr err)))) | ||
| 4289 | (ange-ftp-run-real-handler operation args)))) | 4294 | (ange-ftp-run-real-handler operation args)))) |
| 4290 | 4295 | ||
| 4291 | ;; The following code is commented out because Tramp now deals with | 4296 | ;; The following code is commented out because Tramp now deals with |
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 28f7d1ddb46..ef01c96ec8e 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el | |||
| @@ -248,7 +248,7 @@ There is a variable ``telnet-interrupt-string'' which is the character | |||
| 248 | sent to try to stop execution of a job on the remote host. | 248 | sent to try to stop execution of a job on the remote host. |
| 249 | Data is sent to the remote host when RET is typed." | 249 | Data is sent to the remote host when RET is typed." |
| 250 | (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern) | 250 | (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern) |
| 251 | (setq comint-use-prompt-regexp t)) | 251 | (set (make-local-variable 'comint-use-prompt-regexp) t)) |
| 252 | 252 | ||
| 253 | ;;;###autoload (add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)") | 253 | ;;;###autoload (add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)") |
| 254 | 254 | ||
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 79b0b537837..db08fe3b6df 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -290,9 +290,8 @@ history." | |||
| 290 | tramp-cache-data) | 290 | tramp-cache-data) |
| 291 | res)) | 291 | res)) |
| 292 | 292 | ||
| 293 | ;; Read persistent connection history. Applied with | 293 | ;; Read persistent connection history. |
| 294 | ;; `load-in-progress', because it shall be evaluated only once. | 294 | (when (zerop (hash-table-count tramp-cache-data)) |
| 295 | (when load-in-progress | ||
| 296 | (condition-case err | 295 | (condition-case err |
| 297 | (with-temp-buffer | 296 | (with-temp-buffer |
| 298 | (insert-file-contents tramp-persistency-file-name) | 297 | (insert-file-contents tramp-persistency-file-name) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5285b87313a..1070d61cba6 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1027,7 +1027,7 @@ The `sudo' program appears to insert a `^@' character into the prompt." | |||
| 1027 | "Login incorrect" | 1027 | "Login incorrect" |
| 1028 | "Login Incorrect" | 1028 | "Login Incorrect" |
| 1029 | "Connection refused" | 1029 | "Connection refused" |
| 1030 | "Connection closed by foreign host." | 1030 | "Connection closed" |
| 1031 | "Sorry, try again." | 1031 | "Sorry, try again." |
| 1032 | "Name or service not known" | 1032 | "Name or service not known" |
| 1033 | "Host key verification failed." | 1033 | "Host key verification failed." |
| @@ -3581,8 +3581,11 @@ beginning of local filename are not substituted." | |||
| 3581 | (tramp-send-command v command) | 3581 | (tramp-send-command v command) |
| 3582 | ;; We should show the output anyway. | 3582 | ;; We should show the output anyway. |
| 3583 | (when outbuf | 3583 | (when outbuf |
| 3584 | (with-current-buffer outbuf | 3584 | (let ((output-string |
| 3585 | (insert-buffer-substring (tramp-get-connection-buffer v))) | 3585 | (with-current-buffer (tramp-get-connection-buffer v) |
| 3586 | (buffer-substring (point-min) (point-max))))) | ||
| 3587 | (with-current-buffer outbuf | ||
| 3588 | (insert output-string))) | ||
| 3586 | (when display (display-buffer outbuf)))) | 3589 | (when display (display-buffer outbuf)))) |
| 3587 | ;; When the user did interrupt, we should do it also. | 3590 | ;; When the user did interrupt, we should do it also. |
| 3588 | (error | 3591 | (error |
| @@ -3614,12 +3617,20 @@ beginning of local filename are not substituted." | |||
| 3614 | (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) | 3617 | (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) |
| 3615 | (args (split-string (substring command 0 asynchronous) " ")) | 3618 | (args (split-string (substring command 0 asynchronous) " ")) |
| 3616 | (output-buffer | 3619 | (output-buffer |
| 3617 | (or output-buffer | 3620 | (cond |
| 3618 | (if asynchronous | 3621 | ((bufferp output-buffer) output-buffer) |
| 3619 | "*Async Shell Command*" | 3622 | ((stringp output-buffer) (get-buffer-create output-buffer)) |
| 3620 | "*Shell Command Output*"))) | 3623 | (output-buffer (current-buffer)) |
| 3624 | (t (generate-new-buffer | ||
| 3625 | (if asynchronous | ||
| 3626 | "*Async Shell Command*" | ||
| 3627 | "*Shell Command Output*"))))) | ||
| 3628 | (error-buffer | ||
| 3629 | (cond | ||
| 3630 | ((bufferp error-buffer) error-buffer) | ||
| 3631 | ((stringp error-buffer) (get-buffer-create error-buffer)))) | ||
| 3621 | (buffer | 3632 | (buffer |
| 3622 | (if (and (not asynchronous) (bufferp error-buffer)) | 3633 | (if (and (not asynchronous) error-buffer) |
| 3623 | (with-parsed-tramp-file-name default-directory nil | 3634 | (with-parsed-tramp-file-name default-directory nil |
| 3624 | (list output-buffer (tramp-make-tramp-temp-file v))) | 3635 | (list output-buffer (tramp-make-tramp-temp-file v))) |
| 3625 | output-buffer))) | 3636 | output-buffer))) |
| @@ -3637,7 +3648,10 @@ beginning of local filename are not substituted." | |||
| 3637 | (when (listp buffer) | 3648 | (when (listp buffer) |
| 3638 | (with-current-buffer error-buffer | 3649 | (with-current-buffer error-buffer |
| 3639 | (insert-file-contents (cadr buffer))) | 3650 | (insert-file-contents (cadr buffer))) |
| 3640 | (delete-file (cadr buffer)))))) | 3651 | (delete-file (buffer-file-name (cadr buffer)))) |
| 3652 | ;; There's some output, display it. | ||
| 3653 | (when (with-current-buffer output-buffer (> (point-max) (point-min))) | ||
| 3654 | (display-message-or-buffer output-buffer))))) | ||
| 3641 | 3655 | ||
| 3642 | ;; File Editing. | 3656 | ;; File Editing. |
| 3643 | 3657 | ||
| @@ -4177,8 +4191,12 @@ Falls back to normal file name handler if no tramp file name handler exists." | |||
| 4177 | ((and completion (zerop (length localname)) | 4191 | ((and completion (zerop (length localname)) |
| 4178 | (memq operation '(file-name-as-directory))) | 4192 | (memq operation '(file-name-as-directory))) |
| 4179 | filename) | 4193 | filename) |
| 4180 | ;; Call the backend function. | 4194 | ;; Call the backend function. Set a connection property |
| 4181 | (foreign (apply foreign operation args)) | 4195 | ;; first, it will be reused for user/host name completion. |
| 4196 | (foreign | ||
| 4197 | (unless (zerop (length localname)) | ||
| 4198 | (tramp-set-connection-property v "started" nil)) | ||
| 4199 | (apply foreign operation args)) | ||
| 4182 | ;; Nothing to do for us. | 4200 | ;; Nothing to do for us. |
| 4183 | (t (tramp-run-real-handler operation args))))))) | 4201 | (t (tramp-run-real-handler operation args))))))) |
| 4184 | 4202 | ||
| @@ -6116,7 +6134,8 @@ In case there is no valid Lisp expression, it raises an error" | |||
| 6116 | (condition-case nil | 6134 | (condition-case nil |
| 6117 | (prog1 (read (current-buffer)) | 6135 | (prog1 (read (current-buffer)) |
| 6118 | ;; Error handling. | 6136 | ;; Error handling. |
| 6119 | (when (re-search-forward "\\S-" nil t) (error))) | 6137 | (when (re-search-forward "\\S-" (tramp-line-end-position) t) |
| 6138 | (error))) | ||
| 6120 | (error (tramp-error | 6139 | (error (tramp-error |
| 6121 | vec 'file-error | 6140 | vec 'file-error |
| 6122 | "`%s' does not return a valid Lisp expression: `%s'" | 6141 | "`%s' does not return a valid Lisp expression: `%s'" |
| @@ -6125,7 +6144,7 @@ In case there is no valid Lisp expression, it raises an error" | |||
| 6125 | ;; It seems that Tru64 Unix does not like it if long strings are sent | 6144 | ;; It seems that Tru64 Unix does not like it if long strings are sent |
| 6126 | ;; to it in one go. (This happens when sending the Perl | 6145 | ;; to it in one go. (This happens when sending the Perl |
| 6127 | ;; `file-attributes' implementation, for instance.) Therefore, we | 6146 | ;; `file-attributes' implementation, for instance.) Therefore, we |
| 6128 | ;; have this function which waits a bit at each line. | 6147 | ;; have this function which sends the string in chunks. |
| 6129 | (defun tramp-send-string (vec string) | 6148 | (defun tramp-send-string (vec string) |
| 6130 | "Send the STRING via connection VEC. | 6149 | "Send the STRING via connection VEC. |
| 6131 | 6150 | ||
| @@ -6143,7 +6162,7 @@ the remote host use line-endings as defined in the variable | |||
| 6143 | ;; Clean up the buffer. We cannot call `erase-buffer' because | 6162 | ;; Clean up the buffer. We cannot call `erase-buffer' because |
| 6144 | ;; narrowing might be in effect. | 6163 | ;; narrowing might be in effect. |
| 6145 | (let (buffer-read-only) (delete-region (point-min) (point-max))) | 6164 | (let (buffer-read-only) (delete-region (point-min) (point-max))) |
| 6146 | ;; replace "\n" by `tramp-rsh-end-of-line' | 6165 | ;; Replace "\n" by `tramp-rsh-end-of-line'. |
| 6147 | (setq string | 6166 | (setq string |
| 6148 | (mapconcat 'identity | 6167 | (mapconcat 'identity |
| 6149 | (split-string string "\n") | 6168 | (split-string string "\n") |
| @@ -6151,7 +6170,7 @@ the remote host use line-endings as defined in the variable | |||
| 6151 | (unless (or (string= string "") | 6170 | (unless (or (string= string "") |
| 6152 | (string-equal (substring string -1) tramp-rsh-end-of-line)) | 6171 | (string-equal (substring string -1) tramp-rsh-end-of-line)) |
| 6153 | (setq string (concat string tramp-rsh-end-of-line))) | 6172 | (setq string (concat string tramp-rsh-end-of-line))) |
| 6154 | ;; send the string | 6173 | ;; Send the string. |
| 6155 | (if (and chunksize (not (zerop chunksize))) | 6174 | (if (and chunksize (not (zerop chunksize))) |
| 6156 | (let ((pos 0) | 6175 | (let ((pos 0) |
| 6157 | (end (length string))) | 6176 | (end (length string))) |
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index a2405b0edb2..569771143e3 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el | |||
| @@ -523,7 +523,7 @@ See `fast-lock-cache-directories'." | |||
| 523 | ;; Just a directory. | 523 | ;; Just a directory. |
| 524 | directory) | 524 | directory) |
| 525 | (t | 525 | (t |
| 526 | ;; A directory iff the file name matches the regexp. | 526 | ;; A directory if the file name matches the regexp. |
| 527 | (let ((bufile (expand-file-name buffer-file-truename)) | 527 | (let ((bufile (expand-file-name buffer-file-truename)) |
| 528 | (case-fold-search nil)) | 528 | (case-fold-search nil)) |
| 529 | (when (save-match-data (string-match (car directory) bufile)) | 529 | (when (save-match-data (string-match (car directory) bufile)) |
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el index 6991f796526..e5ab1638c60 100644 --- a/lisp/pcvs-util.el +++ b/lisp/pcvs-util.el | |||
| @@ -211,7 +211,8 @@ arguments. If ARGS is not a list, no argument will be passed." | |||
| 211 | (defconst cvs-qtypedesc-string1 (cvs-qtypedesc-create 'identity 'identity t)) | 211 | (defconst cvs-qtypedesc-string1 (cvs-qtypedesc-create 'identity 'identity t)) |
| 212 | (defconst cvs-qtypedesc-string (cvs-qtypedesc-create 'identity 'identity)) | 212 | (defconst cvs-qtypedesc-string (cvs-qtypedesc-create 'identity 'identity)) |
| 213 | (defconst cvs-qtypedesc-strings | 213 | (defconst cvs-qtypedesc-strings |
| 214 | (cvs-qtypedesc-create 'string->strings 'strings->string nil)) | 214 | (cvs-qtypedesc-create 'split-string-and-unquote |
| 215 | 'combine-and-quote-strings nil)) | ||
| 215 | 216 | ||
| 216 | (defun cvs-query-read (default prompt qtypedesc &optional hist-sym) | 217 | (defun cvs-query-read (default prompt qtypedesc &optional hist-sym) |
| 217 | (let* ((qtypedesc (or qtypedesc cvs-qtypedesc-strings)) | 218 | (let* ((qtypedesc (or qtypedesc cvs-qtypedesc-strings)) |
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 5c79f7a5fb9..21cfd5b042d 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -182,7 +182,7 @@ | |||
| 182 | (when (re-search-forward | 182 | (when (re-search-forward |
| 183 | (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t) | 183 | (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t) |
| 184 | (let* ((sym (intern (concat "cvs-" cmd "-flags"))) | 184 | (let* ((sym (intern (concat "cvs-" cmd "-flags"))) |
| 185 | (val (string->strings (or (match-string 2) "")))) | 185 | (val (split-string-and-unquote (or (match-string 2) "")))) |
| 186 | (cvs-flags-set sym 0 val)))) | 186 | (cvs-flags-set sym 0 val)))) |
| 187 | ;; ensure that cvs doesn't have -q or -Q | 187 | ;; ensure that cvs doesn't have -q or -Q |
| 188 | (cvs-flags-set 'cvs-cvs-flags 0 | 188 | (cvs-flags-set 'cvs-cvs-flags 0 |
| @@ -612,7 +612,7 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 612 | (t arg))) | 612 | (t arg))) |
| 613 | args))) | 613 | args))) |
| 614 | (concat cvs-program " " | 614 | (concat cvs-program " " |
| 615 | (strings->string | 615 | (combine-and-quote-strings |
| 616 | (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery) | 616 | (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery) |
| 617 | (if cvs-cvsroot (list "-d" cvs-cvsroot)) | 617 | (if cvs-cvsroot (list "-d" cvs-cvsroot)) |
| 618 | args | 618 | args |
| @@ -941,7 +941,8 @@ With a prefix argument, prompt for cvs FLAGS to use." | |||
| 941 | (let ((root (cvs-get-cvsroot))) | 941 | (let ((root (cvs-get-cvsroot))) |
| 942 | (if (or (null root) current-prefix-arg) | 942 | (if (or (null root) current-prefix-arg) |
| 943 | (setq root (read-string "CVS Root: "))) | 943 | (setq root (read-string "CVS Root: "))) |
| 944 | (list (string->strings (read-string "Module(s): " (cvs-get-module))) | 944 | (list (split-string-and-unquote |
| 945 | (read-string "Module(s): " (cvs-get-module))) | ||
| 945 | (read-directory-name "CVS Checkout Directory: " | 946 | (read-directory-name "CVS Checkout Directory: " |
| 946 | nil default-directory nil) | 947 | nil default-directory nil) |
| 947 | (cvs-add-branch-prefix | 948 | (cvs-add-branch-prefix |
| @@ -964,7 +965,7 @@ The files are stored to DIR." | |||
| 964 | (if branch (format " (branch: %s)" branch) | 965 | (if branch (format " (branch: %s)" branch) |
| 965 | "")))) | 966 | "")))) |
| 966 | (list (read-directory-name prompt nil default-directory nil)))) | 967 | (list (read-directory-name prompt nil default-directory nil)))) |
| 967 | (let ((modules (string->strings (cvs-get-module))) | 968 | (let ((modules (split-string-and-unquote (cvs-get-module))) |
| 968 | (flags (cvs-add-branch-prefix | 969 | (flags (cvs-add-branch-prefix |
| 969 | (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))) | 970 | (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))) |
| 970 | (cvs-cvsroot (cvs-get-cvsroot))) | 971 | (cvs-cvsroot (cvs-get-cvsroot))) |
| @@ -2253,7 +2254,7 @@ With prefix argument, prompt for cvs flags." | |||
| 2253 | (let* ((args (append constant-args arg-list))) | 2254 | (let* ((args (append constant-args arg-list))) |
| 2254 | 2255 | ||
| 2255 | (insert (format "=== %s %s\n\n" | 2256 | (insert (format "=== %s %s\n\n" |
| 2256 | program (strings->string args))) | 2257 | program (split-string-and-unquote args))) |
| 2257 | 2258 | ||
| 2258 | ;; FIXME: return the exit status? | 2259 | ;; FIXME: return the exit status? |
| 2259 | (apply 'call-process program nil t t args) | 2260 | (apply 'call-process program nil t t args) |
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 7fbeeab6eea..594b628ad44 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -568,7 +568,7 @@ The standard value contains the following functions as READ-FN: | |||
| 568 | general value, or `antlr-read-boolean' with ARGs = \(PROMPT TABLE) which | 568 | general value, or `antlr-read-boolean' with ARGs = \(PROMPT TABLE) which |
| 569 | reads a boolean value or a member of TABLE. PROMPT is the prompt when | 569 | reads a boolean value or a member of TABLE. PROMPT is the prompt when |
| 570 | asking for a new value. If non-nil, TABLE is a table for completion or | 570 | asking for a new value. If non-nil, TABLE is a table for completion or |
| 571 | a function evaluating to such a table. The return value is quoted iff | 571 | a function evaluating to such a table. The return value is quoted if |
| 572 | AS-STRING is non-nil and is either t or a symbol which is a member of | 572 | AS-STRING is non-nil and is either t or a symbol which is a member of |
| 573 | `antlr-options-style'.") | 573 | `antlr-options-style'.") |
| 574 | 574 | ||
| @@ -2203,8 +2203,8 @@ part SUPER in the result of `antlr-file-dependencies'. CLASSES is the | |||
| 2203 | part \(CLASS-SPEC ...) in the result of `antlr-directory-dependencies'. | 2203 | part \(CLASS-SPEC ...) in the result of `antlr-directory-dependencies'. |
| 2204 | 2204 | ||
| 2205 | The result looks like \(OPTION WITH-UNKNOWN GLIB ...). OPTION is the | 2205 | The result looks like \(OPTION WITH-UNKNOWN GLIB ...). OPTION is the |
| 2206 | complete \"-glib\" option. WITH-UNKNOWN has value t iff there is none | 2206 | complete \"-glib\" option. WITH-UNKNOWN is t if there is none or more |
| 2207 | or more than one grammar file for at least one super grammar. | 2207 | than one grammar file for at least one super grammar. |
| 2208 | 2208 | ||
| 2209 | Each GLIB looks like \(GRAMMAR-FILE \. EVOCAB). GRAMMAR-FILE is a file | 2209 | Each GLIB looks like \(GRAMMAR-FILE \. EVOCAB). GRAMMAR-FILE is a file |
| 2210 | in which a super-grammar is defined. EVOCAB is the value of the export | 2210 | in which a super-grammar is defined. EVOCAB is the value of the export |
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 997e6c44f1a..33467671170 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el | |||
| @@ -478,7 +478,7 @@ | |||
| 478 | 478 | ||
| 479 | (defun c-awk-get-NL-prop-prev-line (&optional do-lim) | 479 | (defun c-awk-get-NL-prop-prev-line (&optional do-lim) |
| 480 | ;; Get the c-awk-NL-prop text-property from the previous line, calculating | 480 | ;; Get the c-awk-NL-prop text-property from the previous line, calculating |
| 481 | ;; it if necessary. Return nil iff we're already at BOB. | 481 | ;; it if necessary. Return nil if we're at BOB. |
| 482 | ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM. | 482 | ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM. |
| 483 | ;; | 483 | ;; |
| 484 | ;; This function might do hidden buffer changes. | 484 | ;; This function might do hidden buffer changes. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 44463a07f15..97dcc61460f 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5116,7 +5116,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5116 | ;; Foo::Foo (int b) : Base (b) {} | 5116 | ;; Foo::Foo (int b) : Base (b) {} |
| 5117 | ;; car ^ ^ point | 5117 | ;; car ^ ^ point |
| 5118 | ;; | 5118 | ;; |
| 5119 | ;; The cdr of the return value is non-nil iff a | 5119 | ;; The cdr of the return value is non-nil if a |
| 5120 | ;; `c-typedef-decl-kwds' specifier is found in the declaration, | 5120 | ;; `c-typedef-decl-kwds' specifier is found in the declaration, |
| 5121 | ;; i.e. the declared identifier(s) are types. | 5121 | ;; i.e. the declared identifier(s) are types. |
| 5122 | ;; | 5122 | ;; |
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index a80833c0043..76b0e5a898c 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el | |||
| @@ -186,7 +186,7 @@ the value set here overrides the style system (there is a variable | |||
| 186 | (bq-process type))))))))) | 186 | (bq-process type))))))))) |
| 187 | 187 | ||
| 188 | (defun c-valid-offset (offset) | 188 | (defun c-valid-offset (offset) |
| 189 | "Return non-nil iff OFFSET is a valid offset for a syntactic symbol. | 189 | "Return non-nil if OFFSET is a valid offset for a syntactic symbol. |
| 190 | See `c-offsets-alist'." | 190 | See `c-offsets-alist'." |
| 191 | (or (eq offset '+) | 191 | (or (eq offset '+) |
| 192 | (eq offset '-) | 192 | (eq offset '-) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index caf0e94b927..805ed3c4040 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -170,7 +170,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 170 | (maven | 170 | (maven |
| 171 | ;; Maven is a popular build tool for Java. Maven is Free Software. | 171 | ;; Maven is a popular build tool for Java. Maven is Free Software. |
| 172 | "\\(.*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]" 1 2 3) | 172 | "\\(.*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]" 1 2 3) |
| 173 | 173 | ||
| 174 | (bash | 174 | (bash |
| 175 | "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) | 175 | "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) |
| 176 | 176 | ||
| @@ -979,8 +979,7 @@ Otherwise, construct a buffer name from MODE-NAME." | |||
| 979 | (funcall name-function mode-name)) | 979 | (funcall name-function mode-name)) |
| 980 | (compilation-buffer-name-function | 980 | (compilation-buffer-name-function |
| 981 | (funcall compilation-buffer-name-function mode-name)) | 981 | (funcall compilation-buffer-name-function mode-name)) |
| 982 | ((and (eq mode-command major-mode) | 982 | ((eq mode-command major-mode) |
| 983 | (eq major-mode (nth 1 compilation-arguments))) | ||
| 984 | (buffer-name)) | 983 | (buffer-name)) |
| 985 | (t | 984 | (t |
| 986 | (concat "*" (downcase mode-name) "*")))) | 985 | (concat "*" (downcase mode-name) "*")))) |
| @@ -1032,7 +1031,7 @@ Returns the compilation buffer created." | |||
| 1032 | (with-current-buffer | 1031 | (with-current-buffer |
| 1033 | (setq outbuf | 1032 | (setq outbuf |
| 1034 | (get-buffer-create | 1033 | (get-buffer-create |
| 1035 | (compilation-buffer-name name-of-mode mode name-function))) | 1034 | (compilation-buffer-name name-of-mode mode name-function))) |
| 1036 | (let ((comp-proc (get-buffer-process (current-buffer)))) | 1035 | (let ((comp-proc (get-buffer-process (current-buffer)))) |
| 1037 | (if comp-proc | 1036 | (if comp-proc |
| 1038 | (if (or (not (eq (process-status comp-proc) 'run)) | 1037 | (if (or (not (eq (process-status comp-proc) 'run)) |
| @@ -1136,7 +1135,7 @@ Returns the compilation buffer created." | |||
| 1136 | (if (file-remote-p default-directory) | 1135 | (if (file-remote-p default-directory) |
| 1137 | "/bin/sh" | 1136 | "/bin/sh" |
| 1138 | shell-file-name) | 1137 | shell-file-name) |
| 1139 | `("-c" ,command)))) | 1138 | nil `("-c" ,command)))) |
| 1140 | (start-file-process-shell-command (downcase mode-name) | 1139 | (start-file-process-shell-command (downcase mode-name) |
| 1141 | outbuf command)))) | 1140 | outbuf command)))) |
| 1142 | ;; Make the buffer's mode line show process state. | 1141 | ;; Make the buffer's mode line show process state. |
| @@ -1164,7 +1163,7 @@ Returns the compilation buffer created." | |||
| 1164 | "Set the height of WINDOW according to `compilation-window-height'." | 1163 | "Set the height of WINDOW according to `compilation-window-height'." |
| 1165 | (let ((height (buffer-local-value 'compilation-window-height (window-buffer window)))) | 1164 | (let ((height (buffer-local-value 'compilation-window-height (window-buffer window)))) |
| 1166 | (and height | 1165 | (and height |
| 1167 | (= (window-width window) (frame-width (window-frame window))) | 1166 | (window-full-width-p window) |
| 1168 | ;; If window is alone in its frame, aside from a minibuffer, | 1167 | ;; If window is alone in its frame, aside from a minibuffer, |
| 1169 | ;; don't change its height. | 1168 | ;; don't change its height. |
| 1170 | (not (eq window (frame-root-window (window-frame window)))) | 1169 | (not (eq window (frame-root-window (window-frame window)))) |
| @@ -1624,12 +1623,10 @@ Use this command in a compilation log buffer. Sets the mark at point there." | |||
| 1624 | 1623 | ||
| 1625 | (defun compilation-find-buffer (&optional avoid-current) | 1624 | (defun compilation-find-buffer (&optional avoid-current) |
| 1626 | "Return a compilation buffer. | 1625 | "Return a compilation buffer. |
| 1627 | If AVOID-CURRENT is nil, and | 1626 | If AVOID-CURRENT is nil, and the current buffer is a compilation buffer, |
| 1628 | the current buffer is a compilation buffer, return it. | 1627 | return it. If AVOID-CURRENT is non-nil, return the current buffer only |
| 1629 | If AVOID-CURRENT is non-nil, return the current buffer | 1628 | as a last resort." |
| 1630 | only as a last resort." | 1629 | (if (and (compilation-buffer-internal-p) (not avoid-current)) |
| 1631 | (if (and (compilation-buffer-internal-p (current-buffer)) | ||
| 1632 | (not avoid-current)) | ||
| 1633 | (current-buffer) | 1630 | (current-buffer) |
| 1634 | (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) | 1631 | (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) |
| 1635 | 1632 | ||
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index d1dc0e875c4..cd7dabb8825 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -1497,9 +1497,16 @@ the last)." | |||
| 1497 | (defvar cperl-use-major-mode 'cperl-mode) | 1497 | (defvar cperl-use-major-mode 'cperl-mode) |
| 1498 | (defvar cperl-font-lock-multiline-start nil) | 1498 | (defvar cperl-font-lock-multiline-start nil) |
| 1499 | (defvar cperl-font-lock-multiline nil) | 1499 | (defvar cperl-font-lock-multiline nil) |
| 1500 | (defvar cperl-compilation-error-regexp-alist nil) | ||
| 1501 | (defvar cperl-font-locking nil) | 1500 | (defvar cperl-font-locking nil) |
| 1502 | 1501 | ||
| 1502 | ;; NB as it stands the code in cperl-mode assumes this only has one | ||
| 1503 | ;; element. If Xemacs 19 support were dropped, this could all be simplified. | ||
| 1504 | (defvar cperl-compilation-error-regexp-alist | ||
| 1505 | ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). | ||
| 1506 | '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" | ||
| 1507 | 2 3)) | ||
| 1508 | "Alist that specifies how to match errors in perl output.") | ||
| 1509 | |||
| 1503 | ;;;###autoload | 1510 | ;;;###autoload |
| 1504 | (defun cperl-mode () | 1511 | (defun cperl-mode () |
| 1505 | "Major mode for editing Perl code. | 1512 | "Major mode for editing Perl code. |
| @@ -1786,7 +1793,7 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1786 | (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x | 1793 | (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x |
| 1787 | (make-local-variable 'compilation-error-regexp-alist-alist) | 1794 | (make-local-variable 'compilation-error-regexp-alist-alist) |
| 1788 | (set 'compilation-error-regexp-alist-alist | 1795 | (set 'compilation-error-regexp-alist-alist |
| 1789 | (cons (cons 'cperl cperl-compilation-error-regexp-alist) | 1796 | (cons (cons 'cperl (car cperl-compilation-error-regexp-alist)) |
| 1790 | (symbol-value 'compilation-error-regexp-alist-alist))) | 1797 | (symbol-value 'compilation-error-regexp-alist-alist))) |
| 1791 | (if (fboundp 'compilation-build-compilation-error-regexp-alist) | 1798 | (if (fboundp 'compilation-build-compilation-error-regexp-alist) |
| 1792 | (let ((f 'compilation-build-compilation-error-regexp-alist)) | 1799 | (let ((f 'compilation-build-compilation-error-regexp-alist)) |
| @@ -3551,7 +3558,7 @@ modify syntax-type text property if the situation is too hard." | |||
| 3551 | (modify-syntax-entry starter (if (eq starter ?\\) "\\" ".") st) | 3558 | (modify-syntax-entry starter (if (eq starter ?\\) "\\" ".") st) |
| 3552 | (if ender (modify-syntax-entry ender "." st)))) | 3559 | (if ender (modify-syntax-entry ender "." st)))) |
| 3553 | ;; i: have 2 args, after end of the first arg | 3560 | ;; i: have 2 args, after end of the first arg |
| 3554 | ;; i2: start of the second arg, if any (before delim iff `ender'). | 3561 | ;; i2: start of the second arg, if any (before delim if `ender'). |
| 3555 | ;; ender: the last arg bounded by parens-like chars, the second one of them | 3562 | ;; ender: the last arg bounded by parens-like chars, the second one of them |
| 3556 | ;; starter: the starting delimiter of the first arg | 3563 | ;; starter: the starting delimiter of the first arg |
| 3557 | ;; go-forward: has 2 args, and the second part is empty | 3564 | ;; go-forward: has 2 args, and the second part is empty |
| @@ -5702,13 +5709,6 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 5702 | (t 5))) ; should not happen | 5709 | (t 5))) ; should not happen |
| 5703 | 5710 | ||
| 5704 | 5711 | ||
| 5705 | (defvar cperl-compilation-error-regexp-alist | ||
| 5706 | ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). | ||
| 5707 | '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" | ||
| 5708 | 2 3)) | ||
| 5709 | "Alist that specifies how to match errors in perl output.") | ||
| 5710 | |||
| 5711 | |||
| 5712 | (defun cperl-windowed-init () | 5712 | (defun cperl-windowed-init () |
| 5713 | "Initialization under windowed version." | 5713 | "Initialization under windowed version." |
| 5714 | (cond ((featurep 'ps-print) | 5714 | (cond ((featurep 'ps-print) |
| @@ -8090,7 +8090,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 8090 | (defun cperl-beautify-regexp-piece (b e embed level) | 8090 | (defun cperl-beautify-regexp-piece (b e embed level) |
| 8091 | ;; b is before the starting delimiter, e before the ending | 8091 | ;; b is before the starting delimiter, e before the ending |
| 8092 | ;; e should be a marker, may be changed, but remains "correct". | 8092 | ;; e should be a marker, may be changed, but remains "correct". |
| 8093 | ;; EMBED is nil iff we process the whole REx. | 8093 | ;; EMBED is nil if we process the whole REx. |
| 8094 | ;; The REx is guaranteed to have //x | 8094 | ;; The REx is guaranteed to have //x |
| 8095 | ;; LEVEL shows how many levels deep to go | 8095 | ;; LEVEL shows how many levels deep to go |
| 8096 | ;; position at enter and at leave is not defined | 8096 | ;; position at enter and at leave is not defined |
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index e85c4752412..05b8b59c00f 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el | |||
| @@ -623,7 +623,8 @@ You can also use the keyboard accelerators indicated like this: [K]ey." | |||
| 623 | 623 | ||
| 624 | (defun cpp-edit-toggle-known (arg) | 624 | (defun cpp-edit-toggle-known (arg) |
| 625 | "Toggle writable status for known conditionals. | 625 | "Toggle writable status for known conditionals. |
| 626 | With optional argument ARG, make them writable iff ARG is positive." | 626 | With optional argument ARG, make them writable if ARG is positive, |
| 627 | otherwise make them unwritable." | ||
| 627 | (interactive "@P") | 628 | (interactive "@P") |
| 628 | (if (or (and (null arg) cpp-known-writable) | 629 | (if (or (and (null arg) cpp-known-writable) |
| 629 | (<= (prefix-numeric-value arg) 0)) | 630 | (<= (prefix-numeric-value arg) 0)) |
| @@ -633,7 +634,8 @@ With optional argument ARG, make them writable iff ARG is positive." | |||
| 633 | 634 | ||
| 634 | (defun cpp-edit-toggle-unknown (arg) | 635 | (defun cpp-edit-toggle-unknown (arg) |
| 635 | "Toggle writable status for unknown conditionals. | 636 | "Toggle writable status for unknown conditionals. |
| 636 | With optional argument ARG, make them writable iff ARG is positive." | 637 | With optional argument ARG, make them writable if ARG is positive, |
| 638 | otherwise make them unwritable." | ||
| 637 | (interactive "@P") | 639 | (interactive "@P") |
| 638 | (if (or (and (null arg) cpp-unknown-writable) | 640 | (if (or (and (null arg) cpp-unknown-writable) |
| 639 | (<= (prefix-numeric-value arg) 0)) | 641 | (<= (prefix-numeric-value arg) 0)) |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 196c22b4a08..96af63849a4 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -256,10 +256,10 @@ One argument, the tag info returned by `snarf-tag-function'.") | |||
| 256 | (defvar tags-included-tables-function nil | 256 | (defvar tags-included-tables-function nil |
| 257 | "Function to do the work of `tags-included-tables' (which see).") | 257 | "Function to do the work of `tags-included-tables' (which see).") |
| 258 | (defvar verify-tags-table-function nil | 258 | (defvar verify-tags-table-function nil |
| 259 | "Function to return t iff current buffer contains valid tags file.") | 259 | "Function to return t if current buffer contains valid tags file.") |
| 260 | 260 | ||
| 261 | ;; Initialize the tags table in the current buffer. | 261 | ;; Initialize the tags table in the current buffer. |
| 262 | ;; Returns non-nil iff it is a valid tags table. On | 262 | ;; Returns non-nil if it is a valid tags table. On |
| 263 | ;; non-nil return, the tags table state variable are | 263 | ;; non-nil return, the tags table state variable are |
| 264 | ;; made buffer-local and initialized to nil. | 264 | ;; made buffer-local and initialized to nil. |
| 265 | (defun initialize-new-tags-table () | 265 | (defun initialize-new-tags-table () |
| @@ -417,7 +417,7 @@ file the tag was in." | |||
| 417 | (defun tags-verify-table (file) | 417 | (defun tags-verify-table (file) |
| 418 | "Read FILE into a buffer and verify that it is a valid tags table. | 418 | "Read FILE into a buffer and verify that it is a valid tags table. |
| 419 | Sets the current buffer to one visiting FILE (if it exists). | 419 | Sets the current buffer to one visiting FILE (if it exists). |
| 420 | Returns non-nil iff it is a valid table." | 420 | Returns non-nil if it is a valid table." |
| 421 | (if (get-file-buffer file) | 421 | (if (get-file-buffer file) |
| 422 | ;; The file is already in a buffer. Check for the visited file | 422 | ;; The file is already in a buffer. Check for the visited file |
| 423 | ;; having changed since we last used it. | 423 | ;; having changed since we last used it. |
| @@ -1219,8 +1219,8 @@ where they were found." | |||
| 1219 | (verify-tags-table-function . etags-verify-tags-table) | 1219 | (verify-tags-table-function . etags-verify-tags-table) |
| 1220 | )))) | 1220 | )))) |
| 1221 | 1221 | ||
| 1222 | ;; Return non-nil iff the current buffer is a valid etags TAGS file. | ||
| 1223 | (defun etags-verify-tags-table () | 1222 | (defun etags-verify-tags-table () |
| 1223 | "Return non-nil if the current buffer is a valid etags TAGS file." | ||
| 1224 | ;; Use eq instead of = in case char-after returns nil. | 1224 | ;; Use eq instead of = in case char-after returns nil. |
| 1225 | (eq (char-after (point-min)) ?\f)) | 1225 | (eq (char-after (point-min)) ?\f)) |
| 1226 | 1226 | ||
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index a6407a3ffa6..5538bd8984a 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -918,7 +918,7 @@ Convert it to flymake internal format." | |||
| 918 | ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1) | 918 | ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1) |
| 919 | ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) | 919 | ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) |
| 920 | ;; ant/javac | 920 | ;; ant/javac |
| 921 | (" *\\(\\[javac\\]\\)? *\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" | 921 | (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" |
| 922 | 2 4 nil 5)) | 922 | 2 4 nil 5)) |
| 923 | ;; compilation-error-regexp-alist) | 923 | ;; compilation-error-regexp-alist) |
| 924 | (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) | 924 | (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) |
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 97f4c1c2616..bcb571f8c87 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -1831,7 +1831,7 @@ If ALL is nil, only match comments that start in column > 0." | |||
| 1831 | ;; From: ralf@up3aud1.gwdg.de (Ralf Fassel) | 1831 | ;; From: ralf@up3aud1.gwdg.de (Ralf Fassel) |
| 1832 | ;; Test if TAB format continuation lines work. | 1832 | ;; Test if TAB format continuation lines work. |
| 1833 | (defun fortran-is-in-string-p (where) | 1833 | (defun fortran-is-in-string-p (where) |
| 1834 | "Return non-nil iff WHERE (a buffer position) is inside a Fortran string." | 1834 | "Return non-nil if WHERE (a buffer position) is inside a Fortran string." |
| 1835 | (save-excursion | 1835 | (save-excursion |
| 1836 | (goto-char where) | 1836 | (goto-char where) |
| 1837 | (cond | 1837 | (cond |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 8f6be334465..c4d14462245 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -347,7 +347,8 @@ for `gdba'." | |||
| 347 | 347 | ||
| 348 | (defun gdb-many-windows (arg) | 348 | (defun gdb-many-windows (arg) |
| 349 | "Toggle the number of windows in the basic arrangement. | 349 | "Toggle the number of windows in the basic arrangement. |
| 350 | With arg, display additional buffers iff arg is positive." | 350 | With prefix argument ARG, display additional buffers if ARG is positive, |
| 351 | otherwise use a single window." | ||
| 351 | (interactive "P") | 352 | (interactive "P") |
| 352 | (setq gdb-many-windows | 353 | (setq gdb-many-windows |
| 353 | (if (null arg) | 354 | (if (null arg) |
| @@ -363,7 +364,8 @@ With arg, display additional buffers iff arg is positive." | |||
| 363 | 364 | ||
| 364 | (defun gdb-use-separate-io-buffer (arg) | 365 | (defun gdb-use-separate-io-buffer (arg) |
| 365 | "Toggle separate IO for debugged program. | 366 | "Toggle separate IO for debugged program. |
| 366 | With arg, use separate IO iff arg is positive." | 367 | With prefix argument ARG, use separate IO if ARG is positive, |
| 368 | otherwise do not." | ||
| 367 | (interactive "P") | 369 | (interactive "P") |
| 368 | (setq gdb-use-separate-io-buffer | 370 | (setq gdb-use-separate-io-buffer |
| 369 | (if (null arg) | 371 | (if (null arg) |
| @@ -664,7 +666,8 @@ line, and no execution takes place." | |||
| 664 | 666 | ||
| 665 | (defun gdb-speedbar-auto-raise (arg) | 667 | (defun gdb-speedbar-auto-raise (arg) |
| 666 | "Toggle automatic raising of the speedbar for watch expressions. | 668 | "Toggle automatic raising of the speedbar for watch expressions. |
| 667 | With arg, automatically raise speedbar iff arg is positive." | 669 | With prefix argument ARG, automatically raise speedbar if ARG is |
| 670 | positive, otherwise don't automatically raise it." | ||
| 668 | (interactive "P") | 671 | (interactive "P") |
| 669 | (setq gdb-speedbar-auto-raise | 672 | (setq gdb-speedbar-auto-raise |
| 670 | (if (null arg) | 673 | (if (null arg) |
| @@ -1381,7 +1384,8 @@ directives." | |||
| 1381 | 1384 | ||
| 1382 | (defun gdb-find-source-frame (arg) | 1385 | (defun gdb-find-source-frame (arg) |
| 1383 | "Toggle trying to find a source frame further up stack. | 1386 | "Toggle trying to find a source frame further up stack. |
| 1384 | With arg, look for a source frame further up stack iff arg is positive." | 1387 | With prefix argument ARG, look for a source frame further up |
| 1388 | stack if ARG is positive, otherwise don't look further up." | ||
| 1385 | (interactive "P") | 1389 | (interactive "P") |
| 1386 | (setq gdb-find-source-frame | 1390 | (setq gdb-find-source-frame |
| 1387 | (if (null arg) | 1391 | (if (null arg) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 2131aebe2a8..4b0dec7002e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | (defgroup gud nil | 59 | (defgroup gud nil |
| 60 | "Grand Unified Debugger mode for gdb and other debuggers under Emacs. | 60 | "Grand Unified Debugger mode for gdb and other debuggers under Emacs. |
| 61 | Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb." | 61 | Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb." |
| 62 | :group 'unix | 62 | :group 'processes |
| 63 | :group 'tools) | 63 | :group 'tools) |
| 64 | 64 | ||
| 65 | 65 | ||
| @@ -2467,7 +2467,7 @@ comint mode, which see." | |||
| 2467 | ;; for local variables in the debugger buffer. | 2467 | ;; for local variables in the debugger buffer. |
| 2468 | (defun gud-common-init (command-line massage-args marker-filter | 2468 | (defun gud-common-init (command-line massage-args marker-filter |
| 2469 | &optional find-file) | 2469 | &optional find-file) |
| 2470 | (let* ((words (string->strings command-line)) | 2470 | (let* ((words (split-string-and-unquote command-line)) |
| 2471 | (program (car words)) | 2471 | (program (car words)) |
| 2472 | (dir default-directory) | 2472 | (dir default-directory) |
| 2473 | ;; Extract the file name from WORDS | 2473 | ;; Extract the file name from WORDS |
| @@ -3361,7 +3361,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") | |||
| 3361 | 3361 | ||
| 3362 | (defun gud-tooltip-dereference (&optional arg) | 3362 | (defun gud-tooltip-dereference (&optional arg) |
| 3363 | "Toggle whether tooltips should show `* expr' or `expr'. | 3363 | "Toggle whether tooltips should show `* expr' or `expr'. |
| 3364 | With arg, dereference expr iff arg is positive." | 3364 | With arg, dereference expr if ARG is positive, otherwise do not derereference." |
| 3365 | (interactive "P") | 3365 | (interactive "P") |
| 3366 | (setq gud-tooltip-dereference | 3366 | (setq gud-tooltip-dereference |
| 3367 | (if (null arg) | 3367 | (if (null arg) |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index bb0a3c634dd..83167ba5a40 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -262,7 +262,7 @@ One of the following symbols: | |||
| 262 | t -- open both code and comment blocks | 262 | t -- open both code and comment blocks |
| 263 | nil -- open neither code nor comment blocks | 263 | nil -- open neither code nor comment blocks |
| 264 | 264 | ||
| 265 | This has effect iff `search-invisible' is set to `open'." | 265 | This has effect only if `search-invisible' is set to `open'." |
| 266 | :type '(choice (const :tag "open only code blocks" code) | 266 | :type '(choice (const :tag "open only code blocks" code) |
| 267 | (const :tag "open only comment blocks" comment) | 267 | (const :tag "open only comment blocks" comment) |
| 268 | (const :tag "open both code and comment blocks" t) | 268 | (const :tag "open both code and comment blocks" t) |
| @@ -515,7 +515,7 @@ Optional arg REPOS-END means reposition at end." | |||
| 515 | (goto-char (if repos-end end beg))) | 515 | (goto-char (if repos-end end beg))) |
| 516 | 516 | ||
| 517 | (defun hs-hide-block-at-point (&optional end comment-reg) | 517 | (defun hs-hide-block-at-point (&optional end comment-reg) |
| 518 | "Hide block iff on block beginning. | 518 | "Hide block if on block beginning. |
| 519 | Optional arg END means reposition at end. | 519 | Optional arg END means reposition at end. |
| 520 | Optional arg COMMENT-REG is a list of the form (BEGIN END) and | 520 | Optional arg COMMENT-REG is a list of the form (BEGIN END) and |
| 521 | specifies the limits of the comment, or nil if the block is not | 521 | specifies the limits of the comment, or nil if the block is not |
| @@ -678,7 +678,7 @@ Return point, or nil if original point was not in a block." | |||
| 678 | (goto-char maxp)) | 678 | (goto-char maxp)) |
| 679 | 679 | ||
| 680 | (defmacro hs-life-goes-on (&rest body) | 680 | (defmacro hs-life-goes-on (&rest body) |
| 681 | "Evaluate BODY forms iff variable `hs-minor-mode' is non-nil. | 681 | "Evaluate BODY forms if variable `hs-minor-mode' is non-nil. |
| 682 | In the dynamic context of this macro, `inhibit-point-motion-hooks' | 682 | In the dynamic context of this macro, `inhibit-point-motion-hooks' |
| 683 | and `case-fold-search' are both t." | 683 | and `case-fold-search' are both t." |
| 684 | `(when hs-minor-mode | 684 | `(when hs-minor-mode |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index adc1b44edaa..3da3434cda2 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -567,24 +567,24 @@ including a reproducible test case and send the message." | |||
| 567 | (describe-function major-mode)) | 567 | (describe-function major-mode)) |
| 568 | 568 | ||
| 569 | (defsubst octave-in-comment-p () | 569 | (defsubst octave-in-comment-p () |
| 570 | "Returns t if point is inside an Octave comment, nil otherwise." | 570 | "Return t if point is inside an Octave comment." |
| 571 | (interactive) | 571 | (interactive) |
| 572 | (save-excursion | 572 | (save-excursion |
| 573 | (nth 4 (parse-partial-sexp (line-beginning-position) (point))))) | 573 | (nth 4 (parse-partial-sexp (line-beginning-position) (point))))) |
| 574 | 574 | ||
| 575 | (defsubst octave-in-string-p () | 575 | (defsubst octave-in-string-p () |
| 576 | "Returns t if point is inside an Octave string, nil otherwise." | 576 | "Return t if point is inside an Octave string." |
| 577 | (interactive) | 577 | (interactive) |
| 578 | (save-excursion | 578 | (save-excursion |
| 579 | (nth 3 (parse-partial-sexp (line-beginning-position) (point))))) | 579 | (nth 3 (parse-partial-sexp (line-beginning-position) (point))))) |
| 580 | 580 | ||
| 581 | (defsubst octave-not-in-string-or-comment-p () | 581 | (defsubst octave-not-in-string-or-comment-p () |
| 582 | "Returns t iff point is not inside an Octave string or comment." | 582 | "Return t if point is not inside an Octave string or comment." |
| 583 | (let ((pps (parse-partial-sexp (line-beginning-position) (point)))) | 583 | (let ((pps (parse-partial-sexp (line-beginning-position) (point)))) |
| 584 | (not (or (nth 3 pps) (nth 4 pps))))) | 584 | (not (or (nth 3 pps) (nth 4 pps))))) |
| 585 | 585 | ||
| 586 | (defun octave-in-block-p () | 586 | (defun octave-in-block-p () |
| 587 | "Returns t if point is inside an Octave block, nil otherwise. | 587 | "Return t if point is inside an Octave block. |
| 588 | The block is taken to start at the first letter of the begin keyword and | 588 | The block is taken to start at the first letter of the begin keyword and |
| 589 | to end after the end keyword." | 589 | to end after the end keyword." |
| 590 | (let ((pos (point))) | 590 | (let ((pos (point))) |
| @@ -599,7 +599,7 @@ to end after the end keyword." | |||
| 599 | (< pos (point))))) | 599 | (< pos (point))))) |
| 600 | 600 | ||
| 601 | (defun octave-in-defun-p () | 601 | (defun octave-in-defun-p () |
| 602 | "Returns t iff point is inside an Octave function declaration. | 602 | "Return t if point is inside an Octave function declaration. |
| 603 | The function is taken to start at the `f' of `function' and to end after | 603 | The function is taken to start at the `f' of `function' and to end after |
| 604 | the end keyword." | 604 | the end keyword." |
| 605 | (let ((pos (point))) | 605 | (let ((pos (point))) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9bef41a0878..462445f3d71 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -348,7 +348,7 @@ comments and strings, or that point is within brackets/parens." | |||
| 348 | (error nil)))))))) | 348 | (error nil)))))))) |
| 349 | 349 | ||
| 350 | (defun python-comment-line-p () | 350 | (defun python-comment-line-p () |
| 351 | "Return non-nil iff current line has only a comment." | 351 | "Return non-nil if current line has only a comment." |
| 352 | (save-excursion | 352 | (save-excursion |
| 353 | (end-of-line) | 353 | (end-of-line) |
| 354 | (when (eq 'comment (syntax-ppss-context (syntax-ppss))) | 354 | (when (eq 'comment (syntax-ppss-context (syntax-ppss))) |
| @@ -356,7 +356,7 @@ comments and strings, or that point is within brackets/parens." | |||
| 356 | (looking-at (rx (or (syntax comment-start) line-end)))))) | 356 | (looking-at (rx (or (syntax comment-start) line-end)))))) |
| 357 | 357 | ||
| 358 | (defun python-blank-line-p () | 358 | (defun python-blank-line-p () |
| 359 | "Return non-nil iff current line is blank." | 359 | "Return non-nil if current line is blank." |
| 360 | (save-excursion | 360 | (save-excursion |
| 361 | (beginning-of-line) | 361 | (beginning-of-line) |
| 362 | (looking-at "\\s-*$"))) | 362 | (looking-at "\\s-*$"))) |
| @@ -850,7 +850,7 @@ multi-line bracketed expressions." | |||
| 850 | "Skip out of any nested brackets. | 850 | "Skip out of any nested brackets. |
| 851 | Skip forward if FORWARD is non-nil, else backward. | 851 | Skip forward if FORWARD is non-nil, else backward. |
| 852 | If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. | 852 | If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. |
| 853 | Return non-nil iff skipping was done." | 853 | Return non-nil if skipping was done." |
| 854 | (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) | 854 | (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) |
| 855 | (forward (if forward -1 1))) | 855 | (forward (if forward -1 1))) |
| 856 | (unless (zerop depth) | 856 | (unless (zerop depth) |
| @@ -1199,7 +1199,7 @@ local value.") | |||
| 1199 | (define-key map "\C-c\C-l" 'python-load-file) | 1199 | (define-key map "\C-c\C-l" 'python-load-file) |
| 1200 | (define-key map "\C-c\C-v" 'python-check) | 1200 | (define-key map "\C-c\C-v" 'python-check) |
| 1201 | ;; Note that we _can_ still use these commands which send to the | 1201 | ;; Note that we _can_ still use these commands which send to the |
| 1202 | ;; Python process even at the prompt iff we have a normal prompt, | 1202 | ;; Python process even at the prompt provided we have a normal prompt, |
| 1203 | ;; i.e. '>>> ' and not '... '. See the comment before | 1203 | ;; i.e. '>>> ' and not '... '. See the comment before |
| 1204 | ;; python-send-region. Fixme: uncomment these if we address that. | 1204 | ;; python-send-region. Fixme: uncomment these if we address that. |
| 1205 | 1205 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 7860bb35200..f9b7e18d467 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -212,7 +212,6 @@ | |||
| 212 | 212 | ||
| 213 | (defgroup sh nil | 213 | (defgroup sh nil |
| 214 | "Shell programming utilities." | 214 | "Shell programming utilities." |
| 215 | :group 'unix | ||
| 216 | :group 'languages) | 215 | :group 'languages) |
| 217 | 216 | ||
| 218 | (defgroup sh-script nil | 217 | (defgroup sh-script nil |
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index c7576a27114..f9fd7beffd2 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el | |||
| @@ -126,11 +126,13 @@ | |||
| 126 | "*Indentation of Tcl statements with respect to containing block." | 126 | "*Indentation of Tcl statements with respect to containing block." |
| 127 | :type 'integer | 127 | :type 'integer |
| 128 | :group 'tcl) | 128 | :group 'tcl) |
| 129 | (put 'tcl-indent-level 'safe-local-variable 'integerp) | ||
| 129 | 130 | ||
| 130 | (defcustom tcl-continued-indent-level 4 | 131 | (defcustom tcl-continued-indent-level 4 |
| 131 | "*Indentation of continuation line relative to first line of command." | 132 | "*Indentation of continuation line relative to first line of command." |
| 132 | :type 'integer | 133 | :type 'integer |
| 133 | :group 'tcl) | 134 | :group 'tcl) |
| 135 | (put 'tcl-continued-indent-level 'safe-local-variable 'integerp) | ||
| 134 | 136 | ||
| 135 | (defcustom tcl-auto-newline nil | 137 | (defcustom tcl-auto-newline nil |
| 136 | "*Non-nil means automatically newline before and after braces you insert." | 138 | "*Non-nil means automatically newline before and after braces you insert." |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 2762e8dbd55..5307445dc04 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -232,7 +232,7 @@ It creates the Imenu index for the buffer, if necessary." | |||
| 232 | When Which Function mode is enabled, the current function name is | 232 | When Which Function mode is enabled, the current function name is |
| 233 | continuously displayed in the mode line, in certain major modes. | 233 | continuously displayed in the mode line, in certain major modes. |
| 234 | 234 | ||
| 235 | With prefix ARG, turn Which Function mode on iff arg is positive, | 235 | With prefix ARG, turn Which Function mode on if arg is positive, |
| 236 | and off otherwise." | 236 | and off otherwise." |
| 237 | :global t :group 'which-func | 237 | :global t :group 'which-func |
| 238 | (if which-function-mode | 238 | (if which-function-mode |
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 0beca9e985e..a820ca4cede 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -868,7 +868,7 @@ Control returns to the top level rep loop." | |||
| 868 | (sleep-for 1))) | 868 | (sleep-for 1))) |
| 869 | 869 | ||
| 870 | (defun xscheme-process-running-p () | 870 | (defun xscheme-process-running-p () |
| 871 | "True iff there is a Scheme process whose status is `run'." | 871 | "True if there is a Scheme process whose status is `run'." |
| 872 | (let ((process (get-process xscheme-process-name))) | 872 | (let ((process (get-process xscheme-process-name))) |
| 873 | (and process | 873 | (and process |
| 874 | (eq (process-status process) 'run)))) | 874 | (eq (process-status process) 'run)))) |
| @@ -882,7 +882,7 @@ Control returns to the top level rep loop." | |||
| 882 | (and buffer (get-buffer-window buffer)))) | 882 | (and buffer (get-buffer-window buffer)))) |
| 883 | 883 | ||
| 884 | (defun xscheme-process-buffer-current-p () | 884 | (defun xscheme-process-buffer-current-p () |
| 885 | "True iff the current buffer is the Scheme process buffer." | 885 | "True if the current buffer is the Scheme process buffer." |
| 886 | (eq (xscheme-process-buffer) (current-buffer))) | 886 | (eq (xscheme-process-buffer) (current-buffer))) |
| 887 | 887 | ||
| 888 | ;;;; Process Filter Operations | 888 | ;;;; Process Filter Operations |
diff --git a/lisp/select.el b/lisp/select.el index b1fa729a664..60259142522 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -178,7 +178,7 @@ Cut buffers are considered obsolete; you should use selections instead." | |||
| 178 | If it is valid, set the register `r0' to 1, else set it to 0.") | 178 | If it is valid, set the register `r0' to 1, else set it to 0.") |
| 179 | 179 | ||
| 180 | (defun string-utf-8-p (string) | 180 | (defun string-utf-8-p (string) |
| 181 | "Return non-nil iff STRING is a unibyte string of valid UTF-8 sequence." | 181 | "Return non-nil if STRING is a unibyte string of valid UTF-8 sequence." |
| 182 | (if (or (not (stringp string)) | 182 | (if (or (not (stringp string)) |
| 183 | (multibyte-string-p string)) | 183 | (multibyte-string-p string)) |
| 184 | (error "Not a unibyte string: %s" string)) | 184 | (error "Not a unibyte string: %s" string)) |
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index ee6dcc15b7e..d1de8be3910 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el | |||
| @@ -285,7 +285,7 @@ information defining the cluster. For interactive use, call | |||
| 285 | ans))) | 285 | ans))) |
| 286 | 286 | ||
| 287 | (defun shadow-site-match (site1 site2) | 287 | (defun shadow-site-match (site1 site2) |
| 288 | "Non-nil iff SITE1 is or includes SITE2. | 288 | "Non-nil if SITE1 is or includes SITE2. |
| 289 | Each may be a host or cluster name; if they are clusters, regexp of SITE1 will | 289 | Each may be a host or cluster name; if they are clusters, regexp of SITE1 will |
| 290 | be matched against the primary of SITE2." | 290 | be matched against the primary of SITE2." |
| 291 | (or (string-equal site1 site2) ; quick check | 291 | (or (string-equal site1 site2) ; quick check |
diff --git a/lisp/simple.el b/lisp/simple.el index de1220ce21c..fa825663783 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4329,13 +4329,6 @@ If optional arg REALLY-WORD is non-nil, it finds just a word." | |||
| 4329 | regexp) | 4329 | regexp) |
| 4330 | :group 'fill) | 4330 | :group 'fill) |
| 4331 | 4331 | ||
| 4332 | (defvar comment-line-break-function 'comment-indent-new-line | ||
| 4333 | "*Mode-specific function which line breaks and continues a comment. | ||
| 4334 | |||
| 4335 | This function is only called during auto-filling of a comment section. | ||
| 4336 | The function should take a single optional argument, which is a flag | ||
| 4337 | indicating whether it should use soft newlines.") | ||
| 4338 | |||
| 4339 | ;; This function is used as the auto-fill-function of a buffer | 4332 | ;; This function is used as the auto-fill-function of a buffer |
| 4340 | ;; when Auto-Fill mode is enabled. | 4333 | ;; when Auto-Fill mode is enabled. |
| 4341 | ;; It returns t if it really did any work. | 4334 | ;; It returns t if it really did any work. |
| @@ -4409,10 +4402,10 @@ indicating whether it should use soft newlines.") | |||
| 4409 | (if (save-excursion | 4402 | (if (save-excursion |
| 4410 | (skip-chars-backward " \t") | 4403 | (skip-chars-backward " \t") |
| 4411 | (= (point) fill-point)) | 4404 | (= (point) fill-point)) |
| 4412 | (funcall comment-line-break-function t) | 4405 | (default-indent-new-line t) |
| 4413 | (save-excursion | 4406 | (save-excursion |
| 4414 | (goto-char fill-point) | 4407 | (goto-char fill-point) |
| 4415 | (funcall comment-line-break-function t))) | 4408 | (default-indent-new-line t))) |
| 4416 | ;; Now do justification, if required | 4409 | ;; Now do justification, if required |
| 4417 | (if (not (eq justify 'left)) | 4410 | (if (not (eq justify 'left)) |
| 4418 | (save-excursion | 4411 | (save-excursion |
| @@ -4427,6 +4420,43 @@ indicating whether it should use soft newlines.") | |||
| 4427 | (justify-current-line justify t t) | 4420 | (justify-current-line justify t t) |
| 4428 | t))) | 4421 | t))) |
| 4429 | 4422 | ||
| 4423 | (defvar comment-line-break-function 'comment-indent-new-line | ||
| 4424 | "*Mode-specific function which line breaks and continues a comment. | ||
| 4425 | This function is called during auto-filling when a comment syntax | ||
| 4426 | is defined. | ||
| 4427 | The function should take a single optional argument, which is a flag | ||
| 4428 | indicating whether it should use soft newlines.") | ||
| 4429 | |||
| 4430 | (defun default-indent-new-line (&optional soft) | ||
| 4431 | "Break line at point and indent. | ||
| 4432 | If a comment syntax is defined, call `comment-indent-new-line'. | ||
| 4433 | |||
| 4434 | The inserted newline is marked hard if variable `use-hard-newlines' is true, | ||
| 4435 | unless optional argument SOFT is non-nil." | ||
| 4436 | (interactive) | ||
| 4437 | (if comment-start | ||
| 4438 | (funcall comment-line-break-function soft) | ||
| 4439 | ;; Insert the newline before removing empty space so that markers | ||
| 4440 | ;; get preserved better. | ||
| 4441 | (if soft (insert-and-inherit ?\n) (newline 1)) | ||
| 4442 | (save-excursion (forward-char -1) (delete-horizontal-space)) | ||
| 4443 | (delete-horizontal-space) | ||
| 4444 | |||
| 4445 | (if (and fill-prefix (not adaptive-fill-mode)) | ||
| 4446 | ;; Blindly trust a non-adaptive fill-prefix. | ||
| 4447 | (progn | ||
| 4448 | (indent-to-left-margin) | ||
| 4449 | (insert-before-markers-and-inherit fill-prefix)) | ||
| 4450 | |||
| 4451 | (cond | ||
| 4452 | ;; If there's an adaptive prefix, use it unless we're inside | ||
| 4453 | ;; a comment and the prefix is not a comment starter. | ||
| 4454 | (fill-prefix | ||
| 4455 | (indent-to-left-margin) | ||
| 4456 | (insert-and-inherit fill-prefix)) | ||
| 4457 | ;; If we're not inside a comment, just try to indent. | ||
| 4458 | (t (indent-according-to-mode)))))) | ||
| 4459 | |||
| 4430 | (defvar normal-auto-fill-function 'do-auto-fill | 4460 | (defvar normal-auto-fill-function 'do-auto-fill |
| 4431 | "The function to use for `auto-fill-function' if Auto Fill mode is turned on. | 4461 | "The function to use for `auto-fill-function' if Auto Fill mode is turned on. |
| 4432 | Some major modes set this.") | 4462 | Some major modes set this.") |
| @@ -4505,8 +4535,9 @@ The variable `selective-display' has a separate value for each buffer." | |||
| 4505 | 4535 | ||
| 4506 | (defun toggle-truncate-lines (&optional arg) | 4536 | (defun toggle-truncate-lines (&optional arg) |
| 4507 | "Toggle whether to fold or truncate long lines for the current buffer. | 4537 | "Toggle whether to fold or truncate long lines for the current buffer. |
| 4508 | With arg, truncate long lines iff arg is positive. | 4538 | With prefix argument ARG, truncate long lines if ARG is positive, |
| 4509 | Note that in side-by-side windows, truncation is always enabled." | 4539 | otherwise don't truncate them. Note that in side-by-side |
| 4540 | windows, truncation is always enabled." | ||
| 4510 | (interactive "P") | 4541 | (interactive "P") |
| 4511 | (setq truncate-lines | 4542 | (setq truncate-lines |
| 4512 | (if (null arg) | 4543 | (if (null arg) |
| @@ -4529,11 +4560,11 @@ Note that in side-by-side windows, truncation is always enabled." | |||
| 4529 | 4560 | ||
| 4530 | (defun overwrite-mode (arg) | 4561 | (defun overwrite-mode (arg) |
| 4531 | "Toggle overwrite mode. | 4562 | "Toggle overwrite mode. |
| 4532 | With arg, turn overwrite mode on iff arg is positive. | 4563 | With prefix argument ARG, turn overwrite mode on if ARG is positive, |
| 4533 | In overwrite mode, printing characters typed in replace existing text | 4564 | otherwise turn it off. In overwrite mode, printing characters typed |
| 4534 | on a one-for-one basis, rather than pushing it to the right. At the | 4565 | in replace existing text on a one-for-one basis, rather than pushing |
| 4535 | end of a line, such characters extend the line. Before a tab, | 4566 | it to the right. At the end of a line, such characters extend the line. |
| 4536 | such characters insert until the tab is filled in. | 4567 | Before a tab, such characters insert until the tab is filled in. |
| 4537 | \\[quoted-insert] still inserts characters in overwrite mode; this | 4568 | \\[quoted-insert] still inserts characters in overwrite mode; this |
| 4538 | is supposed to make it easier to insert characters when necessary." | 4569 | is supposed to make it easier to insert characters when necessary." |
| 4539 | (interactive "P") | 4570 | (interactive "P") |
| @@ -4545,14 +4576,13 @@ is supposed to make it easier to insert characters when necessary." | |||
| 4545 | 4576 | ||
| 4546 | (defun binary-overwrite-mode (arg) | 4577 | (defun binary-overwrite-mode (arg) |
| 4547 | "Toggle binary overwrite mode. | 4578 | "Toggle binary overwrite mode. |
| 4548 | With arg, turn binary overwrite mode on iff arg is positive. | 4579 | With prefix argument ARG, turn binary overwrite mode on if ARG is |
| 4549 | In binary overwrite mode, printing characters typed in replace | 4580 | positive, otherwise turn it off. In binary overwrite mode, printing |
| 4550 | existing text. Newlines are not treated specially, so typing at the | 4581 | characters typed in replace existing text. Newlines are not treated |
| 4551 | end of a line joins the line to the next, with the typed character | 4582 | specially, so typing at the end of a line joins the line to the next, |
| 4552 | between them. Typing before a tab character simply replaces the tab | 4583 | with the typed character between them. Typing before a tab character |
| 4553 | with the character typed. | 4584 | simply replaces the tab with the character typed. \\[quoted-insert] |
| 4554 | \\[quoted-insert] replaces the text at the cursor, just as ordinary | 4585 | replaces the text at the cursor, just as ordinary typing characters do. |
| 4555 | typing characters do. | ||
| 4556 | 4586 | ||
| 4557 | Note that binary overwrite mode is not its own minor mode; it is a | 4587 | Note that binary overwrite mode is not its own minor mode; it is a |
| 4558 | specialization of overwrite mode, entered by setting the | 4588 | specialization of overwrite mode, entered by setting the |
| @@ -4567,9 +4597,9 @@ specialization of overwrite mode, entered by setting the | |||
| 4567 | 4597 | ||
| 4568 | (define-minor-mode line-number-mode | 4598 | (define-minor-mode line-number-mode |
| 4569 | "Toggle Line Number mode. | 4599 | "Toggle Line Number mode. |
| 4570 | With arg, turn Line Number mode on iff arg is positive. | 4600 | With arg, turn Line Number mode on if arg is positive, otherwise |
| 4571 | When Line Number mode is enabled, the line number appears | 4601 | turn it off. When Line Number mode is enabled, the line number |
| 4572 | in the mode line. | 4602 | appears in the mode line. |
| 4573 | 4603 | ||
| 4574 | Line numbers do not appear for very large buffers and buffers | 4604 | Line numbers do not appear for very large buffers and buffers |
| 4575 | with very long lines; see variables `line-number-display-limit' | 4605 | with very long lines; see variables `line-number-display-limit' |
| @@ -4578,16 +4608,16 @@ and `line-number-display-limit-width'." | |||
| 4578 | 4608 | ||
| 4579 | (define-minor-mode column-number-mode | 4609 | (define-minor-mode column-number-mode |
| 4580 | "Toggle Column Number mode. | 4610 | "Toggle Column Number mode. |
| 4581 | With arg, turn Column Number mode on iff arg is positive. | 4611 | With arg, turn Column Number mode on if arg is positive, |
| 4582 | When Column Number mode is enabled, the column number appears | 4612 | otherwise turn it off. When Column Number mode is enabled, the |
| 4583 | in the mode line." | 4613 | column number appears in the mode line." |
| 4584 | :global t :group 'mode-line) | 4614 | :global t :group 'mode-line) |
| 4585 | 4615 | ||
| 4586 | (define-minor-mode size-indication-mode | 4616 | (define-minor-mode size-indication-mode |
| 4587 | "Toggle Size Indication mode. | 4617 | "Toggle Size Indication mode. |
| 4588 | With arg, turn Size Indication mode on iff arg is positive. When | 4618 | With arg, turn Size Indication mode on if arg is positive, |
| 4589 | Size Indication mode is enabled, the size of the accessible part | 4619 | otherwise turn it off. When Size Indication mode is enabled, the |
| 4590 | of the buffer appears in the mode line." | 4620 | size of the accessible part of the buffer appears in the mode line." |
| 4591 | :global t :group 'mode-line) | 4621 | :global t :group 'mode-line) |
| 4592 | 4622 | ||
| 4593 | (defgroup paren-blinking nil | 4623 | (defgroup paren-blinking nil |
| @@ -5122,7 +5152,7 @@ With prefix argument N, move N items (negative N means move backward)." | |||
| 5122 | These functions are called in order with four arguments: | 5152 | These functions are called in order with four arguments: |
| 5123 | CHOICE - the string to insert in the buffer, | 5153 | CHOICE - the string to insert in the buffer, |
| 5124 | BUFFER - the buffer in which the choice should be inserted, | 5154 | BUFFER - the buffer in which the choice should be inserted, |
| 5125 | MINI-P - non-nil iff BUFFER is a minibuffer, and | 5155 | MINI-P - non-nil if BUFFER is a minibuffer, and |
| 5126 | BASE-SIZE - the number of characters in BUFFER before | 5156 | BASE-SIZE - the number of characters in BUFFER before |
| 5127 | the string being completed. | 5157 | the string being completed. |
| 5128 | 5158 | ||
| @@ -5730,7 +5760,8 @@ See also `normal-erase-is-backspace'." | |||
| 5730 | 5760 | ||
| 5731 | (define-minor-mode visible-mode | 5761 | (define-minor-mode visible-mode |
| 5732 | "Toggle Visible mode. | 5762 | "Toggle Visible mode. |
| 5733 | With argument ARG turn Visible mode on iff ARG is positive. | 5763 | With argument ARG turn Visible mode on if ARG is positive, otherwise |
| 5764 | turn it off. | ||
| 5734 | 5765 | ||
| 5735 | Enabling Visible mode makes all invisible text temporarily visible. | 5766 | Enabling Visible mode makes all invisible text temporarily visible. |
| 5736 | Disabling Visible mode turns off that effect. Visible mode | 5767 | Disabling Visible mode turns off that effect. Visible mode |
diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 33e223e4b2b..4425bb0389a 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el | |||
| @@ -209,8 +209,8 @@ If ELEMENT is a string or a character it gets inserted (see also | |||
| 209 | interesting point set by _ | 209 | interesting point set by _ |
| 210 | > indent line (or interregion if > _) according to major mode | 210 | > indent line (or interregion if > _) according to major mode |
| 211 | @ add position to `skeleton-positions' | 211 | @ add position to `skeleton-positions' |
| 212 | & do next ELEMENT iff previous moved point | 212 | & do next ELEMENT if previous moved point |
| 213 | | do next ELEMENT iff previous didn't move point | 213 | | do next ELEMENT if previous didn't move point |
| 214 | -num delete num preceding characters (see `skeleton-untabify') | 214 | -num delete num preceding characters (see `skeleton-untabify') |
| 215 | resume: skipped, continue here if quit is signaled | 215 | resume: skipped, continue here if quit is signaled |
| 216 | nil skipped | 216 | nil skipped |
diff --git a/lisp/strokes.el b/lisp/strokes.el index 528ea477363..de4123453f5 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el | |||
| @@ -1370,7 +1370,7 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." | |||
| 1370 | (goto-char (point-min)))) | 1370 | (goto-char (point-min)))) |
| 1371 | 1371 | ||
| 1372 | (defun strokes-alphabetic-lessp (stroke1 stroke2) | 1372 | (defun strokes-alphabetic-lessp (stroke1 stroke2) |
| 1373 | "T iff command name for STROKE1 is less than STROKE2's in lexicographic order." | 1373 | "T if command name for STROKE1 is less than STROKE2's in lexicographic order." |
| 1374 | (let ((command-name-1 (symbol-name (cdr stroke1))) | 1374 | (let ((command-name-1 (symbol-name (cdr stroke1))) |
| 1375 | (command-name-2 (symbol-name (cdr stroke2)))) | 1375 | (command-name-2 (symbol-name (cdr stroke2)))) |
| 1376 | (string-lessp command-name-1 command-name-2))) | 1376 | (string-lessp command-name-1 command-name-2))) |
| @@ -1520,7 +1520,7 @@ Encode/decode your strokes with \\[strokes-encode-buffer], | |||
| 1520 | (eq char ?*))) | 1520 | (eq char ?*))) |
| 1521 | 1521 | ||
| 1522 | ;;(defsubst strokes-xor (a b) ### Should I make this an inline function? ### | 1522 | ;;(defsubst strokes-xor (a b) ### Should I make this an inline function? ### |
| 1523 | ;; "T iff one and only one of A and B is non-nil; otherwise, returns nil. | 1523 | ;; "T if one and only one of A and B is non-nil; otherwise, returns nil. |
| 1524 | ;;NOTE: Don't use this as a numeric xor since it treats all non-nil | 1524 | ;;NOTE: Don't use this as a numeric xor since it treats all non-nil |
| 1525 | ;; values as t including `0' (zero)." | 1525 | ;; values as t including `0' (zero)." |
| 1526 | ;; (eq (null a) (not (null b)))) | 1526 | ;; (eq (null a) (not (null b)))) |
diff --git a/lisp/subr.el b/lisp/subr.el index 97f73251c03..a74b6828dd5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2836,11 +2836,10 @@ Modifies the match data; use `save-match-data' if necessary." | |||
| 2836 | list))) | 2836 | list))) |
| 2837 | (nreverse list))) | 2837 | (nreverse list))) |
| 2838 | 2838 | ||
| 2839 | ;; (string->strings (strings->string X)) == X | 2839 | (defun combine-and-quote-strings (strings &optional separator) |
| 2840 | (defun strings->string (strings &optional separator) | ||
| 2841 | "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). | 2840 | "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). |
| 2842 | This tries to quote the strings to avoid ambiguity such that | 2841 | This tries to quote the strings to avoid ambiguity such that |
| 2843 | (string->strings (strings->string strs)) == strs | 2842 | (split-string-and-unquote (combine-and-quote-strings strs)) == strs |
| 2844 | Only some SEPARATORs will work properly." | 2843 | Only some SEPARATORs will work properly." |
| 2845 | (let ((sep (or separator " "))) | 2844 | (let ((sep (or separator " "))) |
| 2846 | (mapconcat | 2845 | (mapconcat |
| @@ -2850,20 +2849,20 @@ Only some SEPARATORs will work properly." | |||
| 2850 | str)) | 2849 | str)) |
| 2851 | strings sep))) | 2850 | strings sep))) |
| 2852 | 2851 | ||
| 2853 | ;; (string->strings (strings->string X)) == X | 2852 | (defun split-string-and-unquote (string &optional separator) |
| 2854 | (defun string->strings (string &optional separator) | ||
| 2855 | "Split the STRING into a list of strings. | 2853 | "Split the STRING into a list of strings. |
| 2856 | It understands elisp style quoting within STRING such that | 2854 | It understands Emacs Lisp quoting within STRING, such that |
| 2857 | (string->strings (strings->string strs)) == strs | 2855 | (split-string-and-unquote (combine-and-quote-strings strs)) == strs |
| 2858 | The SEPARATOR regexp defaults to \"\\s-+\"." | 2856 | The SEPARATOR regexp defaults to \"\\s-+\"." |
| 2859 | (let ((sep (or separator "\\s-+")) | 2857 | (let ((sep (or separator "\\s-+")) |
| 2860 | (i (string-match "[\"]" string))) | 2858 | (i (string-match "[\"]" string))) |
| 2861 | (if (null i) (split-string string sep t) ; no quoting: easy | 2859 | (if (null i) |
| 2860 | (split-string string sep t) ; no quoting: easy | ||
| 2862 | (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) | 2861 | (append (unless (eq i 0) (split-string (substring string 0 i) sep t)) |
| 2863 | (let ((rfs (read-from-string string i))) | 2862 | (let ((rfs (read-from-string string i))) |
| 2864 | (cons (car rfs) | 2863 | (cons (car rfs) |
| 2865 | (string->strings (substring string (cdr rfs)) | 2864 | (split-string-and-unquote (substring string (cdr rfs)) |
| 2866 | sep))))))) | 2865 | sep))))))) |
| 2867 | 2866 | ||
| 2868 | 2867 | ||
| 2869 | ;;;; Replacement in strings. | 2868 | ;;;; Replacement in strings. |
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index c97f5afcf9c..821bad4e819 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el | |||
| @@ -42,7 +42,8 @@ | |||
| 42 | ;;;###autoload | 42 | ;;;###autoload |
| 43 | (define-minor-mode t-mouse-mode | 43 | (define-minor-mode t-mouse-mode |
| 44 | "Toggle t-mouse mode to use the mouse in Linux consoles. | 44 | "Toggle t-mouse mode to use the mouse in Linux consoles. |
| 45 | With prefix arg, turn t-mouse mode on iff arg is positive. | 45 | With prefix arg, turn t-mouse mode on if arg is positive, otherwise turn it |
| 46 | off. | ||
| 46 | 47 | ||
| 47 | This allows the use of the mouse when operating on a Linux console, in the | 48 | This allows the use of the mouse when operating on a Linux console, in the |
| 48 | same way as you can use the mouse under X11. | 49 | same way as you can use the mouse under X11. |
diff --git a/lisp/term.el b/lisp/term.el index 78c384475c1..21e7aa4f957 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -407,8 +407,7 @@ | |||
| 407 | 407 | ||
| 408 | (defgroup term nil | 408 | (defgroup term nil |
| 409 | "General command interpreter in a window." | 409 | "General command interpreter in a window." |
| 410 | :group 'processes | 410 | :group 'processes) |
| 411 | :group 'unix) | ||
| 412 | 411 | ||
| 413 | 412 | ||
| 414 | ;;; Buffer Local Variables: | 413 | ;;; Buffer Local Variables: |
| @@ -470,7 +469,7 @@ | |||
| 470 | (defvar term-scroll-with-delete nil) ;; term-scroll-with-delete is t if | 469 | (defvar term-scroll-with-delete nil) ;; term-scroll-with-delete is t if |
| 471 | ;; forward scrolling should be implemented by delete to | 470 | ;; forward scrolling should be implemented by delete to |
| 472 | ;; top-most line(s); and nil if scrolling should be implemented | 471 | ;; top-most line(s); and nil if scrolling should be implemented |
| 473 | ;; by moving term-home-marker. It is set to t iff there is a | 472 | ;; by moving term-home-marker. It is set to t if there is a |
| 474 | ;; (non-default) scroll-region OR the alternate buffer is used. | 473 | ;; (non-default) scroll-region OR the alternate buffer is used. |
| 475 | (defvar term-pending-delete-marker) ;; New user input in line mode needs to | 474 | (defvar term-pending-delete-marker) ;; New user input in line mode needs to |
| 476 | ;; be deleted, because it gets echoed by the inferior. | 475 | ;; be deleted, because it gets echoed by the inferior. |
| @@ -695,12 +694,12 @@ Buffer local variable.") | |||
| 695 | 694 | ||
| 696 | ;;; faces -mm | 695 | ;;; faces -mm |
| 697 | 696 | ||
| 698 | (defcustom term-default-fg-color 'unspecified | 697 | (defcustom term-default-fg-color (face-foreground term-current-face) |
| 699 | "Default color for foreground in `term'." | 698 | "Default color for foreground in `term'." |
| 700 | :group 'term | 699 | :group 'term |
| 701 | :type 'string) | 700 | :type 'string) |
| 702 | 701 | ||
| 703 | (defcustom term-default-bg-color 'unspecified | 702 | (defcustom term-default-bg-color (face-background term-current-face) |
| 704 | "Default color for background in `term'." | 703 | "Default color for background in `term'." |
| 705 | :group 'term | 704 | :group 'term |
| 706 | :type 'string) | 705 | :type 'string) |
| @@ -1096,6 +1095,8 @@ Entry to this mode runs the hooks on `term-mode-hook'." | |||
| 1096 | (make-local-variable 'term-pending-delete-marker) | 1095 | (make-local-variable 'term-pending-delete-marker) |
| 1097 | (setq term-pending-delete-marker (make-marker)) | 1096 | (setq term-pending-delete-marker (make-marker)) |
| 1098 | (make-local-variable 'term-current-face) | 1097 | (make-local-variable 'term-current-face) |
| 1098 | (setq term-current-face (list :background term-default-bg-color | ||
| 1099 | :foreground term-default-fg-color)) | ||
| 1099 | (make-local-variable 'term-pending-frame) | 1100 | (make-local-variable 'term-pending-frame) |
| 1100 | (setq term-pending-frame nil) | 1101 | (setq term-pending-frame nil) |
| 1101 | ;; Cua-mode's keybindings interfere with the term keybindings, disable it. | 1102 | ;; Cua-mode's keybindings interfere with the term keybindings, disable it. |
| @@ -3053,7 +3054,8 @@ See `term-prompt-regexp'." | |||
| 3053 | (setq term-scroll-start 0) | 3054 | (setq term-scroll-start 0) |
| 3054 | (setq term-scroll-end term-height) | 3055 | (setq term-scroll-end term-height) |
| 3055 | (setq term-insert-mode nil) | 3056 | (setq term-insert-mode nil) |
| 3056 | (setq term-current-face nil) | 3057 | (setq term-current-face (list :background term-default-bg-color |
| 3058 | :foreground term-default-fg-color)) | ||
| 3057 | (setq term-ansi-current-underline nil) | 3059 | (setq term-ansi-current-underline nil) |
| 3058 | (setq term-ansi-current-bold nil) | 3060 | (setq term-ansi-current-bold nil) |
| 3059 | (setq term-ansi-current-reverse nil) | 3061 | (setq term-ansi-current-reverse nil) |
| @@ -3115,7 +3117,8 @@ See `term-prompt-regexp'." | |||
| 3115 | 3117 | ||
| 3116 | ;;; 0 (Reset) or unknown (reset anyway) | 3118 | ;;; 0 (Reset) or unknown (reset anyway) |
| 3117 | (t | 3119 | (t |
| 3118 | (setq term-current-face nil) | 3120 | (setq term-current-face (list :background term-default-bg-color |
| 3121 | :foreground term-default-fg-color)) | ||
| 3119 | (setq term-ansi-current-underline nil) | 3122 | (setq term-ansi-current-underline nil) |
| 3120 | (setq term-ansi-current-bold nil) | 3123 | (setq term-ansi-current-bold nil) |
| 3121 | (setq term-ansi-current-reverse nil) | 3124 | (setq term-ansi-current-reverse nil) |
| @@ -3152,11 +3155,11 @@ See `term-prompt-regexp'." | |||
| 3152 | (setq term-current-face | 3155 | (setq term-current-face |
| 3153 | (list :background | 3156 | (list :background |
| 3154 | (if (= term-ansi-current-color 0) | 3157 | (if (= term-ansi-current-color 0) |
| 3155 | (face-foreground 'default) | 3158 | term-default-fg-color |
| 3156 | (elt ansi-term-color-vector term-ansi-current-color)) | 3159 | (elt ansi-term-color-vector term-ansi-current-color)) |
| 3157 | :foreground | 3160 | :foreground |
| 3158 | (if (= term-ansi-current-bg-color 0) | 3161 | (if (= term-ansi-current-bg-color 0) |
| 3159 | (face-background 'default) | 3162 | term-default-bg-color |
| 3160 | (elt ansi-term-color-vector term-ansi-current-bg-color)))) | 3163 | (elt ansi-term-color-vector term-ansi-current-bg-color)))) |
| 3161 | (when term-ansi-current-bold | 3164 | (when term-ansi-current-bold |
| 3162 | (setq term-current-face | 3165 | (setq term-current-face |
| @@ -3179,9 +3182,13 @@ See `term-prompt-regexp'." | |||
| 3179 | ) | 3182 | ) |
| 3180 | (setq term-current-face | 3183 | (setq term-current-face |
| 3181 | (list :foreground | 3184 | (list :foreground |
| 3182 | (elt ansi-term-color-vector term-ansi-current-color) | 3185 | (if (= term-ansi-current-color 0) |
| 3186 | term-default-fg-color | ||
| 3187 | (elt ansi-term-color-vector term-ansi-current-color)) | ||
| 3183 | :background | 3188 | :background |
| 3184 | (elt ansi-term-color-vector term-ansi-current-bg-color))) | 3189 | (if (= term-ansi-current-bg-color 0) |
| 3190 | term-default-bg-color | ||
| 3191 | (elt ansi-term-color-vector term-ansi-current-bg-color)))) | ||
| 3185 | (when term-ansi-current-bold | 3192 | (when term-ansi-current-bold |
| 3186 | (setq term-current-face | 3193 | (setq term-current-face |
| 3187 | (append '(:weight bold) term-current-face))) | 3194 | (append '(:weight bold) term-current-face))) |
| @@ -3713,12 +3720,12 @@ all pending output has been dealt with.")) | |||
| 3713 | (defun term-erase-in-display (kind) | 3720 | (defun term-erase-in-display (kind) |
| 3714 | "Erases (that is blanks out) part of the window. | 3721 | "Erases (that is blanks out) part of the window. |
| 3715 | If KIND is 0, erase from (point) to (point-max); | 3722 | If KIND is 0, erase from (point) to (point-max); |
| 3716 | if KIND is 1, erase from home to point; else erase from home to point-max. | 3723 | if KIND is 1, erase from home to point; else erase from home to point-max." |
| 3717 | Should only be called when point is at the start of a screen line." | ||
| 3718 | (term-handle-deferred-scroll) | 3724 | (term-handle-deferred-scroll) |
| 3719 | (cond ((eq term-terminal-parameter 0) | 3725 | (cond ((eq term-terminal-parameter 0) |
| 3720 | (delete-region (point) (point-max)) | 3726 | (let ((need-unwrap (bolp))) |
| 3721 | (term-unwrap-line)) | 3727 | (delete-region (point) (point-max)) |
| 3728 | (when need-unwrap (term-unwrap-line)))) | ||
| 3722 | ((let ((row (term-current-row)) | 3729 | ((let ((row (term-current-row)) |
| 3723 | (col (term-horizontal-column)) | 3730 | (col (term-horizontal-column)) |
| 3724 | (start-region term-home-marker) | 3731 | (start-region term-home-marker) |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index af4c7e29525..6d3d4de11e3 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1760,6 +1760,19 @@ in `selection-converter-alist', which see." | |||
| 1760 | (setq modifiers (cons (car modifier-mask) modifiers))))) | 1760 | (setq modifiers (cons (car modifier-mask) modifiers))))) |
| 1761 | modifiers)) | 1761 | modifiers)) |
| 1762 | 1762 | ||
| 1763 | (defun mac-ae-reopen-application (event) | ||
| 1764 | "Show some frame in response to the Apple event EVENT. | ||
| 1765 | The frame to be shown is chosen from visible or iconified frames | ||
| 1766 | if possible. If there's no such frame, a new frame is created." | ||
| 1767 | (interactive "e") | ||
| 1768 | (unless (frame-visible-p (selected-frame)) | ||
| 1769 | (let ((frame (or (car (visible-frame-list)) | ||
| 1770 | (car (filtered-frame-list 'frame-visible-p))))) | ||
| 1771 | (if frame | ||
| 1772 | (select-frame frame) | ||
| 1773 | (switch-to-buffer-other-frame "*scratch*")))) | ||
| 1774 | (select-frame-set-input-focus (selected-frame))) | ||
| 1775 | |||
| 1763 | (defun mac-ae-open-documents (event) | 1776 | (defun mac-ae-open-documents (event) |
| 1764 | "Open the documents specified by the Apple event EVENT." | 1777 | "Open the documents specified by the Apple event EVENT." |
| 1765 | (interactive "e") | 1778 | (interactive "e") |
| @@ -1816,9 +1829,9 @@ Currently the `mailto' scheme is supported." | |||
| 1816 | (define-key mac-apple-event-map [core-event open-application] 0) | 1829 | (define-key mac-apple-event-map [core-event open-application] 0) |
| 1817 | 1830 | ||
| 1818 | ;; Received when a dock or application icon is clicked and Emacs is | 1831 | ;; Received when a dock or application icon is clicked and Emacs is |
| 1819 | ;; already running. Simply ignored. Another idea is to make a new | 1832 | ;; already running. |
| 1820 | ;; frame if all frames are invisible. | 1833 | (define-key mac-apple-event-map [core-event reopen-application] |
| 1821 | (define-key mac-apple-event-map [core-event reopen-application] 'ignore) | 1834 | 'mac-ae-reopen-application) |
| 1822 | 1835 | ||
| 1823 | (define-key mac-apple-event-map [core-event open-documents] | 1836 | (define-key mac-apple-event-map [core-event open-documents] |
| 1824 | 'mac-ae-open-documents) | 1837 | 'mac-ae-open-documents) |
diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el index 280bfb67081..65ebe193c71 100644 --- a/lisp/term/sun-mouse.el +++ b/lisp/term/sun-mouse.el | |||
| @@ -230,7 +230,7 @@ Handles wrapped and horizontally scrolled lines correctly." | |||
| 230 | 230 | ||
| 231 | 231 | ||
| 232 | (defun minibuffer-window-p (window) | 232 | (defun minibuffer-window-p (window) |
| 233 | "True iff this WINDOW is minibuffer." | 233 | "True if this WINDOW is minibuffer." |
| 234 | (= (frame-height) | 234 | (= (frame-height) |
| 235 | (nth 3 (window-edges window)) ; The bottom edge. | 235 | (nth 3 (window-edges window)) ; The bottom edge. |
| 236 | )) | 236 | )) |
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 4af21f08522..1c0bda519ac 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el | |||
| @@ -106,8 +106,8 @@ | |||
| 106 | 106 | ||
| 107 | ;;; Should keypad numbers send ordinary digits or distinct escape sequences? | 107 | ;;; Should keypad numbers send ordinary digits or distinct escape sequences? |
| 108 | (defvar tvi970-keypad-numeric nil | 108 | (defvar tvi970-keypad-numeric nil |
| 109 | "The terminal should be in numeric keypad mode iff this variable is non-nil. | 109 | "Non-nil means the terminal should be in numeric keypad mode. |
| 110 | Do not set this variable! Call the function ``tvi970-set-keypad-mode''.") | 110 | Do not set this variable! Call the function `tvi970-set-keypad-mode'.") |
| 111 | 111 | ||
| 112 | (defun tvi970-set-keypad-mode (&optional arg) | 112 | (defun tvi970-set-keypad-mode (&optional arg) |
| 113 | "Set the current mode of the TVI 970 numeric keypad. | 113 | "Set the current mode of the TVI 970 numeric keypad. |
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index dbb41f13ec0..274de28e6a0 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -1768,7 +1768,7 @@ info-variant-part." | |||
| 1768 | ;; Macro that won't funcall the function if it is nil. | 1768 | ;; Macro that won't funcall the function if it is nil. |
| 1769 | ;; | 1769 | ;; |
| 1770 | (defmacro artist-funcall (fn &rest args) | 1770 | (defmacro artist-funcall (fn &rest args) |
| 1771 | "Call function FN with ARGS iff FN is not nil." | 1771 | "Call function FN with ARGS, if FN is not nil." |
| 1772 | (list 'if fn (cons 'funcall (cons fn args)))) | 1772 | (list 'if fn (cons 'funcall (cons fn args)))) |
| 1773 | 1773 | ||
| 1774 | (defun artist-uniq (l) | 1774 | (defun artist-uniq (l) |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 8b95a159477..0b5dfa4cc54 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -457,7 +457,8 @@ See also `flyspell-duplicate-distance'." | |||
| 457 | This spawns a single Ispell process and checks each word. | 457 | This spawns a single Ispell process and checks each word. |
| 458 | The default flyspell behavior is to highlight incorrect words. | 458 | The default flyspell behavior is to highlight incorrect words. |
| 459 | With no argument, this command toggles Flyspell mode. | 459 | With no argument, this command toggles Flyspell mode. |
| 460 | With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive. | 460 | With a prefix argument ARG, turn Flyspell minor mode on if ARG is positive, |
| 461 | otherwise turn it off. | ||
| 461 | 462 | ||
| 462 | Bindings: | 463 | Bindings: |
| 463 | \\[ispell-word]: correct words (using Ispell). | 464 | \\[ispell-word]: correct words (using Ispell). |
| @@ -1621,7 +1622,7 @@ FLYSPELL-BUFFER." | |||
| 1621 | ;;* flyspell-overlay-p ... */ | 1622 | ;;* flyspell-overlay-p ... */ |
| 1622 | ;;*---------------------------------------------------------------------*/ | 1623 | ;;*---------------------------------------------------------------------*/ |
| 1623 | (defun flyspell-overlay-p (o) | 1624 | (defun flyspell-overlay-p (o) |
| 1624 | "A predicate that return true iff O is an overlay used by flyspell." | 1625 | "Return true if O is an overlay used by flyspell." |
| 1625 | (and (overlayp o) (overlay-get o 'flyspell-overlay))) | 1626 | (and (overlayp o) (overlay-get o 'flyspell-overlay))) |
| 1626 | 1627 | ||
| 1627 | ;;*---------------------------------------------------------------------*/ | 1628 | ;;*---------------------------------------------------------------------*/ |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index f23940d480f..bf1487f02e2 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -3294,7 +3294,8 @@ available on the net." | |||
| 3294 | ;;;###autoload | 3294 | ;;;###autoload |
| 3295 | (defun ispell-minor-mode (&optional arg) | 3295 | (defun ispell-minor-mode (&optional arg) |
| 3296 | "Toggle Ispell minor mode. | 3296 | "Toggle Ispell minor mode. |
| 3297 | With prefix arg, turn Ispell minor mode on iff arg is positive. | 3297 | With prefix argument ARG, turn Ispell minor mode on if ARG is positive, |
| 3298 | otherwise turn it off. | ||
| 3298 | 3299 | ||
| 3299 | In Ispell minor mode, pressing SPC or RET | 3300 | In Ispell minor mode, pressing SPC or RET |
| 3300 | warns you if the previous word is incorrectly spelled. | 3301 | warns you if the previous word is incorrectly spelled. |
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 45d407b2565..31ec234fddc 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el | |||
| @@ -263,7 +263,7 @@ automatically inserts the matching closing request after point." | |||
| 263 | `nroff-electric-newline' forces Emacs to check for an nroff request at the | 263 | `nroff-electric-newline' forces Emacs to check for an nroff request at the |
| 264 | beginning of the line, and insert the matching closing request if necessary. | 264 | beginning of the line, and insert the matching closing request if necessary. |
| 265 | This command toggles that mode (off->on, on->off), with an argument, | 265 | This command toggles that mode (off->on, on->off), with an argument, |
| 266 | turns it on iff arg is positive, otherwise off." | 266 | turns it on if arg is positive, otherwise off." |
| 267 | :lighter " Electric" | 267 | :lighter " Electric" |
| 268 | (or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode"))) | 268 | (or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode"))) |
| 269 | 269 | ||
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index a20a482a1c9..3717faa8ad2 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el | |||
| @@ -217,7 +217,7 @@ complex processing.") | |||
| 217 | ;;;###autoload | 217 | ;;;###autoload |
| 218 | (define-minor-mode refill-mode | 218 | (define-minor-mode refill-mode |
| 219 | "Toggle Refill minor mode. | 219 | "Toggle Refill minor mode. |
| 220 | With prefix arg, turn Refill mode on iff arg is positive. | 220 | With prefix arg, turn Refill mode on if arg is positive, otherwise turn it off. |
| 221 | 221 | ||
| 222 | When Refill mode is on, the current paragraph will be formatted when | 222 | When Refill mode is on, the current paragraph will be formatted when |
| 223 | changes are made within it. Self-inserting characters only cause | 223 | changes are made within it. Self-inserting characters only cause |
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index c551083240c..2a39949431c 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el | |||
| @@ -431,7 +431,7 @@ the current TeX document. | |||
| 431 | 431 | ||
| 432 | With no argument, this command toggles | 432 | With no argument, this command toggles |
| 433 | `reftex-isearch-minor-mode'. With a prefix argument ARG, turn | 433 | `reftex-isearch-minor-mode'. With a prefix argument ARG, turn |
| 434 | `reftex-isearch-minor-mode' on iff ARG is positive." | 434 | `reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off." |
| 435 | (interactive "P") | 435 | (interactive "P") |
| 436 | (let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode)) | 436 | (let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode)) |
| 437 | (setq reftex-isearch-minor-mode | 437 | (setq reftex-isearch-minor-mode |
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index b5d734bc19a..181234e429a 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el | |||
| @@ -824,7 +824,7 @@ Return non-nil if we skipped over matched tags." | |||
| 824 | (defun sgml-skip-tag-forward (arg) | 824 | (defun sgml-skip-tag-forward (arg) |
| 825 | "Skip to end of tag or matching closing tag if present. | 825 | "Skip to end of tag or matching closing tag if present. |
| 826 | With prefix argument ARG, repeat this ARG times. | 826 | With prefix argument ARG, repeat this ARG times. |
| 827 | Return t iff after a closing tag." | 827 | Return t if after a closing tag." |
| 828 | (interactive "p") | 828 | (interactive "p") |
| 829 | ;; FIXME: Use sgml-get-context or something similar. | 829 | ;; FIXME: Use sgml-get-context or something similar. |
| 830 | ;; It currently might jump to an unrelated </P> if the <P> | 830 | ;; It currently might jump to an unrelated </P> if the <P> |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 240ebbcb229..44bc31d36d6 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -249,14 +249,12 @@ Normally set to either `plain-tex-mode' or `latex-mode'." | |||
| 249 | :group 'tex) | 249 | :group 'tex) |
| 250 | (put 'tex-fontify-script 'safe-local-variable 'booleanp) | 250 | (put 'tex-fontify-script 'safe-local-variable 'booleanp) |
| 251 | 251 | ||
| 252 | (defcustom tex-font-script-display '(-0.2 . 0.2) | 252 | (defcustom tex-font-script-display '(-0.2 0.2) |
| 253 | "Display specification for subscript and superscript content. | 253 | "Display specification for subscript and superscript content. |
| 254 | The car is used for subscript, the cdr is used for superscripts." | 254 | The first is used for subscript, the second is used for superscripts." |
| 255 | :group 'tex | 255 | :group 'tex |
| 256 | :type '(cons (choice (float :tag "Subscript") | 256 | :type '(list (float :tag "Subscript") |
| 257 | (const :tag "No lowering" nil)) | 257 | (float :tag "Superscript"))) |
| 258 | (choice (float :tag "Superscript") | ||
| 259 | (const :tag "No raising" nil)))) | ||
| 260 | 258 | ||
| 261 | (defvar tex-last-temp-file nil | 259 | (defvar tex-last-temp-file nil |
| 262 | "Latest temporary file generated by \\[tex-region] and \\[tex-buffer]. | 260 | "Latest temporary file generated by \\[tex-region] and \\[tex-buffer]. |
| @@ -609,7 +607,7 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 609 | odd)) | 607 | odd)) |
| 610 | (if (eq (char-after pos) ?_) | 608 | (if (eq (char-after pos) ?_) |
| 611 | `(face subscript display (raise ,(car tex-font-script-display))) | 609 | `(face subscript display (raise ,(car tex-font-script-display))) |
| 612 | `(face superscript display (raise ,(cdr tex-font-script-display)))))) | 610 | `(face superscript display (raise ,(cadr tex-font-script-display)))))) |
| 613 | 611 | ||
| 614 | (defun tex-font-lock-match-suscript (limit) | 612 | (defun tex-font-lock-match-suscript (limit) |
| 615 | "Match subscript and superscript patterns up to LIMIT." | 613 | "Match subscript and superscript patterns up to LIMIT." |
| @@ -669,7 +667,7 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 669 | (let ((next (next-single-property-change beg 'display nil end)) | 667 | (let ((next (next-single-property-change beg 'display nil end)) |
| 670 | (prop (get-text-property beg 'display))) | 668 | (prop (get-text-property beg 'display))) |
| 671 | (if (and (eq (car-safe prop) 'raise) | 669 | (if (and (eq (car-safe prop) 'raise) |
| 672 | (member (car-safe (cdr prop)) '(-0.3 +0.3)) | 670 | (member (car-safe (cdr prop)) tex-font-script-display) |
| 673 | (null (cddr prop))) | 671 | (null (cddr prop))) |
| 674 | (put-text-property beg next 'display nil)) | 672 | (put-text-property beg next 'display nil)) |
| 675 | (setq beg next)))) | 673 | (setq beg next)))) |
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 2568b53fe36..e1f55c0dece 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el | |||
| @@ -347,8 +347,8 @@ When called again, restores the screen layout with the current buffer | |||
| 347 | first and the associated buffer to its right." | 347 | first and the associated buffer to its right." |
| 348 | (interactive "P") | 348 | (interactive "P") |
| 349 | ;; first go to full width, so that we can certainly split into two windows | 349 | ;; first go to full width, so that we can certainly split into two windows |
| 350 | (if (< (window-width) (frame-width)) | 350 | (unless (window-full-width-p) |
| 351 | (enlarge-window 99999 t)) | 351 | (enlarge-window 99999 t)) |
| 352 | (split-window-horizontally | 352 | (split-window-horizontally |
| 353 | (max window-min-width (min 2C-window-width | 353 | (max window-min-width (min 2C-window-width |
| 354 | (- (frame-width) window-min-width)))) | 354 | (- (frame-width) window-min-width)))) |
| @@ -533,8 +533,8 @@ off trailing spaces with \\[delete-trailing-whitespace]." | |||
| 533 | (insert 2C-separator string)) | 533 | (insert 2C-separator string)) |
| 534 | (next-line 1) ; add one if necessary | 534 | (next-line 1) ; add one if necessary |
| 535 | (set-buffer b2)))) | 535 | (set-buffer b2)))) |
| 536 | (if (< (window-width) (frame-width)) | 536 | (unless (window-full-width-p) |
| 537 | (enlarge-window 99999 t))) | 537 | (enlarge-window 99999 t))) |
| 538 | 538 | ||
| 539 | ;;;;; utility functions ;;;;; | 539 | ;;;;; utility functions ;;;;; |
| 540 | 540 | ||
| @@ -561,8 +561,10 @@ off trailing spaces with \\[delete-trailing-whitespace]." | |||
| 561 | (newline arg)) | 561 | (newline arg)) |
| 562 | 562 | ||
| 563 | (defun 2C-toggle-autoscroll (arg) | 563 | (defun 2C-toggle-autoscroll (arg) |
| 564 | "Toggle autoscrolling, or set it iff prefix ARG is non-nil and positive. | 564 | "Toggle autoscrolling. |
| 565 | When autoscrolling is turned on, this also realigns the two buffers." | 565 | With prefix argument ARG, turn on autoscrolling if ARG is |
| 566 | positive, otherwise turn it off. When autoscrolling is turned | ||
| 567 | on, this also realigns the two buffers." | ||
| 566 | (interactive "P") | 568 | (interactive "P") |
| 567 | ;(sit-for 0) | 569 | ;(sit-for 0) |
| 568 | (setq 2C-autoscroll-start (window-start)) | 570 | (setq 2C-autoscroll-start (window-start)) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 8bf3ca4aead..46a2bb62a75 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * url-auth.el, url-cache.el, url-dav.el, url-file.el, vc-dav.el: | ||
| 4 | Replace `iff' in doc-strings and comments. | ||
| 5 | |||
| 1 | 2007-07-25 Glenn Morris <rgm@gnu.org> | 6 | 2007-07-25 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Relicense all FSF files to GPLv3 or later. | 8 | * Relicense all FSF files to GPLv3 or later. |
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index c57a96cc81b..3c33fd914e5 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el | |||
| @@ -68,7 +68,9 @@ instead of the pathname inheritance method." | |||
| 68 | (server (url-host href)) | 68 | (server (url-host href)) |
| 69 | (port (url-port href)) | 69 | (port (url-port href)) |
| 70 | (path (url-filename href)) | 70 | (path (url-filename href)) |
| 71 | user pass byserv retval data) | 71 | (user (url-user href)) |
| 72 | (pass (url-password href)) | ||
| 73 | byserv retval data) | ||
| 72 | (setq server (format "%s:%d" server port) | 74 | (setq server (format "%s:%d" server port) |
| 73 | path (cond | 75 | path (cond |
| 74 | (realm realm) | 76 | (realm realm) |
| @@ -79,8 +81,8 @@ instead of the pathname inheritance method." | |||
| 79 | (cond | 81 | (cond |
| 80 | ((and prompt (not byserv)) | 82 | ((and prompt (not byserv)) |
| 81 | (setq user (read-string (url-auth-user-prompt url realm) | 83 | (setq user (read-string (url-auth-user-prompt url realm) |
| 82 | (user-real-login-name)) | 84 | (or user (user-real-login-name))) |
| 83 | pass (read-passwd "Password: ")) | 85 | pass (read-passwd "Password: " nil (or pass ""))) |
| 84 | (set url-basic-auth-storage | 86 | (set url-basic-auth-storage |
| 85 | (cons (list server | 87 | (cons (list server |
| 86 | (cons path | 88 | (cons path |
| @@ -310,7 +312,7 @@ RATING a rating between 1 and 10 of the strength of the authentication. | |||
| 310 | url-registered-auth-schemes))))) | 312 | url-registered-auth-schemes))))) |
| 311 | 313 | ||
| 312 | (defun url-auth-registered (scheme) | 314 | (defun url-auth-registered (scheme) |
| 313 | ;; Return non-nil iff SCHEME is registered as an auth type | 315 | "Return non-nil if SCHEME is registered as an auth type." |
| 314 | (assoc scheme url-registered-auth-schemes)) | 316 | (assoc scheme url-registered-auth-schemes)) |
| 315 | 317 | ||
| 316 | (provide 'url-auth) | 318 | (provide 'url-auth) |
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index 8fbe01d472a..6db30eacda9 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el | |||
| @@ -186,7 +186,7 @@ Very fast if you have an `md5' primitive function, suitably fast otherwise." | |||
| 186 | 186 | ||
| 187 | ;;;###autoload | 187 | ;;;###autoload |
| 188 | (defun url-cache-expired (url mod) | 188 | (defun url-cache-expired (url mod) |
| 189 | "Return t iff a cached file has expired." | 189 | "Return t if a cached file has expired." |
| 190 | (let* ((urlobj (if (vectorp url) url (url-generic-parse-url url))) | 190 | (let* ((urlobj (if (vectorp url) url (url-generic-parse-url url))) |
| 191 | (type (url-type urlobj))) | 191 | (type (url-type urlobj))) |
| 192 | (cond | 192 | (cond |
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index afae0041b68..b58c1672865 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el | |||
| @@ -562,7 +562,7 @@ FAILURE-RESULTS is a list of (URL STATUS)." | |||
| 562 | 562 | ||
| 563 | (defun url-dav-unlock-resource (url lock-token) | 563 | (defun url-dav-unlock-resource (url lock-token) |
| 564 | "Release the lock on URL represented by LOCK-TOKEN. | 564 | "Release the lock on URL represented by LOCK-TOKEN. |
| 565 | Returns t iff the lock was successfully released." | 565 | Returns t if the lock was successfully released." |
| 566 | (declare (special url-http-response-status)) | 566 | (declare (special url-http-response-status)) |
| 567 | (let* ((url-request-extra-headers (list (cons "Lock-Token" | 567 | (let* ((url-request-extra-headers (list (cons "Lock-Token" |
| 568 | (concat "<" lock-token ">")))) | 568 | (concat "<" lock-token ">")))) |
| @@ -654,13 +654,13 @@ Returns t iff the lock was successfully released." | |||
| 654 | (or (plist-get properties 'DAV:getcontentlength) 0) | 654 | (or (plist-get properties 'DAV:getcontentlength) 0) |
| 655 | 655 | ||
| 656 | ;; file modes as a string like `ls -l' | 656 | ;; file modes as a string like `ls -l' |
| 657 | ;; | 657 | ;; |
| 658 | ;; Should be able to build this up from the | 658 | ;; Should be able to build this up from the |
| 659 | ;; DAV:supportedlock attribute pretty easily. Getting | 659 | ;; DAV:supportedlock attribute pretty easily. Getting |
| 660 | ;; the group info could be impossible though. | 660 | ;; the group info could be impossible though. |
| 661 | (url-dav-file-attributes-mode-string properties) | 661 | (url-dav-file-attributes-mode-string properties) |
| 662 | 662 | ||
| 663 | ;; t iff file's gid would change if it were deleted & | 663 | ;; t if file's gid would change if it were deleted & |
| 664 | ;; recreated. No way for us to know that thru DAV. | 664 | ;; recreated. No way for us to know that thru DAV. |
| 665 | nil | 665 | nil |
| 666 | 666 | ||
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index e899493f1ce..6e771c9cd69 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el | |||
| @@ -52,7 +52,7 @@ to them." | |||
| 52 | found)) | 52 | found)) |
| 53 | 53 | ||
| 54 | (defun url-file-host-is-local-p (host) | 54 | (defun url-file-host-is-local-p (host) |
| 55 | "Return t iff HOST references our local machine." | 55 | "Return t if HOST references our local machine." |
| 56 | (let ((case-fold-search t)) | 56 | (let ((case-fold-search t)) |
| 57 | (or | 57 | (or |
| 58 | (null host) | 58 | (null host) |
diff --git a/lisp/url/vc-dav.el b/lisp/url/vc-dav.el index ce0d3275a5f..7e9b6606ca4 100644 --- a/lisp/url/vc-dav.el +++ b/lisp/url/vc-dav.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | ;;; Required functions for a vc backend | 32 | ;;; Required functions for a vc backend |
| 33 | (defun vc-dav-registered (url) | 33 | (defun vc-dav-registered (url) |
| 34 | "Return t iff URL is registered with a DAV aware server." | 34 | "Return t if URL is registered with a DAV aware server." |
| 35 | (url-dav-vc-registered url)) | 35 | (url-dav-vc-registered url)) |
| 36 | 36 | ||
| 37 | (defun vc-dav-state (url) | 37 | (defun vc-dav-state (url) |
diff --git a/lisp/userlock.el b/lisp/userlock.el index 17cbc0c3e55..8e4a6753a31 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el | |||
| @@ -134,7 +134,7 @@ The buffer in question is current when this function is called." | |||
| 134 | (setq answer nil)) | 134 | (setq answer nil)) |
| 135 | ((eq answer 'revert) | 135 | ((eq answer 'revert) |
| 136 | (revert-buffer nil (not (buffer-modified-p))) | 136 | (revert-buffer nil (not (buffer-modified-p))) |
| 137 | ; ask confirmation iff buffer modified | 137 | ; ask confirmation if buffer modified |
| 138 | (signal 'file-supersession | 138 | (signal 'file-supersession |
| 139 | (list "File reverted" fn))) | 139 | (list "File reverted" fn))) |
| 140 | ((eq answer 'yield) | 140 | ((eq answer 'yield) |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index b2011a7176e..20a9ca9b2fb 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -2,15 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2006, 2007 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2006, 2007 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el, | ||
| 6 | ;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el | ||
| 7 | ;; I could not get in touch with Dave Love by email, so | ||
| 8 | ;; I am releasing my changes separately. -- Riccardo | ||
| 9 | |||
| 10 | ;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com> | 5 | ;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com> |
| 11 | ;; Keywords: tools | 6 | ;; Keywords: tools |
| 12 | ;; Created: Sept 2006 | 7 | ;; Created: Sept 2006 |
| 13 | ;; Version: 2007-05-24 | 8 | ;; Version: 2007-08-03 |
| 14 | ;; URL: http://launchpad.net/vc-bzr | 9 | ;; URL: http://launchpad.net/vc-bzr |
| 15 | 10 | ||
| 16 | ;; This file is free software; you can redistribute it and/or modify | 11 | ;; This file is free software; you can redistribute it and/or modify |
| @@ -31,9 +26,6 @@ | |||
| 31 | 26 | ||
| 32 | ;;; Commentary: | 27 | ;;; Commentary: |
| 33 | 28 | ||
| 34 | ;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el, | ||
| 35 | ;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el | ||
| 36 | |||
| 37 | ;; See <URL:http://bazaar-vcs.org/> concerning bzr. | 29 | ;; See <URL:http://bazaar-vcs.org/> concerning bzr. |
| 38 | 30 | ||
| 39 | ;; Load this library to register bzr support in VC. It covers basic VC | 31 | ;; Load this library to register bzr support in VC. It covers basic VC |
| @@ -96,34 +88,73 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' to the environment." | |||
| 96 | (let ((process-environment | 88 | (let ((process-environment |
| 97 | (list* "BZR_PROGRESS_BAR=none" ; Suppress progress output (bzr >=0.9) | 89 | (list* "BZR_PROGRESS_BAR=none" ; Suppress progress output (bzr >=0.9) |
| 98 | "LC_ALL=C" ; Force English output | 90 | "LC_ALL=C" ; Force English output |
| 99 | process-environment)) | 91 | process-environment))) |
| 100 | ;; bzr may attempt some kind of user interaction if its stdin/stdout | ||
| 101 | ;; is connected to a PTY; therefore, ask Emacs to use a pipe to | ||
| 102 | ;; communicate with it. | ||
| 103 | ;; This is redundant because vc-do-command does it already. --Stef | ||
| 104 | (process-connection-type nil)) | ||
| 105 | (apply 'vc-do-command buffer okstatus vc-bzr-program | 92 | (apply 'vc-do-command buffer okstatus vc-bzr-program |
| 106 | file-or-list bzr-command (append vc-bzr-program-args args)))) | 93 | file-or-list bzr-command (append vc-bzr-program-args args)))) |
| 107 | 94 | ||
| 108 | 95 | ||
| 109 | ;;;###autoload | 96 | ;;;###autoload |
| 110 | (defconst vc-bzr-admin-dirname ".bzr") ; FIXME: "_bzr" on w32? | 97 | (defconst vc-bzr-admin-dirname ".bzr" ; FIXME: "_bzr" on w32? |
| 98 | "Name of the directory containing Bzr repository status files.") | ||
| 99 | ;;;###autoload | ||
| 100 | (defconst vc-bzr-admin-checkout-format-file | ||
| 101 | (concat vc-bzr-admin-dirname "/checkout/format")) | ||
| 102 | (defconst vc-bzr-admin-dirstate | ||
| 103 | (concat vc-bzr-admin-dirname "/checkout/dirstate")) | ||
| 104 | (defconst vc-bzr-admin-branch-format-file | ||
| 105 | (concat vc-bzr-admin-dirname "/branch/format")) | ||
| 106 | (defconst vc-bzr-admin-revhistory | ||
| 107 | (concat vc-bzr-admin-dirname "/branch/revision-history")) | ||
| 111 | 108 | ||
| 112 | ;;;###autoload (defun vc-bzr-registered (file) | 109 | ;;;###autoload (defun vc-bzr-registered (file) |
| 113 | ;;;###autoload (if (vc-find-root file vc-bzr-admin-dirname) | 110 | ;;;###autoload (if (vc-find-root file vc-bzr-admin-checkout-format-file) |
| 114 | ;;;###autoload (progn | 111 | ;;;###autoload (progn |
| 115 | ;;;###autoload (load "vc-bzr") | 112 | ;;;###autoload (load "vc-bzr") |
| 116 | ;;;###autoload (vc-bzr-registered file)))) | 113 | ;;;###autoload (vc-bzr-registered file)))) |
| 117 | 114 | ||
| 118 | (defun vc-bzr-root-dir (file) | 115 | (defun vc-bzr-root (file) |
| 119 | "Return the root directory in the hierarchy above FILE. | 116 | "Return the root directory of the bzr repository containing FILE." |
| 120 | Return nil if there isn't one." | 117 | ;; Cache technique copied from vc-arch.el. |
| 121 | (vc-find-root file vc-bzr-admin-dirname)) | 118 | (or (vc-file-getprop file 'bzr-root) |
| 119 | (vc-file-setprop | ||
| 120 | file 'bzr-root | ||
| 121 | (vc-find-root file vc-bzr-admin-checkout-format-file)))) | ||
| 122 | 122 | ||
| 123 | (defun vc-bzr-registered (file) | 123 | (defun vc-bzr-registered (file) |
| 124 | "Return non-nil if FILE is registered with bzr." | 124 | "Return non-nil if FILE is registered with bzr. |
| 125 | (if (vc-bzr-root-dir file) ; Short cut. | 125 | |
| 126 | (vc-bzr-state file))) ; Expensive. | 126 | For speed, this function tries first to parse Bzr internal file |
| 127 | `checkout/dirstate', but it may fail if Bzr internal file format | ||
| 128 | has changed. As a safeguard, the `checkout/dirstate' file is | ||
| 129 | only parsed if it contains the string `#bazaar dirstate flat | ||
| 130 | format 3' in the first line. | ||
| 131 | |||
| 132 | If the `checkout/dirstate' file cannot be parsed, fall back to | ||
| 133 | running `vc-bzr-state'." | ||
| 134 | (condition-case nil | ||
| 135 | (lexical-let ((root (vc-bzr-root file))) | ||
| 136 | (and root ; Short cut. | ||
| 137 | ;; This looks at internal files. May break if they change | ||
| 138 | ;; their format. | ||
| 139 | (lexical-let | ||
| 140 | ((dirstate-file (expand-file-name vc-bzr-admin-dirstate root))) | ||
| 141 | (if (file-exists-p dirstate-file) | ||
| 142 | (with-temp-buffer | ||
| 143 | (insert-file-contents dirstate-file) | ||
| 144 | (goto-char (point-min)) | ||
| 145 | (when (looking-at "#bazaar dirstate flat format 3") | ||
| 146 | (let* ((relfile (file-relative-name file root)) | ||
| 147 | (reldir (file-name-directory relfile))) | ||
| 148 | (re-search-forward | ||
| 149 | (concat "^\0" | ||
| 150 | (if reldir (regexp-quote (directory-file-name reldir))) | ||
| 151 | "\0" | ||
| 152 | (regexp-quote (file-name-nondirectory relfile)) | ||
| 153 | "\0") | ||
| 154 | nil t)))) | ||
| 155 | t)) | ||
| 156 | (vc-bzr-state file))) ; Expensive. | ||
| 157 | (file-error nil))) ; vc-bzr-program not found | ||
| 127 | 158 | ||
| 128 | (defun vc-bzr-buffer-nonblank-p (&optional buffer) | 159 | (defun vc-bzr-buffer-nonblank-p (&optional buffer) |
| 129 | "Return non-nil if BUFFER contains any non-blank characters." | 160 | "Return non-nil if BUFFER contains any non-blank characters." |
| @@ -134,15 +165,34 @@ Return nil if there isn't one." | |||
| 134 | (re-search-forward "[^ \t\n]" (point-max) t)))) | 165 | (re-search-forward "[^ \t\n]" (point-max) t)))) |
| 135 | 166 | ||
| 136 | (defconst vc-bzr-state-words | 167 | (defconst vc-bzr-state-words |
| 137 | "added\\|ignored\\|modified\\|removed\\|renamed\\|unknown" | 168 | "added\\|ignored\\|kind changed\\|modified\\|removed\\|renamed\\|unknown" |
| 138 | "Regexp matching file status words as reported in `bzr' output.") | 169 | "Regexp matching file status words as reported in `bzr' output.") |
| 139 | 170 | ||
| 171 | (defun vc-bzr-file-name-relative (filename) | ||
| 172 | "Return file name FILENAME stripped of the initial Bzr repository path." | ||
| 173 | (lexical-let* | ||
| 174 | ((filename* (expand-file-name filename)) | ||
| 175 | (rootdir (vc-bzr-root (file-name-directory filename*)))) | ||
| 176 | (and rootdir | ||
| 177 | (file-relative-name filename* rootdir)))) | ||
| 178 | |||
| 140 | ;; FIXME: Also get this in a non-registered sub-directory. | 179 | ;; FIXME: Also get this in a non-registered sub-directory. |
| 141 | (defun vc-bzr-state (file) | 180 | ;; It already works for me. -- Riccardo |
| 181 | (defun vc-bzr-status (file) | ||
| 182 | "Return FILE status according to Bzr. | ||
| 183 | Return value is a cons (STATUS . WARNING), where WARNING is a | ||
| 184 | string or nil, and STATUS is one of the symbols: 'added, | ||
| 185 | 'ignored, 'kindchange, 'modified, 'removed, 'renamed, 'unknown, | ||
| 186 | which directly correspond to `bzr status' output, or 'unchanged | ||
| 187 | for files whose copy in the working tree is identical to the one | ||
| 188 | in the branch repository, or nil for files that are not | ||
| 189 | registered with Bzr. | ||
| 190 | |||
| 191 | If any error occurred in running `bzr status', then return nil." | ||
| 192 | (condition-case nil | ||
| 142 | (with-temp-buffer | 193 | (with-temp-buffer |
| 143 | (cd (file-name-directory file)) | 194 | (let ((ret (vc-bzr-command "status" t 0 file)) |
| 144 | (let ((ret (vc-bzr-command "status" t 255 file)) | 195 | (status 'unchanged)) |
| 145 | (state 'up-to-date)) | ||
| 146 | ;; the only secure status indication in `bzr status' output | 196 | ;; the only secure status indication in `bzr status' output |
| 147 | ;; is a couple of lines following the pattern:: | 197 | ;; is a couple of lines following the pattern:: |
| 148 | ;; | <status>: | 198 | ;; | <status>: |
| @@ -153,45 +203,93 @@ Return nil if there isn't one." | |||
| 153 | (goto-char (point-min)) | 203 | (goto-char (point-min)) |
| 154 | (when | 204 | (when |
| 155 | (re-search-forward | 205 | (re-search-forward |
| 206 | ;; bzr prints paths relative to the repository root | ||
| 156 | (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" | 207 | (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" |
| 157 | (file-name-nondirectory file) "[ \t\n]*$") | 208 | (regexp-quote (vc-bzr-file-name-relative file)) |
| 209 | (if (file-directory-p file) "/?" "") | ||
| 210 | "[ \t\n]*$") | ||
| 158 | (point-max) t) | 211 | (point-max) t) |
| 159 | (let ((start (match-beginning 0)) | 212 | (let ((start (match-beginning 0)) |
| 160 | (end (match-end 0))) | 213 | (end (match-end 0))) |
| 161 | (goto-char start) | 214 | (goto-char start) |
| 162 | (setq state | 215 | (setq status |
| 163 | (cond | 216 | (cond |
| 164 | ((not (equal ret 0)) nil) | 217 | ((not (equal ret 0)) nil) |
| 165 | ((looking-at "added\\|renamed\\|modified\\|removed") 'edited) | 218 | ((looking-at "added") 'added) |
| 166 | ((looking-at "unknown\\|ignored") nil))) | 219 | ((looking-at "kind changed") 'kindchange) |
| 220 | ((looking-at "renamed") 'renamed) | ||
| 221 | ((looking-at "modified") 'modified) | ||
| 222 | ((looking-at "removed") 'removed) | ||
| 223 | ((looking-at "ignored") 'ignored) | ||
| 224 | ((looking-at "unknown") 'unknown))) | ||
| 167 | ;; erase the status text that matched | 225 | ;; erase the status text that matched |
| 168 | (delete-region start end))) | 226 | (delete-region start end))) |
| 169 | (when (vc-bzr-buffer-nonblank-p) | 227 | (if status |
| 170 | ;; "bzr" will output some warnings and informational messages | 228 | (cons status |
| 171 | ;; to the user to stderr; due to Emacs' `vc-do-command' (and, | 229 | ;; "bzr" will output warnings and informational messages to |
| 172 | ;; it seems, `start-process' itself), we cannot catch stderr | 230 | ;; stderr; due to Emacs' `vc-do-command' (and, it seems, |
| 231 | ;; `start-process' itself) limitations, we cannot catch stderr | ||
| 173 | ;; and stdout into different buffers. So, if there's anything | 232 | ;; and stdout into different buffers. So, if there's anything |
| 174 | ;; left in the buffer after removing the above status | 233 | ;; left in the buffer after removing the above status |
| 175 | ;; keywords, let us just presume that any other message from | 234 | ;; keywords, let us just presume that any other message from |
| 176 | ;; "bzr" is a user warning, and display it. | 235 | ;; "bzr" is a user warning, and display it. |
| 177 | (message "Warnings in `bzr' output: %s" | 236 | (if (vc-bzr-buffer-nonblank-p) |
| 178 | (buffer-substring (point-min) (point-max)))) | 237 | (buffer-substring (point-min) (point-max))))))) |
| 179 | (when state | 238 | (file-error nil))) ; vc-bzr-program not found |
| 180 | (vc-file-setprop file 'vc-workfile-version | 239 | |
| 181 | (vc-bzr-workfile-version file)) | 240 | (defun vc-bzr-state (file) |
| 182 | (vc-file-setprop file 'vc-state state)) | 241 | (lexical-let ((result (vc-bzr-status file))) |
| 183 | state))) | 242 | (when (consp result) |
| 243 | (if (cdr result) | ||
| 244 | (message "Warnings in `bzr' output: %s" (cdr result))) | ||
| 245 | (cdr (assq (car result) | ||
| 246 | '((added . edited) | ||
| 247 | (kindchange . edited) | ||
| 248 | (renamed . edited) | ||
| 249 | (modified . edited) | ||
| 250 | (removed . edited) | ||
| 251 | (ignored . nil) | ||
| 252 | (unknown . nil) | ||
| 253 | (unchanged . up-to-date))))))) | ||
| 184 | 254 | ||
| 185 | (defun vc-bzr-workfile-unchanged-p (file) | 255 | (defun vc-bzr-workfile-unchanged-p (file) |
| 186 | (eq 'up-to-date (vc-bzr-state file))) | 256 | (eq 'unchanged (car (vc-bzr-status file)))) |
| 187 | 257 | ||
| 188 | (defun vc-bzr-workfile-version (file) | 258 | (defun vc-bzr-workfile-version (file) |
| 189 | ;; Looks like this could be obtained via counting lines in | 259 | (lexical-let* |
| 190 | ;; .bzr/branch/revision-history. | 260 | ((rootdir (vc-bzr-root file)) |
| 261 | (branch-format-file (concat rootdir "/" vc-bzr-admin-branch-format-file)) | ||
| 262 | (revhistory-file (concat rootdir "/" vc-bzr-admin-revhistory)) | ||
| 263 | (lastrev-file (concat rootdir "/" "branch/last-revision"))) | ||
| 264 | ;; Count lines in .bzr/branch/revision-history to avoid forking a | ||
| 265 | ;; bzr process. This looks at internal files. May break if they | ||
| 266 | ;; change their format. | ||
| 267 | (if (file-exists-p branch-format-file) | ||
| 191 | (with-temp-buffer | 268 | (with-temp-buffer |
| 192 | (vc-bzr-command "revno" t 0 file) | 269 | (insert-file-contents branch-format-file) |
| 193 | (goto-char (point-min)) | 270 | (goto-char (point-min)) |
| 194 | (buffer-substring (point) (line-end-position)))) | 271 | (cond |
| 272 | ((or | ||
| 273 | (looking-at "Bazaar-NG branch, format 0.0.4") | ||
| 274 | (looking-at "Bazaar-NG branch format 5")) | ||
| 275 | ;; count lines in .bzr/branch/revision-history | ||
| 276 | (insert-file-contents revhistory-file) | ||
| 277 | (number-to-string (count-lines (line-end-position) (point-max)))) | ||
| 278 | ((looking-at "Bazaar Branch Format 6 (bzr 0.15)") | ||
| 279 | ;; revno is the first number in .bzr/branch/last-revision | ||
| 280 | (insert-file-contents lastrev-file) | ||
| 281 | (goto-char (line-end-position)) | ||
| 282 | (if (re-search-forward "[0-9]+" nil t) | ||
| 283 | (buffer-substring (match-beginning 0) (match-end 0)))))) | ||
| 284 | ;; fallback to calling "bzr revno" | ||
| 285 | (lexical-let* | ||
| 286 | ((result (vc-bzr-command-discarding-stderr | ||
| 287 | vc-bzr-program "revno" file)) | ||
| 288 | (exitcode (car result)) | ||
| 289 | (output (cdr result))) | ||
| 290 | (cond | ||
| 291 | ((eq exitcode 0) (substring output 0 -1)) | ||
| 292 | (t nil)))))) | ||
| 195 | 293 | ||
| 196 | (defun vc-bzr-checkout-model (file) | 294 | (defun vc-bzr-checkout-model (file) |
| 197 | 'implicit) | 295 | 'implicit) |
| @@ -209,7 +307,7 @@ COMMENT is ignored." | |||
| 209 | 307 | ||
| 210 | ;; Could run `bzr status' in the directory and see if it succeeds, but | 308 | ;; Could run `bzr status' in the directory and see if it succeeds, but |
| 211 | ;; that's relatively expensive. | 309 | ;; that's relatively expensive. |
| 212 | (defalias 'vc-bzr-responsible-p 'vc-bzr-root-dir | 310 | (defalias 'vc-bzr-responsible-p 'vc-bzr-root |
| 213 | "Return non-nil if FILE is (potentially) controlled by bzr. | 311 | "Return non-nil if FILE is (potentially) controlled by bzr. |
| 214 | The criterion is that there is a `.bzr' directory in the same | 312 | The criterion is that there is a `.bzr' directory in the same |
| 215 | or a superior directory.") | 313 | or a superior directory.") |
| @@ -250,7 +348,7 @@ EDITABLE is ignored." | |||
| 250 | 348 | ||
| 251 | (defun vc-bzr-revert (file &optional contents-done) | 349 | (defun vc-bzr-revert (file &optional contents-done) |
| 252 | (unless contents-done | 350 | (unless contents-done |
| 253 | (with-temp-buffer (vc-bzr-command "revert" t 'async file)))) | 351 | (with-temp-buffer (vc-bzr-command "revert" t 0 file)))) |
| 254 | 352 | ||
| 255 | (defvar log-view-message-re) | 353 | (defvar log-view-message-re) |
| 256 | (defvar log-view-file-re) | 354 | (defvar log-view-file-re) |
| @@ -294,13 +392,11 @@ EDITABLE is ignored." | |||
| 294 | (beginning-of-line 0) | 392 | (beginning-of-line 0) |
| 295 | (goto-char (point-min))))) | 393 | (goto-char (point-min))))) |
| 296 | 394 | ||
| 297 | ;; Fixem: vc-bzr-wash-log | ||
| 298 | |||
| 299 | (autoload 'vc-diff-switches-list "vc" nil nil t) | 395 | (autoload 'vc-diff-switches-list "vc" nil nil t) |
| 300 | 396 | ||
| 301 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) | 397 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) |
| 302 | "VC bzr backend for diff." | 398 | "VC bzr backend for diff." |
| 303 | (let ((working (vc-workfile-version (car files)))) | 399 | (let ((working (vc-workfile-version (if (consp files) (car files) files)))) |
| 304 | (if (and (equal rev1 working) (not rev2)) | 400 | (if (and (equal rev1 working) (not rev2)) |
| 305 | (setq rev1 nil)) | 401 | (setq rev1 nil)) |
| 306 | (if (and (not rev1) rev2) | 402 | (if (and (not rev1) rev2) |
| @@ -317,9 +413,8 @@ EDITABLE is ignored." | |||
| 317 | 413 | ||
| 318 | (defalias 'vc-bzr-diff-tree 'vc-bzr-diff) | 414 | (defalias 'vc-bzr-diff-tree 'vc-bzr-diff) |
| 319 | 415 | ||
| 320 | ;; Fixme: implement vc-bzr-dir-state, vc-bzr-dired-state-info | ||
| 321 | 416 | ||
| 322 | ;; Fixme: vc-{next,previous}-version need fixing in vc.el to deal with | 417 | ;; FIXME: vc-{next,previous}-version need fixing in vc.el to deal with |
| 323 | ;; straight integer versions. | 418 | ;; straight integer versions. |
| 324 | 419 | ||
| 325 | (defun vc-bzr-delete-file (file) | 420 | (defun vc-bzr-delete-file (file) |
| @@ -399,17 +494,16 @@ Return nil if current line isn't annotated." | |||
| 399 | (if next-time | 494 | (if next-time |
| 400 | (- (vc-annotate-convert-time (current-time)) next-time)))) | 495 | (- (vc-annotate-convert-time (current-time)) next-time)))) |
| 401 | 496 | ||
| 402 | ;; FIXME: `bzr root' will return the real path to the repository root, | 497 | (defun vc-bzr-command-discarding-stderr (command &rest args) |
| 403 | ;; that is, it can differ from the buffer's current directory name | 498 | "Execute shell command COMMAND (with ARGS); return its output and exitcode. |
| 404 | ;; if there are any symbolic links. | 499 | Return value is a cons (EXITCODE . OUTPUT), where EXITCODE is |
| 405 | (defun vc-bzr-root (dir) | 500 | the (numerical) exit code of the process, and OUTPUT is a string |
| 406 | "Return the root directory of the bzr repository containing DIR." | 501 | containing whatever the process sent to its standard output |
| 407 | ;; Cache technique copied from vc-arch.el. | 502 | stream. Standard error output is discarded." |
| 408 | (or (vc-file-getprop dir 'bzr-root) | 503 | (with-temp-buffer |
| 409 | (vc-file-setprop | 504 | (cons |
| 410 | dir 'bzr-root | 505 | (apply #'call-process command nil (list (current-buffer) nil) nil args) |
| 411 | (substring | 506 | (buffer-substring (point-min) (point-max))))) |
| 412 | (shell-command-to-string (concat vc-bzr-program " root " dir)) 0 -1)))) | ||
| 413 | 507 | ||
| 414 | ;; TODO: it would be nice to mark the conflicted files in VC Dired, | 508 | ;; TODO: it would be nice to mark the conflicted files in VC Dired, |
| 415 | ;; and implement a command to run ediff and `bzr resolve' once the | 509 | ;; and implement a command to run ediff and `bzr resolve' once the |
| @@ -453,6 +547,9 @@ Optional argument LOCALP is always ignored." | |||
| 453 | ((looking-at "^added") | 547 | ((looking-at "^added") |
| 454 | (setq current-vc-state 'edited) | 548 | (setq current-vc-state 'edited) |
| 455 | (setq current-bzr-state 'added)) | 549 | (setq current-bzr-state 'added)) |
| 550 | ((looking-at "^kind changed") | ||
| 551 | (setq current-vc-state 'edited) | ||
| 552 | (setq current-bzr-state 'kindchange)) | ||
| 456 | ((looking-at "^modified") | 553 | ((looking-at "^modified") |
| 457 | (setq current-vc-state 'edited) | 554 | (setq current-vc-state 'edited) |
| 458 | (setq current-bzr-state 'modified)) | 555 | (setq current-bzr-state 'modified)) |
| @@ -499,7 +596,7 @@ Optional argument LOCALP is always ignored." | |||
| 499 | (add-to-list 'vc-handled-backends 'Bzr) | 596 | (add-to-list 'vc-handled-backends 'Bzr) |
| 500 | 597 | ||
| 501 | (eval-after-load "vc" | 598 | (eval-after-load "vc" |
| 502 | '(add-to-list 'vc-directory-exclusion-list ".bzr" t)) | 599 | '(add-to-list 'vc-directory-exclusion-list vc-bzr-admin-dirname t)) |
| 503 | 600 | ||
| 504 | (defconst vc-bzr-unload-hook | 601 | (defconst vc-bzr-unload-hook |
| 505 | (lambda () | 602 | (lambda () |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 09001e59691..aa121457a40 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -279,7 +279,10 @@ It is usually called via the `vc-call' macro." | |||
| 279 | (t (apply f args))))) | 279 | (t (apply f args))))) |
| 280 | 280 | ||
| 281 | (defmacro vc-call (fun file &rest args) | 281 | (defmacro vc-call (fun file &rest args) |
| 282 | ;; BEWARE!! `file' is evaluated twice!! | 282 | "A convenience macro for calling VC backend functions. |
| 283 | Functions called by this macro must accept FILE as the first argument. | ||
| 284 | ARGS specifies any additional arguments. FUN should be unquoted. | ||
| 285 | BEWARE!! `file' is evaluated twice!!" | ||
| 283 | `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args)) | 286 | `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args)) |
| 284 | 287 | ||
| 285 | (defsubst vc-parse-buffer (pattern i) | 288 | (defsubst vc-parse-buffer (pattern i) |
| @@ -873,13 +876,9 @@ Used in `find-file-not-found-functions'." | |||
| 873 | (if backend (vc-call-backend backend 'find-file-not-found-hook)))) | 876 | (if backend (vc-call-backend backend 'find-file-not-found-hook)))) |
| 874 | 877 | ||
| 875 | (defun vc-default-find-file-not-found-hook (backend) | 878 | (defun vc-default-find-file-not-found-hook (backend) |
| 876 | (if (yes-or-no-p | 879 | ;; This used to do what vc-rcs-find-file-not-found-hook does, but it only |
| 877 | (format "File %s was lost; check out from version control? " | 880 | ;; really makes sense for RCS. For other backends, better not do anything. |
| 878 | (file-name-nondirectory buffer-file-name))) | 881 | nil) |
| 879 | (save-excursion | ||
| 880 | (require 'vc) | ||
| 881 | (setq default-directory (file-name-directory buffer-file-name)) | ||
| 882 | (not (vc-error-occurred (vc-checkout buffer-file-name)))))) | ||
| 883 | 882 | ||
| 884 | (add-hook 'find-file-not-found-functions 'vc-file-not-found-hook) | 883 | (add-hook 'find-file-not-found-functions 'vc-file-not-found-hook) |
| 885 | 884 | ||
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index dcd3adcd8c9..1cda8849219 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el | |||
| @@ -234,6 +234,14 @@ When VERSION is given, perform check for that version." | |||
| 234 | ;; The workfile is unchanged if rcsdiff found no differences. | 234 | ;; The workfile is unchanged if rcsdiff found no differences. |
| 235 | (zerop status))) | 235 | (zerop status))) |
| 236 | 236 | ||
| 237 | (defun vc-rcs-find-file-not-found-hook () | ||
| 238 | (if (yes-or-no-p | ||
| 239 | (format "File %s was lost; check out from version control? " | ||
| 240 | (file-name-nondirectory buffer-file-name))) | ||
| 241 | (save-excursion | ||
| 242 | (require 'vc) | ||
| 243 | (let ((default-directory (file-name-directory buffer-file-name))) | ||
| 244 | (not (vc-error-occurred (vc-checkout buffer-file-name))))))) | ||
| 237 | 245 | ||
| 238 | ;;; | 246 | ;;; |
| 239 | ;;; State-changing functions | 247 | ;;; State-changing functions |
diff --git a/lisp/vc.el b/lisp/vc.el index 78e098d874f..3fc3784fdf1 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -1145,7 +1145,7 @@ Used by `vc-restore-buffer-context' to later restore the context." | |||
| 1145 | ;; ;; We may want to reparse the compilation buffer after revert | 1145 | ;; ;; We may want to reparse the compilation buffer after revert |
| 1146 | ;; (reparse (and (boundp 'compilation-error-list) ;compile loaded | 1146 | ;; (reparse (and (boundp 'compilation-error-list) ;compile loaded |
| 1147 | ;; ;; Construct a list; each elt is nil or a buffer | 1147 | ;; ;; Construct a list; each elt is nil or a buffer |
| 1148 | ;; ;; iff that buffer is a compilation output buffer | 1148 | ;; ;; if that buffer is a compilation output buffer |
| 1149 | ;; ;; that contains markers into the current buffer. | 1149 | ;; ;; that contains markers into the current buffer. |
| 1150 | ;; (save-current-buffer | 1150 | ;; (save-current-buffer |
| 1151 | ;; (mapcar (lambda (buffer) | 1151 | ;; (mapcar (lambda (buffer) |
| @@ -2636,6 +2636,9 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action] | |||
| 2636 | (message "Reverting %s...done" file))) | 2636 | (message "Reverting %s...done" file))) |
| 2637 | 2637 | ||
| 2638 | ;;;###autoload | 2638 | ;;;###autoload |
| 2639 | (define-obsolete-function-alias 'vc-revert-buffer 'vc-revert "23.1") | ||
| 2640 | |||
| 2641 | ;;;###autoload | ||
| 2639 | (defun vc-update () | 2642 | (defun vc-update () |
| 2640 | "Update the current buffer's file to the latest version on its branch. | 2643 | "Update the current buffer's file to the latest version on its branch. |
| 2641 | If the file contains no changes, and is not locked, then this simply replaces | 2644 | If the file contains no changes, and is not locked, then this simply replaces |
| @@ -2718,8 +2721,9 @@ return its name; otherwise return nil." | |||
| 2718 | (vc-resynch-buffer file t t)) | 2721 | (vc-resynch-buffer file t t)) |
| 2719 | 2722 | ||
| 2720 | ;;;###autoload | 2723 | ;;;###autoload |
| 2721 | (defun vc-rollback () | 2724 | (defun vc-rollback (&optional norevert) |
| 2722 | "Get rid of most recently checked in version of this file." | 2725 | "Get rid of most recently checked in version of this file. |
| 2726 | A prefix argument NOREVERT means do not revert the buffer afterwards." | ||
| 2723 | (interactive "P") | 2727 | (interactive "P") |
| 2724 | (vc-ensure-vc-buffer) | 2728 | (vc-ensure-vc-buffer) |
| 2725 | (let* ((file buffer-file-name) | 2729 | (let* ((file buffer-file-name) |
| @@ -3268,12 +3272,19 @@ colors. `vc-annotate-background' specifies the background color." | |||
| 3268 | (set (make-local-variable 'vc-annotate-parent-display-mode) | 3272 | (set (make-local-variable 'vc-annotate-parent-display-mode) |
| 3269 | display-mode))) | 3273 | display-mode))) |
| 3270 | 3274 | ||
| 3271 | (vc-exec-after | 3275 | (with-current-buffer temp-buffer-name |
| 3272 | `(progn | 3276 | (vc-exec-after |
| 3273 | (when ,current-line | 3277 | `(progn |
| 3274 | (goto-line ,current-line ,temp-buffer-name)) | 3278 | ;; Ideally, we'd rather not move point if the user has already |
| 3275 | (unless (active-minibuffer-window) | 3279 | ;; moved it elsewhere, but really point here is not the position |
| 3276 | (message "Annotating... done")))))) | 3280 | ;; of the user's cursor :-( |
| 3281 | (when ,current-line ;(and (bobp)) | ||
| 3282 | (let ((win (get-buffer-window (current-buffer) 0))) | ||
| 3283 | (when win | ||
| 3284 | (with-selected-window win | ||
| 3285 | (goto-line ,current-line))))) | ||
| 3286 | (unless (active-minibuffer-window) | ||
| 3287 | (message "Annotating... done"))))))) | ||
| 3277 | 3288 | ||
| 3278 | (defun vc-annotate-prev-version (prefix) | 3289 | (defun vc-annotate-prev-version (prefix) |
| 3279 | "Visit the annotation of the version previous to this one. | 3290 | "Visit the annotation of the version previous to this one. |
diff --git a/lisp/view.el b/lisp/view.el index 2f541fbf360..f6722f53756 100644 --- a/lisp/view.el +++ b/lisp/view.el | |||
| @@ -375,7 +375,8 @@ Use this argument instead of explicitly setting `view-exit-action'." | |||
| 375 | ;; bindings instead of using the \\[] construction. The reason for this | 375 | ;; bindings instead of using the \\[] construction. The reason for this |
| 376 | ;; is that most commands have more than one key binding. | 376 | ;; is that most commands have more than one key binding. |
| 377 | "Toggle View mode, a minor mode for viewing text but not editing it. | 377 | "Toggle View mode, a minor mode for viewing text but not editing it. |
| 378 | With ARG, turn View mode on iff ARG is positive. | 378 | With prefix argument ARG, turn View mode on if ARG is positive, otherwise |
| 379 | turn it off. | ||
| 379 | 380 | ||
| 380 | Emacs commands that do not change the buffer contents are available as usual. | 381 | Emacs commands that do not change the buffer contents are available as usual. |
| 381 | Kill commands insert text in kill buffers but do not delete. Other commands | 382 | Kill commands insert text in kill buffers but do not delete. Other commands |
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index c38b6563592..3ea8394b0b7 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el | |||
| @@ -763,7 +763,7 @@ If timer is not set, then set it to scan the files in | |||
| 763 | ;;;###autoload | 763 | ;;;###autoload |
| 764 | (define-minor-mode whitespace-global-mode | 764 | (define-minor-mode whitespace-global-mode |
| 765 | "Toggle using Whitespace mode in new buffers. | 765 | "Toggle using Whitespace mode in new buffers. |
| 766 | With ARG, turn the mode on iff ARG is positive. | 766 | With ARG, turn the mode on if ARG is positive, otherwise turn it off. |
| 767 | 767 | ||
| 768 | When this mode is active, `whitespace-buffer' is added to | 768 | When this mode is active, `whitespace-buffer' is added to |
| 769 | `find-file-hook' and `kill-buffer-hook'." | 769 | `find-file-hook' and `kill-buffer-hook'." |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 5e5dbd48ad6..72cff55805b 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -483,7 +483,7 @@ new value.") | |||
| 483 | 483 | ||
| 484 | ;;;###autoload | 484 | ;;;###autoload |
| 485 | (defun widgetp (widget) | 485 | (defun widgetp (widget) |
| 486 | "Return non-nil iff WIDGET is a widget." | 486 | "Return non-nil if WIDGET is a widget." |
| 487 | (if (symbolp widget) | 487 | (if (symbolp widget) |
| 488 | (get widget 'widget-type) | 488 | (get widget 'widget-type) |
| 489 | (and (consp widget) | 489 | (and (consp widget) |
| @@ -500,7 +500,7 @@ Otherwise, just return the value." | |||
| 500 | value))) | 500 | value))) |
| 501 | 501 | ||
| 502 | (defun widget-member (widget property) | 502 | (defun widget-member (widget property) |
| 503 | "Non-nil iff there is a definition in WIDGET for PROPERTY." | 503 | "Non-nil if there is a definition in WIDGET for PROPERTY." |
| 504 | (cond ((plist-member (cdr widget) property) | 504 | (cond ((plist-member (cdr widget) property) |
| 505 | t) | 505 | t) |
| 506 | ((car widget) | 506 | ((car widget) |
| @@ -1606,7 +1606,7 @@ If that does not exists, call the value of `widget-complete-field'." | |||
| 1606 | (widget-princ-to-string (widget-get widget :value)))) | 1606 | (widget-princ-to-string (widget-get widget :value)))) |
| 1607 | 1607 | ||
| 1608 | (defun widget-default-active (widget) | 1608 | (defun widget-default-active (widget) |
| 1609 | "Return t iff this widget active (user modifiable)." | 1609 | "Return t if this widget is active (user modifiable)." |
| 1610 | (or (widget-get widget :always-active) | 1610 | (or (widget-get widget :always-active) |
| 1611 | (and (not (widget-get widget :inactive)) | 1611 | (and (not (widget-get widget :inactive)) |
| 1612 | (let ((parent (widget-get widget :parent))) | 1612 | (let ((parent (widget-get widget :parent))) |
diff --git a/lisp/window.el b/lisp/window.el index f0a30d811ab..26d1bdc9d3f 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -120,7 +120,7 @@ bars (top, bottom, or nil)." | |||
| 120 | PROC is called with a window as argument. | 120 | PROC is called with a window as argument. |
| 121 | 121 | ||
| 122 | Optional second arg MINIBUF t means count the minibuffer window even | 122 | Optional second arg MINIBUF t means count the minibuffer window even |
| 123 | if not active. MINIBUF nil or omitted means count the minibuffer iff | 123 | if not active. MINIBUF nil or omitted means count the minibuffer only if |
| 124 | it is active. MINIBUF neither t nor nil means not to count the | 124 | it is active. MINIBUF neither t nor nil means not to count the |
| 125 | minibuffer even if it is active. | 125 | minibuffer even if it is active. |
| 126 | 126 | ||
| @@ -165,7 +165,7 @@ value is returned. If no window satisfies PREDICATE, DEFAULT is | |||
| 165 | returned. | 165 | returned. |
| 166 | 166 | ||
| 167 | Optional second arg MINIBUF t means count the minibuffer window even | 167 | Optional second arg MINIBUF t means count the minibuffer window even |
| 168 | if not active. MINIBUF nil or omitted means count the minibuffer iff | 168 | if not active. MINIBUF nil or omitted means count the minibuffer only if |
| 169 | it is active. MINIBUF neither t nor nil means not to count the | 169 | it is active. MINIBUF neither t nor nil means not to count the |
| 170 | minibuffer even if it is active. | 170 | minibuffer even if it is active. |
| 171 | 171 | ||
| @@ -927,7 +927,7 @@ means suspend autoselection." | |||
| 927 | (defun mouse-autoselect-window-select () | 927 | (defun mouse-autoselect-window-select () |
| 928 | "Select window with delayed window autoselection. | 928 | "Select window with delayed window autoselection. |
| 929 | If the mouse position has stabilized in a non-selected window, select | 929 | If the mouse position has stabilized in a non-selected window, select |
| 930 | that window. The minibuffer window is selected iff the minibuffer is | 930 | that window. The minibuffer window is selected only if the minibuffer is |
| 931 | active. This function is run by `mouse-autoselect-window-timer'." | 931 | active. This function is run by `mouse-autoselect-window-timer'." |
| 932 | (condition-case nil | 932 | (condition-case nil |
| 933 | (let* ((mouse-position (mouse-position)) | 933 | (let* ((mouse-position (mouse-position)) |
| @@ -952,14 +952,14 @@ active. This function is run by `mouse-autoselect-window-timer'." | |||
| 952 | ;; If `mouse-autoselect-window' is positive, select | 952 | ;; If `mouse-autoselect-window' is positive, select |
| 953 | ;; window if the window is the same as before. | 953 | ;; window if the window is the same as before. |
| 954 | (eq window mouse-autoselect-window-window)) | 954 | (eq window mouse-autoselect-window-window)) |
| 955 | ;; Otherwise select window iff the mouse is at the same | 955 | ;; Otherwise select window if the mouse is at the same |
| 956 | ;; position as before. Observe that the first test after | 956 | ;; position as before. Observe that the first test after |
| 957 | ;; starting autoselection usually fails since the value of | 957 | ;; starting autoselection usually fails since the value of |
| 958 | ;; `mouse-autoselect-window-position' recorded there is the | 958 | ;; `mouse-autoselect-window-position' recorded there is the |
| 959 | ;; position where the mouse has entered the new window and | 959 | ;; position where the mouse has entered the new window and |
| 960 | ;; not necessarily where the mouse has stopped moving. | 960 | ;; not necessarily where the mouse has stopped moving. |
| 961 | (equal mouse-position mouse-autoselect-window-position)) | 961 | (equal mouse-position mouse-autoselect-window-position)) |
| 962 | ;; The minibuffer is a candidate window iff it's active. | 962 | ;; The minibuffer is a candidate window if it's active. |
| 963 | (or (not (window-minibuffer-p window)) | 963 | (or (not (window-minibuffer-p window)) |
| 964 | (eq window (active-minibuffer-window)))) | 964 | (eq window (active-minibuffer-window)))) |
| 965 | ;; Mouse position has stabilized in non-selected window: Cancel | 965 | ;; Mouse position has stabilized in non-selected window: Cancel |
diff --git a/lisp/winner.el b/lisp/winner.el index bc7503b963c..ed840d37622 100644 --- a/lisp/winner.el +++ b/lisp/winner.el | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Ivar Rummelhoff <ivarru@math.uio.no> | 6 | ;; Author: Ivar Rummelhoff <ivarru@math.uio.no> |
| 7 | ;; Created: 27 Feb 1997 | 7 | ;; Created: 27 Feb 1997 |
| 8 | ;; Time-stamp: <2006-02-06 15:13:57 ttn> | ||
| 9 | ;; Keywords: convenience frames | 8 | ;; Keywords: convenience frames |
| 10 | 9 | ||
| 11 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -286,7 +285,7 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 286 | 285 | ||
| 287 | (defun winner-get-point (buf win) | 286 | (defun winner-get-point (buf win) |
| 288 | ;; Consult (and possibly extend) `winner-point-alist'. | 287 | ;; Consult (and possibly extend) `winner-point-alist'. |
| 289 | ;; Returns nil iff buf no longer exists. | 288 | ;; Returns nil if buf no longer exists. |
| 290 | (when (buffer-name buf) | 289 | (when (buffer-name buf) |
| 291 | (let ((entry (assq buf winner-point-alist))) | 290 | (let ((entry (assq buf winner-point-alist))) |
| 292 | (cond | 291 | (cond |
| @@ -306,7 +305,7 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 306 | 305 | ||
| 307 | ;; Make sure point does not end up in the minibuffer and delete | 306 | ;; Make sure point does not end up in the minibuffer and delete |
| 308 | ;; windows displaying dead or boring buffers | 307 | ;; windows displaying dead or boring buffers |
| 309 | ;; (c.f. `winner-boring-buffers'). Return nil iff all the windows | 308 | ;; (c.f. `winner-boring-buffers'). Return nil if all the windows |
| 310 | ;; should be deleted. Preserve correct points and marks. | 309 | ;; should be deleted. Preserve correct points and marks. |
| 311 | (defun winner-set (conf) | 310 | (defun winner-set (conf) |
| 312 | ;; For the format of `conf', see `winner-conf'. | 311 | ;; For the format of `conf', see `winner-conf'. |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index bf4eeab2259..8ce93e2293e 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -190,7 +190,8 @@ | |||
| 190 | ;;;###autoload | 190 | ;;;###autoload |
| 191 | (define-minor-mode xterm-mouse-mode | 191 | (define-minor-mode xterm-mouse-mode |
| 192 | "Toggle XTerm mouse mode. | 192 | "Toggle XTerm mouse mode. |
| 193 | With prefix arg, turn XTerm mouse mode on iff arg is positive. | 193 | With prefix arg, turn XTerm mouse mode on if arg is positive, otherwise turn |
| 194 | it off. | ||
| 194 | 195 | ||
| 195 | Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. | 196 | Turn it on to use Emacs mouse commands, and off to use xterm mouse commands. |
| 196 | This works in terminal emulators compatible with xterm. It only | 197 | This works in terminal emulators compatible with xterm. It only |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index cf110147ad8..75d40dbd19c 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2007-08-08 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * modes.texi (Example Major Modes): Fix typo. | ||
| 4 | |||
| 5 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * intro.texi (nil and t): Do not use `iff' in documentation. | ||
| 8 | |||
| 9 | * tips.texi (Documentation Tips): Recommend against `iff'. | ||
| 10 | |||
| 11 | 2007-08-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * display.texi (Image Cache): Document image-refresh. | ||
| 14 | |||
| 15 | 2007-08-06 Martin Rudalics <rudalics@gmx.at> | ||
| 16 | |||
| 17 | * windows.texi (Size of Window): Document window-full-width-p. | ||
| 18 | |||
| 1 | 2007-07-25 Glenn Morris <rgm@gnu.org> | 19 | 2007-07-25 Glenn Morris <rgm@gnu.org> |
| 2 | 20 | ||
| 3 | * gpl.texi (GPL): Replace license with GPLv3. | 21 | * gpl.texi (GPL): Replace license with GPLv3. |
diff --git a/lispref/intro.texi b/lispref/intro.texi index 35566603b7c..ed0fd1c0699 100644 --- a/lispref/intro.texi +++ b/lispref/intro.texi | |||
| @@ -213,7 +213,7 @@ values results in a @code{setting-constant} error. @xref{Constant | |||
| 213 | Variables}. | 213 | Variables}. |
| 214 | 214 | ||
| 215 | @defun booleanp object | 215 | @defun booleanp object |
| 216 | Return non-nil iff @var{object} is one of the two canonical boolean | 216 | Return non-nil if @var{object} is one of the two canonical boolean |
| 217 | values: @code{t} or @code{nil}. | 217 | values: @code{t} or @code{nil}. |
| 218 | @end defun | 218 | @end defun |
| 219 | 219 | ||
diff --git a/lispref/modes.texi b/lispref/modes.texi index 95fbe6a292f..3d60756a901 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -1078,7 +1078,7 @@ each calls the following function to set various variables: | |||
| 1078 | 1078 | ||
| 1079 | In Lisp and most programming languages, we want the paragraph | 1079 | In Lisp and most programming languages, we want the paragraph |
| 1080 | commands to treat only blank lines as paragraph separators. And the | 1080 | commands to treat only blank lines as paragraph separators. And the |
| 1081 | modes should undestand the Lisp conventions for comments. The rest of | 1081 | modes should understand the Lisp conventions for comments. The rest of |
| 1082 | @code{lisp-mode-variables} sets this up: | 1082 | @code{lisp-mode-variables} sets this up: |
| 1083 | 1083 | ||
| 1084 | @smallexample | 1084 | @smallexample |
diff --git a/lispref/tips.texi b/lispref/tips.texi index de590c4cf9d..f3070f4659b 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -845,6 +845,12 @@ Instead of, ``Cause Emacs to display text in boldface,'' write just | |||
| 845 | ``Display text in boldface.'' | 845 | ``Display text in boldface.'' |
| 846 | 846 | ||
| 847 | @item | 847 | @item |
| 848 | Avoid using ``iff'' (a mathematics term meaning ``if and only if''), | ||
| 849 | since many people are unfamiliar with it and mistake it for a typo. In | ||
| 850 | most cases, the meaning is clear with just ``if''. Otherwise, try to | ||
| 851 | find an alternate phrasing that conveys the meaning. | ||
| 852 | |||
| 853 | @item | ||
| 848 | When a command is meaningful only in a certain mode or situation, | 854 | When a command is meaningful only in a certain mode or situation, |
| 849 | do mention that in the documentation string. For example, | 855 | do mention that in the documentation string. For example, |
| 850 | the documentation of @code{dired-find-file} is: | 856 | the documentation of @code{dired-find-file} is: |
diff --git a/lispref/windows.texi b/lispref/windows.texi index 22bb43ecaa0..bd8f7bc2d36 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi | |||
| @@ -1887,6 +1887,12 @@ If @var{window} is @code{nil}, the function uses the selected window. | |||
| 1887 | @end example | 1887 | @end example |
| 1888 | @end defun | 1888 | @end defun |
| 1889 | 1889 | ||
| 1890 | @defun window-full-width-p &optional window | ||
| 1891 | This function returns non-@code{nil} if @var{window} is as wide as | ||
| 1892 | the frame that contains it; otherwise @code{nil}. | ||
| 1893 | If @var{window} is @code{nil}, the function uses the selected window. | ||
| 1894 | @end defun | ||
| 1895 | |||
| 1890 | @defun window-edges &optional window | 1896 | @defun window-edges &optional window |
| 1891 | This function returns a list of the edge coordinates of @var{window}. | 1897 | This function returns a list of the edge coordinates of @var{window}. |
| 1892 | If @var{window} is @code{nil}, the selected window is used. | 1898 | If @var{window} is @code{nil}, the selected window is used. |
diff --git a/mac/inc/m-mac.h b/mac/inc/m-mac.h index a5a26cd000c..57bb0976b69 100644 --- a/mac/inc/m-mac.h +++ b/mac/inc/m-mac.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 26 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #define WORDS_BIG_ENDIAN | 31 | #define WORDS_BIG_ENDIAN |
diff --git a/man/ChangeLog b/man/ChangeLog index 18cd4b72bc6..2395e82fdbb 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,8 +1,26 @@ | |||
| 1 | 2007-08-10 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus.texi (NNTP): Mention nntp-xref-number-is-evil. | ||
| 4 | |||
| 5 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * glossary.texi (Glossary): Deprecate `iff'. | ||
| 8 | * gnus.texi, sieve.texi: Replace `iff'. | ||
| 9 | |||
| 10 | 2007-08-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 11 | |||
| 12 | * files.texi (File Conveniences): Document point motion keys in Image | ||
| 13 | mode. | ||
| 14 | |||
| 1 | 2007-08-03 Jay Belanger <jay.p.belanger@gmail.com> | 15 | 2007-08-03 Jay Belanger <jay.p.belanger@gmail.com> |
| 2 | 16 | ||
| 3 | * calc.texi (Basic Graphics): Mention the graphing of error | 17 | * calc.texi (Basic Graphics): Mention the graphing of error |
| 4 | forms. | 18 | forms. |
| 5 | (Graphics Options): Mention how `g s' handles error forms. | 19 | (Graphics Options): Mention how `g s' handles error forms. |
| 20 | (Curve Fitting): Mention plotting the curves. | ||
| 21 | (Standard Nonlinear Models): Add additional models. | ||
| 22 | (Curve Fitting Details): Mention the Levenberg-Marquardt method. | ||
| 23 | (Linear Fits): Correct result. | ||
| 6 | 24 | ||
| 7 | 2007-08-01 Alan Mackenzie <acm@muc.de> | 25 | 2007-08-01 Alan Mackenzie <acm@muc.de> |
| 8 | 26 | ||
diff --git a/man/calc.texi b/man/calc.texi index 9e50629a3b2..e13dd9097d6 100644 --- a/man/calc.texi +++ b/man/calc.texi | |||
| @@ -23962,7 +23962,13 @@ such as @expr{y = m x + b} where @expr{m} and @expr{b} are parameters | |||
| 23962 | to be determined. For a typical set of measured data there will be | 23962 | to be determined. For a typical set of measured data there will be |
| 23963 | no single @expr{m} and @expr{b} that exactly fit the data; in this | 23963 | no single @expr{m} and @expr{b} that exactly fit the data; in this |
| 23964 | case, Calc chooses values of the parameters that provide the closest | 23964 | case, Calc chooses values of the parameters that provide the closest |
| 23965 | possible fit. | 23965 | possible fit. The model formula can be entered in various ways after |
| 23966 | the key sequence @kbd{a F} is pressed. | ||
| 23967 | |||
| 23968 | If the letter @kbd{P} is pressed after @kbd{a F} but before the model | ||
| 23969 | description is entered, the data as well as the model formula will be | ||
| 23970 | plotted after the formula is determined. This will be indicated by a | ||
| 23971 | ``P'' in the minibuffer after the help message. | ||
| 23966 | 23972 | ||
| 23967 | @menu | 23973 | @menu |
| 23968 | * Linear Fits:: | 23974 | * Linear Fits:: |
| @@ -24055,7 +24061,7 @@ $$ | |||
| 24055 | @noindent | 24061 | @noindent |
| 24056 | is on the stack and we wish to do a simple linear fit. Type | 24062 | is on the stack and we wish to do a simple linear fit. Type |
| 24057 | @kbd{a F}, then @kbd{1} for the model, then @key{RET} to use | 24063 | @kbd{a F}, then @kbd{1} for the model, then @key{RET} to use |
| 24058 | the default names. The result will be the formula @expr{3 + 2 x} | 24064 | the default names. The result will be the formula @expr{3. + 2. x} |
| 24059 | on the stack. Calc has created the model expression @kbd{a + b x}, | 24065 | on the stack. Calc has created the model expression @kbd{a + b x}, |
| 24060 | then found the optimal values of @expr{a} and @expr{b} to fit the | 24066 | then found the optimal values of @expr{a} and @expr{b} to fit the |
| 24061 | data. (In this case, it was able to find an exact fit.) Calc then | 24067 | data. (In this case, it was able to find an exact fit.) Calc then |
| @@ -24245,6 +24251,8 @@ case, the model might be @expr{a x + b y + c z}; and in the polynomial | |||
| 24245 | case, the model could be @expr{a x + b x^2 + c x^3}. You can get | 24251 | case, the model could be @expr{a x + b x^2 + c x^3}. You can get |
| 24246 | a homogeneous linear or multilinear model by pressing the letter | 24252 | a homogeneous linear or multilinear model by pressing the letter |
| 24247 | @kbd{h} followed by a regular model key, like @kbd{1} or @kbd{2}. | 24253 | @kbd{h} followed by a regular model key, like @kbd{1} or @kbd{2}. |
| 24254 | This will be indicated by an ``h'' in the minibuffer after the help | ||
| 24255 | message. | ||
| 24248 | 24256 | ||
| 24249 | It is certainly possible to have other constrained linear models, | 24257 | It is certainly possible to have other constrained linear models, |
| 24250 | like @expr{2.3 + a x} or @expr{a - 4 x}. While there is no single | 24258 | like @expr{2.3 + a x} or @expr{a - 4 x}. While there is no single |
| @@ -24454,6 +24462,18 @@ Quadratic. @mathit{a + b (x-c)^2 + d (x-e)^2}. | |||
| 24454 | Gaussian. | 24462 | Gaussian. |
| 24455 | @texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. | 24463 | @texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. |
| 24456 | @infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. | 24464 | @infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. |
| 24465 | @item s | ||
| 24466 | Logistic @emph{s} curve. | ||
| 24467 | @texline @math{a/(1+e^{b(x-c)})}. | ||
| 24468 | @infoline @mathit{a/(1 + exp(b (x - c)))}. | ||
| 24469 | @item b | ||
| 24470 | Logistic bell curve. | ||
| 24471 | @texline @math{ae^{b(x-c)}/(1+e^{b(x-c)})^2}. | ||
| 24472 | @infoline @mathit{a exp(b (x - c))/(1 + exp(b (x - c)))^2}. | ||
| 24473 | @item o | ||
| 24474 | Hubbert linearization. | ||
| 24475 | @texline @math{{y \over x} = a(1-x/b)}. | ||
| 24476 | @infoline @mathit{(y/x) = a (1 - x/b)}. | ||
| 24457 | @end table | 24477 | @end table |
| 24458 | 24478 | ||
| 24459 | All of these models are used in the usual way; just press the appropriate | 24479 | All of these models are used in the usual way; just press the appropriate |
| @@ -24462,8 +24482,9 @@ result will be a formula as shown in the above table, with the best-fit | |||
| 24462 | values of the parameters substituted. (You may find it easier to read | 24482 | values of the parameters substituted. (You may find it easier to read |
| 24463 | the parameter values from the vector that is placed in the trail.) | 24483 | the parameter values from the vector that is placed in the trail.) |
| 24464 | 24484 | ||
| 24465 | All models except Gaussian and polynomials can generalize as shown to any | 24485 | All models except Gaussian, logistics, Hubbert and polynomials can |
| 24466 | number of independent variables. Also, all the built-in models have an | 24486 | generalize as shown to any number of independent variables. Also, all |
| 24487 | the built-in models except for the logistic and Hubbert curves have an | ||
| 24467 | additive or multiplicative parameter shown as @expr{a} in the above table | 24488 | additive or multiplicative parameter shown as @expr{a} in the above table |
| 24468 | which can be replaced by zero or one, as appropriate, by typing @kbd{h} | 24489 | which can be replaced by zero or one, as appropriate, by typing @kbd{h} |
| 24469 | before the model key. | 24490 | before the model key. |
| @@ -24603,7 +24624,7 @@ to convert the model into this form. For example, if the model | |||
| 24603 | is @expr{a + b x + c x^2}, then @expr{f(x) = 1}, @expr{g(x) = x}, | 24624 | is @expr{a + b x + c x^2}, then @expr{f(x) = 1}, @expr{g(x) = x}, |
| 24604 | and @expr{h(x) = x^2} are suitable functions. | 24625 | and @expr{h(x) = x^2} are suitable functions. |
| 24605 | 24626 | ||
| 24606 | For other models, Calc uses a variety of algebraic manipulations | 24627 | For most other models, Calc uses a variety of algebraic manipulations |
| 24607 | to try to put the problem into the form | 24628 | to try to put the problem into the form |
| 24608 | 24629 | ||
| 24609 | @smallexample | 24630 | @smallexample |
| @@ -24662,7 +24683,12 @@ The Gaussian model looks quite complicated, but a closer examination | |||
| 24662 | shows that it's actually similar to the quadratic model but with an | 24683 | shows that it's actually similar to the quadratic model but with an |
| 24663 | exponential that can be brought to the top and moved into @expr{Y}. | 24684 | exponential that can be brought to the top and moved into @expr{Y}. |
| 24664 | 24685 | ||
| 24665 | An example of a model that cannot be put into general linear | 24686 | The logistic models cannot be put into general linear form. For these |
| 24687 | models, and the Hubbert linearization, Calc computes a rough | ||
| 24688 | approximation for the parameters, then uses the Levenberg-Marquardt | ||
| 24689 | iterative method to refine the approximations. | ||
| 24690 | |||
| 24691 | Another model that cannot be put into general linear | ||
| 24666 | form is a Gaussian with a constant background added on, i.e., | 24692 | form is a Gaussian with a constant background added on, i.e., |
| 24667 | @expr{d} + the regular Gaussian formula. If you have a model like | 24693 | @expr{d} + the regular Gaussian formula. If you have a model like |
| 24668 | this, your best bet is to replace enough of your parameters with | 24694 | this, your best bet is to replace enough of your parameters with |
diff --git a/man/files.texi b/man/files.texi index 747b0dba806..7ba36916684 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -2898,7 +2898,10 @@ point. Partial Completion mode offers other features extending | |||
| 2898 | mode allows you to toggle between displaying the file as an image in | 2898 | mode allows you to toggle between displaying the file as an image in |
| 2899 | the Emacs buffer, and displaying its underlying text representation, | 2899 | the Emacs buffer, and displaying its underlying text representation, |
| 2900 | using the command @kbd{C-c C-c} (@code{image-toggle-display}). This | 2900 | using the command @kbd{C-c C-c} (@code{image-toggle-display}). This |
| 2901 | works only when Emacs can display the specific image type. | 2901 | works only when Emacs can display the specific image type. If the |
| 2902 | displayed image is wider or taller than the frame, the usual point | ||
| 2903 | motion keys (@kbd{C-f}, @kbd{C-p}, and so forth) cause different parts | ||
| 2904 | of the image to be displayed. | ||
| 2902 | 2905 | ||
| 2903 | @findex thumbs-mode | 2906 | @findex thumbs-mode |
| 2904 | @findex mode, thumbs | 2907 | @findex mode, thumbs |
diff --git a/man/glossary.texi b/man/glossary.texi index d082e6ec077..f289c2ca1cb 100644 --- a/man/glossary.texi +++ b/man/glossary.texi | |||
| @@ -603,7 +603,8 @@ Hyper}. | |||
| 603 | 603 | ||
| 604 | @item Iff | 604 | @item Iff |
| 605 | ``Iff'' means ``if and only if.'' This terminology comes from | 605 | ``Iff'' means ``if and only if.'' This terminology comes from |
| 606 | mathematics. | 606 | mathematics. Try to avoid using this term in documentation, since |
| 607 | many are unfamiliar with it and mistake it for a typo. | ||
| 607 | 608 | ||
| 608 | @item Inbox | 609 | @item Inbox |
| 609 | An inbox is a file in which mail is delivered by the operating system. | 610 | An inbox is a file in which mail is delivered by the operating system. |
diff --git a/man/gnus.texi b/man/gnus.texi index fe26aa5f662..94144b65e3f 100644 --- a/man/gnus.texi +++ b/man/gnus.texi | |||
| @@ -12945,6 +12945,34 @@ network is fast, setting this variable to a really small number means | |||
| 12945 | that fetching will probably be slower. If this variable is @code{nil}, | 12945 | that fetching will probably be slower. If this variable is @code{nil}, |
| 12946 | @code{nntp} will never split requests. The default is 5. | 12946 | @code{nntp} will never split requests. The default is 5. |
| 12947 | 12947 | ||
| 12948 | @item nntp-xref-number-is-evil | ||
| 12949 | @vindex nntp-xref-number-is-evil | ||
| 12950 | When Gnus refers to an article having the @code{Message-ID} that a user | ||
| 12951 | specifies or having the @code{Message-ID} of the parent article of the | ||
| 12952 | current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD} | ||
| 12953 | command to the @acronym{NNTP} server to know where it is, and the server | ||
| 12954 | returns the data containing the pairs of a group and an article number | ||
| 12955 | in the @code{Xref} header. Gnus normally uses the article number to | ||
| 12956 | refer to the article if the data shows that that article is in the | ||
| 12957 | current group, while it uses the @code{Message-ID} otherwise. However, | ||
| 12958 | some news servers, e.g., ones running Diablo, run multiple engines | ||
| 12959 | having the same articles but article numbers are not kept synchronized | ||
| 12960 | between them. In that case, the article number that appears in the | ||
| 12961 | @code{Xref} header varies by which engine is chosen, so you cannot refer | ||
| 12962 | to the parent article that is in the current group, for instance. If | ||
| 12963 | you connect to such a server, set this variable to a non-@code{nil} | ||
| 12964 | value, and Gnus never uses article numbers. For example: | ||
| 12965 | |||
| 12966 | @lisp | ||
| 12967 | (setq gnus-select-method | ||
| 12968 | '(nntp "newszilla" | ||
| 12969 | (nntp-address "newszilla.example.com") | ||
| 12970 | (nntp-xref-number-is-evil t) | ||
| 12971 | @dots{})) | ||
| 12972 | @end lisp | ||
| 12973 | |||
| 12974 | The default value of this server variable is @code{nil}. | ||
| 12975 | |||
| 12948 | @item nntp-prepare-server-hook | 12976 | @item nntp-prepare-server-hook |
| 12949 | @vindex nntp-prepare-server-hook | 12977 | @vindex nntp-prepare-server-hook |
| 12950 | A hook run before attempting to connect to an @acronym{NNTP} server. | 12978 | A hook run before attempting to connect to an @acronym{NNTP} server. |
| @@ -18595,23 +18623,23 @@ predicate to individual groups. | |||
| 18595 | 18623 | ||
| 18596 | @table @code | 18624 | @table @code |
| 18597 | @item short | 18625 | @item short |
| 18598 | True iff the article is shorter than @code{gnus-agent-short-article} | 18626 | True if the article is shorter than @code{gnus-agent-short-article} |
| 18599 | lines; default 100. | 18627 | lines; default 100. |
| 18600 | 18628 | ||
| 18601 | @item long | 18629 | @item long |
| 18602 | True iff the article is longer than @code{gnus-agent-long-article} | 18630 | True if the article is longer than @code{gnus-agent-long-article} |
| 18603 | lines; default 200. | 18631 | lines; default 200. |
| 18604 | 18632 | ||
| 18605 | @item low | 18633 | @item low |
| 18606 | True iff the article has a download score less than | 18634 | True if the article has a download score less than |
| 18607 | @code{gnus-agent-low-score}; default 0. | 18635 | @code{gnus-agent-low-score}; default 0. |
| 18608 | 18636 | ||
| 18609 | @item high | 18637 | @item high |
| 18610 | True iff the article has a download score greater than | 18638 | True if the article has a download score greater than |
| 18611 | @code{gnus-agent-high-score}; default 0. | 18639 | @code{gnus-agent-high-score}; default 0. |
| 18612 | 18640 | ||
| 18613 | @item spam | 18641 | @item spam |
| 18614 | True iff the Gnus Agent guesses that the article is spam. The | 18642 | True if the Gnus Agent guesses that the article is spam. The |
| 18615 | heuristics may change over time, but at present it just computes a | 18643 | heuristics may change over time, but at present it just computes a |
| 18616 | checksum and sees whether articles match. | 18644 | checksum and sees whether articles match. |
| 18617 | 18645 | ||
| @@ -26651,7 +26679,7 @@ New @file{make.bat} for compiling and installing Gnus under MS Windows | |||
| 26651 | 26679 | ||
| 26652 | Use @file{make.bat} if you want to install Gnus under MS Windows, the | 26680 | Use @file{make.bat} if you want to install Gnus under MS Windows, the |
| 26653 | first argument to the batch-program should be the directory where | 26681 | first argument to the batch-program should be the directory where |
| 26654 | @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want | 26682 | @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want |
| 26655 | to install Gnus after compiling it, give @file{make.bat} @code{/copy} as | 26683 | to install Gnus after compiling it, give @file{make.bat} @code{/copy} as |
| 26656 | the second parameter. | 26684 | the second parameter. |
| 26657 | 26685 | ||
| @@ -27008,7 +27036,7 @@ The envelope sender address can be customized when using Sendmail. | |||
| 27008 | @item | 27036 | @item |
| 27009 | Gnus no longer generate the Sender: header automatically. | 27037 | Gnus no longer generate the Sender: header automatically. |
| 27010 | 27038 | ||
| 27011 | Earlier it was generated iff the user configurable email address was | 27039 | Earlier it was generated when the user configurable email address was |
| 27012 | different from the Gnus guessed default user address. As the guessing | 27040 | different from the Gnus guessed default user address. As the guessing |
| 27013 | algorithm is rarely correct these days, and (more controversially) the | 27041 | algorithm is rarely correct these days, and (more controversially) the |
| 27014 | only use of the Sender: header was to check if you are entitled to | 27042 | only use of the Sender: header was to check if you are entitled to |
diff --git a/man/sieve.texi b/man/sieve.texi index 1030babd593..4b7a95be952 100644 --- a/man/sieve.texi +++ b/man/sieve.texi | |||
| @@ -307,7 +307,7 @@ Authenticate to the server. | |||
| 307 | 307 | ||
| 308 | @item sieve-manage-capability | 308 | @item sieve-manage-capability |
| 309 | @findex sieve-manage-capability | 309 | @findex sieve-manage-capability |
| 310 | Return a list of capabilities the server support. | 310 | Return a list of capabilities the server supports. |
| 311 | 311 | ||
| 312 | @item sieve-manage-listscripts | 312 | @item sieve-manage-listscripts |
| 313 | @findex sieve-manage-listscripts | 313 | @findex sieve-manage-listscripts |
| @@ -315,7 +315,7 @@ List scripts on the server. | |||
| 315 | 315 | ||
| 316 | @item sieve-manage-havespace | 316 | @item sieve-manage-havespace |
| 317 | @findex sieve-manage-havespace | 317 | @findex sieve-manage-havespace |
| 318 | Returns non-@code{nil} iff server have roam for a script of given | 318 | Return non-@code{nil} if the server has room for a script of given |
| 319 | size. | 319 | size. |
| 320 | 320 | ||
| 321 | @item sieve-manage-getscript | 321 | @item sieve-manage-getscript |
diff --git a/src/ChangeLog b/src/ChangeLog index b0857fd63d0..1a4e8c113e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,131 @@ | |||
| 1 | 2007-08-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * gtkutil.c (update_frame_tool_bar): Use -1 as index | ||
| 4 | to gtk_toolbar_insert. | ||
| 5 | |||
| 6 | 2007-08-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 7 | |||
| 8 | * fileio.c (Finsert_file_contents): Yet Another Int/Lisp_Object Mixup. | ||
| 9 | |||
| 10 | * insdel.c (reset_var_on_error): New fun. | ||
| 11 | (signal_before_change, signal_after_change): | ||
| 12 | Use it to reset (after|before)-change-functions to nil in case of error. | ||
| 13 | Bind inhibit-modification-hooks to t. | ||
| 14 | Don't bind (after|before)-change-functions to nil while they run. | ||
| 15 | |||
| 16 | 2007-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 17 | |||
| 18 | * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when | ||
| 19 | filling pixmap with stippled background. | ||
| 20 | |||
| 21 | 2007-08-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 22 | |||
| 23 | * macterm.c [TARGET_API_MAC_CARBON] (mac_handle_window_event): | ||
| 24 | Don't use invisible frame as parent window for repositioning. | ||
| 25 | |||
| 26 | 2007-08-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 27 | |||
| 28 | * print.c (new_backquote_output): Rename from old_backquote_output. | ||
| 29 | (print): Inverse its logic (according to its name) so as to match the | ||
| 30 | behavior of new_backquote_flag in lread.c. | ||
| 31 | |||
| 32 | 2007-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 33 | |||
| 34 | * gmalloc.c (posix_memalign): New function. | ||
| 35 | |||
| 36 | * macterm.c (frame_highlight, frame_unhighlight): Don't call | ||
| 37 | ActivateControl/DeactivateControl here. | ||
| 38 | [USE_MAC_TOOLBAR] (free_frame_tool_bar): Suppress animation when | ||
| 39 | frame-notice-user-settings is non-nil. | ||
| 40 | [USE_MAC_FONT_PANEL] (mac_handle_font_event): Also record parameter | ||
| 41 | for kEventParamFMFontStyle. | ||
| 42 | [TARGET_API_MAC_CARBON] (mac_handle_keyboard_event): Don't check | ||
| 43 | mac_pass_command_to_system and mac_pass_control_to_system here. | ||
| 44 | (XTread_socket): Call ActivateControl/DeactivateControl here. | ||
| 45 | (XTread_socket) [TARGET_API_MAC_CARBON]: | ||
| 46 | Check mac_pass_command_to_system and mac_pass_control_to_system here. | ||
| 47 | (mac_handle_window_event) [USE_MAC_TOOLBAR]: Add further workaround | ||
| 48 | for window repositioning. | ||
| 49 | |||
| 50 | 2007-08-08 Glenn Morris <rgm@gnu.org> | ||
| 51 | |||
| 52 | * Replace `iff' in doc-strings and comments. | ||
| 53 | |||
| 54 | 2007-08-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 55 | |||
| 56 | * xdisp.c (move_it_by_lines): Remove incorrect optimization. | ||
| 57 | |||
| 58 | 2007-08-07 Martin Rudalics <rudalics@gmx.at> | ||
| 59 | |||
| 60 | * fileio.c (Finsert_file_contents): Run format-decode and | ||
| 61 | after_insert_file_functions on entire buffer when REPLACE is | ||
| 62 | non-nil and inhibit modification_hooks and point_motion_hooks. | ||
| 63 | For consistency, run after_insert_file_functions iff something | ||
| 64 | got inserted. Move signal_after_change and update_compositions | ||
| 65 | after code running after_insert_file_functions. Make sure that | ||
| 66 | undo_list doesn't record intermediate steps of the decoding | ||
| 67 | process. | ||
| 68 | |||
| 69 | 2007-08-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 70 | |||
| 71 | * emacs.c (main) | ||
| 72 | [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]: | ||
| 73 | Call malloc_enable_thread on interactive startup. | ||
| 74 | |||
| 75 | * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable. | ||
| 76 | (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS) | ||
| 77 | [USE_PTHREAD]: Conditionalize with it. | ||
| 78 | (malloc_atfork_handler_prepare, malloc_atfork_handler_parent) | ||
| 79 | (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]: | ||
| 80 | New functions. | ||
| 81 | |||
| 82 | 2007-08-06 Chong Yidong <cyd@stupidchicken.com> | ||
| 83 | |||
| 84 | * xdisp.c (redisplay_window): When restoring original buffer | ||
| 85 | position, make sure it is still valid. | ||
| 86 | |||
| 87 | * image.c (png_load): Ignore png-supplied background color. | ||
| 88 | |||
| 89 | 2007-08-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 90 | |||
| 91 | * mac.c [TARGET_API_MAC_CARBON] (cfdate_to_lisp): Obtain microsec value. | ||
| 92 | Use kCFAbsoluteTimeIntervalSince1970. | ||
| 93 | |||
| 94 | * macmenu.c (quit_dialog_event_loop) [TARGET_API_MAC_CARBON]: | ||
| 95 | New variable. | ||
| 96 | [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Set it if dialog | ||
| 97 | event loop should be quit. | ||
| 98 | [TARGET_API_MAC_CARBON] (create_and_show_dialog) [!MAC_OSX]: | ||
| 99 | Quit dialog event loop if quit_dialog_event_loop is set. | ||
| 100 | |||
| 101 | * macselect.c [!TARGET_API_MAC_CARBON]: Include Scrap.h. | ||
| 102 | (Selection): New typedef. Use instead of ScrapRef. | ||
| 103 | (mac_get_selection_from_symbol): Rename from get_scrap_from_symbol. | ||
| 104 | (mac_valid_selection_target_p): Rename from valid_scrap_target_type_p. | ||
| 105 | (mac_clear_selection): Rename from clear_scrap. | ||
| 106 | (get_flavor_type_from_symbol): New argument SEL and subsume function of | ||
| 107 | scrap_has_target_type. All uses changed. | ||
| 108 | (mac_get_selection_ownership_info, mac_valid_selection_value_p) | ||
| 109 | (mac_selection_has_target_p): New functions. | ||
| 110 | (mac_put_selection_value): Rename from put_scrap_string. | ||
| 111 | (mac_get_selection_value): Rename from get_scrap_string. | ||
| 112 | (mac_get_selection_target_list): Rename from get_scrap_target_type_list. | ||
| 113 | (put_scrap_private_timestamp, scrap_has_target_type) | ||
| 114 | (get_scrap_private_timestamp): Remove functions. | ||
| 115 | (SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP): Remove define. | ||
| 116 | (x_own_selection, x_get_local_selection): | ||
| 117 | Use mac_valid_selection_value_p. | ||
| 118 | (x_own_selection): Don't use put_scrap_private_timestamp. | ||
| 119 | Record OWNERSHIP-INFO into Vselection_alist instead. | ||
| 120 | (x_get_local_selection): Don't check type if request is local. | ||
| 121 | (Fx_selection_owner_p): Don't use get_scrap_private_timestamp. | ||
| 122 | Detect ownership change with OWNERSHIP-INFO in Vselection_alist instead. | ||
| 123 | |||
| 124 | 2007-08-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 125 | |||
| 126 | * gtkutil.c (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s, | ||
| 127 | add comment explaining why. | ||
| 128 | |||
| 1 | 2007-08-03 Richard Stallman <rms@gnu.org> | 129 | 2007-08-03 Richard Stallman <rms@gnu.org> |
| 2 | 130 | ||
| 3 | * fileio.c (Fvisited_file_modtime): Use make_time. | 131 | * fileio.c (Fvisited_file_modtime): Use make_time. |
diff --git a/src/buffer.h b/src/buffer.h index 2f63fe30614..3935a675c42 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -570,7 +570,7 @@ struct buffer | |||
| 570 | Lisp_Object filename; | 570 | Lisp_Object filename; |
| 571 | /* Dir for expanding relative file names. */ | 571 | /* Dir for expanding relative file names. */ |
| 572 | Lisp_Object directory; | 572 | Lisp_Object directory; |
| 573 | /* True iff this buffer has been backed up (if you write to the | 573 | /* True if this buffer has been backed up (if you write to the |
| 574 | visited file and it hasn't been backed up, then a backup will | 574 | visited file and it hasn't been backed up, then a backup will |
| 575 | be made). */ | 575 | be made). */ |
| 576 | /* This isn't really used by the C code, so could be deleted. */ | 576 | /* This isn't really used by the C code, so could be deleted. */ |
diff --git a/src/callproc.c b/src/callproc.c index ecc8643f630..d86113cfdba 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -117,7 +117,7 @@ Lisp_Object Vprocess_environment; | |||
| 117 | Lisp_Object Qbuffer_file_type; | 117 | Lisp_Object Qbuffer_file_type; |
| 118 | #endif /* DOS_NT */ | 118 | #endif /* DOS_NT */ |
| 119 | 119 | ||
| 120 | /* True iff we are about to fork off a synchronous process or if we | 120 | /* True if we are about to fork off a synchronous process or if we |
| 121 | are waiting for it. */ | 121 | are waiting for it. */ |
| 122 | int synch_process_alive; | 122 | int synch_process_alive; |
| 123 | 123 | ||
diff --git a/src/casetab.c b/src/casetab.c index b5db07d52b5..bcd8e63cc7a 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -40,7 +40,7 @@ static void set_identity (); | |||
| 40 | static void shuffle (); | 40 | static void shuffle (); |
| 41 | 41 | ||
| 42 | DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, | 42 | DEFUN ("case-table-p", Fcase_table_p, Scase_table_p, 1, 1, 0, |
| 43 | doc: /* Return t iff OBJECT is a case table. | 43 | doc: /* Return t if OBJECT is a case table. |
| 44 | See `set-case-table' for more information on these data structures. */) | 44 | See `set-case-table' for more information on these data structures. */) |
| 45 | (object) | 45 | (object) |
| 46 | Lisp_Object object; | 46 | Lisp_Object object; |
diff --git a/src/category.c b/src/category.c index 8a9de1577f2..708131d8e41 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -469,7 +469,7 @@ syms_of_category () | |||
| 469 | doc: /* List of pair (cons) of categories to determine word boundary. | 469 | doc: /* List of pair (cons) of categories to determine word boundary. |
| 470 | 470 | ||
| 471 | Emacs treats a sequence of word constituent characters as a single | 471 | Emacs treats a sequence of word constituent characters as a single |
| 472 | word (i.e. finds no word boundary between them) iff they belongs to | 472 | word (i.e. finds no word boundary between them) only if they belong to |
| 473 | the same charset. But, exceptions are allowed in the following cases. | 473 | the same charset. But, exceptions are allowed in the following cases. |
| 474 | 474 | ||
| 475 | \(1) The case that characters are in different charsets is controlled | 475 | \(1) The case that characters are in different charsets is controlled |
| @@ -673,13 +673,13 @@ while (0) | |||
| 673 | 673 | ||
| 674 | #define CCL_LookupIntConstTbl 0x13 /* Lookup multibyte character by | 674 | #define CCL_LookupIntConstTbl 0x13 /* Lookup multibyte character by |
| 675 | integer key. Afterwards R7 set | 675 | integer key. Afterwards R7 set |
| 676 | to 1 iff lookup succeeded. | 676 | to 1 if lookup succeeded. |
| 677 | 1:ExtendedCOMMNDRrrRRRXXXXXXXX | 677 | 1:ExtendedCOMMNDRrrRRRXXXXXXXX |
| 678 | 2:ARGUMENT(Hash table ID) */ | 678 | 2:ARGUMENT(Hash table ID) */ |
| 679 | 679 | ||
| 680 | #define CCL_LookupCharConstTbl 0x14 /* Lookup integer by multibyte | 680 | #define CCL_LookupCharConstTbl 0x14 /* Lookup integer by multibyte |
| 681 | character key. Afterwards R7 set | 681 | character key. Afterwards R7 set |
| 682 | to 1 iff lookup succeeded. | 682 | to 1 if lookup succeeded. |
| 683 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX | 683 | 1:ExtendedCOMMNDRrrRRRrrrXXXXX |
| 684 | 2:ARGUMENT(Hash table ID) */ | 684 | 2:ARGUMENT(Hash table ID) */ |
| 685 | 685 | ||
diff --git a/src/charset.h b/src/charset.h index 1b5fba67064..6d34a5feea3 100644 --- a/src/charset.h +++ b/src/charset.h | |||
| @@ -192,13 +192,13 @@ struct charset | |||
| 192 | version. Otherwise, -1. */ | 192 | version. Otherwise, -1. */ |
| 193 | int emacs_mule_id; | 193 | int emacs_mule_id; |
| 194 | 194 | ||
| 195 | /* Nonzero iff the charset is compatible with ASCII. */ | 195 | /* Nonzero if the charset is compatible with ASCII. */ |
| 196 | int ascii_compatible_p; | 196 | int ascii_compatible_p; |
| 197 | 197 | ||
| 198 | /* Nonzero iff the charset is supplementary. */ | 198 | /* Nonzero if the charset is supplementary. */ |
| 199 | int supplementary_p; | 199 | int supplementary_p; |
| 200 | 200 | ||
| 201 | /* Nonzero iff all the code points are representable by Lisp_Int. */ | 201 | /* Nonzero if all the code points are representable by Lisp_Int. */ |
| 202 | int compact_codes_p; | 202 | int compact_codes_p; |
| 203 | 203 | ||
| 204 | /* The method for encoding/decoding characters of the charset. */ | 204 | /* The method for encoding/decoding characters of the charset. */ |
| @@ -332,7 +332,7 @@ extern struct charset *emacs_mule_charset[256]; | |||
| 332 | (CHARSET_ATTR_DEUNIFIER (CHARSET_ATTRIBUTES (charset))) | 332 | (CHARSET_ATTR_DEUNIFIER (CHARSET_ATTRIBUTES (charset))) |
| 333 | 333 | ||
| 334 | 334 | ||
| 335 | /* Nonzero iff OBJ is a valid charset symbol. */ | 335 | /* Nonzero if OBJ is a valid charset symbol. */ |
| 336 | #define CHARSETP(obj) (CHARSET_SYMBOL_HASH_INDEX (obj) >= 0) | 336 | #define CHARSETP(obj) (CHARSET_SYMBOL_HASH_INDEX (obj) >= 0) |
| 337 | 337 | ||
| 338 | /* Check if X is a valid charset symbol. If not, signal an error. */ | 338 | /* Check if X is a valid charset symbol. If not, signal an error. */ |
| @@ -479,7 +479,7 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; | |||
| 479 | #define ISO_CHARSET_TABLE(dimension, chars_96, final) \ | 479 | #define ISO_CHARSET_TABLE(dimension, chars_96, final) \ |
| 480 | iso_charset_table[(dimension) - 1][(chars_96)][(final)] | 480 | iso_charset_table[(dimension) - 1][(chars_96)][(final)] |
| 481 | 481 | ||
| 482 | /* Nonzero iff the charset who has FAST_MAP may contain C. */ | 482 | /* Nonzero if the charset who has FAST_MAP may contain C. */ |
| 483 | #define CHARSET_FAST_MAP_REF(c, fast_map) \ | 483 | #define CHARSET_FAST_MAP_REF(c, fast_map) \ |
| 484 | ((c) < 0x10000 \ | 484 | ((c) < 0x10000 \ |
| 485 | ? fast_map[(c) >> 10] & (1 << (((c) >> 7) & 7)) \ | 485 | ? fast_map[(c) >> 10] & (1 << (((c) >> 7) & 7)) \ |
| @@ -495,7 +495,7 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; | |||
| 495 | 495 | ||
| 496 | 496 | ||
| 497 | 497 | ||
| 498 | /* 1 iff CHARSET may contain the character C. */ | 498 | /* 1 if CHARSET may contain the character C. */ |
| 499 | #define CHAR_CHARSET_P(c, charset) \ | 499 | #define CHAR_CHARSET_P(c, charset) \ |
| 500 | ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \ | 500 | ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \ |
| 501 | || ((CHARSET_UNIFIED_P (charset) \ | 501 | || ((CHARSET_UNIFIED_P (charset) \ |
diff --git a/src/coding.h b/src/coding.h index d4b159c3dfa..134402f3256 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -212,7 +212,7 @@ enum coding_attr_index | |||
| 212 | hash_lookup (XHASH_TABLE (Vcoding_system_hash_table), \ | 212 | hash_lookup (XHASH_TABLE (Vcoding_system_hash_table), \ |
| 213 | coding_system_symbol, NULL) | 213 | coding_system_symbol, NULL) |
| 214 | 214 | ||
| 215 | /* Return 1 iff CODING_SYSTEM_SYMBOL is a coding system. */ | 215 | /* Return 1 if CODING_SYSTEM_SYMBOL is a coding system. */ |
| 216 | 216 | ||
| 217 | #define CODING_SYSTEM_P(coding_system_symbol) \ | 217 | #define CODING_SYSTEM_P(coding_system_symbol) \ |
| 218 | (CODING_SYSTEM_ID (coding_system_symbol) >= 0 \ | 218 | (CODING_SYSTEM_ID (coding_system_symbol) >= 0 \ |
| @@ -421,7 +421,7 @@ struct coding_system | |||
| 421 | Lisp_Object dst_object; | 421 | Lisp_Object dst_object; |
| 422 | unsigned char *destination; | 422 | unsigned char *destination; |
| 423 | 423 | ||
| 424 | /* Set to 1 iff the source of conversion is not in the member | 424 | /* Set to 1 if the source of conversion is not in the member |
| 425 | `charbuf', but at `src_object'. */ | 425 | `charbuf', but at `src_object'. */ |
| 426 | int chars_at_source; | 426 | int chars_at_source; |
| 427 | 427 | ||
diff --git a/src/composite.h b/src/composite.h index 4eb9276cd7a..5a426826bcc 100644 --- a/src/composite.h +++ b/src/composite.h | |||
| @@ -61,7 +61,7 @@ enum composition_method { | |||
| 61 | /* Temporary variable used only in the following macros. */ | 61 | /* Temporary variable used only in the following macros. */ |
| 62 | extern Lisp_Object composition_temp; | 62 | extern Lisp_Object composition_temp; |
| 63 | 63 | ||
| 64 | /* Return 1 iff the composition is already registered. */ | 64 | /* Return 1 if the composition is already registered. */ |
| 65 | #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) | 65 | #define COMPOSITION_REGISTERD_P(prop) INTEGERP (XCAR (prop)) |
| 66 | 66 | ||
| 67 | /* Return ID number of the already registered composition. */ | 67 | /* Return ID number of the already registered composition. */ |
| @@ -96,7 +96,7 @@ extern Lisp_Object composition_temp; | |||
| 96 | ? COMPOSITION_WITH_ALTCHARS \ | 96 | ? COMPOSITION_WITH_ALTCHARS \ |
| 97 | : COMPOSITION_WITH_RULE_ALTCHARS)))) | 97 | : COMPOSITION_WITH_RULE_ALTCHARS)))) |
| 98 | 98 | ||
| 99 | /* Return 1 iff the composition is valid. It is valid if length of | 99 | /* Return 1 if the composition is valid. It is valid if length of |
| 100 | the composition equals to (END - START). */ | 100 | the composition equals to (END - START). */ |
| 101 | #define COMPOSITION_VALID_P(start, end, prop) \ | 101 | #define COMPOSITION_VALID_P(start, end, prop) \ |
| 102 | (CONSP (prop) \ | 102 | (CONSP (prop) \ |
diff --git a/src/dired.c b/src/dired.c index c471fb96f66..b362eec62b5 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -917,7 +917,7 @@ Elements of the attribute list are: | |||
| 917 | 7. Size in bytes. | 917 | 7. Size in bytes. |
| 918 | This is a floating point number if the size is too large for an integer. | 918 | This is a floating point number if the size is too large for an integer. |
| 919 | 8. File modes, as a string of ten letters or dashes as in ls -l. | 919 | 8. File modes, as a string of ten letters or dashes as in ls -l. |
| 920 | 9. t iff file's gid would change if file were deleted and recreated. | 920 | 9. t if file's gid would change if file were deleted and recreated. |
| 921 | 10. inode number. If inode number is larger than the Emacs integer, | 921 | 10. inode number. If inode number is larger than the Emacs integer, |
| 922 | this is a cons cell containing two integers: first the high part, | 922 | this is a cons cell containing two integers: first the high part, |
| 923 | then the low 16 bits. | 923 | then the low 16 bits. |
diff --git a/src/editfns.c b/src/editfns.c index f73ef0a2c05..152c5b669d9 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3646,7 +3646,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3646 | precision ::= '.' [0-9]* | 3646 | precision ::= '.' [0-9]* |
| 3647 | 3647 | ||
| 3648 | If a field-width is specified, it specifies to which width | 3648 | If a field-width is specified, it specifies to which width |
| 3649 | the output should be padded with blanks, iff the output | 3649 | the output should be padded with blanks, if the output |
| 3650 | string is shorter than field-width. | 3650 | string is shorter than field-width. |
| 3651 | 3651 | ||
| 3652 | If precision is specified, it specifies the number of | 3652 | If precision is specified, it specifies the number of |
diff --git a/src/emacs.c b/src/emacs.c index cbc80fe15dd..9f4fe9dc0de 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1167,6 +1167,13 @@ main (argc, argv | |||
| 1167 | setpgrp (); | 1167 | setpgrp (); |
| 1168 | #endif | 1168 | #endif |
| 1169 | #endif | 1169 | #endif |
| 1170 | #if defined (HAVE_GTK_AND_PTHREAD) && !defined (SYSTEM_MALLOC) && !defined (DOUG_LEA_MALLOC) | ||
| 1171 | { | ||
| 1172 | extern void malloc_enable_thread P_ ((void)); | ||
| 1173 | |||
| 1174 | malloc_enable_thread (); | ||
| 1175 | } | ||
| 1176 | #endif | ||
| 1170 | } | 1177 | } |
| 1171 | 1178 | ||
| 1172 | init_signals (); | 1179 | init_signals (); |
diff --git a/src/eval.c b/src/eval.c index 78316eb1a3c..6ce64bc4d8c 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1783,7 +1783,7 @@ signal_error (s, arg) | |||
| 1783 | } | 1783 | } |
| 1784 | 1784 | ||
| 1785 | 1785 | ||
| 1786 | /* Return nonzero iff LIST is a non-nil atom or | 1786 | /* Return nonzero if LIST is a non-nil atom or |
| 1787 | a list containing one of CONDITIONS. */ | 1787 | a list containing one of CONDITIONS. */ |
| 1788 | 1788 | ||
| 1789 | static int | 1789 | static int |
diff --git a/src/fileio.c b/src/fileio.c index 6af3386b82a..983bd72d282 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3695,27 +3695,25 @@ DEFUN ("insert-file-contents", Finsert_file_contents, Sinsert_file_contents, | |||
| 3695 | 1, 5, 0, | 3695 | 1, 5, 0, |
| 3696 | doc: /* Insert contents of file FILENAME after point. | 3696 | doc: /* Insert contents of file FILENAME after point. |
| 3697 | Returns list of absolute file name and number of characters inserted. | 3697 | Returns list of absolute file name and number of characters inserted. |
| 3698 | If second argument VISIT is non-nil, the buffer's visited filename | 3698 | If second argument VISIT is non-nil, the buffer's visited filename and |
| 3699 | and last save file modtime are set, and it is marked unmodified. | 3699 | last save file modtime are set, and it is marked unmodified. If |
| 3700 | If visiting and the file does not exist, visiting is completed | 3700 | visiting and the file does not exist, visiting is completed before the |
| 3701 | before the error is signaled. | 3701 | error is signaled. |
| 3702 | The optional third and fourth arguments BEG and END | 3702 | |
| 3703 | specify what portion of the file to insert. | 3703 | The optional third and fourth arguments BEG and END specify what portion |
| 3704 | These arguments count bytes in the file, not characters in the buffer. | 3704 | of the file to insert. These arguments count bytes in the file, not |
| 3705 | If VISIT is non-nil, BEG and END must be nil. | 3705 | characters in the buffer. If VISIT is non-nil, BEG and END must be nil. |
| 3706 | 3706 | ||
| 3707 | If optional fifth argument REPLACE is non-nil, | 3707 | If optional fifth argument REPLACE is non-nil, replace the current |
| 3708 | it means replace the current buffer contents (in the accessible portion) | 3708 | buffer contents (in the accessible portion) with the file contents. |
| 3709 | with the file contents. This is better than simply deleting and inserting | 3709 | This is better than simply deleting and inserting the whole thing |
| 3710 | the whole thing because (1) it preserves some marker positions | 3710 | because (1) it preserves some marker positions and (2) it puts less data |
| 3711 | and (2) it puts less data in the undo list. | 3711 | in the undo list. When REPLACE is non-nil, the second return value is |
| 3712 | When REPLACE is non-nil, the value is the number of characters actually read, | 3712 | the number of characters that replace previous buffer contents. |
| 3713 | which is often less than the number of characters to be read. | 3713 | |
| 3714 | 3714 | This function does code conversion according to the value of | |
| 3715 | This does code conversion according to the value of | 3715 | `coding-system-for-read' or `file-coding-system-alist', and sets the |
| 3716 | `coding-system-for-read' or `file-coding-system-alist', | 3716 | variable `last-coding-system-used' to the coding system actually used. */) |
| 3717 | and sets the variable `last-coding-system-used' to the coding system | ||
| 3718 | actually used. */) | ||
| 3719 | (filename, visit, beg, end, replace) | 3717 | (filename, visit, beg, end, replace) |
| 3720 | Lisp_Object filename, visit, beg, end, replace; | 3718 | Lisp_Object filename, visit, beg, end, replace; |
| 3721 | { | 3719 | { |
| @@ -3725,8 +3723,8 @@ actually used. */) | |||
| 3725 | register int how_much; | 3723 | register int how_much; |
| 3726 | register int unprocessed; | 3724 | register int unprocessed; |
| 3727 | int count = SPECPDL_INDEX (); | 3725 | int count = SPECPDL_INDEX (); |
| 3728 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 3726 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 3729 | Lisp_Object handler, val, insval, orig_filename; | 3727 | Lisp_Object handler, val, insval, orig_filename, old_undo; |
| 3730 | Lisp_Object p; | 3728 | Lisp_Object p; |
| 3731 | int total = 0; | 3729 | int total = 0; |
| 3732 | int not_regular = 0; | 3730 | int not_regular = 0; |
| @@ -3749,8 +3747,9 @@ actually used. */) | |||
| 3749 | val = Qnil; | 3747 | val = Qnil; |
| 3750 | p = Qnil; | 3748 | p = Qnil; |
| 3751 | orig_filename = Qnil; | 3749 | orig_filename = Qnil; |
| 3750 | old_undo = Qnil; | ||
| 3752 | 3751 | ||
| 3753 | GCPRO4 (filename, val, p, orig_filename); | 3752 | GCPRO5 (filename, val, p, orig_filename, old_undo); |
| 3754 | 3753 | ||
| 3755 | CHECK_STRING (filename); | 3754 | CHECK_STRING (filename); |
| 3756 | filename = Fexpand_file_name (filename, Qnil); | 3755 | filename = Fexpand_file_name (filename, Qnil); |
| @@ -4681,24 +4680,103 @@ actually used. */) | |||
| 4681 | /* Decode file format */ | 4680 | /* Decode file format */ |
| 4682 | if (inserted > 0) | 4681 | if (inserted > 0) |
| 4683 | { | 4682 | { |
| 4684 | int empty_undo_list_p = 0; | 4683 | /* Don't run point motion or modification hooks when decoding. */ |
| 4684 | int count = SPECPDL_INDEX (); | ||
| 4685 | specbind (Qinhibit_point_motion_hooks, Qt); | ||
| 4686 | specbind (Qinhibit_modification_hooks, Qt); | ||
| 4687 | |||
| 4688 | /* Save old undo list and don't record undo for decoding. */ | ||
| 4689 | old_undo = current_buffer->undo_list; | ||
| 4690 | current_buffer->undo_list = Qt; | ||
| 4685 | 4691 | ||
| 4686 | /* If we're anyway going to discard undo information, don't | 4692 | if (NILP (replace)) |
| 4687 | record it in the first place. The buffer's undo list at this | ||
| 4688 | point is either nil or t when visiting a file. */ | ||
| 4689 | if (!NILP (visit)) | ||
| 4690 | { | 4693 | { |
| 4691 | empty_undo_list_p = NILP (current_buffer->undo_list); | 4694 | insval = call3 (Qformat_decode, |
| 4692 | current_buffer->undo_list = Qt; | 4695 | Qnil, make_number (inserted), visit); |
| 4696 | CHECK_NUMBER (insval); | ||
| 4697 | inserted = XFASTINT (insval); | ||
| 4698 | } | ||
| 4699 | else | ||
| 4700 | { | ||
| 4701 | /* If REPLACE is non-nil and we succeeded in not replacing the | ||
| 4702 | beginning or end of the buffer text with the file's contents, | ||
| 4703 | call format-decode with `point' positioned at the beginning of | ||
| 4704 | the buffer and `inserted' equalling the number of characters | ||
| 4705 | in the buffer. Otherwise, format-decode might fail to | ||
| 4706 | correctly analyze the beginning or end of the buffer. Hence | ||
| 4707 | we temporarily save `point' and `inserted' here and restore | ||
| 4708 | `point' iff format-decode did not insert or delete any text. | ||
| 4709 | Otherwise we leave `point' at point-min. */ | ||
| 4710 | int opoint = PT; | ||
| 4711 | int opoint_byte = PT_BYTE; | ||
| 4712 | int oinserted = ZV - BEGV; | ||
| 4713 | |||
| 4714 | TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); | ||
| 4715 | insval = call3 (Qformat_decode, | ||
| 4716 | Qnil, make_number (oinserted), visit); | ||
| 4717 | CHECK_NUMBER (insval); | ||
| 4718 | if (XINT (insval) == oinserted) | ||
| 4719 | SET_PT_BOTH (opoint, opoint_byte); | ||
| 4720 | inserted = XFASTINT (insval); | ||
| 4693 | } | 4721 | } |
| 4694 | 4722 | ||
| 4695 | insval = call3 (Qformat_decode, | 4723 | /* For consistency with format-decode call these now iff inserted > 0 |
| 4696 | Qnil, make_number (inserted), visit); | 4724 | (martin 2007-06-28) */ |
| 4697 | CHECK_NUMBER (insval); | 4725 | p = Vafter_insert_file_functions; |
| 4698 | inserted = XFASTINT (insval); | 4726 | while (CONSP (p)) |
| 4727 | { | ||
| 4728 | if (NILP (replace)) | ||
| 4729 | { | ||
| 4730 | insval = call1 (XCAR (p), make_number (inserted)); | ||
| 4731 | if (!NILP (insval)) | ||
| 4732 | { | ||
| 4733 | CHECK_NUMBER (insval); | ||
| 4734 | inserted = XFASTINT (insval); | ||
| 4735 | } | ||
| 4736 | } | ||
| 4737 | else | ||
| 4738 | { | ||
| 4739 | /* For the rationale of this see the comment on format-decode above. */ | ||
| 4740 | int opoint = PT; | ||
| 4741 | int opoint_byte = PT_BYTE; | ||
| 4742 | int oinserted = ZV - BEGV; | ||
| 4743 | |||
| 4744 | TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE); | ||
| 4745 | insval = call1 (XCAR (p), make_number (oinserted)); | ||
| 4746 | if (!NILP (insval)) | ||
| 4747 | { | ||
| 4748 | CHECK_NUMBER (insval); | ||
| 4749 | if (XINT (insval) == oinserted) | ||
| 4750 | SET_PT_BOTH (opoint, opoint_byte); | ||
| 4751 | inserted = XFASTINT (insval); | ||
| 4752 | } | ||
| 4753 | } | ||
| 4754 | |||
| 4755 | QUIT; | ||
| 4756 | p = XCDR (p); | ||
| 4757 | } | ||
| 4758 | |||
| 4759 | if (NILP (visit)) | ||
| 4760 | { | ||
| 4761 | Lisp_Object lbeg, lend; | ||
| 4762 | XSETINT (lbeg, PT); | ||
| 4763 | XSETINT (lend, PT + inserted); | ||
| 4764 | if (CONSP (old_undo)) | ||
| 4765 | { | ||
| 4766 | Lisp_Object tem = XCAR (old_undo); | ||
| 4767 | if (CONSP (tem) && INTEGERP (XCAR (tem)) && | ||
| 4768 | INTEGERP (XCDR (tem)) && EQ (XCAR (tem), lbeg)) | ||
| 4769 | /* In the non-visiting case record only the final insertion. */ | ||
| 4770 | current_buffer->undo_list = | ||
| 4771 | Fcons (Fcons (lbeg, lend), Fcdr (old_undo)); | ||
| 4772 | } | ||
| 4773 | } | ||
| 4774 | else | ||
| 4775 | /* If undo_list was Qt before, keep it that way. | ||
| 4776 | Otherwise start with an empty undo_list. */ | ||
| 4777 | current_buffer->undo_list = EQ (old_undo, Qt) ? Qt : Qnil; | ||
| 4699 | 4778 | ||
| 4700 | if (!NILP (visit)) | 4779 | unbind_to (count, Qnil); |
| 4701 | current_buffer->undo_list = empty_undo_list_p ? Qnil : Qt; | ||
| 4702 | } | 4780 | } |
| 4703 | 4781 | ||
| 4704 | /* Call after-change hooks for the inserted text, aside from the case | 4782 | /* Call after-change hooks for the inserted text, aside from the case |
| @@ -4711,19 +4789,6 @@ actually used. */) | |||
| 4711 | update_compositions (PT, PT, CHECK_BORDER); | 4789 | update_compositions (PT, PT, CHECK_BORDER); |
| 4712 | } | 4790 | } |
| 4713 | 4791 | ||
| 4714 | p = Vafter_insert_file_functions; | ||
| 4715 | while (CONSP (p)) | ||
| 4716 | { | ||
| 4717 | insval = call1 (XCAR (p), make_number (inserted)); | ||
| 4718 | if (!NILP (insval)) | ||
| 4719 | { | ||
| 4720 | CHECK_NUMBER (insval); | ||
| 4721 | inserted = XFASTINT (insval); | ||
| 4722 | } | ||
| 4723 | QUIT; | ||
| 4724 | p = XCDR (p); | ||
| 4725 | } | ||
| 4726 | |||
| 4727 | if (!NILP (visit) | 4792 | if (!NILP (visit) |
| 4728 | && current_buffer->modtime == -1) | 4793 | && current_buffer->modtime == -1) |
| 4729 | { | 4794 | { |
| @@ -5144,7 +5209,7 @@ This does code conversion according to the value of | |||
| 5144 | * if we do writes that don't end with a carriage return. Furthermore | 5209 | * if we do writes that don't end with a carriage return. Furthermore |
| 5145 | * it cannot handle writes of more then 16K. The modified | 5210 | * it cannot handle writes of more then 16K. The modified |
| 5146 | * version of "sys_write" in SYSDEP.C (see comment there) copes with | 5211 | * version of "sys_write" in SYSDEP.C (see comment there) copes with |
| 5147 | * this EXCEPT for the last record (iff it doesn't end with a carriage | 5212 | * this EXCEPT for the last record (if it doesn't end with a carriage |
| 5148 | * return). This implies that if your buffer doesn't end with a carriage | 5213 | * return). This implies that if your buffer doesn't end with a carriage |
| 5149 | * return, you get one free... tough. However it also means that if | 5214 | * return, you get one free... tough. However it also means that if |
| 5150 | * we make two calls to sys_write (a la the following code) you can | 5215 | * we make two calls to sys_write (a la the following code) you can |
diff --git a/src/fontset.c b/src/fontset.c index 26b412804ca..47a682cc975 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -971,7 +971,7 @@ free_face_fontset (f, face) | |||
| 971 | } | 971 | } |
| 972 | 972 | ||
| 973 | 973 | ||
| 974 | /* Return 1 iff FACE is suitable for displaying character C. | 974 | /* Return 1 if FACE is suitable for displaying character C. |
| 975 | Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P | 975 | Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P |
| 976 | when C is not an ASCII character. */ | 976 | when C is not an ASCII character. */ |
| 977 | 977 | ||
diff --git a/src/fontset.h b/src/fontset.h index 1c0ef456486..353f01b27b0 100644 --- a/src/fontset.h +++ b/src/fontset.h | |||
| @@ -70,7 +70,7 @@ struct font_info | |||
| 70 | /* Average width of glyphs in the font. */ | 70 | /* Average width of glyphs in the font. */ |
| 71 | int average_width; | 71 | int average_width; |
| 72 | 72 | ||
| 73 | /* 1 iff `vertical-centering-font-regexp' matches this font name. | 73 | /* 1 if `vertical-centering-font-regexp' matches this font name. |
| 74 | In this case, we render characters at vartical center positions | 74 | In this case, we render characters at vartical center positions |
| 75 | of lines. */ | 75 | of lines. */ |
| 76 | int vertical_centering; | 76 | int vertical_centering; |
diff --git a/src/getloadavg.c b/src/getloadavg.c index f40149a8c47..6d66cbfd8a1 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c | |||
| @@ -484,7 +484,7 @@ static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */ | |||
| 484 | #if !defined(HAVE_LIBKSTAT) && defined(LOAD_AVE_TYPE) | 484 | #if !defined(HAVE_LIBKSTAT) && defined(LOAD_AVE_TYPE) |
| 485 | /* File descriptor open to /dev/kmem or VMS load ave driver. */ | 485 | /* File descriptor open to /dev/kmem or VMS load ave driver. */ |
| 486 | static int channel; | 486 | static int channel; |
| 487 | /* Nonzero iff channel is valid. */ | 487 | /* Nonzero if channel is valid. */ |
| 488 | static int getloadavg_initialized; | 488 | static int getloadavg_initialized; |
| 489 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ | 489 | /* Offset in kmem to seek to read load average, or 0 means invalid. */ |
| 490 | static long offset; | 490 | static long offset; |
diff --git a/src/gmalloc.c b/src/gmalloc.c index cf79b9159f2..ccc08e1ff68 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -129,6 +129,8 @@ extern FREE_RETURN_TYPE free PP ((__ptr_t __ptr)); | |||
| 129 | #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ | 129 | #if ! (defined (_MALLOC_INTERNAL) && __DJGPP__ - 0 == 1) /* Avoid conflict. */ |
| 130 | extern __ptr_t memalign PP ((__malloc_size_t __alignment, | 130 | extern __ptr_t memalign PP ((__malloc_size_t __alignment, |
| 131 | __malloc_size_t __size)); | 131 | __malloc_size_t __size)); |
| 132 | extern int posix_memalign PP ((__ptr_t *, __malloc_size_t, | ||
| 133 | __malloc_size_t size)); | ||
| 132 | #endif | 134 | #endif |
| 133 | 135 | ||
| 134 | /* Allocate SIZE bytes on a page boundary. */ | 136 | /* Allocate SIZE bytes on a page boundary. */ |
| @@ -136,6 +138,10 @@ extern __ptr_t memalign PP ((__malloc_size_t __alignment, | |||
| 136 | extern __ptr_t valloc PP ((__malloc_size_t __size)); | 138 | extern __ptr_t valloc PP ((__malloc_size_t __size)); |
| 137 | #endif | 139 | #endif |
| 138 | 140 | ||
| 141 | #ifdef USE_PTHREAD | ||
| 142 | /* Set up mutexes and make malloc etc. thread-safe. */ | ||
| 143 | extern void malloc_enable_thread PP ((void)); | ||
| 144 | #endif | ||
| 139 | 145 | ||
| 140 | #ifdef _MALLOC_INTERNAL | 146 | #ifdef _MALLOC_INTERNAL |
| 141 | 147 | ||
| @@ -242,10 +248,27 @@ extern void _free_internal_nolock PP ((__ptr_t __ptr)); | |||
| 242 | 248 | ||
| 243 | #ifdef USE_PTHREAD | 249 | #ifdef USE_PTHREAD |
| 244 | extern pthread_mutex_t _malloc_mutex, _aligned_blocks_mutex; | 250 | extern pthread_mutex_t _malloc_mutex, _aligned_blocks_mutex; |
| 245 | #define LOCK() pthread_mutex_lock (&_malloc_mutex) | 251 | extern int _malloc_thread_enabled_p; |
| 246 | #define UNLOCK() pthread_mutex_unlock (&_malloc_mutex) | 252 | #define LOCK() \ |
| 247 | #define LOCK_ALIGNED_BLOCKS() pthread_mutex_lock (&_aligned_blocks_mutex) | 253 | do { \ |
| 248 | #define UNLOCK_ALIGNED_BLOCKS() pthread_mutex_unlock (&_aligned_blocks_mutex) | 254 | if (_malloc_thread_enabled_p) \ |
| 255 | pthread_mutex_lock (&_malloc_mutex); \ | ||
| 256 | } while (0) | ||
| 257 | #define UNLOCK() \ | ||
| 258 | do { \ | ||
| 259 | if (_malloc_thread_enabled_p) \ | ||
| 260 | pthread_mutex_unlock (&_malloc_mutex); \ | ||
| 261 | } while (0) | ||
| 262 | #define LOCK_ALIGNED_BLOCKS() \ | ||
| 263 | do { \ | ||
| 264 | if (_malloc_thread_enabled_p) \ | ||
| 265 | pthread_mutex_lock (&_aligned_blocks_mutex); \ | ||
| 266 | } while (0) | ||
| 267 | #define UNLOCK_ALIGNED_BLOCKS() \ | ||
| 268 | do { \ | ||
| 269 | if (_malloc_thread_enabled_p) \ | ||
| 270 | pthread_mutex_unlock (&_aligned_blocks_mutex); \ | ||
| 271 | } while (0) | ||
| 249 | #else | 272 | #else |
| 250 | #define LOCK() | 273 | #define LOCK() |
| 251 | #define UNLOCK() | 274 | #define UNLOCK() |
| @@ -563,6 +586,47 @@ register_heapinfo () | |||
| 563 | #ifdef USE_PTHREAD | 586 | #ifdef USE_PTHREAD |
| 564 | pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; | 587 | pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 565 | pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; | 588 | pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 589 | int _malloc_thread_enabled_p; | ||
| 590 | |||
| 591 | static void | ||
| 592 | malloc_atfork_handler_prepare () | ||
| 593 | { | ||
| 594 | LOCK (); | ||
| 595 | LOCK_ALIGNED_BLOCKS (); | ||
| 596 | } | ||
| 597 | |||
| 598 | static void | ||
| 599 | malloc_atfork_handler_parent () | ||
| 600 | { | ||
| 601 | UNLOCK_ALIGNED_BLOCKS (); | ||
| 602 | UNLOCK (); | ||
| 603 | } | ||
| 604 | |||
| 605 | static void | ||
| 606 | malloc_atfork_handler_child () | ||
| 607 | { | ||
| 608 | UNLOCK_ALIGNED_BLOCKS (); | ||
| 609 | UNLOCK (); | ||
| 610 | } | ||
| 611 | |||
| 612 | /* Set up mutexes and make malloc etc. thread-safe. */ | ||
| 613 | void | ||
| 614 | malloc_enable_thread () | ||
| 615 | { | ||
| 616 | if (_malloc_thread_enabled_p) | ||
| 617 | return; | ||
| 618 | |||
| 619 | /* Some pthread implementations call malloc for statically | ||
| 620 | initialized mutexes when they are used first. To avoid such a | ||
| 621 | situation, we initialize mutexes here while their use is | ||
| 622 | disabled in malloc etc. */ | ||
| 623 | pthread_mutex_init (&_malloc_mutex, NULL); | ||
| 624 | pthread_mutex_init (&_aligned_blocks_mutex, NULL); | ||
| 625 | pthread_atfork (malloc_atfork_handler_prepare, | ||
| 626 | malloc_atfork_handler_parent, | ||
| 627 | malloc_atfork_handler_child); | ||
| 628 | _malloc_thread_enabled_p = 1; | ||
| 629 | } | ||
| 566 | #endif | 630 | #endif |
| 567 | 631 | ||
| 568 | static void | 632 | static void |
| @@ -575,19 +639,6 @@ malloc_initialize_1 () | |||
| 575 | if (__malloc_initialize_hook) | 639 | if (__malloc_initialize_hook) |
| 576 | (*__malloc_initialize_hook) (); | 640 | (*__malloc_initialize_hook) (); |
| 577 | 641 | ||
| 578 | /* We don't use recursive mutex because pthread_mutexattr_init may | ||
| 579 | call malloc internally. */ | ||
| 580 | #if 0 /* defined (USE_PTHREAD) */ | ||
| 581 | { | ||
| 582 | pthread_mutexattr_t attr; | ||
| 583 | |||
| 584 | pthread_mutexattr_init (&attr); | ||
| 585 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); | ||
| 586 | pthread_mutex_init (&_malloc_mutex, &attr); | ||
| 587 | pthread_mutexattr_destroy (&attr); | ||
| 588 | } | ||
| 589 | #endif | ||
| 590 | |||
| 591 | heapsize = HEAP / BLOCKSIZE; | 642 | heapsize = HEAP / BLOCKSIZE; |
| 592 | _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info)); | 643 | _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info)); |
| 593 | if (_heapinfo == NULL) | 644 | if (_heapinfo == NULL) |
| @@ -1808,6 +1859,36 @@ memalign (alignment, size) | |||
| 1808 | return result; | 1859 | return result; |
| 1809 | } | 1860 | } |
| 1810 | 1861 | ||
| 1862 | #ifndef ENOMEM | ||
| 1863 | #define ENOMEM 12 | ||
| 1864 | #endif | ||
| 1865 | |||
| 1866 | #ifndef EINVAL | ||
| 1867 | #define EINVAL 22 | ||
| 1868 | #endif | ||
| 1869 | |||
| 1870 | int | ||
| 1871 | posix_memalign (memptr, alignment, size) | ||
| 1872 | __ptr_t *memptr; | ||
| 1873 | __malloc_size_t alignment; | ||
| 1874 | __malloc_size_t size; | ||
| 1875 | { | ||
| 1876 | __ptr_t mem; | ||
| 1877 | |||
| 1878 | if (alignment == 0 | ||
| 1879 | || alignment % sizeof (__ptr_t) != 0 | ||
| 1880 | || (alignment & (alignment - 1)) != 0) | ||
| 1881 | return EINVAL; | ||
| 1882 | |||
| 1883 | mem = memalign (alignment, size); | ||
| 1884 | if (mem == NULL) | ||
| 1885 | return ENOMEM; | ||
| 1886 | |||
| 1887 | *memptr = mem; | ||
| 1888 | |||
| 1889 | return 0; | ||
| 1890 | } | ||
| 1891 | |||
| 1811 | #endif /* Not DJGPP v1 */ | 1892 | #endif /* Not DJGPP v1 */ |
| 1812 | /* Allocate memory on a page boundary. | 1893 | /* Allocate memory on a page boundary. |
| 1813 | Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. | 1894 | Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc. |
diff --git a/src/gtkutil.c b/src/gtkutil.c index f52e68b1230..7dc451a5d04 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -3372,8 +3372,16 @@ xg_tool_bar_callback (w, client_data) | |||
| 3372 | 3372 | ||
| 3373 | key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); | 3373 | key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY); |
| 3374 | XSETFRAME (frame, f); | 3374 | XSETFRAME (frame, f); |
| 3375 | |||
| 3376 | /* We generate two events here. The first one is to set the prefix | ||
| 3377 | to `(tool_bar)', see keyboard.c. */ | ||
| 3375 | event.kind = TOOL_BAR_EVENT; | 3378 | event.kind = TOOL_BAR_EVENT; |
| 3376 | event.frame_or_window = frame; | 3379 | event.frame_or_window = frame; |
| 3380 | event.arg = frame; | ||
| 3381 | kbd_buffer_store_event (&event); | ||
| 3382 | |||
| 3383 | event.kind = TOOL_BAR_EVENT; | ||
| 3384 | event.frame_or_window = frame; | ||
| 3377 | event.arg = key; | 3385 | event.arg = key; |
| 3378 | /* Convert between the modifier bits GDK uses and the modifier bits | 3386 | /* Convert between the modifier bits GDK uses and the modifier bits |
| 3379 | Emacs uses. This assumes GDK an X masks are the same, which they are when | 3387 | Emacs uses. This assumes GDK an X masks are the same, which they are when |
| @@ -3794,7 +3802,7 @@ update_frame_tool_bar (f) | |||
| 3794 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); | 3802 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); |
| 3795 | ti = gtk_tool_item_new (); | 3803 | ti = gtk_tool_item_new (); |
| 3796 | gtk_container_add (GTK_CONTAINER (ti), weventbox); | 3804 | gtk_container_add (GTK_CONTAINER (ti), weventbox); |
| 3797 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); | 3805 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); |
| 3798 | } | 3806 | } |
| 3799 | continue; | 3807 | continue; |
| 3800 | } | 3808 | } |
| @@ -3811,7 +3819,7 @@ update_frame_tool_bar (f) | |||
| 3811 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); | 3819 | gtk_container_add (GTK_CONTAINER (weventbox), wbutton); |
| 3812 | ti = gtk_tool_item_new (); | 3820 | ti = gtk_tool_item_new (); |
| 3813 | gtk_container_add (GTK_CONTAINER (ti), weventbox); | 3821 | gtk_container_add (GTK_CONTAINER (ti), weventbox); |
| 3814 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); | 3822 | gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, -1); |
| 3815 | 3823 | ||
| 3816 | 3824 | ||
| 3817 | /* The EMACS_INT cast avoids a warning. */ | 3825 | /* The EMACS_INT cast avoids a warning. */ |
diff --git a/src/image.c b/src/image.c index 74bb1d75451..a3cd3195217 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1644,6 +1644,8 @@ search_image_cache (f, spec, hash) | |||
| 1644 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); | 1644 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); |
| 1645 | int i = hash % IMAGE_CACHE_BUCKETS_SIZE; | 1645 | int i = hash % IMAGE_CACHE_BUCKETS_SIZE; |
| 1646 | 1646 | ||
| 1647 | if (!c) return NULL; | ||
| 1648 | |||
| 1647 | /* If the image spec does not specify a background color, the cached | 1649 | /* If the image spec does not specify a background color, the cached |
| 1648 | image must have the same background color as the current frame. | 1650 | image must have the same background color as the current frame. |
| 1649 | The foreground color must also match, for the sake of monochrome | 1651 | The foreground color must also match, for the sake of monochrome |
| @@ -1655,13 +1657,10 @@ search_image_cache (f, spec, hash) | |||
| 1655 | for formats that don't use transparency (such as jpeg), or if the | 1657 | for formats that don't use transparency (such as jpeg), or if the |
| 1656 | image spec specifies :background. However, the extra memory | 1658 | image spec specifies :background. However, the extra memory |
| 1657 | usage is probably negligible in practice, so we don't bother. */ | 1659 | usage is probably negligible in practice, so we don't bother. */ |
| 1658 | if (!c) return NULL; | ||
| 1659 | 1660 | ||
| 1660 | for (img = c->buckets[i]; img; img = img->next) | 1661 | for (img = c->buckets[i]; img; img = img->next) |
| 1661 | if (img->hash == hash | 1662 | if (img->hash == hash |
| 1662 | && !NILP (Fequal (img->spec, spec)) | 1663 | && !NILP (Fequal (img->spec, spec)) |
| 1663 | /* If the image spec specifies a background, it doesn't matter | ||
| 1664 | what the frame background is. */ | ||
| 1665 | && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) | 1664 | && img->frame_foreground == FRAME_FOREGROUND_PIXEL (f) |
| 1666 | && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) | 1665 | && img->frame_background == FRAME_BACKGROUND_PIXEL (f)) |
| 1667 | break; | 1666 | break; |
| @@ -6359,11 +6358,14 @@ png_load (f, img) | |||
| 6359 | PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); | 6358 | PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); |
| 6360 | } | 6359 | } |
| 6361 | } | 6360 | } |
| 6361 | /* The commented-out code checked if the png specifies a default | ||
| 6362 | background color, and uses that. Since we use the current | ||
| 6363 | frame background, it is OK for us to ignore this. | ||
| 6364 | |||
| 6362 | else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) | 6365 | else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) |
| 6363 | /* Image contains a background color with which to | ||
| 6364 | combine the image. */ | ||
| 6365 | fn_png_set_background (png_ptr, image_bg, | 6366 | fn_png_set_background (png_ptr, image_bg, |
| 6366 | PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); | 6367 | PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); |
| 6368 | */ | ||
| 6367 | else | 6369 | else |
| 6368 | { | 6370 | { |
| 6369 | /* Image does not contain a background color with which | 6371 | /* Image does not contain a background color with which |
diff --git a/src/indent.c b/src/indent.c index d0c50b6bb7e..95afa031485 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -116,7 +116,7 @@ character_width (c, dp) | |||
| 116 | return 0; | 116 | return 0; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /* Return true iff the display table DISPTAB specifies the same widths | 119 | /* Return true if the display table DISPTAB specifies the same widths |
| 120 | for characters as WIDTHTAB. We use this to decide when to | 120 | for characters as WIDTHTAB. We use this to decide when to |
| 121 | invalidate the buffer's width_run_cache. */ | 121 | invalidate the buffer's width_run_cache. */ |
| 122 | 122 | ||
diff --git a/src/indent.h b/src/indent.h index 2d3c158b069..2e873769603 100644 --- a/src/indent.h +++ b/src/indent.h | |||
| @@ -61,7 +61,7 @@ extern int last_known_column_point; | |||
| 61 | 61 | ||
| 62 | /* Functions for dealing with the column cache. */ | 62 | /* Functions for dealing with the column cache. */ |
| 63 | 63 | ||
| 64 | /* Return true iff the display table DISPTAB specifies the same widths | 64 | /* Return true if the display table DISPTAB specifies the same widths |
| 65 | for characters as WIDTHTAB. We use this to decide when to | 65 | for characters as WIDTHTAB. We use this to decide when to |
| 66 | invalidate the buffer's column_cache. */ | 66 | invalidate the buffer's column_cache. */ |
| 67 | int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab, | 67 | int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab, |
diff --git a/src/insdel.c b/src/insdel.c index 3c7bc4b8bd8..6736b22e2be 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -2170,6 +2170,20 @@ prepare_to_modify_buffer (start, end, preserve_ptr) | |||
| 2170 | #define FETCH_END \ | 2170 | #define FETCH_END \ |
| 2171 | (! NILP (end_marker) ? Fmarker_position (end_marker) : end) | 2171 | (! NILP (end_marker) ? Fmarker_position (end_marker) : end) |
| 2172 | 2172 | ||
| 2173 | /* Set a variable to nil if an error occurred. | ||
| 2174 | VAL is a cons-cell whose car is the variable name, and whose cdr is | ||
| 2175 | either nil (to mean that there was indeed an error), or non-nil to mean | ||
| 2176 | that the was no error (which thus causes this function to do | ||
| 2177 | nothing). */ | ||
| 2178 | Lisp_Object | ||
| 2179 | reset_var_on_error (val) | ||
| 2180 | Lisp_Object val; | ||
| 2181 | { | ||
| 2182 | if (NILP (XCDR (val))) | ||
| 2183 | Fset (XCAR (val), Qnil); | ||
| 2184 | return Qnil; | ||
| 2185 | } | ||
| 2186 | |||
| 2173 | /* Signal a change to the buffer immediately before it happens. | 2187 | /* Signal a change to the buffer immediately before it happens. |
| 2174 | START_INT and END_INT are the bounds of the text to be changed. | 2188 | START_INT and END_INT are the bounds of the text to be changed. |
| 2175 | 2189 | ||
| @@ -2185,6 +2199,7 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2185 | Lisp_Object start_marker, end_marker; | 2199 | Lisp_Object start_marker, end_marker; |
| 2186 | Lisp_Object preserve_marker; | 2200 | Lisp_Object preserve_marker; |
| 2187 | struct gcpro gcpro1, gcpro2, gcpro3; | 2201 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 2202 | int count = SPECPDL_INDEX (); | ||
| 2188 | 2203 | ||
| 2189 | if (inhibit_modification_hooks) | 2204 | if (inhibit_modification_hooks) |
| 2190 | return; | 2205 | return; |
| @@ -2196,6 +2211,8 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2196 | end_marker = Qnil; | 2211 | end_marker = Qnil; |
| 2197 | GCPRO3 (preserve_marker, start_marker, end_marker); | 2212 | GCPRO3 (preserve_marker, start_marker, end_marker); |
| 2198 | 2213 | ||
| 2214 | specbind (Qinhibit_modification_hooks, Qt); | ||
| 2215 | |||
| 2199 | /* If buffer is unmodified, run a special hook for that case. */ | 2216 | /* If buffer is unmodified, run a special hook for that case. */ |
| 2200 | if (SAVE_MODIFF >= MODIFF | 2217 | if (SAVE_MODIFF >= MODIFF |
| 2201 | && !NILP (Vfirst_change_hook) | 2218 | && !NILP (Vfirst_change_hook) |
| @@ -2210,46 +2227,22 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2210 | if (!NILP (Vbefore_change_functions)) | 2227 | if (!NILP (Vbefore_change_functions)) |
| 2211 | { | 2228 | { |
| 2212 | Lisp_Object args[3]; | 2229 | Lisp_Object args[3]; |
| 2213 | Lisp_Object before_change_functions; | 2230 | Lisp_Object rvoe_arg = Fcons (Qbefore_change_functions, Qnil); |
| 2214 | Lisp_Object after_change_functions; | ||
| 2215 | struct gcpro gcpro1, gcpro2; | ||
| 2216 | struct buffer *old = current_buffer; | ||
| 2217 | struct buffer *new; | ||
| 2218 | 2231 | ||
| 2219 | PRESERVE_VALUE; | 2232 | PRESERVE_VALUE; |
| 2220 | PRESERVE_START_END; | 2233 | PRESERVE_START_END; |
| 2221 | 2234 | ||
| 2222 | /* "Bind" before-change-functions and after-change-functions | 2235 | /* Mark before-change-functions to be reset to nil in case of error. */ |
| 2223 | to nil--but in a way that errors don't know about. | 2236 | record_unwind_protect (reset_var_on_error, rvoe_arg); |
| 2224 | That way, if there's an error in them, they will stay nil. */ | ||
| 2225 | before_change_functions = Vbefore_change_functions; | ||
| 2226 | after_change_functions = Vafter_change_functions; | ||
| 2227 | Vbefore_change_functions = Qnil; | ||
| 2228 | Vafter_change_functions = Qnil; | ||
| 2229 | GCPRO2 (before_change_functions, after_change_functions); | ||
| 2230 | 2237 | ||
| 2231 | /* Actually run the hook functions. */ | 2238 | /* Actually run the hook functions. */ |
| 2232 | args[0] = Qbefore_change_functions; | 2239 | args[0] = Qbefore_change_functions; |
| 2233 | args[1] = FETCH_START; | 2240 | args[1] = FETCH_START; |
| 2234 | args[2] = FETCH_END; | 2241 | args[2] = FETCH_END; |
| 2235 | run_hook_list_with_args (before_change_functions, 3, args); | 2242 | Frun_hook_with_args (3, args); |
| 2236 | 2243 | ||
| 2237 | /* "Unbind" the variables we "bound" to nil. Beware a | 2244 | /* There was no error: unarm the reset_on_error. */ |
| 2238 | buffer-local hook which changes the buffer when run (e.g. W3). */ | 2245 | XSETCDR (rvoe_arg, Qt); |
| 2239 | if (old != current_buffer) | ||
| 2240 | { | ||
| 2241 | new = current_buffer; | ||
| 2242 | set_buffer_internal (old); | ||
| 2243 | Vbefore_change_functions = before_change_functions; | ||
| 2244 | Vafter_change_functions = after_change_functions; | ||
| 2245 | set_buffer_internal (new); | ||
| 2246 | } | ||
| 2247 | else | ||
| 2248 | { | ||
| 2249 | Vbefore_change_functions = before_change_functions; | ||
| 2250 | Vafter_change_functions = after_change_functions; | ||
| 2251 | } | ||
| 2252 | UNGCPRO; | ||
| 2253 | } | 2246 | } |
| 2254 | 2247 | ||
| 2255 | if (current_buffer->overlays_before || current_buffer->overlays_after) | 2248 | if (current_buffer->overlays_before || current_buffer->overlays_after) |
| @@ -2265,6 +2258,8 @@ signal_before_change (start_int, end_int, preserve_ptr) | |||
| 2265 | free_marker (end_marker); | 2258 | free_marker (end_marker); |
| 2266 | RESTORE_VALUE; | 2259 | RESTORE_VALUE; |
| 2267 | UNGCPRO; | 2260 | UNGCPRO; |
| 2261 | |||
| 2262 | unbind_to (count, Qnil); | ||
| 2268 | } | 2263 | } |
| 2269 | 2264 | ||
| 2270 | /* Signal a change immediately after it happens. | 2265 | /* Signal a change immediately after it happens. |
| @@ -2278,6 +2273,7 @@ void | |||
| 2278 | signal_after_change (charpos, lendel, lenins) | 2273 | signal_after_change (charpos, lendel, lenins) |
| 2279 | int charpos, lendel, lenins; | 2274 | int charpos, lendel, lenins; |
| 2280 | { | 2275 | { |
| 2276 | int count = SPECPDL_INDEX (); | ||
| 2281 | if (inhibit_modification_hooks) | 2277 | if (inhibit_modification_hooks) |
| 2282 | return; | 2278 | return; |
| 2283 | 2279 | ||
| @@ -2308,48 +2304,25 @@ signal_after_change (charpos, lendel, lenins) | |||
| 2308 | if (!NILP (combine_after_change_list)) | 2304 | if (!NILP (combine_after_change_list)) |
| 2309 | Fcombine_after_change_execute (); | 2305 | Fcombine_after_change_execute (); |
| 2310 | 2306 | ||
| 2307 | specbind (Qinhibit_modification_hooks, Qt); | ||
| 2308 | |||
| 2311 | if (!NILP (Vafter_change_functions)) | 2309 | if (!NILP (Vafter_change_functions)) |
| 2312 | { | 2310 | { |
| 2313 | Lisp_Object args[4]; | 2311 | Lisp_Object args[4]; |
| 2314 | Lisp_Object before_change_functions; | 2312 | Lisp_Object rvoe_arg = Fcons (Qafter_change_functions, Qnil); |
| 2315 | Lisp_Object after_change_functions; | 2313 | |
| 2316 | struct buffer *old = current_buffer; | 2314 | /* Mark after-change-functions to be reset to nil in case of error. */ |
| 2317 | struct buffer *new; | 2315 | record_unwind_protect (reset_var_on_error, rvoe_arg); |
| 2318 | struct gcpro gcpro1, gcpro2; | ||
| 2319 | |||
| 2320 | /* "Bind" before-change-functions and after-change-functions | ||
| 2321 | to nil--but in a way that errors don't know about. | ||
| 2322 | That way, if there's an error in them, they will stay nil. */ | ||
| 2323 | before_change_functions = Vbefore_change_functions; | ||
| 2324 | after_change_functions = Vafter_change_functions; | ||
| 2325 | Vbefore_change_functions = Qnil; | ||
| 2326 | Vafter_change_functions = Qnil; | ||
| 2327 | GCPRO2 (before_change_functions, after_change_functions); | ||
| 2328 | 2316 | ||
| 2329 | /* Actually run the hook functions. */ | 2317 | /* Actually run the hook functions. */ |
| 2330 | args[0] = Qafter_change_functions; | 2318 | args[0] = Qafter_change_functions; |
| 2331 | XSETFASTINT (args[1], charpos); | 2319 | XSETFASTINT (args[1], charpos); |
| 2332 | XSETFASTINT (args[2], charpos + lenins); | 2320 | XSETFASTINT (args[2], charpos + lenins); |
| 2333 | XSETFASTINT (args[3], lendel); | 2321 | XSETFASTINT (args[3], lendel); |
| 2334 | run_hook_list_with_args (after_change_functions, | 2322 | Frun_hook_with_args (4, args); |
| 2335 | 4, args); | ||
| 2336 | 2323 | ||
| 2337 | /* "Unbind" the variables we "bound" to nil. Beware a | 2324 | /* There was no error: unarm the reset_on_error. */ |
| 2338 | buffer-local hook which changes the buffer when run (e.g. W3). */ | 2325 | XSETCDR (rvoe_arg, Qt); |
| 2339 | if (old != current_buffer) | ||
| 2340 | { | ||
| 2341 | new = current_buffer; | ||
| 2342 | set_buffer_internal (old); | ||
| 2343 | Vbefore_change_functions = before_change_functions; | ||
| 2344 | Vafter_change_functions = after_change_functions; | ||
| 2345 | set_buffer_internal (new); | ||
| 2346 | } | ||
| 2347 | else | ||
| 2348 | { | ||
| 2349 | Vbefore_change_functions = before_change_functions; | ||
| 2350 | Vafter_change_functions = after_change_functions; | ||
| 2351 | } | ||
| 2352 | UNGCPRO; | ||
| 2353 | } | 2326 | } |
| 2354 | 2327 | ||
| 2355 | if (current_buffer->overlays_before || current_buffer->overlays_after) | 2328 | if (current_buffer->overlays_before || current_buffer->overlays_after) |
| @@ -2365,6 +2338,8 @@ signal_after_change (charpos, lendel, lenins) | |||
| 2365 | if (lendel == 0) | 2338 | if (lendel == 0) |
| 2366 | report_interval_modification (make_number (charpos), | 2339 | report_interval_modification (make_number (charpos), |
| 2367 | make_number (charpos + lenins)); | 2340 | make_number (charpos + lenins)); |
| 2341 | |||
| 2342 | unbind_to (count, Qnil); | ||
| 2368 | } | 2343 | } |
| 2369 | 2344 | ||
| 2370 | Lisp_Object | 2345 | Lisp_Object |
diff --git a/src/intervals.c b/src/intervals.c index 3547e62d2bf..74269c7d406 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -2200,7 +2200,7 @@ set_point_both (buffer, charpos, bytepos) | |||
| 2200 | 2200 | ||
| 2201 | temp_set_point_both (buffer, charpos, bytepos); | 2201 | temp_set_point_both (buffer, charpos, bytepos); |
| 2202 | 2202 | ||
| 2203 | /* We run point-left and point-entered hooks here, iff the | 2203 | /* We run point-left and point-entered hooks here, if the |
| 2204 | two intervals are not equivalent. These hooks take | 2204 | two intervals are not equivalent. These hooks take |
| 2205 | (old_point, new_point) as arguments. */ | 2205 | (old_point, new_point) as arguments. */ |
| 2206 | if (NILP (Vinhibit_point_motion_hooks) | 2206 | if (NILP (Vinhibit_point_motion_hooks) |
diff --git a/src/keyboard.c b/src/keyboard.c index 28403792fb0..c55faba6f7f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -500,7 +500,7 @@ static struct input_event * volatile kbd_store_ptr; | |||
| 500 | /* The above pair of variables forms a "queue empty" flag. When we | 500 | /* The above pair of variables forms a "queue empty" flag. When we |
| 501 | enqueue a non-hook event, we increment kbd_store_ptr. When we | 501 | enqueue a non-hook event, we increment kbd_store_ptr. When we |
| 502 | dequeue a non-hook event, we increment kbd_fetch_ptr. We say that | 502 | dequeue a non-hook event, we increment kbd_fetch_ptr. We say that |
| 503 | there is input available iff the two pointers are not equal. | 503 | there is input available if the two pointers are not equal. |
| 504 | 504 | ||
| 505 | Why not just have a flag set and cleared by the enqueuing and | 505 | Why not just have a flag set and cleared by the enqueuing and |
| 506 | dequeuing functions? Such a flag could be screwed up by interrupts | 506 | dequeuing functions? Such a flag could be screwed up by interrupts |
| @@ -3590,7 +3590,7 @@ restore_getcjmp (temp) | |||
| 3590 | kbd_buffer_store_event places events in kbd_buffer, and | 3590 | kbd_buffer_store_event places events in kbd_buffer, and |
| 3591 | kbd_buffer_get_event retrieves them. */ | 3591 | kbd_buffer_get_event retrieves them. */ |
| 3592 | 3592 | ||
| 3593 | /* Return true iff there are any events in the queue that read-char | 3593 | /* Return true if there are any events in the queue that read-char |
| 3594 | would return. If this returns false, a read-char would block. */ | 3594 | would return. If this returns false, a read-char would block. */ |
| 3595 | static int | 3595 | static int |
| 3596 | readable_events (flags) | 3596 | readable_events (flags) |
diff --git a/src/keyboard.h b/src/keyboard.h index e24f9a133ae..15e55ad4e67 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -240,7 +240,7 @@ extern Lisp_Object item_properties; | |||
| 240 | 240 | ||
| 241 | /* Macros for dealing with lispy events. */ | 241 | /* Macros for dealing with lispy events. */ |
| 242 | 242 | ||
| 243 | /* True iff EVENT has data fields describing it (i.e. a mouse click). */ | 243 | /* True if EVENT has data fields describing it (i.e. a mouse click). */ |
| 244 | #define EVENT_HAS_PARAMETERS(event) (CONSP (event)) | 244 | #define EVENT_HAS_PARAMETERS(event) (CONSP (event)) |
| 245 | 245 | ||
| 246 | /* Extract the head from an event. | 246 | /* Extract the head from an event. |
diff --git a/src/keymap.c b/src/keymap.c index 7a1fc998758..bfc81614245 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3898,7 +3898,7 @@ don't alter it yourself. */); | |||
| 3898 | DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, | 3898 | DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, |
| 3899 | doc: /* Alist of keymaps to use for minor modes. | 3899 | doc: /* Alist of keymaps to use for minor modes. |
| 3900 | Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read | 3900 | Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read |
| 3901 | key sequences and look up bindings iff VARIABLE's value is non-nil. | 3901 | key sequences and look up bindings if VARIABLE's value is non-nil. |
| 3902 | If two active keymaps bind the same key, the keymap appearing earlier | 3902 | If two active keymaps bind the same key, the keymap appearing earlier |
| 3903 | in the list takes precedence. */); | 3903 | in the list takes precedence. */); |
| 3904 | Vminor_mode_map_alist = Qnil; | 3904 | Vminor_mode_map_alist = Qnil; |
diff --git a/src/lisp.h b/src/lisp.h index b26e7768ebb..c047355b21c 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1428,7 +1428,7 @@ typedef unsigned char UCHAR; | |||
| 1428 | #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) | 1428 | #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) |
| 1429 | #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) | 1429 | #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) |
| 1430 | 1430 | ||
| 1431 | /* Return 1 iff GLYPH contains valid character code. */ | 1431 | /* Return 1 if GLYPH contains valid character code. */ |
| 1432 | #define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (FAST_GLYPH_CHAR (glyph), 1) | 1432 | #define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (FAST_GLYPH_CHAR (glyph), 1) |
| 1433 | 1433 | ||
| 1434 | /* The ID of the mode line highlighting face. */ | 1434 | /* The ID of the mode line highlighting face. */ |
| @@ -1536,7 +1536,7 @@ typedef unsigned char UCHAR; | |||
| 1536 | "dead", which is what we want; this is an argument-checking macro, and | 1536 | "dead", which is what we want; this is an argument-checking macro, and |
| 1537 | the user should never get access to interior windows. | 1537 | the user should never get access to interior windows. |
| 1538 | 1538 | ||
| 1539 | A window of any sort, leaf or interior, is dead iff the buffer, | 1539 | A window of any sort, leaf or interior, is dead if the buffer, |
| 1540 | vchild, and hchild members are all nil. */ | 1540 | vchild, and hchild members are all nil. */ |
| 1541 | 1541 | ||
| 1542 | #define CHECK_LIVE_WINDOW(x) \ | 1542 | #define CHECK_LIVE_WINDOW(x) \ |
diff --git a/src/lread.c b/src/lread.c index 6ca7121b363..fcc344d5875 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -101,7 +101,7 @@ static Lisp_Object Qload_force_doc_strings; | |||
| 101 | extern Lisp_Object Qevent_symbol_element_mask; | 101 | extern Lisp_Object Qevent_symbol_element_mask; |
| 102 | extern Lisp_Object Qfile_exists_p; | 102 | extern Lisp_Object Qfile_exists_p; |
| 103 | 103 | ||
| 104 | /* non-zero iff inside `load' */ | 104 | /* non-zero if inside `load' */ |
| 105 | int load_in_progress; | 105 | int load_in_progress; |
| 106 | 106 | ||
| 107 | /* Directory in which the sources were found. */ | 107 | /* Directory in which the sources were found. */ |
| @@ -1324,7 +1324,7 @@ in which case file-name-handlers are ignored. */) | |||
| 1324 | On success, returns a file descriptor. On failure, returns -1. | 1324 | On success, returns a file descriptor. On failure, returns -1. |
| 1325 | 1325 | ||
| 1326 | SUFFIXES is a list of strings containing possible suffixes. | 1326 | SUFFIXES is a list of strings containing possible suffixes. |
| 1327 | The empty suffix is automatically added iff the list is empty. | 1327 | The empty suffix is automatically added if the list is empty. |
| 1328 | 1328 | ||
| 1329 | PREDICATE non-nil means don't open the files, | 1329 | PREDICATE non-nil means don't open the files, |
| 1330 | just look for one that satisfies the predicate. In this case, | 1330 | just look for one that satisfies the predicate. In this case, |
| @@ -4208,7 +4208,7 @@ customize `jka-compr-load-suffixes' rather than the present variable. */); | |||
| 4208 | Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); | 4208 | Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); |
| 4209 | 4209 | ||
| 4210 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, | 4210 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, |
| 4211 | doc: /* Non-nil iff inside of `load'. */); | 4211 | doc: /* Non-nil if inside of `load'. */); |
| 4212 | 4212 | ||
| 4213 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, | 4213 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, |
| 4214 | doc: /* An alist of expressions to be evalled when particular files are loaded. | 4214 | doc: /* An alist of expressions to be evalled when particular files are loaded. |
diff --git a/src/m/7300.h b/src/m/7300.h index b590593abc8..6e439a829cc 100644 --- a/src/m/7300.h +++ b/src/m/7300.h | |||
| @@ -30,7 +30,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 30 | /* # define SHORTNAMES */ | 30 | /* # define SHORTNAMES */ |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #define WORDS_BIG_ENDIAN | 36 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/acorn.h b/src/m/acorn.h index 7fa5991e28b..148d46454ab 100644 --- a/src/m/acorn.h +++ b/src/m/acorn.h | |||
| @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 24 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 25 | is the most significant byte. */ | 25 | is the most significant byte. */ |
| 26 | 26 | ||
| 27 | #undef WORDS_BIG_ENDIAN | 27 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/alliant-2800.h b/src/m/alliant-2800.h index 3d65f9d1f12..405267afb2b 100644 --- a/src/m/alliant-2800.h +++ b/src/m/alliant-2800.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/alliant.h b/src/m/alliant.h index b871d4a2385..7cad4bfb0c1 100644 --- a/src/m/alliant.h +++ b/src/m/alliant.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | operating system this machine is likely to run. | 26 | operating system this machine is likely to run. |
| 27 | USUAL-OPSYS="bsd4-2" */ | 27 | USUAL-OPSYS="bsd4-2" */ |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #define WORDS_BIG_ENDIAN | 32 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/alpha.h b/src/m/alpha.h index 84e74d581d1..5e46a05ab68 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h | |||
| @@ -35,7 +35,7 @@ NOTE-END | |||
| 35 | on OSF 4/5 -- fx. */ | 35 | on OSF 4/5 -- fx. */ |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 38 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 39 | is the most significant byte. */ | 39 | is the most significant byte. */ |
| 40 | 40 | ||
| 41 | #undef WORDS_BIG_ENDIAN | 41 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/altos.h b/src/m/altos.h index 8a1cb138345..0f4bb9b810f 100644 --- a/src/m/altos.h +++ b/src/m/altos.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/amdahl.h b/src/m/amdahl.h index 3d9ee17e91f..486e2925a55 100644 --- a/src/m/amdahl.h +++ b/src/m/amdahl.h | |||
| @@ -31,7 +31,7 @@ This file works with the Amdahl uts native C compiler. The 5.2u370 | |||
| 31 | compiler is so brain damaged that it is not even worth trying to use it. | 31 | compiler is so brain damaged that it is not even worth trying to use it. |
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 34 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 35 | is the most significant byte. */ | 35 | is the most significant byte. */ |
| 36 | 36 | ||
| 37 | #define WORDS_BIG_ENDIAN | 37 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index fbd53a955a2..681be8b0647 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | #define BITS_PER_LONG 64 | 26 | #define BITS_PER_LONG 64 |
| 27 | #define BITS_PER_EMACS_INT 64 | 27 | #define BITS_PER_EMACS_INT 64 |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #undef WORDS_BIG_ENDIAN | 32 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/apollo.h b/src/m/apollo.h index b769c24c294..2eac3098db9 100644 --- a/src/m/apollo.h +++ b/src/m/apollo.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/arm.h b/src/m/arm.h index b1df83f9b70..697179723f7 100644 --- a/src/m/arm.h +++ b/src/m/arm.h | |||
| @@ -21,7 +21,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 24 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 25 | is the most significant byte. */ | 25 | is the most significant byte. */ |
| 26 | 26 | ||
| 27 | #undef WORDS_BIG_ENDIAN | 27 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/att3b.h b/src/m/att3b.h index 3344aabc2a9..8e9a589bcd2 100644 --- a/src/m/att3b.h +++ b/src/m/att3b.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | operating system this machine is likely to run. | 26 | operating system this machine is likely to run. |
| 27 | USUAL-OPSYS="usg5-2-2" */ | 27 | USUAL-OPSYS="usg5-2-2" */ |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #define WORDS_BIG_ENDIAN | 32 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/aviion.h b/src/m/aviion.h index 7f3f7f253d5..832feb79a00 100644 --- a/src/m/aviion.h +++ b/src/m/aviion.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/celerity.h b/src/m/celerity.h index 76f1e1729b3..556c2765883 100644 --- a/src/m/celerity.h +++ b/src/m/celerity.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/clipper.h b/src/m/clipper.h index de99ba97eb5..c0006f48eab 100644 --- a/src/m/clipper.h +++ b/src/m/clipper.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #undef WORDS_BIG_ENDIAN | 26 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/cnvrgnt.h b/src/m/cnvrgnt.h index f64fc86b08b..22478a273b6 100644 --- a/src/m/cnvrgnt.h +++ b/src/m/cnvrgnt.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/convex.h b/src/m/convex.h index 7f90d22117c..c8f447cf2fa 100644 --- a/src/m/convex.h +++ b/src/m/convex.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/cydra5.h b/src/m/cydra5.h index 2361fb4b589..4c95f226371 100644 --- a/src/m/cydra5.h +++ b/src/m/cydra5.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/delta88k.h b/src/m/delta88k.h index c767e1db1ca..b5d0c8f190b 100644 --- a/src/m/delta88k.h +++ b/src/m/delta88k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/dpx2.h b/src/m/dpx2.h index 1c1d146a08a..b39ef93ee34 100644 --- a/src/m/dpx2.h +++ b/src/m/dpx2.h | |||
| @@ -32,7 +32,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 32 | /* #define ncl_el /* DPX/2 210,220 etc */ | 32 | /* #define ncl_el /* DPX/2 210,220 etc */ |
| 33 | /* #define ncl_mr 1 /* DPX/2 320,340 (and 360,380 ?) */ | 33 | /* #define ncl_mr 1 /* DPX/2 320,340 (and 360,380 ?) */ |
| 34 | 34 | ||
| 35 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 35 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 36 | is the most significant byte. */ | 36 | is the most significant byte. */ |
| 37 | 37 | ||
| 38 | #define WORDS_BIG_ENDIAN | 38 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/dual.h b/src/m/dual.h index 4fda7a8a96c..d287f9502d2 100644 --- a/src/m/dual.h +++ b/src/m/dual.h | |||
| @@ -35,7 +35,7 @@ Dual running Uniplus (-machine=dual -opsystem=unipl5-2) | |||
| 35 | NOTE-END */ | 35 | NOTE-END */ |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 38 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 39 | is the most significant byte. */ | 39 | is the most significant byte. */ |
| 40 | 40 | ||
| 41 | #define WORDS_BIG_ENDIAN | 41 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/elxsi.h b/src/m/elxsi.h index 81689e66e52..07a00bbf714 100644 --- a/src/m/elxsi.h +++ b/src/m/elxsi.h | |||
| @@ -27,7 +27,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 27 | /* This file was modified by Matt Crawford <matt@tank.uchicago.edu> | 27 | /* This file was modified by Matt Crawford <matt@tank.uchicago.edu> |
| 28 | to work under Elxsi's 12.0 release of BSD unix. */ | 28 | to work under Elxsi's 12.0 release of BSD unix. */ |
| 29 | 29 | ||
| 30 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 30 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 31 | is the most significant byte. */ | 31 | is the most significant byte. */ |
| 32 | 32 | ||
| 33 | #undef WORDS_BIG_ENDIAN | 33 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/gould.h b/src/m/gould.h index c31f50249e7..cd16e09b785 100644 --- a/src/m/gould.h +++ b/src/m/gould.h | |||
| @@ -49,7 +49,7 @@ Gould Power Node (-machine=gould -opsystem=bsd4-2 or bsd4-3) | |||
| 49 | A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h. | 49 | A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h. |
| 50 | NOTE-END */ | 50 | NOTE-END */ |
| 51 | 51 | ||
| 52 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 52 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 53 | is the most significant byte. */ | 53 | is the most significant byte. */ |
| 54 | 54 | ||
| 55 | #define WORDS_BIG_ENDIAN | 55 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/hp800.h b/src/m/hp800.h index d54690104b5..83465052478 100644 --- a/src/m/hp800.h +++ b/src/m/hp800.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="hpux" */ | 25 | USUAL-OPSYS="hpux" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/hp9000s300.h b/src/m/hp9000s300.h index 3718bb3f3ae..9a27065f866 100644 --- a/src/m/hp9000s300.h +++ b/src/m/hp9000s300.h | |||
| @@ -59,7 +59,7 @@ NOTE-END */ | |||
| 59 | 59 | ||
| 60 | /* #define HPUX_5 */ | 60 | /* #define HPUX_5 */ |
| 61 | 61 | ||
| 62 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 62 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 63 | is the most significant byte. */ | 63 | is the most significant byte. */ |
| 64 | 64 | ||
| 65 | #define WORDS_BIG_ENDIAN | 65 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/i860.h b/src/m/i860.h index 1255f2f1576..6d79c5c8d38 100644 --- a/src/m/i860.h +++ b/src/m/i860.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ia64.h b/src/m/ia64.h index b6fea6b8fd7..8f7fed8d69e 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h | |||
| @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 23 | #define BITS_PER_LONG 64 | 23 | #define BITS_PER_LONG 64 |
| 24 | #define BITS_PER_EMACS_INT 64 | 24 | #define BITS_PER_EMACS_INT 64 |
| 25 | 25 | ||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 26 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 27 | is the most significant byte. */ | 27 | is the most significant byte. */ |
| 28 | 28 | ||
| 29 | #undef WORDS_BIG_ENDIAN | 29 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h index f632a30780b..0195ec141ab 100644 --- a/src/m/ibm370aix.h +++ b/src/m/ibm370aix.h | |||
| @@ -30,7 +30,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 30 | #undef INTEL386 | 30 | #undef INTEL386 |
| 31 | #undef aix386 | 31 | #undef aix386 |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #define WORDS_BIG_ENDIAN | 36 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibmps2-aix.h b/src/m/ibmps2-aix.h index 8882052b006..8c975b81bb9 100644 --- a/src/m/ibmps2-aix.h +++ b/src/m/ibmps2-aix.h | |||
| @@ -30,7 +30,7 @@ NOTE-START | |||
| 30 | work with certain new X window managers, and may be suboptimal. | 30 | work with certain new X window managers, and may be suboptimal. |
| 31 | NOTE-END */ | 31 | NOTE-END */ |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #undef WORDS_BIG_ENDIAN | 36 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h index 2a298e7f760..d542c07ad0a 100644 --- a/src/m/ibmrs6000.h +++ b/src/m/ibmrs6000.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="aix3-1" */ | 25 | USUAL-OPSYS="aix3-1" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #ifdef USG5_4 | 30 | #ifdef USG5_4 |
diff --git a/src/m/ibmrt-aix.h b/src/m/ibmrt-aix.h index d24e99fe6d6..57a9dbc4df1 100644 --- a/src/m/ibmrt-aix.h +++ b/src/m/ibmrt-aix.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ | 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibmrt.h b/src/m/ibmrt.h index 55cbfd88371..ca32db94518 100644 --- a/src/m/ibmrt.h +++ b/src/m/ibmrt.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibms390.h b/src/m/ibms390.h index aece0f7599e..1c7165e04c0 100644 --- a/src/m/ibms390.h +++ b/src/m/ibms390.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index fb1f210c634..64ede365d0c 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h | |||
| @@ -36,7 +36,7 @@ NOTE-END */ | |||
| 36 | #define BITS_PER_LONG 64 | 36 | #define BITS_PER_LONG 64 |
| 37 | #define BITS_PER_EMACS_INT 64 | 37 | #define BITS_PER_EMACS_INT 64 |
| 38 | 38 | ||
| 39 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 39 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 40 | is the most significant byte. */ | 40 | is the most significant byte. */ |
| 41 | 41 | ||
| 42 | #define WORDS_BIG_ENDIAN | 42 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/intel386.h b/src/m/intel386.h index 7c6c2106d17..22205ed762c 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h | |||
| @@ -50,7 +50,7 @@ Prime EXL (-machine=intel386 -opsystem=usg5-3) | |||
| 50 | Minor changes merged in 19.1. | 50 | Minor changes merged in 19.1. |
| 51 | NOTE-END */ | 51 | NOTE-END */ |
| 52 | 52 | ||
| 53 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 53 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 54 | is the most significant byte. */ | 54 | is the most significant byte. */ |
| 55 | 55 | ||
| 56 | #undef WORDS_BIG_ENDIAN | 56 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/iris4d.h b/src/m/iris4d.h index d918c25aede..4c15131e595 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/irist.h b/src/m/irist.h index 0b33bd964aa..c0d55f96d0f 100644 --- a/src/m/irist.h +++ b/src/m/irist.h | |||
| @@ -58,7 +58,7 @@ NOTE-END */ | |||
| 58 | (copy-file), it would say that it is non-critical... | 58 | (copy-file), it would say that it is non-critical... |
| 59 | #endif /* 0 */ | 59 | #endif /* 0 */ |
| 60 | 60 | ||
| 61 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 61 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 62 | is the most significant byte. */ | 62 | is the most significant byte. */ |
| 63 | 63 | ||
| 64 | #define WORDS_BIG_ENDIAN | 64 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/isi-ov.h b/src/m/isi-ov.h index 7e25ed9d277..6706ee9981b 100644 --- a/src/m/isi-ov.h +++ b/src/m/isi-ov.h | |||
| @@ -30,7 +30,7 @@ NOTE-END */ | |||
| 30 | 30 | ||
| 31 | #define ISI68K | 31 | #define ISI68K |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #define WORDS_BIG_ENDIAN | 36 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/m68k.h b/src/m/m68k.h index c771e863711..4c600a44d8c 100644 --- a/src/m/m68k.h +++ b/src/m/m68k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | the size of various data types. */ | 24 | the size of various data types. */ |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/macppc.h b/src/m/macppc.h index cc4afe31519..d4561c0289f 100644 --- a/src/m/macppc.h +++ b/src/m/macppc.h | |||
| @@ -19,7 +19,7 @@ along with GNU Emacs; see the file COPYING. If not, write to | |||
| 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 22 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 23 | is the most significant byte. */ | 23 | is the most significant byte. */ |
| 24 | 24 | ||
| 25 | #define WORDS_BIG_ENDIAN | 25 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/masscomp.h b/src/m/masscomp.h index ac753de1537..4e95c268860 100644 --- a/src/m/masscomp.h +++ b/src/m/masscomp.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="rtu" */ | 25 | USUAL-OPSYS="rtu" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/mega68.h b/src/m/mega68.h index 6d991ba06a2..0d22b572fc5 100644 --- a/src/m/mega68.h +++ b/src/m/mega68.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/mg1.h b/src/m/mg1.h index 647544e21e4..515e9e23a96 100644 --- a/src/m/mg1.h +++ b/src/m/mg1.h | |||
| @@ -34,7 +34,7 @@ own configuration files, please let the Free Software Foundation in on | |||
| 34 | your work; we'd like to distribute this information. | 34 | your work; we'd like to distribute this information. |
| 35 | NOTE-END */ | 35 | NOTE-END */ |
| 36 | 36 | ||
| 37 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 37 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 38 | is the most significant byte. */ | 38 | is the most significant byte. */ |
| 39 | 39 | ||
| 40 | #undef WORDS_BIG_ENDIAN | 40 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/mips-siemens.h b/src/m/mips-siemens.h index d90a651d361..53366a1332e 100644 --- a/src/m/mips-siemens.h +++ b/src/m/mips-siemens.h | |||
| @@ -36,7 +36,7 @@ This is the m- file for SNI RM*00 machines. Use s- sinix5-4.h file! | |||
| 36 | With this the file mips-siemens.h is obsolete. | 36 | With this the file mips-siemens.h is obsolete. |
| 37 | NOTE-END */ | 37 | NOTE-END */ |
| 38 | 38 | ||
| 39 | /* Define BIG_ENDIAN iff lowest-numbered byte in a word | 39 | /* Define BIG_ENDIAN if lowest-numbered byte in a word |
| 40 | is the most significant byte. */ | 40 | is the most significant byte. */ |
| 41 | 41 | ||
| 42 | #define BIG_ENDIAN | 42 | #define BIG_ENDIAN |
diff --git a/src/m/mips.h b/src/m/mips.h index b18324fb8b7..6c039c5e14c 100644 --- a/src/m/mips.h +++ b/src/m/mips.h | |||
| @@ -29,7 +29,7 @@ Use mips4.h for RISCOS version 4; use s-bsd4-3.h with the BSD world. | |||
| 29 | Note that the proper m file for the Decstation is pmax.h. | 29 | Note that the proper m file for the Decstation is pmax.h. |
| 30 | NOTE-END */ | 30 | NOTE-END */ |
| 31 | 31 | ||
| 32 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 32 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 33 | is the most significant byte. */ | 33 | is the most significant byte. */ |
| 34 | 34 | ||
| 35 | #if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL)) | 35 | #if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL)) |
diff --git a/src/m/news.h b/src/m/news.h index 419015dd150..084c5abb92c 100644 --- a/src/m/news.h +++ b/src/m/news.h | |||
| @@ -34,7 +34,7 @@ NOTE-END */ | |||
| 34 | #define m68000 | 34 | #define m68000 |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 37 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 38 | is the most significant byte. */ | 38 | is the most significant byte. */ |
| 39 | 39 | ||
| 40 | #define WORDS_BIG_ENDIAN | 40 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/next.h b/src/m/next.h index ef92607d957..bca8ac39d47 100644 --- a/src/m/next.h +++ b/src/m/next.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | #define NeXT | 26 | #define NeXT |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | /* Let the compiler tell us. */ | 32 | /* Let the compiler tell us. */ |
diff --git a/src/m/ns16000.h b/src/m/ns16000.h index c64bfa32482..6feddd97610 100644 --- a/src/m/ns16000.h +++ b/src/m/ns16000.h | |||
| @@ -30,7 +30,7 @@ For a Tektronix 16000 box (a 6130, perhaps?), use `-opsystem=bsd4-2'. | |||
| 30 | Use `-machine=ns16000' for both. | 30 | Use `-machine=ns16000' for both. |
| 31 | NOTE-END */ | 31 | NOTE-END */ |
| 32 | 32 | ||
| 33 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 33 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 34 | is the most significant byte. */ | 34 | is the most significant byte. */ |
| 35 | 35 | ||
| 36 | #undef WORDS_BIG_ENDIAN | 36 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/ns32000.h b/src/m/ns32000.h index 0b776115ca8..b6484b4b219 100644 --- a/src/m/ns32000.h +++ b/src/m/ns32000.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="usg5-2" */ | 26 | USUAL-OPSYS="usg5-2" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #undef WORDS_BIG_ENDIAN | 31 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/nu.h b/src/m/nu.h index 347606a6c01..279d14ff915 100644 --- a/src/m/nu.h +++ b/src/m/nu.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/orion.h b/src/m/orion.h index 36a74b3cc3b..cc3a7e395fc 100644 --- a/src/m/orion.h +++ b/src/m/orion.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/orion105.h b/src/m/orion105.h index 73408ed1b2f..fabcf67e2a9 100644 --- a/src/m/orion105.h +++ b/src/m/orion105.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="bsd4-2" */ | 26 | USUAL-OPSYS="bsd4-2" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #undef WORDS_BIG_ENDIAN | 31 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/pfa50.h b/src/m/pfa50.h index 8f1f146000e..5f98dc993c7 100644 --- a/src/m/pfa50.h +++ b/src/m/pfa50.h | |||
| @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 20 | Boston, MA 02110-1301, USA. */ | 20 | Boston, MA 02110-1301, USA. */ |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 23 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 24 | is the most significant byte. */ | 24 | is the most significant byte. */ |
| 25 | 25 | ||
| 26 | #define WORDS_BIG_ENDIAN | 26 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/plexus.h b/src/m/plexus.h index 4a4e6a32f7f..51961977904 100644 --- a/src/m/plexus.h +++ b/src/m/plexus.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/powermac.h b/src/m/powermac.h index 729bbb0358b..2dde47bd6cf 100644 --- a/src/m/powermac.h +++ b/src/m/powermac.h | |||
| @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 23 | operating system this machine is likely to run. | 23 | operating system this machine is likely to run. |
| 24 | USUAL-OPSYS="darwin" */ | 24 | USUAL-OPSYS="darwin" */ |
| 25 | 25 | ||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 26 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 27 | is the most significant byte. */ | 27 | is the most significant byte. */ |
| 28 | 28 | ||
| 29 | #define WORDS_BIG_ENDIAN | 29 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/powerpcle.h b/src/m/powerpcle.h index 403d6986bf8..5be26e93b17 100644 --- a/src/m/powerpcle.h +++ b/src/m/powerpcle.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | USUAL-OPSYS="Solaris2.5.1 Windows/NT AIX 4.1.2" | 24 | USUAL-OPSYS="Solaris2.5.1 Windows/NT AIX 4.1.2" |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #undef WORDS_BIG_ENDIAN | 30 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/pyramid.h b/src/m/pyramid.h index 9ee3fefe387..1b834c60ba0 100644 --- a/src/m/pyramid.h +++ b/src/m/pyramid.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-2" */ | 25 | USUAL-OPSYS="bsd4-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sequent.h b/src/m/sequent.h index be5d3f19bd1..3c06d854b41 100644 --- a/src/m/sequent.h +++ b/src/m/sequent.h | |||
| @@ -31,7 +31,7 @@ NOTE-END */ | |||
| 31 | /* NOTE: this file works for DYNIX release 2.0 | 31 | /* NOTE: this file works for DYNIX release 2.0 |
| 32 | (not tested on 1.3) on NS32000's */ | 32 | (not tested on 1.3) on NS32000's */ |
| 33 | 33 | ||
| 34 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 34 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 35 | is the most significant byte. */ | 35 | is the most significant byte. */ |
| 36 | 36 | ||
| 37 | #undef WORDS_BIG_ENDIAN | 37 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/sh3el.h b/src/m/sh3el.h index 5851ade1523..eefcccea6de 100644 --- a/src/m/sh3el.h +++ b/src/m/sh3el.h | |||
| @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 23 | operating system this machine is likely to run. | 23 | operating system this machine is likely to run. |
| 24 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 24 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 25 | 25 | ||
| 26 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 26 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 27 | is the most significant byte. */ | 27 | is the most significant byte. */ |
| 28 | 28 | ||
| 29 | #undef WORDS_BIG_ENDIAN | 29 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/sparc.h b/src/m/sparc.h index f59c2c2b969..8df81ee91aa 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h | |||
| @@ -28,7 +28,7 @@ Use -opsystem=sunos4 for operating system version 4, and | |||
| 28 | -opsystem=bsd4-2 for earlier versions. | 28 | -opsystem=bsd4-2 for earlier versions. |
| 29 | NOTE-END */ | 29 | NOTE-END */ |
| 30 | 30 | ||
| 31 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 31 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 32 | is the most significant byte. */ | 32 | is the most significant byte. */ |
| 33 | 33 | ||
| 34 | #define WORDS_BIG_ENDIAN | 34 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sps7.h b/src/m/sps7.h index 68acf2c6c52..67fc60c1b6a 100644 --- a/src/m/sps7.h +++ b/src/m/sps7.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sr2k.h b/src/m/sr2k.h index ba4a9a905ab..6c17795e058 100644 --- a/src/m/sr2k.h +++ b/src/m/sr2k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="hpux" */ | 25 | USUAL-OPSYS="hpux" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/stride.h b/src/m/stride.h index cb0380024a1..d846a6c9843 100644 --- a/src/m/stride.h +++ b/src/m/stride.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sun1.h b/src/m/sun1.h index fda451a9310..03cb4e803ff 100644 --- a/src/m/sun1.h +++ b/src/m/sun1.h | |||
| @@ -40,7 +40,7 @@ Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3; | |||
| 40 | problems caused by bugs in the "export" version of SunOS 4. | 40 | problems caused by bugs in the "export" version of SunOS 4. |
| 41 | NOTE-END */ | 41 | NOTE-END */ |
| 42 | 42 | ||
| 43 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 43 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 44 | is the most significant byte. */ | 44 | is the most significant byte. */ |
| 45 | 45 | ||
| 46 | #define WORDS_BIG_ENDIAN | 46 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/sun2.h b/src/m/sun2.h index 00b7ae97c4d..e764ded3ce7 100644 --- a/src/m/sun2.h +++ b/src/m/sun2.h | |||
| @@ -42,7 +42,7 @@ Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3; | |||
| 42 | problems caused by bugs in the "export" version of SunOS 4. | 42 | problems caused by bugs in the "export" version of SunOS 4. |
| 43 | NOTE-END */ | 43 | NOTE-END */ |
| 44 | 44 | ||
| 45 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 45 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 46 | is the most significant byte. */ | 46 | is the most significant byte. */ |
| 47 | 47 | ||
| 48 | #define WORDS_BIG_ENDIAN | 48 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tad68k.h b/src/m/tad68k.h index 5e982a314ab..c8be8763fb5 100644 --- a/src/m/tad68k.h +++ b/src/m/tad68k.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tahoe.h b/src/m/tahoe.h index 8fe41cd4109..9b9271577fc 100644 --- a/src/m/tahoe.h +++ b/src/m/tahoe.h | |||
| @@ -29,7 +29,7 @@ Use -opsystem=bsd4-2 or -opsystem=bsd4-3, depending on the version of | |||
| 29 | Berkeley you are running. | 29 | Berkeley you are running. |
| 30 | NOTE-END */ | 30 | NOTE-END */ |
| 31 | 31 | ||
| 32 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 32 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 33 | is the most significant byte. */ | 33 | is the most significant byte. */ |
| 34 | 34 | ||
| 35 | #define WORDS_BIG_ENDIAN | 35 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/targon31.h b/src/m/targon31.h index 0c657e0ea5d..39e995b076d 100644 --- a/src/m/targon31.h +++ b/src/m/targon31.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ | 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tek4300.h b/src/m/tek4300.h index be43210212a..6498238461d 100644 --- a/src/m/tek4300.h +++ b/src/m/tek4300.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="bsd4-3" */ | 25 | USUAL-OPSYS="bsd4-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tekxd88.h b/src/m/tekxd88.h index 1d46bb9bb55..f351229292f 100644 --- a/src/m/tekxd88.h +++ b/src/m/tekxd88.h | |||
| @@ -22,7 +22,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |||
| 22 | Boston, MA 02110-1301, USA. */ | 22 | Boston, MA 02110-1301, USA. */ |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 25 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 26 | is the most significant byte. */ | 26 | is the most significant byte. */ |
| 27 | 27 | ||
| 28 | #define WORDS_BIG_ENDIAN | 28 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/template.h b/src/m/template.h index fccc5b0901c..b893ba23df2 100644 --- a/src/m/template.h +++ b/src/m/template.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tower32.h b/src/m/tower32.h index 0ce623b7f37..01daada2423 100644 --- a/src/m/tower32.h +++ b/src/m/tower32.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2-2" */ | 25 | USUAL-OPSYS="usg5-2-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/tower32v3.h b/src/m/tower32v3.h index 226c0e2640a..ff209edab41 100644 --- a/src/m/tower32v3.h +++ b/src/m/tower32v3.h | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | operating system this machine is likely to run. | 25 | operating system this machine is likely to run. |
| 26 | USUAL-OPSYS="usg5-3" */ | 26 | USUAL-OPSYS="usg5-3" */ |
| 27 | 27 | ||
| 28 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 28 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 29 | is the most significant byte. */ | 29 | is the most significant byte. */ |
| 30 | 30 | ||
| 31 | #define WORDS_BIG_ENDIAN | 31 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/ustation.h b/src/m/ustation.h index f88cdc5ee63..0ac833c28da 100644 --- a/src/m/ustation.h +++ b/src/m/ustation.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-3" */ | 25 | USUAL-OPSYS="usg5-3" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/vax.h b/src/m/vax.h index 80844ba3ba6..82695074424 100644 --- a/src/m/vax.h +++ b/src/m/vax.h | |||
| @@ -52,7 +52,7 @@ Vax running VMS (-opsystem=vms) | |||
| 52 | 52 | ||
| 53 | NOTE-END */ | 53 | NOTE-END */ |
| 54 | 54 | ||
| 55 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 55 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 56 | is the most significant byte. */ | 56 | is the most significant byte. */ |
| 57 | 57 | ||
| 58 | #undef WORDS_BIG_ENDIAN | 58 | #undef WORDS_BIG_ENDIAN |
diff --git a/src/m/wicat.h b/src/m/wicat.h index 67409844666..3ac7b530739 100644 --- a/src/m/wicat.h +++ b/src/m/wicat.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="usg5-2" */ | 25 | USUAL-OPSYS="usg5-2" */ |
| 26 | 26 | ||
| 27 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | #define WORDS_BIG_ENDIAN | 30 | #define WORDS_BIG_ENDIAN |
diff --git a/src/m/windowsnt.h b/src/m/windowsnt.h index f1efe64a4f5..ddad551c772 100644 --- a/src/m/windowsnt.h +++ b/src/m/windowsnt.h | |||
| @@ -24,7 +24,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 24 | operating system this machine is likely to run. | 24 | operating system this machine is likely to run. |
| 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ | 25 | USUAL-OPSYS="<name of system .h file here, without the s- or .h>" */ |
| 26 | 26 | ||
| 27 | /* Define BIG_ENDIAN iff lowest-numbered byte in a word | 27 | /* Define BIG_ENDIAN if lowest-numbered byte in a word |
| 28 | is the most significant byte. */ | 28 | is the most significant byte. */ |
| 29 | 29 | ||
| 30 | /* #define BIG_ENDIAN */ | 30 | /* #define BIG_ENDIAN */ |
diff --git a/src/m/xps100.h b/src/m/xps100.h index 691f5fedbd6..3b378319ceb 100644 --- a/src/m/xps100.h +++ b/src/m/xps100.h | |||
| @@ -26,7 +26,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 26 | operating system this machine is likely to run. | 26 | operating system this machine is likely to run. |
| 27 | USUAL-OPSYS="usg5-2" */ | 27 | USUAL-OPSYS="usg5-2" */ |
| 28 | 28 | ||
| 29 | /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word | 29 | /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word |
| 30 | is the most significant byte. */ | 30 | is the most significant byte. */ |
| 31 | 31 | ||
| 32 | #define WORDS_BIG_ENDIAN | 32 | #define WORDS_BIG_ENDIAN |
| @@ -1127,18 +1127,15 @@ Lisp_Object | |||
| 1127 | cfdate_to_lisp (date) | 1127 | cfdate_to_lisp (date) |
| 1128 | CFDateRef date; | 1128 | CFDateRef date; |
| 1129 | { | 1129 | { |
| 1130 | static const CFGregorianDate epoch_gdate = {1970, 1, 1, 0, 0, 0.0}; | 1130 | CFTimeInterval sec; |
| 1131 | static CFAbsoluteTime epoch = 0.0, sec; | 1131 | int high, low, microsec; |
| 1132 | int high, low; | ||
| 1133 | 1132 | ||
| 1134 | if (epoch == 0.0) | 1133 | sec = CFDateGetAbsoluteTime (date) + kCFAbsoluteTimeIntervalSince1970; |
| 1135 | epoch = CFGregorianDateGetAbsoluteTime (epoch_gdate, NULL); | ||
| 1136 | |||
| 1137 | sec = CFDateGetAbsoluteTime (date) - epoch; | ||
| 1138 | high = sec / 65536.0; | 1134 | high = sec / 65536.0; |
| 1139 | low = sec - high * 65536.0; | 1135 | low = sec - high * 65536.0; |
| 1136 | microsec = (sec - floor (sec)) * 1000000.0; | ||
| 1140 | 1137 | ||
| 1141 | return list3 (make_number (high), make_number (low), make_number (0)); | 1138 | return list3 (make_number (high), make_number (low), make_number (microsec)); |
| 1142 | } | 1139 | } |
| 1143 | 1140 | ||
| 1144 | 1141 | ||
diff --git a/src/macmenu.c b/src/macmenu.c index e2d4ba8be38..883a8463c2d 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -2331,6 +2331,7 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2331 | ((value) + DIALOG_BUTTON_COMMAND_ID_OFFSET) | 2331 | ((value) + DIALOG_BUTTON_COMMAND_ID_OFFSET) |
| 2332 | 2332 | ||
| 2333 | extern EMACS_TIME timer_check P_ ((int)); | 2333 | extern EMACS_TIME timer_check P_ ((int)); |
| 2334 | static int quit_dialog_event_loop; | ||
| 2334 | 2335 | ||
| 2335 | static pascal OSStatus | 2336 | static pascal OSStatus |
| 2336 | mac_handle_dialog_event (next_handler, event, data) | 2337 | mac_handle_dialog_event (next_handler, event, data) |
| @@ -2340,7 +2341,6 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2340 | { | 2341 | { |
| 2341 | OSStatus err, result = eventNotHandledErr; | 2342 | OSStatus err, result = eventNotHandledErr; |
| 2342 | WindowRef window = (WindowRef) data; | 2343 | WindowRef window = (WindowRef) data; |
| 2343 | int quit_event_loop_p = 0; | ||
| 2344 | 2344 | ||
| 2345 | switch (GetEventClass (event)) | 2345 | switch (GetEventClass (event)) |
| 2346 | { | 2346 | { |
| @@ -2355,7 +2355,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2355 | if (DIALOG_BUTTON_COMMAND_ID_P (command.commandID)) | 2355 | if (DIALOG_BUTTON_COMMAND_ID_P (command.commandID)) |
| 2356 | { | 2356 | { |
| 2357 | SetWRefCon (window, command.commandID); | 2357 | SetWRefCon (window, command.commandID); |
| 2358 | quit_event_loop_p = 1; | 2358 | quit_dialog_event_loop = 1; |
| 2359 | break; | 2359 | break; |
| 2360 | } | 2360 | } |
| 2361 | 2361 | ||
| @@ -2379,7 +2379,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2379 | switch (char_code) | 2379 | switch (char_code) |
| 2380 | { | 2380 | { |
| 2381 | case kEscapeCharCode: | 2381 | case kEscapeCharCode: |
| 2382 | quit_event_loop_p = 1; | 2382 | quit_dialog_event_loop = 1; |
| 2383 | break; | 2383 | break; |
| 2384 | 2384 | ||
| 2385 | default: | 2385 | default: |
| @@ -2395,7 +2395,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2395 | NULL, &key_code); | 2395 | NULL, &key_code); |
| 2396 | if (err == noErr) | 2396 | if (err == noErr) |
| 2397 | if (mac_quit_char_key_p (modifiers, key_code)) | 2397 | if (mac_quit_char_key_p (modifiers, key_code)) |
| 2398 | quit_event_loop_p = 1; | 2398 | quit_dialog_event_loop = 1; |
| 2399 | } | 2399 | } |
| 2400 | break; | 2400 | break; |
| 2401 | } | 2401 | } |
| @@ -2406,7 +2406,7 @@ mac_handle_dialog_event (next_handler, event, data) | |||
| 2406 | abort (); | 2406 | abort (); |
| 2407 | } | 2407 | } |
| 2408 | 2408 | ||
| 2409 | if (quit_event_loop_p) | 2409 | if (quit_dialog_event_loop) |
| 2410 | { | 2410 | { |
| 2411 | err = QuitEventLoop (GetCurrentEventLoop ()); | 2411 | err = QuitEventLoop (GetCurrentEventLoop ()); |
| 2412 | if (err == noErr) | 2412 | if (err == noErr) |
| @@ -2733,6 +2733,7 @@ create_and_show_dialog (f, first_wv) | |||
| 2733 | { | 2733 | { |
| 2734 | EventTargetRef toolbox_dispatcher = GetEventDispatcherTarget (); | 2734 | EventTargetRef toolbox_dispatcher = GetEventDispatcherTarget (); |
| 2735 | 2735 | ||
| 2736 | quit_dialog_event_loop = 0; | ||
| 2736 | while (1) | 2737 | while (1) |
| 2737 | { | 2738 | { |
| 2738 | EMACS_TIME next_time = timer_check (1); | 2739 | EMACS_TIME next_time = timer_check (1); |
| @@ -2758,12 +2759,22 @@ create_and_show_dialog (f, first_wv) | |||
| 2758 | SendEventToEventTarget (event, toolbox_dispatcher); | 2759 | SendEventToEventTarget (event, toolbox_dispatcher); |
| 2759 | ReleaseEvent (event); | 2760 | ReleaseEvent (event); |
| 2760 | } | 2761 | } |
| 2762 | #ifdef MAC_OSX | ||
| 2761 | else if (err != eventLoopTimedOutErr) | 2763 | else if (err != eventLoopTimedOutErr) |
| 2762 | { | 2764 | { |
| 2763 | if (err == eventLoopQuitErr) | 2765 | if (err == eventLoopQuitErr) |
| 2764 | err = noErr; | 2766 | err = noErr; |
| 2765 | break; | 2767 | break; |
| 2766 | } | 2768 | } |
| 2769 | #else | ||
| 2770 | /* The return value of ReceiveNextEvent seems to be | ||
| 2771 | unreliable. Use our own global variable instead. */ | ||
| 2772 | if (quit_dialog_event_loop) | ||
| 2773 | { | ||
| 2774 | err = noErr; | ||
| 2775 | break; | ||
| 2776 | } | ||
| 2777 | #endif | ||
| 2767 | } | 2778 | } |
| 2768 | } | 2779 | } |
| 2769 | if (err == noErr) | 2780 | if (err == noErr) |
diff --git a/src/macselect.c b/src/macselect.c index 04034c499b7..9515a5774ec 100644 --- a/src/macselect.c +++ b/src/macselect.c | |||
| @@ -25,22 +25,27 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | #include "blockinput.h" | 25 | #include "blockinput.h" |
| 26 | #include "keymap.h" | 26 | #include "keymap.h" |
| 27 | 27 | ||
| 28 | #if !TARGET_API_MAC_CARBON | 28 | #if TARGET_API_MAC_CARBON |
| 29 | typedef ScrapRef Selection; | ||
| 30 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 31 | #include <Scrap.h> | ||
| 29 | #include <Endian.h> | 32 | #include <Endian.h> |
| 30 | typedef int ScrapRef; | 33 | typedef int Selection; |
| 31 | typedef ResType ScrapFlavorType; | ||
| 32 | #endif /* !TARGET_API_MAC_CARBON */ | 34 | #endif /* !TARGET_API_MAC_CARBON */ |
| 33 | 35 | ||
| 34 | static OSStatus get_scrap_from_symbol P_ ((Lisp_Object, int, ScrapRef *)); | 36 | static OSStatus mac_get_selection_from_symbol P_ ((Lisp_Object, int, |
| 35 | static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object)); | 37 | Selection *)); |
| 36 | static int valid_scrap_target_type_p P_ ((Lisp_Object)); | 38 | static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object, |
| 37 | static OSStatus clear_scrap P_ ((ScrapRef *)); | 39 | Selection)); |
| 38 | static OSStatus put_scrap_string P_ ((ScrapRef, Lisp_Object, Lisp_Object)); | 40 | static int mac_valid_selection_target_p P_ ((Lisp_Object)); |
| 39 | static OSStatus put_scrap_private_timestamp P_ ((ScrapRef, unsigned long)); | 41 | static OSStatus mac_clear_selection P_ ((Selection *)); |
| 40 | static ScrapFlavorType scrap_has_target_type P_ ((ScrapRef, Lisp_Object)); | 42 | static Lisp_Object mac_get_selection_ownership_info P_ ((Selection)); |
| 41 | static Lisp_Object get_scrap_string P_ ((ScrapRef, Lisp_Object)); | 43 | static int mac_valid_selection_value_p P_ ((Lisp_Object, Lisp_Object)); |
| 42 | static OSStatus get_scrap_private_timestamp P_ ((ScrapRef, unsigned long *)); | 44 | static OSStatus mac_put_selection_value P_ ((Selection, Lisp_Object, |
| 43 | static Lisp_Object get_scrap_target_type_list P_ ((ScrapRef)); | 45 | Lisp_Object)); |
| 46 | static int mac_selection_has_target_p P_ ((Selection, Lisp_Object)); | ||
| 47 | static Lisp_Object mac_get_selection_value P_ ((Selection, Lisp_Object)); | ||
| 48 | static Lisp_Object mac_get_selection_target_list P_ ((Selection)); | ||
| 44 | static void x_own_selection P_ ((Lisp_Object, Lisp_Object)); | 49 | static void x_own_selection P_ ((Lisp_Object, Lisp_Object)); |
| 45 | static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int)); | 50 | static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int)); |
| 46 | static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, | 51 | static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, |
| @@ -56,7 +61,7 @@ void init_service_handler P_ ((void)); | |||
| 56 | Lisp_Object QPRIMARY, QSECONDARY, QTIMESTAMP, QTARGETS; | 61 | Lisp_Object QPRIMARY, QSECONDARY, QTIMESTAMP, QTARGETS; |
| 57 | 62 | ||
| 58 | static Lisp_Object Vx_lost_selection_functions; | 63 | static Lisp_Object Vx_lost_selection_functions; |
| 59 | /* Coding system for communicating with other programs via scrap. */ | 64 | /* Coding system for communicating with other programs via selections. */ |
| 60 | static Lisp_Object Vselection_coding_system; | 65 | static Lisp_Object Vselection_coding_system; |
| 61 | 66 | ||
| 62 | /* Coding system for the next communicating with other programs. */ | 67 | /* Coding system for the next communicating with other programs. */ |
| @@ -70,23 +75,24 @@ static Lisp_Object Qforeign_selection; | |||
| 70 | extern unsigned long last_event_timestamp; | 75 | extern unsigned long last_event_timestamp; |
| 71 | 76 | ||
| 72 | /* This is an association list whose elements are of the form | 77 | /* This is an association list whose elements are of the form |
| 73 | ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) | 78 | ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME OWNERSHIP-INFO) |
| 74 | SELECTION-NAME is a lisp symbol. | 79 | SELECTION-NAME is a lisp symbol. |
| 75 | SELECTION-VALUE is the value that emacs owns for that selection. | 80 | SELECTION-VALUE is the value that emacs owns for that selection. |
| 76 | It may be any kind of Lisp object. | 81 | It may be any kind of Lisp object. |
| 77 | SELECTION-TIMESTAMP is the time at which emacs began owning this selection, | 82 | SELECTION-TIMESTAMP is the time at which emacs began owning this selection, |
| 78 | as a cons of two 16-bit numbers (making a 32 bit time.) | 83 | as a cons of two 16-bit numbers (making a 32 bit time.) |
| 79 | FRAME is the frame for which we made the selection. | 84 | FRAME is the frame for which we made the selection. |
| 80 | If there is an entry in this alist, and the data for the flavor | 85 | OWNERSHIP-INFO is a value saved when emacs owns for that selection. |
| 81 | type SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP in the corresponding scrap | 86 | If another application takes the ownership of that selection |
| 82 | (if exists) coincides with SELECTION-TIMESTAMP, then it can be | 87 | later, then newly examined ownership info value should be |
| 83 | assumed that Emacs owns that selection. | 88 | different from the saved one. |
| 89 | If there is an entry in this alist, the current ownership info for | ||
| 90 | the selection coincides with OWNERSHIP-INFO, then it can be | ||
| 91 | assumed that Emacs owns that selection. | ||
| 84 | The only (eq) parts of this list that are visible from Lisp are the | 92 | The only (eq) parts of this list that are visible from Lisp are the |
| 85 | selection-values. */ | 93 | selection-values. */ |
| 86 | static Lisp_Object Vselection_alist; | 94 | static Lisp_Object Vselection_alist; |
| 87 | 95 | ||
| 88 | #define SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP 'Etsp' | ||
| 89 | |||
| 90 | /* This is an alist whose CARs are selection-types and whose CDRs are | 96 | /* This is an alist whose CARs are selection-types and whose CDRs are |
| 91 | the names of Lisp functions to call to convert the given Emacs | 97 | the names of Lisp functions to call to convert the given Emacs |
| 92 | selection value to a string representing the given selection type. | 98 | selection value to a string representing the given selection type. |
| @@ -104,21 +110,22 @@ static Lisp_Object Qmac_scrap_name, Qmac_ostype; | |||
| 104 | static Lisp_Object Vmac_service_selection; | 110 | static Lisp_Object Vmac_service_selection; |
| 105 | #endif | 111 | #endif |
| 106 | 112 | ||
| 107 | /* Get a reference to the scrap corresponding to the symbol SYM. The | 113 | /* Get a reference to the selection corresponding to the symbol SYM. |
| 108 | reference is set to *SCRAP, and it becomes NULL if there's no | 114 | The reference is set to *SEL, and it becomes NULL if there's no |
| 109 | corresponding scrap. Clear the scrap if CLEAR_P is non-zero. */ | 115 | corresponding selection. Clear the selection if CLEAR_P is |
| 116 | non-zero. */ | ||
| 110 | 117 | ||
| 111 | static OSStatus | 118 | static OSStatus |
| 112 | get_scrap_from_symbol (sym, clear_p, scrap) | 119 | mac_get_selection_from_symbol (sym, clear_p, sel) |
| 113 | Lisp_Object sym; | 120 | Lisp_Object sym; |
| 114 | int clear_p; | 121 | int clear_p; |
| 115 | ScrapRef *scrap; | 122 | Selection *sel; |
| 116 | { | 123 | { |
| 117 | OSStatus err = noErr; | 124 | OSStatus err = noErr; |
| 118 | Lisp_Object str = Fget (sym, Qmac_scrap_name); | 125 | Lisp_Object str = Fget (sym, Qmac_scrap_name); |
| 119 | 126 | ||
| 120 | if (!STRINGP (str)) | 127 | if (!STRINGP (str)) |
| 121 | *scrap = NULL; | 128 | *sel = NULL; |
| 122 | else | 129 | else |
| 123 | { | 130 | { |
| 124 | #if TARGET_API_MAC_CARBON | 131 | #if TARGET_API_MAC_CARBON |
| @@ -127,19 +134,19 @@ get_scrap_from_symbol (sym, clear_p, scrap) | |||
| 127 | OptionBits options = (clear_p ? kScrapClearNamedScrap | 134 | OptionBits options = (clear_p ? kScrapClearNamedScrap |
| 128 | : kScrapGetNamedScrap); | 135 | : kScrapGetNamedScrap); |
| 129 | 136 | ||
| 130 | err = GetScrapByName (scrap_name, options, scrap); | 137 | err = GetScrapByName (scrap_name, options, sel); |
| 131 | CFRelease (scrap_name); | 138 | CFRelease (scrap_name); |
| 132 | #else /* !MAC_OSX */ | 139 | #else /* !MAC_OSX */ |
| 133 | if (clear_p) | 140 | if (clear_p) |
| 134 | err = ClearCurrentScrap (); | 141 | err = ClearCurrentScrap (); |
| 135 | if (err == noErr) | 142 | if (err == noErr) |
| 136 | err = GetCurrentScrap (scrap); | 143 | err = GetCurrentScrap (sel); |
| 137 | #endif /* !MAC_OSX */ | 144 | #endif /* !MAC_OSX */ |
| 138 | #else /* !TARGET_API_MAC_CARBON */ | 145 | #else /* !TARGET_API_MAC_CARBON */ |
| 139 | if (clear_p) | 146 | if (clear_p) |
| 140 | err = ZeroScrap (); | 147 | err = ZeroScrap (); |
| 141 | if (err == noErr) | 148 | if (err == noErr) |
| 142 | *scrap = 1; | 149 | *sel = 1; |
| 143 | #endif /* !TARGET_API_MAC_CARBON */ | 150 | #endif /* !TARGET_API_MAC_CARBON */ |
| 144 | } | 151 | } |
| 145 | 152 | ||
| @@ -147,138 +154,154 @@ get_scrap_from_symbol (sym, clear_p, scrap) | |||
| 147 | } | 154 | } |
| 148 | 155 | ||
| 149 | /* Get a scrap flavor type from the symbol SYM. Return 0 if no | 156 | /* Get a scrap flavor type from the symbol SYM. Return 0 if no |
| 150 | corresponding flavor type. */ | 157 | corresponding flavor type. If SEL is non-zero, the return value is |
| 158 | non-zero only when the SEL has the flavor type. */ | ||
| 151 | 159 | ||
| 152 | static ScrapFlavorType | 160 | static ScrapFlavorType |
| 153 | get_flavor_type_from_symbol (sym) | 161 | get_flavor_type_from_symbol (sym, sel) |
| 154 | Lisp_Object sym; | 162 | Lisp_Object sym; |
| 163 | Selection sel; | ||
| 155 | { | 164 | { |
| 156 | Lisp_Object str = Fget (sym, Qmac_ostype); | 165 | Lisp_Object str = Fget (sym, Qmac_ostype); |
| 166 | ScrapFlavorType flavor_type; | ||
| 157 | 167 | ||
| 158 | if (STRINGP (str) && SBYTES (str) == 4) | 168 | if (STRINGP (str) && SBYTES (str) == 4) |
| 159 | return EndianU32_BtoN (*((UInt32 *) SDATA (str))); | 169 | flavor_type = EndianU32_BtoN (*((UInt32 *) SDATA (str))); |
| 170 | else | ||
| 171 | flavor_type = 0; | ||
| 172 | |||
| 173 | if (flavor_type && sel) | ||
| 174 | { | ||
| 175 | #if TARGET_API_MAC_CARBON | ||
| 176 | OSStatus err; | ||
| 177 | ScrapFlavorFlags flags; | ||
| 160 | 178 | ||
| 161 | return 0; | 179 | err = GetScrapFlavorFlags (sel, flavor_type, &flags); |
| 180 | if (err != noErr) | ||
| 181 | flavor_type = 0; | ||
| 182 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 183 | SInt32 size, offset; | ||
| 184 | |||
| 185 | size = GetScrap (NULL, flavor_type, &offset); | ||
| 186 | if (size < 0) | ||
| 187 | flavor_type = 0; | ||
| 188 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 189 | } | ||
| 190 | |||
| 191 | return flavor_type; | ||
| 162 | } | 192 | } |
| 163 | 193 | ||
| 164 | /* Check if the symbol SYM has a corresponding scrap flavor type. */ | 194 | /* Check if the symbol SYM has a corresponding selection target type. */ |
| 165 | 195 | ||
| 166 | static int | 196 | static int |
| 167 | valid_scrap_target_type_p (sym) | 197 | mac_valid_selection_target_p (sym) |
| 168 | Lisp_Object sym; | 198 | Lisp_Object sym; |
| 169 | { | 199 | { |
| 170 | return get_flavor_type_from_symbol (sym) != 0; | 200 | return get_flavor_type_from_symbol (sym, 0) != 0; |
| 171 | } | 201 | } |
| 172 | 202 | ||
| 173 | /* Clear the scrap whose reference is *SCRAP. */ | 203 | /* Clear the selection whose reference is *SEL. */ |
| 174 | 204 | ||
| 175 | static INLINE OSStatus | 205 | static OSStatus |
| 176 | clear_scrap (scrap) | 206 | mac_clear_selection (sel) |
| 177 | ScrapRef *scrap; | 207 | Selection *sel; |
| 178 | { | 208 | { |
| 179 | #if TARGET_API_MAC_CARBON | 209 | #if TARGET_API_MAC_CARBON |
| 180 | #ifdef MAC_OSX | 210 | #ifdef MAC_OSX |
| 181 | return ClearScrap (scrap); | 211 | return ClearScrap (sel); |
| 182 | #else | 212 | #else |
| 183 | return ClearCurrentScrap (); | 213 | OSStatus err; |
| 214 | |||
| 215 | err = ClearCurrentScrap (); | ||
| 216 | if (err == noErr) | ||
| 217 | err = GetCurrentScrap (sel); | ||
| 218 | return err; | ||
| 184 | #endif | 219 | #endif |
| 185 | #else /* !TARGET_API_MAC_CARBON */ | 220 | #else /* !TARGET_API_MAC_CARBON */ |
| 186 | return ZeroScrap (); | 221 | return ZeroScrap (); |
| 187 | #endif /* !TARGET_API_MAC_CARBON */ | 222 | #endif /* !TARGET_API_MAC_CARBON */ |
| 188 | } | 223 | } |
| 189 | 224 | ||
| 190 | /* Put Lisp String STR to the scrap SCRAP. The target type is | 225 | /* Get ownership information for SEL. Emacs can detect a change of |
| 191 | specified by TYPE. */ | 226 | the ownership by comparing saved and current values of the |
| 227 | ownership information. */ | ||
| 192 | 228 | ||
| 193 | static OSStatus | 229 | static Lisp_Object |
| 194 | put_scrap_string (scrap, type, str) | 230 | mac_get_selection_ownership_info (sel) |
| 195 | ScrapRef scrap; | 231 | Selection sel; |
| 196 | Lisp_Object type, str; | ||
| 197 | { | 232 | { |
| 198 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); | ||
| 199 | |||
| 200 | if (flavor_type == 0) | ||
| 201 | return noTypeErr; | ||
| 202 | |||
| 203 | #if TARGET_API_MAC_CARBON | 233 | #if TARGET_API_MAC_CARBON |
| 204 | return PutScrapFlavor (scrap, flavor_type, kScrapFlavorMaskNone, | 234 | return long_to_cons ((unsigned long) sel); |
| 205 | SBYTES (str), SDATA (str)); | ||
| 206 | #else /* !TARGET_API_MAC_CARBON */ | 235 | #else /* !TARGET_API_MAC_CARBON */ |
| 207 | return PutScrap (SBYTES (str), flavor_type, SDATA (str)); | 236 | ScrapStuffPtr scrap_info = InfoScrap (); |
| 237 | |||
| 238 | return make_number (scrap_info->scrapCount); | ||
| 208 | #endif /* !TARGET_API_MAC_CARBON */ | 239 | #endif /* !TARGET_API_MAC_CARBON */ |
| 209 | } | 240 | } |
| 210 | 241 | ||
| 211 | /* Put TIMESTAMP to the scrap SCRAP. The timestamp is used for | 242 | /* Return non-zero if VALUE is a valid selection value for TARGET. */ |
| 212 | checking if the scrap is owned by the process. */ | ||
| 213 | 243 | ||
| 214 | static INLINE OSStatus | 244 | static int |
| 215 | put_scrap_private_timestamp (scrap, timestamp) | 245 | mac_valid_selection_value_p (value, target) |
| 216 | ScrapRef scrap; | 246 | Lisp_Object value, target; |
| 217 | unsigned long timestamp; | ||
| 218 | { | 247 | { |
| 219 | #if TARGET_API_MAC_CARBON | 248 | return STRINGP (value); |
| 220 | return PutScrapFlavor (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, | ||
| 221 | kScrapFlavorMaskSenderOnly, | ||
| 222 | sizeof (timestamp), ×tamp); | ||
| 223 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 224 | return PutScrap (sizeof (timestamp), SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, | ||
| 225 | ×tamp); | ||
| 226 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 227 | } | 249 | } |
| 228 | 250 | ||
| 229 | /* Check if data for the target type TYPE is available in SCRAP. */ | 251 | /* Put Lisp Object VALUE to the selection SEL. The target type is |
| 252 | specified by TARGET. */ | ||
| 230 | 253 | ||
| 231 | static ScrapFlavorType | 254 | static OSStatus |
| 232 | scrap_has_target_type (scrap, type) | 255 | mac_put_selection_value (sel, target, value) |
| 233 | ScrapRef scrap; | 256 | Selection sel; |
| 234 | Lisp_Object type; | 257 | Lisp_Object target, value; |
| 235 | { | 258 | { |
| 236 | OSStatus err; | 259 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (target, 0); |
| 237 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); | ||
| 238 | 260 | ||
| 239 | if (flavor_type) | 261 | if (flavor_type == 0 || !STRINGP (value)) |
| 240 | { | 262 | return noTypeErr; |
| 241 | #if TARGET_API_MAC_CARBON | ||
| 242 | ScrapFlavorFlags flags; | ||
| 243 | 263 | ||
| 244 | err = GetScrapFlavorFlags (scrap, flavor_type, &flags); | 264 | #if TARGET_API_MAC_CARBON |
| 245 | if (err != noErr) | 265 | return PutScrapFlavor (sel, flavor_type, kScrapFlavorMaskNone, |
| 246 | flavor_type = 0; | 266 | SBYTES (value), SDATA (value)); |
| 247 | #else /* !TARGET_API_MAC_CARBON */ | 267 | #else /* !TARGET_API_MAC_CARBON */ |
| 248 | SInt32 size, offset; | 268 | return PutScrap (SBYTES (value), flavor_type, SDATA (value)); |
| 249 | |||
| 250 | size = GetScrap (NULL, flavor_type, &offset); | ||
| 251 | if (size < 0) | ||
| 252 | flavor_type = 0; | ||
| 253 | #endif /* !TARGET_API_MAC_CARBON */ | 269 | #endif /* !TARGET_API_MAC_CARBON */ |
| 254 | } | 270 | } |
| 255 | 271 | ||
| 256 | return flavor_type; | 272 | /* Check if data for the target type TARGET is available in SEL. */ |
| 273 | |||
| 274 | static int | ||
| 275 | mac_selection_has_target_p (sel, target) | ||
| 276 | Selection sel; | ||
| 277 | Lisp_Object target; | ||
| 278 | { | ||
| 279 | return get_flavor_type_from_symbol (target, sel) != 0; | ||
| 257 | } | 280 | } |
| 258 | 281 | ||
| 259 | /* Get data for the target type TYPE from SCRAP and create a Lisp | 282 | /* Get data for the target type TARGET from SEL and create a Lisp |
| 260 | string. Return nil if failed to get data. */ | 283 | string. Return nil if failed to get data. */ |
| 261 | 284 | ||
| 262 | static Lisp_Object | 285 | static Lisp_Object |
| 263 | get_scrap_string (scrap, type) | 286 | mac_get_selection_value (sel, target) |
| 264 | ScrapRef scrap; | 287 | Selection sel; |
| 265 | Lisp_Object type; | 288 | Lisp_Object target; |
| 266 | { | 289 | { |
| 267 | OSStatus err; | 290 | OSStatus err; |
| 268 | Lisp_Object result = Qnil; | 291 | Lisp_Object result = Qnil; |
| 269 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); | 292 | ScrapFlavorType flavor_type = get_flavor_type_from_symbol (target, sel); |
| 270 | #if TARGET_API_MAC_CARBON | 293 | #if TARGET_API_MAC_CARBON |
| 271 | Size size; | 294 | Size size; |
| 272 | 295 | ||
| 273 | if (flavor_type) | 296 | if (flavor_type) |
| 274 | { | 297 | { |
| 275 | err = GetScrapFlavorSize (scrap, flavor_type, &size); | 298 | err = GetScrapFlavorSize (sel, flavor_type, &size); |
| 276 | if (err == noErr) | 299 | if (err == noErr) |
| 277 | { | 300 | { |
| 278 | do | 301 | do |
| 279 | { | 302 | { |
| 280 | result = make_uninit_string (size); | 303 | result = make_uninit_string (size); |
| 281 | err = GetScrapFlavorData (scrap, flavor_type, | 304 | err = GetScrapFlavorData (sel, flavor_type, |
| 282 | &size, SDATA (result)); | 305 | &size, SDATA (result)); |
| 283 | if (err != noErr) | 306 | if (err != noErr) |
| 284 | result = Qnil; | 307 | result = Qnil; |
| @@ -308,72 +331,25 @@ get_scrap_string (scrap, type) | |||
| 308 | return result; | 331 | return result; |
| 309 | } | 332 | } |
| 310 | 333 | ||
| 311 | /* Get timestamp from the scrap SCRAP and set to *TIMPSTAMP. */ | 334 | /* Get the list of target types in SEL. The return value is a list of |
| 312 | 335 | target type symbols possibly followed by scrap flavor type | |
| 313 | static OSStatus | ||
| 314 | get_scrap_private_timestamp (scrap, timestamp) | ||
| 315 | ScrapRef scrap; | ||
| 316 | unsigned long *timestamp; | ||
| 317 | { | ||
| 318 | OSStatus err = noErr; | ||
| 319 | #if TARGET_API_MAC_CARBON | ||
| 320 | ScrapFlavorFlags flags; | ||
| 321 | |||
| 322 | err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags); | ||
| 323 | if (err == noErr) | ||
| 324 | { | ||
| 325 | if (!(flags & kScrapFlavorMaskSenderOnly)) | ||
| 326 | err = noTypeErr; | ||
| 327 | else | ||
| 328 | { | ||
| 329 | Size size = sizeof (*timestamp); | ||
| 330 | |||
| 331 | err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, | ||
| 332 | &size, timestamp); | ||
| 333 | if (err == noErr && size != sizeof (*timestamp)) | ||
| 334 | err = noTypeErr; | ||
| 335 | } | ||
| 336 | } | ||
| 337 | #else /* !TARGET_API_MAC_CARBON */ | ||
| 338 | Handle handle; | ||
| 339 | SInt32 size, offset; | ||
| 340 | |||
| 341 | size = GetScrap (NULL, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &offset); | ||
| 342 | if (size == sizeof (*timestamp)) | ||
| 343 | { | ||
| 344 | handle = NewHandle (size); | ||
| 345 | HLock (handle); | ||
| 346 | size = GetScrap (handle, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &offset); | ||
| 347 | if (size == sizeof (*timestamp)) | ||
| 348 | *timestamp = *((unsigned long *) *handle); | ||
| 349 | DisposeHandle (handle); | ||
| 350 | } | ||
| 351 | if (size != sizeof (*timestamp)) | ||
| 352 | err = noTypeErr; | ||
| 353 | #endif /* !TARGET_API_MAC_CARBON */ | ||
| 354 | |||
| 355 | return err; | ||
| 356 | } | ||
| 357 | |||
| 358 | /* Get the list of target types in SCRAP. The return value is a list | ||
| 359 | of target type symbols possibly followed by scrap flavor type | ||
| 360 | strings. */ | 336 | strings. */ |
| 361 | 337 | ||
| 362 | static Lisp_Object | 338 | static Lisp_Object |
| 363 | get_scrap_target_type_list (scrap) | 339 | mac_get_selection_target_list (sel) |
| 364 | ScrapRef scrap; | 340 | Selection sel; |
| 365 | { | 341 | { |
| 366 | Lisp_Object result = Qnil, rest, target_type; | 342 | Lisp_Object result = Qnil, rest, target; |
| 367 | #if TARGET_API_MAC_CARBON | 343 | #if TARGET_API_MAC_CARBON |
| 368 | OSStatus err; | 344 | OSStatus err; |
| 369 | UInt32 count, i, type; | 345 | UInt32 count, i, type; |
| 370 | ScrapFlavorInfo *flavor_info = NULL; | 346 | ScrapFlavorInfo *flavor_info = NULL; |
| 371 | Lisp_Object strings = Qnil; | 347 | Lisp_Object strings = Qnil; |
| 372 | 348 | ||
| 373 | err = GetScrapFlavorCount (scrap, &count); | 349 | err = GetScrapFlavorCount (sel, &count); |
| 374 | if (err == noErr) | 350 | if (err == noErr) |
| 375 | flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); | 351 | flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); |
| 376 | err = GetScrapFlavorInfoList (scrap, &count, flavor_info); | 352 | err = GetScrapFlavorInfoList (sel, &count, flavor_info); |
| 377 | if (err != noErr) | 353 | if (err != noErr) |
| 378 | { | 354 | { |
| 379 | xfree (flavor_info); | 355 | xfree (flavor_info); |
| @@ -387,11 +363,11 @@ get_scrap_target_type_list (scrap) | |||
| 387 | ScrapFlavorType flavor_type = 0; | 363 | ScrapFlavorType flavor_type = 0; |
| 388 | 364 | ||
| 389 | if (CONSP (XCAR (rest)) | 365 | if (CONSP (XCAR (rest)) |
| 390 | && (target_type = XCAR (XCAR (rest)), | 366 | && (target = XCAR (XCAR (rest)), |
| 391 | SYMBOLP (target_type)) | 367 | SYMBOLP (target)) |
| 392 | && (flavor_type = scrap_has_target_type (scrap, target_type))) | 368 | && (flavor_type = get_flavor_type_from_symbol (target, sel))) |
| 393 | { | 369 | { |
| 394 | result = Fcons (target_type, result); | 370 | result = Fcons (target, result); |
| 395 | #if TARGET_API_MAC_CARBON | 371 | #if TARGET_API_MAC_CARBON |
| 396 | for (i = 0; i < count; i++) | 372 | for (i = 0; i < count; i++) |
| 397 | if (flavor_info[i].flavorType == flavor_type) | 373 | if (flavor_info[i].flavorType == flavor_type) |
| @@ -428,9 +404,9 @@ x_own_selection (selection_name, selection_value) | |||
| 428 | Lisp_Object selection_name, selection_value; | 404 | Lisp_Object selection_name, selection_value; |
| 429 | { | 405 | { |
| 430 | OSStatus err; | 406 | OSStatus err; |
| 431 | ScrapRef scrap; | 407 | Selection sel; |
| 432 | struct gcpro gcpro1, gcpro2; | 408 | struct gcpro gcpro1, gcpro2; |
| 433 | Lisp_Object rest, handler_fn, value, type; | 409 | Lisp_Object rest, handler_fn, value, target_type; |
| 434 | int count; | 410 | int count; |
| 435 | 411 | ||
| 436 | CHECK_SYMBOL (selection_name); | 412 | CHECK_SYMBOL (selection_name); |
| @@ -439,8 +415,8 @@ x_own_selection (selection_name, selection_value) | |||
| 439 | 415 | ||
| 440 | BLOCK_INPUT; | 416 | BLOCK_INPUT; |
| 441 | 417 | ||
| 442 | err = get_scrap_from_symbol (selection_name, 1, &scrap); | 418 | err = mac_get_selection_from_symbol (selection_name, 1, &sel); |
| 443 | if (err == noErr && scrap) | 419 | if (err == noErr && sel) |
| 444 | { | 420 | { |
| 445 | /* Don't allow a quit within the converter. | 421 | /* Don't allow a quit within the converter. |
| 446 | When the user types C-g, he would be surprised | 422 | When the user types C-g, he would be surprised |
| @@ -451,49 +427,56 @@ x_own_selection (selection_name, selection_value) | |||
| 451 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) | 427 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) |
| 452 | { | 428 | { |
| 453 | if (!(CONSP (XCAR (rest)) | 429 | if (!(CONSP (XCAR (rest)) |
| 454 | && (type = XCAR (XCAR (rest)), | 430 | && (target_type = XCAR (XCAR (rest)), |
| 455 | SYMBOLP (type)) | 431 | SYMBOLP (target_type)) |
| 456 | && valid_scrap_target_type_p (type) | 432 | && mac_valid_selection_target_p (target_type) |
| 457 | && (handler_fn = XCDR (XCAR (rest)), | 433 | && (handler_fn = XCDR (XCAR (rest)), |
| 458 | SYMBOLP (handler_fn)))) | 434 | SYMBOLP (handler_fn)))) |
| 459 | continue; | 435 | continue; |
| 460 | 436 | ||
| 461 | if (!NILP (handler_fn)) | 437 | if (!NILP (handler_fn)) |
| 462 | value = call3 (handler_fn, selection_name, | 438 | value = call3 (handler_fn, selection_name, |
| 463 | type, selection_value); | 439 | target_type, selection_value); |
| 440 | |||
| 441 | if (NILP (value)) | ||
| 442 | continue; | ||
| 464 | 443 | ||
| 465 | if (STRINGP (value)) | 444 | if (mac_valid_selection_value_p (value, target_type)) |
| 466 | err = put_scrap_string (scrap, type, value); | 445 | err = mac_put_selection_value (sel, target_type, value); |
| 467 | else if (CONSP (value) | 446 | else if (CONSP (value) |
| 468 | && EQ (XCAR (value), type) | 447 | && EQ (XCAR (value), target_type) |
| 469 | && STRINGP (XCDR (value))) | 448 | && mac_valid_selection_value_p (XCDR (value), target_type)) |
| 470 | err = put_scrap_string (scrap, type, XCDR (value)); | 449 | err = mac_put_selection_value (sel, target_type, XCDR (value)); |
| 471 | } | 450 | } |
| 472 | 451 | ||
| 473 | unbind_to (count, Qnil); | 452 | unbind_to (count, Qnil); |
| 474 | |||
| 475 | if (err == noErr) | ||
| 476 | err = put_scrap_private_timestamp (scrap, last_event_timestamp); | ||
| 477 | } | 453 | } |
| 478 | 454 | ||
| 479 | UNBLOCK_INPUT; | 455 | UNBLOCK_INPUT; |
| 480 | 456 | ||
| 481 | UNGCPRO; | 457 | UNGCPRO; |
| 482 | 458 | ||
| 483 | if (scrap && err != noErr) | 459 | if (sel && err != noErr) |
| 484 | error ("Can't set selection"); | 460 | error ("Can't set selection"); |
| 485 | 461 | ||
| 486 | /* Now update the local cache */ | 462 | /* Now update the local cache */ |
| 487 | { | 463 | { |
| 488 | Lisp_Object selection_time; | 464 | Lisp_Object selection_time; |
| 489 | Lisp_Object selection_data; | 465 | Lisp_Object selection_data; |
| 466 | Lisp_Object ownership_info; | ||
| 490 | Lisp_Object prev_value; | 467 | Lisp_Object prev_value; |
| 491 | 468 | ||
| 492 | selection_time = long_to_cons (last_event_timestamp); | 469 | selection_time = long_to_cons (last_event_timestamp); |
| 470 | if (sel) | ||
| 471 | ownership_info = mac_get_selection_ownership_info (sel); | ||
| 472 | else | ||
| 473 | ownership_info = Qnil; /* dummy value for local-only selection */ | ||
| 493 | selection_data = Fcons (selection_name, | 474 | selection_data = Fcons (selection_name, |
| 494 | Fcons (selection_value, | 475 | Fcons (selection_value, |
| 495 | Fcons (selection_time, | 476 | Fcons (selection_time, |
| 496 | Fcons (selected_frame, Qnil)))); | 477 | Fcons (selected_frame, |
| 478 | Fcons (ownership_info, | ||
| 479 | Qnil))))); | ||
| 497 | prev_value = assq_no_quit (selection_name, Vselection_alist); | 480 | prev_value = assq_no_quit (selection_name, Vselection_alist); |
| 498 | 481 | ||
| 499 | Vselection_alist = Fcons (selection_data, Vselection_alist); | 482 | Vselection_alist = Fcons (selection_data, Vselection_alist); |
| @@ -574,29 +557,20 @@ x_get_local_selection (selection_symbol, target_type, local_request) | |||
| 574 | unbind_to (count, Qnil); | 557 | unbind_to (count, Qnil); |
| 575 | } | 558 | } |
| 576 | 559 | ||
| 560 | if (local_request) | ||
| 561 | return value; | ||
| 562 | |||
| 577 | /* Make sure this value is of a type that we could transmit | 563 | /* Make sure this value is of a type that we could transmit |
| 578 | to another X client. */ | 564 | to another application. */ |
| 579 | 565 | ||
| 566 | type = target_type; | ||
| 580 | check = value; | 567 | check = value; |
| 581 | if (CONSP (value) | 568 | if (CONSP (value) |
| 582 | && SYMBOLP (XCAR (value))) | 569 | && SYMBOLP (XCAR (value))) |
| 583 | type = XCAR (value), | 570 | type = XCAR (value), |
| 584 | check = XCDR (value); | 571 | check = XCDR (value); |
| 585 | 572 | ||
| 586 | if (STRINGP (check) | 573 | if (NILP (value) || mac_valid_selection_value_p (check, type)) |
| 587 | || VECTORP (check) | ||
| 588 | || SYMBOLP (check) | ||
| 589 | || INTEGERP (check) | ||
| 590 | || NILP (value)) | ||
| 591 | return value; | ||
| 592 | /* Check for a value that cons_to_long could handle. */ | ||
| 593 | else if (CONSP (check) | ||
| 594 | && INTEGERP (XCAR (check)) | ||
| 595 | && (INTEGERP (XCDR (check)) | ||
| 596 | || | ||
| 597 | (CONSP (XCDR (check)) | ||
| 598 | && INTEGERP (XCAR (XCDR (check))) | ||
| 599 | && NILP (XCDR (XCDR (check)))))) | ||
| 600 | return value; | 574 | return value; |
| 601 | 575 | ||
| 602 | signal_error ("Invalid data returned by selection-conversion function", | 576 | signal_error ("Invalid data returned by selection-conversion function", |
| @@ -676,22 +650,22 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp) | |||
| 676 | Lisp_Object selection_symbol, target_type, time_stamp; | 650 | Lisp_Object selection_symbol, target_type, time_stamp; |
| 677 | { | 651 | { |
| 678 | OSStatus err; | 652 | OSStatus err; |
| 679 | ScrapRef scrap; | 653 | Selection sel; |
| 680 | Lisp_Object result = Qnil; | 654 | Lisp_Object result = Qnil; |
| 681 | 655 | ||
| 682 | BLOCK_INPUT; | 656 | BLOCK_INPUT; |
| 683 | 657 | ||
| 684 | err = get_scrap_from_symbol (selection_symbol, 0, &scrap); | 658 | err = mac_get_selection_from_symbol (selection_symbol, 0, &sel); |
| 685 | if (err == noErr && scrap) | 659 | if (err == noErr && sel) |
| 686 | { | 660 | { |
| 687 | if (EQ (target_type, QTARGETS)) | 661 | if (EQ (target_type, QTARGETS)) |
| 688 | { | 662 | { |
| 689 | result = get_scrap_target_type_list (scrap); | 663 | result = mac_get_selection_target_list (sel); |
| 690 | result = Fvconcat (1, &result); | 664 | result = Fvconcat (1, &result); |
| 691 | } | 665 | } |
| 692 | else | 666 | else |
| 693 | { | 667 | { |
| 694 | result = get_scrap_string (scrap, target_type); | 668 | result = mac_get_selection_value (sel, target_type); |
| 695 | if (STRINGP (result)) | 669 | if (STRINGP (result)) |
| 696 | Fput_text_property (make_number (0), make_number (SBYTES (result)), | 670 | Fput_text_property (make_number (0), make_number (SBYTES (result)), |
| 697 | Qforeign_selection, target_type, result); | 671 | Qforeign_selection, target_type, result); |
| @@ -770,7 +744,7 @@ Disowning it means there is no such selection. */) | |||
| 770 | Lisp_Object time; | 744 | Lisp_Object time; |
| 771 | { | 745 | { |
| 772 | OSStatus err; | 746 | OSStatus err; |
| 773 | ScrapRef scrap; | 747 | Selection sel; |
| 774 | Lisp_Object local_selection_data; | 748 | Lisp_Object local_selection_data; |
| 775 | 749 | ||
| 776 | check_mac (); | 750 | check_mac (); |
| @@ -812,9 +786,9 @@ Disowning it means there is no such selection. */) | |||
| 812 | 786 | ||
| 813 | BLOCK_INPUT; | 787 | BLOCK_INPUT; |
| 814 | 788 | ||
| 815 | err = get_scrap_from_symbol (selection, 0, &scrap); | 789 | err = mac_get_selection_from_symbol (selection, 0, &sel); |
| 816 | if (err == noErr && scrap) | 790 | if (err == noErr && sel) |
| 817 | clear_scrap (&scrap); | 791 | mac_clear_selection (&sel); |
| 818 | 792 | ||
| 819 | UNBLOCK_INPUT; | 793 | UNBLOCK_INPUT; |
| 820 | 794 | ||
| @@ -833,7 +807,7 @@ and t is the same as `SECONDARY'. */) | |||
| 833 | Lisp_Object selection; | 807 | Lisp_Object selection; |
| 834 | { | 808 | { |
| 835 | OSStatus err; | 809 | OSStatus err; |
| 836 | ScrapRef scrap; | 810 | Selection sel; |
| 837 | Lisp_Object result = Qnil, local_selection_data; | 811 | Lisp_Object result = Qnil, local_selection_data; |
| 838 | 812 | ||
| 839 | check_mac (); | 813 | check_mac (); |
| @@ -848,15 +822,14 @@ and t is the same as `SECONDARY'. */) | |||
| 848 | 822 | ||
| 849 | BLOCK_INPUT; | 823 | BLOCK_INPUT; |
| 850 | 824 | ||
| 851 | err = get_scrap_from_symbol (selection, 0, &scrap); | 825 | err = mac_get_selection_from_symbol (selection, 0, &sel); |
| 852 | if (err == noErr && scrap) | 826 | if (err == noErr && sel) |
| 853 | { | 827 | { |
| 854 | unsigned long timestamp; | 828 | Lisp_Object ownership_info; |
| 855 | 829 | ||
| 856 | err = get_scrap_private_timestamp (scrap, ×tamp); | 830 | ownership_info = XCAR (XCDR (XCDR (XCDR (XCDR (local_selection_data))))); |
| 857 | if (err == noErr | 831 | if (!NILP (Fequal (ownership_info, |
| 858 | && (timestamp | 832 | mac_get_selection_ownership_info (sel)))) |
| 859 | == cons_to_long (XCAR (XCDR (XCDR (local_selection_data)))))) | ||
| 860 | result = Qt; | 833 | result = Qt; |
| 861 | } | 834 | } |
| 862 | else | 835 | else |
| @@ -878,7 +851,7 @@ and t is the same as `SECONDARY'. */) | |||
| 878 | Lisp_Object selection; | 851 | Lisp_Object selection; |
| 879 | { | 852 | { |
| 880 | OSStatus err; | 853 | OSStatus err; |
| 881 | ScrapRef scrap; | 854 | Selection sel; |
| 882 | Lisp_Object result = Qnil, rest; | 855 | Lisp_Object result = Qnil, rest; |
| 883 | 856 | ||
| 884 | /* It should be safe to call this before we have an Mac frame. */ | 857 | /* It should be safe to call this before we have an Mac frame. */ |
| @@ -893,12 +866,12 @@ and t is the same as `SECONDARY'. */) | |||
| 893 | 866 | ||
| 894 | BLOCK_INPUT; | 867 | BLOCK_INPUT; |
| 895 | 868 | ||
| 896 | err = get_scrap_from_symbol (selection, 0, &scrap); | 869 | err = mac_get_selection_from_symbol (selection, 0, &sel); |
| 897 | if (err == noErr && scrap) | 870 | if (err == noErr && sel) |
| 898 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) | 871 | for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) |
| 899 | { | 872 | { |
| 900 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) | 873 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) |
| 901 | && scrap_has_target_type (scrap, XCAR (XCAR (rest)))) | 874 | && mac_selection_has_target_p (sel, XCAR (XCAR (rest)))) |
| 902 | { | 875 | { |
| 903 | result = Qt; | 876 | result = Qt; |
| 904 | break; | 877 | break; |
| @@ -1700,7 +1673,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1700 | if (!SYMBOLP (Vmac_service_selection)) | 1673 | if (!SYMBOLP (Vmac_service_selection)) |
| 1701 | err = eventNotHandledErr; | 1674 | err = eventNotHandledErr; |
| 1702 | else | 1675 | else |
| 1703 | err = get_scrap_from_symbol (Vmac_service_selection, 0, &cur_scrap); | 1676 | err = mac_get_selection_from_symbol (Vmac_service_selection, 0, &cur_scrap); |
| 1704 | if (!(err == noErr && cur_scrap)) | 1677 | if (!(err == noErr && cur_scrap)) |
| 1705 | return eventNotHandledErr; | 1678 | return eventNotHandledErr; |
| 1706 | 1679 | ||
| @@ -1719,7 +1692,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1719 | rest = XCDR (rest)) | 1692 | rest = XCDR (rest)) |
| 1720 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) | 1693 | if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) |
| 1721 | && (flavor_type = | 1694 | && (flavor_type = |
| 1722 | get_flavor_type_from_symbol (XCAR (XCAR (rest))))) | 1695 | get_flavor_type_from_symbol (XCAR (XCAR (rest)), 0))) |
| 1723 | { | 1696 | { |
| 1724 | type = CreateTypeStringWithOSType (flavor_type); | 1697 | type = CreateTypeStringWithOSType (flavor_type); |
| 1725 | if (type) | 1698 | if (type) |
| @@ -1804,14 +1777,15 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1804 | NULL, sizeof (ScrapRef), NULL, | 1777 | NULL, sizeof (ScrapRef), NULL, |
| 1805 | &specific_scrap); | 1778 | &specific_scrap); |
| 1806 | if (err == noErr) | 1779 | if (err == noErr) |
| 1807 | err = clear_scrap (&cur_scrap); | 1780 | err = mac_clear_selection (&cur_scrap); |
| 1808 | if (err == noErr) | 1781 | if (err == noErr) |
| 1809 | for (rest = Vselection_converter_alist; CONSP (rest); | 1782 | for (rest = Vselection_converter_alist; CONSP (rest); |
| 1810 | rest = XCDR (rest)) | 1783 | rest = XCDR (rest)) |
| 1811 | { | 1784 | { |
| 1812 | if (! (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))))) | 1785 | if (! (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))))) |
| 1813 | continue; | 1786 | continue; |
| 1814 | flavor_type = get_flavor_type_from_symbol (XCAR (XCAR (rest))); | 1787 | flavor_type = get_flavor_type_from_symbol (XCAR (XCAR (rest)), |
| 1788 | specific_scrap); | ||
| 1815 | if (flavor_type == 0) | 1789 | if (flavor_type == 0) |
| 1816 | continue; | 1790 | continue; |
| 1817 | err = copy_scrap_flavor_data (specific_scrap, cur_scrap, | 1791 | err = copy_scrap_flavor_data (specific_scrap, cur_scrap, |
diff --git a/src/macterm.c b/src/macterm.c index 11ec9c4d3c1..654afcf6b1a 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4336,14 +4336,6 @@ static void | |||
| 4336 | frame_highlight (f) | 4336 | frame_highlight (f) |
| 4337 | struct frame *f; | 4337 | struct frame *f; |
| 4338 | { | 4338 | { |
| 4339 | OSErr err; | ||
| 4340 | ControlRef root_control; | ||
| 4341 | |||
| 4342 | BLOCK_INPUT; | ||
| 4343 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 4344 | if (err == noErr) | ||
| 4345 | ActivateControl (root_control); | ||
| 4346 | UNBLOCK_INPUT; | ||
| 4347 | x_update_cursor (f, 1); | 4339 | x_update_cursor (f, 1); |
| 4348 | } | 4340 | } |
| 4349 | 4341 | ||
| @@ -4351,14 +4343,6 @@ static void | |||
| 4351 | frame_unhighlight (f) | 4343 | frame_unhighlight (f) |
| 4352 | struct frame *f; | 4344 | struct frame *f; |
| 4353 | { | 4345 | { |
| 4354 | OSErr err; | ||
| 4355 | ControlRef root_control; | ||
| 4356 | |||
| 4357 | BLOCK_INPUT; | ||
| 4358 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 4359 | if (err == noErr) | ||
| 4360 | DeactivateControl (root_control); | ||
| 4361 | UNBLOCK_INPUT; | ||
| 4362 | x_update_cursor (f, 1); | 4346 | x_update_cursor (f, 1); |
| 4363 | } | 4347 | } |
| 4364 | 4348 | ||
| @@ -6116,7 +6100,9 @@ free_frame_tool_bar (f) | |||
| 6116 | 6100 | ||
| 6117 | BLOCK_INPUT; | 6101 | BLOCK_INPUT; |
| 6118 | ShowHideWindowToolbar (FRAME_MAC_WINDOW (f), false, | 6102 | ShowHideWindowToolbar (FRAME_MAC_WINDOW (f), false, |
| 6119 | f == mac_focus_frame (dpyinfo)); | 6103 | (NILP (Fsymbol_value |
| 6104 | (intern ("frame-notice-user-settings"))) | ||
| 6105 | && f == mac_focus_frame (dpyinfo))); | ||
| 6120 | /* Mac OS X 10.3 does not issue kEventWindowBoundsChanged events | 6106 | /* Mac OS X 10.3 does not issue kEventWindowBoundsChanged events |
| 6121 | on toolbar visibility change. */ | 6107 | on toolbar visibility change. */ |
| 6122 | mac_handle_origin_change (f); | 6108 | mac_handle_origin_change (f); |
| @@ -9412,11 +9398,13 @@ mac_handle_font_event (next_handler, event, data) | |||
| 9412 | static const EventParamName names_sel[] = {kEventParamATSUFontID, | 9398 | static const EventParamName names_sel[] = {kEventParamATSUFontID, |
| 9413 | kEventParamATSUFontSize, | 9399 | kEventParamATSUFontSize, |
| 9414 | kEventParamFMFontFamily, | 9400 | kEventParamFMFontFamily, |
| 9401 | kEventParamFMFontStyle, | ||
| 9415 | kEventParamFMFontSize, | 9402 | kEventParamFMFontSize, |
| 9416 | kEventParamFontColor}; | 9403 | kEventParamFontColor}; |
| 9417 | static const EventParamType types_sel[] = {typeATSUFontID, | 9404 | static const EventParamType types_sel[] = {typeATSUFontID, |
| 9418 | typeATSUSize, | 9405 | typeATSUSize, |
| 9419 | typeFMFontFamily, | 9406 | typeFMFontFamily, |
| 9407 | typeFMFontStyle, | ||
| 9420 | typeFMFontSize, | 9408 | typeFMFontSize, |
| 9421 | typeFontColor}; | 9409 | typeFontColor}; |
| 9422 | 9410 | ||
| @@ -10737,7 +10725,7 @@ mac_handle_window_event (next_handler, event, data) | |||
| 10737 | { | 10725 | { |
| 10738 | struct frame *sf = SELECTED_FRAME (); | 10726 | struct frame *sf = SELECTED_FRAME (); |
| 10739 | 10727 | ||
| 10740 | if (!(FRAME_MAC_P (sf))) | 10728 | if (!(FRAME_MAC_P (sf) && sf->async_visible)) |
| 10741 | RepositionWindow (wp, NULL, kWindowCenterOnMainScreen); | 10729 | RepositionWindow (wp, NULL, kWindowCenterOnMainScreen); |
| 10742 | else | 10730 | else |
| 10743 | { | 10731 | { |
| @@ -10752,8 +10740,11 @@ mac_handle_window_event (next_handler, event, data) | |||
| 10752 | /* This is a workaround. RepositionWindow fails to put | 10740 | /* This is a workaround. RepositionWindow fails to put |
| 10753 | a window at the cascading position when its parent | 10741 | a window at the cascading position when its parent |
| 10754 | window has a Carbon HIToolbar. */ | 10742 | window has a Carbon HIToolbar. */ |
| 10755 | if (f->top_pos == sf->top_pos && f->left_pos == sf->left_pos) | 10743 | if ((f->left_pos == sf->left_pos |
| 10756 | MoveWindowStructure (wp, f->left_pos + 10, f->top_pos + 32); | 10744 | && f->top_pos == sf->top_pos) |
| 10745 | || (f->left_pos == sf->left_pos + 10 * 2 | ||
| 10746 | && f->top_pos == sf->top_pos + 32 * 2)) | ||
| 10747 | MoveWindowStructure (wp, sf->left_pos + 10, sf->top_pos + 32); | ||
| 10757 | #endif | 10748 | #endif |
| 10758 | } | 10749 | } |
| 10759 | result = noErr; | 10750 | result = noErr; |
| @@ -10978,7 +10969,7 @@ mac_handle_keyboard_event (next_handler, event, data) | |||
| 10978 | void *data; | 10969 | void *data; |
| 10979 | { | 10970 | { |
| 10980 | OSStatus err, result = eventNotHandledErr; | 10971 | OSStatus err, result = eventNotHandledErr; |
| 10981 | UInt32 event_kind, key_code, modifiers, mapped_modifiers; | 10972 | UInt32 event_kind, key_code, modifiers; |
| 10982 | unsigned char char_code; | 10973 | unsigned char char_code; |
| 10983 | 10974 | ||
| 10984 | event_kind = GetEventKind (event); | 10975 | event_kind = GetEventKind (event); |
| @@ -10987,32 +10978,16 @@ mac_handle_keyboard_event (next_handler, event, data) | |||
| 10987 | case kEventRawKeyDown: | 10978 | case kEventRawKeyDown: |
| 10988 | case kEventRawKeyRepeat: | 10979 | case kEventRawKeyRepeat: |
| 10989 | case kEventRawKeyUp: | 10980 | case kEventRawKeyUp: |
| 10990 | if (read_socket_inev == NULL) | ||
| 10991 | { | ||
| 10992 | result = CallNextEventHandler (next_handler, event); | ||
| 10993 | break; | ||
| 10994 | } | ||
| 10995 | |||
| 10996 | err = GetEventParameter (event, kEventParamKeyModifiers, | ||
| 10997 | typeUInt32, NULL, | ||
| 10998 | sizeof (UInt32), NULL, &modifiers); | ||
| 10999 | if (err != noErr) | ||
| 11000 | break; | ||
| 11001 | |||
| 11002 | mapped_modifiers = mac_mapped_modifiers (modifiers); | ||
| 11003 | |||
| 11004 | /* When using Carbon Events, we need to pass raw keyboard events | 10981 | /* When using Carbon Events, we need to pass raw keyboard events |
| 11005 | to the TSM ourselves. If TSM handles it, it will pass back | 10982 | to the TSM ourselves. If TSM handles it, it will pass back |
| 11006 | noErr, otherwise it will pass back "eventNotHandledErr" and | 10983 | noErr, otherwise it will pass back "eventNotHandledErr" and |
| 11007 | we can process it normally. */ | 10984 | we can process it normally. */ |
| 11008 | if (!(mapped_modifiers | 10985 | result = CallNextEventHandler (next_handler, event); |
| 11009 | & ~(mac_pass_command_to_system ? cmdKey : 0) | 10986 | if (result != eventNotHandledErr) |
| 11010 | & ~(mac_pass_control_to_system ? controlKey : 0))) | 10987 | break; |
| 11011 | { | 10988 | |
| 11012 | result = CallNextEventHandler (next_handler, event); | 10989 | if (read_socket_inev == NULL) |
| 11013 | if (result != eventNotHandledErr) | 10990 | break; |
| 11014 | break; | ||
| 11015 | } | ||
| 11016 | 10991 | ||
| 11017 | #if USE_MAC_TSM | 10992 | #if USE_MAC_TSM |
| 11018 | if (read_socket_inev->kind != NO_EVENT) | 10993 | if (read_socket_inev->kind != NO_EVENT) |
| @@ -11037,6 +11012,12 @@ mac_handle_keyboard_event (next_handler, event, data) | |||
| 11037 | if (err != noErr) | 11012 | if (err != noErr) |
| 11038 | break; | 11013 | break; |
| 11039 | 11014 | ||
| 11015 | err = GetEventParameter (event, kEventParamKeyModifiers, | ||
| 11016 | typeUInt32, NULL, | ||
| 11017 | sizeof (UInt32), NULL, &modifiers); | ||
| 11018 | if (err != noErr) | ||
| 11019 | break; | ||
| 11020 | |||
| 11040 | do_keystroke ((event_kind == kEventRawKeyDown ? keyDown : autoKey), | 11021 | do_keystroke ((event_kind == kEventRawKeyDown ? keyDown : autoKey), |
| 11041 | char_code, key_code, modifiers, | 11022 | char_code, key_code, modifiers, |
| 11042 | ((unsigned long) | 11023 | ((unsigned long) |
| @@ -12183,7 +12164,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12183 | /* Window will be selected only when it is | 12164 | /* Window will be selected only when it is |
| 12184 | not selected now and last mouse movement | 12165 | not selected now and last mouse movement |
| 12185 | event was not in it. Minibuffer window | 12166 | event was not in it. Minibuffer window |
| 12186 | will be selected iff it is active. */ | 12167 | will be selected only when it is active. */ |
| 12187 | if (WINDOWP (window) | 12168 | if (WINDOWP (window) |
| 12188 | && !EQ (window, last_window) | 12169 | && !EQ (window, last_window) |
| 12189 | && !EQ (window, selected_window)) | 12170 | && !EQ (window, selected_window)) |
| @@ -12218,6 +12199,8 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12218 | case activateEvt: | 12199 | case activateEvt: |
| 12219 | { | 12200 | { |
| 12220 | WindowRef window_ptr = (WindowRef) er.message; | 12201 | WindowRef window_ptr = (WindowRef) er.message; |
| 12202 | OSErr err; | ||
| 12203 | ControlRef root_control; | ||
| 12221 | 12204 | ||
| 12222 | if (window_ptr == tip_window) | 12205 | if (window_ptr == tip_window) |
| 12223 | { | 12206 | { |
| @@ -12235,6 +12218,10 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12235 | /* A window has been activated */ | 12218 | /* A window has been activated */ |
| 12236 | Point mouse_loc; | 12219 | Point mouse_loc; |
| 12237 | 12220 | ||
| 12221 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 12222 | if (err == noErr) | ||
| 12223 | ActivateControl (root_control); | ||
| 12224 | |||
| 12238 | x_detect_focus_change (dpyinfo, &er, &inev); | 12225 | x_detect_focus_change (dpyinfo, &er, &inev); |
| 12239 | 12226 | ||
| 12240 | mouse_loc.h = (er.where.h | 12227 | mouse_loc.h = (er.where.h |
| @@ -12250,6 +12237,10 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12250 | else | 12237 | else |
| 12251 | { | 12238 | { |
| 12252 | /* A window has been deactivated */ | 12239 | /* A window has been deactivated */ |
| 12240 | err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control); | ||
| 12241 | if (err == noErr) | ||
| 12242 | DeactivateControl (root_control); | ||
| 12243 | |||
| 12253 | #ifdef USE_TOOLKIT_SCROLL_BARS | 12244 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 12254 | if (dpyinfo->grabbed && tracked_scroll_bar) | 12245 | if (dpyinfo->grabbed && tracked_scroll_bar) |
| 12255 | { | 12246 | { |
| @@ -12305,13 +12296,29 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12305 | clear_mouse_face (dpyinfo); | 12296 | clear_mouse_face (dpyinfo); |
| 12306 | dpyinfo->mouse_face_hidden = 1; | 12297 | dpyinfo->mouse_face_hidden = 1; |
| 12307 | } | 12298 | } |
| 12299 | |||
| 12300 | { | ||
| 12301 | UInt32 modifiers = er.modifiers, mapped_modifiers; | ||
| 12302 | |||
| 12303 | #ifdef MAC_OSX | ||
| 12304 | GetEventParameter (eventRef, kEventParamKeyModifiers, | ||
| 12305 | typeUInt32, NULL, | ||
| 12306 | sizeof (UInt32), NULL, &modifiers); | ||
| 12307 | #endif | ||
| 12308 | mapped_modifiers = mac_mapped_modifiers (modifiers); | ||
| 12309 | |||
| 12308 | #if TARGET_API_MAC_CARBON | 12310 | #if TARGET_API_MAC_CARBON |
| 12309 | goto OTHER; | 12311 | if (!(mapped_modifiers |
| 12310 | #else | 12312 | & ~(mac_pass_command_to_system ? cmdKey : 0) |
| 12311 | do_keystroke (er.what, er.message & charCodeMask, | 12313 | & ~(mac_pass_control_to_system ? controlKey : 0))) |
| 12312 | (er.message & keyCodeMask) >> 8, | 12314 | goto OTHER; |
| 12313 | er.modifiers, timestamp, &inev); | 12315 | else |
| 12314 | #endif | 12316 | #endif |
| 12317 | if (er.what != keyUp) | ||
| 12318 | do_keystroke (er.what, er.message & charCodeMask, | ||
| 12319 | (er.message & keyCodeMask) >> 8, | ||
| 12320 | modifiers, timestamp, &inev); | ||
| 12321 | } | ||
| 12315 | break; | 12322 | break; |
| 12316 | 12323 | ||
| 12317 | case kHighLevelEvent: | 12324 | case kHighLevelEvent: |
| @@ -12365,7 +12372,6 @@ XTread_socket (sd, expected, hold_quit) | |||
| 12365 | } | 12372 | } |
| 12366 | count++; | 12373 | count++; |
| 12367 | } | 12374 | } |
| 12368 | |||
| 12369 | } | 12375 | } |
| 12370 | 12376 | ||
| 12371 | /* If the focus was just given to an autoraising frame, | 12377 | /* If the focus was just given to an autoraising frame, |
diff --git a/src/macterm.h b/src/macterm.h index 2dc13665f67..8a85e714ab5 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -150,7 +150,7 @@ struct mac_display_info | |||
| 150 | char *mac_id_name; | 150 | char *mac_id_name; |
| 151 | 151 | ||
| 152 | /* The number of fonts actually stored in the font table. | 152 | /* The number of fonts actually stored in the font table. |
| 153 | font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= | 153 | font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= |
| 154 | n_fonts <= font_table_size and font_table[i].name != 0. */ | 154 | n_fonts <= font_table_size and font_table[i].name != 0. */ |
| 155 | int n_fonts; | 155 | int n_fonts; |
| 156 | 156 | ||
diff --git a/src/msdos.c b/src/msdos.c index 795e8744884..c01755b2790 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -3231,7 +3231,7 @@ dos_rawgetc () | |||
| 3231 | `dos_get_modifiers', they might have already released the | 3231 | `dos_get_modifiers', they might have already released the |
| 3232 | Alt key, and Emacs gets just `x', which is BAD. | 3232 | Alt key, and Emacs gets just `x', which is BAD. |
| 3233 | However, for keys with the `Map' property set, the ASCII | 3233 | However, for keys with the `Map' property set, the ASCII |
| 3234 | code returns zero iff Alt is pressed. So, when we DON'T | 3234 | code returns zero only if Alt is pressed. So, when we DON'T |
| 3235 | have to support international_keyboard, we don't have to | 3235 | have to support international_keyboard, we don't have to |
| 3236 | distinguish between the left and right Alt keys, and we | 3236 | distinguish between the left and right Alt keys, and we |
| 3237 | can set the META modifier for any keys with the `Map' | 3237 | can set the META modifier for any keys with the `Map' |
diff --git a/src/print.c b/src/print.c index 9ec615de28f..86fd93a5b30 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -94,8 +94,8 @@ Lisp_Object Vfloat_output_format, Qfloat_output_format; | |||
| 94 | /* Avoid actual stack overflow in print. */ | 94 | /* Avoid actual stack overflow in print. */ |
| 95 | int print_depth; | 95 | int print_depth; |
| 96 | 96 | ||
| 97 | /* Nonzero if inside outputting backquote in old style. */ | 97 | /* Level of nesting inside outputting backquote in new style. */ |
| 98 | int old_backquote_output; | 98 | int new_backquote_output; |
| 99 | 99 | ||
| 100 | /* Detect most circularities to print finite output. */ | 100 | /* Detect most circularities to print finite output. */ |
| 101 | #define PRINT_CIRCLE 200 | 101 | #define PRINT_CIRCLE 200 |
| @@ -1291,7 +1291,7 @@ print (obj, printcharfun, escapeflag) | |||
| 1291 | register Lisp_Object printcharfun; | 1291 | register Lisp_Object printcharfun; |
| 1292 | int escapeflag; | 1292 | int escapeflag; |
| 1293 | { | 1293 | { |
| 1294 | old_backquote_output = 0; | 1294 | new_backquote_output = 0; |
| 1295 | 1295 | ||
| 1296 | /* Reset print_number_index and Vprint_number_table only when | 1296 | /* Reset print_number_index and Vprint_number_table only when |
| 1297 | the variable Vprint_continuous_numbering is nil. Otherwise, | 1297 | the variable Vprint_continuous_numbering is nil. Otherwise, |
| @@ -1849,14 +1849,24 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1849 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | 1849 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); |
| 1850 | } | 1850 | } |
| 1851 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | 1851 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) |
| 1852 | && ! old_backquote_output | 1852 | && ((EQ (XCAR (obj), Qbackquote)))) |
| 1853 | { | ||
| 1854 | print_object (XCAR (obj), printcharfun, 0); | ||
| 1855 | new_backquote_output++; | ||
| 1856 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | ||
| 1857 | new_backquote_output--; | ||
| 1858 | } | ||
| 1859 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | ||
| 1860 | && new_backquote_output | ||
| 1853 | && ((EQ (XCAR (obj), Qbackquote) | 1861 | && ((EQ (XCAR (obj), Qbackquote) |
| 1854 | || EQ (XCAR (obj), Qcomma) | 1862 | || EQ (XCAR (obj), Qcomma) |
| 1855 | || EQ (XCAR (obj), Qcomma_at) | 1863 | || EQ (XCAR (obj), Qcomma_at) |
| 1856 | || EQ (XCAR (obj), Qcomma_dot)))) | 1864 | || EQ (XCAR (obj), Qcomma_dot)))) |
| 1857 | { | 1865 | { |
| 1858 | print_object (XCAR (obj), printcharfun, 0); | 1866 | print_object (XCAR (obj), printcharfun, 0); |
| 1867 | new_backquote_output--; | ||
| 1859 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); | 1868 | print_object (XCAR (XCDR (obj)), printcharfun, escapeflag); |
| 1869 | new_backquote_output++; | ||
| 1860 | } | 1870 | } |
| 1861 | else | 1871 | else |
| 1862 | { | 1872 | { |
| @@ -1876,9 +1886,7 @@ print_object (obj, printcharfun, escapeflag) | |||
| 1876 | print_object (Qbackquote, printcharfun, 0); | 1886 | print_object (Qbackquote, printcharfun, 0); |
| 1877 | PRINTCHAR (' '); | 1887 | PRINTCHAR (' '); |
| 1878 | 1888 | ||
| 1879 | ++old_backquote_output; | ||
| 1880 | print_object (XCAR (XCDR (tem)), printcharfun, 0); | 1889 | print_object (XCAR (XCDR (tem)), printcharfun, 0); |
| 1881 | --old_backquote_output; | ||
| 1882 | PRINTCHAR (')'); | 1890 | PRINTCHAR (')'); |
| 1883 | 1891 | ||
| 1884 | obj = XCDR (obj); | 1892 | obj = XCDR (obj); |
diff --git a/src/process.c b/src/process.c index 6469654be32..9e9ef6d0772 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2779,7 +2779,7 @@ The stopped state is cleared by `continue-process' and set by | |||
| 2779 | 2779 | ||
| 2780 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the | 2780 | :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the |
| 2781 | process filter are multibyte, otherwise they are unibyte. | 2781 | process filter are multibyte, otherwise they are unibyte. |
| 2782 | If this keyword is not specified, the strings are multibyte iff | 2782 | If this keyword is not specified, the strings are multibyte if |
| 2783 | `default-enable-multibyte-characters' is non-nil. | 2783 | `default-enable-multibyte-characters' is non-nil. |
| 2784 | 2784 | ||
| 2785 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. | 2785 | :sentinel SENTINEL -- Install SENTINEL as the process sentinel. |
| @@ -3916,7 +3916,7 @@ it specifies a fractional number of seconds to wait. | |||
| 3916 | If optional fourth arg JUST-THIS-ONE is non-nil, only accept output | 3916 | If optional fourth arg JUST-THIS-ONE is non-nil, only accept output |
| 3917 | from PROCESS, suspending reading output from other processes. | 3917 | from PROCESS, suspending reading output from other processes. |
| 3918 | If JUST-THIS-ONE is an integer, don't run any timers either. | 3918 | If JUST-THIS-ONE is an integer, don't run any timers either. |
| 3919 | Return non-nil iff we received any output before the timeout expired. */) | 3919 | Return non-nil if we received any output before the timeout expired. */) |
| 3920 | (process, seconds, millisec, just_this_one) | 3920 | (process, seconds, millisec, just_this_one) |
| 3921 | register Lisp_Object process, seconds, millisec, just_this_one; | 3921 | register Lisp_Object process, seconds, millisec, just_this_one; |
| 3922 | { | 3922 | { |
| @@ -4248,16 +4248,16 @@ select_wrapper (n, rfd, wfd, xfd, tmo) | |||
| 4248 | (and gobble terminal input into the buffer if any arrives). | 4248 | (and gobble terminal input into the buffer if any arrives). |
| 4249 | 4249 | ||
| 4250 | If WAIT_PROC is specified, wait until something arrives from that | 4250 | If WAIT_PROC is specified, wait until something arrives from that |
| 4251 | process. The return value is true iff we read some input from | 4251 | process. The return value is true if we read some input from |
| 4252 | that process. | 4252 | that process. |
| 4253 | 4253 | ||
| 4254 | If JUST_WAIT_PROC is non-nil, handle only output from WAIT_PROC | 4254 | If JUST_WAIT_PROC is non-nil, handle only output from WAIT_PROC |
| 4255 | (suspending output from other processes). A negative value | 4255 | (suspending output from other processes). A negative value |
| 4256 | means don't run any timers either. | 4256 | means don't run any timers either. |
| 4257 | 4257 | ||
| 4258 | If WAIT_PROC is specified, then the function returns true iff we | 4258 | If WAIT_PROC is specified, then the function returns true if we |
| 4259 | received input from that process before the timeout elapsed. | 4259 | received input from that process before the timeout elapsed. |
| 4260 | Otherwise, return true iff we received input from any process. */ | 4260 | Otherwise, return true if we received input from any process. */ |
| 4261 | 4261 | ||
| 4262 | int | 4262 | int |
| 4263 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | 4263 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, |
| @@ -7262,7 +7262,7 @@ Lisp_Object QCtype; | |||
| 7262 | do_display != 0 means redisplay should be done to show subprocess | 7262 | do_display != 0 means redisplay should be done to show subprocess |
| 7263 | output that arrives. | 7263 | output that arrives. |
| 7264 | 7264 | ||
| 7265 | Return true iff we received input from any process. */ | 7265 | Return true if we received input from any process. */ |
| 7266 | 7266 | ||
| 7267 | int | 7267 | int |
| 7268 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, | 7268 | wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, |
diff --git a/src/process.h b/src/process.h index 79875564766..eaed95fe4b7 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -138,7 +138,7 @@ extern Lisp_Object chan_process[]; | |||
| 138 | /* Alist of elements (NAME . PROCESS). */ | 138 | /* Alist of elements (NAME . PROCESS). */ |
| 139 | extern Lisp_Object Vprocess_alist; | 139 | extern Lisp_Object Vprocess_alist; |
| 140 | 140 | ||
| 141 | /* True iff we are about to fork off a synchronous process or if we | 141 | /* True if we are about to fork off a synchronous process or if we |
| 142 | are waiting for it. */ | 142 | are waiting for it. */ |
| 143 | extern int synch_process_alive; | 143 | extern int synch_process_alive; |
| 144 | 144 | ||
diff --git a/src/regex.c b/src/regex.c index c6d6c36a0bc..0858378c6e4 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -2184,7 +2184,7 @@ re_wctype (str) | |||
| 2184 | else return 0; | 2184 | else return 0; |
| 2185 | } | 2185 | } |
| 2186 | 2186 | ||
| 2187 | /* True iff CH is in the char class CC. */ | 2187 | /* True if CH is in the char class CC. */ |
| 2188 | boolean | 2188 | boolean |
| 2189 | re_iswctype (ch, cc) | 2189 | re_iswctype (ch, cc) |
| 2190 | int ch; | 2190 | int ch; |
diff --git a/src/search.c b/src/search.c index aea0f30141d..edcf315b2cd 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1639,7 +1639,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) | |||
| 1639 | have nontrivial translation are the same aside from the last byte. | 1639 | have nontrivial translation are the same aside from the last byte. |
| 1640 | This makes it possible to translate just the last byte of a | 1640 | This makes it possible to translate just the last byte of a |
| 1641 | character, and do so after just a simple test of the context. | 1641 | character, and do so after just a simple test of the context. |
| 1642 | CHAR_BASE is nonzero iff there is such a non-ASCII character. | 1642 | CHAR_BASE is nonzero if there is such a non-ASCII character. |
| 1643 | 1643 | ||
| 1644 | If that criterion is not satisfied, do not call this function. */ | 1644 | If that criterion is not satisfied, do not call this function. */ |
| 1645 | 1645 | ||
diff --git a/src/systime.h b/src/systime.h index 85c2799f083..8b1b7f56ad6 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -67,7 +67,7 @@ extern time_t timezone; | |||
| 67 | EMACS_SECS (TIME) is an rvalue for the seconds component of TIME. | 67 | EMACS_SECS (TIME) is an rvalue for the seconds component of TIME. |
| 68 | EMACS_SET_SECS (TIME, SECONDS) sets that to SECONDS. | 68 | EMACS_SET_SECS (TIME, SECONDS) sets that to SECONDS. |
| 69 | 69 | ||
| 70 | EMACS_HAS_USECS is defined iff EMACS_TIME has a usecs component. | 70 | EMACS_HAS_USECS is defined if EMACS_TIME has a usecs component. |
| 71 | EMACS_USECS (TIME) is an rvalue for the microseconds component of TIME. | 71 | EMACS_USECS (TIME) is an rvalue for the microseconds component of TIME. |
| 72 | This returns zero if EMACS_TIME doesn't have a microseconds component. | 72 | This returns zero if EMACS_TIME doesn't have a microseconds component. |
| 73 | EMACS_SET_USECS (TIME, MICROSECONDS) sets that to MICROSECONDS. | 73 | EMACS_SET_USECS (TIME, MICROSECONDS) sets that to MICROSECONDS. |
| @@ -83,7 +83,7 @@ extern time_t timezone; | |||
| 83 | 83 | ||
| 84 | EMACS_SUB_TIME (DEST, SRC1, SRC2) subtracts SRC2 from SRC1 and | 84 | EMACS_SUB_TIME (DEST, SRC1, SRC2) subtracts SRC2 from SRC1 and |
| 85 | stores the result in DEST. SRC should not be negative. | 85 | stores the result in DEST. SRC should not be negative. |
| 86 | EMACS_TIME_NEG_P (TIME) is true iff TIME is negative. | 86 | EMACS_TIME_NEG_P (TIME) is true if TIME is negative. |
| 87 | 87 | ||
| 88 | */ | 88 | */ |
| 89 | 89 | ||
diff --git a/src/systty.h b/src/systty.h index 15dd7a4e26c..c89edfc8d93 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -297,7 +297,7 @@ static struct sensemode { | |||
| 297 | written before making the change. | 297 | written before making the change. |
| 298 | Return 0 if all went well, and -1 if anything failed. | 298 | Return 0 if all went well, and -1 if anything failed. |
| 299 | 299 | ||
| 300 | EMACS_TTY_TABS_OK (struct emacs_tty *P) is false iff the kernel | 300 | EMACS_TTY_TABS_OK (struct emacs_tty *P) is false if the kernel |
| 301 | expands tabs to spaces upon output; in that case, there is no | 301 | expands tabs to spaces upon output; in that case, there is no |
| 302 | advantage to using tabs over spaces. */ | 302 | advantage to using tabs over spaces. */ |
| 303 | 303 | ||
diff --git a/src/termhooks.h b/src/termhooks.h index 889c3ab1ab7..eb074608e19 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -201,7 +201,7 @@ extern void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME)); | |||
| 201 | /* Input queue declarations and hooks. */ | 201 | /* Input queue declarations and hooks. */ |
| 202 | 202 | ||
| 203 | /* Expedient hack: only provide the below definitions to files that | 203 | /* Expedient hack: only provide the below definitions to files that |
| 204 | are prepared to handle lispy things. CONSP is defined iff lisp.h | 204 | are prepared to handle lispy things. CONSP is defined if lisp.h |
| 205 | has been included before this file. */ | 205 | has been included before this file. */ |
| 206 | #ifdef CONSP | 206 | #ifdef CONSP |
| 207 | 207 | ||
diff --git a/src/textprop.c b/src/textprop.c index 711ee571af6..8ce5656e5a2 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1633,8 +1633,8 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1633 | The flag `modified' records if changes have been made. | 1633 | The flag `modified' records if changes have been made. |
| 1634 | When object is a buffer, we must call modify_region before changes are | 1634 | When object is a buffer, we must call modify_region before changes are |
| 1635 | made and signal_after_change when we are done. | 1635 | made and signal_after_change when we are done. |
| 1636 | We call modify_region before calling remove_properties iff modified == 0, | 1636 | We call modify_region before calling remove_properties if modified == 0, |
| 1637 | and we call signal_after_change before returning iff modified != 0. */ | 1637 | and we call signal_after_change before returning if modified != 0. */ |
| 1638 | for (;;) | 1638 | for (;;) |
| 1639 | { | 1639 | { |
| 1640 | if (i == 0) | 1640 | if (i == 0) |
diff --git a/src/w32term.c b/src/w32term.c index ddb98070b87..0affbcc72af 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -4836,7 +4836,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4836 | /* Window will be selected only when it is not | 4836 | /* Window will be selected only when it is not |
| 4837 | selected now and last mouse movement event was | 4837 | selected now and last mouse movement event was |
| 4838 | not in it. Minibuffer window will be selected | 4838 | not in it. Minibuffer window will be selected |
| 4839 | iff it is active. */ | 4839 | only when it is active. */ |
| 4840 | if (WINDOWP(window) | 4840 | if (WINDOWP(window) |
| 4841 | && !EQ (window, last_window) | 4841 | && !EQ (window, last_window) |
| 4842 | && !EQ (window, selected_window)) | 4842 | && !EQ (window, selected_window)) |
diff --git a/src/w32term.h b/src/w32term.h index d100cbee222..cea3110ff8f 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -198,7 +198,7 @@ struct w32_display_info | |||
| 198 | char *w32_id_name; | 198 | char *w32_id_name; |
| 199 | 199 | ||
| 200 | /* The number of fonts actually stored in w32_font_table. | 200 | /* The number of fonts actually stored in w32_font_table. |
| 201 | font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= | 201 | font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= |
| 202 | n_fonts <= font_table_size. and font_table[i].name != 0. */ | 202 | n_fonts <= font_table_size. and font_table[i].name != 0. */ |
| 203 | int n_fonts; | 203 | int n_fonts; |
| 204 | 204 | ||
diff --git a/src/window.c b/src/window.c index 06cbf8e5f04..43ea423dd9d 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -557,6 +557,15 @@ use (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */) | |||
| 557 | return make_number (window_box_text_cols (decode_any_window (window))); | 557 | return make_number (window_box_text_cols (decode_any_window (window))); |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0, | ||
| 561 | doc: /* Return t if WINDOW is as wide as its frame. | ||
| 562 | WINDOW defaults to the selected window. */) | ||
| 563 | (window) | ||
| 564 | Lisp_Object window; | ||
| 565 | { | ||
| 566 | return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil; | ||
| 567 | } | ||
| 568 | |||
| 560 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 569 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, |
| 561 | doc: /* Return the number of columns by which WINDOW is scrolled from left margin. | 570 | doc: /* Return the number of columns by which WINDOW is scrolled from left margin. |
| 562 | WINDOW defaults to the selected window. */) | 571 | WINDOW defaults to the selected window. */) |
| @@ -7515,6 +7524,7 @@ The selected frame is the one whose configuration has changed. */); | |||
| 7515 | defsubr (&Swindow_buffer); | 7524 | defsubr (&Swindow_buffer); |
| 7516 | defsubr (&Swindow_height); | 7525 | defsubr (&Swindow_height); |
| 7517 | defsubr (&Swindow_width); | 7526 | defsubr (&Swindow_width); |
| 7527 | defsubr (&Swindow_full_width_p); | ||
| 7518 | defsubr (&Swindow_hscroll); | 7528 | defsubr (&Swindow_hscroll); |
| 7519 | defsubr (&Sset_window_hscroll); | 7529 | defsubr (&Sset_window_hscroll); |
| 7520 | defsubr (&Swindow_redisplay_end_trigger); | 7530 | defsubr (&Swindow_redisplay_end_trigger); |
diff --git a/src/window.h b/src/window.h index 7fc97448757..ea8965392c4 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -777,6 +777,7 @@ extern Lisp_Object window_from_coordinates P_ ((struct frame *, int, int, | |||
| 777 | EXFUN (Fwindow_dedicated_p, 1); | 777 | EXFUN (Fwindow_dedicated_p, 1); |
| 778 | extern int window_height P_ ((Lisp_Object)); | 778 | extern int window_height P_ ((Lisp_Object)); |
| 779 | extern int window_width P_ ((Lisp_Object)); | 779 | extern int window_width P_ ((Lisp_Object)); |
| 780 | EXFUN (Fwindow_full_width_p, 1); | ||
| 780 | extern void set_window_height P_ ((Lisp_Object, int, int)); | 781 | extern void set_window_height P_ ((Lisp_Object, int, int)); |
| 781 | extern void set_window_width P_ ((Lisp_Object, int, int)); | 782 | extern void set_window_width P_ ((Lisp_Object, int, int)); |
| 782 | extern void change_window_heights P_ ((Lisp_Object, int)); | 783 | extern void change_window_heights P_ ((Lisp_Object, int)); |
| @@ -818,7 +819,7 @@ extern int command_loop_level; | |||
| 818 | 819 | ||
| 819 | extern int minibuf_level; | 820 | extern int minibuf_level; |
| 820 | 821 | ||
| 821 | /* true iff we should redraw the mode lines on the next redisplay. */ | 822 | /* true if we should redraw the mode lines on the next redisplay. */ |
| 822 | 823 | ||
| 823 | extern int update_mode_lines; | 824 | extern int update_mode_lines; |
| 824 | 825 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index f18bfc020af..a24dea966cf 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7245,18 +7245,22 @@ move_it_by_lines (it, dvpos, need_y_p) | |||
| 7245 | { | 7245 | { |
| 7246 | struct position pos; | 7246 | struct position pos; |
| 7247 | 7247 | ||
| 7248 | if (!FRAME_WINDOW_P (it->f)) | 7248 | /* The commented-out optimization uses vmotion on terminals. This |
| 7249 | gives bad results, because elements like it->what, on which | ||
| 7250 | callers such as pos_visible_p rely, aren't updated. */ | ||
| 7251 | /* if (!FRAME_WINDOW_P (it->f)) | ||
| 7249 | { | 7252 | { |
| 7250 | struct text_pos textpos; | 7253 | struct text_pos textpos; |
| 7251 | 7254 | ||
| 7252 | /* We can use vmotion on frames without proportional fonts. */ | ||
| 7253 | pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w); | 7255 | pos = *vmotion (IT_CHARPOS (*it), dvpos, it->w); |
| 7254 | SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos); | 7256 | SET_TEXT_POS (textpos, pos.bufpos, pos.bytepos); |
| 7255 | reseat (it, textpos, 1); | 7257 | reseat (it, textpos, 1); |
| 7256 | it->vpos += pos.vpos; | 7258 | it->vpos += pos.vpos; |
| 7257 | it->current_y += pos.vpos; | 7259 | it->current_y += pos.vpos; |
| 7258 | } | 7260 | } |
| 7259 | else if (dvpos == 0) | 7261 | else */ |
| 7262 | |||
| 7263 | if (dvpos == 0) | ||
| 7260 | { | 7264 | { |
| 7261 | /* DVPOS == 0 means move to the start of the screen line. */ | 7265 | /* DVPOS == 0 means move to the start of the screen line. */ |
| 7262 | move_it_vertically_backward (it, 0); | 7266 | move_it_vertically_backward (it, 0); |
| @@ -13669,7 +13673,10 @@ redisplay_window (window, just_this_one_p) | |||
| 13669 | /* Restore current_buffer and value of point in it. */ | 13673 | /* Restore current_buffer and value of point in it. */ |
| 13670 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); | 13674 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); |
| 13671 | set_buffer_internal_1 (old); | 13675 | set_buffer_internal_1 (old); |
| 13672 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | 13676 | /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become |
| 13677 | shorter. This can be caused by log truncation in *Messages*. */ | ||
| 13678 | if (CHARPOS (lpoint) <= ZV) | ||
| 13679 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | ||
| 13673 | 13680 | ||
| 13674 | unbind_to (count, Qnil); | 13681 | unbind_to (count, Qnil); |
| 13675 | } | 13682 | } |
diff --git a/src/xterm.c b/src/xterm.c index 9c1e884c5ad..351f90dac79 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2675,9 +2675,11 @@ x_draw_image_glyph_string (s) | |||
| 2675 | { | 2675 | { |
| 2676 | /* Fill background with a stipple pattern. */ | 2676 | /* Fill background with a stipple pattern. */ |
| 2677 | XSetFillStyle (s->display, s->gc, FillOpaqueStippled); | 2677 | XSetFillStyle (s->display, s->gc, FillOpaqueStippled); |
| 2678 | XSetTSOrigin (s->display, s->gc, - s->x, - s->y); | ||
| 2678 | XFillRectangle (s->display, pixmap, s->gc, | 2679 | XFillRectangle (s->display, pixmap, s->gc, |
| 2679 | 0, 0, s->background_width, s->height); | 2680 | 0, 0, s->background_width, s->height); |
| 2680 | XSetFillStyle (s->display, s->gc, FillSolid); | 2681 | XSetFillStyle (s->display, s->gc, FillSolid); |
| 2682 | XSetTSOrigin (s->display, s->gc, 0, 0); | ||
| 2681 | } | 2683 | } |
| 2682 | else | 2684 | else |
| 2683 | { | 2685 | { |
| @@ -6910,7 +6912,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6910 | 6912 | ||
| 6911 | /* Window will be selected only when it is not selected now and | 6913 | /* Window will be selected only when it is not selected now and |
| 6912 | last mouse movement event was not in it. Minibuffer window | 6914 | last mouse movement event was not in it. Minibuffer window |
| 6913 | will be selected iff it is active. */ | 6915 | will be selected only when it is active. */ |
| 6914 | if (WINDOWP (window) | 6916 | if (WINDOWP (window) |
| 6915 | && !EQ (window, last_window) | 6917 | && !EQ (window, last_window) |
| 6916 | && !EQ (window, selected_window)) | 6918 | && !EQ (window, selected_window)) |
diff --git a/src/xterm.h b/src/xterm.h index a0b4704e13f..0480b0c8053 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -253,7 +253,7 @@ struct x_display_info | |||
| 253 | char *x_id_name; | 253 | char *x_id_name; |
| 254 | 254 | ||
| 255 | /* The number of fonts actually stored in x_font_table. | 255 | /* The number of fonts actually stored in x_font_table. |
| 256 | font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <= | 256 | font_table[n] is used and valid if 0 <= n < n_fonts. 0 <= |
| 257 | n_fonts <= font_table_size and font_table[i].name != 0. */ | 257 | n_fonts <= font_table_size and font_table[i].name != 0. */ |
| 258 | int n_fonts; | 258 | int n_fonts; |
| 259 | 259 | ||