diff options
| author | Karoly Lorentey | 2006-10-14 17:36:28 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-10-14 17:36:28 +0000 |
| commit | 12b6af5c7ed2cfdb9783312bf890cf1e6c80c67a (patch) | |
| tree | 1775f9fd1c92defd8b61304a08ec00da95bc4539 /lisp | |
| parent | 3f87f67ee215ffeecbd2f53bd7f342cdf03f47df (diff) | |
| parent | f763da8d0808af7c80d72bc586bf4fcf50b37ddd (diff) | |
| download | emacs-12b6af5c7ed2cfdb9783312bf890cf1e6c80c67a.tar.gz emacs-12b6af5c7ed2cfdb9783312bf890cf1e6c80c67a.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-413
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-414
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-415
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-416
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-417
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-418
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-419
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-420
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-421
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-422
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-423
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-424
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-425
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-426
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-427
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-428
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-429
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-430
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-431
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-432
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-433
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-434
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-435
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-436
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-437
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-438
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-439
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-440
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-441
lisp/url/url-methods.el: Fix format error when http_proxy is empty string
* emacs@sv.gnu.org/emacs--devo--0--patch-442
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-443
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-444
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-445
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-446
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-447
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-448
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-449
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-450
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-451
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-452
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-453
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-454
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-455
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-456
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-457
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-458
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-459
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-460
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-461
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-462
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-463
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-464
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-465
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-466
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-467
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-468
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-469
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-470
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-471
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-472
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-473
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-128
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-129
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-130
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-131
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-132
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-133
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-134
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-135
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-136
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-137
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-138
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-139
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-140
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-141
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-142
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-143
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-144
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-145
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-146
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-147
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-148
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-149
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-582
Diffstat (limited to 'lisp')
157 files changed, 10236 insertions, 4653 deletions
diff --git a/lisp/COPYING b/lisp/COPYING index 3912109b5cd..d511905c164 100644 --- a/lisp/COPYING +++ b/lisp/COPYING | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | GNU GENERAL PUBLIC LICENSE | 1 | GNU GENERAL PUBLIC LICENSE |
| 2 | Version 2, June 1991 | 2 | Version 2, June 1991 |
| 3 | 3 | ||
| 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., |
| 5 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 6 | Everyone is permitted to copy and distribute verbatim copies | 6 | Everyone is permitted to copy and distribute verbatim copies |
| 7 | of this license document, but changing it is not allowed. | 7 | of this license document, but changing it is not allowed. |
| 8 | 8 | ||
| @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This | |||
| 15 | General Public License applies to most of the Free Software | 15 | General Public License applies to most of the Free Software |
| 16 | Foundation's software and to any other program whose authors commit to | 16 | Foundation's software and to any other program whose authors commit to |
| 17 | using it. (Some other Free Software Foundation software is covered by | 17 | using it. (Some other Free Software Foundation software is covered by |
| 18 | the GNU Library General Public License instead.) You can apply it to | 18 | the GNU Lesser General Public License instead.) You can apply it to |
| 19 | your programs, too. | 19 | your programs, too. |
| 20 | 20 | ||
| 21 | When we speak of free software, we are referring to freedom, not | 21 | When we speak of free software, we are referring to freedom, not |
| @@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. | |||
| 55 | 55 | ||
| 56 | The precise terms and conditions for copying, distribution and | 56 | The precise terms and conditions for copying, distribution and |
| 57 | modification follow. | 57 | modification follow. |
| 58 | 58 | ||
| 59 | GNU GENERAL PUBLIC LICENSE | 59 | GNU GENERAL PUBLIC LICENSE |
| 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 61 | 61 | ||
| @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: | |||
| 110 | License. (Exception: if the Program itself is interactive but | 110 | License. (Exception: if the Program itself is interactive but |
| 111 | does not normally print such an announcement, your work based on | 111 | does not normally print such an announcement, your work based on |
| 112 | the Program is not required to print an announcement.) | 112 | the Program is not required to print an announcement.) |
| 113 | 113 | ||
| 114 | These requirements apply to the modified work as a whole. If | 114 | These requirements apply to the modified work as a whole. If |
| 115 | identifiable sections of that work are not derived from the Program, | 115 | identifiable sections of that work are not derived from the Program, |
| 116 | and can be reasonably considered independent and separate works in | 116 | and can be reasonably considered independent and separate works in |
| @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent | |||
| 168 | access to copy the source code from the same place counts as | 168 | access to copy the source code from the same place counts as |
| 169 | distribution of the source code, even though third parties are not | 169 | distribution of the source code, even though third parties are not |
| 170 | compelled to copy the source along with the object code. | 170 | compelled to copy the source along with the object code. |
| 171 | 171 | ||
| 172 | 4. You may not copy, modify, sublicense, or distribute the Program | 172 | 4. You may not copy, modify, sublicense, or distribute the Program |
| 173 | except as expressly provided under this License. Any attempt | 173 | except as expressly provided under this License. Any attempt |
| 174 | otherwise to copy, modify, sublicense or distribute the Program is | 174 | otherwise to copy, modify, sublicense or distribute the Program is |
| @@ -225,7 +225,7 @@ impose that choice. | |||
| 225 | 225 | ||
| 226 | This section is intended to make thoroughly clear what is believed to | 226 | This section is intended to make thoroughly clear what is believed to |
| 227 | be a consequence of the rest of this License. | 227 | be a consequence of the rest of this License. |
| 228 | 228 | ||
| 229 | 8. If the distribution and/or use of the Program is restricted in | 229 | 8. If the distribution and/or use of the Program is restricted in |
| 230 | certain countries either by patents or by copyrighted interfaces, the | 230 | certain countries either by patents or by copyrighted interfaces, the |
| 231 | original copyright holder who places the Program under this License | 231 | original copyright holder who places the Program under this License |
| @@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | |||
| 278 | POSSIBILITY OF SUCH DAMAGES. | 278 | POSSIBILITY OF SUCH DAMAGES. |
| 279 | 279 | ||
| 280 | END OF TERMS AND CONDITIONS | 280 | END OF TERMS AND CONDITIONS |
| 281 | 281 | ||
| 282 | How to Apply These Terms to Your New Programs | 282 | How to Apply These Terms to Your New Programs |
| 283 | 283 | ||
| 284 | If you develop a new program, and you want it to be of the greatest | 284 | If you develop a new program, and you want it to be of the greatest |
| @@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found. | |||
| 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 304 | GNU General Public License for more details. | 304 | GNU General Public License for more details. |
| 305 | 305 | ||
| 306 | You should have received a copy of the GNU General Public License | 306 | You should have received a copy of the GNU General Public License along |
| 307 | along with this program; if not, write to the Free Software | 307 | with this program; if not, write to the Free Software Foundation, Inc., |
| 308 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 309 | |||
| 310 | 309 | ||
| 311 | Also add information on how to contact you by electronic and paper mail. | 310 | Also add information on how to contact you by electronic and paper mail. |
| 312 | 311 | ||
| @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: | |||
| 336 | This General Public License does not permit incorporating your program into | 335 | This General Public License does not permit incorporating your program into |
| 337 | proprietary programs. If your program is a subroutine library, you may | 336 | proprietary programs. If your program is a subroutine library, you may |
| 338 | consider it more useful to permit linking proprietary applications with the | 337 | consider it more useful to permit linking proprietary applications with the |
| 339 | library. If this is what you want to do, use the GNU Library General | 338 | library. If this is what you want to do, use the GNU Lesser General |
| 340 | Public License instead of this License. | 339 | Public License instead of this License. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 187f2ff3fae..8dd343fc8ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,1755 @@ | |||
| 1 | 2006-10-13 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) | ||
| 2 | |||
| 3 | * apropos.el (apropos-pattern-quoted): Fix a typo in a doc | ||
| 4 | string. | ||
| 5 | |||
| 6 | 2006-10-13 Eli Zaretskii <eliz@gnu.org> | ||
| 7 | |||
| 8 | * subr.el (start-process-shell-command): Doc fix. | ||
| 9 | |||
| 10 | 2006-10-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 11 | |||
| 12 | * vc-hooks.el (vc-ignore-dir-regexp): Make it into a defcustom. | ||
| 13 | (vc-find-root): Don't walk higher up than ~. | ||
| 14 | |||
| 15 | 2006-10-12 Chong Yidong <cyd@stupidchicken.com> | ||
| 16 | |||
| 17 | * international/utf-8.el (utf-translate-cjk-load-tables): | ||
| 18 | Avoid clobbering last-coding-system-used during load. | ||
| 19 | |||
| 20 | 2006-10-12 Carsten Dominik <dominik@science.uva.nl> | ||
| 21 | |||
| 22 | * textmodes/reftex-global.el (reftex-create-tags-file): Quote file | ||
| 23 | arguments. | ||
| 24 | |||
| 25 | 2006-10-12 Andreas Schwab <schwab@suse.de> | ||
| 26 | |||
| 27 | * files.el (auto-mode-alist): Match change log file name also with | ||
| 28 | a dash before a numeric extension. | ||
| 29 | |||
| 30 | 2006-10-11 Ilya Zakharevich <ilyaz@cpan.org> | ||
| 31 | |||
| 32 | * progmodes/cperl-mode.el: Merge from upstream, upto version 5.22. | ||
| 33 | After 5.0: | ||
| 34 | (cperl-add-tags-recurse-noxs-fullpath): New function (for -batch mode). | ||
| 35 | |||
| 36 | After 5.1: Major edit. Summary of most visible changes: | ||
| 37 | |||
| 38 | - Multiple <<HERE per line allowed. | ||
| 39 | - Handles multiline subroutine declaration headers (with comments). | ||
| 40 | (The exception is `cperl-etags' - but it is not used in the rest | ||
| 41 | of the mode.) | ||
| 42 | - Fontifies multiline my/our declarations (even with comments, | ||
| 43 | and with legacy `font-lock'). | ||
| 44 | - Major speedup of syntaxification, both immediate and postponed | ||
| 45 | (3.5x to 15x [for different CPUs and versions of Emacs] on the | ||
| 46 | huge real-life document I tested). | ||
| 47 | - New bindings, edits to imenu. | ||
| 48 | - "_" is made into word-char during fontification/syntaxification; | ||
| 49 | some attempts to recognize non-word "_" during other operations too. | ||
| 50 | - Detect bug in Emacs with `looking-at' inside `narrow' and bulk out. | ||
| 51 | - autoload some more perldoc-related stuff | ||
| 52 | - New convenience features: ISpell POD/HEREDOCs, narrow-to-HEREDOC. | ||
| 53 | - Attempt to incorporate XEmacs edits which reached me. | ||
| 54 | |||
| 55 | Fine-grained changelog: | ||
| 56 | (cperl-hook-after-change): New configuration variable. | ||
| 57 | (cperl-vc-sccs-header): Likewise. | ||
| 58 | (cperl-vc-sccs-header): Likewise. | ||
| 59 | (cperl-vc-header-alist): Default via two preceding variables. | ||
| 60 | (cperl-invalid-face): Remove double quoting under XEmacs | ||
| 61 | (still needed under 21.2). | ||
| 62 | (cperl-tips): Update URLs for resources. | ||
| 63 | (cperl-problems): Likewise. | ||
| 64 | (cperl-praise): Mention new features. | ||
| 65 | New C-c key bindings: for `cperl-find-bad-style', | ||
| 66 | `cperl-pod-spell', `cperl-here-doc-spell', `cperl-narrow-to-here-doc', | ||
| 67 | `cperl-perdoc', and `cperl-perldoc-at-point'. | ||
| 68 | CPerl Mode menu changes: "Fix style by spaces", "Imenu on Perl Info" | ||
| 69 | moved, new submenu of Tools with Ispell entries and narrowing. | ||
| 70 | (cperl-after-sub-regexp): New defsubst. | ||
| 71 | (cperl-imenu--function-name-regexp-perl): Use `cperl-after-sub-regexp'. | ||
| 72 | Allows heads up to head4. | ||
| 73 | Allow "package;". | ||
| 74 | (defun-prompt-regexp): Use `cperl-after-sub-regexp'. | ||
| 75 | (paren-backwards-message): ??? Something for XEmacs??? | ||
| 76 | (cperl-mode): Never auto-switch abbrev-mode off. | ||
| 77 | Try to allow '_' be non-word char. | ||
| 78 | Do not use `font-lock-unfontify-region-function' on XEmacs. | ||
| 79 | Reset syntax cache on mode start. | ||
| 80 | Support multiline facification (even on legacy `font-lock'). | ||
| 81 | (cperl-facemenu-add-face-function): ??? Some contributed code ??? | ||
| 82 | (cperl-after-change-function): Since `font-lock' and `lazy-lock' | ||
| 83 | refuse to inform us whether the fontification is due to lazy | ||
| 84 | calling or due to edit to a buffer, install our own hook | ||
| 85 | (controlled by `cperl-hook-after-change'). | ||
| 86 | (cperl-electric-pod): =cut may have been recognized as start. | ||
| 87 | (cperl-block-p): Move, updatedfor attributes. | ||
| 88 | (cperl-calculate-indent): Try to allow '_' be non-word char | ||
| 89 | Support subs with attributes. | ||
| 90 | (cperl-where-am-i): Queit (?) a warning. | ||
| 91 | (cperl-cached-syntax-table) New function. | ||
| 92 | (cperl-forward-re): Use `cperl-cached-syntax-table'. | ||
| 93 | (cperl-unwind-to-safe): Recognize `syntax-type' property | ||
| 94 | changing in a middle of line. | ||
| 95 | (cperl-find-sub-attrs): New function. | ||
| 96 | (cperl-find-pods-heres): Allow many <<EOP per line. | ||
| 97 | Allow subs with attributes. | ||
| 98 | Major speedups (3.5x..15x on a real-life test file nph-proxy.pl). | ||
| 99 | Recognize "extproc " (OS/2) case-folded and only at start. | ||
| 100 | /x on s///x with empty replacement was not recognized. | ||
| 101 | Better comments. | ||
| 102 | (cperl-after-block-p): Remarks on diff with `cperl-block-p'. | ||
| 103 | Allow subs with attributes, labels. | ||
| 104 | Do not confuse "else::foo" with "else". | ||
| 105 | Minor optimizations... | ||
| 106 | (cperl-after-expr-p): Try to allow '_' be non-word char. | ||
| 107 | (cperl-fill-paragraph): Try to detect a major bug in Emacs | ||
| 108 | with `looking-at' inside `narrow' and bulk out if found. | ||
| 109 | (cperl-imenu--create-perl-index): Updates for new | ||
| 110 | `cperl-imenu--function-name-regexp-perl'. | ||
| 111 | (cperl-outline-level): Likewise. | ||
| 112 | (cperl-init-faces): Allow multiline subroutine headers | ||
| 113 | and my/our declarations, and ones with comments. | ||
| 114 | Allow subroutine attributes. | ||
| 115 | (cperl-imenu-on-info): Better docstring. | ||
| 116 | (cperl-etags): Rudimentary support for attributes. | ||
| 117 | Support for packages and "package;". | ||
| 118 | (cperl-add-tags-recurse-noxs): Better (?) docstring. | ||
| 119 | (cperl-add-tags-recurse-noxs-fullpath): Likewise. | ||
| 120 | (cperl-tags-hier-init): Misprint for `fboundp' fixed. | ||
| 121 | (cperl-not-bad-style-regexp): Try to allow '_' be non-word char. | ||
| 122 | (cperl-perldoc): Add autoload. | ||
| 123 | (cperl-perldoc-at-point): Likewise. | ||
| 124 | (cperl-here-doc-spell): New function. | ||
| 125 | (cperl-pod-spell): Likewise. | ||
| 126 | (cperl-map-pods-heres): Likewise. | ||
| 127 | (cperl-get-here-doc-region): Likewise. | ||
| 128 | (cperl-font-lock-fontify-region-function): Likewise (backward | ||
| 129 | compatibility for legacy `font-lock'). | ||
| 130 | (cperl-font-lock-unfontify-region-function): Fix style. | ||
| 131 | (cperl-fontify-syntaxically): Recognize and optimize away deferred | ||
| 132 | calls with no-change. Governed by `cperl-hook-after-change'. | ||
| 133 | (cperl-fontify-update): Recognize that syntaxification region | ||
| 134 | can be larger than fontification one. | ||
| 135 | XXXX we leave `cperl-postpone' property, so this is quadratic... | ||
| 136 | (cperl-fontify-update-bad): Temporary placeholder until | ||
| 137 | it is clear how to implement `cperl-fontify-update'. | ||
| 138 | (cperl-time-fontification): New function. | ||
| 139 | (attrib-group): New text attribute. | ||
| 140 | (multiline): New value: `syntax-type' text attribute. | ||
| 141 | |||
| 142 | After 5.2: | ||
| 143 | (cperl-emulate-lazy-lock): New function. | ||
| 144 | (cperl-fontify-syntaxically): Would skip large regions. | ||
| 145 | Add `cperl-time-fontification', `cperl-emulate-lazy-lock' to menu. | ||
| 146 | Some globals were declared, but uninitialized. | ||
| 147 | |||
| 148 | After 5.3, 5.4: | ||
| 149 | (cperl-facemenu-add-face-function): Add docs, fix U<>. | ||
| 150 | Copyright message updated. | ||
| 151 | (cperl-init-faces): Work around a bug in `font-lock'. May slow | ||
| 152 | facification down a bit. | ||
| 153 | Misprint for my|our|local for old `font-lock' | ||
| 154 | "our" was not fontified same as "my|local". | ||
| 155 | Highlight variables after "my" etc even in | ||
| 156 | a middle of an expression. | ||
| 157 | Do not facify multiple variables after my etc | ||
| 158 | unless parentheses are present. | ||
| 159 | |||
| 160 | After 5.5, 5.6 | ||
| 161 | (cperl-fontify-syntaxically): after-change hook could reset. | ||
| 162 | (cperl-syntax-done-to) to a middle of line; unwind to BOL. | ||
| 163 | |||
| 164 | After 5.7: | ||
| 165 | (cperl-init-faces): Allow highlighting of local ($/). | ||
| 166 | (cperl-problems-old-emaxen): New variable (for the use of DOCSTRING). | ||
| 167 | (cperl-problems): Remove fixed problems. | ||
| 168 | (cperl-find-pods-heres): Recognize #-comments in m##x too. | ||
| 169 | Recognize charclasses (unless delimiter is \). | ||
| 170 | (cperl-fontify-syntaxically): Unwinding to safe was done in wrong order. | ||
| 171 | (cperl-regexp-scan): Update docs. | ||
| 172 | (cperl-beautify-regexp-piece): Use information got from regexp scan. | ||
| 173 | |||
| 174 | After 5.8: | ||
| 175 | Major user visible changes: | ||
| 176 | Recognition and fontification of character classes in RExen. | ||
| 177 | Variable indentation of RExen according to groups. | ||
| 178 | |||
| 179 | (cperl-find-pods-heres): Recognize POSIX classes in REx charclasses. | ||
| 180 | Fontify REx charclasses in variable-name face. | ||
| 181 | Fontify POSIX charclasses in "type" face. | ||
| 182 | Fontify unmatched "]" in function-name face. | ||
| 183 | Mark first-char of HERE-doc as `front-sticky'. | ||
| 184 | Reset `front-sticky' property when needed. | ||
| 185 | (cperl-calculate-indent): Indents //x -RExen accordning to parens level. | ||
| 186 | (cperl-to-comment-or-eol): Recognize ends of `syntax-type' constructs. | ||
| 187 | (cperl-backward-to-noncomment): Recognize stringy `syntax-type' | ||
| 188 | constructs. Support `narrow'ed buffers. | ||
| 189 | (cperl-praise): Remove a reservation. | ||
| 190 | (cperl-make-indent): New function. | ||
| 191 | (cperl-indent-for-comment): Use `cperl-make-indent'. | ||
| 192 | (cperl-indent-line): Likewise. | ||
| 193 | (cperl-lineup): Likewise. | ||
| 194 | (cperl-beautify-regexp-piece): Likewise. | ||
| 195 | (cperl-contract-level): Likewise. | ||
| 196 | (cperl-toggle-set-debug-unwind): New function. | ||
| 197 | New menu entry for this. | ||
| 198 | (fill-paragraph-function): Use when `boundp'. | ||
| 199 | (cperl-calculate-indent): Take into account groups when indenting RExen. | ||
| 200 | (cperl-to-comment-or-eol): Recognize # which end a string. | ||
| 201 | (cperl-modify-syntax-type): Make only syntax-table property non-sticky. | ||
| 202 | (cperl-fill-paragraph): Return t: needed for `fill-paragraph-function'. | ||
| 203 | (cperl-fontify-syntaxically): More clear debugging message. | ||
| 204 | (cperl-pod2man-build-command): Check (XEmacs) `Man-filter-list'. | ||
| 205 | (cperl-init-faces): More complicated highlight even on XEmacs (new). | ||
| 206 | Merge cosmetic changes from XEmacs. | ||
| 207 | |||
| 208 | After 5.9: | ||
| 209 | (cperl-1+): Move to before the first use. | ||
| 210 | (cperl-1-): Likewise. | ||
| 211 | |||
| 212 | After 5.10: | ||
| 213 | |||
| 214 | This code may lock Emacs hard!!! Use on your own risk! | ||
| 215 | |||
| 216 | (cperl-font-locking): New internal variable. | ||
| 217 | (cperl-beginning-of-property): New function. | ||
| 218 | (cperl-calculate-indent): Use `cperl-beginning-of-property' | ||
| 219 | instead of `previous-single-property-change'. | ||
| 220 | (cperl-unwind-to-safe): Likewise. | ||
| 221 | (cperl-after-expr-p): Likewise. | ||
| 222 | (cperl-get-here-doc-region): Likewise. | ||
| 223 | (cperl-font-lock-fontify-region-function): Likewise. | ||
| 224 | (cperl-to-comment-or-eol): Do not call `cperl-update-syntaxification' | ||
| 225 | recursively. | ||
| 226 | Bound `next-single-property-change' via `point-max'. | ||
| 227 | (cperl-unwind-to-safe): Bound likewise | ||
| 228 | (cperl-font-lock-fontify-region-function): Likewise | ||
| 229 | (cperl-find-pods-heres): Mark as recursive for `cperl-to-comment-or-eol' | ||
| 230 | Initialization of `cperl-font-lock-multiline-start' could be | ||
| 231 | missed if the "main" fontification did not run due to the | ||
| 232 | keyword being already fontified. | ||
| 233 | (cperl-pod-spell): Return t from do-one-chunk function. | ||
| 234 | (cperl-map-pods-heres): Stop when the worker returns nil. | ||
| 235 | Call `cperl-update-syntaxification'. | ||
| 236 | (cperl-get-here-doc-region): Call `cperl-update-syntaxification'. | ||
| 237 | (cperl-get-here-doc-delim): Remove unused function. | ||
| 238 | |||
| 239 | After 5.11: | ||
| 240 | |||
| 241 | The possible lockup of Emacs (introduced in 5.10) fixed. | ||
| 242 | |||
| 243 | (cperl-unwind-to-safe): `cperl-beginning-of-property' won't return nil. | ||
| 244 | (cperl-syntaxify-for-menu): New customization variable. | ||
| 245 | (cperl-select-this-pod-or-here-doc): New function. | ||
| 246 | (cperl-get-here-doc-region): Extra argument. | ||
| 247 | Do not adjust pos by 1. | ||
| 248 | |||
| 249 | New menu entries | ||
| 250 | (Perl/Tools): Selection of current POD or HERE-DOC section. | ||
| 251 | (Debugging CPerl:) backtrace on fontification. | ||
| 252 | |||
| 253 | After 5.12: | ||
| 254 | (cperl-cached-syntax-table): Use `car-safe'. | ||
| 255 | (cperl-forward-re): Remove spurious argument SET-ST. | ||
| 256 | Add documentation. | ||
| 257 | (cperl-forward-group-in-re): New function. | ||
| 258 | (cperl-find-pods-heres): Find and highlight (?{}) blocks in RExen | ||
| 259 | (XXXX Temporary (?) hack is to syntax-mark them as comment). | ||
| 260 | |||
| 261 | After 5.13: | ||
| 262 | (cperl-string-syntax-table): Make { and } not-grouping | ||
| 263 | (Sometimes they ARE grouping in RExen, but matching them would only | ||
| 264 | confuse in many situations when they are not) | ||
| 265 | (beginning-of-buffer): Replace two occurences with goto-char... | ||
| 266 | (cperl-calculate-indent): `char-after' could be nil... | ||
| 267 | (cperl-find-pods-heres): REx can start after "[" too. | ||
| 268 | Hightlight (??{}) in RExen too. | ||
| 269 | (cperl-maybe-white-and-comment-rex): New constant | ||
| 270 | (cperl-white-and-comment-rex): Likewise. | ||
| 271 | XXXX Not very efficient, but hard to make | ||
| 272 | better while keeping 1 group. | ||
| 273 | |||
| 274 | After 5.13: | ||
| 275 | (cperl-find-pods-heres): $foo << identifier() is not a HERE-DOC. | ||
| 276 | Likewise for 1 << identifier. | ||
| 277 | |||
| 278 | After 5.14: | ||
| 279 | (cperl-find-pods-heres): Different logic for $foo .= <<EOF etc. | ||
| 280 | Error-less condition-case could fail. | ||
| 281 | (cperl-font-lock-fontify-region-function): Likewise. | ||
| 282 | (cperl-init-faces): Likewise. | ||
| 283 | |||
| 284 | After 5.15: | ||
| 285 | (cperl-find-pods-heres): Support property REx-part2. | ||
| 286 | (cperl-calculate-indent): Likewise. | ||
| 287 | Don't special-case REx with non-empty 1st line. | ||
| 288 | (cperl-find-pods-heres): In RExen, highlight non-literal backslashes. | ||
| 289 | Invert highlighting of charclasses: | ||
| 290 | now the envelop is highlighted. | ||
| 291 | Highlight many others 0-length builtins. | ||
| 292 | (cperl-praise): Mention indenting and highlight in RExen. | ||
| 293 | |||
| 294 | After 5.15: | ||
| 295 | (cperl-find-pods-heres): Highlight capturing parens in REx. | ||
| 296 | |||
| 297 | After 5.16: | ||
| 298 | (cperl-find-pods-heres): Highlight '|' for alternation | ||
| 299 | Initialize `font-lock-warning-face' if not present. | ||
| 300 | (cperl-find-pods-heres): Use `font-lock-warning-face' instead of | ||
| 301 | `font-lock-function-name-face'. | ||
| 302 | (cperl-look-at-leading-count): Likewise. | ||
| 303 | (cperl-find-pods-heres): Localize `font-lock-variable-name-face', | ||
| 304 | `font-lock-keyword-face' (needed for | ||
| 305 | batch processing), etc... | ||
| 306 | Use `font-lock-builtin-face' for builtin in REx | ||
| 307 | Now `font-lock-variable-name-face' | ||
| 308 | is used for interpolated variables | ||
| 309 | Use "talking aliases" for faces inside REx | ||
| 310 | Highlight parts of REx (except in charclasses) | ||
| 311 | according to the syntax and/or semantic | ||
| 312 | Syntax-mark a {}-part of (?{}) as "comment" | ||
| 313 | (it was the ()-part) | ||
| 314 | Better logic to distinguish what is what in REx | ||
| 315 | (cperl-tips-faces): Document REx highlighting | ||
| 316 | (cperl-praise): Mention REx syntax highlight etc. | ||
| 317 | |||
| 318 | After 5.17: | ||
| 319 | (cperl-find-sub-attrs): Would not always manage to print error message. | ||
| 320 | (cperl-find-pods-heres): Localize `font-lock-constant-face'. | ||
| 321 | |||
| 322 | After 5.18: | ||
| 323 | (cperl-find-pods-heres): Misprint in REx for parsing REx. | ||
| 324 | Very minor optimization. | ||
| 325 | `my-cperl-REx-modifiers-face' got quoted. | ||
| 326 | Recognize "print $foo <<END" as HERE-doc. | ||
| 327 | Put `REx-interpolated' text attribute if needed. | ||
| 328 | (cperl-invert-if-unless-modifiers): New function. | ||
| 329 | (cperl-backward-to-start-of-expr): Likewise. | ||
| 330 | (cperl-forward-to-end-of-expr): Likewise. | ||
| 331 | (cperl-invert-if-unless): Works in "the opposite way" too. | ||
| 332 | Cursor position on return is on the switch-word. | ||
| 333 | Indents comments better. | ||
| 334 | (REx-interpolated): New text attribute. | ||
| 335 | (cperl-next-interpolated-REx): New function. | ||
| 336 | (cperl-next-interpolated-REx-0): Likewise. | ||
| 337 | (cperl-next-interpolated-REx-1): Likewise. | ||
| 338 | "\C-c\C-x", "\C-c\C-y", "\C-c\C-v": New keybinding for these functions. | ||
| 339 | Perl/Regexp menu: 3 new entries for `cperl-next-interpolated-REx'. | ||
| 340 | (cperl-praise): Mention finded interpolated RExen. | ||
| 341 | |||
| 342 | After 5.19: | ||
| 343 | (cperl-init-faces): Highlight %$foo, @$foo too. | ||
| 344 | (cperl-short-docs): Better docs for system, exec. | ||
| 345 | (cperl-find-pods-heres): Better detect << after print {FH} <<EOF etc. | ||
| 346 | Would not find HERE-doc ended by EOF without NL. | ||
| 347 | (cperl-short-docs): Correct not-doubled \-escapes. | ||
| 348 | start block: Put some `defvar' for stuff gone from XEmacs. | ||
| 349 | |||
| 350 | After 5.20: | ||
| 351 | initial comment: Extend copyright, fix email address. | ||
| 352 | (cperl-indent-comment-at-column-0): New customization variable. | ||
| 353 | (cperl-comment-indent): Indentation after $#a would increasy by 1. | ||
| 354 | (cperl-mode): Make `defun-prompt-regexp' grok BEGIN/END etc. | ||
| 355 | (cperl-find-pods-heres): Mark CODE of s///e as `syntax-type' `multiline' | ||
| 356 | (cperl-at-end-of-expr): Would fail if @BAR=12 follows after ";". | ||
| 357 | (cperl-init-faces): If `cperl-highlight-variables-indiscriminately' | ||
| 358 | highlight $ in $foo too (UNTESTED). | ||
| 359 | (cperl-set-style): Docstring missed some available styles. | ||
| 360 | toplevel: Menubar/Perl/Indent-Styles had FSF, now K&R. | ||
| 361 | Change "Current" to "Memorize Current". | ||
| 362 | (cperl-indent-wrt-brace): New customization variable; the default is | ||
| 363 | as for pre-5.2 version. | ||
| 364 | (cperl-styles-entries): Keep `cperl-extra-newline-before-brace-multiline'. | ||
| 365 | (cperl-style-alist): Likewise. | ||
| 366 | (cperl-fix-line-spacing): Support `cperl-merge-trailing-else' being nil, | ||
| 367 | and `cperl-extra-newline-before-brace' etc | ||
| 368 | being t | ||
| 369 | (cperl-indent-exp): Plans B and C to find continuation blocks even | ||
| 370 | if `cperl-extra-newline-before-brace' is t. | ||
| 371 | |||
| 372 | After 5.21: | ||
| 373 | Improve some docstrings concerning indentation. | ||
| 374 | (cperl-indent-rules-alist): New variable. | ||
| 375 | (cperl-sniff-for-indent): New function name | ||
| 376 | (separated from `cperl-calculate-indent'). | ||
| 377 | (cperl-calculate-indent): Separate the sniffer and the indenter; | ||
| 378 | uses `cperl-sniff-for-indent' now. | ||
| 379 | (cperl-comment-indent): Test for `cperl-indent-comment-at-column-0' | ||
| 380 | was inverted; | ||
| 381 | Support `comment-column' = 0. | ||
| 382 | |||
| 383 | 2006-10-11 Martin Rudalics <rudalics@gmx.at> | ||
| 384 | |||
| 385 | * dnd.el (dnd-handle-one-url): Fix typo in doc-string. | ||
| 386 | * help-at-pt.el (scan-buf-move-to-region): Likewise. | ||
| 387 | * longlines.el (longlines-window-change-function): Likewise. | ||
| 388 | * simple.el (undo-ask-before-discard): Likewise. | ||
| 389 | * wid-edit.el (widget-field-prompt-internal) | ||
| 390 | (widget-documentation-link-p): Likewise. | ||
| 391 | |||
| 392 | 2006-10-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 393 | |||
| 394 | * progmodes/sh-script.el (sh-get-kw): | is not among the allowed chars | ||
| 395 | for a keyword. | ||
| 396 | |||
| 397 | 2006-10-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 398 | |||
| 399 | * newcomment.el (comment-valid-prefix-p): Make the check | ||
| 400 | more thorough. From an idea by Martin Rudalics <rudalics@gmx.at>. | ||
| 401 | (comment-indent-new-line): Adjust call. | ||
| 402 | |||
| 403 | 2006-10-09 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 404 | |||
| 405 | * allout.el (allout-back-to-current-heading): Base on lower-level | ||
| 406 | routines to get proper disqualification of aberrant topics. | ||
| 407 | |||
| 408 | 2006-10-09 Richard Stallman <rms@gnu.org> | ||
| 409 | |||
| 410 | * textmodes/two-column.el (2C-two-columns): Doc fix. | ||
| 411 | |||
| 412 | 2006-10-09 Kim F. Storm <storm@cua.dk> | ||
| 413 | |||
| 414 | * shell.el (explicit-csh-args, explicit-bash-args): Add comment | ||
| 415 | about implicit use. | ||
| 416 | |||
| 417 | 2006-10-08 Richard Stallman <rms@gnu.org> | ||
| 418 | |||
| 419 | * textmodes/two-column.el (2C-two-columns): Doc fix. | ||
| 420 | |||
| 421 | 2006-10-08 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 422 | |||
| 423 | * files.el: Mark `buffer-read-only' as safe-local-variable. | ||
| 424 | |||
| 425 | 2006-10-08 Nick Roberts <nickrob@snap.net.nz> | ||
| 426 | |||
| 427 | * progmodes/gdb-ui.el (gdb-speedbar-expand-node): Burp if | ||
| 428 | GUD buffer has been killed. | ||
| 429 | |||
| 430 | 2006-10-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 431 | |||
| 432 | * completion.el (add-completions-from-c-buffer): | ||
| 433 | Don't presume an error's second element is a string. | ||
| 434 | Use looking-at rather than buffer-substring + member. | ||
| 435 | |||
| 436 | 2006-10-07 Eli Zaretskii <eliz@gnu.org> | ||
| 437 | |||
| 438 | * mail/rmail.el (rmail-redecode-body): If the old encoding is | ||
| 439 | `undecided', call find-coding-systems-region to find a proper | ||
| 440 | non-trivial encoding. | ||
| 441 | (rmail-mime-charset-pattern): Allow a TAB between "Content-Type" | ||
| 442 | and "text/plain". | ||
| 443 | |||
| 444 | 2006-10-07 Kevin Ryde <user42@zip.com.au> | ||
| 445 | |||
| 446 | * textmodes/reftex-vars.el (defgroup reftex): Update home page | ||
| 447 | url-link. | ||
| 448 | |||
| 449 | * strokes.el (defgroup strokes): Remove invalid url-link. | ||
| 450 | |||
| 451 | 2006-10-07 Magnus Henoch <mange@freemail.hu> | ||
| 452 | |||
| 453 | * autoinsert.el (auto-insert-alist): Doc fix. | ||
| 454 | |||
| 455 | 2006-10-07 Johan Bockg,be(Brd <bojohan@dd.chalmers.se> | ||
| 456 | |||
| 457 | * mouse-sel.el (mouse-insert-selection-internal): | ||
| 458 | Use insert-for-yank, so that yank handlers are run. | ||
| 459 | |||
| 460 | 2006-10-07 Kim F. Storm <storm@cua.dk> | ||
| 461 | |||
| 462 | * ido.el (ido-file-extension-aux): Fix comparison. | ||
| 463 | |||
| 464 | 2006-10-06 Kim F. Storm <storm@cua.dk> | ||
| 465 | |||
| 466 | * ido.el (ido-wide-find-dirs-or-files): Use shell-quote-argument. | ||
| 467 | |||
| 468 | 2006-10-05 Juanma Barranquero <lekktu@gmail.com> | ||
| 469 | |||
| 470 | * emacs-lisp/advice.el (ad-remove-advice, ad-parse-arglist) | ||
| 471 | (ad-make-mapped-call): Use `let', not `let*'. | ||
| 472 | |||
| 473 | 2006-10-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 474 | |||
| 475 | * international/mule-cmds.el (coding-system-change-eol-conversion): | ||
| 476 | Ensure the coding system is initialized before calling | ||
| 477 | coding-system-eol-type. | ||
| 478 | |||
| 479 | 2006-10-04 Carsten Dominik <dominik@science.uva.nl> | ||
| 480 | |||
| 481 | * textmodes/org.el (org-rm-props, org-activate-plain-links) | ||
| 482 | (org-activate-angle-links, org-activate-dates) | ||
| 483 | (org-activate-target-links, org-activate-camels) | ||
| 484 | (org-activate-tags): Add `rear-nonsticky' text property to avoid | ||
| 485 | textproperty keymaps from being active beyond the end of a line. | ||
| 486 | (org-unfontify-region): Also remove `rear-nonsticky' property. | ||
| 487 | |||
| 488 | 2006-10-04 Kenichi Handa <handa@m17n.org> | ||
| 489 | |||
| 490 | * international/code-pages.el (next): Table fixed. | ||
| 491 | |||
| 492 | 2006-10-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 493 | |||
| 494 | * progmodes/sh-script.el (sh-prev-thing): Remove (forward-char 1) now | ||
| 495 | that it's been made unnecessary by removing narrowing. | ||
| 496 | |||
| 497 | 2006-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 498 | |||
| 499 | * progmodes/sh-script.el (sh-prev-thing): Massage to untangle the | ||
| 500 | control flow a bit, simplify another bit, and add comments. | ||
| 501 | |||
| 502 | 2006-10-03 David Kastrup <dak@gnu.org> | ||
| 503 | |||
| 504 | * help.el (describe-mode): For clicks on mode-line, use "@" | ||
| 505 | interactive argument to get the major mode of the click instead of | ||
| 506 | the current buffer. | ||
| 507 | |||
| 508 | * isearch.el (isearch-mouse-2): Use new semantics of `key-binding' | ||
| 509 | in order to better redirect mouse-2 clicks. Also allow default | ||
| 510 | bindings to apply. | ||
| 511 | |||
| 512 | 2006-10-03 Kim F. Storm <storm@cua.dk> | ||
| 513 | |||
| 514 | * emacs-lisp/cl.el (pushnew-internal): Remove defvar. | ||
| 515 | (pushnew): Fix last change. | ||
| 516 | |||
| 517 | 2006-10-03 Denis St,A|(Bnkel <dstuenkel@googlemail.com> (tiny change) | ||
| 518 | |||
| 519 | * ibuf-ext.el (eval, view-and-eval) <define-ibuffer-op>: | ||
| 520 | Use the interactive spec of `eval-expression'. | ||
| 521 | |||
| 522 | 2006-10-02 Michael Welsh Duggan <md5i@cs.cmu.edu> | ||
| 523 | |||
| 524 | * progmodes/sh-script.el (sh-prev-thing): Fix last change. | ||
| 525 | |||
| 526 | 2006-10-02 MIYOSHI Masanori <miyoshi@meadowy.org> (tiny change) | ||
| 527 | |||
| 528 | * mail/smtpmail.el (smtpmail-try-auth-methods): Fix typo in | ||
| 529 | 2006-09-28 commit. | ||
| 530 | |||
| 531 | 2006-10-02 Kenichi Handa <handa@m17n.org> | ||
| 532 | |||
| 533 | * international/code-pages.el (iso-8859-6): Table fixed. | ||
| 534 | |||
| 535 | 2006-10-01 Chris Moore <christopher.ian.moore@gmail.com> (tiny change) | ||
| 536 | |||
| 537 | * dired.el (dired-build-subdir-alist): Fix previous change. | ||
| 538 | |||
| 539 | 2006-10-01 Johan Bockg,Ae(Brd <bojohan+mail@dd.chalmers.se> | ||
| 540 | |||
| 541 | * simple.el (undo-elt-crosses-region): Fix the inequalities. | ||
| 542 | |||
| 543 | 2006-10-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 544 | |||
| 545 | * emacs-lisp/find-func.el (find-function-regexp): Don't match | ||
| 546 | "define-button-type". | ||
| 547 | |||
| 548 | * pcvs.el (cvs-update-header): Fix handling of extra newlines so that | ||
| 549 | they don't keep accumulating. | ||
| 550 | |||
| 551 | 2006-10-01 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> (tiny change) | ||
| 552 | |||
| 553 | * ffap.el (ffap-rfc-path): Change the address of the RFC | ||
| 554 | repository to ftp.rfc-editor.org, as ds.internic.net seems to be gone. | ||
| 555 | |||
| 556 | 2006-10-01 Stephen Berman <Stephen.Berman@gmx.net> | ||
| 557 | |||
| 558 | * allout.el (allout-expose-topic): Rectify implementation of "+" | ||
| 559 | spec, so that bodies are not exposed with headlines. | ||
| 560 | |||
| 561 | 2006-10-01 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 562 | |||
| 563 | * allout.el (allout-current-depth): Do aberrent check only at or | ||
| 564 | below doublecheck depth. | ||
| 565 | (allout-chart-subtree): Make it explicit that LEVELS being nil | ||
| 566 | means unlimited depth. Drop undocumented support for LEVELS value | ||
| 567 | t meaning unlimited depth. (This is consistent with | ||
| 568 | allout-chart-to-reveal, but contrary to allout-show-children, | ||
| 569 | which needs to use nil to default to depth of 1.) | ||
| 570 | (allout-goto-prefix-doublechecked): Wrap long docstring line. | ||
| 571 | (allout-chart-to-reveal): Be explicit in docstring about meaning | ||
| 572 | of nil LEVELS, and drop support for LEVELS value t. | ||
| 573 | (allout-show-children): Translate the level spec used by this | ||
| 574 | routine to that used by allout-chart-subtree and | ||
| 575 | allout-chart-to-reveal. | ||
| 576 | (allout-show-to-offshoot): Retry once when stuck, after opening | ||
| 577 | subtree - improvements in discontinuity handling likely will | ||
| 578 | enable progress. | ||
| 579 | |||
| 580 | 2006-09-30 Chong Yidong <cyd@stupidchicken.com> | ||
| 581 | |||
| 582 | * wid-edit.el (widget-button-click-moves-point): New variable. | ||
| 583 | (widget-button-click): If widget-button-click-moves-point is | ||
| 584 | non-nil, set point after performing the button action | ||
| 585 | |||
| 586 | * cus-edit.el (custom-mode): Set widget-button-click-moves-point. | ||
| 587 | |||
| 588 | 2006-09-30 Martin Rudalics <rudalics@gmx.at> | ||
| 589 | |||
| 590 | * files.el (find-file-existing): Modify to not allow wildcards. | ||
| 591 | |||
| 592 | 2006-09-30 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> | ||
| 593 | |||
| 594 | * simple.el (undo-more): When undo information for the region is | ||
| 595 | exhausted, say "No further undo information FOR REGION". | ||
| 596 | |||
| 597 | 2006-09-30 Michael Welsh Duggan <md5i@cs.cmu.edu> | ||
| 598 | |||
| 599 | * progmodes/sh-script.el (sh-prev-thing): | ||
| 600 | Take `sh-leading-keywords' into account. | ||
| 601 | |||
| 602 | 2006-09-29 Glenn Morris <rgm@gnu.org> | ||
| 603 | |||
| 604 | * custom.el (defcustom): Doc fix. | ||
| 605 | |||
| 606 | * calendar/calendar.el (european-calendar-style): | ||
| 607 | Call european-calendar or american-calendar as needed when set. | ||
| 608 | (diary-view-entries, list-calendar-holidays): Move autoloads | ||
| 609 | before use. | ||
| 610 | |||
| 611 | 2006-09-29 Juri Linkov <juri@jurta.org> | ||
| 612 | |||
| 613 | * progmodes/cperl-mode.el (cperl-after-expr-p): Don't move point | ||
| 614 | to nil if there is no previous property change. | ||
| 615 | |||
| 616 | 2006-09-26 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 617 | |||
| 618 | * cus-edit.el (custom-save-all): Switch to emacs-lisp mode before | ||
| 619 | saving anything to be sure that `forward-sexp' behaves correctly. | ||
| 620 | |||
| 621 | 2006-09-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 622 | |||
| 623 | * simple.el (line-move-finish): Ignore field boundaries if the | ||
| 624 | initial and final points have the same `field' property. | ||
| 625 | |||
| 626 | 2006-09-29 Kim F. Storm <storm@cua.dk> | ||
| 627 | |||
| 628 | * ido.el (ido-file-internal): Only bind minibuffer-completing-file-name | ||
| 629 | to t while calling ido-read-internal. | ||
| 630 | |||
| 631 | 2006-09-29 Carsten Dominik <dominik@science.uva.nl> | ||
| 632 | |||
| 633 | * textmodes/org.el (org-file-remote-p): Get regexp from list. | ||
| 634 | (org-archive-subtree): Remove erraneous `]' from character list. | ||
| 635 | |||
| 636 | 2006-09-28 Jonathan Yavner <jyavner@member.fsf.org> | ||
| 637 | |||
| 638 | * ses.el (ses-in-print-area, ses-goto-data, ses-load) | ||
| 639 | (ses-reconstruct-all): Make undo of "insert row" work by keeping | ||
| 640 | markers for data-area and parameters-area. | ||
| 641 | |||
| 642 | 2006-09-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 643 | |||
| 644 | * progmodes/make-mode.el (makefile-mode): Don't disable jit-lock. | ||
| 645 | |||
| 646 | * font-lock.el (font-lock-after-change-function): Refontify next line | ||
| 647 | as well if end is at BOL. | ||
| 648 | (font-lock-extend-jit-lock-region-after-change): Be more careful to | ||
| 649 | only extend the region as much as needed. | ||
| 650 | |||
| 651 | 2006-09-28 Richard Stallman <rms@gnu.org> | ||
| 652 | |||
| 653 | * comint.el (comint-mode): Bind font-lock-defaults non-nil. | ||
| 654 | |||
| 655 | * subr.el (insert-for-yank-1): Handle `font-lock-face' specially. | ||
| 656 | |||
| 657 | * international/mule.el (after-insert-file-set-coding): | ||
| 658 | If VISIT, don't let set-buffer-multibyte make undo info. | ||
| 659 | |||
| 660 | 2006-09-28 Osamu Yamane <yamane@green.ocn.ne.jp> (tiny change) | ||
| 661 | |||
| 662 | * mail/smtpmail.el (smtpmail-try-auth-methods): Do not break long | ||
| 663 | lines in base64-encoded authentication response. | ||
| 664 | |||
| 665 | 2006-09-26 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 666 | |||
| 667 | * progmode/ebnf2ps.el: Doc fix. Implement arrow spacing and scaling. | ||
| 668 | (ebnf-version): New version 4.3. | ||
| 669 | (ebnf-arrow-extra-width, ebnf-arrow-scale): New options. | ||
| 670 | (ebnf-prologue): Adjust PostScript programming. | ||
| 671 | (ebnf-begin-file, ebnf-insert-ebnf-prologue, ebnf-terminal-dimension1) | ||
| 672 | (ebnf-repeat-dimension, ebnf-except-dimension): Adjust code. | ||
| 673 | |||
| 674 | 2006-09-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 675 | |||
| 676 | * jit-lock.el (jit-lock-force-redisplay): Rename from | ||
| 677 | jit-lock-fontify-again, and undo the mistaken change I've just done. | ||
| 678 | |||
| 679 | * jit-lock.el (jit-lock-fontify-now): Don't fontify the empty text. | ||
| 680 | (jit-lock-fontify-again): Don't refontify text that's not displayed. | ||
| 681 | |||
| 682 | 2006-09-26 Kenichi Handa <handa@m17n.org> | ||
| 683 | |||
| 684 | * startup.el (display-splash-screen): Allow a prefix argument. | ||
| 685 | |||
| 686 | 2006-09-25 Jason Rumney <jasonr@gnu.org> | ||
| 687 | |||
| 688 | * subr.el (shell-quote-argument): Use DOS logic for Windows | ||
| 689 | shells with DOS semantics. | ||
| 690 | |||
| 691 | 2006-09-24 Richard Stallman <rms@gnu.org> | ||
| 692 | |||
| 693 | * progmodes/compile.el (compilation-goto-locus-delete-o): New fn. | ||
| 694 | (compilation-goto-locus): Use compilation-goto-locus-delete-o | ||
| 695 | to delete the overlay. Put it on pre-command-hook. | ||
| 696 | |||
| 697 | * emacs-lisp/timer.el (timer-max-repeats): Doc fix. | ||
| 698 | |||
| 699 | * startup.el (fancy-splash-screens, normal-splash-screen): | ||
| 700 | Call the splash buffer *About GNU Emacs*. | ||
| 701 | |||
| 702 | * simple.el (next-error-highlight, next-error-highlight-no-select): | ||
| 703 | Default to 0.5. | ||
| 704 | (yank-excluded-properties): Add `fontified'. | ||
| 705 | |||
| 706 | * font-lock.el (font-lock-compile-keywords): Allow value of | ||
| 707 | syntax-begin-function to enable paren-column-0 highlighting. | ||
| 708 | |||
| 709 | 2006-09-24 Chris Moore <christopher.ian.moore@gmail.com> (tiny change) | ||
| 710 | |||
| 711 | * dired.el (dired-build-subdir-alist): When file ends in colon, | ||
| 712 | don't exit the loop, just disregard that file. | ||
| 713 | |||
| 714 | 2006-09-24 Chong Yidong <cyd@stupidchicken.com> | ||
| 715 | |||
| 716 | * simple.el (line-move-finish): Handle corner case for fields in | ||
| 717 | continued lines. | ||
| 718 | (line-move-1): Remove flawed test for that case. | ||
| 719 | |||
| 720 | 2006-09-24 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 721 | |||
| 722 | * icomplete.el (icomplete-simple-completing-p): Use the correct | ||
| 723 | name for the new variable, `icomplete-with-completion-tables'. | ||
| 724 | (file local variables): Remove superfluous setting. | ||
| 725 | |||
| 726 | 2006-09-23 Jeff Miller <jmiller@cablespeed.com> (tiny change) | ||
| 727 | |||
| 728 | * calendar/appt.el (appt-check): Fix typo for appointments just | ||
| 729 | after midnight. | ||
| 730 | |||
| 731 | 2006-09-23 Chong Yidong <cyd@stupidchicken.com> | ||
| 732 | |||
| 733 | * help.el (describe-key-briefly, describe-key): Don't expect an | ||
| 734 | extra up event if a down-event is generated by a popup menu. | ||
| 735 | |||
| 736 | 2006-09-23 Michal Nazarewicz <mnazarewicz@gmail.com> (tiny change) | ||
| 737 | |||
| 738 | * textmodes/ispell.el (ispell-change-dictionary): Don't check the | ||
| 739 | local dictionary when changing the global dictionary. | ||
| 740 | |||
| 741 | 2006-09-23 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 742 | |||
| 743 | * icomplete.el (icomplete-with-completion-tables): List of | ||
| 744 | specialized completion tables with which icomplete should | ||
| 745 | operate. Include the new `internal-complete-buffer', so icomplete | ||
| 746 | works with interactive buffer-selection. | ||
| 747 | (icomplete-simple-completing-p): Add acceptance of specialized | ||
| 748 | completion tables listed in icomplete-with-completion-tables. | ||
| 749 | |||
| 750 | 2006-09-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 751 | |||
| 752 | * frame.el (focus-follows-mouse): Set default to nil on Mac. | ||
| 753 | |||
| 754 | * startup.el (command-line): Use `custom-reevaluate-setting' for | ||
| 755 | `focus-follows-mouse'. | ||
| 756 | |||
| 757 | 2006-09-22 Richard Stallman <rms@gnu.org> | ||
| 758 | |||
| 759 | * cus-edit.el (custom-buffer-create-internal): In `emacs -q', | ||
| 760 | explain why Save is not available. | ||
| 761 | |||
| 762 | 2006-09-22 Juanma Barranquero <lekktu@gmail.com> | ||
| 763 | |||
| 764 | * woman.el (woman0-so): Use `let*', not `let'. | ||
| 765 | (woman-horizontal-line): Remove unbalanced parenthesis. | ||
| 766 | |||
| 767 | 2006-09-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 768 | |||
| 769 | * woman.el: Make sure all the end-of-region markers we use have | ||
| 770 | a non-nil insertion-type. | ||
| 771 | (woman0-so): Move things around so we can use copy-marker. | ||
| 772 | (woman0-roff-buffer, woman2-process-escapes-to-eol, woman2-roff-buffer): | ||
| 773 | Adjust marker type. | ||
| 774 | (woman2-process-escapes): Check marker type. | ||
| 775 | (woman-horizontal-line): Dispense with the use of a marker. | ||
| 776 | |||
| 777 | 2006-09-22 Jay Belanger <belanger@truman.edu> | ||
| 778 | |||
| 779 | * calc/calc-lang.el: Add Greek letters to math-variable-table | ||
| 780 | property of tex. | ||
| 781 | |||
| 782 | 2006-09-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 783 | |||
| 784 | * files.el (save-some-buffers-action-alist): Display diff in view-mode. | ||
| 785 | |||
| 786 | 2006-09-22 Masatake YAMATO <jet@gyve.org> | ||
| 787 | |||
| 788 | * add-log.el (add-log-current-defun): Use `forward-sexp' | ||
| 789 | instead of `forward-word' to pick c++::symbol. | ||
| 790 | Reported by Herbert Euler <herberteuler@hotmail.com>. | ||
| 791 | |||
| 792 | 2006-09-22 Kenichi Handa <handa@m17n.org> | ||
| 793 | |||
| 794 | * bindings.el: Fix setting self-insert-command for multibyte | ||
| 795 | characters in global-map. | ||
| 796 | |||
| 797 | 2006-09-21 David Kastrup <dak@gnu.org> | ||
| 798 | |||
| 799 | * mouse.el (mouse-posn-property): Fix typo for `event-start' in | ||
| 800 | doc string. | ||
| 801 | |||
| 802 | 2006-09-21 Kenichi Handa <handa@m17n.org> | ||
| 803 | |||
| 804 | * language/european.el ("Latin-1"): Add windows-1252 to | ||
| 805 | coding-priority. | ||
| 806 | ("German"): Likewise. | ||
| 807 | |||
| 808 | 2006-09-21 Kim F. Storm <storm@cua.dk> | ||
| 809 | |||
| 810 | * emacs-lisp/cl-macs.el (member*): Use memql instead of complex code. | ||
| 811 | Suggested by Miles Bader. | ||
| 812 | |||
| 813 | * emacs-lisp/cl.el (pushnew): Rework 2006-09-10 change. Use memql | ||
| 814 | instead of add-to-list in the simple case. | ||
| 815 | |||
| 816 | 2006-09-20 Kenichi Handa <handa@m17n.org> | ||
| 817 | |||
| 818 | * isearch.el (isearch-process-search-char): Cancel the previous change. | ||
| 819 | (isearch-search-string): New function. | ||
| 820 | (isearch-search): Use isearch-search-string. | ||
| 821 | (isearch-lazy-highlight-search): Likewise. | ||
| 822 | |||
| 823 | 2006-09-20 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 824 | |||
| 825 | * lpr.el (lpr-page-header-switches): Insert `*' at beginning of doc | ||
| 826 | string to become an option. | ||
| 827 | |||
| 828 | 2006-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 829 | |||
| 830 | * files.el (find-buffer-visiting): Don't get fooled by a nil inode. | ||
| 831 | |||
| 832 | 2006-09-20 Kim F. Storm <storm@cua.dk> | ||
| 833 | |||
| 834 | * simple.el (line-move-partial): Call pos-visible-in-window-p with | ||
| 835 | position t instead of trying both window-end and window-end - 1. | ||
| 836 | |||
| 837 | 2006-09-20 Carsten Dominik <dominik@science.uva.nl> | ||
| 838 | |||
| 839 | * textmodes/org.el (org-scan-tags): Find end of subtrees also in | ||
| 840 | hidden trees. | ||
| 841 | |||
| 842 | 2006-09-20 David Kastrup <dak@gnu.org> | ||
| 843 | |||
| 844 | * mouse.el (mouse-posn-property): Improve doc string. | ||
| 845 | (mouse-on-link-p): Change buffers for function calls on links. | ||
| 846 | |||
| 847 | * menu-bar.el (clipboard-yank): Bomb out in interactive use if | ||
| 848 | buffer is read-only. | ||
| 849 | |||
| 850 | 2006-09-20 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 851 | |||
| 852 | * allout.el (allout-unprotected): Let inhibit-read-only only when | ||
| 853 | buffer-read-only isn't set. | ||
| 854 | (allout-annotate-hidden): Enable topic annotation during copies even | ||
| 855 | when the buffer is read-only, eg for topic copies. Ensure that the loop | ||
| 856 | advances, even when the span extends beyond the deletion region. | ||
| 857 | (allout-toggle-subtree-encryption): Use allout-structure-added-hook | ||
| 858 | rather than allout-exposure-changed-hook, as a stronger assertion. | ||
| 859 | (allout-keybindings-list): Add bindings for | ||
| 860 | allout-copy-line-as-kill and allout-copy-topic-as-kill. | ||
| 861 | (allout-copy-line-as-kill, allout-copy-topic-as-kill): | ||
| 862 | Copy wrappers for allout-kill-line and allout-kill-topic. | ||
| 863 | (allout-listify-exposed): Position correctly to accumulate lines. | ||
| 864 | |||
| 865 | 2006-09-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 866 | |||
| 867 | * simple.el (line-move-1): Escape field boundaries occurring | ||
| 868 | exactly at point. Update goal column if constrained to a field. | ||
| 869 | (line-move-finish): Escape field boundaries occurring exactly at point. | ||
| 870 | |||
| 871 | 2006-09-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 872 | |||
| 873 | * mouse.el (mouse-on-link-p): Tentatively fix last change. | ||
| 874 | (mouse-drag-vertical-line): Remove unused var `wconfig'. | ||
| 875 | |||
| 876 | 2006-09-19 Kim F. Storm <storm@cua.dk> | ||
| 877 | |||
| 878 | * help.el (describe-key-briefly, describe-key): Simplify printing | ||
| 879 | of descriptions by using format and %S. Fix "is undefined" | ||
| 880 | messages to say "at that spot" for mouse events. | ||
| 881 | |||
| 882 | * simple.el (line-move-partial): Optimize. Try window-line-height | ||
| 883 | before posn-at-point to get vpos of current line. | ||
| 884 | |||
| 885 | 2006-09-18 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 886 | |||
| 887 | * viper.el: Bump up version/date of update to reflect the substantial | ||
| 888 | changes done in August 2006. | ||
| 889 | |||
| 890 | * viper-cmd (viper-next-line-at-bol): Make sure button-at, push-button | ||
| 891 | are defined. | ||
| 892 | |||
| 893 | * ediff-util.el (ediff-add-to-history): New function. | ||
| 894 | |||
| 895 | * ediff.el: Use ediff-add-to-history instead of add-to-history. | ||
| 896 | |||
| 897 | 2006-09-18 Wolfgang Jenkner <wjenkner@inode.at> (tiny change) | ||
| 898 | |||
| 899 | * textmodes/conf-mode.el (conf-space-mode): Doc fix. | ||
| 900 | Delete duplicate make-local-variable form. | ||
| 901 | (conf-space-keywords): Add autoload cookie. | ||
| 902 | Fix typo (`keywords', not `keyword'). | ||
| 903 | |||
| 904 | 2006-09-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 905 | |||
| 906 | * cus-start.el (all): Rename x-gtk-show-chooser-help-text to | ||
| 907 | x-gtk-file-dialog-help-text. Rename x-use-old-gtk-file-dialog | ||
| 908 | to x-gtk-use-old-file-dialog | ||
| 909 | |||
| 910 | 2006-09-18 Richard Stallman <rms@gnu.org> | ||
| 911 | |||
| 912 | * wid-edit.el (widget-button-click): Handle non-mouse-motion events | ||
| 913 | that might come in during mouse tracking. | ||
| 914 | |||
| 915 | 2006-09-18 Kim F. Storm <storm@cua.dk> | ||
| 916 | |||
| 917 | * simple.el (line-move-partial): Rework 2006-09-15 change to use | ||
| 918 | new window-line-height function. Further optimize by not calling | ||
| 919 | pos-visible-in-window-p for window-end when window-line-height | ||
| 920 | returns useful information. | ||
| 921 | |||
| 922 | 2006-09-16 Richard Stallman <rms@gnu.org> | ||
| 923 | |||
| 924 | * textmodes/conf-mode.el (conf-mode-map): Use conf-space-keywords cmd. | ||
| 925 | (conf-space-mode): Don't handle prefix arg. | ||
| 926 | Delete conf-space-keywords-override code. | ||
| 927 | Use add-hook. | ||
| 928 | (conf-space-keywords): New command. | ||
| 929 | (conf-space-mode-internal): Be careful with imenu-generic-expression. | ||
| 930 | Delete conf-space-keywords-override code. | ||
| 931 | (conf-space-keywords-alist): Doc fix. | ||
| 932 | (conf-space-font-lock-keywords): Doc fix. | ||
| 933 | (conf-space-keywords-override): Var deleted. | ||
| 934 | |||
| 935 | 2006-09-16 Chong Yidong <cyd@stupidchicken.com> | ||
| 936 | |||
| 937 | * startup.el (fancy-splash-screens): Don't switch to the scratch | ||
| 938 | buffer; it may not be the next buffer. | ||
| 939 | |||
| 940 | 2006-09-16 Romain Francoise <romain@orebokech.com> | ||
| 941 | |||
| 942 | * saveplace.el (load-save-place-alist-from-file): Use expanded name | ||
| 943 | in both messages. | ||
| 944 | |||
| 945 | 2006-09-16 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> | ||
| 946 | |||
| 947 | * progmodes/python.el (python-preoutput-filter): | ||
| 948 | Fix arg order to string-match. | ||
| 949 | |||
| 950 | 2006-09-16 Richard Stallman <rms@gnu.org> | ||
| 951 | |||
| 952 | * obsolete/fast-lock.el (fast-lock-cache-data): Provide 2nd arg to | ||
| 953 | font-lock-compile-keywords. | ||
| 954 | |||
| 955 | * font-lock.el (font-lock-compile-keywords): Rename optional arg | ||
| 956 | to SYNTACTIC-KEYWORDS and reverse the sense. All callers changed. | ||
| 957 | |||
| 958 | 2006-09-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 959 | |||
| 960 | * cus-start.el (all): Add x-gtk-show-chooser-help-text. | ||
| 961 | |||
| 962 | * select.el (xselect-convert-to-string): If UTF8_STRING is requested | ||
| 963 | and the data doesn't look like UTF8, send STRING instead. | ||
| 964 | |||
| 965 | 2006-09-16 Agustin Martin <agustin.martin@hispalinux.es> | ||
| 966 | |||
| 967 | * textmodes/flyspell.el (flyspell-check-region-doublons): | ||
| 968 | New function to detect duplicated words. | ||
| 969 | (flyspell-large-region): Use it. | ||
| 970 | |||
| 971 | 2006-09-16 Chong Yidong <cyd@stupidchicken.com> | ||
| 972 | |||
| 973 | * simple.el (line-move-to-column): Revert 2006-08-03 change. | ||
| 974 | |||
| 975 | 2006-09-16 Eli Zaretskii <eliz@gnu.org> | ||
| 976 | |||
| 977 | * help.el (describe-prefix-bindings): Use let, not let*. | ||
| 978 | |||
| 979 | 2006-09-16 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 980 | |||
| 981 | * allout.el (allout-regexp, allout-line-boundary-regexp) | ||
| 982 | (allout-bob-regexp): Correct grouping and boundaries to fix | ||
| 983 | backwards traversal. | ||
| 984 | (allout-depth-specific-regexp, allout-depth-one-regexp): | ||
| 985 | New versions that exploit \\{M\\} regexp syntax, to avoid geometric or | ||
| 986 | worse time in allout-ascend. | ||
| 987 | (allout-doublecheck-at-and-shallower): Identify depth threshold | ||
| 988 | below which topics are checked for and disqualified by containment | ||
| 989 | discontinuities. | ||
| 990 | (allout-hotspot-key-handler): Correctly handle multiple-key | ||
| 991 | strokes. Remove some unused variables. | ||
| 992 | (allout-mode-leaders): Clarify that mode-specific comment-start | ||
| 993 | will be used. | ||
| 994 | (set-allout-regexp): Correctly regexp-quote allout regexps to | ||
| 995 | properly accept alternative header-leads and primary bullets with | ||
| 996 | regexp-specific characters (eg, C "/*", mathematica "(*"). | ||
| 997 | Include new regular expressions among those configured. | ||
| 998 | (allout-infer-header-lead-and-primary-bullet): | ||
| 999 | Rename allout-infer-header-lead. | ||
| 1000 | (allout-recent-depth): Manifest as a variable as well as a function. | ||
| 1001 | (allout-prefix-data): Simplify into an inline instead of a macro, | ||
| 1002 | assuming current match data rather than being explicitly passed | ||
| 1003 | it. Establish allout-recent-depth value as well as | ||
| 1004 | allout-recent-prefix-beginning and allout-recent-prefix-end. | ||
| 1005 | (allout-aberrant-container-p): True when an item's immediate | ||
| 1006 | offspring discontinuously contained. Useful for disqualifying | ||
| 1007 | unintended topic prefixes, likely at low depths. | ||
| 1008 | (allout-goto-prefix-doublechecked): Elaborate version of | ||
| 1009 | allout-goto-prefix which disqualifies aberrant pseudo-items. | ||
| 1010 | (allout-pre-next-prefix): Layer on top of lower-level routines, to | ||
| 1011 | get disqualification of aberrant containers. | ||
| 1012 | (allout-end-of-prefix, allout-end-of-subtree): Disqualify aberrant | ||
| 1013 | containers. | ||
| 1014 | (allout-beginning-of-current-entry): Position at start of buffer | ||
| 1015 | when in container (depth 0) entry. | ||
| 1016 | (nullify-allout-prefix-data): Invalidate allout-recent-* prefix data. | ||
| 1017 | (allout-current-bullet): Strip text properties. | ||
| 1018 | (allout-get-prefix-bullet): Use right match groups. | ||
| 1019 | (allout-beginning-of-line, allout-next-heading): | ||
| 1020 | Disqualify aberrant containers. | ||
| 1021 | (allout-previous-heading): Disqualify aberrant containers, and | ||
| 1022 | change to regular (rather than inline) function, to allow | ||
| 1023 | self-recursion. | ||
| 1024 | (allout-get-invisibility-overlay): Increment so progress is made | ||
| 1025 | when the first overlay is not the sought one. | ||
| 1026 | (allout-end-of-prefix): Disqualify aberrant containers. | ||
| 1027 | (allout-end-of-line): Cycle something like allout-beginning-of-line. | ||
| 1028 | (allout-mode): Make allout-old-style-prefixes (ie, enabling use with | ||
| 1029 | outline.el outlines) functional again. Change the primary bullet | ||
| 1030 | along with the header-lead - level 1 new-style bullets now work. | ||
| 1031 | Engage allout-before-change-handler in mainline emacs, not just | ||
| 1032 | xemacs, to do undo handling. | ||
| 1033 | (allout-before-change-handler): Expose undo changes occurring in | ||
| 1034 | hidden regions. Use allout-get-invisibility-overlay instead of | ||
| 1035 | reimplementing it inline. | ||
| 1036 | (allout-chart-subtree): Use start rather than end of prefix in | ||
| 1037 | charts. Use allout-recent-depth variable. | ||
| 1038 | (allout-chart-siblings): Disqualify aberrant topics. | ||
| 1039 | (allout-beginning-of-current-entry): Position correctly. | ||
| 1040 | (allout-ascend): Use new allout-depth-specific-regexp and | ||
| 1041 | allout-depth-one-regexp for linear instead of O(N^2) or worse | ||
| 1042 | behavior. | ||
| 1043 | (allout-ascend-to-depth): Depend on allout-ascend, rather than | ||
| 1044 | reimplementing an algorithm. | ||
| 1045 | (allout-up-current-level): Depend on allout-ascend, rather than | ||
| 1046 | reimplementing an algorithm. Return to start-point if we fail. | ||
| 1047 | (allout-descend-to-depth): Use allout-recent-depth variable | ||
| 1048 | instead of function. | ||
| 1049 | (allout-next-sibling): On traversal of numerous intervening | ||
| 1050 | topics, resort to economical allout-next-sibling-leap. | ||
| 1051 | (allout-next-sibling-leap): Specialized version of | ||
| 1052 | allout-next-sibling that uses allout-ascend cleverly, to depend on | ||
| 1053 | a regexp search to leap large numbers of contained topics, rather | ||
| 1054 | than arbitrarily many one-by-one traversals. | ||
| 1055 | (allout-next-visible-heading): Disqualify aberrant topics. | ||
| 1056 | (allout-previous-visible-heading): Position consistently when | ||
| 1057 | interactive. | ||
| 1058 | (allout-forward-current-level): Base on allout-previous-sibling | ||
| 1059 | rather than (differently) reimplmenting the algorithm. Remove some | ||
| 1060 | unused variables. | ||
| 1061 | (allout-solicit-alternate-bullet): Present default choice stripped | ||
| 1062 | of text properties. | ||
| 1063 | (allout-rebullet-heading): Use bullet stripped of text properties. | ||
| 1064 | Register changes using allout-exposure-change-hook. | ||
| 1065 | Disregard aberrant topics. | ||
| 1066 | (allout-shift-in): With universal-argument, make topic a peer of | ||
| 1067 | it's former offspring. Simplify the code by separating out | ||
| 1068 | allout-shift-out functionality. | ||
| 1069 | (allout-shift-out): With universal-argument, make offspring peers | ||
| 1070 | of their former container, and its siblings. Implement the | ||
| 1071 | functionality here, rather than inappropriately muddling the | ||
| 1072 | implementation of allout-shift-in. | ||
| 1073 | (allout-rebullet-topic): Respect additional argument for new | ||
| 1074 | parent-child separation function. | ||
| 1075 | (allout-yank-processing): Use allout-ascend directly. | ||
| 1076 | (allout-show-entry): Disqualify aberrant topics. | ||
| 1077 | (allout-show-children): Handle discontinuous children gracefully, | ||
| 1078 | extending the depth being revealed to expose them and posting a | ||
| 1079 | message indicating the situation. | ||
| 1080 | (allout-show-to-offshoot): Remove obsolete and incorrect comment. | ||
| 1081 | Leave cursor in correct position. | ||
| 1082 | (allout-hide-current-subtree): Use allout-ascend directly. | ||
| 1083 | Disqualify aberrant topics. | ||
| 1084 | (allout-kill-line, allout-kill-topic): Preserve exposure layout in | ||
| 1085 | a way that the yanks can restore it, as used to happen. | ||
| 1086 | (allout-yank-processing): Restore exposure layout as recorded by | ||
| 1087 | allout-kill-*, as used to happen. | ||
| 1088 | (allout-annotate-hidden, allout-hide-by-annotation): New routines | ||
| 1089 | for preseving and restoring exposure layout across kills. | ||
| 1090 | (allout-toggle-subtree-encryption): Run allout-exposure-change-hook. | ||
| 1091 | (allout-encrypt-string): Strip text properties. | ||
| 1092 | Rearranged order and outline-headings for some of the | ||
| 1093 | miscellaneous functions. | ||
| 1094 | (allout-resolve-xref): No need to quote the error name in the | ||
| 1095 | condition-case handler section. | ||
| 1096 | (allout-flatten): Classic recursive (and recursively intensive, | ||
| 1097 | without tail-recursion) list-flattener, needed by allout-shift-out | ||
| 1098 | when confronted with discontinuous children. | ||
| 1099 | |||
| 1100 | 2006-09-16 Jason Rumney <jasonr@gnu.org> | ||
| 1101 | |||
| 1102 | * dnd.el (dnd-open-remote-file-function): Use dnd-open-local-file | ||
| 1103 | on ms-windows. | ||
| 1104 | (dnd-open-unc-file): Remove. | ||
| 1105 | (dnd-open-local-file): Mention in doc string that it also handles | ||
| 1106 | remote files if the system natively supports unc file-names. | ||
| 1107 | |||
| 1108 | 2006-09-15 Kim F. Storm <storm@cua.dk> | ||
| 1109 | |||
| 1110 | * help.el (describe-key): Handle C-h k in *Help* buffer; collect | ||
| 1111 | all necessary information about the event before erasing *Help*. | ||
| 1112 | |||
| 1113 | * simple.el (line-move-partial): Use window-line-visiblity to | ||
| 1114 | quickly check whether last line is partially visible, and only do | ||
| 1115 | the hard (and slow) part in that case. | ||
| 1116 | |||
| 1117 | 2006-09-15 Jay Belanger <belanger@truman.edu> | ||
| 1118 | |||
| 1119 | * COPYING: Replace "Library Public License" by "Lesser Public | ||
| 1120 | License" throughout. | ||
| 1121 | |||
| 1122 | 2006-09-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 1123 | |||
| 1124 | * term/x-win.el (x-menu-bar-open): New function for F10. | ||
| 1125 | |||
| 1126 | 2006-09-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 1127 | |||
| 1128 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | ||
| 1129 | Disallow filenames containing " -" to avoid confusion with libtool | ||
| 1130 | compilation messages. Suggested by Stefan Monnier. | ||
| 1131 | |||
| 1132 | 2006-09-15 David Kastrup <dak@gnu.org> | ||
| 1133 | |||
| 1134 | * mouse-sel.el (mouse-sel-follow-link-p): Use event position | ||
| 1135 | instead of buffer position for `mouse-on-link-p'. | ||
| 1136 | |||
| 1137 | * mouse.el (mouse-posn-property): New function looking up the | ||
| 1138 | properties at a click position in overlays and text properties in | ||
| 1139 | either buffer or strings. | ||
| 1140 | (mouse-on-link-p): Use `mouse-posn-property' to streamline lookup | ||
| 1141 | of both `follow-link' as well as `mouse-face' properties. | ||
| 1142 | (mouse-drag-track): Check `mouse-on-link-p' on event position, not | ||
| 1143 | buffer position. | ||
| 1144 | |||
| 1145 | * help.el (describe-key-briefly): When reading a down-event on | ||
| 1146 | mode lines or scroll bar, swallow the following up event, too. | ||
| 1147 | Use the new mouse sensitity of `key-binding' for lookup. | ||
| 1148 | (describe-key): The same here. | ||
| 1149 | |||
| 1150 | 2006-09-15 Juanma Barranquero <lekktu@gmail.com> | ||
| 1151 | |||
| 1152 | * play/life.el (life-patterns): Add a few more interesting patterns. | ||
| 1153 | (life-setup): Force `show-trailing-whitespace' to nil. | ||
| 1154 | |||
| 1155 | 2006-09-14 Richard Stallman <rms@gnu.org> | ||
| 1156 | |||
| 1157 | * startup.el (fancy-splash-text): Change text to improve alignment. | ||
| 1158 | (fancy-splash-screens): Don't set non-standard tab width. | ||
| 1159 | Bind cursor-type temporarily, and make it easy to patch to | ||
| 1160 | preserve the splash buffer. | ||
| 1161 | (normal-splash-screen, fancy-splash-tail): Spell out "Meta-x". | ||
| 1162 | (fancy-splash-screens): Display echo-area message explicitly. | ||
| 1163 | Don't set fancy-splash-help-echo. | ||
| 1164 | |||
| 1165 | * simple.el (line-number-mode): Group mode-line instead of | ||
| 1166 | editing-basics. | ||
| 1167 | (column-number-mode, size-indication-mode): Likewise. | ||
| 1168 | |||
| 1169 | * faces.el (mode-line-faces): Group mode-line instead of modeline. | ||
| 1170 | |||
| 1171 | * time.el (display-time): Group mode-line instead of modeline. | ||
| 1172 | |||
| 1173 | * cus-edit.el (mode-line): Rename from modeline. All uses changed. | ||
| 1174 | |||
| 1175 | 2006-09-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 1176 | |||
| 1177 | * startup.el (fancy-splash-text): Move editing instructions to | ||
| 1178 | fancy-splash-head. | ||
| 1179 | (fancy-splash-head): Issue editing instructions. | ||
| 1180 | (fancy-splash-screens): Fixup whitespace. | ||
| 1181 | |||
| 1182 | 2006-09-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1183 | |||
| 1184 | * bindings.el (mode-line-buffer-identification-keymap): | ||
| 1185 | Remove duplicate line. | ||
| 1186 | |||
| 1187 | 2006-09-14 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 1188 | |||
| 1189 | * ido.el (ido-ignore-item-p): Allow any kind of functions in | ||
| 1190 | ignore lists. | ||
| 1191 | |||
| 1192 | 2006-09-14 Kim F. Storm <storm@cua.dk> | ||
| 1193 | |||
| 1194 | * jit-lock.el (jit-lock-fontify-again): New function. | ||
| 1195 | (jit-lock-fontify-now): Use it instead of lambda form. | ||
| 1196 | |||
| 1197 | 2006-09-13 Agustin Martin <agustin.martin@hispalinux.es> | ||
| 1198 | |||
| 1199 | * textmodes/flyspell.el (flyspell-word, flyspell-correct-word) | ||
| 1200 | (flyspell-auto-correct-word): Make ispell-filter local to these | ||
| 1201 | functions. Check that ispell-filter has new stuff before calling | ||
| 1202 | ispell-parse-output. | ||
| 1203 | |||
| 1204 | 2006-09-13 Kim F. Storm <storm@cua.dk> | ||
| 1205 | |||
| 1206 | * simple.el (line-move-partial): Optimize. | ||
| 1207 | |||
| 1208 | 2006-09-13 Richard Stallman <rms@gnu.org> | ||
| 1209 | |||
| 1210 | * thingatpt.el (thing-at-point-bounds-of-url-at-point): | ||
| 1211 | Delete spurious backquote. | ||
| 1212 | |||
| 1213 | 2006-09-07 Ryan Yeske <rcyeske@gmail.com> | ||
| 1214 | |||
| 1215 | * net/rcirc.el (rcirc-print): Fix last change. | ||
| 1216 | |||
| 1217 | 2006-09-12 Jay Belanger <belanger@truman.edu> | ||
| 1218 | |||
| 1219 | * calc/calc.el (calc-dispatch): Remove unnecessary `sit-for'. | ||
| 1220 | |||
| 1221 | 2006-09-07 Ryan Yeske <rcyeske@gmail.com> | ||
| 1222 | |||
| 1223 | * net/rcirc.el (rcirc-scroll-show-maximum-output): Rename from | ||
| 1224 | rcirc-show-maximum-output. | ||
| 1225 | (rcirc-mode): Remove window-scroll-function hook. | ||
| 1226 | (rcirc-scroll-to-bottom): Remove function. | ||
| 1227 | (rcirc-print): Recenter so point stays at the bottom of the window | ||
| 1228 | if point was already there. | ||
| 1229 | |||
| 1230 | 2006-09-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 1231 | |||
| 1232 | * comint.el (comint-exec-1): Set EMACS to the full name of Emacs, | ||
| 1233 | not to "t". | ||
| 1234 | * progmodes/compile.el (compilation-start): Likewise. | ||
| 1235 | * progmodes/idlwave.el (idlwave-rescan-asynchronously): | ||
| 1236 | Don't use expand-file-name on invocation-directory, since this | ||
| 1237 | might mishandle special characters in invocation-directory. | ||
| 1238 | |||
| 1239 | 2006-09-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1240 | |||
| 1241 | * pcvs-defs.el: Remove * in defcustom's docstrings. | ||
| 1242 | |||
| 1243 | 2006-09-12 Nick Roberts <nickrob@snap.net.nz> | ||
| 1244 | |||
| 1245 | * progmodes/compile.el (compilation-directory-properties): | ||
| 1246 | Doc fix for help-echo. | ||
| 1247 | |||
| 1248 | 2006-09-12 Lars Hansen <larsh@soem.dk> | ||
| 1249 | |||
| 1250 | * desktop.el (desktop-read): Add comment. | ||
| 1251 | |||
| 1252 | 2006-09-12 Kim F. Storm <storm@cua.dk> | ||
| 1253 | |||
| 1254 | * simple.el (next-error-highlight, next-error-highlight-no-select): | ||
| 1255 | Fix spelling error. | ||
| 1256 | |||
| 1257 | * subr.el (sit-for): Rework to use input-pending-p and cond. | ||
| 1258 | Return nil input is pending on entry also for SECONDS <= 0. | ||
| 1259 | (while-no-input): Use input-pending-p instead of sit-for. | ||
| 1260 | |||
| 1261 | 2006-09-11 Richard Stallman <rms@gnu.org> | ||
| 1262 | |||
| 1263 | * simple.el (next-error-highlight, next-error-highlight-no-select): | ||
| 1264 | Fix custom type and doc strings. | ||
| 1265 | |||
| 1266 | 2006-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1267 | |||
| 1268 | * diff-mode.el (diff-apply-hunk-to-backup-file): New var. | ||
| 1269 | (diff-apply-hunk): Use it to ask for confirmation. | ||
| 1270 | |||
| 1271 | 2006-09-11 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 1272 | |||
| 1273 | * emacs-lisp/cl.el (pushnew): Add missing `,'. | ||
| 1274 | |||
| 1275 | 2006-09-11 David Kastrup <dak@gnu.org> | ||
| 1276 | |||
| 1277 | * help.el (string-key-binding, describe-key-briefly) | ||
| 1278 | (describe-key): Remove `string-key-binding' and its callers since | ||
| 1279 | `key-binding' already caters for the proper lookup now. | ||
| 1280 | |||
| 1281 | 2006-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1282 | |||
| 1283 | * progmodes/cfengine.el (cfengine-font-lock-syntactic-keywords): Newvar. | ||
| 1284 | (cfengine-mode): Use it. Fix \ syntax to be like /. | ||
| 1285 | |||
| 1286 | * bindings.el (mode-line-buffer-identification-keymap): | ||
| 1287 | Move initialization into declaration. | ||
| 1288 | |||
| 1289 | 2006-09-10 Kim F. Storm <storm@cua.dk> | ||
| 1290 | |||
| 1291 | * ido.el (ido-edit-input, ido-complete, ido-take-first-match) | ||
| 1292 | (ido-push-dir-first, ido-kill-buffer-at-head, ido-exhibit) | ||
| 1293 | (ido-delete-file-at-head): Pass head of ido-matches through ido-name | ||
| 1294 | in case of merged directories. Reported by Micha,Ak(Bl Cadilhac. | ||
| 1295 | |||
| 1296 | 2006-09-10 Richard Stallman <rms@gnu.org> | ||
| 1297 | |||
| 1298 | * dired-aux.el: Handle errors in recursive copy usefully. | ||
| 1299 | (dired-create-files-failures): New variable. | ||
| 1300 | (dired-copy-file): Remove condition-case. | ||
| 1301 | (dired-copy-file-recursive): Check for errors on all file | ||
| 1302 | operations, and add them to dired-create-files-failures. | ||
| 1303 | Check file file-date-erorr here too. | ||
| 1304 | (dired-create-files): Check dired-create-files-failures | ||
| 1305 | and report those errors too. | ||
| 1306 | |||
| 1307 | * emacs-lisp/cl.el (pushnew): Use add-to-list when convenient. | ||
| 1308 | |||
| 1309 | * subr.el (add-to-list): New argument COMPARE-FN. | ||
| 1310 | |||
| 1311 | 2006-09-10 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 1312 | |||
| 1313 | * filecache.el (file-cache-add-directory) | ||
| 1314 | (file-cache-add-directory-list, file-cache-add-file) | ||
| 1315 | (file-cache-add-directory-using-find) | ||
| 1316 | (file-cache-add-directory-using-locate) | ||
| 1317 | (file-cache-add-directory-recursively): Add autoloads. | ||
| 1318 | |||
| 1319 | 2006-09-09 Richard Stallman <rms@gnu.org> | ||
| 1320 | |||
| 1321 | * textmodes/conf-mode.el (conf-space-mode): | ||
| 1322 | Use hack-local-variables-hook instead of calling hack-local-variables. | ||
| 1323 | (conf-space-keywords-override): New variable. | ||
| 1324 | (conf-space-mode-internal): New subroutine. Reinit Font Lock mode. | ||
| 1325 | (conf-space-mode): Always make conf-space-keywords and | ||
| 1326 | conf-space-keywords-override local. | ||
| 1327 | Call conf-space-mode-internal directly as well as via hook. | ||
| 1328 | |||
| 1329 | 2006-09-09 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> (tiny change) | ||
| 1330 | |||
| 1331 | * progmodes/python.el (python-font-lock-keywords): Add `self' and other | ||
| 1332 | quasi-keywords. | ||
| 1333 | |||
| 1334 | 2006-09-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1335 | |||
| 1336 | * progmodes/python.el: Quieten the compiler about hippie-expand vars. | ||
| 1337 | (python-send-string): Be slightly more careful about adding \n. | ||
| 1338 | |||
| 1339 | * startup.el (normal-splash-screen): Don't display the buffer if we'll | ||
| 1340 | kill it right away anyway. | ||
| 1341 | |||
| 1342 | 2006-09-09 Eli Zaretskii <eliz@gnu.org> | ||
| 1343 | |||
| 1344 | * international/codepage.el (cp850-decode-table): Fix a few codes. | ||
| 1345 | (cp858-decode-table): New variable. | ||
| 1346 | |||
| 1347 | 2006-09-09 Toby Allsopp <Toby.Allsopp@navman.com> (tiny change) | ||
| 1348 | |||
| 1349 | * net/ldap.el (ldap-search-internal): Doc fix. | ||
| 1350 | |||
| 1351 | 2006-09-09 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 1352 | |||
| 1353 | * play/life.el (life-display-generation): Test for input manually if | ||
| 1354 | `sleeptime' is negative or null. | ||
| 1355 | |||
| 1356 | * lpr.el (lpr-page-header-switches): Page title switch is one of them. | ||
| 1357 | (print-region-1): Substitute `%s' with the page title. | ||
| 1358 | |||
| 1359 | 2006-09-09 Matt Hodges <MPHodges@member.fsf.org> | ||
| 1360 | |||
| 1361 | * locate.el (locate-current-search): New variable. | ||
| 1362 | (locate): Set buffer local value. Use current buffer if it is | ||
| 1363 | in Locate mode. | ||
| 1364 | (locate-mode): Disable undo here. | ||
| 1365 | (locate-do-setup): Use locate-current-filter from buffer to be killed. | ||
| 1366 | (locate-update): Use locate-current-search and locate-current-filter. | ||
| 1367 | |||
| 1368 | 2006-09-08 David Kastrup <dak@gnu.org> | ||
| 1369 | |||
| 1370 | * desktop.el (desktop-read): When loading a desktop, disable | ||
| 1371 | saving it while the load progresses, and switch off a pending lazy | ||
| 1372 | load by calling `desktop-lazy-abort'. | ||
| 1373 | |||
| 1374 | 2006-08-27 Martin Rudalics <rudalics@gmx.at> | ||
| 1375 | |||
| 1376 | * window.el (mouse-autoselect-window-timer) | ||
| 1377 | (mouse-autoselect-window-position) | ||
| 1378 | (mouse-autoselect-window-window) | ||
| 1379 | (mouse-autoselect-window-now): New vars. | ||
| 1380 | (mouse-autoselect-window-cancel) | ||
| 1381 | (mouse-autoselect-window-select) | ||
| 1382 | (mouse-autoselect-window-start): New functions. | ||
| 1383 | (handle-select-window): Call `mouse-autoselect-window-start' when | ||
| 1384 | delayed window autoselection is enabled. | ||
| 1385 | |||
| 1386 | * cus-start.el (mouse-autoselect-window): Handle delayed window | ||
| 1387 | autoselection. | ||
| 1388 | |||
| 1389 | * emacs-lisp/eldoc.el: Add `handle-select-window' to the set of | ||
| 1390 | commands after which it is allowed to print in the echo area. | ||
| 1391 | |||
| 1392 | 2006-09-08 Richard Stallman <rms@gnu.org> | ||
| 1393 | |||
| 1394 | * textmodes/fill.el (adaptive-fill-regexp): Don't match `(1)' or `1.' | ||
| 1395 | |||
| 1396 | * mail/rmail.el (rmail-get-new-mail): Say whether all msgs are spam. | ||
| 1397 | (rmail-convert-to-babyl-format): Don't record undo, leave list empty. | ||
| 1398 | |||
| 1399 | * emacs-lisp/timer.el (timer-create, timer-activate): Doc fixes. | ||
| 1400 | (cancel-timer-internal): Add doc string. | ||
| 1401 | (cancel-function-timers): Doc fix. | ||
| 1402 | (with-timeout-handler, timer-event-last*): Add doc strings. | ||
| 1403 | |||
| 1404 | * emacs-lisp/bindat.el (bindat-unpack): Doc fix. | ||
| 1405 | |||
| 1406 | * files.el (risky-local-variable-p): Match ...-bindat-spec. | ||
| 1407 | |||
| 1408 | * dired.el (dired-log-summary): Add doc string. | ||
| 1409 | |||
| 1410 | * cus-edit.el (custom-menu-create): Bind deactivate-mark here | ||
| 1411 | (custom-group-menu-create): Not here. | ||
| 1412 | |||
| 1413 | 2006-09-08 Carsten Dominik <dominik@science.uva.nl> | ||
| 1414 | |||
| 1415 | * textmodes/org.el (org-dblock-write:clocktable): Avoid infinite loop. | ||
| 1416 | |||
| 1417 | 2006-09-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 1418 | |||
| 1419 | * term/mac-win.el: (show-hide-font-panel): New HI command ID symbol. | ||
| 1420 | (mac-apple-event-map): Define its handler. | ||
| 1421 | |||
| 1422 | 2006-09-07 Toby Allsopp <Toby.Allsopp@navman.com> (tiny change) | ||
| 1423 | |||
| 1424 | * net/ldap.el (ldap-search-internal): Handle `auth' key. | ||
| 1425 | |||
| 1426 | 2006-09-07 Magnus Henoch <mange@freemail.hu> | ||
| 1427 | |||
| 1428 | * net/rcirc.el (rcirc-activity-string): Don't quote value in case | ||
| 1429 | clause. | ||
| 1430 | |||
| 1431 | 2006-09-07 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 1432 | |||
| 1433 | * info.el (Info-index): Bind completion-ignore-case. | ||
| 1434 | |||
| 1435 | 2006-09-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1436 | |||
| 1437 | * progmodes/prolog.el (inferior-prolog-flavor): New var left out of | ||
| 1438 | previous commit. | ||
| 1439 | (inferior-prolog-guess-flavor): New fun left out of previous commit. | ||
| 1440 | (prolog-consult-region-and-go): Don't hard code "*prolog*" and don't | ||
| 1441 | burp in dedicated windows. | ||
| 1442 | (inferior-prolog-self-insert-command): New command. | ||
| 1443 | (inferior-prolog-mode-map): Use it. | ||
| 1444 | |||
| 1445 | 2006-09-07 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 1446 | |||
| 1447 | * international/latexenc.el (latex-inputenc-coding-alist): Add cp858. | ||
| 1448 | |||
| 1449 | * international/code-pages.el: Add cp858. | ||
| 1450 | |||
| 1451 | 2006-09-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 1452 | |||
| 1453 | * dnd.el: Fix bootstrapping. | ||
| 1454 | |||
| 1455 | 2006-09-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 1456 | |||
| 1457 | * dnd.el (dnd-protocol-alist): Add what url-handler-mode can handle. | ||
| 1458 | (dnd-open-remote-url): New function. | ||
| 1459 | (dnd-open-remote-file-function): Set to dnd-open-remote-url if | ||
| 1460 | not windows-nt. | ||
| 1461 | |||
| 1462 | 2006-09-07 Jason Rumney <jasonr@gnu.org> | ||
| 1463 | |||
| 1464 | * dnd.el (dnd-open-remote-file-function): New variable. | ||
| 1465 | (dnd-open-unc-file): New function. | ||
| 1466 | (dnd-open-file): Call dnd-open-remote-file-function if set. | ||
| 1467 | |||
| 1468 | 2006-09-06 Daiki Ueno <ueno@unixuser.org> | ||
| 1469 | |||
| 1470 | * pgg-gpg.el (pgg-gpg-process-region): Encode passphrase with | ||
| 1471 | pgg-passphrase-coding-system rather than locale-coding-system. | ||
| 1472 | * pgg-def.el (pgg-passphrase-coding-system): New user option. | ||
| 1473 | |||
| 1474 | 2006-09-06 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1475 | |||
| 1476 | * progmodes/prolog.el: Remove * in docstrings. | ||
| 1477 | (prolog-program-name): Add SWI prolog. | ||
| 1478 | (prolog-mode-menu): New menu. | ||
| 1479 | (prolog-mode): Set comment-add. | ||
| 1480 | (prolog-indent-line): Simplify. Use indent-line-to. | ||
| 1481 | (inferior-prolog-buffer): New var. | ||
| 1482 | (inferior-prolog-run, inferior-prolog-process): New funs. | ||
| 1483 | (run-prolog, switch-to-prolog): Rewrite, using them. | ||
| 1484 | (prolog-consult-region): Use inferior-prolog-buffer. | ||
| 1485 | (inferior-prolog-load-file): New function. | ||
| 1486 | (prolog-mode-map): Add bindings for load-file and switch-to-prolog. | ||
| 1487 | |||
| 1488 | * textmodes/fill.el (fill-single-word-nobreak-p): Allow breaking before | ||
| 1489 | last word, if it's not the end of the paragraph. | ||
| 1490 | |||
| 1491 | * files.el (abbreviate-file-name): Don't mistakenly match newlines in | ||
| 1492 | file name. | ||
| 1493 | |||
| 1494 | 2006-09-06 Ralf Angeli <angeli@caeruleus.net> | ||
| 1495 | |||
| 1496 | * frame.el (display-mm-dimensions-alist): New defcustom. | ||
| 1497 | (display-mm-height, display-mm-width): Use it. | ||
| 1498 | |||
| 1499 | 2006-09-06 Simon Josefsson <jas@extundo.com> | ||
| 1500 | |||
| 1501 | * mail/smtpmail.el (smtpmail-starttls-credentials): Doc fix. | ||
| 1502 | |||
| 1503 | 2006-09-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 1504 | |||
| 1505 | * progmodes/gdb-ui.el (gdb-var-list-children-regexp) | ||
| 1506 | (gdb-var-list-children-regexp-1): Tweak regexps to catch full | ||
| 1507 | string values. | ||
| 1508 | |||
| 1509 | 2006-09-06 Kim F. Storm <storm@cua.dk> | ||
| 1510 | |||
| 1511 | * simple.el (line-move-partial): New function to do vscrolling for | ||
| 1512 | partially visible images / tall lines. Rewrite based on code | ||
| 1513 | previously in line-move. Simplify backwards vscrolling. | ||
| 1514 | (line-move): Use it. Simplify. | ||
| 1515 | |||
| 1516 | 2006-09-05 Kim F. Storm <storm@cua.dk> | ||
| 1517 | |||
| 1518 | * emulation/cua-base.el (cua--pre-command-handler-1): Rewrite. | ||
| 1519 | |||
| 1520 | 2006-09-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 1521 | |||
| 1522 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | ||
| 1523 | Process the `gcc-include' after the `gnu' rule. | ||
| 1524 | |||
| 1525 | 2006-09-05 Kim F. Storm <storm@cua.dk> | ||
| 1526 | |||
| 1527 | * ido.el (ido-visit-buffer): Use buffer name if buffer arg is a buffer. | ||
| 1528 | |||
| 1529 | 2006-09-05 Daiki Ueno <ueno@unixuser.org> | ||
| 1530 | |||
| 1531 | * pgg.el (pgg-clear-string): Alias to clear-string for backward | ||
| 1532 | compatibility. | ||
| 1533 | |||
| 1534 | * pgg-gpg.el (pgg-gpg-process-region): Avoid display blinking with | ||
| 1535 | inhibit-redisplay; encode passphrase with locale-coding-system. | ||
| 1536 | |||
| 1537 | 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 1538 | |||
| 1539 | * term/xterm.el (terminal-init-xterm): Add more C-M- bindings. | ||
| 1540 | |||
| 1541 | 2006-09-05 Nick Roberts <nickrob@snap.net.nz> | ||
| 1542 | |||
| 1543 | * progmodes/gdb-ui.el (gdb-var-list-children-regexp) | ||
| 1544 | (gdb-var-list-children-regexp): Make type field optional. | ||
| 1545 | |||
| 1546 | * progmodes/gud.el (gud-speedbar-buttons): Allow for no type | ||
| 1547 | e.g public, protected in C++. | ||
| 1548 | |||
| 1549 | 2006-09-04 John Paul Wallington <jpw@pobox.com> | ||
| 1550 | |||
| 1551 | * simple.el (completion-show-help): New defcustom. | ||
| 1552 | (completion-setup-function): Heed it. | ||
| 1553 | |||
| 1554 | 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 1555 | |||
| 1556 | * term/xterm.el (terminal-init-xterm): Add C-M- bindings. | ||
| 1557 | |||
| 1558 | 2006-09-04 Richard Stallman <rms@gnu.org> | ||
| 1559 | |||
| 1560 | * mail/rmail-spam-filter.el (rsf-scanning-messages-now): Doc fix. | ||
| 1561 | (rsf-min-region-to-spam-list): Doc fix. | ||
| 1562 | (rsf-add-content-type-field): Doc fix. | ||
| 1563 | |||
| 1564 | * simple.el (kill-region): Explicitly test there is a region. | ||
| 1565 | |||
| 1566 | 2006-09-04 Chong Yidong <cyd@stupidchicken.com> | ||
| 1567 | |||
| 1568 | * mail/feedmail.el (feedmail-buffer-to-sendmail): Look for | ||
| 1569 | sendmail in several common directories. | ||
| 1570 | |||
| 1571 | * mail/sendmail.el (sendmail-program): Moved here from paths.el. | ||
| 1572 | |||
| 1573 | * paths.el (sendmail-program): Removed. | ||
| 1574 | |||
| 1575 | 2006-09-04 Daiki Ueno <ueno@unixuser.org> | ||
| 1576 | |||
| 1577 | * pgg-gpg.el (pgg-gpg-process-region): Revert two patches from Satyaki | ||
| 1578 | Das. http://article.gmane.org/gmane.emacs.gnus.general/49947 | ||
| 1579 | http://article.gmane.org/gmane.emacs.gnus.general/50457 | ||
| 1580 | |||
| 1581 | 2006-09-03 Chong Yidong <cyd@stupidchicken.com> | ||
| 1582 | |||
| 1583 | * cus-edit.el (custom-group-menu-create): Avoid deactivating the | ||
| 1584 | mark after running the menu filter. | ||
| 1585 | |||
| 1586 | 2006-09-03 Juri Linkov <juri@jurta.org> | ||
| 1587 | |||
| 1588 | * international/quail.el (quail-defrule-internal): Add a check | ||
| 1589 | if a key is a vector. | ||
| 1590 | |||
| 1591 | 2006-09-02 Juri Linkov <juri@jurta.org> | ||
| 1592 | |||
| 1593 | * man.el (Man-topic-history): New variable. | ||
| 1594 | (man): Use it. | ||
| 1595 | |||
| 1596 | * woman.el (woman-topic-history): Change defvar to defvaralias | ||
| 1597 | for symbol `Man-topic-history'. | ||
| 1598 | |||
| 1599 | * shell.el (shell-filter-ctrl-a-ctrl-b): Check if | ||
| 1600 | `comint-last-output-start' is a marker by using `markerp' and | ||
| 1601 | check if it has a position by using `marker-position', and use | ||
| 1602 | this position for `goto-char'. | ||
| 1603 | |||
| 1604 | * international/quail.el (quail-defrule-internal): Add missing | ||
| 1605 | `error' call for null key. | ||
| 1606 | |||
| 1607 | 2006-09-02 Ryan Yeske <rcyeske@gmail.com> | ||
| 1608 | |||
| 1609 | * rcirc.el (rcirc-keywords): New variable. | ||
| 1610 | (rcirc-bright-nicks, rcirc-dim-nicks): New variables. | ||
| 1611 | (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Remove | ||
| 1612 | variables. | ||
| 1613 | (rcirc-responses-no-activity): New function. | ||
| 1614 | (rcirc-handler-generic): Check for responses in above. | ||
| 1615 | (rcirc-process-command): Add ?: character to arguments of raw | ||
| 1616 | server commands. | ||
| 1617 | (rcirc-format-response-string): Use `rcirc-bright-nicks' and | ||
| 1618 | `rcirc-dim-nicks'. | ||
| 1619 | (rcirc-gray-toggle): Remove unused variable. | ||
| 1620 | (rcirc-print): Remove some tracking logic, which is moved into | ||
| 1621 | markup functions. | ||
| 1622 | (rcirc-activity-types): Was `rcirc-activity-type', now a list of | ||
| 1623 | types. | ||
| 1624 | (rcirc-activity-string): Look for 'keyword in activity-types. | ||
| 1625 | (rcirc-window-configuration-change): Don't erase overlay-arrow | ||
| 1626 | unnecessarily. | ||
| 1627 | (rcirc-add-or-remove): New function. | ||
| 1628 | (rcirc-cmd-ignore): Use it. | ||
| 1629 | (rcirc-message-leader): Remove unused function. | ||
| 1630 | (rcicr-cmd-bright, rcirc-cmd-dim, rcirc-cmd-keyword): New commands. | ||
| 1631 | (rcirc-add-face): New function. | ||
| 1632 | (rcirc-facify): Use rcirc-add-face. | ||
| 1633 | (rcirc-url-regexp): Add parens. | ||
| 1634 | (rcirc-map-regexp): Remove function. | ||
| 1635 | (rcirc-mangle-regexp): Remove function. | ||
| 1636 | (rcirc-markup-text-functions): New variable. | ||
| 1637 | (rcirc-markup-text): New function (replaces `rcirc-mangle-text'). | ||
| 1638 | (rcirc-markup-body-text, rcirc-markup-attributes) | ||
| 1639 | (rcirc-markup-my-nick, rcirc-markup-urls, rcirc-markup-keywords) | ||
| 1640 | (rcirc-markup-bright-nicks): New markup handler functions. | ||
| 1641 | (rcirc-nick-in-message-full-line): New face. | ||
| 1642 | (rcirc-track-nick): Rename from `rcirc-mode-line-nick'. | ||
| 1643 | (rcirc-track-keyword, rcirc-url, rcirc-keyword): New faces. | ||
| 1644 | |||
| 1645 | 2006-09-02 Martin Rudalics <rudalics@gmx.at> | ||
| 1646 | |||
| 1647 | * cus-start.el (hscroll-margin, hscroll-step) | ||
| 1648 | (mode-line-in-non-selected-windows, mouse-autoselect-window) | ||
| 1649 | (x-use-underline-position-properties): Change version to "22.1" | ||
| 1650 | since they will appear there for the first time. | ||
| 1651 | |||
| 1652 | 2006-09-01 Chong Yidong <cyd@stupidchicken.com> | ||
| 1653 | |||
| 1654 | * imenu.el (imenu-update-menubar): Use buffer-chars-modified-tick. | ||
| 1655 | |||
| 1656 | 2006-08-31 Richard Stallman <rms@gnu.org> | ||
| 1657 | |||
| 1658 | * cus-edit.el (custom-save-variables): Slight cleanup. | ||
| 1659 | (Custom-no-edit): Renamed from custom-no-edit. | ||
| 1660 | (Custom-newline): Renamed from custom-newline. | ||
| 1661 | (custom-mode-map): Use new names. | ||
| 1662 | |||
| 1663 | * emacs-lisp/easy-mmode.el (define-minor-mode): Reference manual | ||
| 1664 | about customization, rather than M-x customize, in the doc string | ||
| 1665 | made for the defcustom. | ||
| 1666 | |||
| 1667 | * emacs-lisp/trace.el (trace-function-background): Doc fix. | ||
| 1668 | |||
| 1669 | 2006-08-31 Romain Francoise <romain@orebokech.com> | ||
| 1670 | |||
| 1671 | * dired-x.el (dired-guess-shell-alist-default): Update. | ||
| 1672 | |||
| 1673 | 2006-08-31 Michael Mauger <mmaug@yahoo.com> | ||
| 1674 | |||
| 1675 | * custom.el (custom-theme-set-variables): Autoload packages before | ||
| 1676 | sorting the variables. | ||
| 1677 | |||
| 1678 | 2006-08-30 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 1679 | |||
| 1680 | * viper-cmd.el (viper-special-read-and-insert-char): Convert events to | ||
| 1681 | chars if XEmacs. | ||
| 1682 | (viper-after-change-undo-hook): Check if undo-in-progress is bound. | ||
| 1683 | |||
| 1684 | 2006-08-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1685 | |||
| 1686 | * progmodes/python.el (python-eldoc-function): Re-enable quit while | ||
| 1687 | waiting for process. | ||
| 1688 | |||
| 1689 | 2006-08-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 1690 | |||
| 1691 | * term/mac-win.el (mac-string-to-utxt): If adjustment for MacJapanese | ||
| 1692 | results in ASCII-only string, encode original one directly. | ||
| 1693 | |||
| 1694 | 2006-08-29 Romain Francoise <romain@orebokech.com> | ||
| 1695 | |||
| 1696 | * startup.el (normal-splash-screen, fancy-splash-screens): | ||
| 1697 | Make buffer read-only and arrange to enter view mode if necessary. | ||
| 1698 | |||
| 1699 | 2006-08-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 1700 | |||
| 1701 | * hl-line.el (hl-line): New face. | ||
| 1702 | (hl-line-face): Use it. | ||
| 1703 | |||
| 1704 | * image-mode.el (image-mode): Fix last fix. | ||
| 1705 | Suggested by Kim F. Storm. | ||
| 1706 | |||
| 1707 | 2006-08-29 Michael Albinus <michael.albinus@gmx.de> | ||
| 1708 | |||
| 1709 | Sync with Tramp 2.0.54. | ||
| 1710 | |||
| 1711 | * net/tramp.el (tramp-convert-file-attributes): Call `eql' instead | ||
| 1712 | of `=', because `tramp-get-remote-gid' might not always return an | ||
| 1713 | integer when expected. | ||
| 1714 | (tramp-register-file-name-handlers): `partial-completion-mode' is | ||
| 1715 | unknown to XEmacs. | ||
| 1716 | (tramp-time-diff): Don't use `floor', it might fail for large | ||
| 1717 | differences. | ||
| 1718 | (tramp-handle-make-auto-save-file-name): For Emacs 21, set | ||
| 1719 | `tramp-auto-save-directory' if unset in order to guarantee unique | ||
| 1720 | auto-save file names. | ||
| 1721 | |||
| 1722 | 2006-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 1723 | |||
| 1724 | * image-mode.el (image-mode): Display image as text on a terminal. | ||
| 1725 | |||
| 1726 | 2006-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1727 | |||
| 1728 | * progmodes/python.el (python-send-command): Simplify. | ||
| 1729 | (run-python): Don't generate a new buffer unless `new' was specified. | ||
| 1730 | Make sure we send `import emacs' to the proper process. | ||
| 1731 | |||
| 1732 | * progmodes/python.el (python-send-command): Don't wait for the command | ||
| 1733 | to terminate. Don't fiddle with compilation-parsing-end. | ||
| 1734 | |||
| 1735 | 2006-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 1736 | |||
| 1737 | * emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): | ||
| 1738 | Insert commentary after first line summary. | ||
| 1739 | |||
| 1740 | * woman.el (woman-follow): New function, based on `man-follow'. | ||
| 1741 | (woman-mode-map): Use it. | ||
| 1742 | |||
| 1743 | * ibuffer.el (ibuffer-do-sort-by-recency): Perform full update | ||
| 1744 | since ibuffer-do-sort-by-recency does not define a sorter. | ||
| 1745 | |||
| 1746 | 2006-08-28 Kim F. Storm <storm@cua.dk> | ||
| 1747 | |||
| 1748 | * find-dired.el (find-dired): Use shell-quote-argument to properly | ||
| 1749 | escape ( and ) args. Also use it on {} and ; args in default | ||
| 1750 | value of find-ls-option string. | ||
| 1751 | (find-grep-dired): Use shell-quote-argument on {} and ; args. | ||
| 1752 | |||
| 1 | 2006-08-27 Michael Olson <mwolson@gnu.org> | 1753 | 2006-08-27 Michael Olson <mwolson@gnu.org> |
| 2 | 1754 | ||
| 3 | * emacs-lisp/tq.el: Small grammar fix in comments. | 1755 | * emacs-lisp/tq.el: Small grammar fix in comments. |
| @@ -96,7 +1848,8 @@ | |||
| 96 | * progmodes/grep.el (grep-find-use-xargs): Use explicit value `exec' | 1848 | * progmodes/grep.el (grep-find-use-xargs): Use explicit value `exec' |
| 97 | to mean "use find -exec"; nil now unambiguously means auto-detect. | 1849 | to mean "use find -exec"; nil now unambiguously means auto-detect. |
| 98 | (grep-compute-defaults): Set grep-find-use-xargs to `exec' if not `gnu'. | 1850 | (grep-compute-defaults): Set grep-find-use-xargs to `exec' if not `gnu'. |
| 99 | Use shell-quote-argument to build grep-find-command and grep-find-template. | 1851 | Use shell-quote-argument to build grep-find-command and |
| 1852 | grep-find-template. | ||
| 100 | (rgrep): Use shell-quote-argument to properly quote arguments to find. | 1853 | (rgrep): Use shell-quote-argument to properly quote arguments to find. |
| 101 | Reported by Tom Seddon. | 1854 | Reported by Tom Seddon. |
| 102 | 1855 | ||
| @@ -1088,7 +2841,7 @@ | |||
| 1088 | repertoire of unit tests. Called just before the provide iff user | 2841 | repertoire of unit tests. Called just before the provide iff user |
| 1089 | has customized `allout-run-unit-tests-on-load' non-nil. | 2842 | has customized `allout-run-unit-tests-on-load' non-nil. |
| 1090 | 2843 | ||
| 1091 | 2006-07-14 K,Aa(Broly L,Bu(Brentey <lorentey@elte.hu> | 2844 | 2006-07-14 K,Aa(Broly L$,1 q(Brentey <lorentey@elte.hu> |
| 1092 | 2845 | ||
| 1093 | * emacs-lisp/authors.el (authors-aliases): Update. | 2846 | * emacs-lisp/authors.el (authors-aliases): Update. |
| 1094 | 2847 | ||
| @@ -2948,7 +4701,7 @@ | |||
| 2948 | compatibility function (Emacs 18/19). | 4701 | compatibility function (Emacs 18/19). |
| 2949 | (idlwave-is-continuation-line): Always return point at start of | 4702 | (idlwave-is-continuation-line): Always return point at start of |
| 2950 | previous non-blank continuation line. | 4703 | previous non-blank continuation line. |
| 2951 | `keyword-parameters': Fix continued comment font-lock matcher. | 4704 | (keyword-parameters): Fix continued comment font-lock matcher. |
| 2952 | (idlwave-font-lock-fontify-region): Written, use as | 4705 | (idlwave-font-lock-fontify-region): Written, use as |
| 2953 | font-lock-fontify-region-function, to fix continued keyword | 4706 | font-lock-fontify-region-function, to fix continued keyword |
| 2954 | fontification issues. | 4707 | fontification issues. |
| @@ -3201,7 +4954,7 @@ | |||
| 3201 | (mac-TIFF-to-string): New functions. | 4954 | (mac-TIFF-to-string): New functions. |
| 3202 | (x-get-selection, x-selection-value) | 4955 | (x-get-selection, x-selection-value) |
| 3203 | (mac-select-convert-to-string): Use them. | 4956 | (mac-select-convert-to-string): Use them. |
| 3204 | (mac-text-encoding-mac-japanese-basic-variant): New constant. | 4957 | (mac-text-encoding-mac-japanese-basic-variant): New constant. |
| 3205 | (mac-dnd-types-alist): New customization variable. | 4958 | (mac-dnd-types-alist): New customization variable. |
| 3206 | (mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt) | 4959 | (mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt) |
| 3207 | (mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data) | 4960 | (mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data) |
| @@ -3720,7 +5473,7 @@ | |||
| 3720 | Sync with Tramp 2.0.53. | 5473 | Sync with Tramp 2.0.53. |
| 3721 | 5474 | ||
| 3722 | * net/tramp.el (tramp-completion-mode): ?\t has event-modifier | 5475 | * net/tramp.el (tramp-completion-mode): ?\t has event-modifier |
| 3723 | 'control. Reported by Matthias F,bv(Brste <slashdevslashnull@gmx.net>. | 5476 | 'control. Reported by Matthias F,Av(Brste <slashdevslashnull@gmx.net>. |
| 3724 | (tramp-completion-file-name-handler): Add autoload cookie for | 5477 | (tramp-completion-file-name-handler): Add autoload cookie for |
| 3725 | adding to `file-name-handler-alist'. | 5478 | adding to `file-name-handler-alist'. |
| 3726 | 5479 | ||
| @@ -8314,7 +10067,7 @@ | |||
| 8314 | Let term-handle-ansi-terminal-messages override what Bash says about | 10067 | Let term-handle-ansi-terminal-messages override what Bash says about |
| 8315 | its current directory. | 10068 | its current directory. |
| 8316 | 10069 | ||
| 8317 | 2005-12-16 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | 10070 | 2005-12-16 K,Aa(Broly L$,1 q(Brentey <lorentey@elte.hu> |
| 8318 | 10071 | ||
| 8319 | * bindings.el (last-buffer): Move to simple.el. | 10072 | * bindings.el (last-buffer): Move to simple.el. |
| 8320 | * simple.el (last-buffer): Move here. | 10073 | * simple.el (last-buffer): Move here. |
| @@ -10071,7 +11824,7 @@ | |||
| 10071 | prompts work for AUTH PLAIN. Also reported by Steve Allan | 11824 | prompts work for AUTH PLAIN. Also reported by Steve Allan |
| 10072 | <seallan@verizon.net>. | 11825 | <seallan@verizon.net>. |
| 10073 | 11826 | ||
| 10074 | 2005-12-06 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | 11827 | 2005-12-06 K,Aa(Broly L$,1 q(Brentey <lorentey@elte.hu> |
| 10075 | 11828 | ||
| 10076 | * frame.el (set-frame-parameter): Add doc string. | 11829 | * frame.el (set-frame-parameter): Add doc string. |
| 10077 | 11830 | ||
| @@ -10455,7 +12208,7 @@ | |||
| 10455 | (flyspell-post-command-hook): Check input-pending-p while processing | 12208 | (flyspell-post-command-hook): Check input-pending-p while processing |
| 10456 | the potentially long list of buffer changes. | 12209 | the potentially long list of buffer changes. |
| 10457 | 12210 | ||
| 10458 | 2005-11-28 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | 12211 | 2005-11-28 K,Aa(Broly L$,1 q(Brentey <lorentey@elte.hu> |
| 10459 | 12212 | ||
| 10460 | * buff-menu.el (list-buffers-noselect): Display the selected | 12213 | * buff-menu.el (list-buffers-noselect): Display the selected |
| 10461 | frame's buffer list, not the global one. | 12214 | frame's buffer list, not the global one. |
| @@ -15598,8 +17351,9 @@ | |||
| 15598 | Move to beginning of file. | 17351 | Move to beginning of file. |
| 15599 | (scheme-interaction-mode-commands-alist) | 17352 | (scheme-interaction-mode-commands-alist) |
| 15600 | (scheme-interaction-mode-map, scheme-debugger-mode-map): | 17353 | (scheme-interaction-mode-map, scheme-debugger-mode-map): |
| 15601 | Declare them before use. Note: the initialization code for the variables | 17354 | Declare them before use. Note: the initialization code for the |
| 15602 | has not been moved because it uses functions that reference the variables. | 17355 | variables has not been moved because it uses functions that reference |
| 17356 | the variables. | ||
| 15603 | (xscheme-control-g-message-string, xscheme-process-filter-alist) | 17357 | (xscheme-control-g-message-string, xscheme-process-filter-alist) |
| 15604 | (xscheme-prompt-for-expression-map): Declare them before use. | 17358 | (xscheme-prompt-for-expression-map): Declare them before use. |
| 15605 | (scheme-debugger-mode-commands): "?\ " -> "?\s". | 17359 | (scheme-debugger-mode-commands): "?\ " -> "?\s". |
diff --git a/lisp/add-log.el b/lisp/add-log.el index 393a696d3f1..d60f920244a 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -914,7 +914,7 @@ Has a preference of looking backwards." | |||
| 914 | ;; Include certain keywords if they | 914 | ;; Include certain keywords if they |
| 915 | ;; precede the name. | 915 | ;; precede the name. |
| 916 | (setq middle (point)) | 916 | (setq middle (point)) |
| 917 | (forward-word -1) | 917 | (forward-sexp -1) |
| 918 | ;; Is this C++ method? | 918 | ;; Is this C++ method? |
| 919 | (when (and (< 2 middle) | 919 | (when (and (< 2 middle) |
| 920 | (string= (buffer-substring (- middle 2) | 920 | (string= (buffer-substring (- middle 2) |
diff --git a/lisp/allout.el b/lisp/allout.el index 379f664d092..b38d38d9e87 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -698,9 +698,11 @@ unless optional third, non-nil element is present.") | |||
| 698 | ("*" allout-rebullet-current-heading) | 698 | ("*" allout-rebullet-current-heading) |
| 699 | ("#" allout-number-siblings) | 699 | ("#" allout-number-siblings) |
| 700 | ("\C-k" allout-kill-line t) | 700 | ("\C-k" allout-kill-line t) |
| 701 | ("\M-k" allout-copy-line-as-kill t) | ||
| 701 | ("\C-y" allout-yank t) | 702 | ("\C-y" allout-yank t) |
| 702 | ("\M-y" allout-yank-pop t) | 703 | ("\M-y" allout-yank-pop t) |
| 703 | ("\C-k" allout-kill-topic) | 704 | ("\C-k" allout-kill-topic) |
| 705 | ("\M-k" allout-copy-topic-as-kill) | ||
| 704 | ; Miscellaneous commands: | 706 | ; Miscellaneous commands: |
| 705 | ;([?\C-\ ] allout-mark-topic) | 707 | ;([?\C-\ ] allout-mark-topic) |
| 706 | ("@" allout-resolve-xref) | 708 | ("@" allout-resolve-xref) |
| @@ -847,18 +849,37 @@ and `allout-distinctive-bullets-string'.") | |||
| 847 | (defvar allout-bullets-string-len 0 | 849 | (defvar allout-bullets-string-len 0 |
| 848 | "Length of current buffers' `allout-plain-bullets-string'.") | 850 | "Length of current buffers' `allout-plain-bullets-string'.") |
| 849 | (make-variable-buffer-local 'allout-bullets-string-len) | 851 | (make-variable-buffer-local 'allout-bullets-string-len) |
| 852 | ;;;_ = allout-depth-specific-regexp | ||
| 853 | (defvar allout-depth-specific-regexp "" | ||
| 854 | "*Regular expression to match a heading line prefix for a particular depth. | ||
| 855 | |||
| 856 | This expression is used to search for depth-specific topic | ||
| 857 | headers at depth 2 and greater. Use `allout-depth-one-regexp' | ||
| 858 | for to seek topics at depth one. | ||
| 859 | |||
| 860 | This var is set according to the user configuration vars by | ||
| 861 | `set-allout-regexp'. It is prepared with format strings for two | ||
| 862 | decimal numbers, which should each be one less than the depth of the | ||
| 863 | topic prefix to be matched.") | ||
| 864 | (make-variable-buffer-local 'allout-depth-specific-regexp) | ||
| 865 | ;;;_ = allout-depth-one-regexp | ||
| 866 | (defvar allout-depth-one-regexp "" | ||
| 867 | "*Regular expression to match a heading line prefix for depth one. | ||
| 868 | |||
| 869 | This var is set according to the user configuration vars by | ||
| 870 | `set-allout-regexp'. It is prepared with format strings for two | ||
| 871 | decimal numbers, which should each be one less than the depth of the | ||
| 872 | topic prefix to be matched.") | ||
| 873 | (make-variable-buffer-local 'allout-depth-one-regexp) | ||
| 850 | ;;;_ = allout-line-boundary-regexp | 874 | ;;;_ = allout-line-boundary-regexp |
| 851 | (defvar allout-line-boundary-regexp () | 875 | (defvar allout-line-boundary-regexp () |
| 852 | "`allout-regexp' with outline style beginning-of-line anchor. | 876 | "`allout-regexp' with outline style beginning-of-line anchor. |
| 853 | 877 | ||
| 854 | This is properly set when `allout-regexp' is produced by | 878 | This is properly set by `set-allout-regexp'.") |
| 855 | `set-allout-regexp', so that (match-beginning 2) and (match-end | ||
| 856 | 2) delimit the prefix.") | ||
| 857 | (make-variable-buffer-local 'allout-line-boundary-regexp) | 879 | (make-variable-buffer-local 'allout-line-boundary-regexp) |
| 858 | ;;;_ = allout-bob-regexp | 880 | ;;;_ = allout-bob-regexp |
| 859 | (defvar allout-bob-regexp () | 881 | (defvar allout-bob-regexp () |
| 860 | "Like `allout-line-boundary-regexp', for headers at beginning of buffer. | 882 | "Like `allout-line-boundary-regexp', for headers at beginning of buffer.") |
| 861 | \(match-beginning 2) and \(match-end 2) delimit the prefix.") | ||
| 862 | (make-variable-buffer-local 'allout-bob-regexp) | 883 | (make-variable-buffer-local 'allout-bob-regexp) |
| 863 | ;;;_ = allout-header-subtraction | 884 | ;;;_ = allout-header-subtraction |
| 864 | (defvar allout-header-subtraction (1- (length allout-header-prefix)) | 885 | (defvar allout-header-subtraction (1- (length allout-header-prefix)) |
| @@ -869,7 +890,14 @@ This is properly set when `allout-regexp' is produced by | |||
| 869 | "Length of `allout-plain-bullets-string', updated by `set-allout-regexp'.") | 890 | "Length of `allout-plain-bullets-string', updated by `set-allout-regexp'.") |
| 870 | (make-variable-buffer-local 'allout-plain-bullets-string-len) | 891 | (make-variable-buffer-local 'allout-plain-bullets-string-len) |
| 871 | 892 | ||
| 893 | ;;;_ = allout-doublecheck-at-and-shallower | ||
| 894 | (defconst allout-doublecheck-at-and-shallower 3 | ||
| 895 | "Verify apparent topics of this depth and shallower as being non-aberrant. | ||
| 872 | 896 | ||
| 897 | Verified with `allout-aberrant-container-p'. This check's usefulness is | ||
| 898 | limited to shallow prospects, because the determination of aberrance | ||
| 899 | depends on the mistaken item being followed by a legitimate item of | ||
| 900 | excessively greater depth.") | ||
| 873 | ;;;_ X allout-reset-header-lead (header-lead) | 901 | ;;;_ X allout-reset-header-lead (header-lead) |
| 874 | (defun allout-reset-header-lead (header-lead) | 902 | (defun allout-reset-header-lead (header-lead) |
| 875 | "*Reset the leading string used to identify topic headers." | 903 | "*Reset the leading string used to identify topic headers." |
| @@ -961,7 +989,9 @@ file is programming code." | |||
| 961 | "Generate proper topic-header regexp form for outline functions. | 989 | "Generate proper topic-header regexp form for outline functions. |
| 962 | 990 | ||
| 963 | Works with respect to `allout-plain-bullets-string' and | 991 | Works with respect to `allout-plain-bullets-string' and |
| 964 | `allout-distinctive-bullets-string'." | 992 | `allout-distinctive-bullets-string'. |
| 993 | |||
| 994 | Also refresh various data structures that hinge on the regexp." | ||
| 965 | 995 | ||
| 966 | (interactive) | 996 | (interactive) |
| 967 | ;; Derive allout-bullets-string from user configured components: | 997 | ;; Derive allout-bullets-string from user configured components: |
| @@ -996,19 +1026,84 @@ Works with respect to `allout-plain-bullets-string' and | |||
| 996 | ;; Derive next for repeated use in allout-pending-bullet: | 1026 | ;; Derive next for repeated use in allout-pending-bullet: |
| 997 | (setq allout-plain-bullets-string-len (length allout-plain-bullets-string)) | 1027 | (setq allout-plain-bullets-string-len (length allout-plain-bullets-string)) |
| 998 | (setq allout-header-subtraction (1- (length allout-header-prefix))) | 1028 | (setq allout-header-subtraction (1- (length allout-header-prefix))) |
| 999 | ;; Produce the new allout-regexp: | 1029 | |
| 1000 | (setq allout-regexp (concat "\\(" | 1030 | (let (new-part old-part) |
| 1001 | (regexp-quote allout-header-prefix) | 1031 | (setq new-part (concat "\\(" |
| 1002 | "[ \t]*[" | 1032 | (regexp-quote allout-header-prefix) |
| 1003 | allout-bullets-string | 1033 | "[ \t]*" |
| 1004 | "]\\)\\|" | 1034 | ;; already regexp-quoted in a custom way: |
| 1005 | (regexp-quote allout-primary-bullet) | 1035 | "[" allout-bullets-string "]" |
| 1006 | "+\\|\^l")) | 1036 | "\\)") |
| 1007 | (setq allout-line-boundary-regexp | 1037 | old-part (concat "\\(" |
| 1008 | (concat "\\(\n\\)\\(" allout-regexp "\\)")) | 1038 | (regexp-quote allout-primary-bullet) |
| 1009 | (setq allout-bob-regexp | 1039 | "\\|" |
| 1010 | (concat "\\(\\`\\)\\(" allout-regexp "\\)")) | 1040 | (regexp-quote allout-header-prefix) |
| 1011 | ) | 1041 | "\\)" |
| 1042 | "+" | ||
| 1043 | " ?[^" allout-primary-bullet "]") | ||
| 1044 | allout-regexp (concat new-part | ||
| 1045 | "\\|" | ||
| 1046 | old-part | ||
| 1047 | "\\|\^l") | ||
| 1048 | |||
| 1049 | allout-line-boundary-regexp (concat "\n" new-part | ||
| 1050 | "\\|" | ||
| 1051 | "\n" old-part) | ||
| 1052 | |||
| 1053 | allout-bob-regexp (concat "\\`" new-part | ||
| 1054 | "\\|" | ||
| 1055 | "\\`" old-part)) | ||
| 1056 | |||
| 1057 | (setq allout-depth-specific-regexp | ||
| 1058 | (concat "\\(^\\|\\`\\)" | ||
| 1059 | "\\(" | ||
| 1060 | |||
| 1061 | ;; new-style spacers-then-bullet string: | ||
| 1062 | "\\(" | ||
| 1063 | (allout-format-quote (regexp-quote allout-header-prefix)) | ||
| 1064 | " \\{%s\\}" | ||
| 1065 | "[" (allout-format-quote allout-bullets-string) "]" | ||
| 1066 | "\\)" | ||
| 1067 | |||
| 1068 | ;; old-style all-bullets string, if primary not multi-char: | ||
| 1069 | (if (< 0 allout-header-subtraction) | ||
| 1070 | "" | ||
| 1071 | (concat "\\|\\(" | ||
| 1072 | (allout-format-quote | ||
| 1073 | (regexp-quote allout-primary-bullet)) | ||
| 1074 | (allout-format-quote | ||
| 1075 | (regexp-quote allout-primary-bullet)) | ||
| 1076 | (allout-format-quote | ||
| 1077 | (regexp-quote allout-primary-bullet)) | ||
| 1078 | "\\{%s\\}" | ||
| 1079 | ;; disqualify greater depths: | ||
| 1080 | "[^" | ||
| 1081 | (allout-format-quote allout-primary-bullet) | ||
| 1082 | "]\\)" | ||
| 1083 | )) | ||
| 1084 | "\\)" | ||
| 1085 | )) | ||
| 1086 | (setq allout-depth-one-regexp | ||
| 1087 | (concat "\\(^\\|\\`\\)" | ||
| 1088 | "\\(" | ||
| 1089 | |||
| 1090 | "\\(" | ||
| 1091 | (regexp-quote allout-header-prefix) | ||
| 1092 | ;; disqualify any bullet char following any amount of | ||
| 1093 | ;; intervening whitespace: | ||
| 1094 | " *" | ||
| 1095 | (concat "[^ " allout-bullets-string "]") | ||
| 1096 | "\\)" | ||
| 1097 | (if (< 0 allout-header-subtraction) | ||
| 1098 | ;; Need not support anything like the old | ||
| 1099 | ;; bullet style if the prefix is multi-char. | ||
| 1100 | "" | ||
| 1101 | (concat "\\|" | ||
| 1102 | (regexp-quote allout-primary-bullet) | ||
| 1103 | ;; disqualify deeper primary-bullet sequences: | ||
| 1104 | "[^" allout-primary-bullet "]")) | ||
| 1105 | "\\)" | ||
| 1106 | )))) | ||
| 1012 | ;;;_ : Key bindings | 1107 | ;;;_ : Key bindings |
| 1013 | ;;;_ = allout-mode-map | 1108 | ;;;_ = allout-mode-map |
| 1014 | (defvar allout-mode-map nil "Keybindings for (allout) outline minor mode.") | 1109 | (defvar allout-mode-map nil "Keybindings for (allout) outline minor mode.") |
| @@ -1142,7 +1237,7 @@ The settings are stored on `allout-mode-prior-settings'." | |||
| 1142 | (if (not (symbolp name)) | 1237 | (if (not (symbolp name)) |
| 1143 | (error "Pair's name, %S, must be a symbol, not %s" | 1238 | (error "Pair's name, %S, must be a symbol, not %s" |
| 1144 | name (type-of name))) | 1239 | name (type-of name))) |
| 1145 | (setq prior-value (condition-case err | 1240 | (setq prior-value (condition-case nil |
| 1146 | (symbol-value name) | 1241 | (symbol-value name) |
| 1147 | (void-variable nil))) | 1242 | (void-variable nil))) |
| 1148 | (when (not (assoc name allout-mode-prior-settings)) | 1243 | (when (not (assoc name allout-mode-prior-settings)) |
| @@ -1186,7 +1281,7 @@ their settings before allout-mode was started." | |||
| 1186 | ;;;_ > allout-unprotected (expr) | 1281 | ;;;_ > allout-unprotected (expr) |
| 1187 | (defmacro allout-unprotected (expr) | 1282 | (defmacro allout-unprotected (expr) |
| 1188 | "Enable internal outline operations to alter invisible text." | 1283 | "Enable internal outline operations to alter invisible text." |
| 1189 | `(let ((inhibit-read-only t) | 1284 | `(let ((inhibit-read-only (if (not buffer-read-only) t)) |
| 1190 | (inhibit-field-text-motion t)) | 1285 | (inhibit-field-text-motion t)) |
| 1191 | ,expr)) | 1286 | ,expr)) |
| 1192 | ;;;_ = allout-mode-hook | 1287 | ;;;_ = allout-mode-hook |
| @@ -1600,7 +1695,9 @@ The bindings are dictated by the `allout-keybindings-list' and | |||
| 1600 | Topic-oriented Killing and Yanking: | 1695 | Topic-oriented Killing and Yanking: |
| 1601 | ---------------------------------- | 1696 | ---------------------------------- |
| 1602 | \\[allout-kill-topic] allout-kill-topic Kill current topic, including offspring. | 1697 | \\[allout-kill-topic] allout-kill-topic Kill current topic, including offspring. |
| 1603 | \\[allout-kill-line] allout-kill-line Like kill-line, but reconciles numbering, etc. | 1698 | \\[allout-copy-topic-as-kill] allout-copy-topic-as-kill Copy current topic, including offspring. |
| 1699 | \\[allout-kill-line] allout-kill-line kill-line, attending to outline structure. | ||
| 1700 | \\[allout-copy-line-as-kill] allout-copy-line-as-kill Copy line but don't delete it. | ||
| 1604 | \\[allout-yank] allout-yank Yank, adjusting depth of yanked topic to | 1701 | \\[allout-yank] allout-yank Yank, adjusting depth of yanked topic to |
| 1605 | depth of heading if yanking into bare topic | 1702 | depth of heading if yanking into bare topic |
| 1606 | heading (ie, prefix sans text). | 1703 | heading (ie, prefix sans text). |
| @@ -1792,8 +1889,7 @@ OPEN: A topic that is not closed, though its offspring or body may be." | |||
| 1792 | (remove-from-invisibility-spec '(allout . t)) | 1889 | (remove-from-invisibility-spec '(allout . t)) |
| 1793 | (remove-hook 'pre-command-hook 'allout-pre-command-business t) | 1890 | (remove-hook 'pre-command-hook 'allout-pre-command-business t) |
| 1794 | (remove-hook 'post-command-hook 'allout-post-command-business t) | 1891 | (remove-hook 'post-command-hook 'allout-post-command-business t) |
| 1795 | (when (featurep 'xemacs) | 1892 | (remove-hook 'before-change-functions 'allout-before-change-handler t) |
| 1796 | (remove-hook 'before-change-functions 'allout-before-change-handler t)) | ||
| 1797 | (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) | 1893 | (remove-hook 'isearch-mode-end-hook 'allout-isearch-end-handler t) |
| 1798 | (remove-hook write-file-hook-var-name 'allout-write-file-hook-handler t) | 1894 | (remove-hook write-file-hook-var-name 'allout-write-file-hook-handler t) |
| 1799 | (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) | 1895 | (remove-hook 'auto-save-hook 'allout-auto-save-hook-handler t) |
| @@ -1813,7 +1909,7 @@ OPEN: A topic that is not closed, though its offspring or body may be." | |||
| 1813 | 1909 | ||
| 1814 | (allout-overlay-preparations) ; Doesn't hurt to redo this. | 1910 | (allout-overlay-preparations) ; Doesn't hurt to redo this. |
| 1815 | 1911 | ||
| 1816 | (allout-infer-header-lead) | 1912 | (allout-infer-header-lead-and-primary-bullet) |
| 1817 | (allout-infer-body-reindent) | 1913 | (allout-infer-body-reindent) |
| 1818 | 1914 | ||
| 1819 | (set-allout-regexp) | 1915 | (set-allout-regexp) |
| @@ -1854,9 +1950,8 @@ OPEN: A topic that is not closed, though its offspring or body may be." | |||
| 1854 | (allout-add-resumptions '(line-move-ignore-invisible t)) | 1950 | (allout-add-resumptions '(line-move-ignore-invisible t)) |
| 1855 | (add-hook 'pre-command-hook 'allout-pre-command-business nil t) | 1951 | (add-hook 'pre-command-hook 'allout-pre-command-business nil t) |
| 1856 | (add-hook 'post-command-hook 'allout-post-command-business nil t) | 1952 | (add-hook 'post-command-hook 'allout-post-command-business nil t) |
| 1857 | (when (featurep 'xemacs) | 1953 | (add-hook 'before-change-functions 'allout-before-change-handler |
| 1858 | (add-hook 'before-change-functions 'allout-before-change-handler | 1954 | nil t) |
| 1859 | nil t)) | ||
| 1860 | (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t) | 1955 | (add-hook 'isearch-mode-end-hook 'allout-isearch-end-handler nil t) |
| 1861 | (add-hook write-file-hook-var-name 'allout-write-file-hook-handler | 1956 | (add-hook write-file-hook-var-name 'allout-write-file-hook-handler |
| 1862 | nil t) | 1957 | nil t) |
| @@ -1996,18 +2091,20 @@ internal functions use this feature cohesively bunch changes." | |||
| 1996 | (defun allout-before-change-handler (beg end) | 2091 | (defun allout-before-change-handler (beg end) |
| 1997 | "Protect against changes to invisible text. | 2092 | "Protect against changes to invisible text. |
| 1998 | 2093 | ||
| 1999 | See allout-overlay-interior-modification-handler for details. | 2094 | See allout-overlay-interior-modification-handler for details." |
| 2095 | |||
| 2096 | (if (and (allout-mode-p) undo-in-progress (allout-hidden-p)) | ||
| 2097 | (allout-show-to-offshoot)) | ||
| 2000 | 2098 | ||
| 2001 | This before-change handler is used only where modification-hooks | ||
| 2002 | overlay property is not supported." | ||
| 2003 | ;; allout-overlay-interior-modification-handler on an overlay handles | 2099 | ;; allout-overlay-interior-modification-handler on an overlay handles |
| 2004 | ;; this in other emacs, via `allout-exposure-category's 'modification-hooks. | 2100 | ;; this in other emacs, via `allout-exposure-category's 'modification-hooks. |
| 2005 | (when (and (featurep 'xemacs) (allout-mode-p)) | 2101 | (when (and (featurep 'xemacs) (allout-mode-p)) |
| 2006 | ;; process all of the pending overlays: | 2102 | ;; process all of the pending overlays: |
| 2007 | (dolist (overlay (overlays-in beg end)) | 2103 | (save-excursion |
| 2008 | (if (eq (overlay-get ol 'invisible) 'allout) | 2104 | (got-char beg) |
| 2009 | (allout-overlay-interior-modification-handler | 2105 | (let ((overlay (allout-get-invisibility-overlay))) |
| 2010 | overlay nil beg end nil))))) | 2106 | (allout-overlay-interior-modification-handler |
| 2107 | overlay nil beg end nil))))) | ||
| 2011 | ;;;_ > allout-isearch-end-handler (&optional overlay) | 2108 | ;;;_ > allout-isearch-end-handler (&optional overlay) |
| 2012 | (defun allout-isearch-end-handler (&optional overlay) | 2109 | (defun allout-isearch-end-handler (&optional overlay) |
| 2013 | "Reconcile allout outline exposure on arriving in hidden text after isearch. | 2110 | "Reconcile allout outline exposure on arriving in hidden text after isearch. |
| @@ -2035,19 +2132,35 @@ function can also be used as an `isearch-mode-end-hook'." | |||
| 2035 | (defvar allout-recent-prefix-end 0 | 2132 | (defvar allout-recent-prefix-end 0 |
| 2036 | "Buffer point of the end of the last topic prefix encountered.") | 2133 | "Buffer point of the end of the last topic prefix encountered.") |
| 2037 | (make-variable-buffer-local 'allout-recent-prefix-end) | 2134 | (make-variable-buffer-local 'allout-recent-prefix-end) |
| 2135 | ;;;_ = allout-recent-depth | ||
| 2136 | (defvar allout-recent-depth 0 | ||
| 2137 | "Depth of the last topic prefix encountered.") | ||
| 2138 | (make-variable-buffer-local 'allout-recent-depth) | ||
| 2038 | ;;;_ = allout-recent-end-of-subtree | 2139 | ;;;_ = allout-recent-end-of-subtree |
| 2039 | (defvar allout-recent-end-of-subtree 0 | 2140 | (defvar allout-recent-end-of-subtree 0 |
| 2040 | "Buffer point last returned by `allout-end-of-current-subtree'.") | 2141 | "Buffer point last returned by `allout-end-of-current-subtree'.") |
| 2041 | (make-variable-buffer-local 'allout-recent-end-of-subtree) | 2142 | (make-variable-buffer-local 'allout-recent-end-of-subtree) |
| 2042 | ;;;_ > allout-prefix-data (beg end) | 2143 | ;;;_ > allout-prefix-data () |
| 2043 | (defmacro allout-prefix-data (beg end) | 2144 | (defsubst allout-prefix-data () |
| 2044 | "Register allout-prefix state data - BEGINNING and END of prefix. | 2145 | "Register allout-prefix state data. |
| 2045 | 2146 | ||
| 2046 | For reference by `allout-recent' funcs. Returns BEGINNING." | 2147 | For reference by `allout-recent' funcs. Returns BEGINNING." |
| 2047 | `(setq allout-recent-prefix-end ,end | 2148 | (setq allout-recent-prefix-end (or (match-end 1) (match-end 2)) |
| 2048 | allout-recent-prefix-beginning ,beg)) | 2149 | allout-recent-prefix-beginning (or (match-beginning 1) |
| 2150 | (match-beginning 2)) | ||
| 2151 | allout-recent-depth (max 1 (- allout-recent-prefix-end | ||
| 2152 | allout-recent-prefix-beginning | ||
| 2153 | allout-header-subtraction))) | ||
| 2154 | allout-recent-prefix-beginning) | ||
| 2155 | ;;;_ > nullify-allout-prefix-data () | ||
| 2156 | (defsubst nullify-allout-prefix-data () | ||
| 2157 | "Mark allout prefix data as being uninformative." | ||
| 2158 | (setq allout-recent-prefix-end (point) | ||
| 2159 | allout-recent-prefix-beginning (point) | ||
| 2160 | allout-recent-depth 0) | ||
| 2161 | allout-recent-prefix-beginning) | ||
| 2049 | ;;;_ > allout-recent-depth () | 2162 | ;;;_ > allout-recent-depth () |
| 2050 | (defmacro allout-recent-depth () | 2163 | (defsubst allout-recent-depth () |
| 2051 | "Return depth of last heading encountered by an outline maneuvering function. | 2164 | "Return depth of last heading encountered by an outline maneuvering function. |
| 2052 | 2165 | ||
| 2053 | All outline functions which directly do string matches to assess | 2166 | All outline functions which directly do string matches to assess |
| @@ -2055,19 +2168,17 @@ headings set the variables `allout-recent-prefix-beginning' and | |||
| 2055 | `allout-recent-prefix-end' if successful. This function uses those settings | 2168 | `allout-recent-prefix-end' if successful. This function uses those settings |
| 2056 | to return the current depth." | 2169 | to return the current depth." |
| 2057 | 2170 | ||
| 2058 | '(max 1 (- allout-recent-prefix-end | 2171 | allout-recent-depth) |
| 2059 | allout-recent-prefix-beginning | ||
| 2060 | allout-header-subtraction))) | ||
| 2061 | ;;;_ > allout-recent-prefix () | 2172 | ;;;_ > allout-recent-prefix () |
| 2062 | (defmacro allout-recent-prefix () | 2173 | (defsubst allout-recent-prefix () |
| 2063 | "Like `allout-recent-depth', but returns text of last encountered prefix. | 2174 | "Like `allout-recent-depth', but returns text of last encountered prefix. |
| 2064 | 2175 | ||
| 2065 | All outline functions which directly do string matches to assess | 2176 | All outline functions which directly do string matches to assess |
| 2066 | headings set the variables `allout-recent-prefix-beginning' and | 2177 | headings set the variables `allout-recent-prefix-beginning' and |
| 2067 | `allout-recent-prefix-end' if successful. This function uses those settings | 2178 | `allout-recent-prefix-end' if successful. This function uses those settings |
| 2068 | to return the current depth." | 2179 | to return the current prefix." |
| 2069 | '(buffer-substring allout-recent-prefix-beginning | 2180 | (buffer-substring-no-properties allout-recent-prefix-beginning |
| 2070 | allout-recent-prefix-end)) | 2181 | allout-recent-prefix-end)) |
| 2071 | ;;;_ > allout-recent-bullet () | 2182 | ;;;_ > allout-recent-bullet () |
| 2072 | (defmacro allout-recent-bullet () | 2183 | (defmacro allout-recent-bullet () |
| 2073 | "Like allout-recent-prefix, but returns bullet of last encountered prefix. | 2184 | "Like allout-recent-prefix, but returns bullet of last encountered prefix. |
| @@ -2076,8 +2187,8 @@ All outline functions which directly do string matches to assess | |||
| 2076 | headings set the variables `allout-recent-prefix-beginning' and | 2187 | headings set the variables `allout-recent-prefix-beginning' and |
| 2077 | `allout-recent-prefix-end' if successful. This function uses those settings | 2188 | `allout-recent-prefix-end' if successful. This function uses those settings |
| 2078 | to return the current depth of the most recently matched topic." | 2189 | to return the current depth of the most recently matched topic." |
| 2079 | '(buffer-substring (1- allout-recent-prefix-end) | 2190 | '(buffer-substring-no-properties (1- allout-recent-prefix-end) |
| 2080 | allout-recent-prefix-end)) | 2191 | allout-recent-prefix-end)) |
| 2081 | 2192 | ||
| 2082 | ;;;_ #4 Navigation | 2193 | ;;;_ #4 Navigation |
| 2083 | 2194 | ||
| @@ -2091,7 +2202,9 @@ Actually, returns prefix beginning point." | |||
| 2091 | (save-excursion | 2202 | (save-excursion |
| 2092 | (allout-beginning-of-current-line) | 2203 | (allout-beginning-of-current-line) |
| 2093 | (and (looking-at allout-regexp) | 2204 | (and (looking-at allout-regexp) |
| 2094 | (allout-prefix-data (match-beginning 0) (match-end 0))))) | 2205 | (allout-prefix-data) |
| 2206 | (or (> allout-recent-depth allout-doublecheck-at-and-shallower) | ||
| 2207 | (not (allout-aberrant-container-p)))))) | ||
| 2095 | ;;;_ > allout-on-heading-p () | 2208 | ;;;_ > allout-on-heading-p () |
| 2096 | (defalias 'allout-on-heading-p 'allout-on-current-heading-p) | 2209 | (defalias 'allout-on-heading-p 'allout-on-current-heading-p) |
| 2097 | ;;;_ > allout-e-o-prefix-p () | 2210 | ;;;_ > allout-e-o-prefix-p () |
| @@ -2101,6 +2214,51 @@ Actually, returns prefix beginning point." | |||
| 2101 | (beginning-of-line)) | 2214 | (beginning-of-line)) |
| 2102 | (looking-at allout-regexp)) | 2215 | (looking-at allout-regexp)) |
| 2103 | (= (point)(save-excursion (allout-end-of-prefix)(point))))) | 2216 | (= (point)(save-excursion (allout-end-of-prefix)(point))))) |
| 2217 | ;;;_ > allout-aberrant-container-p () | ||
| 2218 | (defun allout-aberrant-container-p () | ||
| 2219 | "True if topic, or next sibling with children, contains them discontinuously. | ||
| 2220 | |||
| 2221 | Discontinuous means an immediate offspring that is nested more | ||
| 2222 | than one level deeper than the topic. | ||
| 2223 | |||
| 2224 | If topic has no offspring, then the next sibling with offspring will | ||
| 2225 | determine whether or not this one is determined to be aberrant. | ||
| 2226 | |||
| 2227 | If true, then the allout-recent-* settings are calibrated on the | ||
| 2228 | offspring that qaulifies it as aberrant, ie with depth that | ||
| 2229 | exceeds the topic by more than one." | ||
| 2230 | |||
| 2231 | ;; This is most clearly understood when considering standard-prefix-leader | ||
| 2232 | ;; low-level topics, which can all too easily match text not intended as | ||
| 2233 | ;; headers. For example, any line with a leading '.' or '*' and lacking a | ||
| 2234 | ;; following bullet qualifies without this protection. (A sequence of | ||
| 2235 | ;; them can occur naturally, eg a typical textual bullet list.) We | ||
| 2236 | ;; disqualify such low-level sequences when they are followed by a | ||
| 2237 | ;; discontinuously contained child, inferring that the sequences are not | ||
| 2238 | ;; actually connected with their prospective context. | ||
| 2239 | |||
| 2240 | (let ((depth (allout-depth)) | ||
| 2241 | (start-point (point)) | ||
| 2242 | done aberrant) | ||
| 2243 | (save-excursion | ||
| 2244 | (while (and (not done) | ||
| 2245 | (re-search-forward allout-line-boundary-regexp nil 0)) | ||
| 2246 | (allout-prefix-data) | ||
| 2247 | (goto-char allout-recent-prefix-beginning) | ||
| 2248 | (cond | ||
| 2249 | ;; sibling - continue: | ||
| 2250 | ((eq allout-recent-depth depth)) | ||
| 2251 | ;; first offspring is excessive - aberrant: | ||
| 2252 | ((> allout-recent-depth (1+ depth)) | ||
| 2253 | (setq done t aberrant t)) | ||
| 2254 | ;; next non-sibling is lower-depth - not aberrant: | ||
| 2255 | (t (setq done t))))) | ||
| 2256 | (if aberrant | ||
| 2257 | aberrant | ||
| 2258 | (goto-char start-point) | ||
| 2259 | ;; recalibrate allout-recent-* | ||
| 2260 | (allout-depth) | ||
| 2261 | nil))) | ||
| 2104 | ;;;_ : Location attributes | 2262 | ;;;_ : Location attributes |
| 2105 | ;;;_ > allout-depth () | 2263 | ;;;_ > allout-depth () |
| 2106 | (defun allout-depth () | 2264 | (defun allout-depth () |
| @@ -2113,10 +2271,10 @@ Like `allout-current-depth', but respects hidden as well as visible topics." | |||
| 2113 | (let ((start-point (point))) | 2271 | (let ((start-point (point))) |
| 2114 | (if (and (allout-goto-prefix) | 2272 | (if (and (allout-goto-prefix) |
| 2115 | (not (< start-point (point)))) | 2273 | (not (< start-point (point)))) |
| 2116 | (allout-recent-depth) | 2274 | allout-recent-depth |
| 2117 | (progn | 2275 | (progn |
| 2118 | ;; Oops, no prefix, zero prefix data: | 2276 | ;; Oops, no prefix, nullify it: |
| 2119 | (allout-prefix-data (point)(point)) | 2277 | (nullify-allout-prefix-data) |
| 2120 | ;; ... and return 0: | 2278 | ;; ... and return 0: |
| 2121 | 0))))) | 2279 | 0))))) |
| 2122 | ;;;_ > allout-current-depth () | 2280 | ;;;_ > allout-current-depth () |
| @@ -2149,10 +2307,10 @@ Return zero if point is not within any topic." | |||
| 2149 | (condition-case nil | 2307 | (condition-case nil |
| 2150 | (save-excursion | 2308 | (save-excursion |
| 2151 | (allout-back-to-current-heading) | 2309 | (allout-back-to-current-heading) |
| 2152 | (buffer-substring (- allout-recent-prefix-end 1) | 2310 | (buffer-substring-no-properties (- allout-recent-prefix-end 1) |
| 2153 | allout-recent-prefix-end)) | 2311 | allout-recent-prefix-end)) |
| 2154 | ;; Quick and dirty provision, ostensibly for missing bullet: | 2312 | ;; Quick and dirty provision, ostensibly for missing bullet: |
| 2155 | ('args-out-of-range nil)) | 2313 | (args-out-of-range nil)) |
| 2156 | ) | 2314 | ) |
| 2157 | ;;;_ > allout-get-prefix-bullet (prefix) | 2315 | ;;;_ > allout-get-prefix-bullet (prefix) |
| 2158 | (defun allout-get-prefix-bullet (prefix) | 2316 | (defun allout-get-prefix-bullet (prefix) |
| @@ -2160,7 +2318,7 @@ Return zero if point is not within any topic." | |||
| 2160 | ;; Doesn't make sense if we're old-style prefixes, but this just | 2318 | ;; Doesn't make sense if we're old-style prefixes, but this just |
| 2161 | ;; oughtn't be called then, so forget about it... | 2319 | ;; oughtn't be called then, so forget about it... |
| 2162 | (if (string-match allout-regexp prefix) | 2320 | (if (string-match allout-regexp prefix) |
| 2163 | (substring prefix (1- (match-end 0)) (match-end 0)))) | 2321 | (substring prefix (1- (match-end 2)) (match-end 2)))) |
| 2164 | ;;;_ > allout-sibling-index (&optional depth) | 2322 | ;;;_ > allout-sibling-index (&optional depth) |
| 2165 | (defun allout-sibling-index (&optional depth) | 2323 | (defun allout-sibling-index (&optional depth) |
| 2166 | "Item number of this prospective topic among its siblings. | 2324 | "Item number of this prospective topic among its siblings. |
| @@ -2172,12 +2330,12 @@ If less than this depth, ascend to that depth and count..." | |||
| 2172 | 2330 | ||
| 2173 | (save-excursion | 2331 | (save-excursion |
| 2174 | (cond ((and depth (<= depth 0) 0)) | 2332 | (cond ((and depth (<= depth 0) 0)) |
| 2175 | ((or (not depth) (= depth (allout-depth))) | 2333 | ((or (null depth) (= depth (allout-depth))) |
| 2176 | (let ((index 1)) | 2334 | (let ((index 1)) |
| 2177 | (while (allout-previous-sibling (allout-recent-depth) nil) | 2335 | (while (allout-previous-sibling allout-recent-depth nil) |
| 2178 | (setq index (1+ index))) | 2336 | (setq index (1+ index))) |
| 2179 | index)) | 2337 | index)) |
| 2180 | ((< depth (allout-recent-depth)) | 2338 | ((< depth allout-recent-depth) |
| 2181 | (allout-ascend-to-depth depth) | 2339 | (allout-ascend-to-depth depth) |
| 2182 | (allout-sibling-index)) | 2340 | (allout-sibling-index)) |
| 2183 | (0)))) | 2341 | (0)))) |
| @@ -2229,11 +2387,17 @@ Outermost is first." | |||
| 2229 | (if (or (not allout-beginning-of-line-cycles) | 2387 | (if (or (not allout-beginning-of-line-cycles) |
| 2230 | (not (equal last-command this-command))) | 2388 | (not (equal last-command this-command))) |
| 2231 | (move-beginning-of-line 1) | 2389 | (move-beginning-of-line 1) |
| 2232 | (let ((beginning-of-body (save-excursion | 2390 | (allout-depth) |
| 2233 | (allout-beginning-of-current-entry) | 2391 | (let ((beginning-of-body |
| 2234 | (point)))) | 2392 | (save-excursion |
| 2393 | (while (and (<= allout-recent-depth | ||
| 2394 | allout-doublecheck-at-and-shallower) | ||
| 2395 | (allout-aberrant-container-p) | ||
| 2396 | (allout-previous-visible-heading 1))) | ||
| 2397 | (allout-beginning-of-current-entry) | ||
| 2398 | (point)))) | ||
| 2235 | (cond ((= (current-column) 0) | 2399 | (cond ((= (current-column) 0) |
| 2236 | (allout-beginning-of-current-entry)) | 2400 | (goto-char beginning-of-body)) |
| 2237 | ((< (point) beginning-of-body) | 2401 | ((< (point) beginning-of-body) |
| 2238 | (allout-beginning-of-current-line)) | 2402 | (allout-beginning-of-current-line)) |
| 2239 | ((= (point) beginning-of-body) | 2403 | ((= (point) beginning-of-body) |
| @@ -2241,7 +2405,7 @@ Outermost is first." | |||
| 2241 | (t (allout-beginning-of-current-line) | 2405 | (t (allout-beginning-of-current-line) |
| 2242 | (if (< (point) beginning-of-body) | 2406 | (if (< (point) beginning-of-body) |
| 2243 | ;; we were on the headline after its start: | 2407 | ;; we were on the headline after its start: |
| 2244 | (allout-beginning-of-current-entry))))))) | 2408 | (goto-char beginning-of-body))))))) |
| 2245 | ;;;_ > allout-end-of-line () | 2409 | ;;;_ > allout-end-of-line () |
| 2246 | (defun allout-end-of-line () | 2410 | (defun allout-end-of-line () |
| 2247 | "End-of-line with `allout-end-of-line-cycles' behavior, if set." | 2411 | "End-of-line with `allout-end-of-line-cycles' behavior, if set." |
| @@ -2261,6 +2425,7 @@ Outermost is first." | |||
| 2261 | (allout-hidden-p))) | 2425 | (allout-hidden-p))) |
| 2262 | (allout-back-to-current-heading) | 2426 | (allout-back-to-current-heading) |
| 2263 | (allout-show-current-entry) | 2427 | (allout-show-current-entry) |
| 2428 | (allout-show-children) | ||
| 2264 | (allout-end-of-entry)) | 2429 | (allout-end-of-entry)) |
| 2265 | ((>= (point) end-of-entry) | 2430 | ((>= (point) end-of-entry) |
| 2266 | (allout-back-to-current-heading) | 2431 | (allout-back-to-current-heading) |
| @@ -2270,40 +2435,49 @@ Outermost is first." | |||
| 2270 | (defsubst allout-next-heading () | 2435 | (defsubst allout-next-heading () |
| 2271 | "Move to the heading for the topic \(possibly invisible) after this one. | 2436 | "Move to the heading for the topic \(possibly invisible) after this one. |
| 2272 | 2437 | ||
| 2273 | Returns the location of the heading, or nil if none found." | 2438 | Returns the location of the heading, or nil if none found. |
| 2274 | 2439 | ||
| 2275 | (if (and (bobp) (not (eobp)) (looking-at allout-regexp)) | 2440 | We skip anomolous low-level topics, a la `allout-aberrant-container-p'." |
| 2441 | (if (looking-at allout-regexp) | ||
| 2276 | (forward-char 1)) | 2442 | (forward-char 1)) |
| 2277 | 2443 | ||
| 2278 | (if (re-search-forward allout-line-boundary-regexp nil 0) | 2444 | (when (re-search-forward allout-line-boundary-regexp nil 0) |
| 2279 | (allout-prefix-data ; Got valid location state - set vars: | 2445 | (allout-prefix-data) |
| 2280 | (goto-char (or (match-beginning 2) | 2446 | (and (<= allout-recent-depth allout-doublecheck-at-and-shallower) |
| 2281 | allout-recent-prefix-beginning)) | 2447 | ;; this will set allout-recent-* on the first non-aberrant topic, |
| 2282 | (or (match-end 2) allout-recent-prefix-end)))) | 2448 | ;; whether it's the current one or one that disqualifies it: |
| 2449 | (allout-aberrant-container-p)) | ||
| 2450 | (goto-char allout-recent-prefix-beginning))) | ||
| 2283 | ;;;_ > allout-this-or-next-heading | 2451 | ;;;_ > allout-this-or-next-heading |
| 2284 | (defun allout-this-or-next-heading () | 2452 | (defun allout-this-or-next-heading () |
| 2285 | "Position cursor on current or next heading." | 2453 | "Position cursor on current or next heading." |
| 2286 | ;; A throwaway non-macro that is defined after allout-next-heading | 2454 | ;; A throwaway non-macro that is defined after allout-next-heading |
| 2287 | ;; and usable by allout-mode. | 2455 | ;; and usable by allout-mode. |
| 2288 | (if (not (allout-goto-prefix)) (allout-next-heading))) | 2456 | (if (not (allout-goto-prefix-doublechecked)) (allout-next-heading))) |
| 2289 | ;;;_ > allout-previous-heading () | 2457 | ;;;_ > allout-previous-heading () |
| 2290 | (defmacro allout-previous-heading () | 2458 | (defun allout-previous-heading () |
| 2291 | "Move to the prior \(possibly invisible) heading line. | 2459 | "Move to the prior \(possibly invisible) heading line. |
| 2292 | 2460 | ||
| 2293 | Return the location of the beginning of the heading, or nil if not found." | 2461 | Return the location of the beginning of the heading, or nil if not found. |
| 2294 | 2462 | ||
| 2295 | '(if (bobp) | 2463 | We skip anomolous low-level topics, a la `allout-aberrant-container-p'." |
| 2296 | nil | 2464 | |
| 2297 | (allout-goto-prefix) | 2465 | (if (bobp) |
| 2298 | (if | 2466 | nil |
| 2299 | ;; searches are unbounded and return nil if failed: | 2467 | ;; allout-goto-prefix-doublechecked calls us, so we can't use it here. |
| 2300 | (or (re-search-backward allout-line-boundary-regexp nil 0) | 2468 | (let ((start-point (point))) |
| 2301 | (looking-at allout-bob-regexp)) | 2469 | (allout-goto-prefix) |
| 2302 | (progn ; Got valid location state - set vars: | 2470 | (when (or (re-search-backward allout-line-boundary-regexp nil 0) |
| 2303 | (allout-prefix-data | 2471 | (looking-at allout-bob-regexp)) |
| 2304 | (goto-char (or (match-beginning 2) | 2472 | (goto-char (allout-prefix-data)) |
| 2305 | allout-recent-prefix-beginning)) | 2473 | (if (and (<= allout-recent-depth allout-doublecheck-at-and-shallower) |
| 2306 | (or (match-end 2) allout-recent-prefix-end)))))) | 2474 | (allout-aberrant-container-p)) |
| 2475 | (or (allout-previous-heading) | ||
| 2476 | (and (goto-char start-point) | ||
| 2477 | ;; recalibrate allout-recent-*: | ||
| 2478 | (allout-depth) | ||
| 2479 | nil)) | ||
| 2480 | (point)))))) | ||
| 2307 | ;;;_ > allout-get-invisibility-overlay () | 2481 | ;;;_ > allout-get-invisibility-overlay () |
| 2308 | (defun allout-get-invisibility-overlay () | 2482 | (defun allout-get-invisibility-overlay () |
| 2309 | "Return the overlay at point that dictates allout invisibility." | 2483 | "Return the overlay at point that dictates allout invisibility." |
| @@ -2311,7 +2485,8 @@ Return the location of the beginning of the heading, or nil if not found." | |||
| 2311 | got) | 2485 | got) |
| 2312 | (while (and overlays (not got)) | 2486 | (while (and overlays (not got)) |
| 2313 | (if (equal (overlay-get (car overlays) 'invisible) 'allout) | 2487 | (if (equal (overlay-get (car overlays) 'invisible) 'allout) |
| 2314 | (setq got (car overlays)))) | 2488 | (setq got (car overlays)) |
| 2489 | (pop overlays))) | ||
| 2315 | got)) | 2490 | got)) |
| 2316 | ;;;_ > allout-back-to-visible-text () | 2491 | ;;;_ > allout-back-to-visible-text () |
| 2317 | (defun allout-back-to-visible-text () | 2492 | (defun allout-back-to-visible-text () |
| @@ -2324,23 +2499,20 @@ Return the location of the beginning of the heading, or nil if not found." | |||
| 2324 | ;;;_ " These routines either produce or assess charts, which are | 2499 | ;;;_ " These routines either produce or assess charts, which are |
| 2325 | ;;; nested lists of the locations of topics within a subtree. | 2500 | ;;; nested lists of the locations of topics within a subtree. |
| 2326 | ;;; | 2501 | ;;; |
| 2327 | ;;; Use of charts enables efficient navigation of subtrees, by | 2502 | ;;; Charts enable efficient subtree navigation by providing a reusable basis |
| 2328 | ;;; requiring only a single regexp-search based traversal, to scope | 2503 | ;;; for elaborate, compound assessment and adjustment of a subtree. |
| 2329 | ;;; out the subtopic locations. The chart then serves as the basis | ||
| 2330 | ;;; for assessment or adjustment of the subtree, without redundant | ||
| 2331 | ;;; traversal of the structure. | ||
| 2332 | 2504 | ||
| 2333 | ;;;_ > allout-chart-subtree (&optional levels visible orig-depth prev-depth) | 2505 | ;;;_ > allout-chart-subtree (&optional levels visible orig-depth prev-depth) |
| 2334 | (defun allout-chart-subtree (&optional levels visible orig-depth prev-depth) | 2506 | (defun allout-chart-subtree (&optional levels visible orig-depth prev-depth) |
| 2335 | "Produce a location \"chart\" of subtopics of the containing topic. | 2507 | "Produce a location \"chart\" of subtopics of the containing topic. |
| 2336 | 2508 | ||
| 2337 | Optional argument LEVELS specifies the depth \(relative to start | 2509 | Optional argument LEVELS specifies a depth limit \(relative to start |
| 2338 | depth) for the chart. | 2510 | depth) for the chart. Null LEVELS means no limit. |
| 2339 | 2511 | ||
| 2340 | When optional argument VISIBLE is non-nil, the chart includes | 2512 | When optional argument VISIBLE is non-nil, the chart includes |
| 2341 | only the visible subelements of the charted subjects. | 2513 | only the visible subelements of the charted subjects. |
| 2342 | 2514 | ||
| 2343 | The remaining optional args are not for internal use by the function. | 2515 | The remaining optional args are for internal use by the function. |
| 2344 | 2516 | ||
| 2345 | Point is left at the end of the subtree. | 2517 | Point is left at the end of the subtree. |
| 2346 | 2518 | ||
| @@ -2348,12 +2520,12 @@ Charts are used to capture outline structure, so that outline-altering | |||
| 2348 | routines need assess the structure only once, and then use the chart | 2520 | routines need assess the structure only once, and then use the chart |
| 2349 | for their elaborate manipulations. | 2521 | for their elaborate manipulations. |
| 2350 | 2522 | ||
| 2351 | Topics are entered in the chart so the last one is at the car. | 2523 | The chart entries for the topics are in reverse order, so the |
| 2352 | The entry for each topic consists of an integer indicating the point | 2524 | last topic is listed first. The entry for each topic consists of |
| 2353 | at the beginning of the topic. Charts for offspring consists of a | 2525 | an integer indicating the point at the beginning of the topic |
| 2354 | list containing, recursively, the charts for the respective subtopics. | 2526 | prefix. Charts for offspring consists of a list containing, |
| 2355 | The chart for a topics' offspring precedes the entry for the topic | 2527 | recursively, the charts for the respective subtopics. The chart |
| 2356 | itself. | 2528 | for a topics' offspring precedes the entry for the topic itself. |
| 2357 | 2529 | ||
| 2358 | The other function parameters are for internal recursion, and should | 2530 | The other function parameters are for internal recursion, and should |
| 2359 | not be specified by external callers. ORIG-DEPTH is depth of topic at | 2531 | not be specified by external callers. ORIG-DEPTH is depth of topic at |
| @@ -2380,17 +2552,17 @@ starting point, and PREV-DEPTH is depth of prior topic." | |||
| 2380 | 2552 | ||
| 2381 | (while (and (not (eobp)) | 2553 | (while (and (not (eobp)) |
| 2382 | ; Still within original topic? | 2554 | ; Still within original topic? |
| 2383 | (< orig-depth (setq curr-depth (allout-recent-depth))) | 2555 | (< orig-depth (setq curr-depth allout-recent-depth)) |
| 2384 | (cond ((= prev-depth curr-depth) | 2556 | (cond ((= prev-depth curr-depth) |
| 2385 | ;; Register this one and move on: | 2557 | ;; Register this one and move on: |
| 2386 | (setq chart (cons (point) chart)) | 2558 | (setq chart (cons allout-recent-prefix-beginning chart)) |
| 2387 | (if (and levels (<= levels 1)) | 2559 | (if (and levels (<= levels 1)) |
| 2388 | ;; At depth limit - skip sublevels: | 2560 | ;; At depth limit - skip sublevels: |
| 2389 | (or (allout-next-sibling curr-depth) | 2561 | (or (allout-next-sibling curr-depth) |
| 2390 | ;; or no more siblings - proceed to | 2562 | ;; or no more siblings - proceed to |
| 2391 | ;; next heading at lesser depth: | 2563 | ;; next heading at lesser depth: |
| 2392 | (while (and (<= curr-depth | 2564 | (while (and (<= curr-depth |
| 2393 | (allout-recent-depth)) | 2565 | allout-recent-depth) |
| 2394 | (if visible | 2566 | (if visible |
| 2395 | (allout-next-visible-heading 1) | 2567 | (allout-next-visible-heading 1) |
| 2396 | (allout-next-heading))))) | 2568 | (allout-next-heading))))) |
| @@ -2437,26 +2609,29 @@ starting point, and PREV-DEPTH is depth of prior topic." | |||
| 2437 | Effectively a top-level chart of siblings. See `allout-chart-subtree' | 2609 | Effectively a top-level chart of siblings. See `allout-chart-subtree' |
| 2438 | for an explanation of charts." | 2610 | for an explanation of charts." |
| 2439 | (save-excursion | 2611 | (save-excursion |
| 2440 | (if (allout-goto-prefix) | 2612 | (when (allout-goto-prefix-doublechecked) |
| 2441 | (let ((chart (list (point)))) | 2613 | (let ((chart (list (point)))) |
| 2442 | (while (allout-next-sibling) | 2614 | (while (allout-next-sibling) |
| 2443 | (setq chart (cons (point) chart))) | 2615 | (setq chart (cons (point) chart))) |
| 2444 | (if chart (setq chart (nreverse chart))))))) | 2616 | (if chart (setq chart (nreverse chart))))))) |
| 2445 | ;;;_ > allout-chart-to-reveal (chart depth) | 2617 | ;;;_ > allout-chart-to-reveal (chart depth) |
| 2446 | (defun allout-chart-to-reveal (chart depth) | 2618 | (defun allout-chart-to-reveal (chart depth) |
| 2447 | 2619 | ||
| 2448 | "Return a flat list of hidden points in subtree CHART, up to DEPTH. | 2620 | "Return a flat list of hidden points in subtree CHART, up to DEPTH. |
| 2449 | 2621 | ||
| 2622 | If DEPTH is nil, include hidden points at any depth. | ||
| 2623 | |||
| 2450 | Note that point can be left at any of the points on chart, or at the | 2624 | Note that point can be left at any of the points on chart, or at the |
| 2451 | start point." | 2625 | start point." |
| 2452 | 2626 | ||
| 2453 | (let (result here) | 2627 | (let (result here) |
| 2454 | (while (and (or (eq depth t) (> depth 0)) | 2628 | (while (and (or (null depth) (> depth 0)) |
| 2455 | chart) | 2629 | chart) |
| 2456 | (setq here (car chart)) | 2630 | (setq here (car chart)) |
| 2457 | (if (listp here) | 2631 | (if (listp here) |
| 2458 | (let ((further (allout-chart-to-reveal here (or (eq depth t) | 2632 | (let ((further (allout-chart-to-reveal here (if (null depth) |
| 2459 | (1- depth))))) | 2633 | depth |
| 2634 | (1- depth))))) | ||
| 2460 | ;; We're on the start of a subtree - recurse with it, if there's | 2635 | ;; We're on the start of a subtree - recurse with it, if there's |
| 2461 | ;; more depth to go: | 2636 | ;; more depth to go: |
| 2462 | (if further (setq result (append further result))) | 2637 | (if further (setq result (append further result))) |
| @@ -2514,15 +2689,28 @@ Returns the point at the beginning of the prefix, or nil if none." | |||
| 2514 | (search-backward "\n" nil 1)) | 2689 | (search-backward "\n" nil 1)) |
| 2515 | (forward-char 1) | 2690 | (forward-char 1) |
| 2516 | (if (looking-at allout-regexp) | 2691 | (if (looking-at allout-regexp) |
| 2517 | (setq done (allout-prefix-data (match-beginning 0) | 2692 | (setq done (allout-prefix-data)) |
| 2518 | (match-end 0))) | ||
| 2519 | (forward-char -1))) | 2693 | (forward-char -1))) |
| 2520 | (if (bobp) | 2694 | (if (bobp) |
| 2521 | (cond ((looking-at allout-regexp) | 2695 | (cond ((looking-at allout-regexp) |
| 2522 | (allout-prefix-data (match-beginning 0)(match-end 0))) | 2696 | (allout-prefix-data)) |
| 2523 | ((allout-next-heading)) | 2697 | ((allout-next-heading)) |
| 2524 | (done)) | 2698 | (done)) |
| 2525 | done))) | 2699 | done))) |
| 2700 | ;;;_ > allout-goto-prefix-doublechecked () | ||
| 2701 | (defun allout-goto-prefix-doublechecked () | ||
| 2702 | "Put point at beginning of immediately containing outline topic. | ||
| 2703 | |||
| 2704 | Like `allout-goto-prefix', but shallow topics \(according to | ||
| 2705 | `allout-doublecheck-at-and-shallower') are checked and | ||
| 2706 | disqualified for child containment discontinuity, according to | ||
| 2707 | `allout-aberrant-container-p'." | ||
| 2708 | (allout-goto-prefix) | ||
| 2709 | (if (and (<= allout-recent-depth allout-doublecheck-at-and-shallower) | ||
| 2710 | (allout-aberrant-container-p)) | ||
| 2711 | (allout-previous-heading) | ||
| 2712 | (point))) | ||
| 2713 | |||
| 2526 | ;;;_ > allout-end-of-prefix () | 2714 | ;;;_ > allout-end-of-prefix () |
| 2527 | (defun allout-end-of-prefix (&optional ignore-decorations) | 2715 | (defun allout-end-of-prefix (&optional ignore-decorations) |
| 2528 | "Position cursor at beginning of header text. | 2716 | "Position cursor at beginning of header text. |
| @@ -2530,46 +2718,40 @@ Returns the point at the beginning of the prefix, or nil if none." | |||
| 2530 | If optional IGNORE-DECORATIONS is non-nil, put just after bullet, | 2718 | If optional IGNORE-DECORATIONS is non-nil, put just after bullet, |
| 2531 | otherwise skip white space between bullet and ensuing text." | 2719 | otherwise skip white space between bullet and ensuing text." |
| 2532 | 2720 | ||
| 2533 | (if (not (allout-goto-prefix)) | 2721 | (if (not (allout-goto-prefix-doublechecked)) |
| 2534 | nil | 2722 | nil |
| 2535 | (let ((match-data (match-data))) | 2723 | (goto-char allout-recent-prefix-end) |
| 2536 | (goto-char (match-end 0)) | 2724 | (if ignore-decorations |
| 2537 | (if ignore-decorations | 2725 | t |
| 2538 | t | 2726 | (while (looking-at "[0-9]") (forward-char 1)) |
| 2539 | (while (looking-at "[0-9]") (forward-char 1)) | 2727 | (if (and (not (eolp)) (looking-at "\\s-")) (forward-char 1))) |
| 2540 | (if (and (not (eolp)) (looking-at "\\s-")) (forward-char 1))) | ||
| 2541 | (store-match-data match-data)) | ||
| 2542 | ;; Reestablish where we are: | 2728 | ;; Reestablish where we are: |
| 2543 | (allout-current-depth))) | 2729 | (allout-current-depth))) |
| 2544 | ;;;_ > allout-current-bullet-pos () | 2730 | ;;;_ > allout-current-bullet-pos () |
| 2545 | (defun allout-current-bullet-pos () | 2731 | (defun allout-current-bullet-pos () |
| 2546 | "Return position of current \(visible) topic's bullet." | 2732 | "Return position of current \(visible) topic's bullet." |
| 2547 | 2733 | ||
| 2548 | (if (not (allout-current-depth)) | 2734 | (if (not (allout-current-depth)) |
| 2549 | nil | 2735 | nil |
| 2550 | (1- (match-end 0)))) | 2736 | (1- allout-recent-prefix-end))) |
| 2551 | ;;;_ > allout-back-to-current-heading () | 2737 | ;;;_ > allout-back-to-current-heading () |
| 2552 | (defun allout-back-to-current-heading () | 2738 | (defun allout-back-to-current-heading () |
| 2553 | "Move to heading line of current topic, or beginning if already on the line. | 2739 | "Move to heading line of current topic, or beginning if not in a topic. |
| 2740 | |||
| 2741 | If interactive, we position at the end of the prefix. | ||
| 2554 | 2742 | ||
| 2555 | Return value of point, unless we started outside of (before any) topics, | 2743 | Return value of resulting point, unless we started outside |
| 2556 | in which case we return nil." | 2744 | of (before any) topics, in which case we return nil." |
| 2557 | 2745 | ||
| 2558 | (allout-beginning-of-current-line) | 2746 | (allout-beginning-of-current-line) |
| 2559 | (if (or (allout-on-current-heading-p) | 2747 | (let ((bol-point (point))) |
| 2560 | (and (re-search-backward (concat "^\\(" allout-regexp "\\)") | 2748 | (allout-goto-prefix-doublechecked) |
| 2561 | nil 'move) | 2749 | (if (<= (point) bol-point) |
| 2562 | (progn (while (allout-hidden-p) | 2750 | (if (interactive-p) |
| 2563 | (allout-beginning-of-current-line) | 2751 | (allout-end-of-prefix) |
| 2564 | (if (not (looking-at allout-regexp)) | 2752 | (point)) |
| 2565 | (re-search-backward (concat | 2753 | (goto-char (point-min)) |
| 2566 | "^\\(" allout-regexp "\\)") | 2754 | nil))) |
| 2567 | nil 'move))) | ||
| 2568 | (allout-prefix-data (match-beginning 1) | ||
| 2569 | (match-end 1))))) | ||
| 2570 | (if (interactive-p) | ||
| 2571 | (allout-end-of-prefix) | ||
| 2572 | (point)))) | ||
| 2573 | ;;;_ > allout-back-to-heading () | 2755 | ;;;_ > allout-back-to-heading () |
| 2574 | (defalias 'allout-back-to-heading 'allout-back-to-current-heading) | 2756 | (defalias 'allout-back-to-heading 'allout-back-to-current-heading) |
| 2575 | ;;;_ > allout-pre-next-prefix () | 2757 | ;;;_ > allout-pre-next-prefix () |
| @@ -2578,9 +2760,8 @@ in which case we return nil." | |||
| 2578 | 2760 | ||
| 2579 | Returns that character position." | 2761 | Returns that character position." |
| 2580 | 2762 | ||
| 2581 | (if (re-search-forward allout-line-boundary-regexp nil 'move) | 2763 | (if (allout-next-heading) |
| 2582 | (prog1 (goto-char (match-beginning 0)) | 2764 | (goto-char (1- allout-recent-prefix-beginning)))) |
| 2583 | (allout-prefix-data (match-beginning 2)(match-end 2))))) | ||
| 2584 | ;;;_ > allout-end-of-subtree (&optional current include-trailing-blank) | 2765 | ;;;_ > allout-end-of-subtree (&optional current include-trailing-blank) |
| 2585 | (defun allout-end-of-subtree (&optional current include-trailing-blank) | 2766 | (defun allout-end-of-subtree (&optional current include-trailing-blank) |
| 2586 | "Put point at the end of the last leaf in the containing topic. | 2767 | "Put point at the end of the last leaf in the containing topic. |
| @@ -2596,11 +2777,11 @@ Returns the value of point." | |||
| 2596 | (interactive "P") | 2777 | (interactive "P") |
| 2597 | (if current | 2778 | (if current |
| 2598 | (allout-back-to-current-heading) | 2779 | (allout-back-to-current-heading) |
| 2599 | (allout-goto-prefix)) | 2780 | (allout-goto-prefix-doublechecked)) |
| 2600 | (let ((level (allout-recent-depth))) | 2781 | (let ((level allout-recent-depth)) |
| 2601 | (allout-next-heading) | 2782 | (allout-next-heading) |
| 2602 | (while (and (not (eobp)) | 2783 | (while (and (not (eobp)) |
| 2603 | (> (allout-recent-depth) level)) | 2784 | (> allout-recent-depth level)) |
| 2604 | (allout-next-heading)) | 2785 | (allout-next-heading)) |
| 2605 | (if (eobp) | 2786 | (if (eobp) |
| 2606 | (allout-end-of-entry) | 2787 | (allout-end-of-entry) |
| @@ -2629,6 +2810,9 @@ If already there, move cursor to bullet for hot-spot operation. | |||
| 2629 | (interactive) | 2810 | (interactive) |
| 2630 | (let ((start-point (point))) | 2811 | (let ((start-point (point))) |
| 2631 | (move-beginning-of-line 1) | 2812 | (move-beginning-of-line 1) |
| 2813 | (if (< 0 (allout-current-depth)) | ||
| 2814 | (goto-char allout-recent-prefix-end) | ||
| 2815 | (goto-char (point-min))) | ||
| 2632 | (allout-end-of-prefix) | 2816 | (allout-end-of-prefix) |
| 2633 | (if (and (interactive-p) | 2817 | (if (and (interactive-p) |
| 2634 | (= (point) start-point)) | 2818 | (= (point) start-point)) |
| @@ -2676,23 +2860,18 @@ collapsed." | |||
| 2676 | (defun allout-ascend-to-depth (depth) | 2860 | (defun allout-ascend-to-depth (depth) |
| 2677 | "Ascend to depth DEPTH, returning depth if successful, nil if not." | 2861 | "Ascend to depth DEPTH, returning depth if successful, nil if not." |
| 2678 | (if (and (> depth 0)(<= depth (allout-depth))) | 2862 | (if (and (> depth 0)(<= depth (allout-depth))) |
| 2679 | (let ((last-good (point))) | 2863 | (let (last-ascended) |
| 2680 | (while (and (< depth (allout-depth)) | 2864 | (while (and (< depth allout-recent-depth) |
| 2681 | (setq last-good (point)) | 2865 | (setq last-ascended (allout-ascend)))) |
| 2682 | (allout-beginning-of-level) | 2866 | (goto-char allout-recent-prefix-beginning) |
| 2683 | (allout-previous-heading))) | 2867 | (if (interactive-p) (allout-end-of-prefix)) |
| 2684 | (if (= (allout-recent-depth) depth) | 2868 | (and last-ascended allout-recent-depth)))) |
| 2685 | (progn (goto-char allout-recent-prefix-beginning) | ||
| 2686 | depth) | ||
| 2687 | (goto-char last-good) | ||
| 2688 | nil)) | ||
| 2689 | (if (interactive-p) (allout-end-of-prefix)))) | ||
| 2690 | ;;;_ > allout-ascend () | 2869 | ;;;_ > allout-ascend () |
| 2691 | (defun allout-ascend () | 2870 | (defun allout-ascend () |
| 2692 | "Ascend one level, returning t if successful, nil if not." | 2871 | "Ascend one level, returning t if successful, nil if not." |
| 2693 | (prog1 | 2872 | (prog1 |
| 2694 | (if (allout-beginning-of-level) | 2873 | (if (allout-beginning-of-level) |
| 2695 | (allout-previous-heading)) | 2874 | (allout-previous-heading)) |
| 2696 | (if (interactive-p) (allout-end-of-prefix)))) | 2875 | (if (interactive-p) (allout-end-of-prefix)))) |
| 2697 | ;;;_ > allout-descend-to-depth (depth) | 2876 | ;;;_ > allout-descend-to-depth (depth) |
| 2698 | (defun allout-descend-to-depth (depth) | 2877 | (defun allout-descend-to-depth (depth) |
| @@ -2703,47 +2882,24 @@ Returning depth if successful, nil if not." | |||
| 2703 | (start-depth (allout-depth))) | 2882 | (start-depth (allout-depth))) |
| 2704 | (while | 2883 | (while |
| 2705 | (and (> (allout-depth) 0) | 2884 | (and (> (allout-depth) 0) |
| 2706 | (not (= depth (allout-recent-depth))) ; ... not there yet | 2885 | (not (= depth allout-recent-depth)) ; ... not there yet |
| 2707 | (allout-next-heading) ; ... go further | 2886 | (allout-next-heading) ; ... go further |
| 2708 | (< start-depth (allout-recent-depth)))) ; ... still in topic | 2887 | (< start-depth allout-recent-depth))) ; ... still in topic |
| 2709 | (if (and (> (allout-depth) 0) | 2888 | (if (and (> (allout-depth) 0) |
| 2710 | (= (allout-recent-depth) depth)) | 2889 | (= allout-recent-depth depth)) |
| 2711 | depth | 2890 | depth |
| 2712 | (goto-char start-point) | 2891 | (goto-char start-point) |
| 2713 | nil)) | 2892 | nil)) |
| 2714 | ) | 2893 | ) |
| 2715 | ;;;_ > allout-up-current-level (arg &optional dont-complain) | 2894 | ;;;_ > allout-up-current-level (arg) |
| 2716 | (defun allout-up-current-level (arg &optional dont-complain) | 2895 | (defun allout-up-current-level (arg) |
| 2717 | "Move out ARG levels from current visible topic. | 2896 | "Move out ARG levels from current visible topic." |
| 2718 | |||
| 2719 | Positions on heading line of containing topic. Error if unable to | ||
| 2720 | ascend that far, or nil if unable to ascend but optional arg | ||
| 2721 | DONT-COMPLAIN is non-nil." | ||
| 2722 | (interactive "p") | 2897 | (interactive "p") |
| 2723 | (allout-back-to-current-heading) | 2898 | (let ((start-point (point))) |
| 2724 | (let ((present-level (allout-recent-depth)) | 2899 | (allout-back-to-current-heading) |
| 2725 | (last-good (point)) | 2900 | (if (not (allout-ascend)) |
| 2726 | failed) | 2901 | (progn (goto-char start-point) |
| 2727 | ;; Loop for iterating arg: | 2902 | (error "Can't ascend past outermost level")) |
| 2728 | (while (and (> (allout-recent-depth) 1) | ||
| 2729 | (> arg 0) | ||
| 2730 | (not (bobp)) | ||
| 2731 | (not failed)) | ||
| 2732 | (setq last-good (point)) | ||
| 2733 | ;; Loop for going back over current or greater depth: | ||
| 2734 | (while (and (not (< (allout-recent-depth) present-level)) | ||
| 2735 | (or (allout-previous-visible-heading 1) | ||
| 2736 | (not (setq failed present-level))))) | ||
| 2737 | (setq present-level (allout-current-depth)) | ||
| 2738 | (setq arg (- arg 1))) | ||
| 2739 | (if (or failed | ||
| 2740 | (> arg 0)) | ||
| 2741 | (progn (goto-char last-good) | ||
| 2742 | (if (interactive-p) (allout-end-of-prefix)) | ||
| 2743 | (if (not dont-complain) | ||
| 2744 | (error "Can't ascend past outermost level") | ||
| 2745 | (if (interactive-p) (allout-end-of-prefix)) | ||
| 2746 | nil)) | ||
| 2747 | (if (interactive-p) (allout-end-of-prefix)) | 2903 | (if (interactive-p) (allout-end-of-prefix)) |
| 2748 | allout-recent-prefix-beginning))) | 2904 | allout-recent-prefix-beginning))) |
| 2749 | 2905 | ||
| @@ -2756,24 +2912,101 @@ Traverse at optional DEPTH, or current depth if none specified. | |||
| 2756 | 2912 | ||
| 2757 | Go backward if optional arg BACKWARD is non-nil. | 2913 | Go backward if optional arg BACKWARD is non-nil. |
| 2758 | 2914 | ||
| 2759 | Return depth if successful, nil otherwise." | 2915 | Return the start point of the new topic if successful, nil otherwise." |
| 2760 | 2916 | ||
| 2761 | (if (and backward (bobp)) | 2917 | (if (if backward (bobp) (eobp)) |
| 2762 | nil | 2918 | nil |
| 2763 | (let ((start-depth (or depth (allout-depth))) | 2919 | (let ((target-depth (or depth (allout-depth))) |
| 2764 | (start-point (point)) | 2920 | (start-point (point)) |
| 2921 | (count 0) | ||
| 2922 | leaping | ||
| 2765 | last-depth) | 2923 | last-depth) |
| 2766 | (while (and (not (if backward (bobp) (eobp))) | 2924 | (while (and |
| 2767 | (if backward (allout-previous-heading) | 2925 | ;; done too few single steps to resort to the leap routine: |
| 2768 | (allout-next-heading)) | 2926 | (not leaping) |
| 2769 | (> (setq last-depth (allout-recent-depth)) start-depth))) | 2927 | ;; not at limit: |
| 2770 | (if (and (not (eobp)) | 2928 | (not (if backward (bobp) (eobp))) |
| 2771 | (and (> (or last-depth (allout-depth)) 0) | 2929 | ;; still traversable: |
| 2772 | (= (allout-recent-depth) start-depth))) | 2930 | (if backward (allout-previous-heading) (allout-next-heading)) |
| 2773 | allout-recent-prefix-beginning | 2931 | ;; we're below the target depth |
| 2774 | (goto-char start-point) | 2932 | (> (setq last-depth allout-recent-depth) target-depth)) |
| 2775 | (if depth (allout-depth) start-depth) | 2933 | (setq count (1+ count)) |
| 2776 | nil)))) | 2934 | (if (> count 7) ; lists are commonly 7 +- 2, right?-) |
| 2935 | (setq leaping t))) | ||
| 2936 | (cond (leaping | ||
| 2937 | (or (allout-next-sibling-leap target-depth backward) | ||
| 2938 | (progn | ||
| 2939 | (goto-char start-point) | ||
| 2940 | (if depth (allout-depth) target-depth) | ||
| 2941 | nil))) | ||
| 2942 | ((and (not (eobp)) | ||
| 2943 | (and (> (or last-depth (allout-depth)) 0) | ||
| 2944 | (= allout-recent-depth target-depth))) | ||
| 2945 | allout-recent-prefix-beginning) | ||
| 2946 | (t | ||
| 2947 | (goto-char start-point) | ||
| 2948 | (if depth (allout-depth) target-depth) | ||
| 2949 | nil))))) | ||
| 2950 | ;;;_ > allout-next-sibling-leap (&optional depth backward) | ||
| 2951 | (defun allout-next-sibling-leap (&optional depth backward) | ||
| 2952 | "Like `allout-next-sibling', but by direct search for topic at depth. | ||
| 2953 | |||
| 2954 | Traverse at optional DEPTH, or current depth if none specified. | ||
| 2955 | |||
| 2956 | Go backward if optional arg BACKWARD is non-nil. | ||
| 2957 | |||
| 2958 | Return the start point of the new topic if successful, nil otherwise. | ||
| 2959 | |||
| 2960 | Costs more than regular `allout-next-sibling' for short traversals: | ||
| 2961 | |||
| 2962 | - we have to check the prior \(next, if travelling backwards) | ||
| 2963 | item to confirm connectivity with the prior topic, and | ||
| 2964 | - if confirmed, we have to reestablish the allout-recent-* settings with | ||
| 2965 | some extra navigation | ||
| 2966 | - if confirmation fails, we have to do more work to recover | ||
| 2967 | |||
| 2968 | It is an increasingly big win when there are many intervening | ||
| 2969 | offspring before the next sibling, however, so | ||
| 2970 | `allout-next-sibling' resorts to this if it finds itself in that | ||
| 2971 | situation." | ||
| 2972 | |||
| 2973 | (if (if backward (bobp) (eobp)) | ||
| 2974 | nil | ||
| 2975 | (let* ((start-point (point)) | ||
| 2976 | (target-depth (or depth (allout-depth))) | ||
| 2977 | (search-whitespace-regexp nil) | ||
| 2978 | (depth-biased (- target-depth 2)) | ||
| 2979 | (expression (if (<= target-depth 1) | ||
| 2980 | allout-depth-one-regexp | ||
| 2981 | (format allout-depth-specific-regexp | ||
| 2982 | depth-biased depth-biased))) | ||
| 2983 | found | ||
| 2984 | done) | ||
| 2985 | (while (not done) | ||
| 2986 | (setq found (if backward | ||
| 2987 | (re-search-backward expression nil 'to-limit) | ||
| 2988 | (forward-char 1) | ||
| 2989 | (re-search-forward expression nil 'to-limit))) | ||
| 2990 | (if (and found (allout-aberrant-container-p)) | ||
| 2991 | (setq found nil)) | ||
| 2992 | (setq done (or found (if backward (bobp) (eobp))))) | ||
| 2993 | (if (not found) | ||
| 2994 | (progn (goto-char start-point) | ||
| 2995 | nil) | ||
| 2996 | ;; rationale: if any intervening items were at a lower depth, we | ||
| 2997 | ;; would now be on the first offspring at the target depth - ie, | ||
| 2998 | ;; the preceeding item (per the search direction) must be at a | ||
| 2999 | ;; lesser depth. that's all we need to check. | ||
| 3000 | (if backward (allout-next-heading) (allout-previous-heading)) | ||
| 3001 | (if (< allout-recent-depth target-depth) | ||
| 3002 | ;; return to start and reestablish allout-recent-*: | ||
| 3003 | (progn | ||
| 3004 | (goto-char start-point) | ||
| 3005 | (allout-depth) | ||
| 3006 | nil) | ||
| 3007 | (goto-char found) | ||
| 3008 | ;; locate cursor and set allout-recent-*: | ||
| 3009 | (allout-goto-prefix)))))) | ||
| 2777 | ;;;_ > allout-previous-sibling (&optional depth backward) | 3010 | ;;;_ > allout-previous-sibling (&optional depth backward) |
| 2778 | (defun allout-previous-sibling (&optional depth backward) | 3011 | (defun allout-previous-sibling (&optional depth backward) |
| 2779 | "Like `allout-forward-current-level' backwards, respecting invisible topics. | 3012 | "Like `allout-forward-current-level' backwards, respecting invisible topics. |
| @@ -2807,7 +3040,7 @@ Presumes point is at the start of a topic prefix." | |||
| 2807 | 3040 | ||
| 2808 | (let ((depth (allout-depth))) | 3041 | (let ((depth (allout-depth))) |
| 2809 | (while (allout-previous-sibling depth nil)) | 3042 | (while (allout-previous-sibling depth nil)) |
| 2810 | (prog1 (allout-recent-depth) | 3043 | (prog1 allout-recent-depth |
| 2811 | (if (interactive-p) (allout-end-of-prefix))))) | 3044 | (if (interactive-p) (allout-end-of-prefix))))) |
| 2812 | ;;;_ > allout-next-visible-heading (arg) | 3045 | ;;;_ > allout-next-visible-heading (arg) |
| 2813 | (defun allout-next-visible-heading (arg) | 3046 | (defun allout-next-visible-heading (arg) |
| @@ -2821,21 +3054,36 @@ Move to buffer limit in indicated direction if headings are exhausted." | |||
| 2821 | (step (if backward -1 1)) | 3054 | (step (if backward -1 1)) |
| 2822 | prev got) | 3055 | prev got) |
| 2823 | 3056 | ||
| 2824 | (while (> arg 0) ; limit condition | 3057 | (while (> arg 0) |
| 2825 | (while (and (not (if backward (bobp)(eobp))) ; boundary condition | 3058 | (while (and |
| 2826 | ;; Move, skipping over all those concealed lines: | 3059 | ;; Boundary condition: |
| 2827 | (prog1 (condition-case nil (or (line-move step) t) | 3060 | (not (if backward (bobp)(eobp))) |
| 2828 | (error nil)) | 3061 | ;; Move, skipping over all concealed lines in one fell swoop: |
| 2829 | (allout-beginning-of-current-line)) | 3062 | (prog1 (condition-case nil (or (line-move step) t) |
| 2830 | (not (setq got (looking-at allout-regexp))))) | 3063 | (error nil)) |
| 3064 | (allout-beginning-of-current-line)) | ||
| 3065 | ;; Deal with apparent header line: | ||
| 3066 | (if (not (looking-at allout-regexp)) | ||
| 3067 | ;; not a header line, keep looking: | ||
| 3068 | t | ||
| 3069 | (allout-prefix-data) | ||
| 3070 | (if (and (<= allout-recent-depth | ||
| 3071 | allout-doublecheck-at-and-shallower) | ||
| 3072 | (allout-aberrant-container-p)) | ||
| 3073 | ;; skip this aberrant prospective header line: | ||
| 3074 | t | ||
| 3075 | ;; this prospective headerline qualifies - register: | ||
| 3076 | (setq got allout-recent-prefix-beginning) | ||
| 3077 | ;; and break the loop: | ||
| 3078 | nil)))) | ||
| 2831 | ;; Register this got, it may be the last: | 3079 | ;; Register this got, it may be the last: |
| 2832 | (if got (setq prev got)) | 3080 | (if got (setq prev got)) |
| 2833 | (setq arg (1- arg))) | 3081 | (setq arg (1- arg))) |
| 2834 | (cond (got ; Last move was to a prefix: | 3082 | (cond (got ; Last move was to a prefix: |
| 2835 | (allout-prefix-data (match-beginning 0) (match-end 0)) | 3083 | (allout-end-of-prefix)) |
| 2836 | (allout-end-of-prefix)) | ||
| 2837 | (prev ; Last move wasn't, but prev was: | 3084 | (prev ; Last move wasn't, but prev was: |
| 2838 | (allout-prefix-data (match-beginning 0) (match-end 0))) | 3085 | (goto-char prev) |
| 3086 | (allout-end-of-prefix)) | ||
| 2839 | ((not backward) (end-of-line) nil)))) | 3087 | ((not backward) (end-of-line) nil)))) |
| 2840 | ;;;_ > allout-previous-visible-heading (arg) | 3088 | ;;;_ > allout-previous-visible-heading (arg) |
| 2841 | (defun allout-previous-visible-heading (arg) | 3089 | (defun allout-previous-visible-heading (arg) |
| @@ -2845,7 +3093,8 @@ With argument, repeats or can move forward if negative. | |||
| 2845 | A heading line is one that starts with a `*' (or that `allout-regexp' | 3093 | A heading line is one that starts with a `*' (or that `allout-regexp' |
| 2846 | matches)." | 3094 | matches)." |
| 2847 | (interactive "p") | 3095 | (interactive "p") |
| 2848 | (allout-next-visible-heading (- arg))) | 3096 | (prog1 (allout-next-visible-heading (- arg)) |
| 3097 | (if (interactive-p) (allout-end-of-prefix)))) | ||
| 2849 | ;;;_ > allout-forward-current-level (arg) | 3098 | ;;;_ > allout-forward-current-level (arg) |
| 2850 | (defun allout-forward-current-level (arg) | 3099 | (defun allout-forward-current-level (arg) |
| 2851 | "Position point at the next heading of the same level. | 3100 | "Position point at the next heading of the same level. |
| @@ -2856,38 +3105,25 @@ Returns resulting position, else nil if none found." | |||
| 2856 | (interactive "p") | 3105 | (interactive "p") |
| 2857 | (let ((start-depth (allout-current-depth)) | 3106 | (let ((start-depth (allout-current-depth)) |
| 2858 | (start-arg arg) | 3107 | (start-arg arg) |
| 2859 | (backward (> 0 arg)) | 3108 | (backward (> 0 arg))) |
| 2860 | last-depth | ||
| 2861 | (last-good (point)) | ||
| 2862 | at-boundary) | ||
| 2863 | (if (= 0 start-depth) | 3109 | (if (= 0 start-depth) |
| 2864 | (error "No siblings, not in a topic...")) | 3110 | (error "No siblings, not in a topic...")) |
| 2865 | (if backward (setq arg (* -1 arg))) | 3111 | (if backward (setq arg (* -1 arg))) |
| 2866 | (while (not (or (zerop arg) | 3112 | (allout-back-to-current-heading) |
| 2867 | at-boundary)) | 3113 | (while (and (not (zerop arg)) |
| 2868 | (while (and (not (if backward (bobp) (eobp))) | 3114 | (if backward |
| 2869 | (if backward (allout-previous-visible-heading 1) | 3115 | (allout-previous-sibling) |
| 2870 | (allout-next-visible-heading 1)) | 3116 | (allout-next-sibling))) |
| 2871 | (> (setq last-depth (allout-recent-depth)) start-depth))) | 3117 | (setq arg (1- arg))) |
| 2872 | (if (and last-depth (= last-depth start-depth) | 3118 | (if (not (interactive-p)) |
| 2873 | (not (if backward (bobp) (eobp)))) | 3119 | nil |
| 2874 | (setq last-good (point) | 3120 | (allout-end-of-prefix) |
| 2875 | arg (1- arg)) | 3121 | (if (not (zerop arg)) |
| 2876 | (setq at-boundary t))) | 3122 | (error "Hit %s level %d topic, traversed %d of %d requested" |
| 2877 | (if (and (not (eobp)) | 3123 | (if backward "first" "last") |
| 2878 | (= arg 0) | 3124 | allout-recent-depth |
| 2879 | (and (> (or last-depth (allout-depth)) 0) | 3125 | (- (abs start-arg) arg) |
| 2880 | (= (allout-recent-depth) start-depth))) | 3126 | (abs start-arg)))))) |
| 2881 | allout-recent-prefix-beginning | ||
| 2882 | (goto-char last-good) | ||
| 2883 | (if (not (interactive-p)) | ||
| 2884 | nil | ||
| 2885 | (allout-end-of-prefix) | ||
| 2886 | (error "Hit %s level %d topic, traversed %d of %d requested" | ||
| 2887 | (if backward "first" "last") | ||
| 2888 | (allout-recent-depth) | ||
| 2889 | (- (abs start-arg) arg) | ||
| 2890 | (abs start-arg)))))) | ||
| 2891 | ;;;_ > allout-backward-current-level (arg) | 3127 | ;;;_ > allout-backward-current-level (arg) |
| 2892 | (defun allout-backward-current-level (arg) | 3128 | (defun allout-backward-current-level (arg) |
| 2893 | "Inverse of `allout-forward-current-level'." | 3129 | "Inverse of `allout-forward-current-level'." |
| @@ -2977,34 +3213,41 @@ this-command accordingly. | |||
| 2977 | 3213 | ||
| 2978 | Returns the qualifying command, if any, else nil." | 3214 | Returns the qualifying command, if any, else nil." |
| 2979 | (interactive) | 3215 | (interactive) |
| 2980 | (let* ((key-num (cond ((numberp last-command-char) last-command-char) | 3216 | (let* ((key-string (if (numberp last-command-char) |
| 3217 | (char-to-string last-command-char))) | ||
| 3218 | (key-num (cond ((numberp last-command-char) last-command-char) | ||
| 2981 | ;; for XEmacs character type: | 3219 | ;; for XEmacs character type: |
| 2982 | ((and (fboundp 'characterp) | 3220 | ((and (fboundp 'characterp) |
| 2983 | (apply 'characterp (list last-command-char))) | 3221 | (apply 'characterp (list last-command-char))) |
| 2984 | (apply 'char-to-int (list last-command-char))) | 3222 | (apply 'char-to-int (list last-command-char))) |
| 2985 | (t 0))) | 3223 | (t 0))) |
| 2986 | mapped-binding | 3224 | mapped-binding) |
| 2987 | (on-bullet (eq (point) (allout-current-bullet-pos)))) | ||
| 2988 | 3225 | ||
| 2989 | (if (zerop key-num) | 3226 | (if (zerop key-num) |
| 2990 | nil | 3227 | nil |
| 2991 | 3228 | ||
| 2992 | (if (and (<= 33 key-num) | 3229 | (if (and |
| 2993 | (setq mapped-binding | 3230 | ;; exclude control chars and escape: |
| 3231 | (<= 33 key-num) | ||
| 3232 | (setq mapped-binding | ||
| 3233 | (or (and (assoc key-string allout-keybindings-list) | ||
| 3234 | ;; translate literal membership on list: | ||
| 3235 | (cadr (assoc key-string allout-keybindings-list))) | ||
| 3236 | ;; translate as a keybinding: | ||
| 2994 | (key-binding (concat allout-command-prefix | 3237 | (key-binding (concat allout-command-prefix |
| 2995 | (char-to-string | 3238 | (char-to-string |
| 2996 | (if (and (<= 97 key-num) ; "a" | 3239 | (if (and (<= 97 key-num) ; "a" |
| 2997 | (>= 122 key-num)) ; "z" | 3240 | (>= 122 key-num)) ; "z" |
| 2998 | (- key-num 96) key-num))) | 3241 | (- key-num 96) key-num))) |
| 2999 | t))) | 3242 | t)))) |
| 3000 | ;; Qualified with the allout prefix - do hot-spot operation. | 3243 | ;; Qualified as an allout command - do hot-spot operation. |
| 3001 | (setq allout-post-goto-bullet t) | 3244 | (setq allout-post-goto-bullet t) |
| 3002 | ;; accept-defaults nil, or else we'll get allout-item-icon-key-handler. | 3245 | ;; accept-defaults nil, or else we'll get allout-item-icon-key-handler. |
| 3003 | (setq mapped-binding (key-binding (char-to-string key-num)))) | 3246 | (setq mapped-binding (key-binding (char-to-string key-num)))) |
| 3004 | 3247 | ||
| 3005 | (while (keymapp mapped-binding) | 3248 | (while (keymapp mapped-binding) |
| 3006 | (setq mapped-binding | 3249 | (setq mapped-binding |
| 3007 | (lookup-key mapped-binding (read-key-sequence-vector nil t)))) | 3250 | (lookup-key mapped-binding (vector (read-char))))) |
| 3008 | 3251 | ||
| 3009 | (if mapped-binding | 3252 | (if mapped-binding |
| 3010 | (setq this-command mapped-binding))))) | 3253 | (setq this-command mapped-binding))))) |
| @@ -3036,7 +3279,7 @@ Offer one suitable for current depth DEPTH as default." | |||
| 3036 | (setq choice (solicit-char-in-string | 3279 | (setq choice (solicit-char-in-string |
| 3037 | (format "Select bullet: %s ('%s' default): " | 3280 | (format "Select bullet: %s ('%s' default): " |
| 3038 | sans-escapes | 3281 | sans-escapes |
| 3039 | default-bullet) | 3282 | (substring-no-properties default-bullet)) |
| 3040 | sans-escapes | 3283 | sans-escapes |
| 3041 | t))) | 3284 | t))) |
| 3042 | (message "") | 3285 | (message "") |
| @@ -3275,7 +3518,7 @@ Nuances: | |||
| 3275 | (allout-ascend-to-depth depth)) | 3518 | (allout-ascend-to-depth depth)) |
| 3276 | ((>= relative-depth 1) nil) | 3519 | ((>= relative-depth 1) nil) |
| 3277 | (t (allout-back-to-current-heading))) | 3520 | (t (allout-back-to-current-heading))) |
| 3278 | (setq ref-depth (allout-recent-depth)) | 3521 | (setq ref-depth allout-recent-depth) |
| 3279 | (setq ref-bullet | 3522 | (setq ref-bullet |
| 3280 | (if (> allout-recent-prefix-end 1) | 3523 | (if (> allout-recent-prefix-end 1) |
| 3281 | (allout-recent-bullet) | 3524 | (allout-recent-bullet) |
| @@ -3363,7 +3606,7 @@ Nuances: | |||
| 3363 | (setq dbl-space t)) | 3606 | (setq dbl-space t)) |
| 3364 | (if (save-excursion | 3607 | (if (save-excursion |
| 3365 | (allout-next-heading) | 3608 | (allout-next-heading) |
| 3366 | (when (> (allout-recent-depth) ref-depth) | 3609 | (when (> allout-recent-depth ref-depth) |
| 3367 | ;; This is an offspring. | 3610 | ;; This is an offspring. |
| 3368 | (forward-line -1) | 3611 | (forward-line -1) |
| 3369 | (looking-at "^\\s-*$"))) | 3612 | (looking-at "^\\s-*$"))) |
| @@ -3388,7 +3631,13 @@ Nuances: | |||
| 3388 | (if (and dbl-space (not (> relative-depth 0))) | 3631 | (if (and dbl-space (not (> relative-depth 0))) |
| 3389 | (newline 1)) | 3632 | (newline 1)) |
| 3390 | (if (and (not (eobp)) | 3633 | (if (and (not (eobp)) |
| 3391 | (not (bolp))) | 3634 | (or (not (bolp)) |
| 3635 | (and (not (bobp)) | ||
| 3636 | ;; bolp doesnt detect concealed | ||
| 3637 | ;; trailing newlines, compensate: | ||
| 3638 | (save-excursion | ||
| 3639 | (forward-char -1) | ||
| 3640 | (allout-hidden-p))))) | ||
| 3392 | (forward-char 1)))) | 3641 | (forward-char 1)))) |
| 3393 | )) | 3642 | )) |
| 3394 | (setq start (point)) | 3643 | (setq start (point)) |
| @@ -3507,23 +3756,28 @@ Note that refill of indented paragraphs is not done." | |||
| 3507 | (interactive "p") | 3756 | (interactive "p") |
| 3508 | (let ((initial-col (current-column)) | 3757 | (let ((initial-col (current-column)) |
| 3509 | (on-bullet (eq (point)(allout-current-bullet-pos))) | 3758 | (on-bullet (eq (point)(allout-current-bullet-pos))) |
| 3759 | from to | ||
| 3510 | (backwards (if (< arg 0) | 3760 | (backwards (if (< arg 0) |
| 3511 | (setq arg (* arg -1))))) | 3761 | (setq arg (* arg -1))))) |
| 3512 | (while (> arg 0) | 3762 | (while (> arg 0) |
| 3513 | (save-excursion (allout-back-to-current-heading) | 3763 | (save-excursion (allout-back-to-current-heading) |
| 3514 | (allout-end-of-prefix) | 3764 | (allout-end-of-prefix) |
| 3765 | (setq from allout-recent-prefix-beginning | ||
| 3766 | to allout-recent-prefix-end) | ||
| 3515 | (allout-rebullet-heading t ;;; solicit | 3767 | (allout-rebullet-heading t ;;; solicit |
| 3516 | nil ;;; depth | 3768 | nil ;;; depth |
| 3517 | nil ;;; number-control | 3769 | nil ;;; number-control |
| 3518 | nil ;;; index | 3770 | nil ;;; index |
| 3519 | t)) ;;; do-successors | 3771 | t) ;;; do-successors |
| 3772 | (run-hook-with-args 'allout-exposure-change-hook | ||
| 3773 | from to t)) | ||
| 3520 | (setq arg (1- arg)) | 3774 | (setq arg (1- arg)) |
| 3521 | (if (<= arg 0) | 3775 | (if (<= arg 0) |
| 3522 | nil | 3776 | nil |
| 3523 | (setq initial-col nil) ; Override positioning back to init col | 3777 | (setq initial-col nil) ; Override positioning back to init col |
| 3524 | (if (not backwards) | 3778 | (if (not backwards) |
| 3525 | (allout-next-visible-heading 1) | 3779 | (allout-next-visible-heading 1) |
| 3526 | (allout-goto-prefix) | 3780 | (allout-goto-prefix-doublechecked) |
| 3527 | (allout-next-visible-heading -1)))) | 3781 | (allout-next-visible-heading -1)))) |
| 3528 | (message "Done.") | 3782 | (message "Done.") |
| 3529 | (cond (on-bullet (goto-char (allout-current-bullet-pos))) | 3783 | (cond (on-bullet (goto-char (allout-current-bullet-pos))) |
| @@ -3573,7 +3827,7 @@ this function." | |||
| 3573 | (new-depth (or new-depth current-depth)) | 3827 | (new-depth (or new-depth current-depth)) |
| 3574 | (mb allout-recent-prefix-beginning) | 3828 | (mb allout-recent-prefix-beginning) |
| 3575 | (me allout-recent-prefix-end) | 3829 | (me allout-recent-prefix-end) |
| 3576 | (current-bullet (buffer-substring (- me 1) me)) | 3830 | (current-bullet (buffer-substring-no-properties (- me 1) me)) |
| 3577 | (new-prefix (allout-make-topic-prefix current-bullet | 3831 | (new-prefix (allout-make-topic-prefix current-bullet |
| 3578 | nil | 3832 | nil |
| 3579 | new-depth | 3833 | new-depth |
| @@ -3627,11 +3881,17 @@ this function." | |||
| 3627 | ) ; let* ((current-depth (allout-depth))...) | 3881 | ) ; let* ((current-depth (allout-depth))...) |
| 3628 | ) ; defun | 3882 | ) ; defun |
| 3629 | ;;;_ > allout-rebullet-topic (arg) | 3883 | ;;;_ > allout-rebullet-topic (arg) |
| 3630 | (defun allout-rebullet-topic (arg) | 3884 | (defun allout-rebullet-topic (arg &optional sans-offspring) |
| 3631 | "Rebullet the visible topic containing point and all contained subtopics. | 3885 | "Rebullet the visible topic containing point and all contained subtopics. |
| 3632 | 3886 | ||
| 3633 | Descends into invisible as well as visible topics, however. | 3887 | Descends into invisible as well as visible topics, however. |
| 3634 | 3888 | ||
| 3889 | When optional sans-offspring is non-nil, subtopics are not | ||
| 3890 | shifted. \(Shifting a topic outwards without shifting its | ||
| 3891 | offspring is disallowed, since this would create a \"containment | ||
| 3892 | discontinuity\", where the depth difference between a topic and | ||
| 3893 | its immediate offspring is greater than one.) | ||
| 3894 | |||
| 3635 | With repeat count, shift topic depth by that amount." | 3895 | With repeat count, shift topic depth by that amount." |
| 3636 | (interactive "P") | 3896 | (interactive "P") |
| 3637 | (let ((start-col (current-column))) | 3897 | (let ((start-col (current-column))) |
| @@ -3642,17 +3902,18 @@ With repeat count, shift topic depth by that amount." | |||
| 3642 | ;; Fill the user in, in case we're shifting a big topic: | 3902 | ;; Fill the user in, in case we're shifting a big topic: |
| 3643 | (if (not (zerop arg)) (message "Shifting...")) | 3903 | (if (not (zerop arg)) (message "Shifting...")) |
| 3644 | (allout-back-to-current-heading) | 3904 | (allout-back-to-current-heading) |
| 3645 | (if (<= (+ (allout-recent-depth) arg) 0) | 3905 | (if (<= (+ allout-recent-depth arg) 0) |
| 3646 | (error "Attempt to shift topic below level 1")) | 3906 | (error "Attempt to shift topic below level 1")) |
| 3647 | (allout-rebullet-topic-grunt arg) | 3907 | (allout-rebullet-topic-grunt arg nil nil nil nil sans-offspring) |
| 3648 | (if (not (zerop arg)) (message "Shifting... done."))) | 3908 | (if (not (zerop arg)) (message "Shifting... done."))) |
| 3649 | (move-to-column (max 0 (+ start-col arg))))) | 3909 | (move-to-column (max 0 (+ start-col arg))))) |
| 3650 | ;;;_ > allout-rebullet-topic-grunt (&optional relative-depth ...) | 3910 | ;;;_ > allout-rebullet-topic-grunt (&optional relative-depth ...) |
| 3651 | (defun allout-rebullet-topic-grunt (&optional relative-depth | 3911 | (defun allout-rebullet-topic-grunt (&optional relative-depth |
| 3652 | starting-depth | 3912 | starting-depth |
| 3653 | starting-point | 3913 | starting-point |
| 3654 | index | 3914 | index |
| 3655 | do-successors) | 3915 | do-successors |
| 3916 | sans-offspring) | ||
| 3656 | "Like `allout-rebullet-topic', but on nearest containing topic | 3917 | "Like `allout-rebullet-topic', but on nearest containing topic |
| 3657 | \(visible or not). | 3918 | \(visible or not). |
| 3658 | 3919 | ||
| @@ -3663,8 +3924,23 @@ All arguments are optional. | |||
| 3663 | First arg RELATIVE-DEPTH means to shift the depth of the entire | 3924 | First arg RELATIVE-DEPTH means to shift the depth of the entire |
| 3664 | topic that amount. | 3925 | topic that amount. |
| 3665 | 3926 | ||
| 3666 | The rest of the args are for internal recursive use by the function | 3927 | Several subsequent args are for internal recursive use by the function |
| 3667 | itself. The are STARTING-DEPTH, STARTING-POINT, and INDEX." | 3928 | itself: STARTING-DEPTH, STARTING-POINT, and INDEX. |
| 3929 | |||
| 3930 | Finally, if optional SANS-OFFSPRING is non-nil then the offspring | ||
| 3931 | are not shifted. \(Shifting a topic outwards without shifting | ||
| 3932 | its offspring is disallowed, since this would create a | ||
| 3933 | \"containment discontinuity\", where the depth difference between | ||
| 3934 | a topic and its immediate offspring is greater than one..)" | ||
| 3935 | |||
| 3936 | ;; XXX the recursion here is peculiar, and in general the routine may | ||
| 3937 | ;; need simplification with refactoring. | ||
| 3938 | |||
| 3939 | (if (and sans-offspring | ||
| 3940 | relative-depth | ||
| 3941 | (< relative-depth 0)) | ||
| 3942 | (error (concat "Attempt to shift topic outwards without offspring," | ||
| 3943 | " would cause containment discontinuity."))) | ||
| 3668 | 3944 | ||
| 3669 | (let* ((relative-depth (or relative-depth 0)) | 3945 | (let* ((relative-depth (or relative-depth 0)) |
| 3670 | (new-depth (allout-depth)) | 3946 | (new-depth (allout-depth)) |
| @@ -3676,44 +3952,57 @@ itself. The are STARTING-DEPTH, STARTING-POINT, and INDEX." | |||
| 3676 | (and (or (zerop relative-depth) | 3952 | (and (or (zerop relative-depth) |
| 3677 | (not on-starting-call)) | 3953 | (not on-starting-call)) |
| 3678 | (allout-sibling-index)))) | 3954 | (allout-sibling-index)))) |
| 3955 | (starting-index index) | ||
| 3679 | (moving-outwards (< 0 relative-depth)) | 3956 | (moving-outwards (< 0 relative-depth)) |
| 3680 | (starting-point (or starting-point (point)))) | 3957 | (starting-point (or starting-point (point))) |
| 3958 | (local-point (point))) | ||
| 3681 | 3959 | ||
| 3682 | ;; Sanity check for excessive promotion done only on starting call: | 3960 | ;; Sanity check for excessive promotion done only on starting call: |
| 3683 | (and on-starting-call | 3961 | (and on-starting-call |
| 3684 | moving-outwards | 3962 | moving-outwards |
| 3685 | (> 0 (+ starting-depth relative-depth)) | 3963 | (> 0 (+ starting-depth relative-depth)) |
| 3686 | (error "Attempt to shift topic out beyond level 1")) ;;; ====> | 3964 | (error "Attempt to shift topic out beyond level 1")) |
| 3687 | 3965 | ||
| 3688 | (cond ((= starting-depth new-depth) | 3966 | (cond ((= starting-depth new-depth) |
| 3689 | ;; We're at depth to work on this one: | 3967 | ;; We're at depth to work on this one. |
| 3690 | (allout-rebullet-heading nil ;;; solicit | 3968 | |
| 3691 | (+ starting-depth ;;; starting-depth | 3969 | ;; When shifting out we work on the children before working on |
| 3692 | relative-depth) | 3970 | ;; the parent to avoid interim `allout-aberrant-container-p' |
| 3693 | nil ;;; number | 3971 | ;; aberrancy, and vice-versa when shifting in: |
| 3694 | index ;;; index | 3972 | (if (>= relative-depth 0) |
| 3695 | ;; Every contained topic will get hit, | 3973 | (allout-rebullet-heading nil |
| 3696 | ;; and we have to get to outside ones | 3974 | (+ starting-depth relative-depth) |
| 3697 | ;; deliberately: | 3975 | nil ;;; number |
| 3698 | nil) ;;; do-successors | 3976 | index |
| 3699 | ;; ... and work on subsequent ones which are at greater depth: | 3977 | nil)) ;;; do-successors |
| 3700 | (setq index 0) | 3978 | (when (not sans-offspring) |
| 3701 | (allout-next-heading) | 3979 | ;; ... and work on subsequent ones which are at greater depth: |
| 3702 | (while (and (not (eobp)) | 3980 | (setq index 0) |
| 3703 | (< starting-depth (allout-recent-depth))) | 3981 | (allout-next-heading) |
| 3704 | (setq index (1+ index)) | 3982 | (while (and (not (eobp)) |
| 3705 | (allout-rebullet-topic-grunt relative-depth ;;; relative-depth | 3983 | (< starting-depth (allout-depth))) |
| 3706 | (1+ starting-depth);;;starting-depth | 3984 | (setq index (1+ index)) |
| 3707 | starting-point ;;; starting-point | 3985 | (allout-rebullet-topic-grunt relative-depth |
| 3708 | index))) ;;; index | 3986 | (1+ starting-depth) |
| 3987 | starting-point | ||
| 3988 | index))) | ||
| 3989 | (when (< relative-depth 0) | ||
| 3990 | (save-excursion | ||
| 3991 | (goto-char local-point) | ||
| 3992 | (allout-rebullet-heading nil ;;; solicit | ||
| 3993 | (+ starting-depth relative-depth) | ||
| 3994 | nil ;;; number | ||
| 3995 | starting-index | ||
| 3996 | nil)))) ;;; do-successors | ||
| 3709 | 3997 | ||
| 3710 | ((< starting-depth new-depth) | 3998 | ((< starting-depth new-depth) |
| 3711 | ;; Rare case - subtopic more than one level deeper than parent. | 3999 | ;; Rare case - subtopic more than one level deeper than parent. |
| 3712 | ;; Treat this one at an even deeper level: | 4000 | ;; Treat this one at an even deeper level: |
| 3713 | (allout-rebullet-topic-grunt relative-depth ;;; relative-depth | 4001 | (allout-rebullet-topic-grunt relative-depth |
| 3714 | new-depth ;;; starting-depth | 4002 | new-depth |
| 3715 | starting-point ;;; starting-point | 4003 | starting-point |
| 3716 | index))) ;;; index | 4004 | index |
| 4005 | sans-offspring))) | ||
| 3717 | 4006 | ||
| 3718 | (if on-starting-call | 4007 | (if on-starting-call |
| 3719 | (progn | 4008 | (progn |
| @@ -3721,8 +4010,8 @@ itself. The are STARTING-DEPTH, STARTING-POINT, and INDEX." | |||
| 3721 | ;; if topic has changed depth | 4010 | ;; if topic has changed depth |
| 3722 | (if (or do-successors | 4011 | (if (or do-successors |
| 3723 | (and (not (zerop relative-depth)) | 4012 | (and (not (zerop relative-depth)) |
| 3724 | (or (= (allout-recent-depth) starting-depth) | 4013 | (or (= allout-recent-depth starting-depth) |
| 3725 | (= (allout-recent-depth) (+ starting-depth | 4014 | (= allout-recent-depth (+ starting-depth |
| 3726 | relative-depth))))) | 4015 | relative-depth))))) |
| 3727 | (allout-rebullet-heading nil nil nil nil t)) | 4016 | (allout-rebullet-heading nil nil nil nil t)) |
| 3728 | ;; Now rectify numbering of new siblings of the adjusted topic, | 4017 | ;; Now rectify numbering of new siblings of the adjusted topic, |
| @@ -3747,24 +4036,24 @@ Returns final depth." | |||
| 3747 | was-eobp) | 4036 | was-eobp) |
| 3748 | (while (and (not (eobp)) | 4037 | (while (and (not (eobp)) |
| 3749 | (allout-depth) | 4038 | (allout-depth) |
| 3750 | (>= (allout-recent-depth) depth) | 4039 | (>= allout-recent-depth depth) |
| 3751 | (>= ascender depth)) | 4040 | (>= ascender depth)) |
| 3752 | ; Skip over all topics at | 4041 | ; Skip over all topics at |
| 3753 | ; lesser depths, which can not | 4042 | ; lesser depths, which can not |
| 3754 | ; have been disturbed: | 4043 | ; have been disturbed: |
| 3755 | (while (and (not (setq was-eobp (eobp))) | 4044 | (while (and (not (setq was-eobp (eobp))) |
| 3756 | (> (allout-recent-depth) ascender)) | 4045 | (> allout-recent-depth ascender)) |
| 3757 | (allout-next-heading)) | 4046 | (allout-next-heading)) |
| 3758 | ; Prime ascender for ascension: | 4047 | ; Prime ascender for ascension: |
| 3759 | (setq ascender (1- (allout-recent-depth))) | 4048 | (setq ascender (1- allout-recent-depth)) |
| 3760 | (if (>= (allout-recent-depth) depth) | 4049 | (if (>= allout-recent-depth depth) |
| 3761 | (allout-rebullet-heading nil ;;; solicit | 4050 | (allout-rebullet-heading nil ;;; solicit |
| 3762 | nil ;;; depth | 4051 | nil ;;; depth |
| 3763 | nil ;;; number-control | 4052 | nil ;;; number-control |
| 3764 | nil ;;; index | 4053 | nil ;;; index |
| 3765 | t)) ;;; do-successors | 4054 | t)) ;;; do-successors |
| 3766 | (if was-eobp (goto-char (point-max))))) | 4055 | (if was-eobp (goto-char (point-max))))) |
| 3767 | (allout-recent-depth)) | 4056 | allout-recent-depth) |
| 3768 | ;;;_ > allout-number-siblings (&optional denumber) | 4057 | ;;;_ > allout-number-siblings (&optional denumber) |
| 3769 | (defun allout-number-siblings (&optional denumber) | 4058 | (defun allout-number-siblings (&optional denumber) |
| 3770 | "Assign numbered topic prefix to this topic and its siblings. | 4059 | "Assign numbered topic prefix to this topic and its siblings. |
| @@ -3780,7 +4069,7 @@ rebulleting each topic at this level." | |||
| 3780 | (save-excursion | 4069 | (save-excursion |
| 3781 | (allout-back-to-current-heading) | 4070 | (allout-back-to-current-heading) |
| 3782 | (allout-beginning-of-level) | 4071 | (allout-beginning-of-level) |
| 3783 | (let ((depth (allout-recent-depth)) | 4072 | (let ((depth allout-recent-depth) |
| 3784 | (index (if (not denumber) 1)) | 4073 | (index (if (not denumber) 1)) |
| 3785 | (use-bullet (equal '(16) denumber)) | 4074 | (use-bullet (equal '(16) denumber)) |
| 3786 | (more t)) | 4075 | (more t)) |
| @@ -3794,55 +4083,84 @@ rebulleting each topic at this level." | |||
| 3794 | (setq more (allout-next-sibling depth nil)))))) | 4083 | (setq more (allout-next-sibling depth nil)))))) |
| 3795 | ;;;_ > allout-shift-in (arg) | 4084 | ;;;_ > allout-shift-in (arg) |
| 3796 | (defun allout-shift-in (arg) | 4085 | (defun allout-shift-in (arg) |
| 3797 | "Increase depth of current heading and any topics collapsed within it. | 4086 | "Increase depth of current heading and any items collapsed within it. |
| 4087 | |||
| 4088 | With a negative argument, the item is shifted out using | ||
| 4089 | `allout-shift-out', instead. | ||
| 4090 | |||
| 4091 | With an argument greater than one, shift-in the item but not its | ||
| 4092 | offspring, making the item into a sibling of its former children, | ||
| 4093 | and a child of sibling that formerly preceeded it. | ||
| 4094 | |||
| 4095 | You are not allowed to shift the first offspring of a topic | ||
| 4096 | inwards, because that would yield a \"containment | ||
| 4097 | discontinuity\", where the depth difference between a topic and | ||
| 4098 | its immediate offspring is greater than one. The first topic in | ||
| 4099 | the file can be adjusted to any positive depth, however." | ||
| 3798 | 4100 | ||
| 3799 | We disallow shifts that would result in the topic having a depth more than | ||
| 3800 | one level greater than the immediately previous topic, to avoid containment | ||
| 3801 | discontinuity. The first topic in the file can be adjusted to any positive | ||
| 3802 | depth, however." | ||
| 3803 | (interactive "p") | 4101 | (interactive "p") |
| 3804 | (if (> arg 0) | 4102 | (if (< arg 0) |
| 3805 | ;; refuse to create a containment discontinuity: | 4103 | (allout-shift-out (* arg -1)) |
| 3806 | (save-excursion | 4104 | ;; refuse to create a containment discontinuity: |
| 3807 | (allout-back-to-current-heading) | 4105 | (save-excursion |
| 3808 | (if (not (bobp)) | 4106 | (allout-back-to-current-heading) |
| 3809 | (let* ((current-depth (allout-recent-depth)) | 4107 | (if (not (bobp)) |
| 3810 | (start-point (point)) | 4108 | (let* ((current-depth allout-recent-depth) |
| 3811 | (predecessor-depth (progn | 4109 | (start-point (point)) |
| 3812 | (forward-char -1) | 4110 | (predecessor-depth (progn |
| 3813 | (allout-goto-prefix) | 4111 | (forward-char -1) |
| 3814 | (if (< (point) start-point) | 4112 | (allout-goto-prefix-doublechecked) |
| 3815 | (allout-recent-depth) | 4113 | (if (< (point) start-point) |
| 3816 | 0)))) | 4114 | allout-recent-depth |
| 3817 | (if (and (> predecessor-depth 0) | 4115 | 0)))) |
| 3818 | (> (+ current-depth arg) | 4116 | (if (and (> predecessor-depth 0) |
| 3819 | (1+ predecessor-depth))) | 4117 | (> (1+ current-depth) |
| 3820 | (error (concat "Disallowed shift deeper than" | 4118 | (1+ predecessor-depth))) |
| 3821 | " containing topic's children."))))))) | 4119 | (error (concat "Disallowed shift deeper than" |
| 3822 | (let ((where (point)) | 4120 | " containing topic's children.")))))) |
| 3823 | has-successor) | 4121 | (let ((where (point))) |
| 3824 | (if (and (< arg 0) | 4122 | (allout-rebullet-topic 1 (and (> arg 1) 'sans-offspring)) |
| 3825 | (allout-current-topic-collapsed-p) | 4123 | (run-hook-with-args 'allout-structure-shifted-hook arg where)))) |
| 3826 | (save-excursion (allout-next-sibling))) | ||
| 3827 | (setq has-successor t)) | ||
| 3828 | (allout-rebullet-topic arg) | ||
| 3829 | (when (< arg 0) | ||
| 3830 | (save-excursion | ||
| 3831 | (if (allout-ascend) | ||
| 3832 | (allout-show-children))) | ||
| 3833 | (if has-successor | ||
| 3834 | (allout-show-children))) | ||
| 3835 | (run-hook-with-args 'allout-structure-shifted-hook arg where))) | ||
| 3836 | ;;;_ > allout-shift-out (arg) | 4124 | ;;;_ > allout-shift-out (arg) |
| 3837 | (defun allout-shift-out (arg) | 4125 | (defun allout-shift-out (arg) |
| 3838 | "Decrease depth of current heading and any topics collapsed within it. | 4126 | "Decrease depth of current heading and any topics collapsed within it. |
| 4127 | This will make the item a sibling of its former container. | ||
| 3839 | 4128 | ||
| 3840 | We disallow shifts that would result in the topic having a depth more than | 4129 | With a negative argument, the item is shifted in using |
| 3841 | one level greater than the immediately previous topic, to avoid containment | 4130 | `allout-shift-in', instead. |
| 3842 | discontinuity. The first topic in the file can be adjusted to any positive | 4131 | |
| 3843 | depth, however." | 4132 | With an argument greater than one, shift-out the item's offspring |
| 4133 | but not the item itself, making the former children siblings of | ||
| 4134 | the item. | ||
| 4135 | |||
| 4136 | With an argument greater than 1, the item's offspring are shifted | ||
| 4137 | out without shifting the item. This will make the immediate | ||
| 4138 | subtopics into siblings of the item." | ||
| 3844 | (interactive "p") | 4139 | (interactive "p") |
| 3845 | (allout-shift-in (* arg -1))) | 4140 | (if (< arg 0) |
| 4141 | (allout-shift-in (* arg -1)) | ||
| 4142 | ;; Get proper exposure in this area: | ||
| 4143 | (save-excursion (if (allout-ascend) | ||
| 4144 | (allout-show-children))) | ||
| 4145 | ;; Show collapsed children if there's a successor which will become | ||
| 4146 | ;; their sibling: | ||
| 4147 | (if (and (allout-current-topic-collapsed-p) | ||
| 4148 | (save-excursion (allout-next-sibling))) | ||
| 4149 | (allout-show-children)) | ||
| 4150 | (let ((where (and (allout-depth) allout-recent-prefix-beginning))) | ||
| 4151 | (save-excursion | ||
| 4152 | (if (> arg 1) | ||
| 4153 | ;; Shift the offspring but not the topic: | ||
| 4154 | (let ((children-chart (allout-chart-subtree 1))) | ||
| 4155 | (if (listp (car children-chart)) | ||
| 4156 | ;; whoops: | ||
| 4157 | (setq children-chart (allout-flatten children-chart))) | ||
| 4158 | (save-excursion | ||
| 4159 | (dolist (child-point children-chart) | ||
| 4160 | (goto-char child-point) | ||
| 4161 | (allout-shift-out 1)))) | ||
| 4162 | (allout-rebullet-topic (* arg -1)))) | ||
| 4163 | (run-hook-with-args 'allout-structure-shifted-hook (* arg -1) where)))) | ||
| 3846 | ;;;_ : Surgery (kill-ring) functions with special provisions for outlines: | 4164 | ;;;_ : Surgery (kill-ring) functions with special provisions for outlines: |
| 3847 | ;;;_ > allout-kill-line (&optional arg) | 4165 | ;;;_ > allout-kill-line (&optional arg) |
| 3848 | (defun allout-kill-line (&optional arg) | 4166 | (defun allout-kill-line (&optional arg) |
| @@ -3857,27 +4175,32 @@ depth, however." | |||
| 3857 | (kill-line arg) | 4175 | (kill-line arg) |
| 3858 | ;; Ah, have to watch out for adjustments: | 4176 | ;; Ah, have to watch out for adjustments: |
| 3859 | (let* ((beg (point)) | 4177 | (let* ((beg (point)) |
| 4178 | end | ||
| 3860 | (beg-hidden (allout-hidden-p)) | 4179 | (beg-hidden (allout-hidden-p)) |
| 3861 | (end-hidden (save-excursion (allout-end-of-current-line) | 4180 | (end-hidden (save-excursion (allout-end-of-current-line) |
| 4181 | (setq end (point)) | ||
| 3862 | (allout-hidden-p))) | 4182 | (allout-hidden-p))) |
| 3863 | (depth (allout-depth)) | 4183 | (depth (allout-depth))) |
| 3864 | (collapsed (allout-current-topic-collapsed-p))) | ||
| 3865 | 4184 | ||
| 3866 | (if collapsed | 4185 | (allout-annotate-hidden beg end) |
| 3867 | (put-text-property beg (1+ beg) 'allout-was-collapsed t) | ||
| 3868 | (remove-text-properties beg (1+ beg) '(allout-was-collapsed t))) | ||
| 3869 | 4186 | ||
| 3870 | (if (and (not beg-hidden) (not end-hidden)) | 4187 | (if (and (not beg-hidden) (not end-hidden)) |
| 3871 | (allout-unprotected (kill-line arg)) | 4188 | (allout-unprotected (kill-line arg)) |
| 3872 | (kill-line arg)) | 4189 | (kill-line arg)) |
| 3873 | ; Provide some feedback: | ||
| 3874 | (sit-for 0) | ||
| 3875 | (if allout-numbered-bullet | 4190 | (if allout-numbered-bullet |
| 3876 | (save-excursion ; Renumber subsequent topics if needed: | 4191 | (save-excursion ; Renumber subsequent topics if needed: |
| 3877 | (if (not (looking-at allout-regexp)) | 4192 | (if (not (looking-at allout-regexp)) |
| 3878 | (allout-next-heading)) | 4193 | (allout-next-heading)) |
| 3879 | (allout-renumber-to-depth depth))) | 4194 | (allout-renumber-to-depth depth))) |
| 3880 | (run-hook-with-args 'allout-structure-deleted-hook depth (point))))) | 4195 | (run-hook-with-args 'allout-structure-deleted-hook depth (point))))) |
| 4196 | ;;;_ > allout-copy-line-as-kill () | ||
| 4197 | (defun allout-copy-line-as-kill () | ||
| 4198 | "Like allout-kill-topic, but save to kill ring instead of deleting." | ||
| 4199 | (interactive) | ||
| 4200 | (let ((buffer-read-only t)) | ||
| 4201 | (condition-case nil | ||
| 4202 | (allout-kill-line) | ||
| 4203 | (buffer-read-only nil)))) | ||
| 3881 | ;;;_ > allout-kill-topic () | 4204 | ;;;_ > allout-kill-topic () |
| 3882 | (defun allout-kill-topic () | 4205 | (defun allout-kill-topic () |
| 3883 | "Kill topic together with subtopics. | 4206 | "Kill topic together with subtopics. |
| @@ -3889,20 +4212,13 @@ Trailing whitespace is killed with a topic if that whitespace: | |||
| 3889 | - would not be added to whitespace already separating the topic from the | 4212 | - would not be added to whitespace already separating the topic from the |
| 3890 | previous one. | 4213 | previous one. |
| 3891 | 4214 | ||
| 3892 | Completely collapsed topics are marked as such, for re-collapse | 4215 | Topic exposure is marked with text-properties, to be used by |
| 3893 | when yank with allout-yank into an outline as a heading." | 4216 | allout-yank-processing for exposure recovery." |
| 3894 | |||
| 3895 | ;; Some finagling is done to make complex topic kills appear faster | ||
| 3896 | ;; than they actually are. A redisplay is performed immediately | ||
| 3897 | ;; after the region is deleted, though the renumbering process | ||
| 3898 | ;; has yet to be performed. This means that there may appear to be | ||
| 3899 | ;; a lag *after* a kill has been performed. | ||
| 3900 | 4217 | ||
| 3901 | (interactive) | 4218 | (interactive) |
| 3902 | (let* ((inhibit-field-text-motion t) | 4219 | (let* ((inhibit-field-text-motion t) |
| 3903 | (collapsed (allout-current-topic-collapsed-p)) | ||
| 3904 | (beg (prog1 (allout-back-to-current-heading) (beginning-of-line))) | 4220 | (beg (prog1 (allout-back-to-current-heading) (beginning-of-line))) |
| 3905 | (depth (allout-recent-depth))) | 4221 | (depth allout-recent-depth)) |
| 3906 | (allout-end-of-current-subtree) | 4222 | (allout-end-of-current-subtree) |
| 3907 | (if (and (/= (current-column) 0) (not (eobp))) | 4223 | (if (and (/= (current-column) 0) (not (eobp))) |
| 3908 | (forward-char 1)) | 4224 | (forward-char 1)) |
| @@ -3910,21 +4226,99 @@ when yank with allout-yank into an outline as a heading." | |||
| 3910 | (if (and (looking-at "\n") | 4226 | (if (and (looking-at "\n") |
| 3911 | (or (save-excursion | 4227 | (or (save-excursion |
| 3912 | (or (not (allout-next-heading)) | 4228 | (or (not (allout-next-heading)) |
| 3913 | (= depth (allout-recent-depth)))) | 4229 | (= depth allout-recent-depth))) |
| 3914 | (and (> (- beg (point-min)) 3) | 4230 | (and (> (- beg (point-min)) 3) |
| 3915 | (string= (buffer-substring (- beg 2) beg) "\n\n")))) | 4231 | (string= (buffer-substring (- beg 2) beg) "\n\n")))) |
| 3916 | (forward-char 1))) | 4232 | (forward-char 1))) |
| 3917 | 4233 | ||
| 3918 | (if collapsed | 4234 | (allout-annotate-hidden beg (point)) |
| 3919 | (allout-unprotected | 4235 | |
| 3920 | (put-text-property beg (1+ beg) 'allout-was-collapsed t)) | ||
| 3921 | (allout-unprotected | ||
| 3922 | (remove-text-properties beg (1+ beg) '(allout-was-collapsed t)))) | ||
| 3923 | (allout-unprotected (kill-region beg (point))) | 4236 | (allout-unprotected (kill-region beg (point))) |
| 3924 | (sit-for 0) | ||
| 3925 | (save-excursion | 4237 | (save-excursion |
| 3926 | (allout-renumber-to-depth depth)) | 4238 | (allout-renumber-to-depth depth)) |
| 3927 | (run-hook-with-args 'allout-structure-deleted-hook depth (point)))) | 4239 | (run-hook-with-args 'allout-structure-deleted-hook depth (point)))) |
| 4240 | ;;;_ > allout-copy-topic-as-kill () | ||
| 4241 | (defun allout-copy-topic-as-kill () | ||
| 4242 | "Like allout-kill-topic, but save to kill ring instead of deleting." | ||
| 4243 | (interactive) | ||
| 4244 | (let ((buffer-read-only t)) | ||
| 4245 | (condition-case nil | ||
| 4246 | (allout-kill-topic) | ||
| 4247 | (buffer-read-only (message "Topic copied..."))))) | ||
| 4248 | ;;;_ > allout-annotate-hidden (begin end) | ||
| 4249 | (defun allout-annotate-hidden (begin end) | ||
| 4250 | "Qualify text with properties to indicate exposure status." | ||
| 4251 | |||
| 4252 | (let ((was-modified (buffer-modified-p)) | ||
| 4253 | (buffer-read-only nil)) | ||
| 4254 | (allout-unprotected | ||
| 4255 | (remove-text-properties begin end '(allout-was-hidden t))) | ||
| 4256 | (save-excursion | ||
| 4257 | (goto-char begin) | ||
| 4258 | (let (done next prev overlay) | ||
| 4259 | (while (not done) | ||
| 4260 | ;; at or advance to start of next hidden region: | ||
| 4261 | (if (not (allout-hidden-p)) | ||
| 4262 | (setq next | ||
| 4263 | (max (1+ (point)) | ||
| 4264 | (next-single-char-property-change (point) | ||
| 4265 | 'invisible | ||
| 4266 | nil end)))) | ||
| 4267 | (if (or (not next) (eq prev next)) | ||
| 4268 | ;; still not at start of hidden area - must not be any left. | ||
| 4269 | (setq done t) | ||
| 4270 | (goto-char next) | ||
| 4271 | (setq prev next) | ||
| 4272 | (if (not (allout-hidden-p)) | ||
| 4273 | ;; still not at start of hidden area. | ||
| 4274 | (setq done t) | ||
| 4275 | (setq overlay (allout-get-invisibility-overlay)) | ||
| 4276 | (setq next (overlay-end overlay) | ||
| 4277 | prev next) | ||
| 4278 | ;; advance to end of this hidden area: | ||
| 4279 | (when next | ||
| 4280 | (goto-char next) | ||
| 4281 | (allout-unprotected | ||
| 4282 | (put-text-property (overlay-start overlay) next | ||
| 4283 | 'allout-was-hidden t)))))))) | ||
| 4284 | (set-buffer-modified-p was-modified))) | ||
| 4285 | ;;;_ > allout-hide-by-annotation (begin end) | ||
| 4286 | (defun allout-hide-by-annotation (begin end) | ||
| 4287 | "Translate text properties indicating exposure status into actual exposure." | ||
| 4288 | (save-excursion | ||
| 4289 | (goto-char begin) | ||
| 4290 | (let ((was-modified (buffer-modified-p)) | ||
| 4291 | done next prev) | ||
| 4292 | (while (not done) | ||
| 4293 | ;; at or advance to start of next annotation: | ||
| 4294 | (if (not (get-text-property (point) 'allout-was-hidden)) | ||
| 4295 | (setq next (next-single-char-property-change (point) | ||
| 4296 | 'allout-was-hidden | ||
| 4297 | nil end))) | ||
| 4298 | (if (or (not next) (eq prev next)) | ||
| 4299 | ;; no more or not advancing - must not be any left. | ||
| 4300 | (setq done t) | ||
| 4301 | (goto-char next) | ||
| 4302 | (setq prev next) | ||
| 4303 | (if (not (get-text-property (point) 'allout-was-hidden)) | ||
| 4304 | ;; still not at start of annotation. | ||
| 4305 | (setq done t) | ||
| 4306 | ;; advance to just after end of this annotation: | ||
| 4307 | (setq next (next-single-char-property-change (point) | ||
| 4308 | 'allout-was-hidden | ||
| 4309 | nil end)) | ||
| 4310 | (overlay-put (make-overlay prev next) | ||
| 4311 | 'category 'allout-exposure-category) | ||
| 4312 | (allout-unprotected | ||
| 4313 | (remove-text-properties prev next '(allout-was-hidden t))) | ||
| 4314 | (setq prev next) | ||
| 4315 | (if next (goto-char next))))) | ||
| 4316 | (set-buffer-modified-p was-modified)))) | ||
| 4317 | ;;;_ > allout-remove-exposure-annotation (begin end) | ||
| 4318 | (defun allout-remove-exposure-annotation (begin end) | ||
| 4319 | "Remove text properties indicating exposure status." | ||
| 4320 | (remove-text-properties begin end '(allout-was-hidden t))) | ||
| 4321 | |||
| 3928 | ;;;_ > allout-yank-processing () | 4322 | ;;;_ > allout-yank-processing () |
| 3929 | (defun allout-yank-processing (&optional arg) | 4323 | (defun allout-yank-processing (&optional arg) |
| 3930 | 4324 | ||
| @@ -3955,12 +4349,10 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 3955 | (let* ((subj-beg (point)) | 4349 | (let* ((subj-beg (point)) |
| 3956 | (into-bol (bolp)) | 4350 | (into-bol (bolp)) |
| 3957 | (subj-end (allout-mark-marker t)) | 4351 | (subj-end (allout-mark-marker t)) |
| 3958 | (was-collapsed (get-text-property subj-beg 'allout-was-collapsed)) | ||
| 3959 | ;; 'resituate' if yanking an entire topic into topic header: | 4352 | ;; 'resituate' if yanking an entire topic into topic header: |
| 3960 | (resituate (and (allout-e-o-prefix-p) | 4353 | (resituate (and (allout-e-o-prefix-p) |
| 3961 | (looking-at (concat "\\(" allout-regexp "\\)")) | 4354 | (looking-at allout-regexp) |
| 3962 | (allout-prefix-data (match-beginning 1) | 4355 | (allout-prefix-data))) |
| 3963 | (match-end 1)))) | ||
| 3964 | ;; `rectify-numbering' if resituating (where several topics may | 4356 | ;; `rectify-numbering' if resituating (where several topics may |
| 3965 | ;; be resituating) or yanking a topic into a topic slot (bol): | 4357 | ;; be resituating) or yanking a topic into a topic slot (bol): |
| 3966 | (rectify-numbering (or resituate | 4358 | (rectify-numbering (or resituate |
| @@ -3968,7 +4360,7 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 3968 | (if resituate | 4360 | (if resituate |
| 3969 | ; The yanked stuff is a topic: | 4361 | ; The yanked stuff is a topic: |
| 3970 | (let* ((prefix-len (- (match-end 1) subj-beg)) | 4362 | (let* ((prefix-len (- (match-end 1) subj-beg)) |
| 3971 | (subj-depth (allout-recent-depth)) | 4363 | (subj-depth allout-recent-depth) |
| 3972 | (prefix-bullet (allout-recent-bullet)) | 4364 | (prefix-bullet (allout-recent-bullet)) |
| 3973 | (adjust-to-depth | 4365 | (adjust-to-depth |
| 3974 | ;; Nil if adjustment unnecessary, otherwise depth to which | 4366 | ;; Nil if adjustment unnecessary, otherwise depth to which |
| @@ -3982,15 +4374,13 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 3982 | (beginning-of-line) | 4374 | (beginning-of-line) |
| 3983 | (not (= (point) subj-beg))) | 4375 | (not (= (point) subj-beg))) |
| 3984 | (looking-at allout-regexp) | 4376 | (looking-at allout-regexp) |
| 3985 | (allout-prefix-data (match-beginning 0) | 4377 | (allout-prefix-data)) |
| 3986 | (match-end 0))) | 4378 | allout-recent-depth))) |
| 3987 | (allout-recent-depth)))) | ||
| 3988 | (more t)) | 4379 | (more t)) |
| 3989 | (setq rectify-numbering allout-numbered-bullet) | 4380 | (setq rectify-numbering allout-numbered-bullet) |
| 3990 | (if adjust-to-depth | 4381 | (if adjust-to-depth |
| 3991 | ; Do the adjustment: | 4382 | ; Do the adjustment: |
| 3992 | (progn | 4383 | (progn |
| 3993 | (message "... yanking") (sit-for 0) | ||
| 3994 | (save-restriction | 4384 | (save-restriction |
| 3995 | (narrow-to-region subj-beg subj-end) | 4385 | (narrow-to-region subj-beg subj-end) |
| 3996 | ; Trim off excessive blank | 4386 | ; Trim off excessive blank |
| @@ -4006,7 +4396,7 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 4006 | (while more | 4396 | (while more |
| 4007 | (allout-back-to-current-heading) | 4397 | (allout-back-to-current-heading) |
| 4008 | ; go as high as we can in each bunch: | 4398 | ; go as high as we can in each bunch: |
| 4009 | (while (allout-ascend-to-depth (1- (allout-depth)))) | 4399 | (while (allout-ascend)) |
| 4010 | (save-excursion | 4400 | (save-excursion |
| 4011 | (allout-rebullet-topic-grunt (- adjust-to-depth | 4401 | (allout-rebullet-topic-grunt (- adjust-to-depth |
| 4012 | subj-depth)) | 4402 | subj-depth)) |
| @@ -4015,7 +4405,6 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 4015 | (progn (widen) | 4405 | (progn (widen) |
| 4016 | (forward-char -1) | 4406 | (forward-char -1) |
| 4017 | (narrow-to-region subj-beg (point)))))) | 4407 | (narrow-to-region subj-beg (point)))))) |
| 4018 | (message "") | ||
| 4019 | ;; Preserve new bullet if it's a distinctive one, otherwise | 4408 | ;; Preserve new bullet if it's a distinctive one, otherwise |
| 4020 | ;; use old one: | 4409 | ;; use old one: |
| 4021 | (if (string-match (regexp-quote prefix-bullet) | 4410 | (if (string-match (regexp-quote prefix-bullet) |
| @@ -4042,19 +4431,19 @@ however, are left exactly like normal, non-allout-specific yanks." | |||
| 4042 | (progn | 4431 | (progn |
| 4043 | (save-excursion | 4432 | (save-excursion |
| 4044 | ; Give some preliminary feedback: | 4433 | ; Give some preliminary feedback: |
| 4045 | (message "... reconciling numbers") (sit-for 0) | 4434 | (message "... reconciling numbers") |
| 4046 | ; ... and renumber, in case necessary: | 4435 | ; ... and renumber, in case necessary: |
| 4047 | (goto-char subj-beg) | 4436 | (goto-char subj-beg) |
| 4048 | (if (allout-goto-prefix) | 4437 | (if (allout-goto-prefix-doublechecked) |
| 4049 | (allout-rebullet-heading nil ;;; solicit | 4438 | (allout-rebullet-heading nil ;;; solicit |
| 4050 | (allout-depth) ;;; depth | 4439 | (allout-depth) ;;; depth |
| 4051 | nil ;;; number-control | 4440 | nil ;;; number-control |
| 4052 | nil ;;; index | 4441 | nil ;;; index |
| 4053 | t)) | 4442 | t)) |
| 4054 | (message "")))) | 4443 | (message "")))) |
| 4055 | (when (and (or into-bol resituate) was-collapsed) | 4444 | (if (or into-bol resituate) |
| 4056 | (remove-text-properties subj-beg (1+ subj-beg) '(allout-was-collapsed)) | 4445 | (allout-hide-by-annotation (point) (allout-mark-marker t)) |
| 4057 | (allout-hide-current-subtree)) | 4446 | (allout-remove-exposure-annotation (allout-mark-marker t) (point))) |
| 4058 | (if (not resituate) | 4447 | (if (not resituate) |
| 4059 | (exchange-point-and-mark)) | 4448 | (exchange-point-and-mark)) |
| 4060 | (run-hook-with-args 'allout-structure-added-hook subj-beg subj-end)))) | 4449 | (run-hook-with-args 'allout-structure-added-hook subj-beg subj-end)))) |
| @@ -4139,7 +4528,7 @@ by pops to non-distinctive yanks. Bug..." | |||
| 4139 | (error "%s not found and can't be created" file-name))) | 4528 | (error "%s not found and can't be created" file-name))) |
| 4140 | (condition-case failure | 4529 | (condition-case failure |
| 4141 | (find-file-other-window file-name) | 4530 | (find-file-other-window file-name) |
| 4142 | ('error failure)) | 4531 | (error failure)) |
| 4143 | (error "%s not found" file-name)) | 4532 | (error "%s not found" file-name)) |
| 4144 | ) | 4533 | ) |
| 4145 | ) | 4534 | ) |
| @@ -4198,7 +4587,7 @@ the exposure." | |||
| 4198 | (interactive) | 4587 | (interactive) |
| 4199 | (save-excursion | 4588 | (save-excursion |
| 4200 | (let (beg end) | 4589 | (let (beg end) |
| 4201 | (allout-goto-prefix) | 4590 | (allout-goto-prefix-doublechecked) |
| 4202 | (setq beg (if (allout-hidden-p) (1- (point)) (point))) | 4591 | (setq beg (if (allout-hidden-p) (1- (point)) (point))) |
| 4203 | (setq end (allout-pre-next-prefix)) | 4592 | (setq end (allout-pre-next-prefix)) |
| 4204 | (allout-flag-region beg end nil) | 4593 | (allout-flag-region beg end nil) |
| @@ -4235,8 +4624,32 @@ point of non-opened subtree?)" | |||
| 4235 | (save-excursion | 4624 | (save-excursion |
| 4236 | (allout-beginning-of-current-line) | 4625 | (allout-beginning-of-current-line) |
| 4237 | (save-restriction | 4626 | (save-restriction |
| 4238 | (let* ((chart (allout-chart-subtree (or level 1))) | 4627 | (let* (depth |
| 4239 | (to-reveal (allout-chart-to-reveal chart (or level 1)))) | 4628 | ;; translate the level spec for this routine to the ones |
| 4629 | ;; used by -chart-subtree and -chart-to-reveal: | ||
| 4630 | (chart-level (cond ((not level) 1) | ||
| 4631 | ((eq level t) nil) | ||
| 4632 | (t level))) | ||
| 4633 | (chart (allout-chart-subtree chart-level)) | ||
| 4634 | (to-reveal (or (allout-chart-to-reveal chart chart-level) | ||
| 4635 | ;; interactive, show discontinuous children: | ||
| 4636 | (and chart | ||
| 4637 | (interactive-p) | ||
| 4638 | (save-excursion | ||
| 4639 | (allout-back-to-current-heading) | ||
| 4640 | (setq depth (allout-current-depth)) | ||
| 4641 | (and (allout-next-heading) | ||
| 4642 | (> allout-recent-depth | ||
| 4643 | (1+ depth)))) | ||
| 4644 | (message | ||
| 4645 | "Discontinuous offspring; use `%s %s'%s." | ||
| 4646 | (substitute-command-keys | ||
| 4647 | "\\[universal-argument]") | ||
| 4648 | (substitute-command-keys | ||
| 4649 | "\\[allout-shift-out]") | ||
| 4650 | " to elevate them.") | ||
| 4651 | (allout-chart-to-reveal | ||
| 4652 | chart (- allout-recent-depth depth)))))) | ||
| 4240 | (goto-char start-point) | 4653 | (goto-char start-point) |
| 4241 | (when (and strict (allout-hidden-p)) | 4654 | (when (and strict (allout-hidden-p)) |
| 4242 | ;; Concealed root would already have been taken care of, | 4655 | ;; Concealed root would already have been taken care of, |
| @@ -4267,28 +4680,26 @@ Useful for coherently exposing to a random point in a hidden region." | |||
| 4267 | (save-excursion | 4680 | (save-excursion |
| 4268 | (let ((inhibit-field-text-motion t) | 4681 | (let ((inhibit-field-text-motion t) |
| 4269 | (orig-pt (point)) | 4682 | (orig-pt (point)) |
| 4270 | (orig-pref (allout-goto-prefix)) | 4683 | (orig-pref (allout-goto-prefix-doublechecked)) |
| 4271 | (last-at (point)) | 4684 | (last-at (point)) |
| 4272 | bag-it) | 4685 | (bag-it 0)) |
| 4273 | (while (or bag-it (allout-hidden-p)) | 4686 | (while (or (> bag-it 1) (allout-hidden-p)) |
| 4274 | (while (allout-hidden-p) | 4687 | (while (allout-hidden-p) |
| 4275 | ;; XXX We would use `(move-beginning-of-line 1)', but it gets | 4688 | (move-beginning-of-line 1) |
| 4276 | ;; stuck on hidden newlines at column 80, as of GNU Emacs 22.0.50. | ||
| 4277 | (beginning-of-line) | ||
| 4278 | (if (allout-hidden-p) (forward-char -1))) | 4689 | (if (allout-hidden-p) (forward-char -1))) |
| 4279 | (if (= last-at (setq last-at (point))) | 4690 | (if (= last-at (setq last-at (point))) |
| 4280 | ;; Oops, we're not making any progress! Show the current | 4691 | ;; Oops, we're not making any progress! Show the current topic |
| 4281 | ;; topic completely, and bag this try. | 4692 | ;; completely, and try one more time here, if we haven't already. |
| 4282 | (progn (beginning-of-line) | 4693 | (progn (beginning-of-line) |
| 4283 | (allout-show-current-subtree) | 4694 | (allout-show-current-subtree) |
| 4284 | (goto-char orig-pt) | 4695 | (goto-char orig-pt) |
| 4285 | (setq bag-it t) | 4696 | (setq bag-it (1+ bag-it)) |
| 4286 | (beep) | 4697 | (if (> bag-it 1) |
| 4287 | (message "%s: %s" | 4698 | (error "allout-show-to-offshoot: %s" |
| 4288 | "allout-show-to-offshoot: " | 4699 | "Stumped by aberrant nesting."))) |
| 4289 | "Aberrant nesting encountered."))) | 4700 | (if (> bag-it 0) (setq bag-it 0)) |
| 4290 | (allout-show-children) | 4701 | (allout-show-children) |
| 4291 | (goto-char orig-pref)) | 4702 | (goto-char orig-pref))) |
| 4292 | (goto-char orig-pt))) | 4703 | (goto-char orig-pt))) |
| 4293 | (if (allout-hidden-p) | 4704 | (if (allout-hidden-p) |
| 4294 | (allout-show-entry))) | 4705 | (allout-show-entry))) |
| @@ -4368,10 +4779,10 @@ siblings, even if the target topic is already closed." | |||
| 4368 | (current-exposed (not (allout-current-topic-collapsed-p t)))) | 4779 | (current-exposed (not (allout-current-topic-collapsed-p t)))) |
| 4369 | (cond (current-exposed (allout-flag-current-subtree t)) | 4780 | (cond (current-exposed (allout-flag-current-subtree t)) |
| 4370 | (just-close nil) | 4781 | (just-close nil) |
| 4371 | ((allout-up-current-level 1 t) (allout-hide-current-subtree)) | 4782 | ((allout-ascend) (allout-hide-current-subtree)) |
| 4372 | (t (goto-char 0) | 4783 | (t (goto-char 0) |
| 4373 | (message sibs-msg) | 4784 | (message sibs-msg) |
| 4374 | (allout-goto-prefix) | 4785 | (allout-goto-prefix-doublechecked) |
| 4375 | (allout-expose-topic '(0 :)) | 4786 | (allout-expose-topic '(0 :)) |
| 4376 | (message (concat sibs-msg " Done.")))) | 4787 | (message (concat sibs-msg " Done.")))) |
| 4377 | (goto-char from))) | 4788 | (goto-char from))) |
| @@ -4494,7 +4905,10 @@ Examples: | |||
| 4494 | (cond ((eq curr-elem '*) (allout-show-current-subtree) | 4905 | (cond ((eq curr-elem '*) (allout-show-current-subtree) |
| 4495 | (if (> allout-recent-end-of-subtree max-pos) | 4906 | (if (> allout-recent-end-of-subtree max-pos) |
| 4496 | (setq max-pos allout-recent-end-of-subtree))) | 4907 | (setq max-pos allout-recent-end-of-subtree))) |
| 4497 | ((eq curr-elem '+) (allout-show-current-branches) | 4908 | ((eq curr-elem '+) |
| 4909 | (if (not (allout-hidden-p)) | ||
| 4910 | (save-excursion (allout-hide-current-subtree t))) | ||
| 4911 | (allout-show-current-branches) | ||
| 4498 | (if (> allout-recent-end-of-subtree max-pos) | 4912 | (if (> allout-recent-end-of-subtree max-pos) |
| 4499 | (setq max-pos allout-recent-end-of-subtree))) | 4913 | (setq max-pos allout-recent-end-of-subtree))) |
| 4500 | ((eq curr-elem '-) (allout-show-current-entry)) | 4914 | ((eq curr-elem '-) (allout-show-current-entry)) |
| @@ -4636,7 +5050,7 @@ Examples: | |||
| 4636 | level, and expose children of subsequent topics at current | 5050 | level, and expose children of subsequent topics at current |
| 4637 | level *except* for the last, which should be opened completely." | 5051 | level *except* for the last, which should be opened completely." |
| 4638 | (list 'save-excursion | 5052 | (list 'save-excursion |
| 4639 | '(if (not (or (allout-goto-prefix) | 5053 | '(if (not (or (allout-goto-prefix-doublechecked) |
| 4640 | (allout-next-heading))) | 5054 | (allout-next-heading))) |
| 4641 | (error "allout-new-exposure: Can't find any outline topics")) | 5055 | (error "allout-new-exposure: Can't find any outline topics")) |
| 4642 | (list 'allout-expose-topic (list 'quote spec)))) | 5056 | (list 'allout-expose-topic (list 'quote spec)))) |
| @@ -4758,20 +5172,20 @@ header and body. The elements of that list are: | |||
| 4758 | (goto-char start) | 5172 | (goto-char start) |
| 4759 | (beginning-of-line) | 5173 | (beginning-of-line) |
| 4760 | ;; Goto initial topic, and register preceeding stuff, if any: | 5174 | ;; Goto initial topic, and register preceeding stuff, if any: |
| 4761 | (if (> (allout-goto-prefix) start) | 5175 | (if (> (allout-goto-prefix-doublechecked) start) |
| 4762 | ;; First topic follows beginning point - register preliminary stuff: | 5176 | ;; First topic follows beginning point - register preliminary stuff: |
| 4763 | (setq result (list (list 0 "" nil | 5177 | (setq result (list (list 0 "" nil |
| 4764 | (buffer-substring start (1- (point))))))) | 5178 | (buffer-substring start (1- (point))))))) |
| 4765 | (while (and (not done) | 5179 | (while (and (not done) |
| 4766 | (not (eobp)) ; Loop until we've covered the region. | 5180 | (not (eobp)) ; Loop until we've covered the region. |
| 4767 | (not (> (point) end))) | 5181 | (not (> (point) end))) |
| 4768 | (setq depth (allout-recent-depth) ; Current topics depth, | 5182 | (setq depth allout-recent-depth ; Current topics depth, |
| 4769 | bullet (allout-recent-bullet) ; ... bullet, | 5183 | bullet (allout-recent-bullet) ; ... bullet, |
| 4770 | prefix (allout-recent-prefix) | 5184 | prefix (allout-recent-prefix) |
| 4771 | beg (progn (allout-end-of-prefix t) (point))) ; and beginning. | 5185 | beg (progn (allout-end-of-prefix t) (point))) ; and beginning. |
| 4772 | (setq done ; The boundary for the current topic: | 5186 | (setq done ; The boundary for the current topic: |
| 4773 | (not (allout-next-visible-heading 1))) | 5187 | (not (allout-next-visible-heading 1))) |
| 4774 | (setq new-depth (allout-recent-depth)) | 5188 | (setq new-depth allout-recent-depth) |
| 4775 | (setq gone-out out | 5189 | (setq gone-out out |
| 4776 | out (< new-depth depth)) | 5190 | out (< new-depth depth)) |
| 4777 | (beginning-of-line) | 5191 | (beginning-of-line) |
| @@ -4788,7 +5202,8 @@ header and body. The elements of that list are: | |||
| 4788 | (allout-back-to-visible-text))) | 5202 | (allout-back-to-visible-text))) |
| 4789 | strings)) | 5203 | strings)) |
| 4790 | (when (< (point) next) ; Resume from after hid text, if any. | 5204 | (when (< (point) next) ; Resume from after hid text, if any. |
| 4791 | (line-move 1)) | 5205 | (line-move 1) |
| 5206 | (beginning-of-line)) | ||
| 4792 | (setq beg (point))) | 5207 | (setq beg (point))) |
| 4793 | ;; Accumulate list for this topic: | 5208 | ;; Accumulate list for this topic: |
| 4794 | (setq strings (nreverse strings)) | 5209 | (setq strings (nreverse strings)) |
| @@ -5040,10 +5455,10 @@ environment. Leaves point at the end of the line." | |||
| 5040 | ;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#" | 5455 | ;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#" |
| 5041 | end ; bounded by end-of-line | 5456 | end ; bounded by end-of-line |
| 5042 | 1) ; no matches, move to end & return nil | 5457 | 1) ; no matches, move to end & return nil |
| 5043 | (goto-char (match-beginning 0)) | 5458 | (goto-char (match-beginning 2)) |
| 5044 | (insert "\\") | 5459 | (insert "\\") |
| 5045 | (setq end (1+ end)) | 5460 | (setq end (1+ end)) |
| 5046 | (goto-char (1+ (match-end 0))))))) | 5461 | (goto-char (1+ (match-end 2))))))) |
| 5047 | ;;;_ > allout-insert-latex-header (buffer) | 5462 | ;;;_ > allout-insert-latex-header (buffer) |
| 5048 | (defun allout-insert-latex-header (buffer) | 5463 | (defun allout-insert-latex-header (buffer) |
| 5049 | "Insert initial LaTeX commands at point in BUFFER." | 5464 | "Insert initial LaTeX commands at point in BUFFER." |
| @@ -5089,7 +5504,7 @@ environment. Leaves point at the end of the line." | |||
| 5089 | (allout-latex-verb-quote (if allout-title | 5504 | (allout-latex-verb-quote (if allout-title |
| 5090 | (condition-case nil | 5505 | (condition-case nil |
| 5091 | (eval allout-title) | 5506 | (eval allout-title) |
| 5092 | ('error "<unnamed buffer>")) | 5507 | (error "<unnamed buffer>")) |
| 5093 | "Unnamed Outline")) | 5508 | "Unnamed Outline")) |
| 5094 | "}\n" | 5509 | "}\n" |
| 5095 | "\\end{center}\n\n")) | 5510 | "\\end{center}\n\n")) |
| @@ -5228,7 +5643,7 @@ auto-encryption specifics. | |||
| 5228 | default to symmetric encryption - you must manually \(re)encrypt key-pair | 5643 | default to symmetric encryption - you must manually \(re)encrypt key-pair |
| 5229 | encrypted topics if you want them to continue to use the key-pair cipher. | 5644 | encrypted topics if you want them to continue to use the key-pair cipher. |
| 5230 | 5645 | ||
| 5231 | Level-1 topics, with prefix consisting solely of an `*' asterisk, cannot be | 5646 | Level-one topics, with prefix consisting solely of an `*' asterisk, cannot be |
| 5232 | encrypted. If you want to encrypt the contents of a top-level topic, use | 5647 | encrypted. If you want to encrypt the contents of a top-level topic, use |
| 5233 | \\[allout-shift-in] to increase its depth. | 5648 | \\[allout-shift-in] to increase its depth. |
| 5234 | 5649 | ||
| @@ -5291,12 +5706,13 @@ See `allout-toggle-current-subtree-encryption' for more details." | |||
| 5291 | (save-excursion | 5706 | (save-excursion |
| 5292 | (allout-end-of-prefix t) | 5707 | (allout-end-of-prefix t) |
| 5293 | 5708 | ||
| 5294 | (if (= (allout-recent-depth) 1) | 5709 | (if (= allout-recent-depth 1) |
| 5295 | (error (concat "Cannot encrypt or decrypt level 1 topics -" | 5710 | (error (concat "Cannot encrypt or decrypt level 1 topics -" |
| 5296 | " shift it in to make it encryptable"))) | 5711 | " shift it in to make it encryptable"))) |
| 5297 | 5712 | ||
| 5298 | (let* ((allout-buffer (current-buffer)) | 5713 | (let* ((allout-buffer (current-buffer)) |
| 5299 | ;; Asses location: | 5714 | ;; Asses location: |
| 5715 | (bullet-pos allout-recent-prefix-beginning) | ||
| 5300 | (after-bullet-pos (point)) | 5716 | (after-bullet-pos (point)) |
| 5301 | (was-encrypted | 5717 | (was-encrypted |
| 5302 | (progn (if (= (point-max) after-bullet-pos) | 5718 | (progn (if (= (point-max) after-bullet-pos) |
| @@ -5362,12 +5778,9 @@ See `allout-toggle-current-subtree-encryption' for more details." | |||
| 5362 | (delete-char 1)) | 5778 | (delete-char 1)) |
| 5363 | ;; Add the is-encrypted bullet qualifier: | 5779 | ;; Add the is-encrypted bullet qualifier: |
| 5364 | (goto-char after-bullet-pos) | 5780 | (goto-char after-bullet-pos) |
| 5365 | (insert "*")) | 5781 | (insert "*")))) |
| 5366 | ) | 5782 | (run-hook-with-args 'allout-structure-added-hook |
| 5367 | ) | 5783 | bullet-pos subtree-end)))) |
| 5368 | ) | ||
| 5369 | ) | ||
| 5370 | ) | ||
| 5371 | ;;;_ > allout-encrypt-string (text decrypt allout-buffer key-type for-key | 5784 | ;;;_ > allout-encrypt-string (text decrypt allout-buffer key-type for-key |
| 5372 | ;;; fetch-pass &optional retried verifying | 5785 | ;;; fetch-pass &optional retried verifying |
| 5373 | ;;; passphrase) | 5786 | ;;; passphrase) |
| @@ -5512,7 +5925,8 @@ Returns the resulting string, or nil if the transformation fails." | |||
| 5512 | (error "decryption failed"))))) | 5925 | (error "decryption failed"))))) |
| 5513 | 5926 | ||
| 5514 | (setq result-text | 5927 | (setq result-text |
| 5515 | (buffer-substring 1 (- (point-max) (if decrypt 0 1)))) | 5928 | (buffer-substring-no-properties |
| 5929 | 1 (- (point-max) (if decrypt 0 1)))) | ||
| 5516 | ) | 5930 | ) |
| 5517 | 5931 | ||
| 5518 | ;; validate result - non-empty | 5932 | ;; validate result - non-empty |
| @@ -5924,17 +6338,8 @@ save. See `allout-encrypt-unencrypted-on-saves' for more info." | |||
| 5924 | ) | 6338 | ) |
| 5925 | 6339 | ||
| 5926 | ;;;_ #9 miscellaneous | 6340 | ;;;_ #9 miscellaneous |
| 5927 | ;;;_ > allout-mark-topic () | 6341 | ;;;_ : Mode: |
| 5928 | (defun allout-mark-topic () | 6342 | ;;;_ > outlineify-sticky () |
| 5929 | "Put the region around topic currently containing point." | ||
| 5930 | (interactive) | ||
| 5931 | (let ((inhibit-field-text-motion t)) | ||
| 5932 | (beginning-of-line)) | ||
| 5933 | (allout-goto-prefix) | ||
| 5934 | (push-mark (point)) | ||
| 5935 | (allout-end-of-current-subtree) | ||
| 5936 | (exchange-point-and-mark)) | ||
| 5937 | ;;;_ > outlineify-sticky () | ||
| 5938 | ;; outlinify-sticky is correct spelling; provide this alias for sticklers: | 6343 | ;; outlinify-sticky is correct spelling; provide this alias for sticklers: |
| 5939 | ;;;###autoload | 6344 | ;;;###autoload |
| 5940 | (defalias 'outlinify-sticky 'outlineify-sticky) | 6345 | (defalias 'outlinify-sticky 'outlineify-sticky) |
| @@ -5958,7 +6363,7 @@ setup for auto-startup." | |||
| 5958 | "`allout-mode' docstring: `^Hm'.")) | 6363 | "`allout-mode' docstring: `^Hm'.")) |
| 5959 | (allout-adjust-file-variable | 6364 | (allout-adjust-file-variable |
| 5960 | "allout-layout" (or allout-layout '(-1 : 0)))))) | 6365 | "allout-layout" (or allout-layout '(-1 : 0)))))) |
| 5961 | ;;;_ > allout-file-vars-section-data () | 6366 | ;;;_ > allout-file-vars-section-data () |
| 5962 | (defun allout-file-vars-section-data () | 6367 | (defun allout-file-vars-section-data () |
| 5963 | "Return data identifying the file-vars section, or nil if none. | 6368 | "Return data identifying the file-vars section, or nil if none. |
| 5964 | 6369 | ||
| @@ -5986,7 +6391,7 @@ Returns list `(beginning-point prefix-string suffix-string)'." | |||
| 5986 | ) | 6391 | ) |
| 5987 | ) | 6392 | ) |
| 5988 | ) | 6393 | ) |
| 5989 | ;;;_ > allout-adjust-file-variable (varname value) | 6394 | ;;;_ > allout-adjust-file-variable (varname value) |
| 5990 | (defun allout-adjust-file-variable (varname value) | 6395 | (defun allout-adjust-file-variable (varname value) |
| 5991 | "Adjust the setting of an emacs file variable named VARNAME to VALUE. | 6396 | "Adjust the setting of an emacs file variable named VARNAME to VALUE. |
| 5992 | 6397 | ||
| @@ -6050,7 +6455,38 @@ enable-local-variables must be true for any of this to happen." | |||
| 6050 | ) | 6455 | ) |
| 6051 | ) | 6456 | ) |
| 6052 | ) | 6457 | ) |
| 6053 | ;;;_ > solicit-char-in-string (prompt string &optional do-defaulting) | 6458 | ;;;_ > allout-get-configvar-values (varname) |
| 6459 | (defun allout-get-configvar-values (configvar-name) | ||
| 6460 | "Return a list of values of the symbols in list bound to CONFIGVAR-NAME. | ||
| 6461 | |||
| 6462 | The user is prompted for removal of symbols that are unbound, and they | ||
| 6463 | otherwise are ignored. | ||
| 6464 | |||
| 6465 | CONFIGVAR-NAME should be the name of the configuration variable, | ||
| 6466 | not its value." | ||
| 6467 | |||
| 6468 | (let ((configvar-value (symbol-value configvar-name)) | ||
| 6469 | got) | ||
| 6470 | (dolist (sym configvar-value) | ||
| 6471 | (if (not (boundp sym)) | ||
| 6472 | (if (yes-or-no-p (format "%s entry `%s' is unbound - remove it? " | ||
| 6473 | configvar-name sym)) | ||
| 6474 | (delq sym (symbol-value configvar-name))) | ||
| 6475 | (push (symbol-value sym) got))) | ||
| 6476 | (reverse got))) | ||
| 6477 | ;;;_ : Topics: | ||
| 6478 | ;;;_ > allout-mark-topic () | ||
| 6479 | (defun allout-mark-topic () | ||
| 6480 | "Put the region around topic currently containing point." | ||
| 6481 | (interactive) | ||
| 6482 | (let ((inhibit-field-text-motion t)) | ||
| 6483 | (beginning-of-line)) | ||
| 6484 | (allout-goto-prefix-doublechecked) | ||
| 6485 | (push-mark (point)) | ||
| 6486 | (allout-end-of-current-subtree) | ||
| 6487 | (exchange-point-and-mark)) | ||
| 6488 | ;;;_ : UI: | ||
| 6489 | ;;;_ > solicit-char-in-string (prompt string &optional do-defaulting) | ||
| 6054 | (defun solicit-char-in-string (prompt string &optional do-defaulting) | 6490 | (defun solicit-char-in-string (prompt string &optional do-defaulting) |
| 6055 | "Solicit (with first arg PROMPT) choice of a character from string STRING. | 6491 | "Solicit (with first arg PROMPT) choice of a character from string STRING. |
| 6056 | 6492 | ||
| @@ -6083,7 +6519,8 @@ Optional arg DO-DEFAULTING indicates to accept empty input (CR)." | |||
| 6083 | ;; got something out of loop - return it: | 6519 | ;; got something out of loop - return it: |
| 6084 | got) | 6520 | got) |
| 6085 | ) | 6521 | ) |
| 6086 | ;;;_ > regexp-sans-escapes (string) | 6522 | ;;;_ : Strings: |
| 6523 | ;;;_ > regexp-sans-escapes (string) | ||
| 6087 | (defun regexp-sans-escapes (regexp &optional successive-backslashes) | 6524 | (defun regexp-sans-escapes (regexp &optional successive-backslashes) |
| 6088 | "Return a copy of REGEXP with all character escapes stripped out. | 6525 | "Return a copy of REGEXP with all character escapes stripped out. |
| 6089 | 6526 | ||
| @@ -6106,7 +6543,7 @@ Optional arg SUCCESSIVE-BACKSLASHES is used internally for recursion." | |||
| 6106 | (regexp-sans-escapes (substring regexp 1))) | 6543 | (regexp-sans-escapes (substring regexp 1))) |
| 6107 | ;; Exclude first char, but maintain count: | 6544 | ;; Exclude first char, but maintain count: |
| 6108 | (regexp-sans-escapes (substring regexp 1) successive-backslashes)))) | 6545 | (regexp-sans-escapes (substring regexp 1) successive-backslashes)))) |
| 6109 | ;;;_ > count-trailing-whitespace-region (beg end) | 6546 | ;;;_ > count-trailing-whitespace-region (beg end) |
| 6110 | (defun count-trailing-whitespace-region (beg end) | 6547 | (defun count-trailing-whitespace-region (beg end) |
| 6111 | "Return number of trailing whitespace chars between BEG and END. | 6548 | "Return number of trailing whitespace chars between BEG and END. |
| 6112 | 6549 | ||
| @@ -6117,29 +6554,25 @@ If BEG is bigger than END we return 0." | |||
| 6117 | (goto-char beg) | 6554 | (goto-char beg) |
| 6118 | (let ((count 0)) | 6555 | (let ((count 0)) |
| 6119 | (while (re-search-forward "[ ][ ]*$" end t) | 6556 | (while (re-search-forward "[ ][ ]*$" end t) |
| 6120 | (goto-char (1+ (match-beginning 0))) | 6557 | (goto-char (1+ (match-beginning 2))) |
| 6121 | (setq count (1+ count))) | 6558 | (setq count (1+ count))) |
| 6122 | count)))) | 6559 | count)))) |
| 6123 | ;;;_ > allout-get-configvar-values (varname) | 6560 | ;;;_ > allout-format-quote (string) |
| 6124 | (defun allout-get-configvar-values (configvar-name) | 6561 | (defun allout-format-quote (string) |
| 6125 | "Return a list of values of the symbols in list bound to CONFIGVAR-NAME. | 6562 | "Return a copy of string with all \"%\" characters doubled." |
| 6126 | 6563 | (apply 'concat | |
| 6127 | The user is prompted for removal of symbols that are unbound, and they | 6564 | (mapcar (lambda (char) (if (= char ?%) "%%" (char-to-string char))) |
| 6128 | otherwise are ignored. | 6565 | string))) |
| 6129 | 6566 | ;;;_ : lists | |
| 6130 | CONFIGVAR-NAME should be the name of the configuration variable, | 6567 | ;;;_ > allout-flatten (list) |
| 6131 | not its value." | 6568 | (defun allout-flatten (list) |
| 6132 | 6569 | "Return a list of all atoms in list." | |
| 6133 | (let ((configvar-value (symbol-value configvar-name)) | 6570 | ;; classic. |
| 6134 | got) | 6571 | (cond ((null list) nil) |
| 6135 | (dolist (sym configvar-value) | 6572 | ((atom (car list)) (cons (car list) (allout-flatten (cdr list)))) |
| 6136 | (if (not (boundp sym)) | 6573 | (t (append (allout-flatten (car list)) (allout-flatten (cdr list)))))) |
| 6137 | (if (yes-or-no-p (format "%s entry `%s' is unbound - remove it? " | 6574 | ;;;_ : Compatability: |
| 6138 | configvar-name sym)) | 6575 | ;;;_ > allout-mark-marker to accommodate divergent emacsen: |
| 6139 | (delq sym (symbol-value configvar-name))) | ||
| 6140 | (push (symbol-value sym) got))) | ||
| 6141 | (reverse got))) | ||
| 6142 | ;;;_ > allout-mark-marker to accommodate divergent emacsen: | ||
| 6143 | (defun allout-mark-marker (&optional force buffer) | 6576 | (defun allout-mark-marker (&optional force buffer) |
| 6144 | "Accommodate the different signature for `mark-marker' across Emacsen. | 6577 | "Accommodate the different signature for `mark-marker' across Emacsen. |
| 6145 | 6578 | ||
| @@ -6148,7 +6581,7 @@ so pass them along when appropriate." | |||
| 6148 | (if (featurep 'xemacs) | 6581 | (if (featurep 'xemacs) |
| 6149 | (apply 'mark-marker force buffer) | 6582 | (apply 'mark-marker force buffer) |
| 6150 | (mark-marker))) | 6583 | (mark-marker))) |
| 6151 | ;;;_ > subst-char-in-string if necessary | 6584 | ;;;_ > subst-char-in-string if necessary |
| 6152 | (if (not (fboundp 'subst-char-in-string)) | 6585 | (if (not (fboundp 'subst-char-in-string)) |
| 6153 | (defun subst-char-in-string (fromchar tochar string &optional inplace) | 6586 | (defun subst-char-in-string (fromchar tochar string &optional inplace) |
| 6154 | "Replace FROMCHAR with TOCHAR in STRING each time it occurs. | 6587 | "Replace FROMCHAR with TOCHAR in STRING each time it occurs. |
| @@ -6160,10 +6593,10 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 6160 | (if (eq (aref newstr i) fromchar) | 6593 | (if (eq (aref newstr i) fromchar) |
| 6161 | (aset newstr i tochar))) | 6594 | (aset newstr i tochar))) |
| 6162 | newstr))) | 6595 | newstr))) |
| 6163 | ;;;_ > wholenump if necessary | 6596 | ;;;_ > wholenump if necessary |
| 6164 | (if (not (fboundp 'wholenump)) | 6597 | (if (not (fboundp 'wholenump)) |
| 6165 | (defalias 'wholenump 'natnump)) | 6598 | (defalias 'wholenump 'natnump)) |
| 6166 | ;;;_ > remove-overlays if necessary | 6599 | ;;;_ > remove-overlays if necessary |
| 6167 | (if (not (fboundp 'remove-overlays)) | 6600 | (if (not (fboundp 'remove-overlays)) |
| 6168 | (defun remove-overlays (&optional beg end name val) | 6601 | (defun remove-overlays (&optional beg end name val) |
| 6169 | "Clear BEG and END of overlays whose property NAME has value VAL. | 6602 | "Clear BEG and END of overlays whose property NAME has value VAL. |
| @@ -6190,7 +6623,7 @@ BEG and END default respectively to the beginning and end of buffer." | |||
| 6190 | (move-overlay o end (overlay-end o)) | 6623 | (move-overlay o end (overlay-end o)) |
| 6191 | (delete-overlay o))))))) | 6624 | (delete-overlay o))))))) |
| 6192 | ) | 6625 | ) |
| 6193 | ;;;_ > copy-overlay if necessary - xemacs ~ 21.4 | 6626 | ;;;_ > copy-overlay if necessary - xemacs ~ 21.4 |
| 6194 | (if (not (fboundp 'copy-overlay)) | 6627 | (if (not (fboundp 'copy-overlay)) |
| 6195 | (defun copy-overlay (o) | 6628 | (defun copy-overlay (o) |
| 6196 | "Return a copy of overlay O." | 6629 | "Return a copy of overlay O." |
| @@ -6202,7 +6635,7 @@ BEG and END default respectively to the beginning and end of buffer." | |||
| 6202 | (while props | 6635 | (while props |
| 6203 | (overlay-put o1 (pop props) (pop props))) | 6636 | (overlay-put o1 (pop props) (pop props))) |
| 6204 | o1))) | 6637 | o1))) |
| 6205 | ;;;_ > add-to-invisibility-spec if necessary - xemacs ~ 21.4 | 6638 | ;;;_ > add-to-invisibility-spec if necessary - xemacs ~ 21.4 |
| 6206 | (if (not (fboundp 'add-to-invisibility-spec)) | 6639 | (if (not (fboundp 'add-to-invisibility-spec)) |
| 6207 | (defun add-to-invisibility-spec (element) | 6640 | (defun add-to-invisibility-spec (element) |
| 6208 | "Add ELEMENT to `buffer-invisibility-spec'. | 6641 | "Add ELEMENT to `buffer-invisibility-spec'. |
| @@ -6212,14 +6645,14 @@ that can be added." | |||
| 6212 | (setq buffer-invisibility-spec (list t))) | 6645 | (setq buffer-invisibility-spec (list t))) |
| 6213 | (setq buffer-invisibility-spec | 6646 | (setq buffer-invisibility-spec |
| 6214 | (cons element buffer-invisibility-spec)))) | 6647 | (cons element buffer-invisibility-spec)))) |
| 6215 | ;;;_ > remove-from-invisibility-spec if necessary - xemacs ~ 21.4 | 6648 | ;;;_ > remove-from-invisibility-spec if necessary - xemacs ~ 21.4 |
| 6216 | (if (not (fboundp 'remove-from-invisibility-spec)) | 6649 | (if (not (fboundp 'remove-from-invisibility-spec)) |
| 6217 | (defun remove-from-invisibility-spec (element) | 6650 | (defun remove-from-invisibility-spec (element) |
| 6218 | "Remove ELEMENT from `buffer-invisibility-spec'." | 6651 | "Remove ELEMENT from `buffer-invisibility-spec'." |
| 6219 | (if (consp buffer-invisibility-spec) | 6652 | (if (consp buffer-invisibility-spec) |
| 6220 | (setq buffer-invisibility-spec (delete element | 6653 | (setq buffer-invisibility-spec (delete element |
| 6221 | buffer-invisibility-spec))))) | 6654 | buffer-invisibility-spec))))) |
| 6222 | ;;;_ > move-beginning-of-line if necessary - older emacs, xemacs | 6655 | ;;;_ > move-beginning-of-line if necessary - older emacs, xemacs |
| 6223 | (if (not (fboundp 'move-beginning-of-line)) | 6656 | (if (not (fboundp 'move-beginning-of-line)) |
| 6224 | (defun move-beginning-of-line (arg) | 6657 | (defun move-beginning-of-line (arg) |
| 6225 | "Move point to beginning of current line as displayed. | 6658 | "Move point to beginning of current line as displayed. |
| @@ -6243,7 +6676,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6243 | (skip-chars-backward "^\n")) | 6676 | (skip-chars-backward "^\n")) |
| 6244 | (vertical-motion 0)) | 6677 | (vertical-motion 0)) |
| 6245 | ) | 6678 | ) |
| 6246 | ;;;_ > move-end-of-line if necessary - older emacs, xemacs | 6679 | ;;;_ > move-end-of-line if necessary - older emacs, xemacs |
| 6247 | (if (not (fboundp 'move-end-of-line)) | 6680 | (if (not (fboundp 'move-end-of-line)) |
| 6248 | (defun move-end-of-line (arg) | 6681 | (defun move-end-of-line (arg) |
| 6249 | "Move point to end of current line as displayed. | 6682 | "Move point to end of current line as displayed. |
| @@ -6283,7 +6716,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 6283 | (setq arg 1) | 6716 | (setq arg 1) |
| 6284 | (setq done t))))))) | 6717 | (setq done t))))))) |
| 6285 | ) | 6718 | ) |
| 6286 | ;;;_ > line-move-invisible-p if necessary | 6719 | ;;;_ > line-move-invisible-p if necessary |
| 6287 | (if (not (fboundp 'line-move-invisible-p)) | 6720 | (if (not (fboundp 'line-move-invisible-p)) |
| 6288 | (defun line-move-invisible-p (pos) | 6721 | (defun line-move-invisible-p (pos) |
| 6289 | "Return non-nil if the character after POS is currently invisible." | 6722 | "Return non-nil if the character after POS is currently invisible." |
diff --git a/lisp/apropos.el b/lisp/apropos.el index 3889655ff99..cbe571f8fec 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -142,7 +142,7 @@ If value is `verbose', the computed score is shown for each match." | |||
| 142 | "Apropos pattern as entered by user.") | 142 | "Apropos pattern as entered by user.") |
| 143 | 143 | ||
| 144 | (defvar apropos-pattern-quoted nil | 144 | (defvar apropos-pattern-quoted nil |
| 145 | "Apropos pattern passed through `regexp-quoute'.") | 145 | "Apropos pattern passed through `regexp-quote'.") |
| 146 | 146 | ||
| 147 | (defvar apropos-words () | 147 | (defvar apropos-words () |
| 148 | "Current list of apropos words extracted from `apropos-pattern'.") | 148 | "Current list of apropos words extracted from `apropos-pattern'.") |
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index c1a2047a9c6..15a7461d288 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el | |||
| @@ -215,7 +215,7 @@ If this contains a %s, that will be replaced by the matching rule." | |||
| 215 | ;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n")) | 215 | ;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n")) |
| 216 | "A list specifying text to insert by default into a new file. | 216 | "A list specifying text to insert by default into a new file. |
| 217 | Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION). | 217 | Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION). |
| 218 | CONDITION maybe a regexp that must match the new file's name, or it may be | 218 | CONDITION may be a regexp that must match the new file's name, or it may be |
| 219 | a symbol that must match the major mode for this element to apply. | 219 | a symbol that must match the major mode for this element to apply. |
| 220 | Only the first matching element is effective. | 220 | Only the first matching element is effective. |
| 221 | Optional DESCRIPTION is a string for filling `auto-insert-prompt'. | 221 | Optional DESCRIPTION is a string for filling `auto-insert-prompt'. |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 9671bf26f25..718feb4dbc9 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -345,24 +345,21 @@ Keymap to display on minor modes.") | |||
| 345 | (put 'mode-line-position 'standard-value | 345 | (put 'mode-line-position 'standard-value |
| 346 | (list `(quote ,standard-mode-line-position)))) | 346 | (list `(quote ,standard-mode-line-position)))) |
| 347 | 347 | ||
| 348 | (defvar mode-line-buffer-identification-keymap nil "\ | 348 | (defvar mode-line-buffer-identification-keymap |
| 349 | ;; Add menu of buffer operations to the buffer identification part | ||
| 350 | ;; of the mode line.or header line. | ||
| 351 | (let ((map (make-sparse-keymap))) | ||
| 352 | ;; Bind down- events so that the global keymap won't ``shine | ||
| 353 | ;; through''. | ||
| 354 | (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) | ||
| 355 | (define-key map [header-line down-mouse-1] 'ignore) | ||
| 356 | (define-key map [header-line mouse-1] 'mode-line-previous-buffer) | ||
| 357 | (define-key map [mode-line mouse-3] 'mode-line-next-buffer) | ||
| 358 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 359 | (define-key map [header-line mouse-3] 'mode-line-next-buffer) | ||
| 360 | map) "\ | ||
| 349 | Keymap for what is displayed by `mode-line-buffer-identification'.") | 361 | Keymap for what is displayed by `mode-line-buffer-identification'.") |
| 350 | 362 | ||
| 351 | ;; Add menu of buffer operations to the buffer identification part | ||
| 352 | ;; of the mode line.or header line. | ||
| 353 | ; | ||
| 354 | (let ((map (make-sparse-keymap))) | ||
| 355 | ;; Bind down- events so that the global keymap won't ``shine | ||
| 356 | ;; through''. | ||
| 357 | (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) | ||
| 358 | (define-key map [header-line down-mouse-1] 'ignore) | ||
| 359 | (define-key map [header-line mouse-1] 'mode-line-previous-buffer) | ||
| 360 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 361 | (define-key map [mode-line mouse-3] 'mode-line-next-buffer) | ||
| 362 | (define-key map [header-line down-mouse-3] 'ignore) | ||
| 363 | (define-key map [header-line mouse-3] 'mode-line-next-buffer) | ||
| 364 | (setq mode-line-buffer-identification-keymap map)) | ||
| 365 | |||
| 366 | (defun propertized-buffer-identification (fmt) | 363 | (defun propertized-buffer-identification (fmt) |
| 367 | "Return a list suitable for `mode-line-buffer-identification'. | 364 | "Return a list suitable for `mode-line-buffer-identification'. |
| 368 | FMT is a format specifier such as \"%12b\". This function adds | 365 | FMT is a format specifier such as \"%12b\". This function adds |
| @@ -615,7 +612,7 @@ language you are using." | |||
| 615 | (let ((l (generic-character-list)) | 612 | (let ((l (generic-character-list)) |
| 616 | (table (nth 1 global-map))) | 613 | (table (nth 1 global-map))) |
| 617 | (while l | 614 | (while l |
| 618 | (set-char-table-default table (car l) 'self-insert-command) | 615 | (aset table (car l) 'self-insert-command) |
| 619 | (setq l (cdr l)))) | 616 | (setq l (cdr l)))) |
| 620 | 617 | ||
| 621 | (setq help-event-list '(help f1)) | 618 | (setq help-event-list '(help f1)) |
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index c7f92a13847..07bc0e247f7 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el | |||
| @@ -409,13 +409,54 @@ | |||
| 409 | ( \\mu . calcFunc-moebius ))) | 409 | ( \\mu . calcFunc-moebius ))) |
| 410 | 410 | ||
| 411 | (put 'tex 'math-variable-table | 411 | (put 'tex 'math-variable-table |
| 412 | '( ( \\pi . var-pi ) | 412 | '( |
| 413 | ( \\infty . var-inf ) | 413 | ;; The Greek letters |
| 414 | ( \\infty . var-uinf ) | 414 | ( \\alpha . var-alpha ) |
| 415 | ( \\phi . var-phi ) | 415 | ( \\beta . var-beta ) |
| 416 | ( \\gamma . var-gamma ) | 416 | ( \\gamma . var-gamma ) |
| 417 | ( \\sum . (math-parse-tex-sum calcFunc-sum) ) | 417 | ( \\Gamma . var-Gamma ) |
| 418 | ( \\prod . (math-parse-tex-sum calcFunc-prod) ))) | 418 | ( \\delta . var-delta ) |
| 419 | ( \\Delta . var-Delta ) | ||
| 420 | ( \\epsilon . var-epsilon ) | ||
| 421 | ( \\varepsilon . var-varepsilon) | ||
| 422 | ( \\zeta . var-zeta ) | ||
| 423 | ( \\eta . var-eta ) | ||
| 424 | ( \\theta . var-theta ) | ||
| 425 | ( \\vartheta . var-vartheta ) | ||
| 426 | ( \\Theta . var-Theta ) | ||
| 427 | ( \\iota . var-iota ) | ||
| 428 | ( \\kappa . var-kappa ) | ||
| 429 | ( \\lambda . var-lambda ) | ||
| 430 | ( \\Lambda . var-Lambda ) | ||
| 431 | ( \\mu . var-mu ) | ||
| 432 | ( \\nu . var-nu ) | ||
| 433 | ( \\xi . var-xi ) | ||
| 434 | ( \\Xi . var-Xi ) | ||
| 435 | ( \\pi . var-pi ) | ||
| 436 | ( \\varpi . var-varpi ) | ||
| 437 | ( \\Pi . var-Pi ) | ||
| 438 | ( \\rho . var-rho ) | ||
| 439 | ( \\varrho . var-varrho ) | ||
| 440 | ( \\sigma . var-sigma ) | ||
| 441 | ( \\sigma . var-varsigma ) | ||
| 442 | ( \\Sigma . var-Sigma ) | ||
| 443 | ( \\tau . var-tau ) | ||
| 444 | ( \\upsilon . var-upsilon ) | ||
| 445 | ( \\Upsilon . var-Upsilon ) | ||
| 446 | ( \\phi . var-phi ) | ||
| 447 | ( \\varphi . var-varphi ) | ||
| 448 | ( \\Phi . var-Phi ) | ||
| 449 | ( \\chi . var-chi ) | ||
| 450 | ( \\psi . var-psi ) | ||
| 451 | ( \\Psi . var-Psi ) | ||
| 452 | ( \\omega . var-omega ) | ||
| 453 | ( \\Omega . var-Omega ) | ||
| 454 | ;; Others | ||
| 455 | ( \\ell . var-ell ) | ||
| 456 | ( \\infty . var-inf ) | ||
| 457 | ( \\infty . var-uinf ) | ||
| 458 | ( \\sum . (math-parse-tex-sum calcFunc-sum) ) | ||
| 459 | ( \\prod . (math-parse-tex-sum calcFunc-prod) ))) | ||
| 419 | 460 | ||
| 420 | (put 'tex 'math-complex-format 'i) | 461 | (put 'tex 'math-complex-format 'i) |
| 421 | 462 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index bbb80bebc1d..35b7c19cf1a 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -1101,7 +1101,7 @@ If nil, selections displayed but ignored.") | |||
| 1101 | (defun calc-dispatch (&optional arg) | 1101 | (defun calc-dispatch (&optional arg) |
| 1102 | "Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details." | 1102 | "Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details." |
| 1103 | (interactive "P") | 1103 | (interactive "P") |
| 1104 | (sit-for echo-keystrokes) | 1104 | ; (sit-for echo-keystrokes) |
| 1105 | (condition-case err ; look for other keys bound to calc-dispatch | 1105 | (condition-case err ; look for other keys bound to calc-dispatch |
| 1106 | (let ((keys (this-command-keys))) | 1106 | (let ((keys (this-command-keys))) |
| 1107 | (unless (or (not (stringp keys)) | 1107 | (unless (or (not (stringp keys)) |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 29e6fe56b6e..892c76bba0c 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -394,8 +394,8 @@ displayed in a window: | |||
| 394 | (if (and (< appt-comp-time appt-message-warning-time) | 394 | (if (and (< appt-comp-time appt-message-warning-time) |
| 395 | (> (+ cur-comp-time appt-message-warning-time) | 395 | (> (+ cur-comp-time appt-message-warning-time) |
| 396 | appt-max-time)) | 396 | appt-max-time)) |
| 397 | (setq min-to-app (+ (- (1+ appt-max-time) cur-comp-time)) | 397 | (setq min-to-app (+ (- (1+ appt-max-time) cur-comp-time) |
| 398 | appt-comp-time)) | 398 | appt-comp-time))) |
| 399 | 399 | ||
| 400 | ;; issue warning if the appointment time is | 400 | ;; issue warning if the appointment time is |
| 401 | ;; within appt-message-warning time | 401 | ;; within appt-message-warning time |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 38bcc887ec0..6fc18d05837 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -568,11 +568,20 @@ are | |||
| 568 | 568 | ||
| 569 | Names can be capitalized or not, written in full (as specified by the | 569 | Names can be capitalized or not, written in full (as specified by the |
| 570 | variable `calendar-day-name-array'), or abbreviated (as specified by | 570 | variable `calendar-day-name-array'), or abbreviated (as specified by |
| 571 | `calendar-day-abbrev-array') with or without a period. To take effect, | 571 | `calendar-day-abbrev-array') with or without a period. |
| 572 | this variable should be set before the calendar package and its associates | 572 | |
| 573 | are loaded. Otherwise, use one of the functions `european-calendar' or | 573 | Setting this variable directly does not take effect (if the |
| 574 | `american-calendar' to force the appropriate update." | 574 | calendar package is already loaded). Rather, use either |
| 575 | \\[customize] or the functions `european-calendar' and | ||
| 576 | `american-calendar'." | ||
| 575 | :type 'boolean | 577 | :type 'boolean |
| 578 | ;; Without :initialize (require 'calendar) throws an error because | ||
| 579 | ;; american-calendar is undefined at this point. | ||
| 580 | :initialize 'custom-initialize-default | ||
| 581 | :set (lambda (symbol value) | ||
| 582 | (if value | ||
| 583 | (european-calendar) | ||
| 584 | (american-calendar))) | ||
| 576 | :group 'diary) | 585 | :group 'diary) |
| 577 | 586 | ||
| 578 | ;;;###autoload | 587 | ;;;###autoload |
| @@ -1582,6 +1591,19 @@ See the documentation of that function for more information." | |||
| 1582 | (calendar-only-one-frame-setup arg)) | 1591 | (calendar-only-one-frame-setup arg)) |
| 1583 | (t (calendar-basic-setup arg)))) | 1592 | (t (calendar-basic-setup arg)))) |
| 1584 | 1593 | ||
| 1594 | (autoload 'diary-view-entries "diary-lib" | ||
| 1595 | "Prepare and display a buffer with diary entries. | ||
| 1596 | Searches your diary file for entries that match ARG days starting with | ||
| 1597 | the date indicated by the cursor position in the displayed three-month | ||
| 1598 | calendar." | ||
| 1599 | t) | ||
| 1600 | |||
| 1601 | (autoload 'list-calendar-holidays "holidays" | ||
| 1602 | "Create a buffer containing the holidays for the current calendar window. | ||
| 1603 | The holidays are those in the list `calendar-notable-days'. Returns t if any | ||
| 1604 | holidays are found, nil if not." | ||
| 1605 | t) | ||
| 1606 | |||
| 1585 | (defun calendar-basic-setup (&optional arg) | 1607 | (defun calendar-basic-setup (&optional arg) |
| 1586 | "Display a three-month calendar in another window. | 1608 | "Display a three-month calendar in another window. |
| 1587 | The three months appear side by side, with the current month in the middle | 1609 | The three months appear side by side, with the current month in the middle |
| @@ -1649,13 +1671,6 @@ to be replaced by asterisks to highlight it whenever it is in the window." | |||
| 1649 | (list-calendar-holidays))) | 1671 | (list-calendar-holidays))) |
| 1650 | (run-hooks 'initial-calendar-window-hook)) | 1672 | (run-hooks 'initial-calendar-window-hook)) |
| 1651 | 1673 | ||
| 1652 | (autoload 'diary-view-entries "diary-lib" | ||
| 1653 | "Prepare and display a buffer with diary entries. | ||
| 1654 | Searches your diary file for entries that match ARG days starting with | ||
| 1655 | the date indicated by the cursor position in the displayed three-month | ||
| 1656 | calendar." | ||
| 1657 | t) | ||
| 1658 | |||
| 1659 | (autoload 'view-other-diary-entries "diary-lib" | 1674 | (autoload 'view-other-diary-entries "diary-lib" |
| 1660 | "Prepare and display buffer of diary entries from an alternative diary file. | 1675 | "Prepare and display buffer of diary entries from an alternative diary file. |
| 1661 | Searches for entries that match ARG days, starting with the date indicated | 1676 | Searches for entries that match ARG days, starting with the date indicated |
| @@ -1930,12 +1945,6 @@ to the date indicated by point." | |||
| 1930 | to the date indicated by point." | 1945 | to the date indicated by point." |
| 1931 | t) | 1946 | t) |
| 1932 | 1947 | ||
| 1933 | (autoload 'list-calendar-holidays "holidays" | ||
| 1934 | "Create a buffer containing the holidays for the current calendar window. | ||
| 1935 | The holidays are those in the list `calendar-notable-days'. Returns t if any | ||
| 1936 | holidays are found, nil if not." | ||
| 1937 | t) | ||
| 1938 | |||
| 1939 | (autoload 'cal-tex-cursor-month "cal-tex" | 1948 | (autoload 'cal-tex-cursor-month "cal-tex" |
| 1940 | "Make a buffer with LaTeX commands for the month cursor is on. | 1949 | "Make a buffer with LaTeX commands for the month cursor is on. |
| 1941 | Optional prefix argument specifies number of months to be produced. | 1950 | Optional prefix argument specifies number of months to be produced. |
diff --git a/lisp/comint.el b/lisp/comint.el index eb5c9f28a4e..48b747065b5 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -650,7 +650,10 @@ Entry to this mode runs the hooks on `comint-mode-hook'." | |||
| 650 | (make-local-variable 'comint-process-echoes) | 650 | (make-local-variable 'comint-process-echoes) |
| 651 | (make-local-variable 'comint-file-name-chars) | 651 | (make-local-variable 'comint-file-name-chars) |
| 652 | (make-local-variable 'comint-file-name-quote-list) | 652 | (make-local-variable 'comint-file-name-quote-list) |
| 653 | (set (make-local-variable 'comint-accum-marker) (make-marker)) | 653 | (make-local-variable 'comint-accum-marker) |
| 654 | (setq comint-accum-marker (make-marker)) | ||
| 655 | (make-local-variable 'font-lock-defaults) | ||
| 656 | (setq font-lock-defaults '(nil)) | ||
| 654 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) | 657 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) |
| 655 | ;; This behavior is not useful in comint buffers, and is annoying | 658 | ;; This behavior is not useful in comint buffers, and is annoying |
| 656 | (set (make-local-variable 'next-line-add-newlines) nil)) | 659 | (set (make-local-variable 'next-line-add-newlines) nil)) |
| @@ -765,7 +768,8 @@ buffer. The hook `comint-exec-hook' is run after each exec." | |||
| 765 | (format "COLUMNS=%d" (window-width))) | 768 | (format "COLUMNS=%d" (window-width))) |
| 766 | (list "TERM=emacs" | 769 | (list "TERM=emacs" |
| 767 | (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width)))) | 770 | (format "TERMCAP=emacs:co#%d:tc=unknown:" (window-width)))) |
| 768 | (if (getenv "EMACS") nil (list "EMACS=t")) | 771 | (unless (getenv "EMACS") |
| 772 | (list (concat "EMACS=" invocation-directory invocation-name))) | ||
| 769 | process-environment)) | 773 | process-environment)) |
| 770 | (default-directory | 774 | (default-directory |
| 771 | (if (file-accessible-directory-p default-directory) | 775 | (if (file-accessible-directory-p default-directory) |
diff --git a/lisp/completion.el b/lisp/completion.el index 64bf8026e9d..53dfd7521a5 100644 --- a/lisp/completion.el +++ b/lisp/completion.el | |||
| @@ -1885,7 +1885,7 @@ Prefix args :: | |||
| 1885 | (save-excursion | 1885 | (save-excursion |
| 1886 | (goto-char (point-min)) | 1886 | (goto-char (point-min)) |
| 1887 | (catch 'finish-add-completions | 1887 | (catch 'finish-add-completions |
| 1888 | (with-syntax-table completion-c-def-syntax-table | 1888 | (with-syntax-table completion-c-def-syntax-table |
| 1889 | (while t | 1889 | (while t |
| 1890 | ;; we loop here only when scan-sexps fails | 1890 | ;; we loop here only when scan-sexps fails |
| 1891 | ;; (i.e. unbalance exps.) | 1891 | ;; (i.e. unbalance exps.) |
| @@ -1895,8 +1895,7 @@ Prefix args :: | |||
| 1895 | (cond | 1895 | (cond |
| 1896 | ((= (preceding-char) ?#) | 1896 | ((= (preceding-char) ?#) |
| 1897 | ;; preprocessor macro, see if it's one we handle | 1897 | ;; preprocessor macro, see if it's one we handle |
| 1898 | (setq string (buffer-substring (point) (+ (point) 6))) | 1898 | (cond ((looking-at "\\(define\\|ifdef\\)\\>") |
| 1899 | (cond ((member string '("define" "ifdef ")) | ||
| 1900 | ;; skip forward over definition symbol | 1899 | ;; skip forward over definition symbol |
| 1901 | ;; and add it to database | 1900 | ;; and add it to database |
| 1902 | (and (forward-word 2) | 1901 | (and (forward-word 2) |
| @@ -1944,9 +1943,9 @@ Prefix args :: | |||
| 1944 | (throw 'finish-add-completions t)) | 1943 | (throw 'finish-add-completions t)) |
| 1945 | (error | 1944 | (error |
| 1946 | ;; Check for failure in scan-sexps | 1945 | ;; Check for failure in scan-sexps |
| 1947 | (if (or (string-equal (nth 1 e) | 1946 | (if (member (nth 1 e) |
| 1948 | "Containing expression ends prematurely") | 1947 | '("Containing expression ends prematurely" |
| 1949 | (string-equal (nth 1 e) "Unbalanced parentheses")) | 1948 | "Unbalanced parentheses")) |
| 1950 | ;; unbalanced paren., keep going | 1949 | ;; unbalanced paren., keep going |
| 1951 | ;;(ding) | 1950 | ;;(ding) |
| 1952 | (forward-line 1) | 1951 | (forward-line 1) |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 609b5572a08..ab3f7ec2b92 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -389,7 +389,7 @@ | |||
| 389 | :link '(custom-manual "(emacs)Undo") | 389 | :link '(custom-manual "(emacs)Undo") |
| 390 | :group 'editing) | 390 | :group 'editing) |
| 391 | 391 | ||
| 392 | (defgroup modeline nil | 392 | (defgroup mode-line nil |
| 393 | "Content of the modeline." | 393 | "Content of the modeline." |
| 394 | :group 'environment) | 394 | :group 'environment) |
| 395 | 395 | ||
| @@ -1521,13 +1521,18 @@ Otherwise use brackets." | |||
| 1521 | (widget-insert description)) | 1521 | (widget-insert description)) |
| 1522 | (widget-insert (format ". | 1522 | (widget-insert (format ". |
| 1523 | %s buttons; type RET or click mouse-1 to actuate one. | 1523 | %s buttons; type RET or click mouse-1 to actuate one. |
| 1524 | Editing a setting changes only the text in the buffer. | 1524 | Editing a setting changes only the text in the buffer." |
| 1525 | Use the setting's State button to set it or save changes in it. | ||
| 1526 | Saving a change normally works by editing your Emacs init file. | ||
| 1527 | See " | ||
| 1528 | (if custom-raised-buttons | 1525 | (if custom-raised-buttons |
| 1529 | "`Raised' text indicates" | 1526 | "`Raised' text indicates" |
| 1530 | "Square brackets indicate"))) | 1527 | "Square brackets indicate"))) |
| 1528 | (if init-file-user | ||
| 1529 | (widget-insert " | ||
| 1530 | Use the setting's State button to set it or save changes in it. | ||
| 1531 | Saving a change normally works by editing your Emacs init file.") | ||
| 1532 | (widget-insert " | ||
| 1533 | \nSince you started Emacs with `-q', which inhibits use of the | ||
| 1534 | Emacs init file, you cannot save settings into the Emacs init file.")) | ||
| 1535 | (widget-insert "\nSee ") | ||
| 1531 | (widget-create 'custom-manual | 1536 | (widget-create 'custom-manual |
| 1532 | :tag "Custom file" | 1537 | :tag "Custom file" |
| 1533 | "(emacs)Saving Customizations") | 1538 | "(emacs)Saving Customizations") |
| @@ -4152,6 +4157,8 @@ if only the first line of the docstring is shown.")) | |||
| 4152 | recentf-exclude))) | 4157 | recentf-exclude))) |
| 4153 | (old-buffer (find-buffer-visiting filename))) | 4158 | (old-buffer (find-buffer-visiting filename))) |
| 4154 | (with-current-buffer (or old-buffer (find-file-noselect filename)) | 4159 | (with-current-buffer (or old-buffer (find-file-noselect filename)) |
| 4160 | (unless (eq major-mode 'emacs-lisp-mode) | ||
| 4161 | (emacs-lisp-mode)) | ||
| 4155 | (let ((inhibit-read-only t)) | 4162 | (let ((inhibit-read-only t)) |
| 4156 | (custom-save-variables) | 4163 | (custom-save-variables) |
| 4157 | (custom-save-faces)) | 4164 | (custom-save-faces)) |
| @@ -4255,19 +4262,31 @@ This function does not save the buffer." | |||
| 4255 | (let ((spec (car-safe (get symbol 'theme-value))) | 4262 | (let ((spec (car-safe (get symbol 'theme-value))) |
| 4256 | (value (get symbol 'saved-value)) | 4263 | (value (get symbol 'saved-value)) |
| 4257 | (requests (get symbol 'custom-requests)) | 4264 | (requests (get symbol 'custom-requests)) |
| 4258 | (now (not (or (custom-variable-p symbol) | 4265 | (now (and (not (custom-variable-p symbol)) |
| 4259 | (and (not (boundp symbol)) | 4266 | (or (boundp symbol) |
| 4260 | (not (eq (get symbol 'force-value) | 4267 | (eq (get symbol 'force-value) |
| 4261 | 'rogue)))))) | 4268 | 'rogue)))) |
| 4262 | (comment (get symbol 'saved-variable-comment))) | 4269 | (comment (get symbol 'saved-variable-comment))) |
| 4263 | ;; Check `requests'. | 4270 | ;; Check REQUESTS for validity. |
| 4264 | (dolist (request requests) | 4271 | (dolist (request requests) |
| 4265 | (when (and (symbolp request) (not (featurep request))) | 4272 | (when (and (symbolp request) (not (featurep request))) |
| 4266 | (message "Unknown requested feature: %s" request) | 4273 | (message "Unknown requested feature: %s" request) |
| 4267 | (setq requests (delq request requests)))) | 4274 | (setq requests (delq request requests)))) |
| 4275 | ;; Is there anything customized about this variable? | ||
| 4268 | (when (or (and spec (eq (car spec) 'user)) | 4276 | (when (or (and spec (eq (car spec) 'user)) |
| 4269 | comment | 4277 | comment |
| 4270 | (and (null spec) (get symbol 'saved-value))) | 4278 | (and (null spec) (get symbol 'saved-value))) |
| 4279 | ;; Output an element for this variable. | ||
| 4280 | ;; It has the form (SYMBOL VALUE-FORM NOW REQUESTS COMMENT). | ||
| 4281 | ;; SYMBOL is the variable name. | ||
| 4282 | ;; VALUE-FORM is an expression to return the customized value. | ||
| 4283 | ;; NOW if non-nil means always set the variable immediately | ||
| 4284 | ;; when the customizations are reloaded. This is used | ||
| 4285 | ;; for rogue variables | ||
| 4286 | ;; REQUESTS is a list of packages to load before setting the | ||
| 4287 | ;; variable. Each element of it will be passed to `require'. | ||
| 4288 | ;; COMMENT is whatever comment the user has specified | ||
| 4289 | ;; with the customize facility. | ||
| 4271 | (unless (bolp) | 4290 | (unless (bolp) |
| 4272 | (princ "\n")) | 4291 | (princ "\n")) |
| 4273 | (princ " '(") | 4292 | (princ " '(") |
| @@ -4383,14 +4402,15 @@ This function does not save the buffer." | |||
| 4383 | "Ignoring WIDGET, create a menu entry for customization group SYMBOL." | 4402 | "Ignoring WIDGET, create a menu entry for customization group SYMBOL." |
| 4384 | `( ,(custom-unlispify-menu-entry symbol t) | 4403 | `( ,(custom-unlispify-menu-entry symbol t) |
| 4385 | :filter (lambda (&rest junk) | 4404 | :filter (lambda (&rest junk) |
| 4386 | (let ((menu (custom-menu-create ',symbol))) | 4405 | (let* ((menu (custom-menu-create ',symbol))) |
| 4387 | (if (consp menu) (cdr menu) menu))))) | 4406 | (if (consp menu) (cdr menu) menu))))) |
| 4388 | 4407 | ||
| 4389 | ;;;###autoload | 4408 | ;;;###autoload |
| 4390 | (defun custom-menu-create (symbol) | 4409 | (defun custom-menu-create (symbol) |
| 4391 | "Create menu for customization group SYMBOL. | 4410 | "Create menu for customization group SYMBOL. |
| 4392 | The menu is in a format applicable to `easy-menu-define'." | 4411 | The menu is in a format applicable to `easy-menu-define'." |
| 4393 | (let* ((item (vector (custom-unlispify-menu-entry symbol) | 4412 | (let* ((deactivate-mark nil) |
| 4413 | (item (vector (custom-unlispify-menu-entry symbol) | ||
| 4394 | `(customize-group ',symbol) | 4414 | `(customize-group ',symbol) |
| 4395 | t))) | 4415 | t))) |
| 4396 | (if (and (or (not (boundp 'custom-menu-nesting)) | 4416 | (if (and (or (not (boundp 'custom-menu-nesting)) |
| @@ -4435,8 +4455,8 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4435 | ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. | 4455 | ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. |
| 4436 | (let ((map (make-keymap))) | 4456 | (let ((map (make-keymap))) |
| 4437 | (set-keymap-parent map widget-keymap) | 4457 | (set-keymap-parent map widget-keymap) |
| 4438 | (define-key map [remap self-insert-command] 'custom-no-edit) | 4458 | (define-key map [remap self-insert-command] 'Custom-no-edit) |
| 4439 | (define-key map "\^m" 'custom-newline) | 4459 | (define-key map "\^m" 'Custom-newline) |
| 4440 | (define-key map " " 'scroll-up) | 4460 | (define-key map " " 'scroll-up) |
| 4441 | (define-key map "\177" 'scroll-down) | 4461 | (define-key map "\177" 'scroll-down) |
| 4442 | (define-key map "\C-c\C-c" 'Custom-set) | 4462 | (define-key map "\C-c\C-c" 'Custom-set) |
| @@ -4448,12 +4468,12 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4448 | map) | 4468 | map) |
| 4449 | "Keymap for `custom-mode'.") | 4469 | "Keymap for `custom-mode'.") |
| 4450 | 4470 | ||
| 4451 | (defun custom-no-edit (pos &optional event) | 4471 | (defun Custom-no-edit (pos &optional event) |
| 4452 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4472 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4453 | (interactive "@d") | 4473 | (interactive "@d") |
| 4454 | (error "You can't edit this part of the Custom buffer")) | 4474 | (error "You can't edit this part of the Custom buffer")) |
| 4455 | 4475 | ||
| 4456 | (defun custom-newline (pos &optional event) | 4476 | (defun Custom-newline (pos &optional event) |
| 4457 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4477 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4458 | (interactive "@d") | 4478 | (interactive "@d") |
| 4459 | (let ((button (get-char-property pos 'button))) | 4479 | (let ((button (get-char-property pos 'button))) |
| @@ -4535,6 +4555,13 @@ if that value is non-nil." | |||
| 4535 | (setq widget-documentation-face 'custom-documentation) | 4555 | (setq widget-documentation-face 'custom-documentation) |
| 4536 | (make-local-variable 'widget-button-face) | 4556 | (make-local-variable 'widget-button-face) |
| 4537 | (setq widget-button-face custom-button) | 4557 | (setq widget-button-face custom-button) |
| 4558 | |||
| 4559 | ;; We need this because of the "More" button on docstrings. | ||
| 4560 | ;; Otherwise clicking on "More" can push point offscreen, which | ||
| 4561 | ;; causes the window to recenter on point, which pushes the | ||
| 4562 | ;; newly-revealed docstring offscreen; which is annoying. -- cyd. | ||
| 4563 | (set (make-local-variable 'widget-button-click-moves-point) t) | ||
| 4564 | |||
| 4538 | (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) | 4565 | (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) |
| 4539 | (set (make-local-variable 'widget-mouse-face) custom-button-mouse) | 4566 | (set (make-local-variable 'widget-mouse-face) custom-button-mouse) |
| 4540 | 4567 | ||
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index b59cb57aaf6..15f314d75e7 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -344,11 +344,11 @@ since it could result in memory overflow and make Emacs crash." | |||
| 344 | (scroll-step windows integer) | 344 | (scroll-step windows integer) |
| 345 | (scroll-conservatively windows integer) | 345 | (scroll-conservatively windows integer) |
| 346 | (scroll-margin windows integer) | 346 | (scroll-margin windows integer) |
| 347 | (hscroll-margin windows integer "21.3") | 347 | (hscroll-margin windows integer "22.1") |
| 348 | (hscroll-step windows number "21.3") | 348 | (hscroll-step windows number "22.1") |
| 349 | (truncate-partial-width-windows display boolean) | 349 | (truncate-partial-width-windows display boolean) |
| 350 | (mode-line-inverse-video modeline boolean) | 350 | (mode-line-inverse-video modeline boolean) |
| 351 | (mode-line-in-non-selected-windows modeline boolean "21.3") | 351 | (mode-line-in-non-selected-windows modeline boolean "22.1") |
| 352 | (line-number-display-limit display | 352 | (line-number-display-limit display |
| 353 | (choice integer | 353 | (choice integer |
| 354 | (const :tag "No limit" nil))) | 354 | (const :tag "No limit" nil))) |
| @@ -361,17 +361,22 @@ since it could result in memory overflow and make Emacs crash." | |||
| 361 | (unibyte-display-via-language-environment mule boolean) | 361 | (unibyte-display-via-language-environment mule boolean) |
| 362 | (blink-cursor-alist cursor alist "22.1") | 362 | (blink-cursor-alist cursor alist "22.1") |
| 363 | (overline-margin display integer "22.1") | 363 | (overline-margin display integer "22.1") |
| 364 | (mouse-autoselect-window | ||
| 365 | display (choice | ||
| 366 | (const :tag "Off (nil)" :value nil) | ||
| 367 | (const :tag "Immediate" :value t) | ||
| 368 | (number :tag "Delay by secs" :value 0.5)) "22.1") | ||
| 364 | ;; xfaces.c | 369 | ;; xfaces.c |
| 365 | (scalable-fonts-allowed display boolean) | 370 | (scalable-fonts-allowed display boolean) |
| 366 | ;; xfns.c | 371 | ;; xfns.c |
| 367 | (x-bitmap-file-path installation | 372 | (x-bitmap-file-path installation |
| 368 | (repeat (directory :format "%v"))) | 373 | (repeat (directory :format "%v"))) |
| 369 | (x-use-old-gtk-file-dialog menu boolean "22.1") | 374 | (x-gtk-use-old-file-dialog menu boolean "22.1") |
| 370 | (x-gtk-show-hidden-files menu boolean "22.1") | 375 | (x-gtk-show-hidden-files menu boolean "22.1") |
| 376 | (x-gtk-file-dialog-help-text menu boolean "22.1") | ||
| 371 | (x-gtk-whole-detached-tool-bar x boolean "22.1") | 377 | (x-gtk-whole-detached-tool-bar x boolean "22.1") |
| 372 | ;; xterm.c | 378 | ;; xterm.c |
| 373 | (mouse-autoselect-window display boolean "21.3") | 379 | (x-use-underline-position-properties display boolean "22.1") |
| 374 | (x-use-underline-position-properties display boolean "21.3") | ||
| 375 | (x-underline-at-descent-line display boolean "22.1") | 380 | (x-underline-at-descent-line display boolean "22.1") |
| 376 | (x-stretch-cursor display boolean "21.1"))) | 381 | (x-stretch-cursor display boolean "21.1"))) |
| 377 | this symbol group type standard version native-p | 382 | this symbol group type standard version native-p |
diff --git a/lisp/custom.el b/lisp/custom.el index 2e5c0a59d9b..e69e233614a 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -210,11 +210,11 @@ The following keywords are meaningful: | |||
| 210 | `custom-initialize-reset'. | 210 | `custom-initialize-reset'. |
| 211 | :set VALUE should be a function to set the value of the symbol. | 211 | :set VALUE should be a function to set the value of the symbol. |
| 212 | It takes two arguments, the symbol to set and the value to | 212 | It takes two arguments, the symbol to set and the value to |
| 213 | give it. The default choice of function is `custom-set-default'. | 213 | give it. The default choice of function is `set-default'. |
| 214 | :get VALUE should be a function to extract the value of symbol. | 214 | :get VALUE should be a function to extract the value of symbol. |
| 215 | The function takes one argument, a symbol, and should return | 215 | The function takes one argument, a symbol, and should return |
| 216 | the current value for that symbol. The default choice of function | 216 | the current value for that symbol. The default choice of function |
| 217 | is `custom-default-value'. | 217 | is `default-value'. |
| 218 | :require | 218 | :require |
| 219 | VALUE should be a feature symbol. If you save a value | 219 | VALUE should be a feature symbol. If you save a value |
| 220 | for this option, then when your `.emacs' file loads the value, | 220 | for this option, then when your `.emacs' file loads the value, |
| @@ -874,6 +874,18 @@ COMMENT is a comment string about SYMBOL. | |||
| 874 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and | 874 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and |
| 875 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | 875 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." |
| 876 | (custom-check-theme theme) | 876 | (custom-check-theme theme) |
| 877 | |||
| 878 | ;; Process all the needed autoloads before anything else, so that the | ||
| 879 | ;; subsequent code has all the info it needs (e.g. which var corresponds | ||
| 880 | ;; to a minor mode), regardless of the ordering of the variables. | ||
| 881 | (dolist (entry args) | ||
| 882 | (let* ((symbol (indirect-variable (nth 0 entry)))) | ||
| 883 | (unless (or (get symbol 'standard-value) | ||
| 884 | (memq (get symbol 'custom-autoload) '(nil noset))) | ||
| 885 | ;; This symbol needs to be autoloaded, even just for a `set'. | ||
| 886 | (custom-load-symbol symbol)))) | ||
| 887 | |||
| 888 | ;; Move minor modes and variables with explicit requires to the end. | ||
| 877 | (setq args | 889 | (setq args |
| 878 | (sort args | 890 | (sort args |
| 879 | (lambda (a1 a2) | 891 | (lambda (a1 a2) |
| @@ -904,10 +916,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | |||
| 904 | (when requests | 916 | (when requests |
| 905 | (put symbol 'custom-requests requests) | 917 | (put symbol 'custom-requests requests) |
| 906 | (mapc 'require requests)) | 918 | (mapc 'require requests)) |
| 907 | (unless (or (get symbol 'standard-value) | ||
| 908 | (memq (get symbol 'custom-autoload) '(nil noset))) | ||
| 909 | ;; This symbol needs to be autoloaded, even just for a `set'. | ||
| 910 | (custom-load-symbol symbol)) | ||
| 911 | (setq set (or (get symbol 'custom-set) 'custom-set-default)) | 919 | (setq set (or (get symbol 'custom-set) 'custom-set-default)) |
| 912 | (put symbol 'saved-value (list value)) | 920 | (put symbol 'saved-value (list value)) |
| 913 | (put symbol 'saved-variable-comment comment) | 921 | (put symbol 'saved-variable-comment comment) |
diff --git a/lisp/delim-col.el b/lisp/delim-col.el index 7433c728405..b89e979ff0b 100644 --- a/lisp/delim-col.el +++ b/lisp/delim-col.el | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 8 | ;; Time-stamp: <2006-02-06 13:37:10 ttn> | 8 | ;; Time-stamp: <2006/09/15 17:35:06 vinicius> |
| 9 | ;; Version: 2.1 | 9 | ;; Version: 2.1 |
| 10 | ;; Keywords: internal | 10 | ;; Keywords: internal |
| 11 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ | 11 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| 14 | 14 | ||
diff --git a/lisp/desktop.el b/lisp/desktop.el index fe5a278bae8..d2b2271d306 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -862,8 +862,10 @@ It returns t if a desktop file was loaded, nil otherwise." | |||
| 862 | ;; Desktop file found, process it. | 862 | ;; Desktop file found, process it. |
| 863 | (let ((desktop-first-buffer nil) | 863 | (let ((desktop-first-buffer nil) |
| 864 | (desktop-buffer-ok-count 0) | 864 | (desktop-buffer-ok-count 0) |
| 865 | (desktop-buffer-fail-count 0)) | 865 | (desktop-buffer-fail-count 0) |
| 866 | (setq desktop-lazy-timer nil) | 866 | ;; Avoid desktop saving during evaluation of desktop buffer. |
| 867 | (desktop-save nil)) | ||
| 868 | (desktop-lazy-abort) | ||
| 867 | ;; Evaluate desktop buffer. | 869 | ;; Evaluate desktop buffer. |
| 868 | (load (desktop-full-file-name) t t t) | 870 | (load (desktop-full-file-name) t t t) |
| 869 | ;; `desktop-create-buffer' puts buffers at end of the buffer list. | 871 | ;; `desktop-create-buffer' puts buffers at end of the buffer list. |
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 16bdaf152f7..01b3a5949f2 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -1259,6 +1259,7 @@ SWITCHED is non-nil if the patch is already applied." | |||
| 1259 | (t "Hunk %s at offset %d lines")) | 1259 | (t "Hunk %s at offset %d lines")) |
| 1260 | msg line-offset))) | 1260 | msg line-offset))) |
| 1261 | 1261 | ||
| 1262 | (defvar diff-apply-hunk-to-backup-file nil) | ||
| 1262 | 1263 | ||
| 1263 | (defun diff-apply-hunk (&optional reverse) | 1264 | (defun diff-apply-hunk (&optional reverse) |
| 1264 | "Apply the current hunk to the source file and go to the next. | 1265 | "Apply the current hunk to the source file and go to the next. |
| @@ -1275,6 +1276,17 @@ With a prefix argument, REVERSE the hunk." | |||
| 1275 | (cond | 1276 | (cond |
| 1276 | ((null line-offset) | 1277 | ((null line-offset) |
| 1277 | (error "Can't find the text to patch")) | 1278 | (error "Can't find the text to patch")) |
| 1279 | ((with-current-buffer buf | ||
| 1280 | (and buffer-file-name | ||
| 1281 | (backup-file-name-p buffer-file-name) | ||
| 1282 | (not diff-apply-hunk-to-backup-file) | ||
| 1283 | (not (set (make-local-variable 'diff-apply-hunk-to-backup-file) | ||
| 1284 | (yes-or-no-p (format "Really apply this hunk to %s? " | ||
| 1285 | (file-name-nondirectory | ||
| 1286 | buffer-file-name))))))) | ||
| 1287 | (error (substitute-command-keys | ||
| 1288 | (format "Use %s\\[diff-apply-hunk] to apply it to the other file" | ||
| 1289 | (if (not reverse) "\\[universal-argument] "))))) | ||
| 1278 | ((and switched | 1290 | ((and switched |
| 1279 | ;; A reversed patch was detected, perhaps apply it in reverse. | 1291 | ;; A reversed patch was detected, perhaps apply it in reverse. |
| 1280 | (not (save-window-excursion | 1292 | (not (save-window-excursion |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 0942c6d1dff..6082fc180dc 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -39,6 +39,11 @@ | |||
| 39 | ;; We need macros in dired.el to compile properly. | 39 | ;; We need macros in dired.el to compile properly. |
| 40 | (eval-when-compile (require 'dired)) | 40 | (eval-when-compile (require 'dired)) |
| 41 | 41 | ||
| 42 | (defvar dired-create-files-failures nil | ||
| 43 | "Variable where `dired-create-files' records failing file names. | ||
| 44 | Functions that operate recursively can store additional names | ||
| 45 | into this list; they also should call `dired-log' to log the errors.") | ||
| 46 | |||
| 42 | ;;; 15K | 47 | ;;; 15K |
| 43 | ;;;###begin dired-cmd.el | 48 | ;;;###begin dired-cmd.el |
| 44 | ;; Diffing and compressing | 49 | ;; Diffing and compressing |
| @@ -1145,37 +1150,59 @@ Special value `always' suppresses confirmation." | |||
| 1145 | ;;;###autoload | 1150 | ;;;###autoload |
| 1146 | (defun dired-copy-file (from to ok-flag) | 1151 | (defun dired-copy-file (from to ok-flag) |
| 1147 | (dired-handle-overwrite to) | 1152 | (dired-handle-overwrite to) |
| 1148 | (condition-case () | 1153 | (dired-copy-file-recursive from to ok-flag dired-copy-preserve-time t |
| 1149 | (dired-copy-file-recursive from to ok-flag dired-copy-preserve-time t | 1154 | dired-recursive-copies)) |
| 1150 | dired-recursive-copies) | ||
| 1151 | (file-date-error (message "Can't set date") | ||
| 1152 | (sit-for 1)))) | ||
| 1153 | 1155 | ||
| 1154 | (defun dired-copy-file-recursive (from to ok-flag &optional | 1156 | (defun dired-copy-file-recursive (from to ok-flag &optional |
| 1155 | preserve-time top recursive) | 1157 | preserve-time top recursive) |
| 1156 | (let ((attrs (file-attributes from))) | 1158 | (let ((attrs (file-attributes from)) |
| 1159 | dirfailed) | ||
| 1157 | (if (and recursive | 1160 | (if (and recursive |
| 1158 | (eq t (car attrs)) | 1161 | (eq t (car attrs)) |
| 1159 | (or (eq recursive 'always) | 1162 | (or (eq recursive 'always) |
| 1160 | (yes-or-no-p (format "Recursive copies of %s? " from)))) | 1163 | (yes-or-no-p (format "Recursive copies of %s? " from)))) |
| 1161 | ;; This is a directory. | 1164 | ;; This is a directory. |
| 1162 | (let ((files (directory-files from nil dired-re-no-dot))) | 1165 | (let ((files |
| 1166 | (condition-case err | ||
| 1167 | (directory-files from nil dired-re-no-dot) | ||
| 1168 | (file-error | ||
| 1169 | (push (dired-make-relative from) | ||
| 1170 | dired-create-files-failures) | ||
| 1171 | (dired-log "Copying error for %s:\n%s\n" from err) | ||
| 1172 | (setq dirfailed t) | ||
| 1173 | nil)))) | ||
| 1163 | (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask any more. | 1174 | (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask any more. |
| 1164 | (if (file-exists-p to) | 1175 | (unless dirfailed |
| 1165 | (or top (dired-handle-overwrite to)) | 1176 | (if (file-exists-p to) |
| 1166 | (make-directory to)) | 1177 | (or top (dired-handle-overwrite to)) |
| 1178 | (condition-case err | ||
| 1179 | (make-directory to) | ||
| 1180 | (file-error | ||
| 1181 | (push (dired-make-relative from) | ||
| 1182 | dired-create-files-failures) | ||
| 1183 | (setq files nil) | ||
| 1184 | (dired-log "Copying error for %s:\n%s\n" from err))))) | ||
| 1167 | (while files | 1185 | (while files |
| 1168 | (dired-copy-file-recursive | 1186 | (dired-copy-file-recursive |
| 1169 | (expand-file-name (car files) from) | 1187 | (expand-file-name (car files) from) |
| 1170 | (expand-file-name (car files) to) | 1188 | (expand-file-name (car files) to) |
| 1171 | ok-flag preserve-time nil recursive) | 1189 | ok-flag preserve-time nil recursive) |
| 1172 | (setq files (cdr files)))) | 1190 | (pop files))) |
| 1173 | ;; Not a directory. | 1191 | ;; Not a directory. |
| 1174 | (or top (dired-handle-overwrite to)) | 1192 | (or top (dired-handle-overwrite to)) |
| 1175 | (if (stringp (car attrs)) | 1193 | (condition-case err |
| 1176 | ;; It is a symlink | 1194 | (if (stringp (car attrs)) |
| 1177 | (make-symbolic-link (car attrs) to ok-flag) | 1195 | ;; It is a symlink |
| 1178 | (copy-file from to ok-flag dired-copy-preserve-time))))) | 1196 | (make-symbolic-link (car attrs) to ok-flag) |
| 1197 | (copy-file from to ok-flag dired-copy-preserve-time)) | ||
| 1198 | (file-date-error | ||
| 1199 | (push (dired-make-relative from) | ||
| 1200 | dired-create-files-failures) | ||
| 1201 | (dired-log "Can't set date on %s:\n%s\n" from err)) | ||
| 1202 | (file-error | ||
| 1203 | (push (dired-make-relative from) | ||
| 1204 | dired-create-files-failures) | ||
| 1205 | (dired-log "Copying error for %s:\n%s\n" from err)))))) | ||
| 1179 | 1206 | ||
| 1180 | ;;;###autoload | 1207 | ;;;###autoload |
| 1181 | (defun dired-rename-file (file newname ok-if-already-exists) | 1208 | (defun dired-rename-file (file newname ok-if-already-exists) |
| @@ -1297,7 +1324,8 @@ Special value `always' suppresses confirmation." | |||
| 1297 | ;; newfile's entry, or t to use the current marker character if the | 1324 | ;; newfile's entry, or t to use the current marker character if the |
| 1298 | ;; oldfile was marked. | 1325 | ;; oldfile was marked. |
| 1299 | 1326 | ||
| 1300 | (let (failures skipped (success-count 0) (total (length fn-list))) | 1327 | (let (dired-create-files-failures failures |
| 1328 | skipped (success-count 0) (total (length fn-list))) | ||
| 1301 | (let (to overwrite-query | 1329 | (let (to overwrite-query |
| 1302 | overwrite-backup-query) ; for dired-handle-overwrite | 1330 | overwrite-backup-query) ; for dired-handle-overwrite |
| 1303 | (mapcar | 1331 | (mapcar |
| @@ -1340,16 +1368,25 @@ ESC or `q' to not overwrite any of the remaining files, | |||
| 1340 | (dired-add-file to actual-marker-char)) | 1368 | (dired-add-file to actual-marker-char)) |
| 1341 | (file-error ; FILE-CREATOR aborted | 1369 | (file-error ; FILE-CREATOR aborted |
| 1342 | (progn | 1370 | (progn |
| 1343 | (setq failures (cons (dired-make-relative from) failures)) | 1371 | (push (dired-make-relative from) |
| 1372 | failures) | ||
| 1344 | (dired-log "%s `%s' to `%s' failed:\n%s\n" | 1373 | (dired-log "%s `%s' to `%s' failed:\n%s\n" |
| 1345 | operation from to err)))))))) | 1374 | operation from to err)))))))) |
| 1346 | fn-list)) | 1375 | fn-list)) |
| 1347 | (cond | 1376 | (cond |
| 1377 | (dired-create-files-failures | ||
| 1378 | (setq failures (nconc failures dired-create-files-failures)) | ||
| 1379 | (dired-log-summary | ||
| 1380 | (format "%s failed for %d file%s in %d requests" | ||
| 1381 | operation (length failures) | ||
| 1382 | (dired-plural-s (length failures)) | ||
| 1383 | total) | ||
| 1384 | failures)) | ||
| 1348 | (failures | 1385 | (failures |
| 1349 | (dired-log-summary | 1386 | (dired-log-summary |
| 1350 | (format "%s failed for %d of %d file%s" | 1387 | (format "%s failed for %d of %d file%s" |
| 1351 | operation (length failures) total | 1388 | operation (length failures) |
| 1352 | (dired-plural-s total)) | 1389 | total (dired-plural-s total)) |
| 1353 | failures)) | 1390 | failures)) |
| 1354 | (skipped | 1391 | (skipped |
| 1355 | (dired-log-summary | 1392 | (dired-log-summary |
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 4d3734bbd5a..942d16d3478 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -958,119 +958,132 @@ dired." | |||
| 958 | (defvar dired-guess-shell-alist-default | 958 | (defvar dired-guess-shell-alist-default |
| 959 | (list | 959 | (list |
| 960 | (list "\\.tar$" | 960 | (list "\\.tar$" |
| 961 | '(if dired-guess-shell-gnutar | 961 | '(if dired-guess-shell-gnutar |
| 962 | (concat dired-guess-shell-gnutar " xvf") | 962 | (concat dired-guess-shell-gnutar " xvf") |
| 963 | "tar xvf") | 963 | "tar xvf") |
| 964 | ;; Extract files into a separate subdirectory | 964 | ;; Extract files into a separate subdirectory |
| 965 | '(if dired-guess-shell-gnutar | 965 | '(if dired-guess-shell-gnutar |
| 966 | (concat "mkdir " (file-name-sans-extension file) | 966 | (concat "mkdir " (file-name-sans-extension file) |
| 967 | "; " dired-guess-shell-gnutar " -C " | 967 | "; " dired-guess-shell-gnutar " -C " |
| 968 | (file-name-sans-extension file) " -xvf") | 968 | (file-name-sans-extension file) " -xvf") |
| 969 | (concat "mkdir " (file-name-sans-extension file) | 969 | (concat "mkdir " (file-name-sans-extension file) |
| 970 | "; tar -C " (file-name-sans-extension file) " -xvf"))) | 970 | "; tar -C " (file-name-sans-extension file) " -xvf")) |
| 971 | ;; List archive contents. | ||
| 972 | '(if dired-guess-shell-gnutar | ||
| 973 | (concat dired-guess-shell-gnutar " tvf") | ||
| 974 | "tar tvf")) | ||
| 971 | 975 | ||
| 972 | ;; REGEXPS for compressed archives must come before the .Z rule to | 976 | ;; REGEXPS for compressed archives must come before the .Z rule to |
| 973 | ;; be recognized: | 977 | ;; be recognized: |
| 974 | (list "\\.tar\\.Z$" | 978 | (list "\\.tar\\.Z$" |
| 975 | ;; Untar it. | 979 | ;; Untar it. |
| 976 | '(if dired-guess-shell-gnutar | 980 | '(if dired-guess-shell-gnutar |
| 977 | (concat dired-guess-shell-gnutar " zxvf") | 981 | (concat dired-guess-shell-gnutar " zxvf") |
| 978 | (concat "zcat * | tar xvf -")) | 982 | (concat "zcat * | tar xvf -")) |
| 979 | ;; Optional conversion to gzip format. | 983 | ;; Optional conversion to gzip format. |
| 980 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 984 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 981 | " " dired-guess-shell-znew-switches)) | 985 | " " dired-guess-shell-znew-switches)) |
| 982 | 986 | ||
| 983 | ;; gzip'ed archives | 987 | ;; gzip'ed archives |
| 984 | (list "\\.t\\(ar\\.\\)?gz$" | 988 | (list "\\.t\\(ar\\.\\)?gz$" |
| 985 | '(if dired-guess-shell-gnutar | 989 | '(if dired-guess-shell-gnutar |
| 986 | (concat dired-guess-shell-gnutar " zxvf") | 990 | (concat dired-guess-shell-gnutar " zxvf") |
| 987 | (concat "gunzip -qc * | tar xvf -")) | 991 | (concat "gunzip -qc * | tar xvf -")) |
| 988 | ;; Extract files into a separate subdirectory | 992 | ;; Extract files into a separate subdirectory |
| 989 | '(if dired-guess-shell-gnutar | 993 | '(if dired-guess-shell-gnutar |
| 990 | (concat "mkdir " (file-name-sans-extension file) | 994 | (concat "mkdir " (file-name-sans-extension file) |
| 991 | "; " dired-guess-shell-gnutar " -C " | 995 | "; " dired-guess-shell-gnutar " -C " |
| 992 | (file-name-sans-extension file) " -zxvf") | 996 | (file-name-sans-extension file) " -zxvf") |
| 993 | (concat "mkdir " (file-name-sans-extension file) | 997 | (concat "mkdir " (file-name-sans-extension file) |
| 994 | "; gunzip -qc * | tar -C " | 998 | "; gunzip -qc * | tar -C " |
| 995 | (file-name-sans-extension file) " -xvf -")) | 999 | (file-name-sans-extension file) " -xvf -")) |
| 996 | ;; Optional decompression. | 1000 | ;; Optional decompression. |
| 997 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))) | 1001 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" "")) |
| 1002 | ;; List archive contents. | ||
| 1003 | '(if dired-guess-shell-gnutar | ||
| 1004 | (concat dired-guess-shell-gnutar " ztvf") | ||
| 1005 | (concat "gunzip -qc * | tar tvf -"))) | ||
| 998 | 1006 | ||
| 999 | ;; bzip2'ed archives | 1007 | ;; bzip2'ed archives |
| 1000 | (list "\\.t\\(ar\\.bz2\\|bz\\)$" | 1008 | (list "\\.t\\(ar\\.bz2\\|bz\\)$" |
| 1001 | "bunzip2 -c * | tar xvf -" | 1009 | "bunzip2 -c * | tar xvf -" |
| 1002 | ;; Extract files into a separate subdirectory | 1010 | ;; Extract files into a separate subdirectory |
| 1003 | '(concat "mkdir " (file-name-sans-extension file) | 1011 | '(concat "mkdir " (file-name-sans-extension file) |
| 1004 | "; bunzip2 -c * | tar -C " | 1012 | "; bunzip2 -c * | tar -C " |
| 1005 | (file-name-sans-extension file) " -xvf -") | 1013 | (file-name-sans-extension file) " -xvf -") |
| 1006 | ;; Optional decompression. | 1014 | ;; Optional decompression. |
| 1007 | "bunzip2") | 1015 | "bunzip2") |
| 1008 | 1016 | ||
| 1009 | '("\\.shar\\.Z$" "zcat * | unshar") | 1017 | '("\\.shar\\.Z$" "zcat * | unshar") |
| 1010 | '("\\.shar\\.g?z$" "gunzip -qc * | unshar") | 1018 | '("\\.shar\\.g?z$" "gunzip -qc * | unshar") |
| 1011 | 1019 | ||
| 1012 | '("\\.e?ps$" "ghostview" "xloadimage" "lpr") | 1020 | '("\\.e?ps$" "ghostview" "xloadimage" "lpr") |
| 1013 | (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" | 1021 | (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" |
| 1014 | ;; Optional decompression. | 1022 | ;; Optional decompression. |
| 1015 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) | 1023 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) |
| 1016 | (list "\\.e?ps\\.Z$" "zcat * | ghostview -" | 1024 | (list "\\.e?ps\\.Z$" "zcat * | ghostview -" |
| 1017 | ;; Optional conversion to gzip format. | 1025 | ;; Optional conversion to gzip format. |
| 1018 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1026 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1019 | " " dired-guess-shell-znew-switches)) | 1027 | " " dired-guess-shell-znew-switches)) |
| 1020 | 1028 | ||
| 1021 | '("\\.patch$" "cat * | patch") | 1029 | '("\\.patch$" "cat * | patch") |
| 1022 | (list "\\.patch\\.g?z$" "gunzip -qc * | patch" | 1030 | (list "\\.patch\\.g?z$" "gunzip -qc * | patch" |
| 1023 | ;; Optional decompression. | 1031 | ;; Optional decompression. |
| 1024 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) | 1032 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) |
| 1025 | (list "\\.patch\\.Z$" "zcat * | patch" | 1033 | (list "\\.patch\\.Z$" "zcat * | patch" |
| 1026 | ;; Optional conversion to gzip format. | 1034 | ;; Optional conversion to gzip format. |
| 1027 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1035 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1028 | " " dired-guess-shell-znew-switches)) | 1036 | " " dired-guess-shell-znew-switches)) |
| 1029 | 1037 | ||
| 1030 | ;; The following four extensions are useful with dired-man ("N" key) | 1038 | ;; The following four extensions are useful with dired-man ("N" key) |
| 1031 | (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man) | 1039 | (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man) |
| 1032 | (if (Man-support-local-filenames) | 1040 | (if (Man-support-local-filenames) |
| 1033 | "man -l" | 1041 | "man -l" |
| 1034 | "cat * | tbl | nroff -man -h"))) | 1042 | "cat * | tbl | nroff -man -h"))) |
| 1035 | (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man) | 1043 | (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man) |
| 1036 | (if (Man-support-local-filenames) | 1044 | (if (Man-support-local-filenames) |
| 1037 | "man -l" | 1045 | "man -l" |
| 1038 | "gunzip -qc * | tbl | nroff -man -h")) | 1046 | "gunzip -qc * | tbl | nroff -man -h")) |
| 1039 | ;; Optional decompression. | 1047 | ;; Optional decompression. |
| 1040 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) | 1048 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) |
| 1041 | (list "\\.[0-9]\\.Z$" '(progn (require 'man) | 1049 | (list "\\.[0-9]\\.Z$" '(progn (require 'man) |
| 1042 | (if (Man-support-local-filenames) | 1050 | (if (Man-support-local-filenames) |
| 1043 | "man -l" | 1051 | "man -l" |
| 1044 | "zcat * | tbl | nroff -man -h")) | 1052 | "zcat * | tbl | nroff -man -h")) |
| 1045 | ;; Optional conversion to gzip format. | 1053 | ;; Optional conversion to gzip format. |
| 1046 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1054 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1047 | " " dired-guess-shell-znew-switches)) | 1055 | " " dired-guess-shell-znew-switches)) |
| 1048 | '("\\.pod$" "perldoc" "pod2man * | nroff -man") | 1056 | '("\\.pod$" "perldoc" "pod2man * | nroff -man") |
| 1049 | 1057 | ||
| 1050 | '("\\.dvi$" "xdvi" "dvips") ; preview and printing | 1058 | '("\\.dvi$" "xdvi" "dvips") ; preview and printing |
| 1051 | '("\\.au$" "play") ; play Sun audiofiles | 1059 | '("\\.au$" "play") ; play Sun audiofiles |
| 1052 | '("\\.mpg$" "mpeg_play") | 1060 | '("\\.mpe?g$\\|\\.avi$" "xine -p") |
| 1053 | '("\\.uu$" "uudecode") ; for uudecoded files | 1061 | '("\\.wav$" "play") |
| 1062 | '("\\.uu$" "uudecode") ; for uudecoded files | ||
| 1054 | '("\\.hqx$" "mcvert") | 1063 | '("\\.hqx$" "mcvert") |
| 1055 | '("\\.sh$" "sh") ; execute shell scripts | 1064 | '("\\.sh$" "sh") ; execute shell scripts |
| 1056 | '("\\.xbm$" "bitmap") ; view X11 bitmaps | 1065 | '("\\.xbm$" "bitmap") ; view X11 bitmaps |
| 1057 | '("\\.gp$" "gnuplot") | 1066 | '("\\.gp$" "gnuplot") |
| 1058 | '("\\.p[bgpn]m$" "xloadimage") | 1067 | '("\\.p[bgpn]m$" "xloadimage") |
| 1059 | '("\\.gif$" "xloadimage") ; view gif pictures | 1068 | '("\\.gif$" "xloadimage") ; view gif pictures |
| 1060 | '("\\.tif$" "xloadimage") | 1069 | '("\\.tif$" "xloadimage") |
| 1061 | '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG | 1070 | '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG |
| 1062 | '("\\.jpe?g$" "xloadimage") | 1071 | '("\\.jpe?g$" "xloadimage") |
| 1063 | '("\\.fig$" "xfig") ; edit fig pictures | 1072 | '("\\.fig$" "xfig") ; edit fig pictures |
| 1064 | '("\\.out$" "xgraph") ; for plotting purposes. | 1073 | '("\\.out$" "xgraph") ; for plotting purposes. |
| 1065 | '("\\.tex$" "latex" "tex") | 1074 | '("\\.tex$" "latex" "tex") |
| 1066 | '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi") | 1075 | '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi") |
| 1067 | '("\\.pdf$" "xpdf") ; edit PDF files | 1076 | '("\\.pdf$" "xpdf") |
| 1077 | '("\\.doc$" "antiword" "strings") | ||
| 1078 | '("\\.rpm$" "rpm -qilp" "rpm -ivh") | ||
| 1079 | '("\\.dia$" "dia") | ||
| 1080 | '("\\.mgp$" "mgp") | ||
| 1068 | 1081 | ||
| 1069 | ;; Some other popular archivers. | 1082 | ;; Some other popular archivers. |
| 1070 | (list "\\.zip$" "unzip" | 1083 | (list "\\.zip$" "unzip" "unzip -l" |
| 1071 | ;; Extract files into a separate subdirectory | 1084 | ;; Extract files into a separate subdirectory |
| 1072 | '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") | 1085 | '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") |
| 1073 | " -d " (file-name-sans-extension file))) | 1086 | " -d " (file-name-sans-extension file))) |
| 1074 | '("\\.zoo$" "zoo x//") | 1087 | '("\\.zoo$" "zoo x//") |
| 1075 | '("\\.lzh$" "lharc x") | 1088 | '("\\.lzh$" "lharc x") |
| 1076 | '("\\.arc$" "arc x") | 1089 | '("\\.arc$" "arc x") |
| @@ -1081,10 +1094,11 @@ dired." | |||
| 1081 | (list "\\.dz$" "dictunzip") | 1094 | (list "\\.dz$" "dictunzip") |
| 1082 | (list "\\.bz2$" "bunzip2") | 1095 | (list "\\.bz2$" "bunzip2") |
| 1083 | (list "\\.Z$" "uncompress" | 1096 | (list "\\.Z$" "uncompress" |
| 1084 | ;; Optional conversion to gzip format. | 1097 | ;; Optional conversion to gzip format. |
| 1085 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1098 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1086 | " " dired-guess-shell-znew-switches)) | 1099 | " " dired-guess-shell-znew-switches)) |
| 1087 | ) | 1100 | |
| 1101 | '("\\.sign?$" "gpg --verify")) | ||
| 1088 | 1102 | ||
| 1089 | "Default alist used for shell command guessing. | 1103 | "Default alist used for shell command guessing. |
| 1090 | See `dired-guess-shell-alist-user'.") | 1104 | See `dired-guess-shell-alist-user'.") |
diff --git a/lisp/dired.el b/lisp/dired.el index 59fb21a004f..491ef261c11 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -2204,40 +2204,40 @@ instead of `dired-actual-switches'." | |||
| 2204 | (concat "\\`" (match-string 1 default-directory))))) | 2204 | (concat "\\`" (match-string 1 default-directory))))) |
| 2205 | (goto-char (point-min)) | 2205 | (goto-char (point-min)) |
| 2206 | (setq dired-subdir-alist nil) | 2206 | (setq dired-subdir-alist nil) |
| 2207 | (while (and (re-search-forward dired-subdir-regexp nil t) | 2207 | (while (re-search-forward dired-subdir-regexp nil t) |
| 2208 | ;; Avoid taking a file name ending in a colon | 2208 | ;; Avoid taking a file name ending in a colon |
| 2209 | ;; as a subdir name. | 2209 | ;; as a subdir name. |
| 2210 | (not (save-excursion | 2210 | (unless (save-excursion |
| 2211 | (goto-char (match-beginning 0)) | 2211 | (goto-char (match-beginning 0)) |
| 2212 | (beginning-of-line) | 2212 | (beginning-of-line) |
| 2213 | (forward-char 2) | 2213 | (forward-char 2) |
| 2214 | (save-match-data (looking-at dired-re-perms))))) | 2214 | (save-match-data (looking-at dired-re-perms))) |
| 2215 | (save-excursion | 2215 | (save-excursion |
| 2216 | (goto-char (match-beginning 1)) | 2216 | (goto-char (match-beginning 1)) |
| 2217 | (setq new-dir-name | 2217 | (setq new-dir-name |
| 2218 | (buffer-substring-no-properties (point) (match-end 1)) | 2218 | (buffer-substring-no-properties (point) (match-end 1)) |
| 2219 | new-dir-name | 2219 | new-dir-name |
| 2220 | (save-match-data | 2220 | (save-match-data |
| 2221 | (if (and R-ftp-base-dir-regex | 2221 | (if (and R-ftp-base-dir-regex |
| 2222 | (not (string= new-dir-name default-directory)) | 2222 | (not (string= new-dir-name default-directory)) |
| 2223 | (string-match R-ftp-base-dir-regex new-dir-name)) | 2223 | (string-match R-ftp-base-dir-regex new-dir-name)) |
| 2224 | (concat default-directory | 2224 | (concat default-directory |
| 2225 | (substring new-dir-name (match-end 0))) | 2225 | (substring new-dir-name (match-end 0))) |
| 2226 | (expand-file-name new-dir-name)))) | 2226 | (expand-file-name new-dir-name)))) |
| 2227 | (delete-region (point) (match-end 1)) | 2227 | (delete-region (point) (match-end 1)) |
| 2228 | (insert new-dir-name)) | 2228 | (insert new-dir-name)) |
| 2229 | (setq count (1+ count)) | 2229 | (setq count (1+ count)) |
| 2230 | (dired-alist-add-1 new-dir-name | 2230 | (dired-alist-add-1 new-dir-name |
| 2231 | ;; Place a sub directory boundary between lines. | 2231 | ;; Place a sub directory boundary between lines. |
| 2232 | (save-excursion | 2232 | (save-excursion |
| 2233 | (goto-char (match-beginning 0)) | 2233 | (goto-char (match-beginning 0)) |
| 2234 | (beginning-of-line) | 2234 | (beginning-of-line) |
| 2235 | (point-marker)))) | 2235 | (point-marker))))) |
| 2236 | (if (and (> count 1) (interactive-p)) | 2236 | (if (and (> count 1) (interactive-p)) |
| 2237 | (message "Buffer includes %d directories" count)) | 2237 | (message "Buffer includes %d directories" count))) |
| 2238 | ;; We don't need to sort it because it is in buffer order per | 2238 | ;; We don't need to sort it because it is in buffer order per |
| 2239 | ;; constructionem. Return new alist: | 2239 | ;; constructionem. Return new alist: |
| 2240 | dired-subdir-alist))) | 2240 | dired-subdir-alist)) |
| 2241 | 2241 | ||
| 2242 | (defun dired-alist-add-1 (dir new-marker) | 2242 | (defun dired-alist-add-1 (dir new-marker) |
| 2243 | ;; Add new DIR at NEW-MARKER. Don't sort. | 2243 | ;; Add new DIR at NEW-MARKER. Don't sort. |
| @@ -3043,6 +3043,10 @@ Thus, use \\[backward-page] to find the beginning of a group of errors." | |||
| 3043 | (insert "\f\n"))))))) | 3043 | (insert "\f\n"))))))) |
| 3044 | 3044 | ||
| 3045 | (defun dired-log-summary (string failures) | 3045 | (defun dired-log-summary (string failures) |
| 3046 | "State a summary of a command's failures, in echo area and log buffer. | ||
| 3047 | STRING is an overall summary of the failures. | ||
| 3048 | FAILURES is a list of file names that we failed to operate on, | ||
| 3049 | or nil if file names are not applicable." | ||
| 3046 | (if (= (length failures) 1) | 3050 | (if (= (length failures) 1) |
| 3047 | (message "%s" | 3051 | (message "%s" |
| 3048 | (with-current-buffer dired-log-buffer | 3052 | (with-current-buffer dired-log-buffer |
diff --git a/lisp/dnd.el b/lisp/dnd.el index 85881b3261f..1f3c8d71266 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el | |||
| @@ -37,11 +37,11 @@ | |||
| 37 | 37 | ||
| 38 | ;;;###autoload | 38 | ;;;###autoload |
| 39 | (defcustom dnd-protocol-alist | 39 | (defcustom dnd-protocol-alist |
| 40 | '( | 40 | '(("^file:///" . dnd-open-local-file) ; XDND format. |
| 41 | ("^file:///" . dnd-open-local-file) ; XDND format. | 41 | ("^file://" . dnd-open-file) ; URL with host |
| 42 | ("^file://" . dnd-open-file) ; URL with host | 42 | ("^file:" . dnd-open-local-file) ; Old KDE, Motif, Sun |
| 43 | ("^file:" . dnd-open-local-file) ; Old KDE, Motif, Sun | 43 | ("^\\(https?\\|ftp\\|file\\|nfs\\)://" . dnd-open-file) |
| 44 | ) | 44 | ) |
| 45 | 45 | ||
| 46 | "The functions to call for different protocols when a drop is made. | 46 | "The functions to call for different protocols when a drop is made. |
| 47 | This variable is used by `dnd-handle-one-url' and `dnd-handle-file-name'. | 47 | This variable is used by `dnd-handle-one-url' and `dnd-handle-file-name'. |
| @@ -59,6 +59,22 @@ if some action was made, or nil if the URL is ignored." | |||
| 59 | :group 'dnd) | 59 | :group 'dnd) |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | (defcustom dnd-open-remote-file-function | ||
| 63 | (if (eq system-type 'windows-nt) | ||
| 64 | 'dnd-open-local-file | ||
| 65 | 'dnd-open-remote-url) | ||
| 66 | "The function to call when opening a file on a remote machine. | ||
| 67 | The function will be called with two arguments; URI and ACTION. See | ||
| 68 | `dnd-open-file' for details. | ||
| 69 | If nil, then dragging remote files into Emacs will result in an error. | ||
| 70 | Predefined functions are `dnd-open-local-file' and `dnd-open-remote-url'. | ||
| 71 | `dnd-open-local-file' attempts to open a remote file using its UNC name and | ||
| 72 | is the default on MS-Windows. `dnd-open-remote-url' uses `url-handler-mode' | ||
| 73 | and is the default except for MS-Windows." | ||
| 74 | :version "22.1" | ||
| 75 | :type 'function | ||
| 76 | :group 'dnd) | ||
| 77 | |||
| 62 | 78 | ||
| 63 | (defcustom dnd-open-file-other-window nil | 79 | (defcustom dnd-open-file-other-window nil |
| 64 | "If non-nil, always use find-file-other-window to open dropped files." | 80 | "If non-nil, always use find-file-other-window to open dropped files." |
| @@ -75,7 +91,7 @@ The handler is first located by looking at `dnd-protocol-alist'. | |||
| 75 | If no match is found here, and the value of `browse-url-browser-function' | 91 | If no match is found here, and the value of `browse-url-browser-function' |
| 76 | is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. | 92 | is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. |
| 77 | If no match is found, just call `dnd-insert-text'. | 93 | If no match is found, just call `dnd-insert-text'. |
| 78 | WINDOW is where the drop happend, ACTION is the action for the drop, | 94 | WINDOW is where the drop happened, ACTION is the action for the drop, |
| 79 | URL is what has been dropped. | 95 | URL is what has been dropped. |
| 80 | Returns ACTION." | 96 | Returns ACTION." |
| 81 | (require 'browse-url) | 97 | (require 'browse-url) |
| @@ -147,7 +163,11 @@ Return nil if URI is not a local file." | |||
| 147 | The file is opened in the current window, or a new window if | 163 | The file is opened in the current window, or a new window if |
| 148 | `dnd-open-file-other-window' is set. URI is the url for the file, | 164 | `dnd-open-file-other-window' is set. URI is the url for the file, |
| 149 | and must have the format file:file-name or file:///file-name. | 165 | and must have the format file:file-name or file:///file-name. |
| 150 | The last / in file:/// is part of the file name. ACTION is ignored." | 166 | The last / in file:/// is part of the file name. If the system |
| 167 | natively supports unc file names, then remote urls of the form | ||
| 168 | file://server-name/file-name will also be handled by this function. | ||
| 169 | An alternative for systems that do not support unc file names is | ||
| 170 | `dnd-open-remote-url'. ACTION is ignored." | ||
| 151 | 171 | ||
| 152 | (let* ((f (dnd-get-local-file-name uri t))) | 172 | (let* ((f (dnd-get-local-file-name uri t))) |
| 153 | (if (and f (file-readable-p f)) | 173 | (if (and f (file-readable-p f)) |
| @@ -158,6 +178,20 @@ The last / in file:/// is part of the file name. ACTION is ignored." | |||
| 158 | 'private) | 178 | 'private) |
| 159 | (error "Can not read %s" uri)))) | 179 | (error "Can not read %s" uri)))) |
| 160 | 180 | ||
| 181 | (defun dnd-open-remote-url (uri action) | ||
| 182 | "Open a remote file with `find-file' and `url-handler-mode'. | ||
| 183 | Turns `url-handler-mode' on if not on before. The file is opened in the | ||
| 184 | current window, or a new window if `dnd-open-file-other-window' is set. | ||
| 185 | URI is the url for the file. ACTION is ignored." | ||
| 186 | (progn | ||
| 187 | (require 'url-handlers) | ||
| 188 | (or url-handler-mode (url-handler-mode)) | ||
| 189 | (if dnd-open-file-other-window | ||
| 190 | (find-file-other-window uri) | ||
| 191 | (find-file uri)) | ||
| 192 | 'private)) | ||
| 193 | |||
| 194 | |||
| 161 | (defun dnd-open-file (uri action) | 195 | (defun dnd-open-file (uri action) |
| 162 | "Open a local or remote file. | 196 | "Open a local or remote file. |
| 163 | The file is opened in the current window, or a new window if | 197 | The file is opened in the current window, or a new window if |
| @@ -169,7 +203,9 @@ The last / in file://hostname/ is part of the file name." | |||
| 169 | ;; file. Otherwise return nil. | 203 | ;; file. Otherwise return nil. |
| 170 | (let ((local-file (dnd-get-local-file-uri uri))) | 204 | (let ((local-file (dnd-get-local-file-uri uri))) |
| 171 | (if local-file (dnd-open-local-file local-file action) | 205 | (if local-file (dnd-open-local-file local-file action) |
| 172 | (error "Remote files not supported")))) | 206 | (if dnd-open-remote-file-function |
| 207 | (funcall dnd-open-remote-file-function uri action) | ||
| 208 | (error "Remote files not supported"))))) | ||
| 173 | 209 | ||
| 174 | 210 | ||
| 175 | (defun dnd-insert-text (window action text) | 211 | (defun dnd-insert-text (window action text) |
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index dff3c6bee61..015e6bfff3e 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -4281,6 +4281,11 @@ Mail anyway? (y or n) ") | |||
| 4281 | (setq lis1 (cdr lis1))) | 4281 | (setq lis1 (cdr lis1))) |
| 4282 | (cdr result))) | 4282 | (cdr result))) |
| 4283 | 4283 | ||
| 4284 | (defun ediff-add-to-history (history-var newelt) | ||
| 4285 | (if (fboundp 'add-to-history) | ||
| 4286 | (add-to-history history-var newelt) | ||
| 4287 | (set history-var (cons newelt (symbol-value history-var))))) | ||
| 4288 | |||
| 4284 | (if (fboundp 'copy-sequence) | 4289 | (if (fboundp 'copy-sequence) |
| 4285 | (defalias 'ediff-copy-list 'copy-sequence) | 4290 | (defalias 'ediff-copy-list 'copy-sequence) |
| 4286 | (defun ediff-copy-list (list) | 4291 | (defun ediff-copy-list (list) |
diff --git a/lisp/ediff.el b/lisp/ediff.el index 3e0be86b18b..6b37d4c1847 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | ;; Created: February 2, 1994 | 7 | ;; Created: February 2, 1994 |
| 8 | ;; Keywords: comparing, merging, patching, tools, unix | 8 | ;; Keywords: comparing, merging, patching, tools, unix |
| 9 | 9 | ||
| 10 | (defconst ediff-version "2.81" "The current version of Ediff") | 10 | (defconst ediff-version "2.81.1" "The current version of Ediff") |
| 11 | (defconst ediff-date "February 18, 2006" "Date of last update") | 11 | (defconst ediff-date "September 18, 2006" "Date of last update") |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | ;; This file is part of GNU Emacs. | 14 | ;; This file is part of GNU Emacs. |
| @@ -210,11 +210,12 @@ | |||
| 210 | ediff-last-dir-B | 210 | ediff-last-dir-B |
| 211 | (file-name-directory f))) | 211 | (file-name-directory f))) |
| 212 | (progn | 212 | (progn |
| 213 | (add-to-history 'file-name-history | 213 | (ediff-add-to-history |
| 214 | (ediff-abbreviate-file-name | 214 | 'file-name-history |
| 215 | (expand-file-name | 215 | (ediff-abbreviate-file-name |
| 216 | (file-name-nondirectory f) | 216 | (expand-file-name |
| 217 | dir-B))) | 217 | (file-name-nondirectory f) |
| 218 | dir-B))) | ||
| 218 | (ediff-get-default-file-name f 1))) | 219 | (ediff-get-default-file-name f 1))) |
| 219 | ))) | 220 | ))) |
| 220 | (ediff-files-internal file-A | 221 | (ediff-files-internal file-A |
| @@ -245,22 +246,24 @@ | |||
| 245 | ediff-last-dir-B | 246 | ediff-last-dir-B |
| 246 | (file-name-directory f))) | 247 | (file-name-directory f))) |
| 247 | (progn | 248 | (progn |
| 248 | (add-to-history 'file-name-history | 249 | (ediff-add-to-history |
| 249 | (ediff-abbreviate-file-name | 250 | 'file-name-history |
| 250 | (expand-file-name | 251 | (ediff-abbreviate-file-name |
| 251 | (file-name-nondirectory f) | 252 | (expand-file-name |
| 252 | dir-B))) | 253 | (file-name-nondirectory f) |
| 254 | dir-B))) | ||
| 253 | (ediff-get-default-file-name f 1)))) | 255 | (ediff-get-default-file-name f 1)))) |
| 254 | (ediff-read-file-name "File C to compare" | 256 | (ediff-read-file-name "File C to compare" |
| 255 | (setq dir-C (if ediff-use-last-dir | 257 | (setq dir-C (if ediff-use-last-dir |
| 256 | ediff-last-dir-C | 258 | ediff-last-dir-C |
| 257 | (file-name-directory ff))) | 259 | (file-name-directory ff))) |
| 258 | (progn | 260 | (progn |
| 259 | (add-to-history 'file-name-history | 261 | (ediff-add-to-history |
| 260 | (ediff-abbreviate-file-name | 262 | 'file-name-history |
| 261 | (expand-file-name | 263 | (ediff-abbreviate-file-name |
| 262 | (file-name-nondirectory ff) | 264 | (expand-file-name |
| 263 | dir-C))) | 265 | (file-name-nondirectory ff) |
| 266 | dir-C))) | ||
| 264 | (ediff-get-default-file-name ff 2))) | 267 | (ediff-get-default-file-name ff 2))) |
| 265 | ))) | 268 | ))) |
| 266 | (ediff-files-internal file-A | 269 | (ediff-files-internal file-A |
| @@ -1103,11 +1106,12 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1103 | ediff-last-dir-B | 1106 | ediff-last-dir-B |
| 1104 | (file-name-directory f))) | 1107 | (file-name-directory f))) |
| 1105 | (progn | 1108 | (progn |
| 1106 | (add-to-history 'file-name-history | 1109 | (ediff-add-to-history |
| 1107 | (ediff-abbreviate-file-name | 1110 | 'file-name-history |
| 1108 | (expand-file-name | 1111 | (ediff-abbreviate-file-name |
| 1109 | (file-name-nondirectory f) | 1112 | (expand-file-name |
| 1110 | dir-B))) | 1113 | (file-name-nondirectory f) |
| 1114 | dir-B))) | ||
| 1111 | (ediff-get-default-file-name f 1))) | 1115 | (ediff-get-default-file-name f 1))) |
| 1112 | ))) | 1116 | ))) |
| 1113 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) | 1117 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
| @@ -1146,11 +1150,12 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1146 | ediff-last-dir-B | 1150 | ediff-last-dir-B |
| 1147 | (file-name-directory f))) | 1151 | (file-name-directory f))) |
| 1148 | (progn | 1152 | (progn |
| 1149 | (add-to-history 'file-name-history | 1153 | (ediff-add-to-history |
| 1150 | (ediff-abbreviate-file-name | 1154 | 'file-name-history |
| 1151 | (expand-file-name | 1155 | (ediff-abbreviate-file-name |
| 1152 | (file-name-nondirectory f) | 1156 | (expand-file-name |
| 1153 | dir-B))) | 1157 | (file-name-nondirectory f) |
| 1158 | dir-B))) | ||
| 1154 | (ediff-get-default-file-name f 1)))) | 1159 | (ediff-get-default-file-name f 1)))) |
| 1155 | (ediff-read-file-name "Ancestor file" | 1160 | (ediff-read-file-name "Ancestor file" |
| 1156 | (setq dir-ancestor | 1161 | (setq dir-ancestor |
| @@ -1158,11 +1163,12 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1158 | ediff-last-dir-ancestor | 1163 | ediff-last-dir-ancestor |
| 1159 | (file-name-directory ff))) | 1164 | (file-name-directory ff))) |
| 1160 | (progn | 1165 | (progn |
| 1161 | (add-to-history 'file-name-history | 1166 | (ediff-add-to-history |
| 1162 | (ediff-abbreviate-file-name | 1167 | 'file-name-history |
| 1163 | (expand-file-name | 1168 | (ediff-abbreviate-file-name |
| 1164 | (file-name-nondirectory ff) | 1169 | (expand-file-name |
| 1165 | dir-ancestor))) | 1170 | (file-name-nondirectory ff) |
| 1171 | dir-ancestor))) | ||
| 1166 | (ediff-get-default-file-name ff 2))) | 1172 | (ediff-get-default-file-name ff 2))) |
| 1167 | ))) | 1173 | ))) |
| 1168 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) | 1174 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index d03245bf452..5aa8bbd14cc 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -2409,7 +2409,7 @@ If such an advice was found it will be removed from the list of advices | |||
| 2409 | in that CLASS." | 2409 | in that CLASS." |
| 2410 | (interactive (ad-read-advice-specification "Remove advice of")) | 2410 | (interactive (ad-read-advice-specification "Remove advice of")) |
| 2411 | (if (ad-is-advised function) | 2411 | (if (ad-is-advised function) |
| 2412 | (let* ((advice-to-remove (ad-find-advice function class name))) | 2412 | (let ((advice-to-remove (ad-find-advice function class name))) |
| 2413 | (if advice-to-remove | 2413 | (if advice-to-remove |
| 2414 | (ad-set-advice-info-field | 2414 | (ad-set-advice-info-field |
| 2415 | function class | 2415 | function class |
| @@ -2747,7 +2747,7 @@ For that it has to be fbound with a non-autoload definition." | |||
| 2747 | A three-element list is returned, where the 1st element is the list of | 2747 | A three-element list is returned, where the 1st element is the list of |
| 2748 | required arguments, the 2nd is the list of optional arguments, and the 3rd | 2748 | required arguments, the 2nd is the list of optional arguments, and the 3rd |
| 2749 | is the name of an optional rest parameter (or nil)." | 2749 | is the name of an optional rest parameter (or nil)." |
| 2750 | (let* (required optional rest) | 2750 | (let (required optional rest) |
| 2751 | (setq rest (car (cdr (memq '&rest arglist)))) | 2751 | (setq rest (car (cdr (memq '&rest arglist)))) |
| 2752 | (if rest (setq arglist (reverse (cdr (memq '&rest (reverse arglist)))))) | 2752 | (if rest (setq arglist (reverse (cdr (memq '&rest (reverse arglist)))))) |
| 2753 | (setq optional (cdr (memq '&optional arglist))) | 2753 | (setq optional (cdr (memq '&optional arglist))) |
| @@ -2958,7 +2958,7 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return | |||
| 2958 | 2958 | ||
| 2959 | (defun ad-make-mapped-call (source-arglist target-arglist target-function) | 2959 | (defun ad-make-mapped-call (source-arglist target-arglist target-function) |
| 2960 | "Make form to call TARGET-FUNCTION with args from SOURCE-ARGLIST." | 2960 | "Make form to call TARGET-FUNCTION with args from SOURCE-ARGLIST." |
| 2961 | (let* ((mapped-form (ad-map-arglists source-arglist target-arglist))) | 2961 | (let ((mapped-form (ad-map-arglists source-arglist target-arglist))) |
| 2962 | (if (eq (car mapped-form) 'funcall) | 2962 | (if (eq (car mapped-form) 'funcall) |
| 2963 | (cons target-function (cdr (cdr mapped-form))) | 2963 | (cons target-function (cdr (cdr mapped-form))) |
| 2964 | (prog1 mapped-form | 2964 | (prog1 mapped-form |
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 1b37f3f772f..792272ef88a 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el | |||
| @@ -66,13 +66,13 @@ | |||
| 66 | ;; | 66 | ;; |
| 67 | ;; The corresponding Lisp bindat specification looks like this: | 67 | ;; The corresponding Lisp bindat specification looks like this: |
| 68 | ;; | 68 | ;; |
| 69 | ;; (setq header-spec | 69 | ;; (setq header-bindat-spec |
| 70 | ;; '((dest-ip ip) | 70 | ;; '((dest-ip ip) |
| 71 | ;; (src-ip ip) | 71 | ;; (src-ip ip) |
| 72 | ;; (dest-port u16) | 72 | ;; (dest-port u16) |
| 73 | ;; (src-port u16))) | 73 | ;; (src-port u16))) |
| 74 | ;; | 74 | ;; |
| 75 | ;; (setq data-spec | 75 | ;; (setq data-bindat-spec |
| 76 | ;; '((type u8) | 76 | ;; '((type u8) |
| 77 | ;; (opcode u8) | 77 | ;; (opcode u8) |
| 78 | ;; (length u16r) ;; little endian order | 78 | ;; (length u16r) ;; little endian order |
| @@ -80,12 +80,12 @@ | |||
| 80 | ;; (data vec (length)) | 80 | ;; (data vec (length)) |
| 81 | ;; (align 4))) | 81 | ;; (align 4))) |
| 82 | ;; | 82 | ;; |
| 83 | ;; (setq packet-spec | 83 | ;; (setq packet-bindat-spec |
| 84 | ;; '((header struct header-spec) | 84 | ;; '((header struct header-bindat-spec) |
| 85 | ;; (items u8) | 85 | ;; (items u8) |
| 86 | ;; (fill 3) | 86 | ;; (fill 3) |
| 87 | ;; (item repeat (items) | 87 | ;; (item repeat (items) |
| 88 | ;; (struct data-spec)))) | 88 | ;; (struct data-bindat-spec)))) |
| 89 | ;; | 89 | ;; |
| 90 | ;; | 90 | ;; |
| 91 | ;; A binary data representation may look like | 91 | ;; A binary data representation may look like |
| @@ -121,6 +121,9 @@ | |||
| 121 | ;; Binary Data Structure Specification Format | 121 | ;; Binary Data Structure Specification Format |
| 122 | ;; ------------------------------------------ | 122 | ;; ------------------------------------------ |
| 123 | 123 | ||
| 124 | ;; We recommend using names that end in `-bindat-spec'; such names | ||
| 125 | ;; are recognized automatically as "risky" variables. | ||
| 126 | |||
| 124 | ;; The data specification is formatted as follows: | 127 | ;; The data specification is formatted as follows: |
| 125 | 128 | ||
| 126 | ;; SPEC ::= ( ITEM... ) | 129 | ;; SPEC ::= ( ITEM... ) |
| @@ -342,8 +345,8 @@ | |||
| 342 | 345 | ||
| 343 | (defun bindat-unpack (spec bindat-raw &optional bindat-idx) | 346 | (defun bindat-unpack (spec bindat-raw &optional bindat-idx) |
| 344 | "Return structured data according to SPEC for binary data in BINDAT-RAW. | 347 | "Return structured data according to SPEC for binary data in BINDAT-RAW. |
| 345 | BINDAT-RAW is a unibyte string or vector. Optional third arg BINDAT-IDX specifies | 348 | BINDAT-RAW is a unibyte string or vector. |
| 346 | the starting offset in BINDAT-RAW." | 349 | Optional third arg BINDAT-IDX specifies the starting offset in BINDAT-RAW." |
| 347 | (when (multibyte-string-p bindat-raw) | 350 | (when (multibyte-string-p bindat-raw) |
| 348 | (error "String is multibyte")) | 351 | (error "String is multibyte")) |
| 349 | (unless bindat-idx (setq bindat-idx 0)) | 352 | (unless bindat-idx (setq bindat-idx 0)) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 68603c905a5..666b373ca53 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -2261,7 +2261,8 @@ Code:, and others referenced in the style guide." | |||
| 2261 | (re-search-forward "^;;; Code" nil t) | 2261 | (re-search-forward "^;;; Code" nil t) |
| 2262 | (re-search-forward "^(require" nil t) | 2262 | (re-search-forward "^(require" nil t) |
| 2263 | (re-search-forward "^(" nil t)) | 2263 | (re-search-forward "^(" nil t)) |
| 2264 | (beginning-of-line))) | 2264 | (beginning-of-line)) |
| 2265 | (t (re-search-forward ";;; .* --- .*\n"))) | ||
| 2265 | (if (checkdoc-y-or-n-p | 2266 | (if (checkdoc-y-or-n-p |
| 2266 | "You should have a \";;; Commentary:\", add one? ") | 2267 | "You should have a \";;; Commentary:\", add one? ") |
| 2267 | (insert "\n;;; Commentary:\n;; \n\n") | 2268 | (insert "\n;;; Commentary:\n;; \n\n") |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index e8590933863..b7d63acc861 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2578,21 +2578,7 @@ surrounded by (block NAME ...). | |||
| 2578 | (cl-const-expr-val (nth 1 keys))))) | 2578 | (cl-const-expr-val (nth 1 keys))))) |
| 2579 | (cond ((eq test 'eq) (list 'memq a list)) | 2579 | (cond ((eq test 'eq) (list 'memq a list)) |
| 2580 | ((eq test 'equal) (list 'member a list)) | 2580 | ((eq test 'equal) (list 'member a list)) |
| 2581 | ((or (null keys) (eq test 'eql)) | 2581 | ((or (null keys) (eq test 'eql)) (list 'memql a list)) |
| 2582 | (if (eq (cl-const-expr-p a) t) | ||
| 2583 | (list (if (floatp-safe (cl-const-expr-val a)) 'member 'memq) | ||
| 2584 | a list) | ||
| 2585 | (if (eq (cl-const-expr-p list) t) | ||
| 2586 | (let ((p (cl-const-expr-val list)) (mb nil) (mq nil)) | ||
| 2587 | (if (not (cdr p)) | ||
| 2588 | (and p (list 'eql a (list 'quote (car p)))) | ||
| 2589 | (while p | ||
| 2590 | (if (floatp-safe (car p)) (setq mb t) | ||
| 2591 | (or (integerp (car p)) (symbolp (car p)) (setq mq t))) | ||
| 2592 | (setq p (cdr p))) | ||
| 2593 | (if (not mb) (list 'memq a list) | ||
| 2594 | (if (not mq) (list 'member a list) form)))) | ||
| 2595 | form))) | ||
| 2596 | (t form)))) | 2582 | (t form)))) |
| 2597 | 2583 | ||
| 2598 | (define-compiler-macro assoc* (&whole form a list &rest keys) | 2584 | (define-compiler-macro assoc* (&whole form a list &rest keys) |
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 222407f86f2..d2d68189230 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el | |||
| @@ -155,7 +155,11 @@ Like (push X PLACE), except that the list is unmodified if X is `eql' to | |||
| 155 | an element already on the list. | 155 | an element already on the list. |
| 156 | \nKeywords supported: :test :test-not :key | 156 | \nKeywords supported: :test :test-not :key |
| 157 | \n(fn X PLACE [KEYWORD VALUE]...)" | 157 | \n(fn X PLACE [KEYWORD VALUE]...)" |
| 158 | (if (symbolp place) (list 'setq place (list* 'adjoin x place keys)) | 158 | (if (symbolp place) |
| 159 | (if (null keys) | ||
| 160 | `(let ((x ,x)) | ||
| 161 | (if (memql x ,place) ,place (setq ,place (cons x ,place)))) | ||
| 162 | (list 'setq place (list* 'adjoin x place keys))) | ||
| 159 | (list* 'callf2 'adjoin x place keys))) | 163 | (list* 'callf2 'adjoin x place keys))) |
| 160 | 164 | ||
| 161 | (defun cl-set-elt (seq n val) | 165 | (defun cl-set-elt (seq n val) |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index d4ba8d30623..b22e49dac34 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -200,7 +200,8 @@ Use the command `%s' to change this variable." pretty-name mode)) | |||
| 200 | See the command `%s' for a description of this minor-mode." | 200 | See the command `%s' for a description of this minor-mode." |
| 201 | (if body " | 201 | (if body " |
| 202 | Setting this variable directly does not take effect; | 202 | Setting this variable directly does not take effect; |
| 203 | use either \\[customize] or the function `%s'.")))) | 203 | either customize it (see the info node `Easy Customization') |
| 204 | or call the function `%s'.")))) | ||
| 204 | `(defcustom ,mode ,init-value | 205 | `(defcustom ,mode ,init-value |
| 205 | ,(format base-doc-string pretty-name mode mode) | 206 | ,(format base-doc-string pretty-name mode mode) |
| 206 | ,@set | 207 | ,@set |
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 805184e15de..98d778f1507 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -432,7 +432,7 @@ Emacs Lisp mode) that support Eldoc.") | |||
| 432 | ;; Prime the command list. | 432 | ;; Prime the command list. |
| 433 | (eldoc-add-command-completions | 433 | (eldoc-add-command-completions |
| 434 | "backward-" "beginning-of-" "move-beginning-of-" "delete-other-windows" | 434 | "backward-" "beginning-of-" "move-beginning-of-" "delete-other-windows" |
| 435 | "delete-window" | 435 | "delete-window" "handle-select-window" |
| 436 | "end-of-" "move-end-of-" "exchange-point-and-mark" "forward-" | 436 | "end-of-" "move-end-of-" "exchange-point-and-mark" "forward-" |
| 437 | "indent-for-tab-command" "goto-" "mark-page" "mark-paragraph" | 437 | "indent-for-tab-command" "goto-" "mark-page" "mark-paragraph" |
| 438 | "mouse-set-point" "move-" "pop-global-mark" "next-" "other-window" | 438 | "mouse-set-point" "move-" "pop-global-mark" "next-" "other-window" |
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 50b7d8dc9ef..42c5d3183e7 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | (concat | 64 | (concat |
| 65 | "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\ | 65 | "^\\s-*(\\(def\\(ine-skeleton\\|ine-generic-mode\\|ine-derived-mode\\|\ |
| 66 | ine\\(?:-global\\)?-minor-mode\\|ine-compilation-mode\\|un-cvs-mode\\|\ | 66 | ine\\(?:-global\\)?-minor-mode\\|ine-compilation-mode\\|un-cvs-mode\\|\ |
| 67 | foo\\|[^cfgv]\\(\\w\\|\\s_\\)+\\*?\\)\\|easy-mmode-define-[a-z-]+\\|easy-menu-define\\|\ | 67 | foo\\|[^icfgv]\\(\\w\\|\\s_\\)+\\*?\\)\\|easy-mmode-define-[a-z-]+\\|easy-menu-define\\|\ |
| 68 | menu-bar-make-toggle\\)" | 68 | menu-bar-make-toggle\\)" |
| 69 | find-function-space-re | 69 | find-function-space-re |
| 70 | "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)") | 70 | "\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)") |
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 82eac50c874..0c66a207351 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -32,9 +32,11 @@ | |||
| 32 | ;; Layout of a timer vector: | 32 | ;; Layout of a timer vector: |
| 33 | ;; [triggered-p high-seconds low-seconds usecs repeat-delay | 33 | ;; [triggered-p high-seconds low-seconds usecs repeat-delay |
| 34 | ;; function args idle-delay] | 34 | ;; function args idle-delay] |
| 35 | ;; triggered-p is nil if the timer is active (waiting to be triggered), | ||
| 36 | ;; t if it is inactive ("already triggered", in theory) | ||
| 35 | 37 | ||
| 36 | (defun timer-create () | 38 | (defun timer-create () |
| 37 | "Create a timer object." | 39 | "Create a timer object which can be passed to `timer-activate'." |
| 38 | (let ((timer (make-vector 8 nil))) | 40 | (let ((timer (make-vector 8 nil))) |
| 39 | (aset timer 0 t) | 41 | (aset timer 0 t) |
| 40 | timer)) | 42 | timer)) |
| @@ -173,6 +175,10 @@ fire repeatedly that many seconds apart." | |||
| 173 | (defun timer-activate (timer &optional triggered-p reuse-cell) | 175 | (defun timer-activate (timer &optional triggered-p reuse-cell) |
| 174 | "Put TIMER on the list of active timers. | 176 | "Put TIMER on the list of active timers. |
| 175 | 177 | ||
| 178 | If TRIGGERED-P is t, that means to make the timer inactive | ||
| 179 | \(put it on the list, but mark it as already triggered). | ||
| 180 | To remove from the list, use `cancel-timer'. | ||
| 181 | |||
| 176 | REUSE-CELL, if non-nil, is a cons cell to reuse instead | 182 | REUSE-CELL, if non-nil, is a cons cell to reuse instead |
| 177 | of allocating a new one." | 183 | of allocating a new one." |
| 178 | (if (and (timerp timer) | 184 | (if (and (timerp timer) |
| @@ -256,10 +262,10 @@ of allocating a new one." | |||
| 256 | (setq timer-idle-list (delq timer timer-idle-list)) | 262 | (setq timer-idle-list (delq timer timer-idle-list)) |
| 257 | nil) | 263 | nil) |
| 258 | 264 | ||
| 259 | ;; Remove TIMER from the list of active timers or idle timers. | ||
| 260 | ;; Only to be used in this file. It returns the cons cell | ||
| 261 | ;; that was removed from the list. | ||
| 262 | (defun cancel-timer-internal (timer) | 265 | (defun cancel-timer-internal (timer) |
| 266 | "Remove TIMER from the list of active timers or idle timers. | ||
| 267 | Only to be used in this file. It returns the cons cell | ||
| 268 | that was removed from the timer list." | ||
| 263 | (let ((cell1 (memq timer timer-list)) | 269 | (let ((cell1 (memq timer timer-list)) |
| 264 | (cell2 (memq timer timer-idle-list))) | 270 | (cell2 (memq timer timer-idle-list))) |
| 265 | (if cell1 | 271 | (if cell1 |
| @@ -270,7 +276,9 @@ of allocating a new one." | |||
| 270 | 276 | ||
| 271 | ;;;###autoload | 277 | ;;;###autoload |
| 272 | (defun cancel-function-timers (function) | 278 | (defun cancel-function-timers (function) |
| 273 | "Cancel all timers scheduled by `run-at-time' which would run FUNCTION." | 279 | "Cancel all timers which would run FUNCTION. |
| 280 | This affects ordinary timers such as are scheduled by `run-at-time', | ||
| 281 | and idle timers such as are scheduled by `run-with-idle-timer'." | ||
| 274 | (interactive "aCancel timers of function: ") | 282 | (interactive "aCancel timers of function: ") |
| 275 | (let ((tail timer-list)) | 283 | (let ((tail timer-list)) |
| 276 | (while tail | 284 | (while tail |
| @@ -284,12 +292,19 @@ of allocating a new one." | |||
| 284 | (setq tail (cdr tail))))) | 292 | (setq tail (cdr tail))))) |
| 285 | 293 | ||
| 286 | ;; Record the last few events, for debugging. | 294 | ;; Record the last few events, for debugging. |
| 287 | (defvar timer-event-last-2 nil) | 295 | (defvar timer-event-last nil |
| 288 | (defvar timer-event-last-1 nil) | 296 | "Last timer that was run.") |
| 289 | (defvar timer-event-last nil) | 297 | (defvar timer-event-last-1 nil |
| 298 | "Next-to-last timer that was run.") | ||
| 299 | (defvar timer-event-last-2 nil | ||
| 300 | "Third-to-last timer that was run.") | ||
| 290 | 301 | ||
| 291 | (defvar timer-max-repeats 10 | 302 | (defvar timer-max-repeats 10 |
| 292 | "*Maximum number of times to repeat a timer, if real time jumps.") | 303 | "*Maximum number of times to repeat a timer, if many repeats are delayed. |
| 304 | Timer invocations can be delayed because Emacs is suspended or busy, | ||
| 305 | or because the system's time changes. If such an occurrence makes it | ||
| 306 | appear that many invocations are overdue, this variable controls | ||
| 307 | how many will really happen.") | ||
| 293 | 308 | ||
| 294 | (defun timer-until (timer time) | 309 | (defun timer-until (timer time) |
| 295 | "Calculate number of seconds from when TIMER will run, until TIME. | 310 | "Calculate number of seconds from when TIMER will run, until TIME. |
| @@ -440,6 +455,7 @@ This function returns a timer object which you can use in `cancel-timer'." | |||
| 440 | timer)) | 455 | timer)) |
| 441 | 456 | ||
| 442 | (defun with-timeout-handler (tag) | 457 | (defun with-timeout-handler (tag) |
| 458 | "This is the timer function used for the timer made by `with-timeout'." | ||
| 443 | (throw tag 'timeout)) | 459 | (throw tag 'timeout)) |
| 444 | 460 | ||
| 445 | ;;;###autoload (put 'with-timeout 'lisp-indent-function 1) | 461 | ;;;###autoload (put 'with-timeout 'lisp-indent-function 1) |
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index 1ebf1186c2d..191be58c0b5 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el | |||
| @@ -265,11 +265,14 @@ display oriented stuff, use `trace-function-background' instead." | |||
| 265 | ;;;###autoload | 265 | ;;;###autoload |
| 266 | (defun trace-function-background (function &optional buffer) | 266 | (defun trace-function-background (function &optional buffer) |
| 267 | "Traces FUNCTION with trace output going quietly to BUFFER. | 267 | "Traces FUNCTION with trace output going quietly to BUFFER. |
| 268 | For every call of FUNCTION Lisp-style trace messages that display argument | 268 | When this tracing is enabled, every call to FUNCTION writes |
| 269 | and return values will be inserted into BUFFER. This function generates the | 269 | a Lisp-style trace message (showing the arguments and return value) |
| 270 | trace advice for FUNCTION and activates it together with any other advice | 270 | into BUFFER. This function generates advice to trace FUNCTION |
| 271 | there might be!! Trace output will quietly go to BUFFER without changing | 271 | and activates it together with any other advice there might be. |
| 272 | the window or buffer configuration at all." | 272 | The trace output goes to BUFFER quietly, without changing |
| 273 | the window or buffer configuration. | ||
| 274 | |||
| 275 | BUFFER defaults to `trace-buffer'." | ||
| 273 | (interactive | 276 | (interactive |
| 274 | (list | 277 | (list |
| 275 | (intern | 278 | (intern |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index b16ae17eda0..236e3e2c9ad 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1097,73 +1097,79 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1097 | ;;; Pre-command hook | 1097 | ;;; Pre-command hook |
| 1098 | 1098 | ||
| 1099 | (defun cua--pre-command-handler-1 () | 1099 | (defun cua--pre-command-handler-1 () |
| 1100 | (let ((movement (eq (get this-command 'CUA) 'move))) | 1100 | ;; Cancel prefix key timeout if user enters another key. |
| 1101 | 1101 | (when cua--prefix-override-timer | |
| 1102 | ;; Cancel prefix key timeout if user enters another key. | 1102 | (if (timerp cua--prefix-override-timer) |
| 1103 | (when cua--prefix-override-timer | 1103 | (cancel-timer cua--prefix-override-timer)) |
| 1104 | (if (timerp cua--prefix-override-timer) | 1104 | (setq cua--prefix-override-timer nil)) |
| 1105 | (cancel-timer cua--prefix-override-timer)) | 1105 | |
| 1106 | (setq cua--prefix-override-timer nil)) | 1106 | (cond |
| 1107 | 1107 | ;; Only symbol commands can have necessary properties | |
| 1108 | ;; Handle shifted cursor keys and other movement commands. | 1108 | ((not (symbolp this-command)) |
| 1109 | ;; If region is not active, region is activated if key is shifted. | 1109 | nil) |
| 1110 | ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). | 1110 | |
| 1111 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. | 1111 | ;; Handle delete-selection property on non-movement commands |
| 1112 | (if movement | 1112 | ((not (eq (get this-command 'CUA) 'move)) |
| 1113 | (cond | 1113 | (when (and mark-active (not deactivate-mark)) |
| 1114 | ((if window-system | 1114 | (let* ((ds (or (get this-command 'delete-selection) |
| 1115 | (memq 'shift (event-modifiers | 1115 | (get this-command 'pending-delete))) |
| 1116 | (aref (this-single-command-raw-keys) 0))) | 1116 | (nc (cond |
| 1117 | (or | 1117 | ((not ds) nil) |
| 1118 | (memq 'shift (event-modifiers | 1118 | ((eq ds 'yank) |
| 1119 | (aref (this-single-command-keys) 0))) | 1119 | 'cua-paste) |
| 1120 | ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. | 1120 | ((eq ds 'kill) |
| 1121 | (and (boundp 'local-function-key-map) | 1121 | (if cua--rectangle |
| 1122 | local-function-key-map | 1122 | 'cua-copy-rectangle |
| 1123 | (let ((ev (lookup-key local-function-key-map | 1123 | 'cua-copy-region)) |
| 1124 | (this-single-command-raw-keys)))) | 1124 | ((eq ds 'supersede) |
| 1125 | (and (vector ev) | 1125 | (if cua--rectangle |
| 1126 | (symbolp (setq ev (aref ev 0))) | 1126 | 'cua-delete-rectangle |
| 1127 | (string-match "S-" (symbol-name ev))))))) | 1127 | 'cua-delete-region)) |
| 1128 | (unless mark-active | 1128 | (t |
| 1129 | (push-mark-command nil t)) | 1129 | (if cua--rectangle |
| 1130 | (setq cua--last-region-shifted t) | 1130 | 'cua-delete-rectangle ;; replace? |
| 1131 | (setq cua--explicit-region-start nil)) | 1131 | 'cua-replace-region))))) |
| 1132 | ((or cua--explicit-region-start cua--rectangle) | 1132 | (if nc |
| 1133 | (unless mark-active | 1133 | (setq this-original-command this-command |
| 1134 | (push-mark-command nil nil))) | 1134 | this-command nc))))) |
| 1135 | (t | 1135 | |
| 1136 | ;; If we set mark-active to nil here, the region highlight will not be | 1136 | ;; Handle shifted cursor keys and other movement commands. |
| 1137 | ;; removed by the direct_output_ commands. | 1137 | ;; If region is not active, region is activated if key is shifted. |
| 1138 | (setq deactivate-mark t))) | 1138 | ;; If region is active, region is cancelled if key is unshifted (and region not started with C-SPC). |
| 1139 | 1139 | ;; If rectangle is active, expand rectangle in specified direction and ignore the movement. | |
| 1140 | ;; Handle delete-selection property on other commands | 1140 | ((if window-system |
| 1141 | (if (and mark-active (not deactivate-mark)) | 1141 | (memq 'shift (event-modifiers |
| 1142 | (let* ((ds (or (get this-command 'delete-selection) | 1142 | (aref (this-single-command-raw-keys) 0))) |
| 1143 | (get this-command 'pending-delete))) | 1143 | (or |
| 1144 | (nc (cond | 1144 | (memq 'shift (event-modifiers |
| 1145 | ((not ds) nil) | 1145 | (aref (this-single-command-keys) 0))) |
| 1146 | ((eq ds 'yank) | 1146 | ;; See if raw escape sequence maps to a shifted event, e.g. S-up or C-S-home. |
| 1147 | 'cua-paste) | 1147 | (and (boundp 'local-function-key-map) |
| 1148 | ((eq ds 'kill) | 1148 | local-function-key-map |
| 1149 | (if cua--rectangle | 1149 | (let ((ev (lookup-key local-function-key-map |
| 1150 | 'cua-copy-rectangle | 1150 | (this-single-command-raw-keys)))) |
| 1151 | 'cua-copy-region)) | 1151 | (and (vector ev) |
| 1152 | ((eq ds 'supersede) | 1152 | (symbolp (setq ev (aref ev 0))) |
| 1153 | (if cua--rectangle | 1153 | (string-match "S-" (symbol-name ev))))))) |
| 1154 | 'cua-delete-rectangle | 1154 | (unless mark-active |
| 1155 | 'cua-delete-region)) | 1155 | (push-mark-command nil t)) |
| 1156 | (t | 1156 | (setq cua--last-region-shifted t) |
| 1157 | (if cua--rectangle | 1157 | (setq cua--explicit-region-start nil)) |
| 1158 | 'cua-delete-rectangle ;; replace? | 1158 | |
| 1159 | 'cua-replace-region))))) | 1159 | ;; Set mark if user explicitly said to do so |
| 1160 | (if nc | 1160 | ((or cua--explicit-region-start cua--rectangle) |
| 1161 | (setq this-original-command this-command | 1161 | (unless mark-active |
| 1162 | this-command nc))))) | 1162 | (push-mark-command nil nil))) |
| 1163 | 1163 | ||
| 1164 | ;; Detect extension of rectangles by mouse or other movement | 1164 | ;; Else clear mark after this command. |
| 1165 | (setq cua--buffer-and-point-before-command | 1165 | (t |
| 1166 | (if cua--rectangle (cons (current-buffer) (point)))))) | 1166 | ;; If we set mark-active to nil here, the region highlight will not be |
| 1167 | ;; removed by the direct_output_ commands. | ||
| 1168 | (setq deactivate-mark t))) | ||
| 1169 | |||
| 1170 | ;; Detect extension of rectangles by mouse or other movement | ||
| 1171 | (setq cua--buffer-and-point-before-command | ||
| 1172 | (if cua--rectangle (cons (current-buffer) (point))))) | ||
| 1167 | 1173 | ||
| 1168 | (defun cua--pre-command-handler () | 1174 | (defun cua--pre-command-handler () |
| 1169 | (when cua-mode | 1175 | (when cua-mode |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index af757a2a55c..61d99e6c78d 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -892,12 +892,17 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to | |||
| 892 | (t | 892 | (t |
| 893 | ;;(setq ch (read-char-exclusive)) | 893 | ;;(setq ch (read-char-exclusive)) |
| 894 | (setq ch (aref (read-key-sequence nil) 0)) | 894 | (setq ch (aref (read-key-sequence nil) 0)) |
| 895 | (if viper-xemacs-p | ||
| 896 | (setq ch (event-to-character ch))) | ||
| 895 | ;; replace ^M with the newline | 897 | ;; replace ^M with the newline |
| 896 | (if (eq ch ?\C-m) (setq ch ?\n)) | 898 | (if (eq ch ?\C-m) (setq ch ?\n)) |
| 897 | ;; Make sure ^V and ^Q work as quotation chars | 899 | ;; Make sure ^V and ^Q work as quotation chars |
| 898 | (if (memq ch '(?\C-v ?\C-q)) | 900 | (if (memq ch '(?\C-v ?\C-q)) |
| 899 | ;;(setq ch (read-char-exclusive)) | 901 | (progn |
| 900 | (setq ch (aref (read-key-sequence nil) 0)) | 902 | ;;(setq ch (read-char-exclusive)) |
| 903 | (setq ch (aref (read-key-sequence nil) 0)) | ||
| 904 | (if viper-xemacs-p | ||
| 905 | (setq ch (event-to-character ch)))) | ||
| 901 | ) | 906 | ) |
| 902 | (insert ch)) | 907 | (insert ch)) |
| 903 | ) | 908 | ) |
| @@ -1750,7 +1755,7 @@ invokes the command before that, etc." | |||
| 1750 | 1755 | ||
| 1751 | ;; Hook used in viper-undo | 1756 | ;; Hook used in viper-undo |
| 1752 | (defun viper-after-change-undo-hook (beg end len) | 1757 | (defun viper-after-change-undo-hook (beg end len) |
| 1753 | (if undo-in-progress | 1758 | (if (and (boundp 'undo-in-progress) undo-in-progress) |
| 1754 | (setq undo-beg-posn beg | 1759 | (setq undo-beg-posn beg |
| 1755 | undo-end-posn (or end beg)) | 1760 | undo-end-posn (or end beg)) |
| 1756 | ;; some other hooks may be changing various text properties in | 1761 | ;; some other hooks may be changing various text properties in |
| @@ -3093,7 +3098,7 @@ If point is on a widget or a button, simulate clicking on that widget/button." | |||
| 3093 | (and (consp widget) | 3098 | (and (consp widget) |
| 3094 | (get (widget-type widget) 'widget-type)))) | 3099 | (get (widget-type widget) 'widget-type)))) |
| 3095 | (widget-button-press (point)) | 3100 | (widget-button-press (point)) |
| 3096 | (if (button-at (point)) | 3101 | (if (and (fboundp 'button-at) (fboundp 'push-button) (button-at (point))) |
| 3097 | (push-button) | 3102 | (push-button) |
| 3098 | ;; not a widget or a button | 3103 | ;; not a widget or a button |
| 3099 | (viper-leave-region-active) | 3104 | (viper-leave-region-active) |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 0ba7bdd041a..ea70ad609ad 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> | 9 | ;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
| 10 | ;; Keywords: emulations | 10 | ;; Keywords: emulations |
| 11 | 11 | ||
| 12 | (defconst viper-version "3.12 of February 18, 2006" | 12 | (defconst viper-version "3.13 of September 18, 2006" |
| 13 | "The current version of Viper") | 13 | "The current version of Viper") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
diff --git a/lisp/ezimage.el b/lisp/ezimage.el index 84ad10ad599..ed8fb497aff 100644 --- a/lisp/ezimage.el +++ b/lisp/ezimage.el | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | ;; | 27 | ;; |
| 28 | ;; A few routines for placing an image over text that will work for any | 28 | ;; A few routines for placing an image over text that will work for any |
| 29 | ;; Emacs implementation without error. When images are not supported, then | 29 | ;; Emacs implementation without error. When images are not supported, then |
| 30 | ;; they are justnot displayed. | 30 | ;; they are just not displayed. |
| 31 | ;; | 31 | ;; |
| 32 | ;; The idea is that gui buffers (trees, buttons, etc) will have text | 32 | ;; The idea is that gui buffers (trees, buttons, etc) will have text |
| 33 | ;; representations of the GUI elements. These routines will replace the text | 33 | ;; representations of the GUI elements. These routines will replace the text |
diff --git a/lisp/faces.el b/lisp/faces.el index c893e47ca79..04d4613ac4c 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2089,7 +2089,7 @@ terminal type to a different value." | |||
| 2089 | 2089 | ||
| 2090 | (defgroup mode-line-faces nil | 2090 | (defgroup mode-line-faces nil |
| 2091 | "Faces used in the mode line." | 2091 | "Faces used in the mode line." |
| 2092 | :group 'modeline | 2092 | :group 'mode-line |
| 2093 | :group 'faces | 2093 | :group 'faces |
| 2094 | :version "22.1") | 2094 | :version "22.1") |
| 2095 | 2095 | ||
diff --git a/lisp/ffap.el b/lisp/ffap.el index 5ff63bfdec2..bd0c213ba6e 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -954,7 +954,7 @@ If t, `ffap-tex-init' will initialize this when needed.") | |||
| 954 | (substring name 2)))) | 954 | (substring name 2)))) |
| 955 | 955 | ||
| 956 | (defvar ffap-rfc-path | 956 | (defvar ffap-rfc-path |
| 957 | (concat (ffap-host-to-filename "ds.internic.net") "/rfc/rfc%s.txt")) | 957 | (concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt")) |
| 958 | 958 | ||
| 959 | (defun ffap-rfc (name) | 959 | (defun ffap-rfc (name) |
| 960 | (format ffap-rfc-path | 960 | (format ffap-rfc-path |
diff --git a/lisp/filecache.el b/lisp/filecache.el index c0e9e9e5f5d..48ca2206386 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el | |||
| @@ -266,6 +266,7 @@ Defaults to nil on DOS and Windows, and t on other systems." | |||
| 266 | ;; Functions to add files to the cache | 266 | ;; Functions to add files to the cache |
| 267 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 267 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 268 | 268 | ||
| 269 | ;;;###autoload | ||
| 269 | (defun file-cache-add-directory (directory &optional regexp) | 270 | (defun file-cache-add-directory (directory &optional regexp) |
| 270 | "Add DIRECTORY to the file cache. | 271 | "Add DIRECTORY to the file cache. |
| 271 | If the optional REGEXP argument is non-nil, only files which match it will | 272 | If the optional REGEXP argument is non-nil, only files which match it will |
| @@ -291,6 +292,7 @@ be added to the cache." | |||
| 291 | dir-files) | 292 | dir-files) |
| 292 | (file-cache-add-file-list dir-files)))) | 293 | (file-cache-add-file-list dir-files)))) |
| 293 | 294 | ||
| 295 | ;;;###autoload | ||
| 294 | (defun file-cache-add-directory-list (directory-list &optional regexp) | 296 | (defun file-cache-add-directory-list (directory-list &optional regexp) |
| 295 | "Add DIRECTORY-LIST (a list of directory names) to the file cache. | 297 | "Add DIRECTORY-LIST (a list of directory names) to the file cache. |
| 296 | If the optional REGEXP argument is non-nil, only files which match it | 298 | If the optional REGEXP argument is non-nil, only files which match it |
| @@ -307,6 +309,8 @@ in each directory, not to the directory list itself." | |||
| 307 | (mapcar 'file-cache-add-file file-list)) | 309 | (mapcar 'file-cache-add-file file-list)) |
| 308 | 310 | ||
| 309 | ;; Workhorse function | 311 | ;; Workhorse function |
| 312 | |||
| 313 | ;;;###autoload | ||
| 310 | (defun file-cache-add-file (file) | 314 | (defun file-cache-add-file (file) |
| 311 | "Add FILE to the file cache." | 315 | "Add FILE to the file cache." |
| 312 | (interactive "fAdd File: ") | 316 | (interactive "fAdd File: ") |
| @@ -333,6 +337,7 @@ in each directory, not to the directory list itself." | |||
| 333 | file-cache-alist))) | 337 | file-cache-alist))) |
| 334 | ))) | 338 | ))) |
| 335 | 339 | ||
| 340 | ;;;###autoload | ||
| 336 | (defun file-cache-add-directory-using-find (directory) | 341 | (defun file-cache-add-directory-using-find (directory) |
| 337 | "Use the `find' command to add files to the file cache. | 342 | "Use the `find' command to add files to the file cache. |
| 338 | Find is run in DIRECTORY." | 343 | Find is run in DIRECTORY." |
| @@ -355,6 +360,7 @@ Find is run in DIRECTORY." | |||
| 355 | "-print") | 360 | "-print") |
| 356 | (file-cache-add-from-file-cache-buffer))) | 361 | (file-cache-add-from-file-cache-buffer))) |
| 357 | 362 | ||
| 363 | ;;;###autoload | ||
| 358 | (defun file-cache-add-directory-using-locate (string) | 364 | (defun file-cache-add-directory-using-locate (string) |
| 359 | "Use the `locate' command to add files to the file cache. | 365 | "Use the `locate' command to add files to the file cache. |
| 360 | STRING is passed as an argument to the locate command." | 366 | STRING is passed as an argument to the locate command." |
| @@ -366,6 +372,7 @@ STRING is passed as an argument to the locate command." | |||
| 366 | string) | 372 | string) |
| 367 | (file-cache-add-from-file-cache-buffer)) | 373 | (file-cache-add-from-file-cache-buffer)) |
| 368 | 374 | ||
| 375 | ;;;###autoload | ||
| 369 | (defun file-cache-add-directory-recursively (dir &optional regexp) | 376 | (defun file-cache-add-directory-recursively (dir &optional regexp) |
| 370 | "Adds DIR and any subdirectories to the file-cache. | 377 | "Adds DIR and any subdirectories to the file-cache. |
| 371 | This function does not use any external programs | 378 | This function does not use any external programs |
diff --git a/lisp/files.el b/lisp/files.el index e099d30a01f..fbfe0e2c996 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -514,6 +514,9 @@ using \\[toggle-read-only]." | |||
| 514 | :type 'boolean | 514 | :type 'boolean |
| 515 | :group 'view) | 515 | :group 'view) |
| 516 | 516 | ||
| 517 | (defvar file-name-history nil | ||
| 518 | "History list of file names entered in the minibuffer.") | ||
| 519 | |||
| 517 | (put 'ange-ftp-completion-hook-function 'safe-magic t) | 520 | (put 'ange-ftp-completion-hook-function 'safe-magic t) |
| 518 | (defun ange-ftp-completion-hook-function (op &rest args) | 521 | (defun ange-ftp-completion-hook-function (op &rest args) |
| 519 | "Provides support for ange-ftp host name completion. | 522 | "Provides support for ange-ftp host name completion. |
| @@ -1117,13 +1120,15 @@ expand wildcards (if any) and visit multiple files." | |||
| 1117 | (mapcar 'switch-to-buffer (cdr value)))) | 1120 | (mapcar 'switch-to-buffer (cdr value)))) |
| 1118 | (switch-to-buffer-other-frame value)))) | 1121 | (switch-to-buffer-other-frame value)))) |
| 1119 | 1122 | ||
| 1120 | (defun find-file-existing (filename &optional wildcards) | 1123 | (defun find-file-existing (filename) |
| 1121 | "Edit the existing file FILENAME. | 1124 | "Edit the existing file FILENAME. |
| 1122 | Like \\[find-file] but only allow a file that exists." | 1125 | Like \\[find-file] but only allow a file that exists, and do not allow |
| 1123 | (interactive (find-file-read-args "Find existing file: " t)) | 1126 | file names with wildcards." |
| 1124 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 1127 | (interactive (nbutlast (find-file-read-args "Find existing file: " t))) |
| 1125 | (find-file filename wildcards) | 1128 | (if (and (not (interactive-p)) (not (file-exists-p filename))) |
| 1126 | (current-buffer)) | 1129 | (error "%s does not exist" filename) |
| 1130 | (find-file filename) | ||
| 1131 | (current-buffer))) | ||
| 1127 | 1132 | ||
| 1128 | (defun find-file-read-only (filename &optional wildcards) | 1133 | (defun find-file-read-only (filename &optional wildcards) |
| 1129 | "Edit file FILENAME but don't allow changes. | 1134 | "Edit file FILENAME but don't allow changes. |
| @@ -1310,7 +1315,7 @@ removes automounter prefixes (see the variable `automount-dir-prefix')." | |||
| 1310 | (setq abbreviated-home-dir | 1315 | (setq abbreviated-home-dir |
| 1311 | (let ((abbreviated-home-dir "$foo")) | 1316 | (let ((abbreviated-home-dir "$foo")) |
| 1312 | (concat "^" (abbreviate-file-name (expand-file-name "~")) | 1317 | (concat "^" (abbreviate-file-name (expand-file-name "~")) |
| 1313 | "\\(/\\|$\\)")))) | 1318 | "\\(/\\|\\'\\)")))) |
| 1314 | 1319 | ||
| 1315 | ;; If FILENAME starts with the abbreviated homedir, | 1320 | ;; If FILENAME starts with the abbreviated homedir, |
| 1316 | ;; make it start with `~' instead. | 1321 | ;; make it start with `~' instead. |
| @@ -1365,7 +1370,7 @@ If there is no such live buffer, return nil." | |||
| 1365 | (number (nthcdr 10 attributes)) | 1370 | (number (nthcdr 10 attributes)) |
| 1366 | (list (buffer-list)) found) | 1371 | (list (buffer-list)) found) |
| 1367 | (and buffer-file-numbers-unique | 1372 | (and buffer-file-numbers-unique |
| 1368 | number | 1373 | (car-safe number) ;Make sure the inode is not just nil. |
| 1369 | (while (and (not found) list) | 1374 | (while (and (not found) list) |
| 1370 | (with-current-buffer (car list) | 1375 | (with-current-buffer (car list) |
| 1371 | (if (and buffer-file-name | 1376 | (if (and buffer-file-name |
| @@ -1904,7 +1909,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1904 | ("\\.[sS]\\'" . asm-mode) | 1909 | ("\\.[sS]\\'" . asm-mode) |
| 1905 | ("\\.asm\\'" . asm-mode) | 1910 | ("\\.asm\\'" . asm-mode) |
| 1906 | ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) | 1911 | ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) |
| 1907 | ("[cC]hange[lL]og\\.[0-9]+\\'" . change-log-mode) | 1912 | ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode) |
| 1908 | ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) | 1913 | ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) |
| 1909 | ("\\.scm\\.[0-9]*\\'" . scheme-mode) | 1914 | ("\\.scm\\.[0-9]*\\'" . scheme-mode) |
| 1910 | ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) | 1915 | ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) |
| @@ -2396,10 +2401,10 @@ asking you for confirmation." | |||
| 2396 | ;; | 2401 | ;; |
| 2397 | ;; For variables defined in the C source code the declaration should go here: | 2402 | ;; For variables defined in the C source code the declaration should go here: |
| 2398 | 2403 | ||
| 2399 | ;; FIXME: Some variables should be moved according to the rules above. | ||
| 2400 | (mapc (lambda (pair) | 2404 | (mapc (lambda (pair) |
| 2401 | (put (car pair) 'safe-local-variable (cdr pair))) | 2405 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2402 | '((fill-column . integerp) ;; C source code | 2406 | '((buffer-read-only . booleanp) ;; C source code |
| 2407 | (fill-column . integerp) ;; C source code | ||
| 2403 | (indent-tabs-mode . booleanp) ;; C source code | 2408 | (indent-tabs-mode . booleanp) ;; C source code |
| 2404 | (left-margin . integerp) ;; C source code | 2409 | (left-margin . integerp) ;; C source code |
| 2405 | (no-update-autoloads . booleanp) | 2410 | (no-update-autoloads . booleanp) |
| @@ -2697,8 +2702,8 @@ It is dangerous if either of these conditions are met: | |||
| 2697 | 2702 | ||
| 2698 | * Its name ends with \"hook(s)\", \"function(s)\", \"form(s)\", \"map\", | 2703 | * Its name ends with \"hook(s)\", \"function(s)\", \"form(s)\", \"map\", |
| 2699 | \"program\", \"command(s)\", \"predicate(s)\", \"frame-alist\", | 2704 | \"program\", \"command(s)\", \"predicate(s)\", \"frame-alist\", |
| 2700 | \"mode-alist\", \"font-lock-(syntactic-)keyword*\", or | 2705 | \"mode-alist\", \"font-lock-(syntactic-)keyword*\", |
| 2701 | \"map-alist\"." | 2706 | \"map-alist\", or \"bindat-spec\"." |
| 2702 | ;; If this is an alias, check the base name. | 2707 | ;; If this is an alias, check the base name. |
| 2703 | (condition-case nil | 2708 | (condition-case nil |
| 2704 | (setq sym (indirect-variable sym)) | 2709 | (setq sym (indirect-variable sym)) |
| @@ -2707,7 +2712,7 @@ It is dangerous if either of these conditions are met: | |||
| 2707 | (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|\ | 2712 | (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|\ |
| 2708 | -commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords\ | 2713 | -commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords\ |
| 2709 | -[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|\ | 2714 | -[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|\ |
| 2710 | -map$\\|-map-alist$" (symbol-name sym)))) | 2715 | -map$\\|-map-alist$\\|-bindat-spec$" (symbol-name sym)))) |
| 2711 | 2716 | ||
| 2712 | (defun hack-one-local-variable-quotep (exp) | 2717 | (defun hack-one-local-variable-quotep (exp) |
| 2713 | (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) | 2718 | (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) |
| @@ -3729,9 +3734,15 @@ This requires the external program `diff' to be in your `exec-path'." | |||
| 3729 | (recursive-edit) | 3734 | (recursive-edit) |
| 3730 | ;; Return nil to ask about BUF again. | 3735 | ;; Return nil to ask about BUF again. |
| 3731 | nil) | 3736 | nil) |
| 3732 | "view this file") | 3737 | "view this buffer") |
| 3733 | (?d diff-buffer-with-file | 3738 | (?d (lambda (buf) |
| 3734 | "view changes in file")) | 3739 | (save-window-excursion |
| 3740 | (diff-buffer-with-file buf)) | ||
| 3741 | (view-buffer (get-buffer-create "*Diff*") | ||
| 3742 | (lambda (ignore) (exit-recursive-edit))) | ||
| 3743 | (recursive-edit) | ||
| 3744 | nil) | ||
| 3745 | "view changes in this buffer")) | ||
| 3735 | "ACTION-ALIST argument used in call to `map-y-or-n-p'.") | 3746 | "ACTION-ALIST argument used in call to `map-y-or-n-p'.") |
| 3736 | 3747 | ||
| 3737 | (defvar buffer-save-without-query nil | 3748 | (defvar buffer-save-without-query nil |
diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 88e5414d525..a2895133c27 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el | |||
| @@ -129,8 +129,17 @@ as the final argument." | |||
| 129 | args (concat find-dired-find-program " . " | 129 | args (concat find-dired-find-program " . " |
| 130 | (if (string= args "") | 130 | (if (string= args "") |
| 131 | "" | 131 | "" |
| 132 | (concat "\\( " args " \\) ")) | 132 | (concat |
| 133 | (car find-ls-option))) | 133 | (shell-quote-argument "(") |
| 134 | " " args " " | ||
| 135 | (shell-quote-argument ")") | ||
| 136 | " ")) | ||
| 137 | (if (equal (car find-ls-option) "-exec ls -ld {} \\;") | ||
| 138 | (concat "-exec ls -ld " | ||
| 139 | (shell-quote-argument "{}") | ||
| 140 | " " | ||
| 141 | (shell-quote-argument ";")) | ||
| 142 | (car find-ls-option)))) | ||
| 134 | ;; Start the find process. | 143 | ;; Start the find process. |
| 135 | (shell-command (concat args "&") (current-buffer)) | 144 | (shell-command (concat args "&") (current-buffer)) |
| 136 | ;; The next statement will bomb in classic dired (no optional arg allowed) | 145 | ;; The next statement will bomb in classic dired (no optional arg allowed) |
| @@ -215,7 +224,10 @@ Thus ARG can also contain additional grep options." | |||
| 215 | (find-dired dir | 224 | (find-dired dir |
| 216 | (concat "-type f -exec grep " find-grep-options " -e " | 225 | (concat "-type f -exec grep " find-grep-options " -e " |
| 217 | (shell-quote-argument regexp) | 226 | (shell-quote-argument regexp) |
| 218 | " {} \\\; "))) | 227 | " " |
| 228 | (shell-quote-argument "{}") | ||
| 229 | " " | ||
| 230 | (shell-quote-argument ";")))) | ||
| 219 | 231 | ||
| 220 | (defun find-dired-filter (proc string) | 232 | (defun find-dired-filter (proc string) |
| 221 | ;; Filter for \\[find-dired] processes. | 233 | ;; Filter for \\[find-dired] processes. |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 093780c3914..dfd3ec33089 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -718,7 +718,7 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', | |||
| 718 | ;; If the keywords were compiled before, compile them again. | 718 | ;; If the keywords were compiled before, compile them again. |
| 719 | (if was-compiled | 719 | (if was-compiled |
| 720 | (setq font-lock-keywords | 720 | (setq font-lock-keywords |
| 721 | (font-lock-compile-keywords font-lock-keywords t))))))) | 721 | (font-lock-compile-keywords font-lock-keywords))))))) |
| 722 | 722 | ||
| 723 | (defun font-lock-update-removed-keyword-alist (mode keywords how) | 723 | (defun font-lock-update-removed-keyword-alist (mode keywords how) |
| 724 | "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." | 724 | "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." |
| @@ -825,7 +825,7 @@ happens, so the major mode can be corrected." | |||
| 825 | ;; If the keywords were compiled before, compile them again. | 825 | ;; If the keywords were compiled before, compile them again. |
| 826 | (if was-compiled | 826 | (if was-compiled |
| 827 | (setq font-lock-keywords | 827 | (setq font-lock-keywords |
| 828 | (font-lock-compile-keywords font-lock-keywords t))))))) | 828 | (font-lock-compile-keywords font-lock-keywords))))))) |
| 829 | 829 | ||
| 830 | ;;; Font Lock Support mode. | 830 | ;;; Font Lock Support mode. |
| 831 | 831 | ||
| @@ -1168,7 +1168,12 @@ what properties to clear before refontifying a region.") | |||
| 1168 | ;; number of lines. | 1168 | ;; number of lines. |
| 1169 | ;; (setq beg (progn (goto-char beg) (line-beginning-position)) | 1169 | ;; (setq beg (progn (goto-char beg) (line-beginning-position)) |
| 1170 | ;; end (progn (goto-char end) (line-beginning-position 2))) | 1170 | ;; end (progn (goto-char end) (line-beginning-position 2))) |
| 1171 | ) | 1171 | (unless (eq end (point-max)) |
| 1172 | ;; Rounding up to a whole number of lines should include the | ||
| 1173 | ;; line right after `end'. Typical case: the first char of | ||
| 1174 | ;; the line was deleted. Or a \n was inserted in the middle | ||
| 1175 | ;; of a line. | ||
| 1176 | (setq end (1+ end)))) | ||
| 1172 | (font-lock-fontify-region beg end))))) | 1177 | (font-lock-fontify-region beg end))))) |
| 1173 | 1178 | ||
| 1174 | (defvar jit-lock-start) (defvar jit-lock-end) | 1179 | (defvar jit-lock-start) (defvar jit-lock-end) |
| @@ -1205,9 +1210,17 @@ This function does 2 things: | |||
| 1205 | (setq beg (or (previous-single-property-change | 1210 | (setq beg (or (previous-single-property-change |
| 1206 | beg 'font-lock-multiline) | 1211 | beg 'font-lock-multiline) |
| 1207 | (point-min)))) | 1212 | (point-min)))) |
| 1208 | (setq end (or (text-property-any end (point-max) | 1213 | (when (< end (point-max)) |
| 1209 | 'font-lock-multiline nil) | 1214 | (setq end |
| 1210 | (point-max))) | 1215 | (if (get-text-property end 'font-lock-multiline) |
| 1216 | (or (text-property-any end (point-max) | ||
| 1217 | 'font-lock-multiline nil) | ||
| 1218 | (point-max)) | ||
| 1219 | ;; Rounding up to a whole number of lines should include the | ||
| 1220 | ;; line right after `end'. Typical case: the first char of | ||
| 1221 | ;; the line was deleted. Or a \n was inserted in the middle | ||
| 1222 | ;; of a line. | ||
| 1223 | (1+ end)))) | ||
| 1211 | ;; Finally, pre-enlarge the region to a whole number of lines, to try | 1224 | ;; Finally, pre-enlarge the region to a whole number of lines, to try |
| 1212 | ;; and anticipate what font-lock-default-fontify-region will do, so as to | 1225 | ;; and anticipate what font-lock-default-fontify-region will do, so as to |
| 1213 | ;; avoid double-redisplay. | 1226 | ;; avoid double-redisplay. |
| @@ -1217,11 +1230,11 @@ This function does 2 things: | |||
| 1217 | (when (memq 'font-lock-extend-region-wholelines | 1230 | (when (memq 'font-lock-extend-region-wholelines |
| 1218 | font-lock-extend-region-functions) | 1231 | font-lock-extend-region-functions) |
| 1219 | (goto-char beg) | 1232 | (goto-char beg) |
| 1220 | (forward-line 0) | 1233 | (setq jit-lock-start (min jit-lock-start (line-beginning-position))) |
| 1221 | (setq jit-lock-start (min jit-lock-start (point))) | ||
| 1222 | (goto-char end) | 1234 | (goto-char end) |
| 1223 | (forward-line 1) | 1235 | (setq jit-lock-end |
| 1224 | (setq jit-lock-end (max jit-lock-end (point))))))) | 1236 | (max jit-lock-end |
| 1237 | (if (bolp) (point) (line-beginning-position 2)))))))) | ||
| 1225 | 1238 | ||
| 1226 | (defun font-lock-fontify-block (&optional arg) | 1239 | (defun font-lock-fontify-block (&optional arg) |
| 1227 | "Fontify some lines the way `font-lock-fontify-buffer' would. | 1240 | "Fontify some lines the way `font-lock-fontify-buffer' would. |
| @@ -1414,7 +1427,8 @@ START should be at the beginning of a line." | |||
| 1414 | ;; If `font-lock-syntactic-keywords' is not compiled, compile it. | 1427 | ;; If `font-lock-syntactic-keywords' is not compiled, compile it. |
| 1415 | (unless (eq (car font-lock-syntactic-keywords) t) | 1428 | (unless (eq (car font-lock-syntactic-keywords) t) |
| 1416 | (setq font-lock-syntactic-keywords (font-lock-compile-keywords | 1429 | (setq font-lock-syntactic-keywords (font-lock-compile-keywords |
| 1417 | font-lock-syntactic-keywords))) | 1430 | font-lock-syntactic-keywords |
| 1431 | t))) | ||
| 1418 | ;; Get down to business. | 1432 | ;; Get down to business. |
| 1419 | (let ((case-fold-search font-lock-keywords-case-fold-search) | 1433 | (let ((case-fold-search font-lock-keywords-case-fold-search) |
| 1420 | (keywords (cddr font-lock-syntactic-keywords)) | 1434 | (keywords (cddr font-lock-syntactic-keywords)) |
| @@ -1570,7 +1584,7 @@ START should be at the beginning of a line. | |||
| 1570 | LOUDLY, if non-nil, allows progress-meter bar." | 1584 | LOUDLY, if non-nil, allows progress-meter bar." |
| 1571 | (unless (eq (car font-lock-keywords) t) | 1585 | (unless (eq (car font-lock-keywords) t) |
| 1572 | (setq font-lock-keywords | 1586 | (setq font-lock-keywords |
| 1573 | (font-lock-compile-keywords font-lock-keywords t))) | 1587 | (font-lock-compile-keywords font-lock-keywords))) |
| 1574 | (let ((case-fold-search font-lock-keywords-case-fold-search) | 1588 | (let ((case-fold-search font-lock-keywords-case-fold-search) |
| 1575 | (keywords (cddr font-lock-keywords)) | 1589 | (keywords (cddr font-lock-keywords)) |
| 1576 | (bufname (buffer-name)) (count 0) | 1590 | (bufname (buffer-name)) (count 0) |
| @@ -1626,12 +1640,12 @@ LOUDLY, if non-nil, allows progress-meter bar." | |||
| 1626 | 1640 | ||
| 1627 | ;; Various functions. | 1641 | ;; Various functions. |
| 1628 | 1642 | ||
| 1629 | (defun font-lock-compile-keywords (keywords &optional regexp) | 1643 | (defun font-lock-compile-keywords (keywords &optional syntactic-keywords) |
| 1630 | "Compile KEYWORDS into the form (t KEYWORDS COMPILED...) | 1644 | "Compile KEYWORDS into the form (t KEYWORDS COMPILED...) |
| 1631 | Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the | 1645 | Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the |
| 1632 | `font-lock-keywords' doc string. | 1646 | `font-lock-keywords' doc string. |
| 1633 | If REGEXP is non-nil, it means these keywords are used for | 1647 | If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for |
| 1634 | `font-lock-keywords' rather than for `font-lock-syntactic-keywords'." | 1648 | `font-lock-syntactic-keywords' rather than for `font-lock-keywords'." |
| 1635 | (if (not font-lock-set-defaults) | 1649 | (if (not font-lock-set-defaults) |
| 1636 | ;; This should never happen. But some external packages sometimes | 1650 | ;; This should never happen. But some external packages sometimes |
| 1637 | ;; call font-lock in unexpected and incorrect ways. It's important to | 1651 | ;; call font-lock in unexpected and incorrect ways. It's important to |
| @@ -1644,10 +1658,12 @@ If REGEXP is non-nil, it means these keywords are used for | |||
| 1644 | (setq keywords | 1658 | (setq keywords |
| 1645 | (cons t (cons keywords | 1659 | (cons t (cons keywords |
| 1646 | (mapcar 'font-lock-compile-keyword keywords)))) | 1660 | (mapcar 'font-lock-compile-keyword keywords)))) |
| 1647 | (if (and regexp | 1661 | (if (and (not syntactic-keywords) |
| 1648 | (eq (or syntax-begin-function | 1662 | (let ((beg-function |
| 1649 | font-lock-beginning-of-syntax-function) | 1663 | (or font-lock-beginning-of-syntax-function |
| 1650 | 'beginning-of-defun) | 1664 | syntax-begin-function))) |
| 1665 | (or (eq beg-function 'beginning-of-defun) | ||
| 1666 | (get beg-function 'font-lock-syntax-paren-check))) | ||
| 1651 | (not beginning-of-defun-function)) | 1667 | (not beginning-of-defun-function)) |
| 1652 | ;; Try to detect when a string or comment contains something that | 1668 | ;; Try to detect when a string or comment contains something that |
| 1653 | ;; looks like a defun and would thus confuse font-lock. | 1669 | ;; looks like a defun and would thus confuse font-lock. |
| @@ -1774,7 +1790,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using | |||
| 1774 | ;; Now compile the keywords. | 1790 | ;; Now compile the keywords. |
| 1775 | (unless (eq (car font-lock-keywords) t) | 1791 | (unless (eq (car font-lock-keywords) t) |
| 1776 | (setq font-lock-keywords | 1792 | (setq font-lock-keywords |
| 1777 | (font-lock-compile-keywords font-lock-keywords t)))))) | 1793 | (font-lock-compile-keywords font-lock-keywords)))))) |
| 1778 | 1794 | ||
| 1779 | ;;; Colour etc. support. | 1795 | ;;; Colour etc. support. |
| 1780 | 1796 | ||
diff --git a/lisp/frame.el b/lisp/frame.el index 1ad42e387a8..c9b9b1ef7de 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -771,7 +771,7 @@ the user during startup." | |||
| 771 | (nreverse frame-initial-geometry-arguments)) | 771 | (nreverse frame-initial-geometry-arguments)) |
| 772 | (cdr param-list)) | 772 | (cdr param-list)) |
| 773 | 773 | ||
| 774 | (defcustom focus-follows-mouse t | 774 | (defcustom focus-follows-mouse (not (eq window-system 'mac)) |
| 775 | "*Non-nil if window system changes focus when you move the mouse. | 775 | "*Non-nil if window system changes focus when you move the mouse. |
| 776 | You should set this variable to tell Emacs how your window manager | 776 | You should set this variable to tell Emacs how your window manager |
| 777 | handles focus, since there is no way in general for Emacs to find out | 777 | handles focus, since there is no way in general for Emacs to find out |
| @@ -1192,17 +1192,43 @@ For character terminals, each character counts as a single pixel." | |||
| 1192 | (t | 1192 | (t |
| 1193 | (frame-width (if (framep display) display (selected-frame))))))) | 1193 | (frame-width (if (framep display) display (selected-frame))))))) |
| 1194 | 1194 | ||
| 1195 | (defcustom display-mm-dimensions-alist nil | ||
| 1196 | "Alist for specifying screen dimensions in millimeters. | ||
| 1197 | The dimensions will be used for `display-mm-height' and | ||
| 1198 | `display-mm-width' if defined for the respective display. | ||
| 1199 | |||
| 1200 | Each element of the alist has the form (display . (width . height)), | ||
| 1201 | e.g. (\":0.0\" . (287 . 215)). | ||
| 1202 | |||
| 1203 | If `display' equals t, it specifies dimensions for all graphical | ||
| 1204 | displays not explicitely specified." | ||
| 1205 | :version "22.1" | ||
| 1206 | :type '(alist :key-type (choice (string :tag "Display name") | ||
| 1207 | (const :tag "Default" t)) | ||
| 1208 | :value-type (cons :tag "Dimensions" | ||
| 1209 | (integer :tag "Width") | ||
| 1210 | (integer :tag "Height"))) | ||
| 1211 | :group 'frames) | ||
| 1212 | |||
| 1195 | (defun display-mm-height (&optional display) | 1213 | (defun display-mm-height (&optional display) |
| 1196 | "Return the height of DISPLAY's screen in millimeters. | 1214 | "Return the height of DISPLAY's screen in millimeters. |
| 1215 | System values can be overriden by `display-mm-dimensions-alist'. | ||
| 1197 | If the information is unavailable, value is nil." | 1216 | If the information is unavailable, value is nil." |
| 1198 | (and (memq (framep-on-display display) '(x w32 mac)) | 1217 | (and (memq (framep-on-display display) '(x w32 mac)) |
| 1199 | (x-display-mm-height display))) | 1218 | (or (cddr (assoc (or display (frame-parameter nil 'display)) |
| 1219 | display-mm-dimensions-alist)) | ||
| 1220 | (cddr (assoc t display-mm-dimensions-alist)) | ||
| 1221 | (x-display-mm-height display)))) | ||
| 1200 | 1222 | ||
| 1201 | (defun display-mm-width (&optional display) | 1223 | (defun display-mm-width (&optional display) |
| 1202 | "Return the width of DISPLAY's screen in millimeters. | 1224 | "Return the width of DISPLAY's screen in millimeters. |
| 1225 | System values can be overriden by `display-mm-dimensions-alist'. | ||
| 1203 | If the information is unavailable, value is nil." | 1226 | If the information is unavailable, value is nil." |
| 1204 | (and (memq (framep-on-display display) '(x w32 mac)) | 1227 | (and (memq (framep-on-display display) '(x w32 mac)) |
| 1205 | (x-display-mm-width display))) | 1228 | (or (cadr (assoc (or display (frame-parameter nil 'display)) |
| 1229 | display-mm-dimensions-alist)) | ||
| 1230 | (cadr (assoc t display-mm-dimensions-alist)) | ||
| 1231 | (x-display-mm-width display)))) | ||
| 1206 | 1232 | ||
| 1207 | (defun display-backing-store (&optional display) | 1233 | (defun display-backing-store (&optional display) |
| 1208 | "Return the backing store capability of DISPLAY's screen. | 1234 | "Return the backing store capability of DISPLAY's screen. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6927e3bfbac..63e7f43424d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,122 @@ | |||
| 1 | 2006-10-04 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-make-menu-bar): Clarify | ||
| 4 | gnus-summary-limit-to-articles. | ||
| 5 | |||
| 6 | 2006-10-04 Romain Francoise <romain@orebokech.com> | ||
| 7 | |||
| 8 | * gnus-util.el (gnus-alist-to-hashtable, gnus-hashtable-to-alist): | ||
| 9 | Moved here (and renamed) from gnus-registry.el. | ||
| 10 | |||
| 11 | * gnus-registry.el: Require gnus-util. | ||
| 12 | Use `gnus-alist-to-hashtable' and `gnus-hashtable-to-alist'. | ||
| 13 | |||
| 14 | 2006-10-04 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 15 | |||
| 16 | * pop3.el (pop3-authentication-scheme): Clarify doc. | ||
| 17 | (pop3-movemail): Warn about pop3-leave-mail-on-server. | ||
| 18 | |||
| 19 | 2006-10-04 Dave Love <fx@gnu.org> | ||
| 20 | |||
| 21 | * pop3.el (pop3-authentication-scheme): Add custom version. | ||
| 22 | |||
| 23 | 2006-10-04 Jesper Harder <harder@ifa.au.dk> | ||
| 24 | |||
| 25 | * pop3.el (pop3-leave-mail-on-server): Don't quote nil in | ||
| 26 | doc string. Improve doc string. | ||
| 27 | |||
| 28 | 2006-10-03 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 29 | |||
| 30 | * gnus-util.el (gnus-with-local-quit): New macro. | ||
| 31 | |||
| 32 | * gnus-demon.el (gnus-demon): Replace with-local-quit with it. | ||
| 33 | |||
| 34 | 2006-09-28 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 35 | |||
| 36 | * gmm-utils.el (gmm): Adjust custom version. | ||
| 37 | |||
| 38 | * mm-util.el (mm-charset-override-alist, mm-charset-eval-alist): Adjust | ||
| 39 | custom version. | ||
| 40 | |||
| 41 | * gnus-draft.el (gnus-draft-mode): Don't call `mml-mode'. | ||
| 42 | |||
| 43 | 2006-09-25 Chong Yidong <cyd@stupidchicken.com> | ||
| 44 | |||
| 45 | * gnus-demon.el (gnus-demon): Use with-local-quit to avoid hangs. | ||
| 46 | |||
| 47 | 2006-09-19 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> | ||
| 48 | |||
| 49 | * nnslashdot.el (nnslashdot-request-article): Update end-of-article | ||
| 50 | regexp. Articles containing quotation were cut prematurely. | ||
| 51 | |||
| 52 | 2006-09-16 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 53 | |||
| 54 | * message.el (message-cite-original-without-signature): Use nobody by | ||
| 55 | default for the value of From header. | ||
| 56 | (message-cite-original): Ditto. | ||
| 57 | (message-reply): Ditto. | ||
| 58 | |||
| 59 | 2006-09-09 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 60 | |||
| 61 | * pop3.el (pop3-leave-mail-on-server): Mention problem of duplicate | ||
| 62 | mails in the doc string. Add some URLs in comment. | ||
| 63 | |||
| 64 | 2006-09-07 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 65 | |||
| 66 | * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings): Fix | ||
| 67 | backslashes handling and the way to find boundaries of quoted strings. | ||
| 68 | |||
| 69 | 2006-09-06 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 70 | |||
| 71 | * gnus-art.el (gnus-button-regexp, gnus-button-marker-list) | ||
| 72 | (gnus-button-last): Move up. Convert comments into doc strings. | ||
| 73 | |||
| 74 | 2006-09-04 Chong Yidong <cyd@stupidchicken.com> | ||
| 75 | |||
| 76 | * message.el (message-send-mail-with-sendmail): Look for sendmail in | ||
| 77 | several common directories. | ||
| 78 | |||
| 79 | 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 80 | |||
| 81 | * gnus-art.el (article-decode-encoded-words): Make it fast. | ||
| 82 | |||
| 83 | 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 84 | |||
| 85 | * gnus-art.el (article-decode-encoded-words): Don't infloop in XEmacs. | ||
| 86 | |||
| 87 | * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' | ||
| 88 | in quoted string into `\'. | ||
| 89 | |||
| 90 | 2006-09-01 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 91 | |||
| 92 | * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings): | ||
| 93 | Use standard-syntax-table. | ||
| 94 | |||
| 95 | 2006-09-01 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 96 | |||
| 97 | * gnus-art.el (gnus-decode-address-function): New variable. | ||
| 98 | (article-decode-encoded-words): Use it to decode headers which are | ||
| 99 | assumed to contain addresses. | ||
| 100 | (gnus-mime-delete-part): Remove useless `or'. | ||
| 101 | |||
| 102 | * gnus-sum.el (gnus-decode-encoded-address-function): New variable. | ||
| 103 | (gnus-summary-from-or-to-or-newsgroups): Use it to decode To header. | ||
| 104 | (gnus-nov-parse-line): Use it to decode From header. | ||
| 105 | (gnus-get-newsgroup-headers): Ditto. | ||
| 106 | (gnus-summary-enter-digest-group): Use it to decode `to-address'. | ||
| 107 | |||
| 108 | * mail-parse.el (mail-decode-encoded-address-region): New alias. | ||
| 109 | (mail-decode-encoded-address-string): New alias. | ||
| 110 | |||
| 111 | * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings): | ||
| 112 | New function. | ||
| 113 | (rfc2047-encode-message-header, rfc2047-encode-region): Use it. | ||
| 114 | (rfc2047-strip-backslashes-in-quoted-strings): New fnction. | ||
| 115 | (rfc2047-decode-region): Use it; add optional argument `address-mime'. | ||
| 116 | (rfc2047-decode-string): Ditto. | ||
| 117 | (rfc2047-decode-address-region): New function. | ||
| 118 | (rfc2047-decode-address-string): New function. | ||
| 119 | |||
| 1 | 2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> | 120 | 2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> |
| 2 | 121 | ||
| 3 | [ Backported bug fix from No Gnus. ] | 122 | [ Backported bug fix from No Gnus. ] |
| @@ -389,10 +508,6 @@ | |||
| 389 | * gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an | 508 | * gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an |
| 390 | optional parameter. | 509 | optional parameter. |
| 391 | 510 | ||
| 392 | 2006-04-07 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 393 | |||
| 394 | * pgg-gpg.el: Revert to revision 7.15 to allow the use of gpg-agent. | ||
| 395 | |||
| 396 | 2006-04-06 Reiner Steib <Reiner.Steib@gmx.de> | 511 | 2006-04-06 Reiner Steib <Reiner.Steib@gmx.de> |
| 397 | 512 | ||
| 398 | * gnus-fun.el (gnus): Require it for gnus-directory. | 513 | * gnus-fun.el (gnus): Require it for gnus-directory. |
| @@ -1191,7 +1306,7 @@ | |||
| 1191 | as a buffer-local variable. This avoids creating truncated | 1306 | as a buffer-local variable. This avoids creating truncated |
| 1192 | dribble files as a result of a hang up, eg. | 1307 | dribble files as a result of a hang up, eg. |
| 1193 | 1308 | ||
| 1194 | 2005-11-04 Ken Manheimer <ken.manheimer@gmail.com> | 1309 | 2005-11-04 Ken Manheimer <ken.manheimer@gmail.com> |
| 1195 | 1310 | ||
| 1196 | * pgg-pgp.el (pgg-pgp-encrypt-region, pgg-pgp-decrypt-region) | 1311 | * pgg-pgp.el (pgg-pgp-encrypt-region, pgg-pgp-decrypt-region) |
| 1197 | (pgg-pgp-encrypt-symmetric-region, pgg-pgp-encrypt-symmetric) | 1312 | (pgg-pgp-encrypt-symmetric-region, pgg-pgp-encrypt-symmetric) |
| @@ -2826,7 +2941,7 @@ | |||
| 2826 | 2941 | ||
| 2827 | * gnus.el (gnus-group-startup-message): Search for gnus images in | 2942 | * gnus.el (gnus-group-startup-message): Search for gnus images in |
| 2828 | etc/images/gnus. | 2943 | etc/images/gnus. |
| 2829 | * mm-util.el (mm-find-charset-region): Likewise. | 2944 | * mm-util.el (mm-image-load-path): Likewise. |
| 2830 | * smiley.el (smiley-data-directory): Search for smilies in | 2945 | * smiley.el (smiley-data-directory): Search for smilies in |
| 2831 | etc/images/smilies. | 2946 | etc/images/smilies. |
| 2832 | 2947 | ||
| @@ -3935,7 +4050,7 @@ | |||
| 3935 | 4050 | ||
| 3936 | * gnus-sum.el (gnus-summary-insert-subject): Remove list identifiers. | 4051 | * gnus-sum.el (gnus-summary-insert-subject): Remove list identifiers. |
| 3937 | 4052 | ||
| 3938 | 2004-09-03 Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp> (tiny change) | 4053 | 2004-09-03 Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp> (tiny change) |
| 3939 | 4054 | ||
| 3940 | * spam-stat.el (spam-stat-reduce-size): Set spam-stat-dirty. | 4055 | * spam-stat.el (spam-stat-reduce-size): Set spam-stat-dirty. |
| 3941 | (spam-stat-save): Accept prefix argument. | 4056 | (spam-stat-save): Accept prefix argument. |
| @@ -4082,17 +4197,17 @@ | |||
| 4082 | 4197 | ||
| 4083 | * gnus-sum.el (gnus-newsgroup-variables): Doc fix. | 4198 | * gnus-sum.el (gnus-newsgroup-variables): Doc fix. |
| 4084 | 4199 | ||
| 4085 | 2004-08-26 YAGI Tatsuya <ynyaaa@ybb.ne.jp> (tiny change) | 4200 | 2004-08-26 YAGI Tatsuya <ynyaaa@ybb.ne.jp> (tiny change) |
| 4086 | 4201 | ||
| 4087 | * gnus-art.el (gnus-article-next-page): Fix the way to find a real | 4202 | * gnus-art.el (gnus-article-next-page): Fix the way to find a real |
| 4088 | end-of-buffer. | 4203 | end-of-buffer. |
| 4089 | 4204 | ||
| 4090 | 2004-08-26 Stefan Wiens <s.wi@gmx.net> (tiny change) | 4205 | 2004-08-26 Stefan Wiens <s.wi@gmx.net> (tiny change) |
| 4091 | 4206 | ||
| 4092 | * gnus-sum.el (gnus-read-header): Don't remove a header for the | 4207 | * gnus-sum.el (gnus-read-header): Don't remove a header for the |
| 4093 | parent article of a sparse article in the thread hashtb. | 4208 | parent article of a sparse article in the thread hashtb. |
| 4094 | 4209 | ||
| 4095 | 2004-08-26 David Hedbor <dhedbor@real.com> (tiny change) | 4210 | 2004-08-26 David Hedbor <dhedbor@real.com> (tiny change) |
| 4096 | 4211 | ||
| 4097 | * nnmail.el (nnmail-split-lowercase-expanded): New user option. | 4212 | * nnmail.el (nnmail-split-lowercase-expanded): New user option. |
| 4098 | (nnmail-expand-newtext): Lowercase expanded entries if | 4213 | (nnmail-expand-newtext): Lowercase expanded entries if |
| @@ -4288,7 +4403,7 @@ | |||
| 4288 | * gnus-msg.el (gnus-summary-followup-with-original): | 4403 | * gnus-msg.el (gnus-summary-followup-with-original): |
| 4289 | Document yanking of region when active. | 4404 | Document yanking of region when active. |
| 4290 | 4405 | ||
| 4291 | 2004-04-13 Kevin Greiner <kgreiner@xpediantsolutions.com> | 4406 | 2004-04-13 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 4292 | 4407 | ||
| 4293 | * gnus-agent.el: Merged 7.3 through 7.7 updates into branch. | 4408 | * gnus-agent.el: Merged 7.3 through 7.7 updates into branch. |
| 4294 | Revision 7.2 changes excluded to maintain compatibility with all | 4409 | Revision 7.2 changes excluded to maintain compatibility with all |
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 50b978e7e75..14b4c23c38a 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2004-01-04 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 1 | 2004-01-04 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2 | 2 | ||
| 3 | * gnus.el: Gnus v5.10.6 is released. | 3 | * gnus.el: Gnus v5.10.6 is released. |
| 4 | 4 | ||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | * gnus.el (gnus-version-number): Bump. | 11 | * gnus.el (gnus-version-number): Bump. |
| 12 | 12 | ||
| 13 | 2004-01-04 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 13 | 2004-01-04 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 14 | 14 | ||
| 15 | * gnus.el: Gnus v5.10.5 is released. | 15 | * gnus.el: Gnus v5.10.5 is released. |
| 16 | 16 | ||
| @@ -58,7 +58,7 @@ | |||
| 58 | 58 | ||
| 59 | * gnus.el (gnus-version-number): Bump. | 59 | * gnus.el (gnus-version-number): Bump. |
| 60 | 60 | ||
| 61 | 2004-01-03 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 61 | 2004-01-03 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 62 | 62 | ||
| 63 | * gnus.el: Gnus v5.10.4 is released. | 63 | * gnus.el: Gnus v5.10.4 is released. |
| 64 | 64 | ||
| @@ -81,10 +81,9 @@ | |||
| 81 | * gnus-nocem.el (gnus-nocem-enter-article): Use the real group | 81 | * gnus-nocem.el (gnus-nocem-enter-article): Use the real group |
| 82 | hashtb (tiny patch). | 82 | hashtb (tiny patch). |
| 83 | 83 | ||
| 84 | 2004-01-02 Kai Grossjohann <kai@emptydomain.de> | 84 | 2004-01-02 Michael Albinus <Michael.Albinus@alcatel.de> |
| 85 | 85 | ||
| 86 | * nnml.el (nnml-save-mail): Grok compressed articles. From | 86 | * nnml.el (nnml-save-mail): Grok compressed articles. |
| 87 | Michael Albinus <Michael.Albinus@alcatel.de>. | ||
| 88 | 87 | ||
| 89 | 2004-01-02 Teodor Zlatanov <tzz@lifelogs.com> | 88 | 2004-01-02 Teodor Zlatanov <tzz@lifelogs.com> |
| 90 | 89 | ||
| @@ -144,20 +143,16 @@ | |||
| 144 | (gnus-summary-goto-article): Allow `%40'. | 143 | (gnus-summary-goto-article): Allow `%40'. |
| 145 | (gnus-summary-refer-article): Convert `%40' to `@'. | 144 | (gnus-summary-refer-article): Convert `%40' to `@'. |
| 146 | 145 | ||
| 147 | 2003-12-30 Simon Josefsson <jas@extundo.com> | 146 | 2003-12-30 Arne J,Ax(Brgensen <arne@arnested.dk> |
| 148 | 147 | ||
| 149 | * smime.el (smime-crl-check): New. | 148 | * smime.el (smime-crl-check): New. |
| 150 | (smime-verify-region): Use it. From Arne J,Ax(Brgensen | 149 | (smime-verify-region): Use it. |
| 151 | <arne@arnested.dk> in <87llpk9v5q.fsf@seamus.arnested.dk> (tiny | ||
| 152 | change). | ||
| 153 | 150 | ||
| 154 | 2003-12-30 Reiner Steib <Reiner.Steib@gmx.de> | 151 | 2003-12-30 Reiner Steib <Reiner.Steib@gmx.de> |
| 155 | 152 | ||
| 156 | * gnus-score.el (gnus-score-edit-file-at-point): Consider the | 153 | (gnus-score-find-trace): Use gnus-score-edit-file-at-point. Added |
| 157 | whole match element. From Karl Pfl,Ad(Bsterer <sigurd@12move.de>. | 154 | `f' and `t' commands, added quick help. With some suggestions |
| 158 | (gnus-score-find-trace): Use it. Added `f' and `t' commands, | 155 | from Karl Pfl,Ad(Bsterer <sigurd@12move.de>. |
| 159 | added quick help. With some suggestions from Karl Pfl,Ad(Bsterer | ||
| 160 | <sigurd@12move.de>. | ||
| 161 | 156 | ||
| 162 | * gnus-util.el (gnus-emacs-version): Added doc-string. | 157 | * gnus-util.el (gnus-emacs-version): Added doc-string. |
| 163 | 158 | ||
| @@ -165,6 +160,11 @@ | |||
| 165 | (mml-attach-file): Use it. | 160 | (mml-attach-file): Use it. |
| 166 | (mml-preview): Added MIME preview to gnus-buffers. | 161 | (mml-preview): Added MIME preview to gnus-buffers. |
| 167 | 162 | ||
| 163 | 2003-12-30 Karl Pfl,Ad(Bsterer <sigurd@12move.de> | ||
| 164 | |||
| 165 | * gnus-score.el (gnus-score-edit-file-at-point): Consider the | ||
| 166 | whole match element. | ||
| 167 | |||
| 168 | 2003-12-30 Jesper Harder <harder@ifa.au.dk> | 168 | 2003-12-30 Jesper Harder <harder@ifa.au.dk> |
| 169 | 169 | ||
| 170 | * gnus-sum.el (gnus-summary-make-menu-bar): Add ellipses. | 170 | * gnus-sum.el (gnus-summary-make-menu-bar): Add ellipses. |
| @@ -179,7 +179,7 @@ | |||
| 179 | (gnus-secondary-method-p): Extend servers to methods before comparing. | 179 | (gnus-secondary-method-p): Extend servers to methods before comparing. |
| 180 | (gnus-secondary-method-p): Revert. | 180 | (gnus-secondary-method-p): Revert. |
| 181 | 181 | ||
| 182 | 2003-12-30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 182 | 2003-12-30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 183 | 183 | ||
| 184 | * gnus.el: Gnus v5.10.3 is released. | 184 | * gnus.el: Gnus v5.10.3 is released. |
| 185 | 185 | ||
| @@ -189,7 +189,7 @@ | |||
| 189 | Suggested by Steinar Bang <sb@dod.no>. | 189 | Suggested by Steinar Bang <sb@dod.no>. |
| 190 | (gnus-agent-auto-agentize-methods): Customize. | 190 | (gnus-agent-auto-agentize-methods): Customize. |
| 191 | 191 | ||
| 192 | 2003-12-29 Kevin Greiner <kgreiner@xpediantsolutions.com> | 192 | 2003-12-29 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 193 | * gnus.el (gnus-server-to-method): Fixed bug in 2003-12-22 | 193 | * gnus.el (gnus-server-to-method): Fixed bug in 2003-12-22 |
| 194 | check-in. | 194 | check-in. |
| 195 | 195 | ||
| @@ -210,10 +210,9 @@ | |||
| 210 | * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before | 210 | * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before |
| 211 | encrypting. | 211 | encrypting. |
| 212 | 212 | ||
| 213 | 2003-12-28 Jesper Harder <harder@ifa.au.dk> | 213 | 2003-12-28 Ivan Boldyrev <boldyrev@uiggm.nsc.ru> (tiny change). |
| 214 | 214 | ||
| 215 | * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding. | 215 | * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding. |
| 216 | From Ivan Boldyrev <boldyrev@uiggm.nsc.ru> (tiny change). | ||
| 217 | 216 | ||
| 218 | 2003-12-26 Katsumi Yamaoka <yamaoka@jpl.org> | 217 | 2003-12-26 Katsumi Yamaoka <yamaoka@jpl.org> |
| 219 | 218 | ||
| @@ -243,7 +242,7 @@ | |||
| 243 | * dgnushack.el (dgnushack-compile): Increase the value for | 242 | * dgnushack.el (dgnushack-compile): Increase the value for |
| 244 | max-specpdl-size when compiling Gnus with Emacs 20. | 243 | max-specpdl-size when compiling Gnus with Emacs 20. |
| 245 | 244 | ||
| 246 | 2003-12-22 Kevin Greiner <kgreiner@xpediantsolutions.com> | 245 | 2003-12-22 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 247 | * gnus-int.el (gnus-open-server): Fixed the server status such | 246 | * gnus-int.el (gnus-open-server): Fixed the server status such |
| 248 | that an agentized server, when opened offline, has a status of | 247 | that an agentized server, when opened offline, has a status of |
| 249 | offline. Also fixes bug whereby the agent's backend was called | 248 | offline. Also fixes bug whereby the agent's backend was called |
| @@ -268,7 +267,7 @@ | |||
| 268 | * gnus-agent.el (gnus-agent-read-agentview): Use | 267 | * gnus-agent.el (gnus-agent-read-agentview): Use |
| 269 | car-less-than-car. | 268 | car-less-than-car. |
| 270 | 269 | ||
| 271 | 2003-12-20 Artem Chuprina <ran@ran.pp.ru> (tiny change) | 270 | 2003-12-20 Artem Chuprina <ran@ran.pp.ru> (tiny change) |
| 272 | 271 | ||
| 273 | * message.el (message-yank-buffer): Bind message-reply-buffer to | 272 | * message.el (message-yank-buffer): Bind message-reply-buffer to |
| 274 | a buffer rather than a string. | 273 | a buffer rather than a string. |
| @@ -379,7 +378,7 @@ | |||
| 379 | 378 | ||
| 380 | * pgg.el (pgg-run-at-time): Ditto. | 379 | * pgg.el (pgg-run-at-time): Ditto. |
| 381 | 380 | ||
| 382 | 2003-12-11 Kevin Greiner <kgreiner@xpediantsolutions.com> | 381 | 2003-12-11 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 383 | 382 | ||
| 384 | * gnus-agent.el (gnus-agent-possibly-alter-active): New Function. | 383 | * gnus-agent.el (gnus-agent-possibly-alter-active): New Function. |
| 385 | (gnus-agent-regenerate-group): When necessary, alter the group's | 384 | (gnus-agent-regenerate-group): When necessary, alter the group's |
| @@ -401,17 +400,14 @@ | |||
| 401 | 400 | ||
| 402 | * message.el (message-get-reply-headers): Narrow to headers. | 401 | * message.el (message-get-reply-headers): Narrow to headers. |
| 403 | 402 | ||
| 404 | 2003-12-10 Teodor Zlatanov <tzz@lifelogs.com> | 403 | 2003-12-10 L,Bu(Brentey K,Ba(Broly <lorentey@elte.hu> |
| 405 | 404 | ||
| 406 | * spam.el (spam-disable-spam-split-during-ham-respool): new | 405 | * spam.el (spam-disable-spam-split-during-ham-respool): New |
| 407 | variable. From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly) | 406 | variable. |
| 408 | (spam-ham-copy-or-move-routine): respect | 407 | (spam-ham-copy-or-move-routine): Respect |
| 409 | spam-disable-spam-split-during-ham-respool. From | 408 | spam-disable-spam-split-during-ham-respool. |
| 410 | lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly) | 409 | (spam-split-disabled): New variable. |
| 411 | (spam-split-disabled): new variable. From | 410 | (spam-split): Respect spam-split-disabled. |
| 412 | lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly) | ||
| 413 | (spam-split): respect spam-split-disabled. From | ||
| 414 | lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly) | ||
| 415 | 411 | ||
| 416 | 2003-12-10 Katsumi Yamaoka <yamaoka@jpl.org> | 412 | 2003-12-10 Katsumi Yamaoka <yamaoka@jpl.org> |
| 417 | 413 | ||
| @@ -427,19 +423,21 @@ | |||
| 427 | input. | 423 | input. |
| 428 | (pgg-decode-armor-region): Don't parse packet if decoding fail. | 424 | (pgg-decode-armor-region): Don't parse packet if decoding fail. |
| 429 | 425 | ||
| 430 | 2003-12-09 Teodor Zlatanov <tzz@lifelogs.com> | 426 | 2003-12-09 L,Bu(Brentey K,Ba(Broly <lorentey@elte.hu> |
| 431 | 427 | ||
| 432 | * spam.el (spam-check-bogofilter): run in the correct buffer. | 428 | * spam.el (spam-check-bogofilter): run in the correct buffer. |
| 433 | From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly). | 429 | |
| 434 | (spam-bogofilter-database-directory): correct customization | 430 | 2003-12-09 Xavier Maillard <zedek@gnu-rox.org> |
| 435 | group. From Xavier Maillard <zedek@gnu-rox.org>. | 431 | |
| 432 | * spam.el (spam-bogofilter-database-directory): correct | ||
| 433 | customization group. | ||
| 436 | 434 | ||
| 437 | 2003-12-09 Per Abrahamsen <abraham@dina.kvl.dk> | 435 | 2003-12-09 Per Abrahamsen <abraham@dina.kvl.dk> |
| 438 | 436 | ||
| 439 | * nnmail.el (nnmail-lazy, nnmail-split-fancy): New widgets. | 437 | * nnmail.el (nnmail-lazy, nnmail-split-fancy): New widgets. |
| 440 | (nnmail-split-fancy): Use it. | 438 | (nnmail-split-fancy): Use it. |
| 441 | 439 | ||
| 442 | 2003-12-08 Joel Ray Holveck <joelh@piquan.org> (tiny change) | 440 | 2003-12-08 Joel Ray Holveck <joelh@piquan.org> (tiny change) |
| 443 | 441 | ||
| 444 | * gnus-sum.el (gnus-summary-save-parts-1): Consider the "name" | 442 | * gnus-sum.el (gnus-summary-save-parts-1): Consider the "name" |
| 445 | parameter of Content-Type. | 443 | parameter of Content-Type. |
| @@ -509,32 +507,32 @@ | |||
| 509 | * gnus-util.el: Require alist and provide tm-view when compiling | 507 | * gnus-util.el: Require alist and provide tm-view when compiling |
| 510 | with XEmacs. | 508 | with XEmacs. |
| 511 | 509 | ||
| 512 | 2003-12-03 Steve Youngs <sryoungs@bigpond.net.au> | 510 | 2003-12-03 Jerry James <james@xemacs.org> (tiny change) |
| 513 | 511 | ||
| 514 | * gnus-xmas.el: Add autoloads for macros defined in gnus.el. | 512 | * gnus-xmas.el: Add autoloads for macros defined in gnus.el. |
| 515 | From Jerry James <james@xemacs.org>. | ||
| 516 | 513 | ||
| 517 | * gnus-util.el: Get rmail definitions when compiling. | 514 | * gnus-util.el: Get rmail definitions when compiling. |
| 518 | From Jerry James <james@xemacs.org>. | ||
| 519 | 515 | ||
| 520 | * dns.el: Require gnus-xmas at compile time instead of trying to | 516 | * dns.el: Require gnus-xmas at compile time instead of trying to |
| 521 | autoload `gnus-xmas-open-network-stream' because it wasn't picking | 517 | autoload `gnus-xmas-open-network-stream' because it wasn't picking |
| 522 | up the macro. | 518 | up the macro. |
| 523 | From Jerry James <james@xemacs.org>. | ||
| 524 | 519 | ||
| 525 | 2003-12-01 Kevin Greiner <kgreiner@xpediantsolutions.com> | 520 | 2003-12-01 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 521 | |||
| 526 | * gnus-agent.el (gnus-agent-consider-all-articles): Updated | 522 | * gnus-agent.el (gnus-agent-consider-all-articles): Updated |
| 527 | docstring. | 523 | docstring. |
| 528 | (gnus-predicate-implies-unread, gnus-predicate-implies-unread-1): | 524 | (gnus-predicate-implies-unread, gnus-predicate-implies-unread-1): |
| 529 | Fixed implementation such that the predicate `true' no longer | 525 | Fixed implementation such that the predicate `true' no longer |
| 530 | evaluates to t. | 526 | evaluates to t. |
| 531 | 527 | ||
| 532 | 2003-12-01 Teodor Zlatanov <tzz@lifelogs.com> | 528 | 2003-12-01 Adrian Lanz <lanz@fowi.ethz.ch> (tiny change) |
| 533 | 529 | ||
| 534 | * spam.el (spam-check-bogofilter): check the bogofilter headers | 530 | * spam.el (spam-check-bogofilter): check the bogofilter headers |
| 535 | AFTER the save-excursion scope is over. From Adrian Lanz | 531 | AFTER the save-excursion scope is over. |
| 536 | <lanz@fowi.ethz.ch>. | 532 | |
| 537 | (spam-fetch-field-message-id-fast): doc fix | 533 | 2003-12-01 Teodor Zlatanov <tzz@lifelogs.com> |
| 534 | |||
| 535 | * spam.el (spam-fetch-field-message-id-fast): Doc fix | ||
| 538 | 536 | ||
| 539 | 2003-12-01 Simon Josefsson <jas@extundo.com> | 537 | 2003-12-01 Simon Josefsson <jas@extundo.com> |
| 540 | 538 | ||
| @@ -549,24 +547,26 @@ | |||
| 549 | (gnus-agent-expire-group-1): Only print a message for an article | 547 | (gnus-agent-expire-group-1): Only print a message for an article |
| 550 | when there actually was something done to it. | 548 | when there actually was something done to it. |
| 551 | 549 | ||
| 550 | * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Custom fix. | ||
| 551 | |||
| 552 | 2003-11-30 Kenichi Handa <handa@m17n.org> | ||
| 553 | |||
| 552 | * mm-util.el (mm-enable-multibyte): Call set-buffer-multibyte with | 554 | * mm-util.el (mm-enable-multibyte): Call set-buffer-multibyte with |
| 553 | 'to argument. Fixes something or other in Emacs 22, and is | 555 | 'to argument. Fixes something or other in Emacs 22, and is |
| 554 | backwards compatible. From Kenichi Handa <handa@m17n.org>. | 556 | backwards compatible. |
| 555 | |||
| 556 | * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Custom fix. | ||
| 557 | 557 | ||
| 558 | 2003-11-30 Lars Magne Ingebrigtsen <larsi@gnus.org> | 558 | 2003-11-30 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 559 | 559 | ||
| 560 | * gnus-agent.el (gnus-agent-covered-methods): Remove nil methods. | 560 | * gnus-agent.el (gnus-agent-covered-methods): Remove nil methods. |
| 561 | 561 | ||
| 562 | 2003-11-29 Kevin Greiner <kgreiner@xpediantsolutions.com> | 562 | 2003-11-29 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 563 | * gnus-start.el (gnus-activate-group): The active range of the | 563 | * gnus-start.el (gnus-activate-group): The active range of the |
| 564 | group must include the articles known to the agent. | 564 | group must include the articles known to the agent. |
| 565 | 565 | ||
| 566 | * gnus.el (gnus-agent-method-p): Accept a server name as the | 566 | * gnus.el (gnus-agent-method-p): Accept a server name as the |
| 567 | method being tested. | 567 | method being tested. |
| 568 | 568 | ||
| 569 | 2003-11-29 Alexander Kreuzer <alex@freesources.org> (tiny change) | 569 | 2003-11-29 Alexander Kreuzer <alex@freesources.org> (tiny change) |
| 570 | 570 | ||
| 571 | * nnrss.el (nnrss-check-group): Set xml when nnrss-use-local is t. | 571 | * nnrss.el (nnrss-check-group): Set xml when nnrss-use-local is t. |
| 572 | 572 | ||
| @@ -669,7 +669,7 @@ | |||
| 669 | 669 | ||
| 670 | * dgnushack.el (mapc): Add the compiler macro for Emacs 20. | 670 | * dgnushack.el (mapc): Add the compiler macro for Emacs 20. |
| 671 | 671 | ||
| 672 | 2003-11-24 Kevin Greiner <kgreiner@xpediantsolutions.com> | 672 | 2003-11-24 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 673 | * gnus-srvr.el (gnus-server-insert-server-line): The server names | 673 | * gnus-srvr.el (gnus-server-insert-server-line): The server names |
| 674 | used in gnus-agent are different (for example, the native server | 674 | used in gnus-agent are different (for example, the native server |
| 675 | uses the alias "native") from the names in gnus-srvr. | 675 | uses the alias "native") from the names in gnus-srvr. |
| @@ -681,7 +681,7 @@ | |||
| 681 | new gnus-server-named-server function to get gnus-agent compatible | 681 | new gnus-server-named-server function to get gnus-agent compatible |
| 682 | names from the server buffer. | 682 | names from the server buffer. |
| 683 | 683 | ||
| 684 | 2003-11-20 Kevin Greiner <kgreiner@xpediantsolutions.com> | 684 | 2003-11-20 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 685 | 685 | ||
| 686 | * gnus.el (gnus-agent-covered-methods): Documented use of | 686 | * gnus.el (gnus-agent-covered-methods): Documented use of |
| 687 | named servers, not methods, to identity agentized groups. | 687 | named servers, not methods, to identity agentized groups. |
| @@ -762,12 +762,12 @@ | |||
| 762 | * gnus-score.el (gnus-decay-score): Return a surely smaller value | 762 | * gnus-score.el (gnus-decay-score): Return a surely smaller value |
| 763 | than the argument in XEmacs. | 763 | than the argument in XEmacs. |
| 764 | 764 | ||
| 765 | 2003-11-18 Reiner Steib <Reiner.Steib@gmx.de> | 765 | 2003-11-18 Sam Steingold <sds@gnu.org> |
| 766 | 766 | ||
| 767 | * message.el (message-insert-to): Don't use `gnus-message'. | 767 | * message.el (message-insert-to): Don't use `gnus-message'. |
| 768 | (message-header-synonyms): New variable. | 768 | (message-header-synonyms): New variable. |
| 769 | (message-carefully-insert-headers): Use it (check for synonyms). | 769 | (message-carefully-insert-headers): Use it (check for synonyms). |
| 770 | Added doc-string. From Sam Steingold <sds@gnu.org>. | 770 | Added doc-string. |
| 771 | 771 | ||
| 772 | 2003-11-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | 772 | 2003-11-17 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 773 | 773 | ||
| @@ -848,13 +848,16 @@ | |||
| 848 | 848 | ||
| 849 | 2003-11-10 Reiner Steib <Reiner.Steib@gmx.de> | 849 | 2003-11-10 Reiner Steib <Reiner.Steib@gmx.de> |
| 850 | 850 | ||
| 851 | * message.el (message-insert-to): Do error out when the user | 851 | * message.el (message-mode-field-menu): Moved some entries, added |
| 852 | requested no Cc. Don't insert empty To. Can be added to | ||
| 853 | `message-setup-hook' now. From Sam Steingold <sds@gnu.org>. | ||
| 854 | (message-mode-field-menu): Moved some entries, added | ||
| 855 | `message-insert-wide-reply'. | 852 | `message-insert-wide-reply'. |
| 856 | (message-change-subject): Fixed comment. | 853 | (message-change-subject): Fixed comment. |
| 857 | 854 | ||
| 855 | 2003-11-10 Sam Steingold <sds@gnu.org> | ||
| 856 | |||
| 857 | * message.el (message-insert-to): Do error out when the user | ||
| 858 | requested no Cc. Don't insert empty To. Can be added to | ||
| 859 | `message-setup-hook' now. | ||
| 860 | |||
| 858 | 2003-11-10 Simon Josefsson <jas@extundo.com> | 861 | 2003-11-10 Simon Josefsson <jas@extundo.com> |
| 859 | 862 | ||
| 860 | * pgg-def.el (pgg-encrypt-for-me): Change default from nil to t. | 863 | * pgg-def.el (pgg-encrypt-for-me): Change default from nil to t. |
| @@ -865,13 +868,12 @@ | |||
| 865 | key id too (for decryption). | 868 | key id too (for decryption). |
| 866 | (pgg-gpg-sign-region): Likewise. | 869 | (pgg-gpg-sign-region): Likewise. |
| 867 | 870 | ||
| 868 | 2003-11-09 Simon Josefsson <jas@extundo.com> | 871 | 2003-11-09 Satyaki Das <satyakid@stanford.edu> |
| 869 | 872 | ||
| 870 | * pgg-gpg.el (pgg-gpg-all-secret-keys): New variable. | 873 | * pgg-gpg.el (pgg-gpg-all-secret-keys): New variable. |
| 871 | (pgg-gpg-lookup-all-secret-keys): New function. | 874 | (pgg-gpg-lookup-all-secret-keys): New function. |
| 872 | (pgg-gpg-select-matching-key): Likewise. | 875 | (pgg-gpg-select-matching-key): Likewise. |
| 873 | (pgg-gpg-decrypt-region): Use new functions. From Satyaki Das | 876 | (pgg-gpg-decrypt-region): Use new functions. |
| 874 | <satyakid@stanford.edu>. | ||
| 875 | 877 | ||
| 876 | 2003-11-07 Teodor Zlatanov <tzz@lifelogs.com> | 878 | 2003-11-07 Teodor Zlatanov <tzz@lifelogs.com> |
| 877 | 879 | ||
| @@ -1322,8 +1324,9 @@ | |||
| 1322 | * gnus-sum.el (gnus-summary-respool-query): Don't narrow to head, | 1324 | * gnus-sum.el (gnus-summary-respool-query): Don't narrow to head, |
| 1323 | it's done by nnmail-article-group. | 1325 | it's done by nnmail-article-group. |
| 1324 | 1326 | ||
| 1327 | 2003-10-12 Mark Hood <markhood@speakeasy.net> (tiny change) | ||
| 1328 | |||
| 1325 | * gnus-uu.el (gnus-uu-grab-articles): Fix misplaced parens. | 1329 | * gnus-uu.el (gnus-uu-grab-articles): Fix misplaced parens. |
| 1326 | From Mark Hood <markhood@speakeasy.net> (tiny change) | ||
| 1327 | 1330 | ||
| 1328 | 2003-10-10 Jesper Harder <harder@ifa.au.dk> | 1331 | 2003-10-10 Jesper Harder <harder@ifa.au.dk> |
| 1329 | 1332 | ||
| @@ -1387,10 +1390,10 @@ | |||
| 1387 | 1390 | ||
| 1388 | * spam.el (spam-install-hooks-function): Added Autoload cookie. | 1391 | * spam.el (spam-install-hooks-function): Added Autoload cookie. |
| 1389 | 1392 | ||
| 1390 | 2003-10-02 Jesper Harder <harder@ifa.au.dk> | 1393 | 2003-10-02 Michael Shields <shields@msrl.com> |
| 1391 | 1394 | ||
| 1392 | * pgg-def.el (pgg-default-keyserver-address): Change to | 1395 | * pgg-def.el (pgg-default-keyserver-address): Change to |
| 1393 | subkeys.pgp.net. From Michael Shields <shields@msrl.com> | 1396 | subkeys.pgp.net. |
| 1394 | 1397 | ||
| 1395 | 2003-10-01 Simon Josefsson <jas@extundo.com> | 1398 | 2003-10-01 Simon Josefsson <jas@extundo.com> |
| 1396 | 1399 | ||
| @@ -1464,19 +1467,21 @@ | |||
| 1464 | 1467 | ||
| 1465 | * gnus.el (gnus-group-charter-alist): Update. | 1468 | * gnus.el (gnus-group-charter-alist): Update. |
| 1466 | 1469 | ||
| 1470 | 2003-09-10 Eric Knauel <knauel@informatik.uni-tuebingen.de> | ||
| 1471 | |||
| 1472 | * spam-report.el: Use mm-url.el functions for external URL loading | ||
| 1473 | when the built-in HTTP GET is insufficient (e.g. proxies are in | ||
| 1474 | the way). | ||
| 1475 | |||
| 1467 | 2003-09-10 Teodor Zlatanov <tzz@lifelogs.com> | 1476 | 2003-09-10 Teodor Zlatanov <tzz@lifelogs.com> |
| 1468 | 1477 | ||
| 1469 | * spam-report.el: use mm-url.el functions for external URL | 1478 | * spam-report.el (spam-report-url-ping-function): New option, |
| 1470 | loading when the built-in HTTP GET is insufficient (e.g. proxies | 1479 | defaults to the built-in HTTP GET (spam-report-url-ping-plain). |
| 1471 | are in the way). From Eric Knauel | 1480 | (spam-report-url-ping): Call spam-report-url-ping-function. |
| 1472 | <knauel@informatik.uni-tuebingen.de>. | 1481 | (spam-report-url-ping-plain): New function, does what |
| 1473 | (spam-report-url-ping-function): new option, defaults to the | 1482 | spam-report-url-ping used to do. |
| 1474 | built-in HTTP GET (spam-report-url-ping-plain) | 1483 | (spam-report-url-ping-mm-url): Function that delegates to |
| 1475 | (spam-report-url-ping): calls spam-report-url-ping-function now | 1484 | mm-url.el (autoloaded). |
| 1476 | (spam-report-url-ping-plain): new function, does what | ||
| 1477 | spam-report-url-ping used to do | ||
| 1478 | (spam-report-url-ping-mm-url): function that delegates to | ||
| 1479 | mm-url.el (autoloaded) | ||
| 1480 | 1485 | ||
| 1481 | 2003-09-08 Teodor Zlatanov <tzz@lifelogs.com> | 1486 | 2003-09-08 Teodor Zlatanov <tzz@lifelogs.com> |
| 1482 | 1487 | ||
| @@ -1577,12 +1582,11 @@ | |||
| 1577 | (mml-insert-mime-headers): Use it. Based on (tiny) patch from | 1582 | (mml-insert-mime-headers): Use it. Based on (tiny) patch from |
| 1578 | Lars Balker Rasmussen <lars@balker.org>. | 1583 | Lars Balker Rasmussen <lars@balker.org>. |
| 1579 | 1584 | ||
| 1580 | 2003-08-30 Simon Josefsson <jas@extundo.com> | 1585 | 2003-08-30 Gaute Strokkenes <gs234@srcf.ucam.org> (tiny change) |
| 1581 | 1586 | ||
| 1582 | * mail-source.el (mail-source-fetch-imap): Pass correct buffer to | 1587 | * mail-source.el (mail-source-fetch-imap): Pass correct buffer to |
| 1583 | imap-open, reverts 2003-03-17 change. Reverse remove before | 1588 | imap-open, reverts 2003-03-17 change. Reverse remove before |
| 1584 | calling gnus-compress-sequence. From Gaute Strokkenes | 1589 | calling gnus-compress-sequence. |
| 1585 | <gs234@srcf.ucam.org> (tiny change). | ||
| 1586 | 1590 | ||
| 1587 | 2003-08-29 Simon Josefsson <jas@extundo.com> | 1591 | 2003-08-29 Simon Josefsson <jas@extundo.com> |
| 1588 | 1592 | ||
| @@ -1602,11 +1606,10 @@ | |||
| 1602 | the files it may be using. Reported by David Coe | 1606 | the files it may be using. Reported by David Coe |
| 1603 | <davidc@debian.org>. | 1607 | <davidc@debian.org>. |
| 1604 | 1608 | ||
| 1605 | 2003-08-27 Jesper Harder <harder@ifa.au.dk> | 1609 | 2003-08-27 Vagn Johansen <v@johansen.mail.dk> (tiny change) |
| 1606 | 1610 | ||
| 1607 | * gnus-cache.el (gnus-cache-generate-active): Fix bug in | 1611 | * gnus-cache.el (gnus-cache-generate-active): Fix bug in |
| 1608 | replacement. From Vagn Johansen <v@johansen.mail.dk> (tiny | 1612 | replacement. |
| 1609 | change). | ||
| 1610 | 1613 | ||
| 1611 | 2003-08-25 Katsumi Yamaoka <yamaoka@jpl.org> | 1614 | 2003-08-25 Katsumi Yamaoka <yamaoka@jpl.org> |
| 1612 | 1615 | ||
| @@ -1712,10 +1715,9 @@ | |||
| 1712 | * gnus.el (gnus-refer-article-method): Ditto. | 1715 | * gnus.el (gnus-refer-article-method): Ditto. |
| 1713 | * message.el (message-courtesy-message): Ditto. | 1716 | * message.el (message-courtesy-message): Ditto. |
| 1714 | 1717 | ||
| 1715 | 2003-08-06 Jesper Harder <harder@ifa.au.dk> | 1718 | 2003-08-06 Chunyu Wang <spr@db.cs.hit.edu.cn> (tiny patch) |
| 1716 | 1719 | ||
| 1717 | * gnus-art.el (gnus-header-face-alist): Fix "Newsgroups" entry. | 1720 | * gnus-art.el (gnus-header-face-alist): Fix "Newsgroups" entry. |
| 1718 | From Chunyu Wang <spr@db.cs.hit.edu.cn> (tiny patch) | ||
| 1719 | 1721 | ||
| 1720 | 2003-08-05 Katsumi Yamaoka <yamaoka@jpl.org> | 1722 | 2003-08-05 Katsumi Yamaoka <yamaoka@jpl.org> |
| 1721 | 1723 | ||
| @@ -1841,8 +1843,7 @@ | |||
| 1841 | * imap.el (imap-arrival-filter): Fix test for missing process | 1843 | * imap.el (imap-arrival-filter): Fix test for missing process |
| 1842 | buffer. | 1844 | buffer. |
| 1843 | 1845 | ||
| 1844 | 2003-07-09 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 1846 | 2003-07-09 Gaute B Strokkenes <gs234@cam.ac.uk> (tiny patch). |
| 1845 | From Gaute B Strokkenes <gs234@cam.ac.uk> (tiny patch). | ||
| 1846 | 1847 | ||
| 1847 | * imap.el (imap-wait-for-tag): Clarify comment. Use timeout zero | 1848 | * imap.el (imap-wait-for-tag): Clarify comment. Use timeout zero |
| 1848 | for second, after-process-has-died, accept-process-output. | 1849 | for second, after-process-has-died, accept-process-output. |
| @@ -1898,25 +1899,25 @@ | |||
| 1898 | (message-canlock-generate) | 1899 | (message-canlock-generate) |
| 1899 | (message-generate-new-buffer-clone-locals): Docstring fixes. | 1900 | (message-generate-new-buffer-clone-locals): Docstring fixes. |
| 1900 | 1901 | ||
| 1901 | 2003-07-07 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 1902 | 2003-07-07 Gaute B Strokkenes <gs234@cam.ac.uk> (tiny patch) |
| 1902 | 1903 | ||
| 1903 | * imap.el (imap-wait-for-tag): After the process has died, look | 1904 | * imap.el (imap-wait-for-tag): After the process has died, look |
| 1904 | for more output still pending. From Gaute B Strokkenes | 1905 | for more output still pending. |
| 1905 | <gs234@cam.ac.uk> (tiny patch). | ||
| 1906 | 1906 | ||
| 1907 | 2003-07-07 Teodor Zlatanov <tzz@lifelogs.com> | 1907 | 2003-07-07 Teodor Zlatanov <tzz@lifelogs.com> |
| 1908 | 1908 | ||
| 1909 | * spam.el (spam-bogofilter-score): redisplay article normally | 1909 | * spam.el (spam-bogofilter-score): redisplay article normally |
| 1910 | after spam-bogofilter-score is called | 1910 | after spam-bogofilter-score is called |
| 1911 | 1911 | ||
| 1912 | 2003-07-06 Michael Piotrowski <mxp@dynalabs.de> (tiny change) | ||
| 1913 | |||
| 1914 | * gnus-sum.el (gnus-print-buffer): Apply emphasis. | ||
| 1915 | |||
| 1912 | 2003-07-06 Jesper Harder <harder@ifa.au.dk> | 1916 | 2003-07-06 Jesper Harder <harder@ifa.au.dk> |
| 1913 | 1917 | ||
| 1914 | * message.el (message-send-mail-with-sendmail): Handle | 1918 | * message.el (message-send-mail-with-sendmail): Handle |
| 1915 | non-numeric return values. | 1919 | non-numeric return values. |
| 1916 | 1920 | ||
| 1917 | * gnus-sum.el (gnus-print-buffer): Apply emphasis. | ||
| 1918 | From Michael Piotrowski <mxp@dynalabs.de> (tiny change). | ||
| 1919 | |||
| 1920 | * gnus-start.el (gnus-clear-system): Revert change from | 1921 | * gnus-start.el (gnus-clear-system): Revert change from |
| 1921 | 2003-06-19. | 1922 | 2003-06-19. |
| 1922 | 1923 | ||
| @@ -2013,11 +2014,13 @@ | |||
| 2013 | 2014 | ||
| 2014 | 2003-06-20 Jesper Harder <harder@ifa.au.dk> | 2015 | 2003-06-20 Jesper Harder <harder@ifa.au.dk> |
| 2015 | 2016 | ||
| 2016 | * gnus-msg.el (gnus-configure-posting-styles): Remove unused | ||
| 2017 | variable. From Jan Rychter <jan@rychter.com>. | ||
| 2018 | |||
| 2019 | * spam.el (spam-spamoracle-learn): insert-string is obsolete. | 2017 | * spam.el (spam-spamoracle-learn): insert-string is obsolete. |
| 2020 | 2018 | ||
| 2019 | 2003-06-20 Jan Rychter <jan@rychter.com> | ||
| 2020 | |||
| 2021 | * gnus-msg.el (gnus-configure-posting-styles): Remove unused | ||
| 2022 | variable. | ||
| 2023 | |||
| 2021 | 2003-06-19 Teodor Zlatanov <tzz@lifelogs.com> | 2024 | 2003-06-19 Teodor Zlatanov <tzz@lifelogs.com> |
| 2022 | 2025 | ||
| 2023 | * spam.el (spam-enter-list): do not enter duplicate addresses into | 2026 | * spam.el (spam-enter-list): do not enter duplicate addresses into |
| @@ -2050,11 +2053,10 @@ | |||
| 2050 | * gnus-util.el (gnus-extract-address-components): Added | 2053 | * gnus-util.el (gnus-extract-address-components): Added |
| 2051 | doc-string. | 2054 | doc-string. |
| 2052 | 2055 | ||
| 2053 | 2003-06-16 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 2056 | 2003-06-16 Michael Albinus <Michael.Albinus@alcatel.de> |
| 2054 | 2057 | ||
| 2055 | * nnml.el (nnml-current-group-article-to-file-alist): Don't read | 2058 | * nnml.el (nnml-current-group-article-to-file-alist): Don't read |
| 2056 | overview when using compressed files. From Michael Albinus | 2059 | overview when using compressed files. |
| 2057 | <Michael.Albinus@alcatel.de>. | ||
| 2058 | 2060 | ||
| 2059 | 2003-06-16 Katsumi Yamaoka <yamaoka@jpl.org> | 2061 | 2003-06-16 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2060 | 2062 | ||
| @@ -2072,8 +2074,7 @@ | |||
| 2072 | * gnus-sum.el (gnus-summary-force-verify-and-decrypt): Bind | 2074 | * gnus-sum.el (gnus-summary-force-verify-and-decrypt): Bind |
| 2073 | `gnus-article-emulate-mime'. | 2075 | `gnus-article-emulate-mime'. |
| 2074 | 2076 | ||
| 2075 | 2003-06-15 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 2077 | 2003-06-15 Tommi Vainikainen <thv+gnus@iki.fi> |
| 2076 | From Tommi Vainikainen <thv+gnus@iki.fi>. | ||
| 2077 | 2078 | ||
| 2078 | * message.el (message-is-yours-p): New function. Separated common | 2079 | * message.el (message-is-yours-p): New function. Separated common |
| 2079 | code from message-cancel-news and message-supersede. Added | 2080 | code from message-cancel-news and message-supersede. Added |
| @@ -2081,10 +2082,10 @@ | |||
| 2081 | resort. | 2082 | resort. |
| 2082 | (message-cancel-news, message-supersede): Use message-is-yours-p. | 2083 | (message-cancel-news, message-supersede): Use message-is-yours-p. |
| 2083 | 2084 | ||
| 2084 | 2003-06-13 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 2085 | 2003-06-13 Niklas Morberg <niklas.morberg@axis.com> |
| 2085 | 2086 | ||
| 2086 | * nnimap.el (nnimap-split-articles): Narrow the right buffer to | 2087 | * nnimap.el (nnimap-split-articles): Narrow the right buffer to |
| 2087 | the headers. From Niklas Morberg <niklas.morberg@axis.com>. | 2088 | the headers. |
| 2088 | 2089 | ||
| 2089 | 2003-06-12 Dave Love <fx@gnu.org> | 2090 | 2003-06-12 Dave Love <fx@gnu.org> |
| 2090 | 2091 | ||
| @@ -2101,9 +2102,7 @@ | |||
| 2101 | * spam.el (spam-check-bogofilter-headers): fix for when the score | 2102 | * spam.el (spam-check-bogofilter-headers): fix for when the score |
| 2102 | is requested but the message is not spam | 2103 | is requested but the message is not spam |
| 2103 | 2104 | ||
| 2104 | 2003-06-09 Teodor Zlatanov <tzz@lifelogs.com> | 2105 | 2003-06-09 Eric Knauel <knauel@informatik.uni-tuebingen.de> |
| 2105 | From Eric | ||
| 2106 | <knauel@informatik.uni-tuebingen.de> | ||
| 2107 | 2106 | ||
| 2108 | * spam.el (spam-use-spamoracle): new variable | 2107 | * spam.el (spam-use-spamoracle): new variable |
| 2109 | (spam-install-hooks): add spamoracle to the list of conditions | 2108 | (spam-install-hooks): add spamoracle to the list of conditions |
| @@ -2146,8 +2145,7 @@ | |||
| 2146 | * gnus-srvr.el (gnus-browse-foreign-server): Parse garbage NNTP | 2145 | * gnus-srvr.el (gnus-browse-foreign-server): Parse garbage NNTP |
| 2147 | groups correctly. | 2146 | groups correctly. |
| 2148 | 2147 | ||
| 2149 | 2003-06-06 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 2148 | 2003-06-06 Benjamin Rutt <rutt+news@cis.ohio-state.edu>. |
| 2150 | From Benjamin Rutt <rutt+news@cis.ohio-state.edu>. | ||
| 2151 | 2149 | ||
| 2152 | * message.el (message-fetch-field): Augment documentation to state | 2150 | * message.el (message-fetch-field): Augment documentation to state |
| 2153 | the narrowed-to-headers restriction. | 2151 | the narrowed-to-headers restriction. |
| @@ -2173,11 +2171,9 @@ | |||
| 2173 | * rfc2047.el (rfc2047-encode-region): Don't error out on invalid | 2171 | * rfc2047.el (rfc2047-encode-region): Don't error out on invalid |
| 2174 | strings. | 2172 | strings. |
| 2175 | 2173 | ||
| 2176 | 2003-06-04 Jesper Harder <harder@ifa.au.dk> | 2174 | 2003-06-04 Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> (tiny change) |
| 2177 | 2175 | ||
| 2178 | * mml1991.el (mml1991-pgg-sign): Insert pgg output as unibyte. | 2176 | * mml1991.el (mml1991-pgg-sign): Insert pgg output as unibyte. |
| 2179 | From: Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> (tiny | ||
| 2180 | change) | ||
| 2181 | 2177 | ||
| 2182 | 2003-06-03 Dave Love <fx@gnu.org> | 2178 | 2003-06-03 Dave Love <fx@gnu.org> |
| 2183 | 2179 | ||
| @@ -2204,11 +2200,10 @@ | |||
| 2204 | * message.el (message-fetch-field): Mention narrow-to-headers | 2200 | * message.el (message-fetch-field): Mention narrow-to-headers |
| 2205 | requirement. | 2201 | requirement. |
| 2206 | 2202 | ||
| 2207 | 2003-06-03 Jesper Harder <harder@ifa.au.dk> | 2203 | 2003-06-03 Eric Eide <eeide@cs.utah.edu> |
| 2208 | 2204 | ||
| 2209 | * gnus-xmas.el (gnus-xmas-create-image): Use | 2205 | * gnus-xmas.el (gnus-xmas-create-image): Use |
| 2210 | insert-file-contents-literally. From: Eric Eide | 2206 | insert-file-contents-literally. |
| 2211 | <eeide@cs.utah.edu> | ||
| 2212 | 2207 | ||
| 2213 | 2003-06-02 Teodor Zlatanov <tzz@lifelogs.com> | 2208 | 2003-06-02 Teodor Zlatanov <tzz@lifelogs.com> |
| 2214 | 2209 | ||
| @@ -2313,7 +2308,7 @@ | |||
| 2313 | 2308 | ||
| 2314 | * dgnushack.el (assq-delete-all): Removed the compiler macro. | 2309 | * dgnushack.el (assq-delete-all): Removed the compiler macro. |
| 2315 | 2310 | ||
| 2316 | 2003-05-14 Kevin Greiner <kgreiner@xpediantsolutions.com> | 2311 | 2003-05-14 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 2317 | 2312 | ||
| 2318 | * gnus-agent.el (gnus-agentize): Updated documentation to match | 2313 | * gnus-agent.el (gnus-agentize): Updated documentation to match |
| 2319 | usage. | 2314 | usage. |
| @@ -2326,7 +2321,7 @@ | |||
| 2326 | 2321 | ||
| 2327 | * gnus.el (gnus-version-number): Bump. | 2322 | * gnus.el (gnus-version-number): Bump. |
| 2328 | 2323 | ||
| 2329 | 2003-05-14 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2324 | 2003-05-14 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2330 | 2325 | ||
| 2331 | * gnus.el: Gnus v5.10.2 is released. | 2326 | * gnus.el: Gnus v5.10.2 is released. |
| 2332 | 2327 | ||
| @@ -2385,7 +2380,7 @@ | |||
| 2385 | in message. Suggested by Yoichi NAKAYAMA <yoichi@geiin.org>. | 2380 | in message. Suggested by Yoichi NAKAYAMA <yoichi@geiin.org>. |
| 2386 | * pop3.el (pop3-movemail): Ditto. | 2381 | * pop3.el (pop3-movemail): Ditto. |
| 2387 | 2382 | ||
| 2388 | 2003-05-12 Colin Marquardt <c.marquardt@alcatel.de> (tiny change) | 2383 | 2003-05-12 Colin Marquardt <c.marquardt@alcatel.de> (tiny change) |
| 2389 | 2384 | ||
| 2390 | * gnus.el (gnus-agent): Docstring fix. | 2385 | * gnus.el (gnus-agent): Docstring fix. |
| 2391 | 2386 | ||
| @@ -2397,7 +2392,7 @@ | |||
| 2397 | (gnus-registry-add-group): add a modification timestamp to each entry | 2392 | (gnus-registry-add-group): add a modification timestamp to each entry |
| 2398 | (gnus-registry-install-hooks): new function | 2393 | (gnus-registry-install-hooks): new function |
| 2399 | 2394 | ||
| 2400 | 2003-05-12 Kevin Greiner <kgreiner@xpediantsolutions.com> | 2395 | 2003-05-12 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 2401 | 2396 | ||
| 2402 | * gnus-agent.el (gnus-agent-cat-name): Eval macro while compiling. | 2397 | * gnus-agent.el (gnus-agent-cat-name): Eval macro while compiling. |
| 2403 | (gnus-agent-cat-disable-undownloaded-faces): New function. | 2398 | (gnus-agent-cat-disable-undownloaded-faces): New function. |
| @@ -2495,13 +2490,15 @@ | |||
| 2495 | * gnus-registry.el (gnus-registry-cache-file): new file variable | 2490 | * gnus-registry.el (gnus-registry-cache-file): new file variable |
| 2496 | (gnus-registry-cache-read, gnus-registry-cache-save): new | 2491 | (gnus-registry-cache-read, gnus-registry-cache-save): new |
| 2497 | functions | 2492 | functions |
| 2498 | (gnus-registry-cache-whitespace): new function. From Dan | ||
| 2499 | Christensen <jdc@chow.mat.jhu.edu> | ||
| 2500 | (gnus-registry-save, gnus-registry-read): use the new | 2493 | (gnus-registry-save, gnus-registry-read): use the new |
| 2501 | gnus-registry-cache-{read|save} functions, and change the name | 2494 | gnus-registry-cache-{read|save} functions, and change the name |
| 2502 | from gnus-registry-translate-{from|to}-alist | 2495 | from gnus-registry-translate-{from|to}-alist |
| 2503 | (gnus-registry-clear): fixed so it doesn't refer to old function name | 2496 | (gnus-registry-clear): fixed so it doesn't refer to old function name |
| 2504 | 2497 | ||
| 2498 | 2003-05-09 Dan Christensen <jdc@chow.mat.jhu.edu> | ||
| 2499 | |||
| 2500 | * gnus-registry.el (gnus-registry-cache-whitespace): new function. | ||
| 2501 | |||
| 2505 | 2003-05-09 Jesper Harder <harder@ifa.au.dk> | 2502 | 2003-05-09 Jesper Harder <harder@ifa.au.dk> |
| 2506 | 2503 | ||
| 2507 | * gnus-picon.el (gnus-picon-transform-address): Parse the encoded | 2504 | * gnus-picon.el (gnus-picon-transform-address): Parse the encoded |
| @@ -2516,8 +2513,9 @@ | |||
| 2516 | nnmail-split-fancy-with-parent-ignore-groups can be a single regex | 2513 | nnmail-split-fancy-with-parent-ignore-groups can be a single regex |
| 2517 | in addition to a list of regexes. | 2514 | in addition to a list of regexes. |
| 2518 | 2515 | ||
| 2519 | * spam.el (spam-use-regex-headers): docstring fix. From Niklas | 2516 | 2003-05-08 Niklas Morberg <niklas.morberg@axis.com> |
| 2520 | Morberg <niklas.morberg@axis.com> | 2517 | |
| 2518 | * spam.el (spam-use-regex-headers): docstring fix. | ||
| 2521 | 2519 | ||
| 2522 | 2003-05-08 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 2520 | 2003-05-08 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> |
| 2523 | 2521 | ||
| @@ -2588,7 +2586,7 @@ | |||
| 2588 | * mm-bodies.el (mm-decode-coding-region-safely): Remove. | 2586 | * mm-bodies.el (mm-decode-coding-region-safely): Remove. |
| 2589 | (mm-decode-body): Don't use mm-decode-coding-region-safely. | 2587 | (mm-decode-body): Don't use mm-decode-coding-region-safely. |
| 2590 | 2588 | ||
| 2591 | 2003-05-03 Vasily Korytov <deskpot@despammed.com> (tiny change) | 2589 | 2003-05-03 Vasily Korytov <deskpot@despammed.com> (tiny change) |
| 2592 | 2590 | ||
| 2593 | * gnus-util.el (gnus-multiple-choice): Add ", ?". | 2591 | * gnus-util.el (gnus-multiple-choice): Add ", ?". |
| 2594 | 2592 | ||
| @@ -2705,13 +2703,13 @@ | |||
| 2705 | 2703 | ||
| 2706 | * gnus.el (gnus-version-number): Bump. | 2704 | * gnus.el (gnus-version-number): Bump. |
| 2707 | 2705 | ||
| 2708 | 2003-05-01 Teodor Zlatanov <tzz@lifelogs.com> | 2706 | 2003-05-01 Jon Ericson <Jon.Ericson@jpl.nasa.gov> (tiny change) |
| 2709 | 2707 | ||
| 2710 | * spam-report.el (spam-report-gmane-regex): docstring fix. From | 2708 | * spam-report.el (spam-report-gmane-regex): docstring fix. |
| 2711 | Jon Ericson <Jon.Ericson@jpl.nasa.gov> (tiny change) | ||
| 2712 | 2709 | ||
| 2713 | * gnus.el (gnus-install-group-spam-parameters): docstring fix. | 2710 | * gnus.el (gnus-install-group-spam-parameters): docstring fix. |
| 2714 | From Jon Ericson <Jon.Ericson@jpl.nasa.gov> (tiny change) | 2711 | |
| 2712 | 2003-05-01 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2715 | 2713 | ||
| 2716 | * gnus-registry.el (gnus-registry-fetch-extra) | 2714 | * gnus-registry.el (gnus-registry-fetch-extra) |
| 2717 | (gnus-registry-store-extra, gnus-registry-group-count): new functions | 2715 | (gnus-registry-store-extra, gnus-registry-group-count): new functions |
| @@ -2719,11 +2717,11 @@ | |||
| 2719 | (gnus-registry-add-group): changed to work with extra data element | 2717 | (gnus-registry-add-group): changed to work with extra data element |
| 2720 | if present | 2718 | if present |
| 2721 | 2719 | ||
| 2722 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2720 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2723 | 2721 | ||
| 2724 | * gnus.el: Gnus v5.10.1 is released. | 2722 | * gnus.el: Gnus v5.10.1 is released. |
| 2725 | 2723 | ||
| 2726 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2724 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2727 | 2725 | ||
| 2728 | * gnus.el: Oort Gnus v0.24 is released. | 2726 | * gnus.el: Oort Gnus v0.24 is released. |
| 2729 | 2727 | ||
| @@ -2742,7 +2740,7 @@ | |||
| 2742 | 2740 | ||
| 2743 | * gnus.el: Update copyright for several files. | 2741 | * gnus.el: Update copyright for several files. |
| 2744 | 2742 | ||
| 2745 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2743 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2746 | 2744 | ||
| 2747 | * gnus.el: Oort Gnus v0.23 is released. | 2745 | * gnus.el: Oort Gnus v0.23 is released. |
| 2748 | 2746 | ||
| @@ -2750,7 +2748,7 @@ | |||
| 2750 | 2748 | ||
| 2751 | * spam-stat.el (spam-stat-test-directory): Compare against zero. | 2749 | * spam-stat.el (spam-stat-test-directory): Compare against zero. |
| 2752 | 2750 | ||
| 2753 | 2003-05-01 Trey Jackson <tjackson@ichips.intel.com> (tiny change) | 2751 | 2003-05-01 Trey Jackson <tjackson@ichips.intel.com> (tiny change) |
| 2754 | 2752 | ||
| 2755 | * spam-stat.el (spam-stat-test-directory): Skip 0 length files. | 2753 | * spam-stat.el (spam-stat-test-directory): Skip 0 length files. |
| 2756 | 2754 | ||
| @@ -2767,11 +2765,11 @@ | |||
| 2767 | 2765 | ||
| 2768 | * gnus.el (gnus-version-number): Bump. | 2766 | * gnus.el (gnus-version-number): Bump. |
| 2769 | 2767 | ||
| 2770 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2768 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2771 | 2769 | ||
| 2772 | * gnus.el: Oort Gnus v0.22 is released. | 2770 | * gnus.el: Oort Gnus v0.22 is released. |
| 2773 | 2771 | ||
| 2774 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2772 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2775 | 2773 | ||
| 2776 | * gnus.el: Oort Gnus v0.21 is released. | 2774 | * gnus.el: Oort Gnus v0.21 is released. |
| 2777 | 2775 | ||
| @@ -2779,7 +2777,7 @@ | |||
| 2779 | 2777 | ||
| 2780 | * gnus.el (gnus-version-number): Bump. | 2778 | * gnus.el (gnus-version-number): Bump. |
| 2781 | 2779 | ||
| 2782 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2780 | 2003-05-01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2783 | 2781 | ||
| 2784 | * gnus.el: Oort Gnus v0.20 is released. | 2782 | * gnus.el: Oort Gnus v0.20 is released. |
| 2785 | 2783 | ||
| @@ -2872,7 +2870,7 @@ | |||
| 2872 | * mm-util.el (mm-charset-to-coding-system): Use user specified | 2870 | * mm-util.el (mm-charset-to-coding-system): Use user specified |
| 2873 | charset unless coding-system-get is fboundp. | 2871 | charset unless coding-system-get is fboundp. |
| 2874 | 2872 | ||
| 2875 | 2003-04-30 Kevin Greiner <kgreiner@xpediantsolutions.com> | 2873 | 2003-04-30 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 2876 | 2874 | ||
| 2877 | * gnus-agent.el (gnus-agent-cat-defaccessor, gnus-agent-cat-name): | 2875 | * gnus-agent.el (gnus-agent-cat-defaccessor, gnus-agent-cat-name): |
| 2878 | Wrapped in eval-when-compile. | 2876 | Wrapped in eval-when-compile. |
| @@ -2978,7 +2976,7 @@ | |||
| 2978 | (gnus-mime-display-multipart-related-as-mixed): Added doc-strings, | 2976 | (gnus-mime-display-multipart-related-as-mixed): Added doc-strings, |
| 2979 | allow customization. | 2977 | allow customization. |
| 2980 | 2978 | ||
| 2981 | 2003-04-27 Kevin Greiner <kgreiner@xpediantsolutions.com> | 2979 | 2003-04-27 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 2982 | 2980 | ||
| 2983 | * dgnushack.el (dgnushack-compile-verbosely): New function. Not | 2981 | * dgnushack.el (dgnushack-compile-verbosely): New function. Not |
| 2984 | currently called (See source for explanation). | 2982 | currently called (See source for explanation). |
| @@ -2991,11 +2989,11 @@ | |||
| 2991 | 2989 | ||
| 2992 | * gnus.el (gnus-version-number): Bump. | 2990 | * gnus.el (gnus-version-number): Bump. |
| 2993 | 2991 | ||
| 2994 | 2003-04-27 06:47:31 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 2992 | 2003-04-27 06:47:31 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 2995 | 2993 | ||
| 2996 | * gnus.el: Oort Gnus v0.19 is released. | 2994 | * gnus.el: Oort Gnus v0.19 is released. |
| 2997 | 2995 | ||
| 2998 | 2003-04-27 Kevin Greiner <kgreiner@xpediantsolutions.com> | 2996 | 2003-04-27 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 2999 | 2997 | ||
| 3000 | * gnus-registry.el (gnus-register-spool-action): Replaced literal | 2998 | * gnus-registry.el (gnus-register-spool-action): Replaced literal |
| 3001 | carriage-return character with its escape sequence. | 2999 | carriage-return character with its escape sequence. |
| @@ -3141,11 +3139,10 @@ | |||
| 3141 | 3139 | ||
| 3142 | * smime.el (smime-decrypt-region): Insert From header. | 3140 | * smime.el (smime-decrypt-region): Insert From header. |
| 3143 | 3141 | ||
| 3144 | 2003-04-21 Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> | 3142 | 2003-04-21 Gaute B Strokkenes <gs234@cam.ac.uk> (tiny change) |
| 3145 | 3143 | ||
| 3146 | * gnus-fun.el (gnus-face-from-file, gnus-convert-png-to-face): | 3144 | * gnus-fun.el (gnus-face-from-file, gnus-convert-png-to-face): |
| 3147 | Max length of header is 726, not 740. From Gaute B Strokkenes | 3145 | Max length of header is 726, not 740. |
| 3148 | <gs234@cam.ac.uk>. | ||
| 3149 | 3146 | ||
| 3150 | 2003-04-20 Jesper Harder <harder@ifa.au.dk> | 3147 | 2003-04-20 Jesper Harder <harder@ifa.au.dk> |
| 3151 | 3148 | ||
| @@ -3270,7 +3267,7 @@ | |||
| 3270 | (spam-summary-prepare-exit): check the report-gmane spam processor | 3267 | (spam-summary-prepare-exit): check the report-gmane spam processor |
| 3271 | and run spam-report-gmane-register-routine if it's active | 3268 | and run spam-report-gmane-register-routine if it's active |
| 3272 | 3269 | ||
| 3273 | From John Wiegley <johnw@gnu.org> | 3270 | 2003-04-16 John Wiegley <johnw@gnu.org> |
| 3274 | 3271 | ||
| 3275 | * spam.el (spam-bogofilter-score): check bogofilter headers before | 3272 | * spam.el (spam-bogofilter-score): check bogofilter headers before |
| 3276 | checking bogofilter itself | 3273 | checking bogofilter itself |
| @@ -3303,7 +3300,7 @@ | |||
| 3303 | * nndiary.el (nndiary-compute-reminders): Don't use setf with | 3300 | * nndiary.el (nndiary-compute-reminders): Don't use setf with |
| 3304 | nthcdr. | 3301 | nthcdr. |
| 3305 | 3302 | ||
| 3306 | 2003-04-16 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3303 | 2003-04-16 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3307 | 3304 | ||
| 3308 | * gnus-agent.el (gnus-agent-make-cat): Added optional parameter to | 3305 | * gnus-agent.el (gnus-agent-make-cat): Added optional parameter to |
| 3309 | specify a predicate other than false. | 3306 | specify a predicate other than false. |
| @@ -3321,13 +3318,11 @@ | |||
| 3321 | 3318 | ||
| 3322 | * spam.el (spam-split): added save-restriction to save-excursion | 3319 | * spam.el (spam-split): added save-restriction to save-excursion |
| 3323 | 3320 | ||
| 3324 | 2003-04-15 Reiner Steib <Reiner.Steib@gmx.de> | 3321 | 2003-04-15 Julien Avarre <julien@avarre.com> |
| 3325 | From Julien Avarre <julien@avarre.com> | ||
| 3326 | 3322 | ||
| 3327 | * gnus-fun.el: Fixed autoload cookie. | 3323 | * gnus-fun.el: Fixed autoload cookie. |
| 3328 | 3324 | ||
| 3329 | 2003-04-15 Paul Jarc <prj@po.cwru.edu> | 3325 | 2003-04-15 Remi Letot <remi.letot@easynet.be> |
| 3330 | From Remi Letot <remi.letot@easynet.be> | ||
| 3331 | 3326 | ||
| 3332 | * nnmaildir.el (nnmaildir-request-scan): Use gnus-remove-if | 3327 | * nnmaildir.el (nnmaildir-request-scan): Use gnus-remove-if |
| 3333 | instead of remove-if. | 3328 | instead of remove-if. |
| @@ -3381,7 +3376,7 @@ | |||
| 3381 | 3376 | ||
| 3382 | * gnus.el (gnus-group-prefixed-name): Clean up. | 3377 | * gnus.el (gnus-group-prefixed-name): Clean up. |
| 3383 | 3378 | ||
| 3384 | 2003-04-13 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3379 | 2003-04-13 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3385 | 3380 | ||
| 3386 | * gnus-agent.el (gnus-agent-group-pathname): Bind | 3381 | * gnus-agent.el (gnus-agent-group-pathname): Bind |
| 3387 | gnus-command-method so that gnus-agent-directory will always | 3382 | gnus-command-method so that gnus-agent-directory will always |
| @@ -3397,7 +3392,7 @@ | |||
| 3397 | 3392 | ||
| 3398 | * gnus.el (gnus-version-number): Bump. | 3393 | * gnus.el (gnus-version-number): Bump. |
| 3399 | 3394 | ||
| 3400 | 2003-04-13 01:12:01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 3395 | 2003-04-13 01:12:01 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 3401 | 3396 | ||
| 3402 | * gnus.el: Oort Gnus v0.18 is released. | 3397 | * gnus.el: Oort Gnus v0.18 is released. |
| 3403 | 3398 | ||
| @@ -3452,7 +3447,7 @@ | |||
| 3452 | (mm-encode-body): Don't corrupt UTF-16. | 3447 | (mm-encode-body): Don't corrupt UTF-16. |
| 3453 | (mm-body-encoding): Pay attention to mm-body-charset-encoding-alist. | 3448 | (mm-body-encoding): Pay attention to mm-body-charset-encoding-alist. |
| 3454 | 3449 | ||
| 3455 | 2003-04-10 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3450 | 2003-04-10 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3456 | 3451 | ||
| 3457 | * gnus-agent.el (gnus-agent-get-undownloaded-list): Articles in | 3452 | * gnus-agent.el (gnus-agent-get-undownloaded-list): Articles in |
| 3458 | the CACHE are now detected and handled the same as an article | 3453 | the CACHE are now detected and handled the same as an article |
| @@ -3478,7 +3473,7 @@ | |||
| 3478 | * gnus-sum.el (gnus-summary-make-menu-bar): Disable "Import file" | 3473 | * gnus-sum.el (gnus-summary-make-menu-bar): Disable "Import file" |
| 3479 | and "Create article" items in non-editable groups. | 3474 | and "Create article" items in non-editable groups. |
| 3480 | 3475 | ||
| 3481 | 2003-04-09 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3476 | 2003-04-09 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3482 | 3477 | ||
| 3483 | * gnus-agent.el (gnus-agent-write-active): Added option of | 3478 | * gnus-agent.el (gnus-agent-write-active): Added option of |
| 3484 | replacing, rather than updating, the agent's active file. Do NOT | 3479 | replacing, rather than updating, the agent's active file. Do NOT |
| @@ -3591,7 +3586,7 @@ | |||
| 3591 | * gnus-sum.el: XEmacs doesn't support the 5th arg to 'load', so | 3586 | * gnus-sum.el: XEmacs doesn't support the 5th arg to 'load', so |
| 3592 | don't use it when loading gnus-sum.el if we're in XEmacs. | 3587 | don't use it when loading gnus-sum.el if we're in XEmacs. |
| 3593 | 3588 | ||
| 3594 | 2003-04-05 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3589 | 2003-04-05 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3595 | 3590 | ||
| 3596 | * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound | 3591 | * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound |
| 3597 | print-escape-nonascii to fix more characters in compiled format | 3592 | print-escape-nonascii to fix more characters in compiled format |
| @@ -3602,7 +3597,7 @@ | |||
| 3602 | * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): | 3597 | * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): |
| 3603 | Fix customization type. | 3598 | Fix customization type. |
| 3604 | 3599 | ||
| 3605 | 2003-04-04 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3600 | 2003-04-04 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3606 | 3601 | ||
| 3607 | * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound | 3602 | * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound |
| 3608 | print-quoted, print-readably, print-escape-multibyte, and | 3603 | print-quoted, print-readably, print-escape-multibyte, and |
| @@ -3662,7 +3657,7 @@ | |||
| 3662 | * nntp.el (nntp-via-rlogin-command-switches): Doc fix. | 3657 | * nntp.el (nntp-via-rlogin-command-switches): Doc fix. |
| 3663 | (nntp-open-via-rlogin-and-telnet): Disable the telnet linemode. | 3658 | (nntp-open-via-rlogin-and-telnet): Disable the telnet linemode. |
| 3664 | 3659 | ||
| 3665 | 2003-03-31 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3660 | 2003-03-31 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3666 | 3661 | ||
| 3667 | * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound | 3662 | * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound |
| 3668 | print-escape-newlines to print escape sequences rather than | 3663 | print-escape-newlines to print escape sequences rather than |
| @@ -3685,7 +3680,7 @@ | |||
| 3685 | 3680 | ||
| 3686 | * gnus.el (gnus-version-number): Bump. | 3681 | * gnus.el (gnus-version-number): Bump. |
| 3687 | 3682 | ||
| 3688 | 2003-03-31 20:08:19 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 3683 | 2003-03-31 20:08:19 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 3689 | 3684 | ||
| 3690 | * gnus.el: Oort Gnus v0.17 is released. | 3685 | * gnus.el: Oort Gnus v0.17 is released. |
| 3691 | 3686 | ||
| @@ -3768,20 +3763,24 @@ | |||
| 3768 | (gnus-read-newsrc-el-file): call the gnus-read-newsrc-el-hook | 3763 | (gnus-read-newsrc-el-file): call the gnus-read-newsrc-el-hook |
| 3769 | 3764 | ||
| 3770 | * gnus-registry.el (gnus-registry-translate-to-alist) | 3765 | * gnus-registry.el (gnus-registry-translate-to-alist) |
| 3771 | (gnus-registry-translate-from-alist, alist-to-hashtable) | 3766 | (gnus-registry-translate-from-alist: new functions |
| 3772 | (hashtable-to-alist): new functions | ||
| 3773 | (gnus-register-spool-action): add a spool item to the registry | 3767 | (gnus-register-spool-action): add a spool item to the registry |
| 3774 | 3768 | ||
| 3775 | * gnus.el (gnus-variable-list): added gnus-registry-alist to the | 3769 | * gnus.el (gnus-variable-list): added gnus-registry-alist to the |
| 3776 | list of saved variables | 3770 | list of saved variables |
| 3777 | (gnus-registry-alist): new variable | 3771 | (gnus-registry-alist): new variable |
| 3778 | 3772 | ||
| 3773 | 2003-03-28 Andreas Fuchs <asf@void.at> | ||
| 3774 | |||
| 3775 | * gnus-registry.el (alist-to-hashtable, hashtable-to-alist): New | ||
| 3776 | functions. | ||
| 3777 | |||
| 3779 | 2003-03-27 Simon Josefsson <jas@extundo.com> | 3778 | 2003-03-27 Simon Josefsson <jas@extundo.com> |
| 3780 | 3779 | ||
| 3781 | * gnus-art.el (article-decode-group-name): Be correct instead of | 3780 | * gnus-art.el (article-decode-group-name): Be correct instead of |
| 3782 | smart. | 3781 | smart. |
| 3783 | 3782 | ||
| 3784 | 2003-03-27 Katsumi Yamaoka <yamaoka@jpl.org> | 3783 | 2003-03-27 Katsumi Yamaoka <yamaoka@jpl.org> |
| 3785 | 3784 | ||
| 3786 | * lpath.el: Bind url-current-object for Emacs; bind | 3785 | * lpath.el: Bind url-current-object for Emacs; bind |
| 3787 | gnus-agent-expire-current-dirs for XEmacs; fbind open-ssl-stream | 3786 | gnus-agent-expire-current-dirs for XEmacs; fbind open-ssl-stream |
| @@ -3796,7 +3795,7 @@ | |||
| 3796 | * gnus-msg.el (gnus-mailing-list-groups): Fix customize type and | 3795 | * gnus-msg.el (gnus-mailing-list-groups): Fix customize type and |
| 3797 | doc string. | 3796 | doc string. |
| 3798 | 3797 | ||
| 3799 | 2003-03-26 Kevin Ryde <user42@zip.com.au> | 3798 | 2003-03-26 Kevin Ryde <user42@zip.com.au> |
| 3800 | 3799 | ||
| 3801 | * gnus-sum.el (gnus-summary-find-for-reselect): Renamed from | 3800 | * gnus-sum.el (gnus-summary-find-for-reselect): Renamed from |
| 3802 | gnus-summary-find-uncancelled, skip temporary articles inserted by | 3801 | gnus-summary-find-uncancelled, skip temporary articles inserted by |
| @@ -3806,7 +3805,7 @@ | |||
| 3806 | 3805 | ||
| 3807 | * smiley.el (smiley-buffer): New function. | 3806 | * smiley.el (smiley-buffer): New function. |
| 3808 | 3807 | ||
| 3809 | 2003-03-26 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3808 | 2003-03-26 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3810 | 3809 | ||
| 3811 | * gnus-agent.el (gnus-agent-fetch-selected-article): Replaced | 3810 | * gnus-agent.el (gnus-agent-fetch-selected-article): Replaced |
| 3812 | gnus-summary-update-line (which updated the article's face) with | 3811 | gnus-summary-update-line (which updated the article's face) with |
| @@ -3814,7 +3813,7 @@ | |||
| 3814 | face by calling gnus-summary-update-line AND updates the download | 3813 | face by calling gnus-summary-update-line AND updates the download |
| 3815 | mark to show that the article was fetched). | 3814 | mark to show that the article was fetched). |
| 3816 | 3815 | ||
| 3817 | 2003-03-23 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3816 | 2003-03-23 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3818 | 3817 | ||
| 3819 | * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Provides | 3818 | * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Provides |
| 3820 | option of deleting agent directories for groups/servers that are | 3819 | option of deleting agent directories for groups/servers that are |
| @@ -3879,7 +3878,7 @@ | |||
| 3879 | * gnus-art.el (gnus-treat-display-xface): Don't enable if | 3878 | * gnus-art.el (gnus-treat-display-xface): Don't enable if |
| 3880 | icontopbm isn't available. | 3879 | icontopbm isn't available. |
| 3881 | 3880 | ||
| 3882 | 2003-03-21 Kevin Greiner <kgreiner@xpediantsolutions.com> | 3881 | 2003-03-21 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 3883 | 3882 | ||
| 3884 | * gnus-int.el (gnus-open-server): Catch errors in backend's | 3883 | * gnus-int.el (gnus-open-server): Catch errors in backend's |
| 3885 | open-server method. Returns nil rather than crashing startup. | 3884 | open-server method. Returns nil rather than crashing startup. |
| @@ -3906,7 +3905,7 @@ | |||
| 3906 | * message.el (message-split-line): New function. | 3905 | * message.el (message-split-line): New function. |
| 3907 | (message-mode-map): Remap split-line to message-split-line. | 3906 | (message-mode-map): Remap split-line to message-split-line. |
| 3908 | 3907 | ||
| 3909 | 2003-03-20 Katsumi Yamaoka <yamaoka@jpl.org> | 3908 | 2003-03-20 Katsumi Yamaoka <yamaoka@jpl.org> |
| 3910 | 3909 | ||
| 3911 | * message.el (message-make-overlay): Defalias it to make-overlay. | 3910 | * message.el (message-make-overlay): Defalias it to make-overlay. |
| 3912 | (message-delete-overlay): Defalias it to delete-overlay. | 3911 | (message-delete-overlay): Defalias it to delete-overlay. |
| @@ -3930,7 +3929,7 @@ | |||
| 3930 | * nnrss.el (nnrss-fetch): Fetch the local stuff. | 3929 | * nnrss.el (nnrss-fetch): Fetch the local stuff. |
| 3931 | (nnrss-check-group): Use it. | 3930 | (nnrss-check-group): Use it. |
| 3932 | 3931 | ||
| 3933 | 2003-03-20 Mark A. Hershberger <mah@everybody.org> | 3932 | 2003-03-20 Mark A. Hershberger <mah@everybody.org> |
| 3934 | 3933 | ||
| 3935 | * nnrss.el: Primitive XML Name-space support. This means that RSS | 3934 | * nnrss.el: Primitive XML Name-space support. This means that RSS |
| 3936 | feeds like Kevin Burton's[1] can now be read in Gnus. | 3935 | feeds like Kevin Burton's[1] can now be read in Gnus. |
| @@ -3957,7 +3956,7 @@ | |||
| 3957 | 3956 | ||
| 3958 | * gnus-group.el (gnus-group-make-rss-group): New function. | 3957 | * gnus-group.el (gnus-group-make-rss-group): New function. |
| 3959 | 3958 | ||
| 3960 | 2003-03-20 Katsumi Yamaoka <yamaoka@jpl.org> | 3959 | 2003-03-20 Katsumi Yamaoka <yamaoka@jpl.org> |
| 3961 | 3960 | ||
| 3962 | * message.el (message-idna-to-ascii-rhs-1): Don't use replace-* | 3961 | * message.el (message-idna-to-ascii-rhs-1): Don't use replace-* |
| 3963 | for highlight overlays. | 3962 | for highlight overlays. |
| @@ -4054,7 +4053,7 @@ | |||
| 4054 | 4053 | ||
| 4055 | * gnus.el (gnus-version-number): Bump. | 4054 | * gnus.el (gnus-version-number): Bump. |
| 4056 | 4055 | ||
| 4057 | 2003-03-18 00:38:22 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 4056 | 2003-03-18 00:38:22 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 4058 | 4057 | ||
| 4059 | * gnus.el: Oort Gnus v0.16 is released. | 4058 | * gnus.el: Oort Gnus v0.16 is released. |
| 4060 | 4059 | ||
| @@ -4511,7 +4510,6 @@ | |||
| 4511 | * spam.el: Fix typo. | 4510 | * spam.el: Fix typo. |
| 4512 | 4511 | ||
| 4513 | 2003-03-01 Satyaki Das <satyaki@theforce.stanford.edu> | 4512 | 2003-03-01 Satyaki Das <satyaki@theforce.stanford.edu> |
| 4514 | (Trivial patch.) | ||
| 4515 | 4513 | ||
| 4516 | * pgg-gpg.el (pgg-gpg-process-region): Insert process status into | 4514 | * pgg-gpg.el (pgg-gpg-process-region): Insert process status into |
| 4517 | errors-buffer. This produces a nicer error message in case of | 4515 | errors-buffer. This produces a nicer error message in case of |
| @@ -4535,7 +4533,7 @@ | |||
| 4535 | 4533 | ||
| 4536 | * message.el (message-make-fqdn): Protect against nil user-mail. | 4534 | * message.el (message-make-fqdn): Protect against nil user-mail. |
| 4537 | 4535 | ||
| 4538 | 2003-02-28 Vasily Korytov <deskpot@myrealbox.com> | 4536 | 2003-02-28 Vasily Korytov <deskpot@myrealbox.com> |
| 4539 | 4537 | ||
| 4540 | * gnus-art.el (gnus-boring-article-headers): New values: | 4538 | * gnus-art.el (gnus-boring-article-headers): New values: |
| 4541 | 'to-list and 'cc-list. | 4539 | 'to-list and 'cc-list. |
| @@ -4617,10 +4615,11 @@ | |||
| 4617 | 4615 | ||
| 4618 | * gnus-start.el (gnus-backup-startup-file): Fixed custom type. | 4616 | * gnus-start.el (gnus-backup-startup-file): Fixed custom type. |
| 4619 | 4617 | ||
| 4620 | 2003-02-24 Ted Zlatanov <tzz@lifelogs.com> | 4618 | 2003-02-24 Ted Zlatanov <tzz@lifelogs.com> |
| 4619 | |||
| 4621 | * spam.el: disabled spam-get-article-as-filename | 4620 | * spam.el: disabled spam-get-article-as-filename |
| 4622 | 4621 | ||
| 4623 | From Michael Shields <shields@msrl.com> | 4622 | 2003-02-24 Michael Shields <shields@msrl.com> |
| 4624 | 4623 | ||
| 4625 | * gnus-group.el (gnus-group-is-exiting-without-update-p): New. | 4624 | * gnus-group.el (gnus-group-is-exiting-without-update-p): New. |
| 4626 | * gnus-sum.el (gnus-summary-exit-no-update): Use it. | 4625 | * gnus-sum.el (gnus-summary-exit-no-update): Use it. |
| @@ -4634,8 +4633,7 @@ | |||
| 4634 | no spam. | 4633 | no spam. |
| 4635 | * spam.el (spam-ham-move-routine): New `copy' argument. | 4634 | * spam.el (spam-ham-move-routine): New `copy' argument. |
| 4636 | 4635 | ||
| 4637 | 2003-02-24 Kai Gro,A_(Bjohann <kai.grossjohann@uni-duisburg.de> | 4636 | 2003-02-24 Martin Thornquist <martint@ifi.uio.no> |
| 4638 | From Martin Thornquist <martint@ifi.uio.no> | ||
| 4639 | 4637 | ||
| 4640 | * gnus-topic.el (gnus-topic-select-group): Select last group if | 4638 | * gnus-topic.el (gnus-topic-select-group): Select last group if |
| 4641 | after last group. | 4639 | after last group. |
| @@ -4752,16 +4750,19 @@ | |||
| 4752 | * gnus-start.el (gnus-get-unread-articles-in-group): Make sure | 4750 | * gnus-start.el (gnus-get-unread-articles-in-group): Make sure |
| 4753 | the entry for the group exists before we alter it. | 4751 | the entry for the group exists before we alter it. |
| 4754 | 4752 | ||
| 4755 | 2003-02-22 Kai Gro,A_(Bjohann <kai.grossjohann@uni-duisburg.de> | 4753 | 2003-02-22 David S Goldberg <david.goldberg6@verizon.net> (tiny change) |
| 4754 | |||
| 4755 | * message.el (message-mode): MML tags separate paragraphs. | ||
| 4756 | 4756 | ||
| 4757 | * message.el (message-mode): MML tags separate paragraphs. Small | 4757 | 2003-02-22 Kai Gro,A_(Bjohann <kai.grossjohann@uni-duisburg.de> |
| 4758 | change from David S Goldberg <david.goldberg6@verizon.net>. | ||
| 4759 | 4758 | ||
| 4760 | * gnus-agent.el (gnus-agent-get-undownloaded-list): Sort | 4759 | * gnus-agent.el (gnus-agent-get-undownloaded-list): Sort |
| 4761 | `gnus-newsgroup-headers'. | 4760 | `gnus-newsgroup-headers'. |
| 4762 | 4761 | ||
| 4762 | 2003-02-22 Karl Pfl,Ad(Bsterer <sigurd@12move.de> | ||
| 4763 | |||
| 4763 | * gnus-art.el (gnus-article-refer-article): Grok more message id | 4764 | * gnus-art.el (gnus-article-refer-article): Grok more message id |
| 4764 | formats. From Karl Pfl,Ad(Bsterer <sigurd@12move.de>. | 4765 | formats. |
| 4765 | 4766 | ||
| 4766 | 2003-02-22 Jesper Harder <harder@ifa.au.dk> | 4767 | 2003-02-22 Jesper Harder <harder@ifa.au.dk> |
| 4767 | 4768 | ||
| @@ -4778,8 +4779,7 @@ | |||
| 4778 | (gnus-register-spool-action): added hashtable of message ID keys | 4779 | (gnus-register-spool-action): added hashtable of message ID keys |
| 4779 | with message motion data | 4780 | with message motion data |
| 4780 | 4781 | ||
| 4781 | 2003-02-21 Florian Weimer <fw@deneb.enyo.de> | 4782 | 2003-02-21 Reiner Steib <Reiner.Steib@gmx.de> |
| 4782 | From Reiner Steib <Reiner.Steib@gmx.de>. | ||
| 4783 | 4783 | ||
| 4784 | * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): New | 4784 | * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): New |
| 4785 | variable, used in `gnus-button-mid-or-mail-heuristic'. | 4785 | variable, used in `gnus-button-mid-or-mail-heuristic'. |
| @@ -4909,11 +4909,11 @@ | |||
| 4909 | (spam-mark-spam-as-expired-and-move-routine): made the article | 4909 | (spam-mark-spam-as-expired-and-move-routine): made the article |
| 4910 | move conditional, so it's not called even if there's nothing to move | 4910 | move conditional, so it's not called even if there's nothing to move |
| 4911 | 4911 | ||
| 4912 | 2003-02-13 Kai Gro,A_(Bjohann <kai.grossjohann@uni-duisburg.de> | 4912 | 2003-02-13 Kurt B. Kaiser <kbk@shore.net> |
| 4913 | 4913 | ||
| 4914 | * message.el (message-unix-mail-delimiter): Accept any whitespace | 4914 | * message.el (message-unix-mail-delimiter): Accept any whitespace |
| 4915 | after the email address and before the date; do not require the | 4915 | after the email address and before the date; do not require the |
| 4916 | space character. From Kurt B. Kaiser <kbk@shore.net>. | 4916 | space character. |
| 4917 | 4917 | ||
| 4918 | 2003-02-13 Katsumi Yamaoka <yamaoka@jpl.org> | 4918 | 2003-02-13 Katsumi Yamaoka <yamaoka@jpl.org> |
| 4919 | 4919 | ||
| @@ -5021,7 +5021,7 @@ | |||
| 5021 | 5021 | ||
| 5022 | * gnus.el (gnus-version-number): Bumped. | 5022 | * gnus.el (gnus-version-number): Bumped. |
| 5023 | 5023 | ||
| 5024 | 2003-02-08 23:23:27 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 5024 | 2003-02-08 23:23:27 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 5025 | 5025 | ||
| 5026 | * gnus.el: Oort Gnus v0.15 is released. | 5026 | * gnus.el: Oort Gnus v0.15 is released. |
| 5027 | 5027 | ||
| @@ -5036,8 +5036,9 @@ | |||
| 5036 | * gnus-sum.el (gnus-summary-select-article): Remove blink removal | 5036 | * gnus-sum.el (gnus-summary-select-article): Remove blink removal |
| 5037 | code that only worked under Emacs. | 5037 | code that only worked under Emacs. |
| 5038 | 5038 | ||
| 5039 | * pgg-gpg.el (pgg-gpg-process-region): Don't blink. From Satyaki | 5039 | 2003-02-08 Satyaki Das <satyaki@chicory.stanford.edu> |
| 5040 | Das <satyaki@chicory.stanford.edu>. | 5040 | |
| 5041 | * pgg-gpg.el (pgg-gpg-process-region): Don't blink. | ||
| 5041 | 5042 | ||
| 5042 | 2003-02-08 Jesper Harder <harder@ifa.au.dk> | 5043 | 2003-02-08 Jesper Harder <harder@ifa.au.dk> |
| 5043 | 5044 | ||
| @@ -5367,7 +5368,7 @@ | |||
| 5367 | 5368 | ||
| 5368 | * gnus.el (gnus-version-number): Bumped. | 5369 | * gnus.el (gnus-version-number): Bumped. |
| 5369 | 5370 | ||
| 5370 | 2003-01-24 20:32:44 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 5371 | 2003-01-24 20:32:44 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 5371 | 5372 | ||
| 5372 | * gnus.el: Oort Gnus v0.14 is released. | 5373 | * gnus.el: Oort Gnus v0.14 is released. |
| 5373 | 5374 | ||
| @@ -5491,7 +5492,7 @@ | |||
| 5491 | 5492 | ||
| 5492 | * gnus.el (gnus-version-number): Bumped version number. | 5493 | * gnus.el (gnus-version-number): Bumped version number. |
| 5493 | 5494 | ||
| 5494 | 2003-01-21 07:15:41 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 5495 | 2003-01-21 07:15:41 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 5495 | 5496 | ||
| 5496 | * gnus.el: Oort Gnus v0.13 is released. | 5497 | * gnus.el: Oort Gnus v0.13 is released. |
| 5497 | 5498 | ||
| @@ -5672,7 +5673,7 @@ | |||
| 5672 | 5673 | ||
| 5673 | * gnus-audio.el (gnus-audio-au-player): Use executable-find. | 5674 | * gnus-audio.el (gnus-audio-au-player): Use executable-find. |
| 5674 | 5675 | ||
| 5675 | 2003-01-13 Jhair Tocancipa Triana <jhair_tocancipa@@gmx.net> | 5676 | 2003-01-13 Jhair Tocancipa Triana <jhair_tocancipa@@gmx.net> |
| 5676 | 5677 | ||
| 5677 | * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): Use | 5678 | * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): Use |
| 5678 | /usr/bin/play as default player. | 5679 | /usr/bin/play as default player. |
| @@ -5754,7 +5755,7 @@ | |||
| 5754 | * gnus.el (gnus-version-number): Bumped version. | 5755 | * gnus.el (gnus-version-number): Bumped version. |
| 5755 | (gnus-summary-line-format): Doc fix. | 5756 | (gnus-summary-line-format): Doc fix. |
| 5756 | 5757 | ||
| 5757 | 2003-01-12 22:02:49 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 5758 | 2003-01-12 22:02:49 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 5758 | 5759 | ||
| 5759 | * gnus.el: Oort Gnus v0.12 is released. | 5760 | * gnus.el: Oort Gnus v0.12 is released. |
| 5760 | 5761 | ||
| @@ -5801,7 +5802,7 @@ | |||
| 5801 | 5802 | ||
| 5802 | * gnus.el (gnus-version-number): Bumped version number. | 5803 | * gnus.el (gnus-version-number): Bumped version number. |
| 5803 | 5804 | ||
| 5804 | 2003-01-12 13:46:20 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 5805 | 2003-01-12 13:46:20 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 5805 | 5806 | ||
| 5806 | * gnus.el: Oort Gnus v0.11 is released. | 5807 | * gnus.el: Oort Gnus v0.11 is released. |
| 5807 | 5808 | ||
| @@ -6277,7 +6278,7 @@ | |||
| 6277 | 6278 | ||
| 6278 | * gnus.el (gnus-version-number): Bump version number. | 6279 | * gnus.el (gnus-version-number): Bump version number. |
| 6279 | 6280 | ||
| 6280 | 2003-01-05 01:53:30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 6281 | 2003-01-05 01:53:30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 6281 | 6282 | ||
| 6282 | * gnus.el: Oort Gnus v0.10 is released. | 6283 | * gnus.el: Oort Gnus v0.10 is released. |
| 6283 | 6284 | ||
| @@ -6285,7 +6286,7 @@ | |||
| 6285 | 6286 | ||
| 6286 | * gnus.el (gnus-version-number): Fix version number. | 6287 | * gnus.el (gnus-version-number): Fix version number. |
| 6287 | 6288 | ||
| 6288 | 2003-01-05 01:40:09 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 6289 | 2003-01-05 01:40:09 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 6289 | 6290 | ||
| 6290 | * gnus.el: Oort Gnus v0.08 is released. | 6291 | * gnus.el: Oort Gnus v0.08 is released. |
| 6291 | 6292 | ||
| @@ -6789,11 +6790,10 @@ | |||
| 6789 | 6790 | ||
| 6790 | * binhex.el (binhex-decoder-program): Fix docstring. | 6791 | * binhex.el (binhex-decoder-program): Fix docstring. |
| 6791 | 6792 | ||
| 6792 | 2002-12-21 Kai Gro,A_(Bjohann <kai.grossjohann@uni-duisburg.de> | 6793 | 2002-12-21 Laurent Martelli <laurent@bearteam.org> |
| 6793 | 6794 | ||
| 6794 | * mm-decode.el (mm-mailcap-command): Do not backslash-quote | 6795 | * mm-decode.el (mm-mailcap-command): Do not backslash-quote |
| 6795 | special chars if the mailcap file uses single quotes around %s. | 6796 | special chars if the mailcap file uses single quotes around %s. |
| 6796 | From Laurent Martelli <laurent@bearteam.org>. | ||
| 6797 | 6797 | ||
| 6798 | 2002-12-19 Paul Jarc <prj@po.cwru.edu> | 6798 | 2002-12-19 Paul Jarc <prj@po.cwru.edu> |
| 6799 | 6799 | ||
| @@ -6834,7 +6834,7 @@ | |||
| 6834 | * nntp.el (nntp-with-open-group-first-pass): Do not wrap in | 6834 | * nntp.el (nntp-with-open-group-first-pass): Do not wrap in |
| 6835 | eval-when-compile. Suggested by Kevin Greiner. | 6835 | eval-when-compile. Suggested by Kevin Greiner. |
| 6836 | 6836 | ||
| 6837 | 2002-12-13 Kevin Greiner <kgreiner@xpediantsolutions.com> | 6837 | 2002-12-13 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 6838 | 6838 | ||
| 6839 | * gnus-agent.el (gnus-agent-max-fetch-size): New, defcustom. | 6839 | * gnus-agent.el (gnus-agent-max-fetch-size): New, defcustom. |
| 6840 | (gnus-agent-fetch-headers): Initialize gnus-agent-overview-buffer | 6840 | (gnus-agent-fetch-headers): Initialize gnus-agent-overview-buffer |
| @@ -6846,13 +6846,13 @@ | |||
| 6846 | Multiple chunks in the same group may perform arbitrarily large | 6846 | Multiple chunks in the same group may perform arbitrarily large |
| 6847 | updates. | 6847 | updates. |
| 6848 | 6848 | ||
| 6849 | 2002-12-12 Kevin Greiner <kgreiner@xpediantsolutions.com> | 6849 | 2002-12-12 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 6850 | 6850 | ||
| 6851 | * gnus-agent.el (gnus-agent-fetch-selected-article): Added call to | 6851 | * gnus-agent.el (gnus-agent-fetch-selected-article): Added call to |
| 6852 | gnus-summary-update-download-mark to update the article in the | 6852 | gnus-summary-update-download-mark to update the article in the |
| 6853 | summary. | 6853 | summary. |
| 6854 | 6854 | ||
| 6855 | 2002-12-11 Kevin Greiner <kgreiner@xpediantsolutions.com> | 6855 | 2002-12-11 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 6856 | 6856 | ||
| 6857 | * gnus.el (gnus-summary-high-uncached-face, | 6857 | * gnus.el (gnus-summary-high-uncached-face, |
| 6858 | gnus-summary-normal-uncached-face, gnus-summary-low-uncached-face) | 6858 | gnus-summary-normal-uncached-face, gnus-summary-low-uncached-face) |
| @@ -7070,7 +7070,7 @@ | |||
| 7070 | * gnus-sum.el (gnus-summary-insert-old-articles): No longer passes | 7070 | * gnus-sum.el (gnus-summary-insert-old-articles): No longer passes |
| 7071 | compressed range to gnus-summary-insert-articles. | 7071 | compressed range to gnus-summary-insert-articles. |
| 7072 | 7072 | ||
| 7073 | 2002-11-26 Kevin Ryde <user42@zip.com.au> | 7073 | 2002-11-26 Kevin Ryde <user42@zip.com.au> |
| 7074 | 7074 | ||
| 7075 | * gnus-art.el (gnus-mime-copy-part): Look for filename | 7075 | * gnus-art.el (gnus-mime-copy-part): Look for filename |
| 7076 | parameter under content-disposition, not content-type. | 7076 | parameter under content-disposition, not content-type. |
| @@ -7108,7 +7108,7 @@ | |||
| 7108 | * gnus-agent.el (gnus-agent-check-overview-buffer): Make debugger | 7108 | * gnus-agent.el (gnus-agent-check-overview-buffer): Make debugger |
| 7109 | print message on entry. | 7109 | print message on entry. |
| 7110 | 7110 | ||
| 7111 | From Kevin Greiner <kgreiner@xpediantsolutions.com>. | 7111 | 2002-11-25 Kevin Greiner <kgreiner@xpediantsolutions.com>. |
| 7112 | 7112 | ||
| 7113 | * gnus-range.el (gnus-range-difference): New function. | 7113 | * gnus-range.el (gnus-range-difference): New function. |
| 7114 | * gnus-sum.el (gnus-summary-insert-old-articles): Use it. | 7114 | * gnus-sum.el (gnus-summary-insert-old-articles): Use it. |
| @@ -7119,8 +7119,7 @@ | |||
| 7119 | gnus-remove-from-range instead of gnus-range-difference which | 7119 | gnus-remove-from-range instead of gnus-range-difference which |
| 7120 | doesn't exist. | 7120 | doesn't exist. |
| 7121 | 7121 | ||
| 7122 | 2002-11-23 Kai Gro,A_(Bjohann <kai.grossjohann@uni-duisburg.de> | 7122 | 2002-11-23 Kevin Greiner <kgreiner@xpediantsolutions.com> |
| 7123 | From Kevin Greiner <kgreiner@xpediantsolutions.com>. | ||
| 7124 | 7123 | ||
| 7125 | * gnus-agent.el (gnus-agent-downloaded-article-face): New face, | 7124 | * gnus-agent.el (gnus-agent-downloaded-article-face): New face, |
| 7126 | used for showing which articles have been downloaded. | 7125 | used for showing which articles have been downloaded. |
| @@ -7230,7 +7229,7 @@ | |||
| 7230 | * nnimap.el (nnimap-request-expire-articles): Compress sequence | 7229 | * nnimap.el (nnimap-request-expire-articles): Compress sequence |
| 7231 | before storing \Deleted mark on expired articles. | 7230 | before storing \Deleted mark on expired articles. |
| 7232 | 7231 | ||
| 7233 | 2002-11-17 Shenghuo Zhu <zsh@cs.rochester.edu> | 7232 | 2002-11-17 Shenghuo Zhu <zsh@cs.rochester.edu> |
| 7234 | Trivial patch from Markus Rost <rost@math.ohio-state.edu> | 7233 | Trivial patch from Markus Rost <rost@math.ohio-state.edu> |
| 7235 | 7234 | ||
| 7236 | * gnus-sum.el (gnus-summary-goto-unread): Doc fix - escape open | 7235 | * gnus-sum.el (gnus-summary-goto-unread): Doc fix - escape open |
| @@ -7320,19 +7319,18 @@ | |||
| 7320 | * gnus-group.el (gnus-group-delete-group): | 7319 | * gnus-group.el (gnus-group-delete-group): |
| 7321 | gnus-cache-active-hashtb might be void. | 7320 | gnus-cache-active-hashtb might be void. |
| 7322 | 7321 | ||
| 7323 | 2002-11-02 Simon Josefsson <jas@extundo.com> | 7322 | 2002-11-02 Raymond Scholz <ray-2002@zonix.de> |
| 7324 | 7323 | ||
| 7325 | * pgg-gpg.el (pgg-gpg-encrypt-region): Makes PGG respect the | 7324 | * pgg-gpg.el (pgg-gpg-encrypt-region): Makes PGG respect the |
| 7326 | setting of the default user ID. From Raymond Scholz | 7325 | setting of the default user ID. |
| 7327 | <ray-2002@zonix.de>. | ||
| 7328 | 7326 | ||
| 7329 | 2002-11-01 Jesper Harder <harder@ifa.au.dk> | 7327 | 2002-11-01 Jesper Harder <harder@ifa.au.dk> |
| 7330 | 7328 | ||
| 7331 | * mm-bodies.el (mm-body-encoding): Don't return 8bit for 7bit | 7329 | * mm-bodies.el (mm-body-encoding): Don't return 8bit for 7bit |
| 7332 | charset. | 7330 | charset. |
| 7333 | 7331 | ||
| 7334 | 2002-10-31 Ted Zlatanov <tzz@lifelogs.com> | 7332 | 2002-10-31 Alex Schroeder <alex@emacswiki.org> |
| 7335 | From Alex Schroeder <alex@emacswiki.org> | 7333 | |
| 7336 | * spam-stat.el (spam-stat-process-directory): add dir to message | 7334 | * spam-stat.el (spam-stat-process-directory): add dir to message |
| 7337 | (spam-stat-reduce-size): No longer remove words | 7335 | (spam-stat-reduce-size): No longer remove words |
| 7338 | with values close to 0.5, because the default value is 0.2. | 7336 | with values close to 0.5, because the default value is 0.2. |
| @@ -7395,8 +7393,7 @@ | |||
| 7395 | * mml.el (mml-mode-map): Fixed keybindings for mml-secure-* | 7393 | * mml.el (mml-mode-map): Fixed keybindings for mml-secure-* |
| 7396 | functions. | 7394 | functions. |
| 7397 | 7395 | ||
| 7398 | 2002-10-28 Katsumi Yamaoka <yamaoka@jpl.org> | 7396 | 2002-10-28 Mark A. Hershberger <mah@everybody.org> |
| 7399 | From mah@everybody.org (Mark A. Hershberger). | ||
| 7400 | 7397 | ||
| 7401 | * mm-url.el (mm-url-insert-file-contents): Make it return the same | 7398 | * mm-url.el (mm-url-insert-file-contents): Make it return the same |
| 7402 | type values ("url" size) regardless of the values of | 7399 | type values ("url" size) regardless of the values of |
| @@ -7644,7 +7641,7 @@ | |||
| 7644 | 7641 | ||
| 7645 | * gnus-spec.el (gnus-pad-form): Use gnus-string-width-function. | 7642 | * gnus-spec.el (gnus-pad-form): Use gnus-string-width-function. |
| 7646 | 7643 | ||
| 7647 | 2002-10-11 Ted Zlatanov <tzz@lifelogs.com> | 7644 | 2002-10-11 Ted Zlatanov <tzz@lifelogs.com> |
| 7648 | 7645 | ||
| 7649 | * spam.el (spam-check-ifile): added ifile as a spam checking | 7646 | * spam.el (spam-check-ifile): added ifile as a spam checking |
| 7650 | backend, and spam-use-ifle as the variable to toggle that check. | 7647 | backend, and spam-use-ifle as the variable to toggle that check. |
| @@ -7654,7 +7651,7 @@ | |||
| 7654 | * message.el (message-beginning-of-line): New variable. | 7651 | * message.el (message-beginning-of-line): New variable. |
| 7655 | (message-beginning-of-line): Use it. | 7652 | (message-beginning-of-line): Use it. |
| 7656 | 7653 | ||
| 7657 | 2002-10-11 Ted Zlatanov <tzz@lifelogs.com> | 7654 | 2002-10-11 Ted Zlatanov <tzz@lifelogs.com> |
| 7658 | 7655 | ||
| 7659 | * spam.el: more compilation fixes for BBDB | 7656 | * spam.el: more compilation fixes for BBDB |
| 7660 | 7657 | ||
| @@ -7690,7 +7687,7 @@ | |||
| 7690 | (mml2015-unabbrev-trust-alist): New. | 7687 | (mml2015-unabbrev-trust-alist): New. |
| 7691 | (mml2015-gpg-extract-signature-details): Use it. | 7688 | (mml2015-gpg-extract-signature-details): Use it. |
| 7692 | 7689 | ||
| 7693 | 2002-10-10 Ted Zlatanov <tzz@lifelogs.com> | 7690 | 2002-10-10 Ted Zlatanov <tzz@lifelogs.com> |
| 7694 | 7691 | ||
| 7695 | * spam.el: compilation fixes, spam-check-bbdb function is nil if no | 7692 | * spam.el: compilation fixes, spam-check-bbdb function is nil if no |
| 7696 | BBDB installed | 7693 | BBDB installed |
| @@ -7818,7 +7815,7 @@ | |||
| 7818 | 7815 | ||
| 7819 | * pgg.el, pgg-gpg.el, pgg-pgp5.el: Don't depend on luna.el. | 7816 | * pgg.el, pgg-gpg.el, pgg-pgp5.el: Don't depend on luna.el. |
| 7820 | 7817 | ||
| 7821 | 2002-09-29 Daiki Ueno <ueno@unixuser.org> | 7818 | 2002-09-29 Daiki Ueno <ueno@unixuser.org> |
| 7822 | 7819 | ||
| 7823 | * pgg.el: Remove dependency on calist.el. | 7820 | * pgg.el: Remove dependency on calist.el. |
| 7824 | 7821 | ||
| @@ -7859,13 +7856,12 @@ | |||
| 7859 | 7856 | ||
| 7860 | * message.el (message-required-mail-headers): Remove Lines:. | 7857 | * message.el (message-required-mail-headers): Remove Lines:. |
| 7861 | 7858 | ||
| 7862 | 2002-10-03 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 7859 | 2002-10-03 Jesper Harder <harder@ifa.au.dk> |
| 7863 | From Jesper Harder. | ||
| 7864 | 7860 | ||
| 7865 | * gnus-group.el (gnus-group-fetch-charter, | 7861 | * gnus-group.el (gnus-group-fetch-charter, |
| 7866 | gnus-group-fetch-control): Prompt for group if given a prefix | 7862 | gnus-group-fetch-control): Prompt for group if given a prefix |
| 7867 | argument. | 7863 | argument. |
| 7868 | * gnus-sum.el (t): Add gnus-group-fetch-charter and | 7864 | * gnus-sum.el: Add gnus-group-fetch-charter and |
| 7869 | gnus-group-fetch-control to summary key map and menu. | 7865 | gnus-group-fetch-control to summary key map and menu. |
| 7870 | 7866 | ||
| 7871 | 2002-10-03 Paul Jarc <prj@po.cwru.edu> | 7867 | 2002-10-03 Paul Jarc <prj@po.cwru.edu> |
| @@ -7880,13 +7876,12 @@ | |||
| 7880 | (gnus-agent-fetch-selected-article): New function for | 7876 | (gnus-agent-fetch-selected-article): New function for |
| 7881 | gnus-select-article-hook or gnus-mark-article-hook. | 7877 | gnus-select-article-hook or gnus-mark-article-hook. |
| 7882 | 7878 | ||
| 7883 | 2002-10-02 Katsumi Yamaoka <yamaoka@jpl.org> | 7879 | 2002-10-02 Peter von der Ahe <nospam2159@daimi.au.dk> |
| 7884 | From Peter von der Ahe <nospam2159@daimi.au.dk>. | ||
| 7885 | 7880 | ||
| 7886 | * gnus-ems.el (gnus-x-splash): Set coding-system-for-read to | 7881 | * gnus-ems.el (gnus-x-splash): Set coding-system-for-read to |
| 7887 | raw-text. | 7882 | raw-text. |
| 7888 | 7883 | ||
| 7889 | 2002-09-30 Ted Zlatanov <tzz@lifelogs.com> | 7884 | 2002-09-30 Ted Zlatanov <tzz@lifelogs.com> |
| 7890 | 7885 | ||
| 7891 | * spam.el: merged changes from pinard@iro.umontreal.ca (Fran,Ag(Bois | 7886 | * spam.el: merged changes from pinard@iro.umontreal.ca (Fran,Ag(Bois |
| 7892 | Pinard). | 7887 | Pinard). |
| @@ -7927,8 +7922,7 @@ | |||
| 7927 | 7922 | ||
| 7928 | * nnimap.el (nnimap-fixup-unread-after-getting-new-news): Remove. | 7923 | * nnimap.el (nnimap-fixup-unread-after-getting-new-news): Remove. |
| 7929 | 7924 | ||
| 7930 | 2002-09-27 Katsumi Yamaoka <yamaoka@jpl.org> | 7925 | 2002-09-27 Mats Lidell <matsl@contactor.se> |
| 7931 | From Mats Lidell <matsl@contactor.se>. | ||
| 7932 | 7926 | ||
| 7933 | * gnus-art.el (gnus-article-mode-syntax-table): Replace "-" to " ". | 7927 | * gnus-art.el (gnus-article-mode-syntax-table): Replace "-" to " ". |
| 7934 | 7928 | ||
| @@ -8079,20 +8073,19 @@ | |||
| 8079 | * nnmaildir.el (nnmaildir--grp-add-art): fix minimum article | 8073 | * nnmaildir.el (nnmaildir--grp-add-art): fix minimum article |
| 8080 | number when article 1 does not exist. | 8074 | number when article 1 does not exist. |
| 8081 | 8075 | ||
| 8082 | 2002-09-25 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8076 | 2002-09-25 Reiner Steib <Reiner.Steib@gmx.de> |
| 8083 | 8077 | ||
| 8084 | * gnus-art.el (gnus-button-handle-apropos-variable): Fall back to | 8078 | * gnus-art.el (gnus-button-handle-apropos-variable): Fall back to |
| 8085 | apropos if apropos-variable does not exist. | 8079 | apropos if apropos-variable does not exist. |
| 8086 | (gnus-button-guessed-mid-regexp) | 8080 | (gnus-button-guessed-mid-regexp) |
| 8087 | (gnus-button-handle-describe-prefix, gnus-button-alist): Better | 8081 | (gnus-button-handle-describe-prefix, gnus-button-alist): Better |
| 8088 | regexes. From Reiner Steib. | 8082 | regexes. |
| 8089 | (gnus-button-handle-describe-function) | 8083 | (gnus-button-handle-describe-function) |
| 8090 | (gnus-button-handle-describe-variable): Doc fix. From Reiner Steib. | 8084 | (gnus-button-handle-describe-variable): Doc fix. |
| 8091 | (gnus-button-handle-describe-key, gnus-button-handle-apropos) | 8085 | (gnus-button-handle-describe-key, gnus-button-handle-apropos) |
| 8092 | (gnus-button-handle-apropos-command): Doc fix. From Reiner Steib. | 8086 | (gnus-button-handle-apropos-command): Doc fix. |
| 8093 | 8087 | ||
| 8094 | 2002-09-25 Mark A. Hershberger <mah@everybody.org> | 8088 | 2002-09-25 Mark A. Hershberger <mah@everybody.org> (tiny change) |
| 8095 | Trivial patch. | ||
| 8096 | 8089 | ||
| 8097 | * nnrss.el (nnrss-save-server-data): Save nnrss-group-alist in | 8090 | * nnrss.el (nnrss-save-server-data): Save nnrss-group-alist in |
| 8098 | the file. | 8091 | the file. |
| @@ -8114,22 +8107,19 @@ | |||
| 8114 | (mml2015-pgg-encrypt): New functions. | 8107 | (mml2015-pgg-encrypt): New functions. |
| 8115 | (defvar, autoload): Prevent byte-compile warnings. | 8108 | (defvar, autoload): Prevent byte-compile warnings. |
| 8116 | 8109 | ||
| 8117 | 2002-09-24 Katsumi Yamaoka <yamaoka@jpl.org> | 8110 | 2002-09-24 TSUCHIYA Masatoshi <tsuchiya@namazu.org>. |
| 8118 | From TSUCHIYA Masatoshi <tsuchiya@namazu.org>. | ||
| 8119 | 8111 | ||
| 8120 | * gnus-art.el (article-strip-banner): Check for the existence of | 8112 | * gnus-art.el (article-strip-banner): Check for the existence of |
| 8121 | from header. | 8113 | from header. |
| 8122 | 8114 | ||
| 8123 | 2002-09-23 Kai Gro,b_(Bjohann <grossjoh@ls6.informatik.uni-dortmund.de> | 8115 | 2002-09-23 Reiner Steib <Reiner.Steib@gmx.de> |
| 8124 | 8116 | ||
| 8125 | * gnus-art.el (gnus-button-guessed-mid-regexp): Improved regexp. | 8117 | * gnus-art.el (gnus-button-guessed-mid-regexp): Improved regexp. |
| 8126 | (gnus-button-alist): Improved regexp for | 8118 | (gnus-button-alist): Improved regexp for |
| 8127 | gnus-button-handle-mid-or-mail (false positives), fixed | 8119 | gnus-button-handle-mid-or-mail (false positives), fixed |
| 8128 | gnus-button-handle-man entries. | 8120 | gnus-button-handle-man entries. |
| 8129 | From Reiner Steib. | ||
| 8130 | 8121 | ||
| 8131 | 2002-09-23 Paul Jarc <prj@po.cwru.edu> | 8122 | 2002-09-23 Josh Huber <huber@alum.wpi.edu> |
| 8132 | From Josh Huber. | ||
| 8133 | 8123 | ||
| 8134 | * nnmaildir.el (nnmaildir--update-nov): fix wrong-type error when | 8124 | * nnmaildir.el (nnmaildir--update-nov): fix wrong-type error when |
| 8135 | nnmail-extra-headers is non-nil. | 8125 | nnmail-extra-headers is non-nil. |
| @@ -8158,8 +8148,7 @@ | |||
| 8158 | 8148 | ||
| 8159 | * gnus-sum.el (gnus-summary-next-group): Switch to the summary buffer. | 8149 | * gnus-sum.el (gnus-summary-next-group): Switch to the summary buffer. |
| 8160 | 8150 | ||
| 8161 | 2002-09-20 Kai Gro,b_(Bjohann <grossjoh@ls6.informatik.uni-dortmund.de> | 8151 | 2002-09-20 Reiner Steib <Reiner.Steib@gmx.de> |
| 8162 | From Reiner Steib. | ||
| 8163 | 8152 | ||
| 8164 | * gnus-art.el (gnus-button-handle-custom, | 8153 | * gnus-art.el (gnus-button-handle-custom, |
| 8165 | gnus-button-handle-mid-or-mail, | 8154 | gnus-button-handle-mid-or-mail, |
| @@ -8185,10 +8174,10 @@ | |||
| 8185 | 8174 | ||
| 8186 | * message.el (message-completion-alist): Add Reply-To, From, etc. | 8175 | * message.el (message-completion-alist): Add Reply-To, From, etc. |
| 8187 | 8176 | ||
| 8188 | 2002-09-18 Simon Josefsson <jas@extundo.com> | 8177 | 2002-09-18 Nevin Kapur <nevin@jhu.edu> |
| 8189 | 8178 | ||
| 8190 | * nnimap.el (nnimap-request-expire-articles): Make flag setting | 8179 | * nnimap.el (nnimap-request-expire-articles): Make flag setting |
| 8191 | conditional. From Nevin Kapur <nevin@jhu.edu>. | 8180 | conditional. |
| 8192 | 8181 | ||
| 8193 | 2002-09-17 Simon Josefsson <jas@extundo.com> | 8182 | 2002-09-17 Simon Josefsson <jas@extundo.com> |
| 8194 | 8183 | ||
| @@ -8198,8 +8187,7 @@ | |||
| 8198 | when articles are found. Suggested by Nevin Kapur | 8187 | when articles are found. Suggested by Nevin Kapur |
| 8199 | <nevin@jhu.edu>. | 8188 | <nevin@jhu.edu>. |
| 8200 | 8189 | ||
| 8201 | 2002-09-17 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8190 | 2002-09-17 Reiner Steib <Reiner.Steib@gmx.de> |
| 8202 | From Reiner Steib <reiner.steib@gmx.de>. | ||
| 8203 | 8191 | ||
| 8204 | * message.el (message-strip-subject-trailing-was) | 8192 | * message.el (message-strip-subject-trailing-was) |
| 8205 | (message-change-subject, message-add-archive-header) | 8193 | (message-change-subject, message-add-archive-header) |
| @@ -8252,8 +8240,7 @@ | |||
| 8252 | 8240 | ||
| 8253 | * gnus-sum.el (gnus-summary-next-group): Semi-exit only when needed. | 8241 | * gnus-sum.el (gnus-summary-next-group): Semi-exit only when needed. |
| 8254 | 8242 | ||
| 8255 | 2002-09-12 Katsumi Yamaoka <yamaoka@jpl.org> | 8243 | 2002-09-12 John Paul Wallington <jpw@shootybangbang.com>. |
| 8256 | From John Paul Wallington <jpw@shootybangbang.com>. | ||
| 8257 | 8244 | ||
| 8258 | * gnus.el (gnus-visual, gnus-meta): Fix typo. | 8245 | * gnus.el (gnus-visual, gnus-meta): Fix typo. |
| 8259 | 8246 | ||
| @@ -8267,8 +8254,7 @@ | |||
| 8267 | (nnimap-split-rule): Doc fix. | 8254 | (nnimap-split-rule): Doc fix. |
| 8268 | (nnimap-request-expire-articles): Cleanup code. | 8255 | (nnimap-request-expire-articles): Cleanup code. |
| 8269 | 8256 | ||
| 8270 | 2002-09-11 Katsumi Yamaoka <yamaoka@jpl.org> | 8257 | 2002-09-11 TSUCHIYA Masatoshi <tsuchiya@namazu.org>. |
| 8271 | From TSUCHIYA Masatoshi <tsuchiya@namazu.org>. | ||
| 8272 | 8258 | ||
| 8273 | * gnus-art.el (gnus-article-address-banner-alist): New option. | 8259 | * gnus-art.el (gnus-article-address-banner-alist): New option. |
| 8274 | (article-strip-banner): Refer the above option to split banners of | 8260 | (article-strip-banner): Refer the above option to split banners of |
| @@ -8348,10 +8334,10 @@ | |||
| 8348 | * gnus-util.el (gnus-frame-or-window-display-name): Exclude | 8334 | * gnus-util.el (gnus-frame-or-window-display-name): Exclude |
| 8349 | invalid display names. | 8335 | invalid display names. |
| 8350 | 8336 | ||
| 8351 | 2002-08-30 Simon Josefsson <jas@extundo.com> | 8337 | 2002-08-30 Reiner Steib <Reiner.Steib@gmx.de> |
| 8352 | 8338 | ||
| 8353 | * gnus-group.el (gnus-group-fetch-control): Fix typo in last | 8339 | * gnus-group.el (gnus-group-fetch-control): Fix typo in last |
| 8354 | commit. From Reiner Steib <4uce.02.r.steib@gmx.net>. | 8340 | commit. |
| 8355 | 8341 | ||
| 8356 | 2002-08-26 Jesper Harder <harder@ifa.au.dk> | 8342 | 2002-08-26 Jesper Harder <harder@ifa.au.dk> |
| 8357 | 8343 | ||
| @@ -8362,10 +8348,9 @@ | |||
| 8362 | (gnus-group-fetch-control): New function. | 8348 | (gnus-group-fetch-control): New function. |
| 8363 | Add them to the keymap and menu. Require mm-url. | 8349 | Add them to the keymap and menu. Require mm-url. |
| 8364 | 8350 | ||
| 8365 | 2002-08-30 Katsumi Yamaoka <yamaoka@jpl.org> | 8351 | 2002-08-30 Alex Schroeder <alex@emacswiki.org>. |
| 8366 | 8352 | ||
| 8367 | * gnus-mlspl.el (gnus-group-split-fancy): Doc fix. | 8353 | * gnus-mlspl.el (gnus-group-split-fancy): Doc fix. |
| 8368 | From Alex Schroeder <alex@emacswiki.org>. | ||
| 8369 | 8354 | ||
| 8370 | 2002-08-29 Jesper Harder <harder@ifa.au.dk> | 8355 | 2002-08-29 Jesper Harder <harder@ifa.au.dk> |
| 8371 | 8356 | ||
| @@ -8413,10 +8398,10 @@ | |||
| 8413 | * lpath.el: Fbind `frame-parameter', `make-frame-on-display', | 8398 | * lpath.el: Fbind `frame-parameter', `make-frame-on-display', |
| 8414 | `device-connection' and `dfw-device'. | 8399 | `device-connection' and `dfw-device'. |
| 8415 | 8400 | ||
| 8416 | 2002-08-22 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8401 | 2002-08-22 Jochen Hein <jochen@jochen.org> (tiny change) |
| 8417 | 8402 | ||
| 8418 | * gnus-art.el (gnus-emphasis-alist): Strikethru had a lot of false | 8403 | * gnus-art.el (gnus-emphasis-alist): Strikethru had a lot of false |
| 8419 | positives, make it stricter. From Jochen Hein (trivial change). | 8404 | positives, make it stricter. |
| 8420 | 8405 | ||
| 8421 | 2002-08-21 Katsumi Yamaoka <yamaoka@jpl.org> | 8406 | 2002-08-21 Katsumi Yamaoka <yamaoka@jpl.org> |
| 8422 | 8407 | ||
| @@ -8433,8 +8418,7 @@ | |||
| 8433 | 8418 | ||
| 8434 | * lpath.el: Fbind w32-focus-frame and x-focus-frame. | 8419 | * lpath.el: Fbind w32-focus-frame and x-focus-frame. |
| 8435 | 8420 | ||
| 8436 | 2002-08-20 Katsumi Yamaoka <yamaoka@jpl.org> | 8421 | 2002-08-20 $B>.4X(B $B5HB'(B (KOSEKI Yoshinori) <kose@meadowy.org>. |
| 8437 | From $B>.4X(B $B5HB'(B (KOSEKI Yoshinori) <kose@meadowy.org>. | ||
| 8438 | 8422 | ||
| 8439 | * message.el (message-set-auto-save-file-name): Add support for | 8423 | * message.el (message-set-auto-save-file-name): Add support for |
| 8440 | the Cygwin Emacs; the system-type is `cygwin'. | 8424 | the Cygwin Emacs; the system-type is `cygwin'. |
| @@ -8544,7 +8528,7 @@ | |||
| 8544 | 8528 | ||
| 8545 | * gnus.el (gnus-version-number): Bumped version number. | 8529 | * gnus.el (gnus-version-number): Bumped version number. |
| 8546 | 8530 | ||
| 8547 | 2002-08-04 01:48:57 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 8531 | 2002-08-04 01:48:57 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 8548 | 8532 | ||
| 8549 | * gnus.el: Oort Gnus v0.07 is released. | 8533 | * gnus.el: Oort Gnus v0.07 is released. |
| 8550 | 8534 | ||
| @@ -8556,18 +8540,17 @@ | |||
| 8556 | (gnus-article-sort-by-random): New function. | 8540 | (gnus-article-sort-by-random): New function. |
| 8557 | (gnus-thread-sort-by-random): New function. | 8541 | (gnus-thread-sort-by-random): New function. |
| 8558 | 8542 | ||
| 8559 | 2002-08-02 Simon Josefsson <jas@extundo.com> | 8543 | 2002-08-02 Scott A Crosby <scrosby@cs.rice.edu> |
| 8560 | 8544 | ||
| 8561 | * gnus-logic.el (gnus-advanced-integer): Swap arguments in | 8545 | * gnus-logic.el (gnus-advanced-integer): Swap arguments in |
| 8562 | funcall. From Scott A Crosby <scrosby@cs.rice.edu>. | 8546 | funcall. |
| 8563 | 8547 | ||
| 8564 | 2002-07-31 Danny Siu <dsiu@adobe.com> | 8548 | 2002-07-31 Danny Siu <dsiu@adobe.com> |
| 8565 | 8549 | ||
| 8566 | * nnimap.el (nnimap-split-articles): do not call nnmail-fetch-field | 8550 | * nnimap.el (nnimap-split-articles): do not call nnmail-fetch-field |
| 8567 | when splitting malformed messages without message-id | 8551 | when splitting malformed messages without message-id |
| 8568 | 8552 | ||
| 8569 | 2002-07-28 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8553 | 2002-07-28 Niklas Morberg <niklas.morberg@axis.com>. |
| 8570 | From Niklas Morberg <niklas.morberg@axis.com>. | ||
| 8571 | 8554 | ||
| 8572 | * nnweb.el (nnweb-type, nnweb-type-definition) | 8555 | * nnweb.el (nnweb-type, nnweb-type-definition) |
| 8573 | (nnweb-gmane-create-mapping, nnweb-gmane-wash-article) | 8556 | (nnweb-gmane-create-mapping, nnweb-gmane-wash-article) |
| @@ -8611,21 +8594,18 @@ | |||
| 8611 | nnmail-expiry-target to 'delete, so that absolute deletion | 8594 | nnmail-expiry-target to 'delete, so that absolute deletion |
| 8612 | happens when absolute deletion is requested. | 8595 | happens when absolute deletion is requested. |
| 8613 | 8596 | ||
| 8614 | 2002-07-21 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8597 | 2002-07-21 Nevin Kapur <nevin@jhu.edu>. |
| 8615 | From Nevin Kapur <nevin@jhu.edu>. | ||
| 8616 | 8598 | ||
| 8617 | * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting | 8599 | * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting |
| 8618 | headers as empty headers. | 8600 | headers as empty headers. |
| 8619 | 8601 | ||
| 8620 | 2002-07-21 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8602 | 2002-07-21 Jochen Hein <jochen@jochen.org>. |
| 8621 | From Jochen Hein <jochen@jochen.org>. | ||
| 8622 | 8603 | ||
| 8623 | * gnus-art.el (gnus-emphasis-alist): Add strikethrough and | 8604 | * gnus-art.el (gnus-emphasis-alist): Add strikethrough and |
| 8624 | correct typo. | 8605 | correct typo. |
| 8625 | (gnus-emphasis-strikethru): New face. | 8606 | (gnus-emphasis-strikethru): New face. |
| 8626 | 8607 | ||
| 8627 | 2002-07-20 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8608 | 2002-07-20 Jason Merrill <jason@redhat.com>. |
| 8628 | From Jason Merrill <jason@redhat.com>. | ||
| 8629 | 8609 | ||
| 8630 | * nnfolder.el (nnfolder-retrieve-headers): Avoid searching the | 8610 | * nnfolder.el (nnfolder-retrieve-headers): Avoid searching the |
| 8631 | entire file for each of a sequence of missing articles. | 8611 | entire file for each of a sequence of missing articles. |
| @@ -8636,8 +8616,7 @@ | |||
| 8636 | * gnus-sum.el (gnus-summary-insert-new-articles): Count down to | 8616 | * gnus-sum.el (gnus-summary-insert-new-articles): Count down to |
| 8637 | avoid nreverse. | 8617 | avoid nreverse. |
| 8638 | 8618 | ||
| 8639 | 2002-07-14 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8619 | 2002-07-14 Ted Zlatanov <teodor.zlatanov@divine.com> |
| 8640 | From Ted Zlatanov <teodor.zlatanov@divine.com>. | ||
| 8641 | 8620 | ||
| 8642 | * gnus-sum.el (gnus-auto-expirable-marks): Remove `spam'. | 8621 | * gnus-sum.el (gnus-auto-expirable-marks): Remove `spam'. |
| 8643 | (gnus-summary-mode-line-format-alist): Add %h for number of | 8622 | (gnus-summary-mode-line-format-alist): Add %h for number of |
| @@ -8652,25 +8631,24 @@ | |||
| 8652 | (gnus-mark-article-as-read, gnus-mark-article-as-unread) | 8631 | (gnus-mark-article-as-read, gnus-mark-article-as-unread) |
| 8653 | (gnus-mark-article-as-unread, gnus-summary-catchup): Grok spam. | 8632 | (gnus-mark-article-as-unread, gnus-summary-catchup): Grok spam. |
| 8654 | 8633 | ||
| 8655 | 2002-07-10 Simon Josefsson <jas@extundo.com> | 8634 | 2002-07-10 KANEMATSU Daiji <kdaiji@bea.com> |
| 8656 | 8635 | ||
| 8657 | * nnimap.el (nnimap-split-to-groups): Allow group string to be a | 8636 | * nnimap.el (nnimap-split-to-groups): Allow group string to be a |
| 8658 | function. From KANEMATSU Daiji <kdaiji@bea.com>. | 8637 | function. |
| 8659 | 8638 | ||
| 8660 | 2002-07-09 Nevin Kapur <nevin@jhu.edu> | 8639 | 2002-07-09 Nevin Kapur <nevin@jhu.edu> |
| 8661 | 8640 | ||
| 8662 | * gnus-sum.el (gnus-summary-delete-article): Respect group | 8641 | * gnus-sum.el (gnus-summary-delete-article): Respect group |
| 8663 | parameters while expiring. | 8642 | parameters while expiring. |
| 8664 | 8643 | ||
| 8665 | 2002-07-08 Simon Josefsson <jas@extundo.com> | 8644 | 2002-07-08 Henrik Enberg <henrik@enberg.org> |
| 8666 | 8645 | ||
| 8667 | * gnus-art.el (article-make-date-line): Fix string. From Henrik | 8646 | * gnus-art.el (article-make-date-line): Fix string. |
| 8668 | Enberg. | ||
| 8669 | 8647 | ||
| 8670 | 2002-07-08 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8648 | 2002-07-08 Niklas Morberg <niklas.morberg@axis.com> |
| 8671 | 8649 | ||
| 8672 | * gnus-art.el (article-unsplit-urls): Only display MIME when this | 8650 | * gnus-art.el (article-unsplit-urls): Only display MIME when this |
| 8673 | function is called interactively. From Niklas Morberg. | 8651 | function is called interactively. |
| 8674 | 8652 | ||
| 8675 | 2002-07-06 ShengHuo ZHU <zsh@cs.rochester.edu> | 8653 | 2002-07-06 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 8676 | 8654 | ||
| @@ -8692,10 +8670,10 @@ | |||
| 8692 | 8670 | ||
| 8693 | * nnmail.el (nnmail-split-methods): fix custom type. | 8671 | * nnmail.el (nnmail-split-methods): fix custom type. |
| 8694 | 8672 | ||
| 8695 | 2002-07-02 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8673 | 2002-07-02 Niklas Morberg <niklas.morberg@axis.com> |
| 8696 | 8674 | ||
| 8697 | * gnus-art.el (article-unsplit-urls): Keep URL buttonized after | 8675 | * gnus-art.el (article-unsplit-urls): Keep URL buttonized after |
| 8698 | unsplitting. From Niklas Morberg <niklas.morberg@axis.com>. | 8676 | unsplitting. |
| 8699 | 8677 | ||
| 8700 | 2002-07-01 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8678 | 2002-07-01 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> |
| 8701 | 8679 | ||
| @@ -8707,13 +8685,12 @@ | |||
| 8707 | * nntp.el (nntp-via-rlogin-command-switches): New variable. | 8685 | * nntp.el (nntp-via-rlogin-command-switches): New variable. |
| 8708 | (nntp-open-via-rlogin-and-telnet): Re-revert; use the var above. | 8686 | (nntp-open-via-rlogin-and-telnet): Re-revert; use the var above. |
| 8709 | 8687 | ||
| 8710 | 2002-06-28 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8688 | 2002-06-28 Katsumi Yamaoka <yamaoka@jpl.org> |
| 8711 | 8689 | ||
| 8712 | * message.el (message-font-lock-keywords): Don't fontify | 8690 | * message.el (message-font-lock-keywords): Don't fontify |
| 8713 | headers in the message body, only in the header. | 8691 | headers in the message body, only in the header. |
| 8714 | (message-font-lock-make-header-matcher): New function, used by | 8692 | (message-font-lock-make-header-matcher): New function, used by |
| 8715 | message-font-lock-keywords. | 8693 | message-font-lock-keywords. |
| 8716 | From Katsumi Yamaoka <yamaoka@jpl.org>. | ||
| 8717 | 8694 | ||
| 8718 | 2002-06-28 Katsumi Yamaoka <yamaoka@jpl.org> | 8695 | 2002-06-28 Katsumi Yamaoka <yamaoka@jpl.org> |
| 8719 | 8696 | ||
| @@ -8766,24 +8743,22 @@ | |||
| 8766 | (last, coerce, subseq): Remove compiler macros for those built-in | 8743 | (last, coerce, subseq): Remove compiler macros for those built-in |
| 8767 | or unused functions. | 8744 | or unused functions. |
| 8768 | 8745 | ||
| 8769 | 2002-06-17 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8746 | 2002-06-17 Simon Josefsson <jas@extundo.com> |
| 8770 | 8747 | ||
| 8771 | * gnus-start.el (gnus-clear-system, gnus-read-newsrc-file): Make | 8748 | * gnus-start.el (gnus-clear-system, gnus-read-newsrc-file): Make |
| 8772 | sure to write byte-compiled versions of gnus-*-format-alist to | 8749 | sure to write byte-compiled versions of gnus-*-format-alist to |
| 8773 | .newsrc.eld. From Simon Josefsson. | 8750 | .newsrc.eld. |
| 8774 | 8751 | ||
| 8775 | 2002-06-16 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8752 | 2002-06-16 Bj,Ax(Brn Mork <bmork@dod.no> |
| 8776 | 8753 | ||
| 8777 | * gnus-agent.el (gnus-agent-read-servers) | 8754 | * gnus-agent.el (gnus-agent-read-servers) |
| 8778 | (gnus-agent-write-servers): Put server name (string like | 8755 | (gnus-agent-write-servers): Put server name (string like |
| 8779 | "nnchoke:frumple") in the file instead of a server specification | 8756 | "nnchoke:frumple") in the file instead of a server specification |
| 8780 | (Lisp expression like (nnchoke "frumple" ...parameters...)). | 8757 | (Lisp expression like (nnchoke "frumple" ...parameters...)). |
| 8781 | From Bj,Ax(Brn Mork <bmork@dod.no>. | ||
| 8782 | 8758 | ||
| 8783 | 2002-06-16 Simon Josefsson <jas@extundo.com> | 8759 | 2002-06-16 Reiner Steib <Reiner.Steib@gmx.de> |
| 8784 | 8760 | ||
| 8785 | * gnus-cache.el (gnus-cache-remove-article): n is &optional. From | 8761 | * gnus-cache.el (gnus-cache-remove-article): n is &optional. |
| 8786 | Reiner Steib <4uce.02.r.steib@gmx.net>. | ||
| 8787 | 8762 | ||
| 8788 | 2002-06-15 ShengHuo ZHU <zsh@cs.rochester.edu> | 8763 | 2002-06-15 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 8789 | 8764 | ||
| @@ -8819,8 +8794,10 @@ | |||
| 8819 | * gnus-int.el (gnus-request-move-article): Agent expire article if | 8794 | * gnus-int.el (gnus-request-move-article): Agent expire article if |
| 8820 | successfuly moved. | 8795 | successfuly moved. |
| 8821 | 8796 | ||
| 8797 | 2002-06-11 Niklas Morberg <niklas.morberg@axis.com> | ||
| 8798 | |||
| 8822 | * nnweb.el (nnweb-google-create-mapping): Honors the value of | 8799 | * nnweb.el (nnweb-google-create-mapping): Honors the value of |
| 8823 | nnweb-max-hits. From Niklas Morberg <niklas.morberg@axis.com>. | 8800 | nnweb-max-hits. |
| 8824 | 8801 | ||
| 8825 | 2002-06-10 Simon Josefsson <jas@extundo.com> | 8802 | 2002-06-10 Simon Josefsson <jas@extundo.com> |
| 8826 | 8803 | ||
| @@ -8869,11 +8846,10 @@ | |||
| 8869 | * nnmail.el (nnmail-mail-splitting-decodes): New variable. | 8846 | * nnmail.el (nnmail-mail-splitting-decodes): New variable. |
| 8870 | (nnmail-article-group): Use it. | 8847 | (nnmail-article-group): Use it. |
| 8871 | 8848 | ||
| 8872 | 2002-05-30 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8849 | 2002-05-30 Jesper Harder <harder@ifa.au.dk> |
| 8873 | 8850 | ||
| 8874 | * gnus-msg.el (gnus-inews-yank-articles): Merge split header lines | 8851 | * gnus-msg.el (gnus-inews-yank-articles): Merge split header lines |
| 8875 | so that code reading them won't be surprised. From Jesper Harder | 8852 | so that code reading them won't be surprised. |
| 8876 | <harder@ifa.au.dk>. | ||
| 8877 | 8853 | ||
| 8878 | 2002-05-29 Simon Josefsson <jas@extundo.com> | 8854 | 2002-05-29 Simon Josefsson <jas@extundo.com> |
| 8879 | 8855 | ||
| @@ -8890,11 +8866,10 @@ | |||
| 8890 | 8866 | ||
| 8891 | * gnus-group.el (gnus-group-line-format): Doc fix. | 8867 | * gnus-group.el (gnus-group-line-format): Doc fix. |
| 8892 | 8868 | ||
| 8893 | 2002-05-28 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8869 | 2002-05-28 Jesper Harder <harder@ifa.au.dk> |
| 8894 | 8870 | ||
| 8895 | * gnus-msg.el (gnus-inews-yank-articles): Unfold headers of | 8871 | * gnus-msg.el (gnus-inews-yank-articles): Unfold headers of |
| 8896 | original article before yanking. From Jesper Harder | 8872 | original article before yanking. |
| 8897 | <harder@ifa.au.dk>. | ||
| 8898 | 8873 | ||
| 8899 | 2002-05-26 Simon Josefsson <jas@extundo.com> | 8874 | 2002-05-26 Simon Josefsson <jas@extundo.com> |
| 8900 | 8875 | ||
| @@ -8920,22 +8895,23 @@ | |||
| 8920 | (gnus-summary-prepare-threads): Avoid simplifying every Subject | 8895 | (gnus-summary-prepare-threads): Avoid simplifying every Subject |
| 8921 | twice by saving the simplified subject string in simp-subject. | 8896 | twice by saving the simplified subject string in simp-subject. |
| 8922 | 8897 | ||
| 8923 | 2002-05-23 Simon Josefsson <jas@extundo.com> | 8898 | 2002-05-23 Benjamin Rutt <rutt+news@cis.ohio-state.edu> (tiny change) |
| 8924 | 8899 | ||
| 8925 | * gnus-msg.el (gnus-confirm-mail-reply-to-news): Typo. Trivial | 8900 | * gnus-msg.el (gnus-confirm-mail-reply-to-news): Typo. |
| 8926 | change from Benjamin Rutt <rutt+news@cis.ohio-state.edu>. | ||
| 8927 | 8901 | ||
| 8928 | * nnweb.el (nnweb-type): Remove dejanewsold. Trivial change from | 8902 | 2002-05-23 Niklas Morberg <niklas.morberg@axis.com> (tiny change) |
| 8929 | Niklas Morberg <niklas.morberg@axis.com>. | 8903 | |
| 8904 | * nnweb.el (nnweb-type): Remove dejanewsold. | ||
| 8930 | 8905 | ||
| 8931 | 2002-05-22 Simon Josefsson <jas@extundo.com> | 8906 | 2002-05-22 Simon Josefsson <jas@extundo.com> |
| 8932 | 8907 | ||
| 8933 | * sieve.el (sieve-change-region): Define it before it is used. | 8908 | * sieve.el (sieve-change-region): Define it before it is used. |
| 8934 | 8909 | ||
| 8910 | 2002-05-22 Benjamin Rutt <rutt+news@cis.ohio-state.edu> | ||
| 8911 | |||
| 8935 | * gnus-msg.el (gnus-confirm-mail-reply-to-news) | 8912 | * gnus-msg.el (gnus-confirm-mail-reply-to-news) |
| 8936 | (gnus-summary-reply): Ask for confirmation when replying to news. | 8913 | (gnus-summary-reply): Ask for confirmation when replying to news. |
| 8937 | Defaults to not ask. From Benjamin Rutt | 8914 | Defaults to not ask. |
| 8938 | <rutt+news@cis.ohio-state.edu>. | ||
| 8939 | 8915 | ||
| 8940 | * nnimap.el (nnimap-nov-is-evil): Improve doc. | 8916 | * nnimap.el (nnimap-nov-is-evil): Improve doc. |
| 8941 | 8917 | ||
| @@ -8990,10 +8966,13 @@ | |||
| 8990 | * nnmail.el (nnmail-cache-insert): Change group to required, | 8966 | * nnmail.el (nnmail-cache-insert): Change group to required, |
| 8991 | removed code which tried to figure out the group. | 8967 | removed code which tried to figure out the group. |
| 8992 | 8968 | ||
| 8993 | 2002-05-13 Josh Huber <huber@alum.wpi.edu> | 8969 | 2002-05-13 Hans de Graaff <hans@degraaff.org> |
| 8994 | 8970 | ||
| 8995 | * mml.el (mml-generate-mime-1): Fix mml generation for signed only | 8971 | * mml.el (mml-generate-mime-1): Fix mml generation for signed only |
| 8996 | messages. From Hans de Graaff <hans@degraaff.org>. | 8972 | messages. |
| 8973 | |||
| 8974 | 2002-05-13 Josh Huber <huber@alum.wpi.edu> | ||
| 8975 | |||
| 8997 | * nnml.el (nnml-request-accept-article): Pass in the group name to | 8976 | * nnml.el (nnml-request-accept-article): Pass in the group name to |
| 8998 | nnmail-cache-insert, since it's available. | 8977 | nnmail-cache-insert, since it's available. |
| 8999 | 8978 | ||
| @@ -9001,8 +8980,7 @@ | |||
| 9001 | 8980 | ||
| 9002 | * nndoc.el (nndoc-mime-digest-type-p): Set proper file-end. | 8981 | * nndoc.el (nndoc-mime-digest-type-p): Set proper file-end. |
| 9003 | 8982 | ||
| 9004 | 2002-05-08 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 8983 | 2002-05-08 Florian Weimer <fw@deneb.enyo.de> |
| 9005 | From Florian Weimer <fw@deneb.enyo.de>. | ||
| 9006 | 8984 | ||
| 9007 | * gnus.el (subscribed): New group parameter. | 8985 | * gnus.el (subscribed): New group parameter. |
| 9008 | (gnus-find-subscribed-addresses): Use it. | 8986 | (gnus-find-subscribed-addresses): Use it. |
| @@ -9022,16 +9000,15 @@ | |||
| 9022 | parenthesis for "<" and ">". Suggested by Andreas Schwab | 9000 | parenthesis for "<" and ">". Suggested by Andreas Schwab |
| 9023 | <schwab@suse.de>. | 9001 | <schwab@suse.de>. |
| 9024 | 9002 | ||
| 9025 | 2002-05-07 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 9003 | 2002-05-07 Josh Huber <huber@alum.wpi.edu> |
| 9026 | 9004 | ||
| 9027 | * nnmail.el (nnmail-cache-insert): Prefer group-art over group | 9005 | * nnmail.el (nnmail-cache-insert): Prefer group-art over group |
| 9028 | when intuiting the group the message is written to. From Josh | 9006 | when intuiting the group the message is written to. |
| 9029 | Huber <huber@alum.wpi.edu>. | ||
| 9030 | 9007 | ||
| 9031 | 2002-05-06 Simon Josefsson <jas@extundo.com> | 9008 | 2002-05-06 Matt Armstrong <matt@lickey.com> |
| 9032 | 9009 | ||
| 9033 | * gnus-topic.el (gnus-group-topic-parameters): Work when group | 9010 | * gnus-topic.el (gnus-group-topic-parameters): Work when group |
| 9034 | buffer doesn't show group. From Matt Armstrong <matt@lickey.com>. | 9011 | buffer doesn't show group. |
| 9035 | 9012 | ||
| 9036 | 2002-05-06 Josh Huber <huber@alum.wpi.edu> | 9013 | 2002-05-06 Josh Huber <huber@alum.wpi.edu> |
| 9037 | 9014 | ||
| @@ -9078,7 +9055,7 @@ | |||
| 9078 | server. | 9055 | server. |
| 9079 | (nnimap-mailbox-info): defvar instead of defvoo. | 9056 | (nnimap-mailbox-info): defvar instead of defvoo. |
| 9080 | 9057 | ||
| 9081 | 2002-05-01 20:09:21 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 9058 | 2002-05-01 20:09:21 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 9082 | 9059 | ||
| 9083 | * gnus.el: Oort Gnus v0.06 is released. | 9060 | * gnus.el: Oort Gnus v0.06 is released. |
| 9084 | 9061 | ||
| @@ -9188,8 +9165,7 @@ | |||
| 9188 | 9165 | ||
| 9189 | * gnus-art.el (article-unsplit-urls): Allow trailing SPC. | 9166 | * gnus-art.el (article-unsplit-urls): Allow trailing SPC. |
| 9190 | 9167 | ||
| 9191 | 2002-04-24 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 9168 | 2002-04-24 Dan Christensen <jdc+news@uwo.ca> |
| 9192 | From Dan Christensen <jdc+news@uwo.ca>. | ||
| 9193 | 9169 | ||
| 9194 | * nndoc.el (nndoc-type-alist, nndoc-lanl-gov-announce-type-p) | 9170 | * nndoc.el (nndoc-type-alist, nndoc-lanl-gov-announce-type-p) |
| 9195 | (nndoc-transform-lanl-gov-announce, nndoc-generate-lanl-gov-head): | 9171 | (nndoc-transform-lanl-gov-announce, nndoc-generate-lanl-gov-head): |
| @@ -9211,11 +9187,10 @@ | |||
| 9211 | (gnus-netrc-get, gnus-netrc-machine, gnus-parse-netrc): Aliased to | 9187 | (gnus-netrc-get, gnus-netrc-machine, gnus-parse-netrc): Aliased to |
| 9212 | new code in netrc.el. | 9188 | new code in netrc.el. |
| 9213 | 9189 | ||
| 9214 | 2002-04-23 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 9190 | 2002-04-23 Matthieu Moy <Matthieu.Moy@imag.fr> |
| 9215 | 9191 | ||
| 9216 | * gnus-msg.el (gnus-summary-resend-message-edit): Remove | 9192 | * gnus-msg.el (gnus-summary-resend-message-edit): Remove |
| 9217 | message-ignored-resent-headers, too. From Matthieu Moy | 9193 | message-ignored-resent-headers, too. |
| 9218 | <Matthieu.Moy@imag.fr>. | ||
| 9219 | 9194 | ||
| 9220 | 2002-04-22 Bj,Av(Brn Torkelsson <torkel@acc.umu.se> | 9195 | 2002-04-22 Bj,Av(Brn Torkelsson <torkel@acc.umu.se> |
| 9221 | 9196 | ||
| @@ -9280,8 +9255,7 @@ | |||
| 9280 | * message.el (message-gen-unsubscribed-mft): accept a prefix | 9255 | * message.el (message-gen-unsubscribed-mft): accept a prefix |
| 9281 | argument so CC can be included with C-u C-c C-f C-a | 9256 | argument so CC can be included with C-u C-c C-f C-a |
| 9282 | 9257 | ||
| 9283 | 2002-04-17 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 9258 | 2002-04-17 Ted Zlatanov <teodor.zlatanov@divine.com> |
| 9284 | From Ted Zlatanov <teodor.zlatanov@divine.com>. | ||
| 9285 | 9259 | ||
| 9286 | * spam.el (spam-whitelist, spam-blacklist, spam-enter-whitelist): | 9260 | * spam.el (spam-whitelist, spam-blacklist, spam-enter-whitelist): |
| 9287 | Improve docstring. | 9261 | Improve docstring. |
| @@ -9318,11 +9292,10 @@ | |||
| 9318 | * nnml.el (nnml-save-nov, nnml-generate-nov-file): | 9292 | * nnml.el (nnml-save-nov, nnml-generate-nov-file): |
| 9319 | * pop3.el (pop3-md5): Don't hardcode point-min == 1. | 9293 | * pop3.el (pop3-md5): Don't hardcode point-min == 1. |
| 9320 | 9294 | ||
| 9321 | 2002-04-12 Katsumi Yamaoka <yamaoka@jpl.org> | 9295 | 2002-04-12 Daiki Ueno <ueno@unixuser.org> |
| 9322 | 9296 | ||
| 9323 | * gnus-srvr.el (gnus-server-set-info): Clear | 9297 | * gnus-srvr.el (gnus-server-set-info): Clear |
| 9324 | `gnus-server-method-cache' when `gnus-server-alist' is changed. | 9298 | `gnus-server-method-cache' when `gnus-server-alist' is changed. |
| 9325 | From Daiki Ueno <ueno@unixuser.org>. | ||
| 9326 | 9299 | ||
| 9327 | 2002-04-11 Simon Josefsson <jas@extundo.com> | 9300 | 2002-04-11 Simon Josefsson <jas@extundo.com> |
| 9328 | 9301 | ||
| @@ -9476,20 +9449,18 @@ | |||
| 9476 | 9449 | ||
| 9477 | * message.el (message-mode): Fix doc. | 9450 | * message.el (message-mode): Fix doc. |
| 9478 | 9451 | ||
| 9479 | 2002-03-25 Simon Josefsson <jas@extundo.com> | 9452 | 2002-03-25 Matthieu Moy <Matthieu.Moy@imag.fr> |
| 9480 | 9453 | ||
| 9481 | * message.el (message-subject-re-regexp): Skip Re[42]: junk. From | 9454 | * message.el (message-subject-re-regexp): Skip Re[42]: junk. |
| 9482 | Matthieu Moy <Matthieu.Moy@imag.fr>. | ||
| 9483 | 9455 | ||
| 9484 | 2002-03-24 Jesper Harder <harder@ifa.au.dk> | 9456 | 2002-03-24 Jesper Harder <harder@ifa.au.dk> |
| 9485 | 9457 | ||
| 9486 | * mml-sec.el (mml-unsecure-message): Add docstring. | 9458 | * mml-sec.el (mml-unsecure-message): Add docstring. |
| 9487 | 9459 | ||
| 9488 | 2002-03-23 ShengHuo ZHU <zsh@cs.rochester.edu> | 9460 | 2002-03-23 Andre Srinivasan <andre@slamdunknetworks.com> (tiny change) |
| 9489 | 9461 | ||
| 9490 | * nnmail.el (nnmail-large-newsgroup): Fix doc, allow non-numeric | 9462 | * nnmail.el (nnmail-large-newsgroup): Fix doc, allow non-numeric |
| 9491 | value. | 9463 | value. |
| 9492 | Trivial change from andre@slamdunknetworks.com | ||
| 9493 | 9464 | ||
| 9494 | 2002-03-22 Josh Huber <huber@alum.wpi.edu> | 9465 | 2002-03-22 Josh Huber <huber@alum.wpi.edu> |
| 9495 | 9466 | ||
| @@ -9517,8 +9488,9 @@ | |||
| 9517 | * message.el (message-font-lock-keywords): Support multi-line MML | 9488 | * message.el (message-font-lock-keywords): Support multi-line MML |
| 9518 | tags. | 9489 | tags. |
| 9519 | 9490 | ||
| 9491 | 2002-03-21 L,Bu(Brentey K,Ba(Broly <lorentey@elte.hu> | ||
| 9492 | |||
| 9520 | * gnus-sum.el (gnus-print-buffer): Remove gnus-decoration. | 9493 | * gnus-sum.el (gnus-print-buffer): Remove gnus-decoration. |
| 9521 | Trivial change from lorentey@elte.hu (L,Bu(Brentey K,Aa(Broly) | ||
| 9522 | 9494 | ||
| 9523 | 2002-03-20 Katsumi Yamaoka <yamaoka@jpl.org> | 9495 | 2002-03-20 Katsumi Yamaoka <yamaoka@jpl.org> |
| 9524 | 9496 | ||
| @@ -9542,30 +9514,28 @@ | |||
| 9542 | (gnus-sum-thread-tree-leaf-with-other) | 9514 | (gnus-sum-thread-tree-leaf-with-other) |
| 9543 | (gnus-sum-thread-tree-single-leaf): Make customizable. | 9515 | (gnus-sum-thread-tree-single-leaf): Make customizable. |
| 9544 | 9516 | ||
| 9545 | 2002-03-16 Simon Josefsson <jas@extundo.com> | 9517 | 2002-03-16 Francis Litterio <franl@world.std.com> |
| 9546 | 9518 | ||
| 9547 | * gnus-util.el (gnus-extract-address-components): Don't break on | 9519 | * gnus-util.el (gnus-extract-address-components): Don't break on |
| 9548 | names such as James "Kibo" Parry. From Francis Litterio | 9520 | names such as James "Kibo" Parry. |
| 9549 | <franl@world.std.com>. | ||
| 9550 | 9521 | ||
| 9551 | 2002-03-13 Simon Josefsson <jas@extundo.com> | 9522 | 2002-03-13 Pavel Jan,Am(Bk <Pavel@Janik.cz> |
| 9552 | 9523 | ||
| 9553 | * pop3.el (pop3-open-server): Revert multibyte change. From | 9524 | * pop3.el (pop3-open-server): Revert multibyte change. |
| 9554 | Pavel@Janik.cz (Pavel Jan,Am(Bk). | ||
| 9555 | 9525 | ||
| 9556 | * message.el (message-send-mail-with-qmail): Make it work. From | 9526 | * message.el (message-send-mail-with-qmail): Make it work. |
| 9557 | Pavel@Janik.cz (Pavel Jan,Am(Bk). | ||
| 9558 | 9527 | ||
| 9559 | 2002-03-13 Josh Huber <huber@alum.wpi.edu> | 9528 | 2002-03-13 Josh Huber <huber@alum.wpi.edu> |
| 9560 | 9529 | ||
| 9561 | * message.el (message-make-mft): Set case-fold-search while | 9530 | * message.el (message-make-mft): Set case-fold-search while |
| 9562 | generating the MFT. Also, a little cleanup in the MFT code. | 9531 | generating the MFT. Also, a little cleanup in the MFT code. |
| 9563 | 9532 | ||
| 9564 | 2002-03-12 Simon Josefsson <jas@extundo.com> | 9533 | 2002-03-12 Faried Nawaz <fn@hungry.org> (tiny change) |
| 9565 | 9534 | ||
| 9566 | * message.el (message-qmail-inject-args): May be function. | 9535 | * message.el (message-qmail-inject-args): May be function. Adjust |
| 9567 | (message-send-mail-with-qmail): Call function if m-q-i-a is | 9536 | doc string and custom type. |
| 9568 | function. From fn@hungry.org (Faried Nawaz). | 9537 | (message-send-mail-with-qmail): Call function if m-q-i-a is a |
| 9538 | function. | ||
| 9569 | 9539 | ||
| 9570 | 2002-03-12 ShengHuo ZHU <zsh@cs.rochester.edu> | 9540 | 2002-03-12 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 9571 | 9541 | ||
| @@ -9587,26 +9557,26 @@ | |||
| 9587 | * nnslashdot.el (nnslashdot-request-article): Remove javascript | 9557 | * nnslashdot.el (nnslashdot-request-article): Remove javascript |
| 9588 | too. | 9558 | too. |
| 9589 | 9559 | ||
| 9590 | 2002-03-09 ShengHuo ZHU <zsh@cs.rochester.edu> | 9560 | 2002-03-09 Andre Srinivasan <andre@slamdunknetworks.com> (tiny change) |
| 9591 | 9561 | ||
| 9592 | * gnus-sum.el (gnus-summary-save-parts-default-mime): Remove | 9562 | * gnus-sum.el (gnus-summary-save-parts-default-mime): Remove |
| 9593 | duplication. | 9563 | duplication. |
| 9594 | (gnus-summary-save-parts-type-history): Ditto. | 9564 | (gnus-summary-save-parts-type-history): Ditto. |
| 9595 | (gnus-summary-save-parts-last-directory): Ditto. | 9565 | (gnus-summary-save-parts-last-directory): Ditto. |
| 9596 | Trivial change from andre@slamdunknetworks.com | ||
| 9597 | 9566 | ||
| 9598 | 2002-03-09 Paul Jarc <prj@po.cwru.edu> | 9567 | 2002-03-09 Paul Jarc <prj@po.cwru.edu> |
| 9599 | 9568 | ||
| 9600 | * gnus-start.el (gnus-auto-subscribed-groups): Include nnmaildir. | 9569 | * gnus-start.el (gnus-auto-subscribed-groups): Include nnmaildir. |
| 9601 | 9570 | ||
| 9571 | 2002-03-06 Matthieu Moy <Matthieu.Moy@imag.fr> | ||
| 9572 | |||
| 9573 | * gnus-msg.el (gnus-summary-resend-message-edit): New function. | ||
| 9574 | |||
| 9602 | 2002-03-06 ShengHuo ZHU <zsh@cs.rochester.edu> | 9575 | 2002-03-06 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 9603 | 9576 | ||
| 9604 | * nnslashdot.el (nnslashdot-request-article): Use "<!-- no ad 6 | 9577 | * nnslashdot.el (nnslashdot-request-article): Use "<!-- no ad 6 |
| 9605 | -->" as the end of the first article. | 9578 | -->" as the end of the first article. |
| 9606 | 9579 | ||
| 9607 | * gnus-msg.el (gnus-summary-resend-message-edit): New function. | ||
| 9608 | From Matthieu Moy <Matthieu.Moy@imag.fr> | ||
| 9609 | |||
| 9610 | * message.el (message-add-action): Use add-to-list. | 9580 | * message.el (message-add-action): Use add-to-list. |
| 9611 | (message-delete-action): New function. | 9581 | (message-delete-action): New function. |
| 9612 | 9582 | ||
| @@ -9668,17 +9638,15 @@ | |||
| 9668 | completing-read. | 9638 | completing-read. |
| 9669 | (mm-view-pkcs7-decrypt): CRLF->LF. | 9639 | (mm-view-pkcs7-decrypt): CRLF->LF. |
| 9670 | 9640 | ||
| 9671 | 2002-03-04 Paul Jarc <prj@po.cwru.edu> | 9641 | 2002-03-04 Teodor Zlatanov <teodor.zlatanov@divine.com> |
| 9672 | 9642 | ||
| 9673 | * message.el (message-hierarchical-addresses): New variable. | 9643 | * message.el (message-hierarchical-addresses): New variable. |
| 9674 | (message-get-reply-headers): Use it. | 9644 | (message-get-reply-headers): Use it. |
| 9675 | From Ted Zlatanov <teodor.zlatanov@divine.com> | ||
| 9676 | 9645 | ||
| 9677 | 2002-03-03 ShengHuo ZHU <zsh@cs.rochester.edu> | 9646 | 2002-03-03 Geoff Greene <ggreene@wpi.edu> (tiny change) |
| 9678 | 9647 | ||
| 9679 | * message.el (message-mode): If buffer-file-name, don't set auto | 9648 | * message.el (message-mode): If buffer-file-name, don't set auto |
| 9680 | save file name. | 9649 | save file name. |
| 9681 | Trivial change from Geoff Greene <ggreene@wpi.edu> | ||
| 9682 | 9650 | ||
| 9683 | 2002-03-02 ShengHuo ZHU <zsh@cs.rochester.edu> | 9651 | 2002-03-02 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 9684 | 9652 | ||
| @@ -9725,11 +9693,12 @@ | |||
| 9725 | * gnus-sum.el (gnus-articles-to-read): Use large-newsgroup-initial. | 9693 | * gnus-sum.el (gnus-articles-to-read): Use large-newsgroup-initial. |
| 9726 | (gnus-summary-insert-old-articles): Ditto. | 9694 | (gnus-summary-insert-old-articles): Ditto. |
| 9727 | 9695 | ||
| 9728 | 2002-02-26 ShengHuo ZHU <zsh@cs.rochester.edu> | 9696 | 2002-02-26 TSUCHIYA Masatoshi <tsuchiya@namazu.org> |
| 9729 | 9697 | ||
| 9730 | * gnus-sum.el (gnus-articles-to-read): `gnus-large-newsgroup' is | 9698 | * gnus-sum.el (gnus-articles-to-read): `gnus-large-newsgroup' is |
| 9731 | used as the default answer of the question, "How many articles?". | 9699 | used as the default answer of the question, "How many articles?". |
| 9732 | From TSUCHIYA Masatoshi <tsuchiya@namazu.org> | 9700 | |
| 9701 | 2002-02-26 ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 9733 | 9702 | ||
| 9734 | * nnagent.el (nnagent-retrieve-headers): Remove articles with | 9703 | * nnagent.el (nnagent-retrieve-headers): Remove articles with |
| 9735 | small numbers. | 9704 | small numbers. |
| @@ -9738,14 +9707,15 @@ | |||
| 9738 | 9707 | ||
| 9739 | * deuglify.el: Fix comments. | 9708 | * deuglify.el: Fix comments. |
| 9740 | 9709 | ||
| 9710 | 2002-02-23 Andre Srinivasan <andre@slamdunknetworks.com> (tiny change) | ||
| 9711 | |||
| 9712 | * mml.el (mml-generate-mime-1): Add cdr. | ||
| 9713 | |||
| 9741 | 2002-02-23 ShengHuo ZHU <zsh@cs.rochester.edu> | 9714 | 2002-02-23 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 9742 | 9715 | ||
| 9743 | * html2text.el (html2text-clean-anchor): If there is no HREF, | 9716 | * html2text.el (html2text-clean-anchor): If there is no HREF, |
| 9744 | insert nothing. | 9717 | insert nothing. |
| 9745 | 9718 | ||
| 9746 | * mml.el (mml-generate-mime-1): Add cdr. | ||
| 9747 | From: andre@slamdunknetworks.com | ||
| 9748 | |||
| 9749 | * mm-view.el (mm-text-html-renderer-alist): Add html2text. | 9719 | * mm-view.el (mm-text-html-renderer-alist): Add html2text. |
| 9750 | (mm-text-html-washer-alist): Ditto. | 9720 | (mm-text-html-washer-alist): Ditto. |
| 9751 | 9721 | ||
| @@ -9761,11 +9731,15 @@ | |||
| 9761 | 9731 | ||
| 9762 | * deuglify.el: Change copy right. Add autoload. Add coding-system. | 9732 | * deuglify.el: Change copy right. Add autoload. Add coding-system. |
| 9763 | 9733 | ||
| 9764 | * deuglify.el: New file. The original file name is | 9734 | 2002-02-22 Raymond Scholz <rscholz@zonix.de> |
| 9765 | gnus-outlook-deuglify.el from Raymond Scholz <rscholz@zonix.de>. | 9735 | |
| 9736 | * deuglify.el: New file. The original file name is | ||
| 9737 | gnus-outlook-deuglify.el. | ||
| 9738 | |||
| 9739 | 2002-02-22 Andre Srinivasan <andre@slamdunknetworks.com> (tiny change) | ||
| 9766 | 9740 | ||
| 9767 | * mm-decode.el (mm-display-external): Use | 9741 | * mm-decode.el (mm-display-external): Use |
| 9768 | mm-file-name-rewrite-functions. From <andre@slamdunknetworks.com> | 9742 | mm-file-name-rewrite-functions. |
| 9769 | 9743 | ||
| 9770 | 2002-02-22 Paul Jarc <prj@po.cwru.edu> | 9744 | 2002-02-22 Paul Jarc <prj@po.cwru.edu> |
| 9771 | 9745 | ||
| @@ -9801,17 +9775,19 @@ | |||
| 9801 | 9775 | ||
| 9802 | * gnus-art.el (gnus-article-edit-done): Widen the buffer. | 9776 | * gnus-art.el (gnus-article-edit-done): Widen the buffer. |
| 9803 | 9777 | ||
| 9778 | * message.el (message-send-mail): Be talkative. | ||
| 9779 | |||
| 9780 | 2002-02-20 TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp> | ||
| 9781 | |||
| 9804 | * gnus-group.el (gnus-group-name-decode): Don't test | 9782 | * gnus-group.el (gnus-group-name-decode): Don't test |
| 9805 | multibyte-string, because it breaks XEmacs. | 9783 | multibyte-string, because it breaks XEmacs. |
| 9806 | From: TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp> | ||
| 9807 | 9784 | ||
| 9808 | * message.el (message-send-mail): Be talkative. | 9785 | 2002-02-20 Reiner Steib <Reiner.Steib@gmx.de> |
| 9809 | 9786 | ||
| 9810 | * mm-decode.el (mm-inlined-types): Add application/x-emacs-lisp. | 9787 | * mm-decode.el (mm-inlined-types): Add application/x-emacs-lisp. |
| 9811 | (mm-automatic-display): Ditto. | 9788 | (mm-automatic-display): Ditto. |
| 9812 | 9789 | ||
| 9813 | * mailcap.el (mailcap-mime-data): Ditto. | 9790 | * mailcap.el (mailcap-mime-data): Ditto. |
| 9814 | From: Reiner Steib <4uce.02.r.steib@gmx.net> | ||
| 9815 | 9791 | ||
| 9816 | 2002-02-20 Katsumi Yamaoka <yamaoka@jpl.org> | 9792 | 2002-02-20 Katsumi Yamaoka <yamaoka@jpl.org> |
| 9817 | 9793 | ||
| @@ -9853,10 +9829,10 @@ | |||
| 9853 | 9829 | ||
| 9854 | * nnultimate.el (nnultimate-retrieve-headers): Clean up. | 9830 | * nnultimate.el (nnultimate-retrieve-headers): Clean up. |
| 9855 | 9831 | ||
| 9856 | 2002-02-18 Paul Jarc <prj@po.cwru.edu> | 9832 | 2002-02-18 Mark Thomas <mthomas@cmu.edu> |
| 9857 | 9833 | ||
| 9858 | * gnus-util.el (gnus-parent-id): Ignore trailing whitespace in the | 9834 | * gnus-util.el (gnus-parent-id): Ignore trailing whitespace in the |
| 9859 | References header field. From Mark Thomas <mthomas@cmu.edu>. | 9835 | References header field. |
| 9860 | 9836 | ||
| 9861 | 2002-02-18 ShengHuo ZHU <zsh@cs.rochester.edu> | 9837 | 2002-02-18 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 9862 | 9838 | ||
| @@ -9970,8 +9946,9 @@ | |||
| 9970 | 9946 | ||
| 9971 | * message-utils.el: Adopt the file. | 9947 | * message-utils.el: Adopt the file. |
| 9972 | 9948 | ||
| 9949 | 2002-02-15 Holger Schauer <Holger.Schauer@gmx.de> | ||
| 9950 | |||
| 9973 | * message-utils.el: New file. | 9951 | * message-utils.el: New file. |
| 9974 | From Holger Schauer <Holger.Schauer@gmx.de> | ||
| 9975 | 9952 | ||
| 9976 | 2002-02-14 ShengHuo ZHU <zsh@cs.rochester.edu> | 9953 | 2002-02-14 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 9977 | 9954 | ||
| @@ -10079,9 +10056,6 @@ | |||
| 10079 | gnus-decoration property. | 10056 | gnus-decoration property. |
| 10080 | * gnus-msg.el (gnus-copy-article-buffer): Remove gnus-decoration. | 10057 | * gnus-msg.el (gnus-copy-article-buffer): Remove gnus-decoration. |
| 10081 | 10058 | ||
| 10082 | * message.el (message-mode): Set local-abbrev-table. | ||
| 10083 | From Matt Armstrong <matt@lickey.com>. | ||
| 10084 | |||
| 10085 | * gnus-art.el (gnus-article-treat-unfold-headers): Don't remove | 10059 | * gnus-art.el (gnus-article-treat-unfold-headers): Don't remove |
| 10086 | too many spaces. | 10060 | too many spaces. |
| 10087 | 10061 | ||
| @@ -10089,8 +10063,13 @@ | |||
| 10089 | (rfc2047-decode-region): Don't unfold. Let | 10063 | (rfc2047-decode-region): Don't unfold. Let |
| 10090 | gnus-article-treat-unfold-headers do it. | 10064 | gnus-article-treat-unfold-headers do it. |
| 10091 | 10065 | ||
| 10066 | 2002-02-07 Matt Armstrong <matt@lickey.com>. | ||
| 10067 | |||
| 10068 | * message.el (message-mode): Set local-abbrev-table. | ||
| 10069 | |||
| 10070 | 2002-02-07 Jesper Harder <harder@ifa.au.dk> | ||
| 10071 | |||
| 10092 | * gnus-sum.el (gnus-dependencies-add-header): Fix typo. | 10072 | * gnus-sum.el (gnus-dependencies-add-header): Fix typo. |
| 10093 | From: Jesper Harder <harder@ifa.au.dk> | ||
| 10094 | 10073 | ||
| 10095 | 2002-02-06 Lars Magne Ingebrigtsen <larsi@gnus.org> | 10074 | 2002-02-06 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 10096 | 10075 | ||
| @@ -10117,16 +10096,18 @@ | |||
| 10117 | 10096 | ||
| 10118 | * nnweb.el (nnweb-google-parse-1): Use a correct format of date. | 10097 | * nnweb.el (nnweb-google-parse-1): Use a correct format of date. |
| 10119 | 10098 | ||
| 10120 | * gnus-agent.el (gnus-agent-summary-make-menu-bar): Fix typo. | ||
| 10121 | From Stefan Reich,Av(Br <xsteve@riic.at>. | ||
| 10122 | |||
| 10123 | * nnagent.el (nnagent-request-expire-articles): Don't delete | 10099 | * nnagent.el (nnagent-request-expire-articles): Don't delete |
| 10124 | files. | 10100 | files. |
| 10125 | 10101 | ||
| 10126 | 2002-02-05 ShengHuo ZHU <zsh@cs.rochester.edu> | 10102 | 2002-02-06 Stefan Reich,Av(Br <xsteve@riic.at> |
| 10103 | |||
| 10104 | * gnus-agent.el (gnus-agent-summary-make-menu-bar): Fix typo. | ||
| 10105 | |||
| 10106 | 2002-02-05 Sriram Karra <karra@cs.utah.edu> | ||
| 10127 | 10107 | ||
| 10128 | * message.el (message-gen-unsubscribed-mft): New function. | 10108 | * message.el (message-gen-unsubscribed-mft): New function. |
| 10129 | From Sriram Karra <karra@cs.utah.edu>. | 10109 | |
| 10110 | 2002-02-05 ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 10130 | 10111 | ||
| 10131 | * gnus.el (gnus-article-unpropagated-mark-lists): Backslash the | 10112 | * gnus.el (gnus-article-unpropagated-mark-lists): Backslash the |
| 10132 | open parenthesis. | 10113 | open parenthesis. |
| @@ -10168,17 +10149,17 @@ | |||
| 10168 | * gnus-art.el (gnus-treatment-function-alist): Move hide-citation, | 10149 | * gnus-art.el (gnus-treatment-function-alist): Move hide-citation, |
| 10169 | highlight-citation after emphasize. | 10150 | highlight-citation after emphasize. |
| 10170 | 10151 | ||
| 10171 | 2002-02-04 Simon Josefsson <jas@extundo.com> | 10152 | 2002-02-04 David Edmondson <dme@sun.com> |
| 10172 | 10153 | ||
| 10173 | * nnfolder.el (nnfolder-open-marks): | 10154 | * nnfolder.el (nnfolder-open-marks): Message when done. |
| 10174 | 10155 | ||
| 10175 | * nnml.el (nnml-open-marks): Message when done. From David | 10156 | * nnml.el (nnml-open-marks): Ditto. |
| 10176 | Edmondson <dme@sun.com>. | ||
| 10177 | 10157 | ||
| 10178 | 2002-02-03 ShengHuo ZHU <zsh@cs.rochester.edu> | 10158 | 2002-02-03 Steinar Bang <sb@dod.no> |
| 10179 | 10159 | ||
| 10180 | * imap.el (imap-anonymous-auth): Fix typo. | 10160 | * imap.el (imap-anonymous-auth): Fix typo. |
| 10181 | From: Steinar Bang <sb@dod.no> | 10161 | |
| 10162 | 2002-02-03 ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 10182 | 10163 | ||
| 10183 | * gnus-cache.el (gnus-cache-braid-nov): Use set-buffer instead of | 10164 | * gnus-cache.el (gnus-cache-braid-nov): Use set-buffer instead of |
| 10184 | save-excursion. | 10165 | save-excursion. |
| @@ -10232,14 +10213,15 @@ | |||
| 10232 | 10213 | ||
| 10233 | * gnus.el (gnus-agent): Make it customizable. | 10214 | * gnus.el (gnus-agent): Make it customizable. |
| 10234 | 10215 | ||
| 10235 | * gnus-dired.el: New file. | ||
| 10236 | From Benjamin Rutt <brutt@bloomington.in.us> | ||
| 10237 | |||
| 10238 | * gnus-cache.el (gnus-cache-articles-in-group): Remove from active | 10216 | * gnus-cache.el (gnus-cache-articles-in-group): Remove from active |
| 10239 | if no article. | 10217 | if no article. |
| 10240 | (gnus-cache-possibly-remove-article): Ditto. | 10218 | (gnus-cache-possibly-remove-article): Ditto. |
| 10241 | (gnus-cache-possibly-enter-article): Use gnus-add-to-sorted-list. | 10219 | (gnus-cache-possibly-enter-article): Use gnus-add-to-sorted-list. |
| 10242 | 10220 | ||
| 10221 | 2002-02-02 Benjamin Rutt <brutt@bloomington.in.us> | ||
| 10222 | |||
| 10223 | * gnus-dired.el: New file. | ||
| 10224 | |||
| 10243 | 2002-02-01 Simon Josefsson <jas@extundo.com> | 10225 | 2002-02-01 Simon Josefsson <jas@extundo.com> |
| 10244 | 10226 | ||
| 10245 | * gnus-int.el (gnus-request-accept-article): Use gnus-get-function. | 10227 | * gnus-int.el (gnus-request-accept-article): Use gnus-get-function. |
| @@ -10740,7 +10722,7 @@ | |||
| 10740 | 10722 | ||
| 10741 | * gnus.el (gnus-version-number): Bump version number. | 10723 | * gnus.el (gnus-version-number): Bump version number. |
| 10742 | 10724 | ||
| 10743 | 2002-01-20 05:33:30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 10725 | 2002-01-20 05:33:30 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 10744 | 10726 | ||
| 10745 | * gnus.el: Oort Gnus v0.05 is released. | 10727 | * gnus.el: Oort Gnus v0.05 is released. |
| 10746 | 10728 | ||
| @@ -10974,8 +10956,9 @@ | |||
| 10974 | * message.el (message-newline-and-reformat): Use `newline' instead | 10956 | * message.el (message-newline-and-reformat): Use `newline' instead |
| 10975 | of inserting \n, so that the newline is marked as hard. | 10957 | of inserting \n, so that the newline is marked as hard. |
| 10976 | 10958 | ||
| 10959 | 2002-01-13 Jesper Harder <harder@ifa.au.dk> | ||
| 10960 | |||
| 10977 | * gnus-spec.el (gnus-pad-form): Don't evaluate EL multiple times. | 10961 | * gnus-spec.el (gnus-pad-form): Don't evaluate EL multiple times. |
| 10978 | From Jesper Harder <harder@ifa.au.dk>. | ||
| 10979 | 10962 | ||
| 10980 | 2002-01-12 ShengHuo ZHU <zsh@cs.rochester.edu> | 10963 | 2002-01-12 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 10981 | 10964 | ||
| @@ -11199,11 +11182,13 @@ | |||
| 11199 | * gnus-group.el (gnus-group-read-ephemeral-group): Restore the old | 11182 | * gnus-group.el (gnus-group-read-ephemeral-group): Restore the old |
| 11200 | behavior of quit-config. | 11183 | behavior of quit-config. |
| 11201 | 11184 | ||
| 11185 | 2002-01-08 Bj,Ax(Brn Mork <bmork@dod.no> (tiny change) | ||
| 11186 | |||
| 11202 | * message.el (message-make-from): Don't quote fullname. | 11187 | * message.el (message-make-from): Don't quote fullname. |
| 11203 | From: Bj,Ax(Brn Mork <bmork@dod.no> | 11188 | |
| 11189 | 2002-01-08 Andre Srinivasan <andre@slamdunknetworks.com> (tiny change) | ||
| 11204 | 11190 | ||
| 11205 | * gnus-group.el (gnus-group-suspend): Don't kill message buffers. | 11191 | * gnus-group.el (gnus-group-suspend): Don't kill message buffers. |
| 11206 | From: <andre@slamdunknetworks.com> | ||
| 11207 | 11192 | ||
| 11208 | 2002-01-07 ShengHuo ZHU <zsh@cs.rochester.edu> | 11193 | 2002-01-07 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 11209 | 11194 | ||
| @@ -11486,10 +11471,10 @@ | |||
| 11486 | 11471 | ||
| 11487 | * gnus-agent.el (gnus-agent-fetch-session): Run hook. | 11472 | * gnus-agent.el (gnus-agent-fetch-session): Run hook. |
| 11488 | 11473 | ||
| 11489 | 2002-01-03 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 11474 | 2002-01-03 Dave Love <fx@gnu.org> |
| 11490 | 11475 | ||
| 11491 | * gnus-start.el (gnus-read-init-file): Don't force coding system | 11476 | * gnus-start.el (gnus-read-init-file): Don't force coding system |
| 11492 | for ~/.gnus. From Dave Love <fx@gnu.org>. | 11477 | for ~/.gnus. |
| 11493 | 11478 | ||
| 11494 | 2002-01-03 ShengHuo ZHU <zsh@cs.rochester.edu> | 11479 | 2002-01-03 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 11495 | 11480 | ||
| @@ -11755,7 +11740,7 @@ | |||
| 11755 | (message-fix-before-sending): Highlight invisible text and place | 11740 | (message-fix-before-sending): Highlight invisible text and place |
| 11756 | point there. | 11741 | point there. |
| 11757 | 11742 | ||
| 11758 | 2002-01-01 02:32:53 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 11743 | 2002-01-01 02:32:53 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 11759 | 11744 | ||
| 11760 | * gnus.el: Oort Gnus v0.04 is released. | 11745 | * gnus.el: Oort Gnus v0.04 is released. |
| 11761 | 11746 | ||
| @@ -12094,11 +12079,10 @@ | |||
| 12094 | (gnus-update-marks): Use `gnus-range-add' on a uncompressed list | 12079 | (gnus-update-marks): Use `gnus-range-add' on a uncompressed list |
| 12095 | instead, it seems to result in shorter ranges. | 12080 | instead, it seems to result in shorter ranges. |
| 12096 | 12081 | ||
| 12097 | 2001-12-26 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12082 | 2001-12-26 11:00:00 Jesper Harder <harder@ifa.au.dk> |
| 12098 | 12083 | ||
| 12099 | * mm-util.el (mm-iso-8859-x-to-15-region): Use | 12084 | * mm-util.el (mm-iso-8859-x-to-15-region): Use |
| 12100 | insert-before-markers. | 12085 | insert-before-markers. |
| 12101 | From Jesper Harder <harder@ifa.au.dk> | ||
| 12102 | 12086 | ||
| 12103 | 2001-12-26 Paul Jarc <prj@po.cwru.edu> | 12087 | 2001-12-26 Paul Jarc <prj@po.cwru.edu> |
| 12104 | 12088 | ||
| @@ -12127,12 +12111,11 @@ | |||
| 12127 | (nnmaildir-version): Indicate that nnmaildir is now a standard | 12111 | (nnmaildir-version): Indicate that nnmaildir is now a standard |
| 12128 | part of Gnus, not separately released. | 12112 | part of Gnus, not separately released. |
| 12129 | 12113 | ||
| 12130 | 2001-12-21 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12114 | 2001-12-21 08:00:00 Pavel Jan,Am(Bk <Pavel@Janik.cz> |
| 12131 | 12115 | ||
| 12132 | * gnus-art.el, gnus-picon.el, gnus-sieve.el, gnus-sum.el: | 12116 | * gnus-art.el, gnus-picon.el, gnus-sieve.el, gnus-sum.el: |
| 12133 | * gnus-xmas.el, imap.el, mailcap.el, mm-util.el, nnfolder.el: | 12117 | * gnus-xmas.el, imap.el, mailcap.el, mm-util.el, nnfolder.el: |
| 12134 | * nnheader.el, nnmail.el: Nil/NIL vs. nil. | 12118 | * nnheader.el, nnmail.el: Nil/NIL vs. nil. |
| 12135 | From Pavel Jan,Am(Bk <Pavel@Janik.cz> | ||
| 12136 | 12119 | ||
| 12137 | 2001-12-20 15:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12120 | 2001-12-20 15:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 12138 | 12121 | ||
| @@ -12145,10 +12128,9 @@ | |||
| 12145 | (nnimap-close-group): Don't quote KEYLIST items. Suggested by | 12128 | (nnimap-close-group): Don't quote KEYLIST items. Suggested by |
| 12146 | Brian P Templeton <bpt@tunes.org>. | 12129 | Brian P Templeton <bpt@tunes.org>. |
| 12147 | 12130 | ||
| 12148 | 2001-12-19 17:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12131 | 2001-12-19 17:00:00 Paul Jarc <prj@po.cwru.edu> |
| 12149 | 12132 | ||
| 12150 | * nnmaildir.el: New file. | 12133 | * nnmaildir.el: New file. |
| 12151 | From Paul Jarc <prj@po.cwru.edu>. | ||
| 12152 | 12134 | ||
| 12153 | 2001-12-19 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12135 | 2001-12-19 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 12154 | 12136 | ||
| @@ -12172,8 +12154,7 @@ | |||
| 12172 | 12154 | ||
| 12173 | * gnus-win.el (gnus-get-buffer-window): Use gnus-delete-if. | 12155 | * gnus-win.el (gnus-get-buffer-window): Use gnus-delete-if. |
| 12174 | 12156 | ||
| 12175 | 2001-12-18 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12157 | 2001-12-18 11:00:00 Harald Meland <Harald.Meland@usit.uio.no> |
| 12176 | From Harald Meland <Harald.Meland@usit.uio.no> | ||
| 12177 | 12158 | ||
| 12178 | * gnus-win.el (gnus-get-buffer-window): New function. | 12159 | * gnus-win.el (gnus-get-buffer-window): New function. |
| 12179 | (gnus-all-windows-visible-p): Use it. | 12160 | (gnus-all-windows-visible-p): Use it. |
| @@ -12248,11 +12229,10 @@ | |||
| 12248 | subscribe-level | 12229 | subscribe-level |
| 12249 | * gnus-topic.el (gnus-subscribe-topics): use it. | 12230 | * gnus-topic.el (gnus-subscribe-topics): use it. |
| 12250 | 12231 | ||
| 12251 | 2001-12-13 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12232 | 2001-12-13 22:00:00 Sean Neakums <sneakums@zork.net> (tiny change) |
| 12252 | 12233 | ||
| 12253 | * gnus-msg.el (gnus-summary-mail-forward): Forward all marked | 12234 | * gnus-msg.el (gnus-summary-mail-forward): Forward all marked |
| 12254 | messages. (A small patch with indentation) | 12235 | messages. |
| 12255 | From Sean Neakums <sneakums@zork.net>. | ||
| 12256 | 12236 | ||
| 12257 | * gnus-uu.el (gnus-uu-grab-articles): Set gnus-current-article to | 12237 | * gnus-uu.el (gnus-uu-grab-articles): Set gnus-current-article to |
| 12258 | nil after shooting down the gnus-original-article-buffer. | 12238 | nil after shooting down the gnus-original-article-buffer. |
| @@ -12327,12 +12307,11 @@ | |||
| 12327 | 12307 | ||
| 12328 | * mml.el (mime-to-mml): Remove Content-Disposition too. | 12308 | * mml.el (mime-to-mml): Remove Content-Disposition too. |
| 12329 | 12309 | ||
| 12330 | 2001-12-09 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12310 | 2001-12-09 08:00:00 TSUCHIYA Masatoshi <tsuchiya@namazu.org> |
| 12331 | 12311 | ||
| 12332 | * gnus-sum.el (gnus-summary-buffer-name): Decode group name. | 12312 | * gnus-sum.el (gnus-summary-buffer-name): Decode group name. |
| 12333 | * gnus-group.el (gnus-group-name-decode): Decode unibyte | 12313 | * gnus-group.el (gnus-group-name-decode): Decode unibyte |
| 12334 | strings only. | 12314 | strings only. |
| 12335 | From TSUCHIYA Masatoshi <tsuchiya@namazu.org> | ||
| 12336 | 12315 | ||
| 12337 | 2001-12-08 Nevin Kapur <nevin@jhu.edu> | 12316 | 2001-12-08 Nevin Kapur <nevin@jhu.edu> |
| 12338 | 12317 | ||
| @@ -12433,15 +12412,14 @@ | |||
| 12433 | the beginning of lines. | 12412 | the beginning of lines. |
| 12434 | (gnus-complex-form-to-spec): Ditto. | 12413 | (gnus-complex-form-to-spec): Ditto. |
| 12435 | 12414 | ||
| 12436 | 2001-12-01 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12415 | 2001-12-01 08:00:00 Paul Jarc <prj@po.cwru.edu> |
| 12437 | 12416 | ||
| 12438 | * message.el (message-make-mft): Fix the m-s-a-file regexp. | 12417 | * message.el (message-make-mft): Fix the m-s-a-file regexp. |
| 12439 | From Paul Jarc <prj@po.cwru.edu>. | ||
| 12440 | 12418 | ||
| 12441 | 2001-11-30 21:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12419 | 2001-11-30 21:00:00 Paul Jarc <prj@po.cwru.edu> |
| 12442 | 12420 | ||
| 12443 | * message.el: New variable message-subscribed-address-file; | 12421 | * message.el: New variable message-subscribed-address-file; |
| 12444 | use it in message-make-mft. From Paul Jarc <prj@po.cwru.edu>. | 12422 | use it in message-make-mft. |
| 12445 | 12423 | ||
| 12446 | 2001-11-30 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12424 | 2001-11-30 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 12447 | 12425 | ||
| @@ -12574,11 +12552,11 @@ | |||
| 12574 | 12552 | ||
| 12575 | * message.el (sha1): eval-and-compile. | 12553 | * message.el (sha1): eval-and-compile. |
| 12576 | 12554 | ||
| 12577 | 2001-11-20 Simon Josefsson <jas@extundo.com> | 12555 | 2001-11-20 Paul Jarc <prj@po.cwru.edu> |
| 12578 | 12556 | ||
| 12579 | * message.el (message-allow-no-recipients): New variable. | 12557 | * message.el (message-allow-no-recipients): New variable. |
| 12580 | (message-send): Use it, customize the prompting when posting to | 12558 | (message-send): Use it, customize the prompting when posting to |
| 12581 | Gcc/Fcc alone. From prj@po.cwru.edu (Paul Jarc). | 12559 | Gcc/Fcc alone. |
| 12582 | 12560 | ||
| 12583 | 2001-11-20 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12561 | 2001-11-20 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 12584 | 12562 | ||
| @@ -12698,14 +12676,17 @@ | |||
| 12698 | 12676 | ||
| 12699 | * mml2015.el: Mention RFC 3156. | 12677 | * mml2015.el: Mention RFC 3156. |
| 12700 | 12678 | ||
| 12701 | * mml1991.el: New file. From Sascha L,A|(Bdecke <sascha@meta-x.de>. | 12679 | 2001-11-12 Sascha L,A|(Bdecke <sascha@meta-x.de> |
| 12680 | |||
| 12681 | * mml1991.el: New file. | ||
| 12702 | 12682 | ||
| 12703 | 2001-11-12 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 12683 | 2001-11-12 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 12704 | 12684 | ||
| 12705 | * gnus-start.el (gnus-auto-subscribed-groups): Use ^nnml. | 12685 | * gnus-start.el (gnus-auto-subscribed-groups): Use ^nnml. |
| 12706 | 12686 | ||
| 12687 | 2001-11-12 Michael Cook <Michael.Cook@cisco.com> | ||
| 12688 | |||
| 12707 | * gnus-sum.el (gnus-summary-move-article): Use number-to-string. | 12689 | * gnus-sum.el (gnus-summary-move-article): Use number-to-string. |
| 12708 | From <Michael.Cook@cisco.com> | ||
| 12709 | 12690 | ||
| 12710 | 2001-11-11 Simon Josefsson <jas@extundo.com> | 12691 | 2001-11-11 Simon Josefsson <jas@extundo.com> |
| 12711 | 12692 | ||
| @@ -12714,10 +12695,9 @@ | |||
| 12714 | canlock, no need to require two different hash algs). Suggested | 12695 | canlock, no need to require two different hash algs). Suggested |
| 12715 | by Ferenc Wagner <wferi@bolyai1.elte.hu>. | 12696 | by Ferenc Wagner <wferi@bolyai1.elte.hu>. |
| 12716 | 12697 | ||
| 12717 | 2001-11-09 Simon Josefsson <jas@extundo.com> | 12698 | 2001-11-09 Pavel Jan,Am(Bk <Pavel@Janik.cz> |
| 12718 | 12699 | ||
| 12719 | * gnus.el (gnus-local-domain): Fix doc. From Pavel Jan,Am(Bk | 12700 | * gnus.el (gnus-local-domain): Fix doc. |
| 12720 | <Pavel@Janik.cz>. | ||
| 12721 | 12701 | ||
| 12722 | 2001-11-09 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 12702 | 2001-11-09 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> |
| 12723 | 12703 | ||
| @@ -12959,7 +12939,7 @@ | |||
| 12959 | mm-with-unibyte-current-buffer-mule4): Use them. | 12939 | mm-with-unibyte-current-buffer-mule4): Use them. |
| 12960 | (mm-find-mime-charset-region): Treat iso-2022-jp. | 12940 | (mm-find-mime-charset-region): Treat iso-2022-jp. |
| 12961 | 12941 | ||
| 12962 | From Dave Love <fx@gnu.org>: | 12942 | 2001-10-30 Dave Love <fx@gnu.org> |
| 12963 | 12943 | ||
| 12964 | * mm-util.el (mm-mime-mule-charset-alist): Make it correct by | 12944 | * mm-util.el (mm-mime-mule-charset-alist): Make it correct by |
| 12965 | construction. | 12945 | construction. |
| @@ -13032,10 +13012,10 @@ | |||
| 13032 | 13012 | ||
| 13033 | * gnus-msg.el (gnus-setup-message): Call post-command-hook. | 13013 | * gnus-msg.el (gnus-setup-message): Call post-command-hook. |
| 13034 | 13014 | ||
| 13035 | 2001-10-29 Simon Josefsson <jas@extundo.com> | 13015 | 2001-10-29 Jesper Harder <harder@myrealbox.com> |
| 13036 | 13016 | ||
| 13037 | * mml.el (mml-preview): Bind message-this-is-news if it is | 13017 | * mml.el (mml-preview): Bind message-this-is-news if it is |
| 13038 | news. From Jesper Harder <harder@myrealbox.com>. | 13018 | news. |
| 13039 | 13019 | ||
| 13040 | 2001-10-28 Simon Josefsson <jas@extundo.com> | 13020 | 2001-10-28 Simon Josefsson <jas@extundo.com> |
| 13041 | 13021 | ||
| @@ -13051,8 +13031,9 @@ | |||
| 13051 | * message.el (message-indent-citation): Don't add trailing | 13031 | * message.el (message-indent-citation): Don't add trailing |
| 13052 | whitespace when citing text. | 13032 | whitespace when citing text. |
| 13053 | 13033 | ||
| 13054 | * gnus.el (gnus-group-faq-directory): Fix. From Jesper Harder | 13034 | 2001-10-27 Jesper Harder <harder@myrealbox.com> |
| 13055 | <harder@ifa.au.dk>. | 13035 | |
| 13036 | * gnus.el (gnus-group-faq-directory): Fix. | ||
| 13056 | 13037 | ||
| 13057 | 2001-10-26 14:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13038 | 2001-10-26 14:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 13058 | 13039 | ||
| @@ -13129,22 +13110,23 @@ | |||
| 13129 | * message.el (message-do-auto-fill): Avoid calling | 13110 | * message.el (message-do-auto-fill): Avoid calling |
| 13130 | 'rfc822-goto-eoh'. | 13111 | 'rfc822-goto-eoh'. |
| 13131 | 13112 | ||
| 13132 | 2001-10-20 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 13113 | 2001-10-20 Paul Jarc <prj@po.cwru.edu> |
| 13133 | From Paul Jarc <prj@po.cwru.edu>. | ||
| 13134 | 13114 | ||
| 13135 | * message.el (message-get-reply-headers): Restructure the logic | 13115 | * message.el (message-get-reply-headers): Restructure the logic |
| 13136 | and add comments. From Paul Jarc <prj@po.cwru.edu>. | 13116 | and add comments. |
| 13137 | 13117 | ||
| 13138 | 2001-10-20 Simon Josefsson <jas@extundo.com> | 13118 | 2001-10-20 Simon Josefsson <jas@extundo.com> |
| 13139 | 13119 | ||
| 13140 | * message.el (message-cancel-news): Support cancel-locks. | 13120 | * message.el (message-cancel-news): Support cancel-locks. |
| 13141 | Suggested by Per Abrahamsson. | 13121 | Suggested by Per Abrahamsson. |
| 13142 | 13122 | ||
| 13143 | * nnml.el (nnml-marks-changed-p): Use `equal' when comparing | ||
| 13144 | conses. From David Z Maze <dmaze@MIT.EDU>. | ||
| 13145 | |||
| 13146 | * nnfolder.el (nnfolder-marks-changed-p): Ditto. | 13123 | * nnfolder.el (nnfolder-marks-changed-p): Ditto. |
| 13147 | 13124 | ||
| 13125 | 2001-10-20 David Z Maze <dmaze@MIT.EDU> | ||
| 13126 | |||
| 13127 | * nnml.el (nnml-marks-changed-p): Use `equal' when comparing | ||
| 13128 | conses. | ||
| 13129 | |||
| 13148 | 2001-10-19 Per Abrahamsen <abraham@dina.kvl.dk> | 13130 | 2001-10-19 Per Abrahamsen <abraham@dina.kvl.dk> |
| 13149 | 13131 | ||
| 13150 | * mm-decode.el (mm-default-directory): Fix customize type. | 13132 | * mm-decode.el (mm-default-directory): Fix customize type. |
| @@ -13174,8 +13156,7 @@ | |||
| 13174 | * gnus-sum.el (gnus-group-make-articles-read): Call g-r-set-mark | 13156 | * gnus-sum.el (gnus-group-make-articles-read): Call g-r-set-mark |
| 13175 | when undoing. | 13157 | when undoing. |
| 13176 | 13158 | ||
| 13177 | 2001-10-18 Simon Josefsson <jas@extundo.com> | 13159 | 2001-10-18 Frank Schmitt <usereplyto@Frank-Schmitt.net> |
| 13178 | From Frank Schmitt <usereplyto@Frank-Schmitt.net> | ||
| 13179 | 13160 | ||
| 13180 | * gnus-sum.el (gnus-summary-limit-to-display-predicate): Fix typo. | 13161 | * gnus-sum.el (gnus-summary-limit-to-display-predicate): Fix typo. |
| 13181 | (gnus-summary-make-menu-bar): Ditto. | 13162 | (gnus-summary-make-menu-bar): Ditto. |
| @@ -13185,11 +13166,10 @@ | |||
| 13185 | * nnimap.el (nnimap-expiry-target): Make sure it is back to the | 13166 | * nnimap.el (nnimap-expiry-target): Make sure it is back to the |
| 13186 | server. Suggested by ShengHuo ZHU <zsh@cs.rochester.edu>. | 13167 | server. Suggested by ShengHuo ZHU <zsh@cs.rochester.edu>. |
| 13187 | 13168 | ||
| 13188 | 2001-10-17 17:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13169 | 2001-10-17 17:00:00 Frank Schmitt <usenet@Frank-Schmitt.net> |
| 13189 | 13170 | ||
| 13190 | * gnus-sum.el (gnus-summary-line-format-alist): user-date entry. | 13171 | * gnus-sum.el (gnus-summary-line-format-alist): user-date entry. |
| 13191 | * gnus-util.el (gnus-user-date): New function. | 13172 | * gnus-util.el (gnus-user-date): New function. |
| 13192 | From Frank Schmitt <usenet@Frank-Schmitt.net>. | ||
| 13193 | 13173 | ||
| 13194 | 2001-10-17 Per Abrahamsen <abraham@dina.kvl.dk> | 13174 | 2001-10-17 Per Abrahamsen <abraham@dina.kvl.dk> |
| 13195 | 13175 | ||
| @@ -13222,8 +13202,7 @@ | |||
| 13222 | * gnus-msg.el (gnus-post-method): Changed two instances of | 13202 | * gnus-msg.el (gnus-post-method): Changed two instances of |
| 13223 | `active' to `current' and one `null' to `not'. | 13203 | `active' to `current' and one `null' to `not'. |
| 13224 | 13204 | ||
| 13225 | 2001-10-16 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 13205 | 2001-10-16 Katsumi Yamaoka <yamaoka@jpl.org> |
| 13226 | From Katsumi Yamaoka <yamaoka@jpl.org>. | ||
| 13227 | 13206 | ||
| 13228 | * message.el (message-setup-fill-variables): Use | 13207 | * message.el (message-setup-fill-variables): Use |
| 13229 | `normal-auto-fill-function' instead of `auto-fill-function'. | 13208 | `normal-auto-fill-function' instead of `auto-fill-function'. |
| @@ -13279,10 +13258,9 @@ | |||
| 13279 | * gnus-art.el (article-emphasize): Set `g-a-wash-types' after | 13258 | * gnus-art.el (article-emphasize): Set `g-a-wash-types' after |
| 13280 | doing stuff that clears it. | 13259 | doing stuff that clears it. |
| 13281 | 13260 | ||
| 13282 | 2001-10-12 Simon Josefsson <jas@extundo.com> | 13261 | 2001-10-12 Eric Marsden <emarsden@laas.fr> |
| 13283 | 13262 | ||
| 13284 | * gnus-cache.el (gnus-summary-limit-include-cached): Rewrite. | 13263 | * gnus-cache.el (gnus-summary-limit-include-cached): Rewrite. |
| 13285 | From Eric Marsden <emarsden@laas.fr>. | ||
| 13286 | 13264 | ||
| 13287 | 2001-10-12 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13265 | 2001-10-12 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 13288 | 13266 | ||
| @@ -13484,20 +13462,17 @@ | |||
| 13484 | (gnus-topic-catchup-articles): New function. Suggested by Robin | 13462 | (gnus-topic-catchup-articles): New function. Suggested by Robin |
| 13485 | S. Socha <robin-dated-1001857693.185e29@socha.net>. | 13463 | S. Socha <robin-dated-1001857693.185e29@socha.net>. |
| 13486 | 13464 | ||
| 13487 | 2001-09-27 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13465 | 2001-09-27 11:00:00 Gerd M,Av(Bllmann <gerd@gnu.org>. |
| 13488 | From Gerd M,Av(Bllmann <gerd@gnu.org>. | ||
| 13489 | 13466 | ||
| 13490 | * gnus-ems.el (gnus-article-display-xface): Insert xface after | 13467 | * gnus-ems.el (gnus-article-display-xface): Insert xface after |
| 13491 | previous ones. | 13468 | previous ones. |
| 13492 | 13469 | ||
| 13493 | 2001-09-27 07:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13470 | 2001-09-27 07:00:00 Daiki Ueno <ueno@unixuser.org> |
| 13494 | From Daiki Ueno <ueno@unixuser.org> | ||
| 13495 | 13471 | ||
| 13496 | * gnus-sum.el (gnus-summary-show-article): The arglist of | 13472 | * gnus-sum.el (gnus-summary-show-article): The arglist of |
| 13497 | detect-coding-region is incompatible. | 13473 | detect-coding-region is incompatible. |
| 13498 | 13474 | ||
| 13499 | 2001-09-26 18:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13475 | 2001-09-26 18:00:00 Katsuhiro Hermit Endo <hermit@koka-in.org> |
| 13500 | From Katsuhiro Hermit Endo <hermit@koka-in.org> | ||
| 13501 | 13476 | ||
| 13502 | * gnus-group.el (gnus-group-delete-group): Typo. | 13477 | * gnus-group.el (gnus-group-delete-group): Typo. |
| 13503 | 13478 | ||
| @@ -13580,10 +13555,9 @@ | |||
| 13580 | * gnus-srvr.el (gnus-server-insert-server-line): Don't let an | 13555 | * gnus-srvr.el (gnus-server-insert-server-line): Don't let an |
| 13581 | error querying a backend abort the whole process. | 13556 | error querying a backend abort the whole process. |
| 13582 | 13557 | ||
| 13583 | 2001-09-17 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13558 | 2001-09-17 08:00:00 Gerd M,Av(Bllmann <gerd@gnu.org> |
| 13584 | 13559 | ||
| 13585 | * gnus-srvr.el (gnus-server-mode): Fix bogus fontification. | 13560 | * gnus-srvr.el (gnus-server-mode): Fix bogus fontification. |
| 13586 | From Gerd M,Av(Bllmann <gerd@gnu.org>. | ||
| 13587 | 13561 | ||
| 13588 | 2001-09-17 Didier Verna <didier@xemacs.org> | 13562 | 2001-09-17 Didier Verna <didier@xemacs.org> |
| 13589 | 13563 | ||
| @@ -13655,7 +13629,7 @@ | |||
| 13655 | * gnus-diary.el (message-mode-map): bind the above to `C-c D c'. | 13629 | * gnus-diary.el (message-mode-map): bind the above to `C-c D c'. |
| 13656 | * gnus-diary.el (gnus-article-edit-mode-map): ditto. | 13630 | * gnus-diary.el (gnus-article-edit-mode-map): ditto. |
| 13657 | 13631 | ||
| 13658 | 2001-09-10 TSUCHIYA Masatoshi <tsuchiya@namazu.org> | 13632 | 2001-09-10 TSUCHIYA Masatoshi <tsuchiya@namazu.org> |
| 13659 | 13633 | ||
| 13660 | * gnus-sum.el (gnus-select-newsgroup): Make | 13634 | * gnus-sum.el (gnus-select-newsgroup): Make |
| 13661 | `gnus-current-select-method' buffer-local. | 13635 | `gnus-current-select-method' buffer-local. |
| @@ -13663,8 +13637,7 @@ | |||
| 13663 | * gnus-art.el (gnus-request-article-this-buffer): Refer | 13637 | * gnus-art.el (gnus-request-article-this-buffer): Refer |
| 13664 | `gnus-current-select-method' in the current summary buffer. | 13638 | `gnus-current-select-method' in the current summary buffer. |
| 13665 | 13639 | ||
| 13666 | 2001-09-10 Simon Josefsson <jas@extundo.com> | 13640 | 2001-09-10 Daniel Pittman <daniel@rimspace.net> |
| 13667 | From Daniel Pittman <daniel@rimspace.net> | ||
| 13668 | 13641 | ||
| 13669 | * gnus-spec.el (gnus-correct-pad-form): Fix. | 13642 | * gnus-spec.el (gnus-correct-pad-form): Fix. |
| 13670 | 13643 | ||
| @@ -13715,8 +13688,7 @@ | |||
| 13715 | * gnus-agent.el (gnus-agent-fetch-group): If online, actually | 13688 | * gnus-agent.el (gnus-agent-fetch-group): If online, actually |
| 13716 | fetch group. | 13689 | fetch group. |
| 13717 | 13690 | ||
| 13718 | 2001-09-08 Simon Josefsson <jas@extundo.com> | 13691 | 2001-09-08 Daniel Pittman <daniel@rimspace.net> |
| 13719 | From Daniel Pittman <daniel@rimspace.net> | ||
| 13720 | 13692 | ||
| 13721 | * gnus-spec.el (gnus-correct-pad-form): New function. | 13693 | * gnus-spec.el (gnus-correct-pad-form): New function. |
| 13722 | (gnus-parse-simple-format): Use it. | 13694 | (gnus-parse-simple-format): Use it. |
| @@ -13728,7 +13700,7 @@ | |||
| 13728 | Putnam <reader@newsguy.com>. | 13700 | Putnam <reader@newsguy.com>. |
| 13729 | (gnus-group-sort-selected-groups): Touch dribble file. | 13701 | (gnus-group-sort-selected-groups): Touch dribble file. |
| 13730 | 13702 | ||
| 13731 | 2001-09-07 Raja R Harinath <harinath@cs.umn.edu> | 13703 | 2001-09-07 Raja R Harinath <harinath@cs.umn.edu> |
| 13732 | 13704 | ||
| 13733 | * nnml.el (nnml-filenames-are-evil): New variable. | 13705 | * nnml.el (nnml-filenames-are-evil): New variable. |
| 13734 | (nnml-article-to-file-alist): Rename to ... | 13706 | (nnml-article-to-file-alist): Rename to ... |
| @@ -13750,10 +13722,9 @@ | |||
| 13750 | * gnus-sum.el (gnus-summary-toggle-smiley): New function. Toggles | 13722 | * gnus-sum.el (gnus-summary-toggle-smiley): New function. Toggles |
| 13751 | display of graphical smilies. | 13723 | display of graphical smilies. |
| 13752 | 13724 | ||
| 13753 | 2001-09-07 02:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13725 | 2001-09-07 02:00:00 Bill White <billw@wolfram.com> |
| 13754 | 13726 | ||
| 13755 | * gnus-start.el (gnus-setup-news): A typo. | 13727 | * gnus-start.el (gnus-setup-news): A typo. |
| 13756 | From Bill White <billw@wolfram.com>. | ||
| 13757 | 13728 | ||
| 13758 | 2001-09-06 Simon Josefsson <jas@extundo.com> | 13729 | 2001-09-06 Simon Josefsson <jas@extundo.com> |
| 13759 | 13730 | ||
| @@ -13864,8 +13835,7 @@ | |||
| 13864 | * nnfolder.el (nnfolder-save-marks): Don't create directory named | 13835 | * nnfolder.el (nnfolder-save-marks): Don't create directory named |
| 13865 | after group in ~/. | 13836 | after group in ~/. |
| 13866 | 13837 | ||
| 13867 | 2001-08-25 Simon Josefsson <jas@extundo.com> | 13838 | 2001-08-25 Andreas Jaeger <aj@suse.de> |
| 13868 | From Andreas Jaeger <aj@suse.de> | ||
| 13869 | 13839 | ||
| 13870 | * nnfolder.el (nnfolder-open-marks): Fix typo. | 13840 | * nnfolder.el (nnfolder-open-marks): Fix typo. |
| 13871 | * nnml.el (nnml-open-marks): Likewise. | 13841 | * nnml.el (nnml-open-marks): Likewise. |
| @@ -13919,11 +13889,12 @@ | |||
| 13919 | 13889 | ||
| 13920 | * mml.el (mml-generate-mime-1): Force as multibyte string. | 13890 | * mml.el (mml-generate-mime-1): Force as multibyte string. |
| 13921 | 13891 | ||
| 13922 | 2001-08-24 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13892 | 2001-08-24 12:00:00 Martin Kretzschmar <Martin.Kretzschmar@inf.tu-dresden.de> |
| 13923 | 13893 | ||
| 13924 | * gnus-sum.el (gnus-summary-insert-line) | 13894 | * gnus-sum.el (gnus-summary-insert-line) |
| 13925 | (gnus-summary-prepare-threads): gnus-tmp-lines should be a string. | 13895 | (gnus-summary-prepare-threads): gnus-tmp-lines should be a string. |
| 13926 | From Martin Kretzschmar <Martin.Kretzschmar@inf.tu-dresden.de> | 13896 | |
| 13897 | 2001-08-24 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 13927 | 13898 | ||
| 13928 | * gnus-spec.el (gnus-correct-substring): Take optional END. | 13899 | * gnus-spec.el (gnus-correct-substring): Take optional END. |
| 13929 | 13900 | ||
| @@ -13945,8 +13916,7 @@ | |||
| 13945 | * gnus-util.el (gnus-create-info-command): Return an interactive | 13916 | * gnus-util.el (gnus-create-info-command): Return an interactive |
| 13946 | function. | 13917 | function. |
| 13947 | 13918 | ||
| 13948 | 2001-08-23 19:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 13919 | 2001-08-23 19:00:00 Katsumi Yamaoka <yamaoka@jpl.org> |
| 13949 | From Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 13950 | 13920 | ||
| 13951 | * gnus-spec.el (gnus-parse-complex-format): Use equal. | 13921 | * gnus-spec.el (gnus-parse-complex-format): Use equal. |
| 13952 | 13922 | ||
| @@ -14100,8 +14070,7 @@ | |||
| 14100 | 14070 | ||
| 14101 | * gnus.el (gnus-server-visual): Add defgroup. | 14071 | * gnus.el (gnus-server-visual): Add defgroup. |
| 14102 | 14072 | ||
| 14103 | 2001-08-19 Simon Josefsson <jas@extundo.com> | 14073 | 2001-08-19 Joe Casadonte <jcasadonte@northbound-train.com> |
| 14104 | From Joe Casadonte <jcasadonte@northbound-train.com> | ||
| 14105 | 14074 | ||
| 14106 | * gnus-srvr.el (gnus-server-opened-face, gnus-server-closed-face, | 14075 | * gnus-srvr.el (gnus-server-opened-face, gnus-server-closed-face, |
| 14107 | gnus-server-denied-face): New. | 14076 | gnus-server-denied-face): New. |
| @@ -14261,8 +14230,7 @@ | |||
| 14261 | * gnus-delay.el (gnus-delay-article): Allow "01:23" time spec, | 14230 | * gnus-delay.el (gnus-delay-article): Allow "01:23" time spec, |
| 14262 | which specifies a time today or tomorrow. | 14231 | which specifies a time today or tomorrow. |
| 14263 | 14232 | ||
| 14264 | 2001-08-15 Simon Josefsson <jas@extundo.com> | 14233 | 2001-08-15 Pavel Jan,Am(Bk <Pavel@Janik.cz> |
| 14265 | From Pavel@Janik.cz (Pavel Jan,Am(Bk) | ||
| 14266 | 14234 | ||
| 14267 | * gnus-agent.el (gnus-agent-make-mode-line-string) | 14235 | * gnus-agent.el (gnus-agent-make-mode-line-string) |
| 14268 | (gnus-agent-toggle-plugged): Use new API. | 14236 | (gnus-agent-toggle-plugged): Use new API. |
| @@ -14308,7 +14276,6 @@ | |||
| 14308 | * gnus-spec.el (gnus-format-specs): %n is 23 chars. | 14276 | * gnus-spec.el (gnus-format-specs): %n is 23 chars. |
| 14309 | 14277 | ||
| 14310 | 2001-08-11 09:40:00 Karl Kleinpaste <karl@charcoal.com> | 14278 | 2001-08-11 09:40:00 Karl Kleinpaste <karl@charcoal.com> |
| 14311 | Committed by Kai Gro,b_(Bjohann. | ||
| 14312 | 14279 | ||
| 14313 | * gnus-score.el (gnus-score-string): Fix `match' regexp | 14280 | * gnus-score.el (gnus-score-string): Fix `match' regexp |
| 14314 | for `extra' header case. | 14281 | for `extra' header case. |
| @@ -14389,23 +14356,23 @@ | |||
| 14389 | * imap.el (imap-gssapi-auth-p, imap-kerberos4-auth-p): Also check | 14356 | * imap.el (imap-gssapi-auth-p, imap-kerberos4-auth-p): Also check |
| 14390 | whether `imtest' is installed. | 14357 | whether `imtest' is installed. |
| 14391 | 14358 | ||
| 14392 | 2001-08-04 ShengHuo ZHU <zsh@cs.rochester.edu> | 14359 | 2001-08-04 Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com> |
| 14393 | Trivial patch from Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com> | ||
| 14394 | 14360 | ||
| 14395 | * gnus-sum.el (gnus-summary-show-article): Call | 14361 | * gnus-sum.el (gnus-summary-show-article): Call |
| 14396 | gnus-summary-update-secondary-secondary-mark. | 14362 | gnus-summary-update-secondary-secondary-mark. |
| 14397 | * gnus-sum.el (gnus-summary-edit-article-done): Ditto. | 14363 | * gnus-sum.el (gnus-summary-edit-article-done): Ditto. |
| 14398 | * gnus-sum.el (gnus-summary-reparent-thread): Ditto. | 14364 | * gnus-sum.el (gnus-summary-reparent-thread): Ditto. |
| 14399 | 14365 | ||
| 14366 | 2001-08-07 16:00:00 Gerd M,Av(Bllmann <gerd@gnu.org> | ||
| 14367 | |||
| 14368 | * mm-uu.el (mm-uu-dissect): Autoload. | ||
| 14369 | |||
| 14400 | 2001-08-07 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14370 | 2001-08-07 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 14401 | 14371 | ||
| 14402 | * gnus-sum.el (gnus-summary-make-menu-bar): Misc -> Gnus. | 14372 | * gnus-sum.el (gnus-summary-make-menu-bar): Misc -> Gnus. |
| 14403 | 14373 | ||
| 14404 | * gnus-group.el (gnus-group-make-menu-bar): Ditto. | 14374 | * gnus-group.el (gnus-group-make-menu-bar): Ditto. |
| 14405 | 14375 | ||
| 14406 | * mm-uu.el (mm-uu-dissect): Autoload. From Gerd M,Av(Bllmann | ||
| 14407 | <gerd@gnu.org>. | ||
| 14408 | |||
| 14409 | * gnus-art.el (gnus-output-to-file): Bind file-name-coding-system. | 14376 | * gnus-art.el (gnus-output-to-file): Bind file-name-coding-system. |
| 14410 | 14377 | ||
| 14411 | * gnus-util.el (gnus-output-to-rmail): Ditto. | 14378 | * gnus-util.el (gnus-output-to-rmail): Ditto. |
| @@ -14527,8 +14494,7 @@ | |||
| 14527 | (mm-pkcs7-enveloped-magic): Ditto. | 14494 | (mm-pkcs7-enveloped-magic): Ditto. |
| 14528 | (mm-view-pkcs7-get-type): Don't regexp quote. | 14495 | (mm-view-pkcs7-get-type): Don't regexp quote. |
| 14529 | 14496 | ||
| 14530 | 2001-08-01 14:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14497 | 2001-08-01 14:00:00 Andreas Fuchs <asf@void.at> |
| 14531 | From Andreas Fuchs <asf@void.at> | ||
| 14532 | 14498 | ||
| 14533 | * mml2015.el (mml2015-trust-boundaries-alist): Typo. | 14499 | * mml2015.el (mml2015-trust-boundaries-alist): Typo. |
| 14534 | 14500 | ||
| @@ -14623,13 +14589,11 @@ | |||
| 14623 | (smime-dns-server): Fix customize group. | 14589 | (smime-dns-server): Fix customize group. |
| 14624 | (smime-call-openssl-region): Use `smime-extra-arguments'. | 14590 | (smime-call-openssl-region): Use `smime-extra-arguments'. |
| 14625 | 14591 | ||
| 14626 | 2001-07-29 Simon Josefsson <jas@extundo.com> | 14592 | 2001-07-29 Vladimir Volovich <vvv@vsu.ru> |
| 14627 | From Vladimir Volovich <vvv@vsu.ru> | ||
| 14628 | 14593 | ||
| 14629 | * smime.el (smime-call-openssl-region): Ignore stderr. | 14594 | * smime.el (smime-call-openssl-region): Ignore stderr. |
| 14630 | 14595 | ||
| 14631 | 2001-07-29 Simon Josefsson <jas@extundo.com> | 14596 | 2001-07-29 Christoph Conrad <christoph.conrad@gmx.de> |
| 14632 | From Christoph Conrad <christoph.conrad@gmx.de> | ||
| 14633 | 14597 | ||
| 14634 | * gnus-agent.el (gnus-agent-save-group-info): Don't destroy active | 14598 | * gnus-agent.el (gnus-agent-save-group-info): Don't destroy active |
| 14635 | file. | 14599 | file. |
| @@ -14750,8 +14714,7 @@ | |||
| 14750 | 14714 | ||
| 14751 | * nnimap.el (nnimap-version): Bump version number. | 14715 | * nnimap.el (nnimap-version): Bump version number. |
| 14752 | 14716 | ||
| 14753 | 2001-07-26 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14717 | 2001-07-26 10:00:00 Steven E. Harris <seh@speakeasy.org> |
| 14754 | From Steven E. Harris <seh@speakeasy.org> | ||
| 14755 | 14718 | ||
| 14756 | * nnheader.el (nnheader-translate-file-chars): cygwin32 is running | 14719 | * nnheader.el (nnheader-translate-file-chars): cygwin32 is running |
| 14757 | in M$Windows too. | 14720 | in M$Windows too. |
| @@ -14773,8 +14736,7 @@ | |||
| 14773 | * gnus-sum.el (gnus-summary-prepare-threads): Shouldn't do tree | 14736 | * gnus-sum.el (gnus-summary-prepare-threads): Shouldn't do tree |
| 14774 | display (%B) for threads if threading is off. | 14737 | display (%B) for threads if threading is off. |
| 14775 | 14738 | ||
| 14776 | 2001-07-25 14:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14739 | 2001-07-25 14:00:00 Henrik Enberg <henrik@enberg.org> |
| 14777 | From Henrik Enberg <henrik@enberg.org> | ||
| 14778 | 14740 | ||
| 14779 | * gnus-msg.el: Customization patch. | 14741 | * gnus-msg.el: Customization patch. |
| 14780 | 14742 | ||
| @@ -14844,8 +14806,7 @@ | |||
| 14844 | * gnus-delay.el (gnus-delay-default-hour): New variable. | 14806 | * gnus-delay.el (gnus-delay-default-hour): New variable. |
| 14845 | (gnus-delay-article): Allow specific date in YYYY-MM-DD format. | 14807 | (gnus-delay-article): Allow specific date in YYYY-MM-DD format. |
| 14846 | 14808 | ||
| 14847 | 2001-07-23 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14809 | 2001-07-23 22:00:00 Karl Kleinpaste <karl@charcoal.com> |
| 14848 | From Karl Kleinpaste <karl@charcoal.com> | ||
| 14849 | 14810 | ||
| 14850 | * gnus-sum.el (gnus-summary-line-format-alist): Add %B. | 14811 | * gnus-sum.el (gnus-summary-line-format-alist): Add %B. |
| 14851 | (gnus-summary-prepare-threads): Ditto. | 14812 | (gnus-summary-prepare-threads): Ditto. |
| @@ -15002,11 +14963,11 @@ | |||
| 15002 | * nnrss.el (nnrss-read-group-data): Nuke emacs-lisp-mode-hook. | 14963 | * nnrss.el (nnrss-read-group-data): Nuke emacs-lisp-mode-hook. |
| 15003 | (nnrss-read-server-data): Ditto. | 14964 | (nnrss-read-server-data): Ditto. |
| 15004 | 14965 | ||
| 15005 | 2001-07-13 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14966 | 2001-07-13 12:00:00 Pavel Jan,Am(Bk <Pavel@Janik.cz> |
| 15006 | 14967 | ||
| 15007 | * gnus-setup.el (gnus-use-installed-gnus): Typo. | 14968 | * gnus-setup.el (gnus-use-installed-gnus): Typo. |
| 15008 | * Cleanup files. | 14969 | * Cleanup files. |
| 15009 | From Pavel@Janik.cz (Pavel Jan,Am(Bk). | 14970 | |
| 15010 | 14971 | ||
| 15011 | 2001-07-13 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 14972 | 2001-07-13 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 15012 | 14973 | ||
| @@ -15129,8 +15090,7 @@ | |||
| 15129 | * nntp.el (nntp-send-command, nntp-send-command-nodelete): | 15090 | * nntp.el (nntp-send-command, nntp-send-command-nodelete): |
| 15130 | (nntp-send-command-and-decode): Use gnus-point-at-bol. | 15091 | (nntp-send-command-and-decode): Use gnus-point-at-bol. |
| 15131 | 15092 | ||
| 15132 | 2001-07-09 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15093 | 2001-07-09 13:00:00 Paul Jarc <prj@po.cwru.edu> |
| 15133 | From Paul Jarc <prj@po.cwru.edu> | ||
| 15134 | 15094 | ||
| 15135 | * message.el (message-use-mail-followup-to): New variable. | 15095 | * message.el (message-use-mail-followup-to): New variable. |
| 15136 | (message-get-reply-headers): Use it. | 15096 | (message-get-reply-headers): Use it. |
| @@ -15218,8 +15178,7 @@ | |||
| 15218 | * gnus-start.el (gnus-check-first-time-used): Use `if' instead of | 15178 | * gnus-start.el (gnus-check-first-time-used): Use `if' instead of |
| 15219 | `when'. | 15179 | `when'. |
| 15220 | 15180 | ||
| 15221 | 2001-07-03 Simon Josefsson <jas@extundo.com> | 15181 | 2001-07-03 Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com> |
| 15222 | From Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com> | ||
| 15223 | 15182 | ||
| 15224 | * flow-fill.el (fill-flowed): Use (1+ (point-at-eol)) instead. | 15183 | * flow-fill.el (fill-flowed): Use (1+ (point-at-eol)) instead. |
| 15225 | 15184 | ||
| @@ -15267,8 +15226,7 @@ | |||
| 15267 | (rfc2047-encode-message-header): Fold lines even if | 15226 | (rfc2047-encode-message-header): Fold lines even if |
| 15268 | no QP encoding is done. | 15227 | no QP encoding is done. |
| 15269 | 15228 | ||
| 15270 | 2001-06-23 Simon Josefsson <jas@extundo.com> | 15229 | 2001-06-23 Samuel Tardieu <sam@inf.enst.fr> |
| 15271 | From Samuel Tardieu <sam@inf.enst.fr> | ||
| 15272 | 15230 | ||
| 15273 | * smime.el (smime-keys): Support additional certificates. | 15231 | * smime.el (smime-keys): Support additional certificates. |
| 15274 | (smime-make-certfiles): New function. | 15232 | (smime-make-certfiles): New function. |
| @@ -15302,8 +15260,7 @@ | |||
| 15302 | 15260 | ||
| 15303 | * message.el (message-goto-body): Return nil if not found. (revert!) | 15261 | * message.el (message-goto-body): Return nil if not found. (revert!) |
| 15304 | 15262 | ||
| 15305 | 2001-06-21 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15263 | 2001-06-21 10:00:00 John Fremlin <chief@bandits.org> (tiny change) |
| 15306 | From Fremlin <chief@bandits.org> | ||
| 15307 | 15264 | ||
| 15308 | * message.el (message-goto-body): Some messages have no header. | 15265 | * message.el (message-goto-body): Some messages have no header. |
| 15309 | 15266 | ||
| @@ -15385,7 +15342,7 @@ | |||
| 15385 | * nnweb.el (nnweb-google-parse-1): Fix Google content regexp. | 15342 | * nnweb.el (nnweb-google-parse-1): Fix Google content regexp. |
| 15386 | (nnweb-google-wash-article): Ditto. | 15343 | (nnweb-google-wash-article): Ditto. |
| 15387 | 15344 | ||
| 15388 | 2001-06-14 Ferenc Wagner <wferi@bolyai1.elte.hu> | 15345 | 2001-06-14 Ferenc Wagner <wferi@bolyai1.elte.hu> |
| 15389 | 15346 | ||
| 15390 | * nnweb.el (nnweb-google-parse-1): Fix Google url regexp. | 15347 | * nnweb.el (nnweb-google-parse-1): Fix Google url regexp. |
| 15391 | 15348 | ||
| @@ -15412,17 +15369,20 @@ | |||
| 15412 | 15369 | ||
| 15413 | * nnrss.el (nnrss-group-alist): Use |fr| instead of [fr]. | 15370 | * nnrss.el (nnrss-group-alist): Use |fr| instead of [fr]. |
| 15414 | 15371 | ||
| 15415 | 2001-06-12 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15372 | 2001-06-12 11:00:00 Marc Lefranc <Marc.Lefranc@univ-lille1.fr> |
| 15416 | 15373 | ||
| 15417 | * gnus-art.el (gnus-plain-save-name): Use file-relative-name. | 15374 | * gnus-art.el (gnus-plain-save-name): Use file-relative-name. |
| 15418 | From Marc Lefranc <Marc.Lefranc@univ-lille1.fr>. | 15375 | |
| 15376 | 2001-06-12 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 15419 | 15377 | ||
| 15420 | * nnrss.el (nnrss-node-text): Node might be nil. | 15378 | * nnrss.el (nnrss-node-text): Node might be nil. |
| 15421 | 15379 | ||
| 15422 | 2001-06-11 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15380 | 2001-06-11 10:00:00 Katsumi Yamaoka <yamaoka@jpl.org> |
| 15423 | 15381 | ||
| 15424 | * gnus-uu.el (gnus-uu-save-article): Use mml tag instead of | 15382 | * gnus-uu.el (gnus-uu-save-article): Use mml tag instead of |
| 15425 | part. From Katsumi Yamaoka <yamaoka@jpl.org>. | 15383 | part. |
| 15384 | |||
| 15385 | 2001-06-11 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 15426 | 15386 | ||
| 15427 | * nnrss.el (nnrss-group-alist): More items. | 15387 | * nnrss.el (nnrss-group-alist): More items. |
| 15428 | 15388 | ||
| @@ -15436,14 +15396,11 @@ | |||
| 15436 | * gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split | 15396 | * gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split |
| 15437 | restrict clauses. | 15397 | restrict clauses. |
| 15438 | 15398 | ||
| 15439 | 2001-06-07 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15399 | 2001-06-07 16:00:00 Benjamin Rutt <brutt+news@bloomington.in.us> |
| 15440 | |||
| 15441 | From Benjamin Rutt <brutt+news@bloomington.in.us> | ||
| 15442 | 15400 | ||
| 15443 | * message.el (message-wide-reply-confirm-recipients): New variable. | 15401 | * message.el (message-wide-reply-confirm-recipients): New variable. |
| 15444 | 15402 | ||
| 15445 | 2001-06-06 ShengHuo ZHU <zsh@cs.rochester.edu> | 15403 | 2001-06-06 Mark Thomas <mthomas@edrc.cmu.edu> (tiny change) |
| 15446 | Trivial patch from Mark Thomas <mthomas@edrc.cmu.edu> | ||
| 15447 | 15404 | ||
| 15448 | * nnmail.el (nnmail-fix-eudora-headers): Change the In-Reply-To | 15405 | * nnmail.el (nnmail-fix-eudora-headers): Change the In-Reply-To |
| 15449 | fix so it works with XEmacs. | 15406 | fix so it works with XEmacs. |
| @@ -15457,10 +15414,10 @@ | |||
| 15457 | 15414 | ||
| 15458 | * nnrss.el: Fix a few bugs. | 15415 | * nnrss.el: Fix a few bugs. |
| 15459 | 15416 | ||
| 15460 | 2001-06-05 Simon Josefsson <jas@extundo.com> | 15417 | 2001-06-05 Alex Schroeder <alex@gnu.org> |
| 15461 | 15418 | ||
| 15462 | * mm-decode.el (mm-handle-set-external-undisplayer): Don't | 15419 | * mm-decode.el (mm-handle-set-external-undisplayer): Don't |
| 15463 | generate compiler warnings. From Alex Schroeder <alex@gnu.org>. | 15420 | generate compiler warnings. |
| 15464 | 15421 | ||
| 15465 | 2001-06-04 Hrvoje Niksic <hniksic@arsdigita.com> | 15422 | 2001-06-04 Hrvoje Niksic <hniksic@arsdigita.com> |
| 15466 | 15423 | ||
| @@ -15499,20 +15456,17 @@ | |||
| 15499 | it is not possible to insert a character after a glyph which is at | 15456 | it is not possible to insert a character after a glyph which is at |
| 15500 | the end of a buffer. Patch by Lloyd Zusman <ljz@asfast.com>. | 15457 | the end of a buffer. Patch by Lloyd Zusman <ljz@asfast.com>. |
| 15501 | 15458 | ||
| 15502 | 2001-05-28 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 15459 | 2001-05-28 Jaap-Henk Hoepman <jhh@xs4all.nl> |
| 15503 | |||
| 15504 | From Jaap-Henk Hoepman (jhh@xs4all.nl). | ||
| 15505 | 15460 | ||
| 15506 | * mm-decode.el (mm-keep-viewer-alive-types): New variable. | 15461 | * mm-decode.el (mm-keep-viewer-alive-types): New variable. |
| 15507 | (mm-keep-viewer-alive-p, mm-handle-set-external-undisplayer, | 15462 | (mm-keep-viewer-alive-p, mm-handle-set-external-undisplayer, |
| 15508 | mm-destroy-postponed-undisplay-list): New functions. | 15463 | mm-destroy-postponed-undisplay-list): New functions. |
| 15509 | (mm-display-external): Use them. | 15464 | (mm-display-external): Use them. |
| 15510 | 15465 | ||
| 15511 | 2001-05-27 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 15466 | 2001-05-27 Raja R. Harinath <harinath@cs.umn.edu> |
| 15512 | 15467 | ||
| 15513 | * gnus-salt.el (gnus-tree-highlight-node): Bind `default-high' and | 15468 | * gnus-salt.el (gnus-tree-highlight-node): Bind `default-high' and |
| 15514 | `default-low' when evaluating `gnus-summary-highlight'. | 15469 | `default-low' when evaluating `gnus-summary-highlight'. |
| 15515 | From Raja R Harinath <harinath@cs.umn.edu>. | ||
| 15516 | 15470 | ||
| 15517 | 2001-05-27 Simon Josefsson <simon@josefsson.org> | 15471 | 2001-05-27 Simon Josefsson <simon@josefsson.org> |
| 15518 | 15472 | ||
| @@ -15523,8 +15477,7 @@ | |||
| 15523 | as details. | 15477 | as details. |
| 15524 | (mml2015-mailcrypt-clear-verify): Ditto. | 15478 | (mml2015-mailcrypt-clear-verify): Ditto. |
| 15525 | 15479 | ||
| 15526 | 2001-05-24 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 15480 | 2001-05-24 Nevin Kapur <nevin@jhu.edu> |
| 15527 | From Nevin Kapur <nevin@jhu.edu>. | ||
| 15528 | 15481 | ||
| 15529 | * gnus-sum.el (gnus-summary-default-high-score, | 15482 | * gnus-sum.el (gnus-summary-default-high-score, |
| 15530 | gnus-summary-default-low-score): New variables. | 15483 | gnus-summary-default-low-score): New variables. |
| @@ -15535,8 +15488,7 @@ | |||
| 15535 | * message.el (message-mail): pass the 'send-actions argument to | 15488 | * message.el (message-mail): pass the 'send-actions argument to |
| 15536 | `message-setup'. | 15489 | `message-setup'. |
| 15537 | 15490 | ||
| 15538 | 2001-05-16 Simon Josefsson <simon@josefsson.org> | 15491 | 2001-05-16 Raymond Scholz <ray-2001@zonix.de> |
| 15539 | From Raymond Scholz <ray-2001@zonix.de> | ||
| 15540 | 15492 | ||
| 15541 | * gnus-art.el (gnus-mime-view-part-as-charset): | 15493 | * gnus-art.el (gnus-mime-view-part-as-charset): |
| 15542 | (gnus-mime-internalize-part): Doc fixes. | 15494 | (gnus-mime-internalize-part): Doc fixes. |
| @@ -15600,7 +15552,7 @@ | |||
| 15600 | correctly. | 15552 | correctly. |
| 15601 | (nnrss-check-group): Use time. | 15553 | (nnrss-check-group): Use time. |
| 15602 | 15554 | ||
| 15603 | 2001-05-01 19:21:19 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 15555 | 2001-05-01 19:21:19 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 15604 | 15556 | ||
| 15605 | * gnus.el: Oort Gnus v0.03 is released. | 15557 | * gnus.el: Oort Gnus v0.03 is released. |
| 15606 | 15558 | ||
| @@ -15672,12 +15624,11 @@ | |||
| 15672 | (smime-decrypt-region): Ditto. | 15624 | (smime-decrypt-region): Ditto. |
| 15673 | 15625 | ||
| 15674 | 2001-04-12 Jason Merrill <jason_merrill@redhat.com> | 15626 | 2001-04-12 Jason Merrill <jason_merrill@redhat.com> |
| 15675 | Committed by Simon Josefsson <simon@josefsson.org> | ||
| 15676 | 15627 | ||
| 15677 | * imap.el (imap-shell-open): Erase the buffer *after* copying it into | 15628 | * imap.el (imap-shell-open): Erase the buffer *after* copying it into |
| 15678 | the log. | 15629 | the log. |
| 15679 | 15630 | ||
| 15680 | 2001-04-14 01:14:42 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> | 15631 | 2001-04-14 01:14:42 Lars Magne Ingebrigtsen <lars@ingebrigtsen.no> |
| 15681 | 15632 | ||
| 15682 | * gnus.el: Oort Gnus v0.02 is released. | 15633 | * gnus.el: Oort Gnus v0.02 is released. |
| 15683 | 15634 | ||
| @@ -15705,13 +15656,11 @@ | |||
| 15705 | 15656 | ||
| 15706 | * nnmail.el (nnmail-split-fancy-with-parent): Add docstring. | 15657 | * nnmail.el (nnmail-split-fancy-with-parent): Add docstring. |
| 15707 | 15658 | ||
| 15708 | 2001-04-12 19:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15659 | 2001-04-12 19:00:00 Jason Merrill <jason_merrill@redhat.com> |
| 15709 | From Jason Merrill <jason_merrill@redhat.com> | ||
| 15710 | 15660 | ||
| 15711 | * gnus-sum.el (gnus-summary-insert-new-articles): Reverse the articles. | 15661 | * gnus-sum.el (gnus-summary-insert-new-articles): Reverse the articles. |
| 15712 | 15662 | ||
| 15713 | 2001-04-10 08:01:15 Katsumi Yamaoka <yamaoka@jpl.org> | 15663 | 2001-04-10 08:01:15 Katsumi Yamaoka <yamaoka@jpl.org> |
| 15714 | Committed by ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 15715 | 15664 | ||
| 15716 | * gnus-msg.el (gnus-post-news): Fill the Newsgroups header by the | 15665 | * gnus-msg.el (gnus-post-news): Fill the Newsgroups header by the |
| 15717 | newsgroup names when the original article is a news message. | 15666 | newsgroup names when the original article is a news message. |
| @@ -15722,7 +15671,6 @@ | |||
| 15722 | supported. Suggest by Jim Meyering <jim@meyering.net>. | 15671 | supported. Suggest by Jim Meyering <jim@meyering.net>. |
| 15723 | 15672 | ||
| 15724 | 2001-04-02 Nevin Kapur <nevin@jhu.edu> | 15673 | 2001-04-02 Nevin Kapur <nevin@jhu.edu> |
| 15725 | Committed by Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>. | ||
| 15726 | 15674 | ||
| 15727 | * nnmail.el (nnmail-split-it): Added check for .* at the end of | 15675 | * nnmail.el (nnmail-split-it): Added check for .* at the end of |
| 15728 | regexp in nnmail-split-fancy. | 15676 | regexp in nnmail-split-fancy. |
| @@ -15790,13 +15738,11 @@ | |||
| 15790 | * qp.el (quoted-printable-decode-region): Just message | 15738 | * qp.el (quoted-printable-decode-region): Just message |
| 15791 | malformation; don't quit. | 15739 | malformation; don't quit. |
| 15792 | 15740 | ||
| 15793 | 2001-03-31 21:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15741 | 2001-03-31 21:00:00 Gerd Moellmann <gerd@gnu.org> |
| 15794 | From Gerd Moellmann <gerd@gnu.org>. | ||
| 15795 | 15742 | ||
| 15796 | * gnus.el (gnus-interactive): A typo. | 15743 | * gnus.el (gnus-interactive): A typo. |
| 15797 | 15744 | ||
| 15798 | 2001-03-26 Juanma Barranquero <lektu@uol.com.br> | 15745 | 2001-03-26 Juanma Barranquero <lektu@uol.com.br> |
| 15799 | Committed by ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 15800 | 15746 | ||
| 15801 | * gnus-util.el (gnus-delete-alist): Declare it as an alias of | 15747 | * gnus-util.el (gnus-delete-alist): Declare it as an alias of |
| 15802 | `assq-delete-all', if that function exists; otherwise use the old | 15748 | `assq-delete-all', if that function exists; otherwise use the old |
| @@ -15914,8 +15860,7 @@ | |||
| 15914 | 15860 | ||
| 15915 | * mml2015.el (mml2015-gpg-extract-from): No error. | 15861 | * mml2015.el (mml2015-gpg-extract-from): No error. |
| 15916 | 15862 | ||
| 15917 | 2001-03-18 23:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15863 | 2001-03-18 23:00:00 Bj,Ax(Brn Mork <bmork@dod.no> |
| 15918 | From Bj,Ax(Brn Mork <bmork@dod.no>. | ||
| 15919 | 15864 | ||
| 15920 | * mml2015.el (mml2015-gpg-extract-from): New function. | 15865 | * mml2015.el (mml2015-gpg-extract-from): New function. |
| 15921 | (mml2015-gpg-verify): Use it. | 15866 | (mml2015-gpg-verify): Use it. |
| @@ -15957,8 +15902,7 @@ | |||
| 15957 | * mailcap.el (mailcap-mime-data): Add application/sieve. | 15902 | * mailcap.el (mailcap-mime-data): Add application/sieve. |
| 15958 | (mailcap-mime-extensions): Add .siv, .xls. | 15903 | (mailcap-mime-extensions): Add .siv, .xls. |
| 15959 | 15904 | ||
| 15960 | 2001-03-14 20:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15905 | 2001-03-14 20:00:00 Christoph Conrad <christoph.conrad@gmx.de> |
| 15961 | From Christoph Conrad <christoph.conrad@gmx.de> | ||
| 15962 | 15906 | ||
| 15963 | * gnus-score.el (gnus-summary-lower-thread): Typo. | 15907 | * gnus-score.el (gnus-summary-lower-thread): Typo. |
| 15964 | 15908 | ||
| @@ -16003,7 +15947,6 @@ | |||
| 16003 | * nnrss.el: New file. | 15947 | * nnrss.el: New file. |
| 16004 | 15948 | ||
| 16005 | 2001-03-08 02:41:36 Katsumi Yamaoka <yamaoka@jpl.org> | 15949 | 2001-03-08 02:41:36 Katsumi Yamaoka <yamaoka@jpl.org> |
| 16006 | Committed by ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 16007 | 15950 | ||
| 16008 | * rfc2047.el (rfc2047-unfold-region): Fix arg of | 15951 | * rfc2047.el (rfc2047-unfold-region): Fix arg of |
| 16009 | `skip-chars-forward'. | 15952 | `skip-chars-forward'. |
| @@ -16027,9 +15970,10 @@ | |||
| 16027 | directory part. | 15970 | directory part. |
| 16028 | (gnus-score-search-global-directories): Use file-directory-p. | 15971 | (gnus-score-search-global-directories): Use file-directory-p. |
| 16029 | 15972 | ||
| 15973 | 2001-03-06 13:00:00 Adrian Aichner <adrian@xemacs.org> | ||
| 15974 | |||
| 16030 | * gnus-score.el (gnus-score-score-files-1): Use | 15975 | * gnus-score.el (gnus-score-score-files-1): Use |
| 16031 | gnus-kill-files-directory. | 15976 | gnus-kill-files-directory. |
| 16032 | From Adrian Aichner <adrian@xemacs.org>. | ||
| 16033 | 15977 | ||
| 16034 | 2001-03-05 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 15978 | 2001-03-05 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> |
| 16035 | 15979 | ||
| @@ -16054,8 +15998,7 @@ | |||
| 16054 | 15998 | ||
| 16055 | * gnus-sum.el (gnus-summary-limit-include-expunged): Fix. | 15999 | * gnus-sum.el (gnus-summary-limit-include-expunged): Fix. |
| 16056 | 16000 | ||
| 16057 | 2001-03-01 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 16001 | 2001-03-01 22:00:00 Katsumi Yamaoka <yamaoka@jpl.org> |
| 16058 | From Katsumi Yamaoka <yamaoka@jpl.org>. | ||
| 16059 | 16002 | ||
| 16060 | * dgnushack.el (coerce, merge, subseq): defmacro. | 16003 | * dgnushack.el (coerce, merge, subseq): defmacro. |
| 16061 | 16004 | ||
| @@ -16066,7 +16009,6 @@ | |||
| 16066 | uncompiled versions. | 16009 | uncompiled versions. |
| 16067 | 16010 | ||
| 16068 | 2001-02-26 11:27:27 Paul Jarc <prj@po.cwru.edu> | 16011 | 2001-02-26 11:27:27 Paul Jarc <prj@po.cwru.edu> |
| 16069 | Committed by ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 16070 | 16012 | ||
| 16071 | * gnus-util.el (gnus-split-references): Handle malformed References:. | 16013 | * gnus-util.el (gnus-split-references): Handle malformed References:. |
| 16072 | 16014 | ||
| @@ -16074,8 +16016,7 @@ | |||
| 16074 | 16016 | ||
| 16075 | * gnus-art.el (gnus-article-mime-part-status): 1 part. | 16017 | * gnus-art.el (gnus-article-mime-part-status): 1 part. |
| 16076 | 16018 | ||
| 16077 | 2001-02-25 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 16019 | 2001-02-25 10:00:00 NAGY Andras <nagya@inf.elte.hu> |
| 16078 | From NAGY Andras <nagya@inf.elte.hu>. | ||
| 16079 | 16020 | ||
| 16080 | * gnus.el (gnus-parameters): Typo. | 16021 | * gnus.el (gnus-parameters): Typo. |
| 16081 | 16022 | ||
| @@ -16183,13 +16124,11 @@ | |||
| 16183 | (gnus-article-sort-functions): Doc fix. Refer to | 16124 | (gnus-article-sort-functions): Doc fix. Refer to |
| 16184 | gnus-thread-sort-functions. | 16125 | gnus-thread-sort-functions. |
| 16185 | 16126 | ||
| 16186 | 2001-02-18 20:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> | 16127 | 2001-02-18 20:00:00 Paul Jarc <prj@po.cwru.edu> |
| 16187 | From Paul Jarc <prj@po.cwru.edu>. | ||
| 16188 | 16128 | ||
| 16189 | * message.el (message-get-reply-headers): More fixes. | 16129 | * message.el (message-get-reply-headers): More fixes. |
| 16190 | 16130 | ||
| 16191 | 2001-02-17 Paul Jarc <prj@po.cwru.edu> | 16131 | 2001-02-17 Paul Jarc <prj@po.cwru.edu> |
| 16192 | Committed by ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 16193 | 16132 | ||
| 16194 | * message.el (message-get-reply-headers): Fix bug with | 16133 | * message.el (message-get-reply-headers): Fix bug with |
| 16195 | Mail-Followup-To/to-address interaction. | 16134 | Mail-Followup-To/to-address interaction. |
| @@ -16234,7 +16173,6 @@ | |||
| 16234 | (nnml-request-regenerate): Use it. Change to deffoo. | 16173 | (nnml-request-regenerate): Use it. Change to deffoo. |
| 16235 | 16174 | ||
| 16236 | 2001-02-14 Katsumi Yamaoka <yamaoka@jpl.org> | 16175 | 2001-02-14 Katsumi Yamaoka <yamaoka@jpl.org> |
| 16237 | Committed by ShengHuo ZHU <zsh@cs.rochester.edu> | ||
| 16238 | 16176 | ||
| 16239 | * gnus.el (gnus-define-group-parameter): Fix. | 16177 | * gnus.el (gnus-define-group-parameter): Fix. |
| 16240 | 16178 | ||
| @@ -18187,7 +18125,7 @@ | |||
| 18187 | 18125 | ||
| 18188 | * mml.el (mml-generate-mime-1): Ignore ascii. | 18126 | * mml.el (mml-generate-mime-1): Ignore ascii. |
| 18189 | 18127 | ||
| 18190 | 2000-11-16 Justin Sheehy <justin@iago.org> | 18128 | 2000-11-16 Justin Sheehy <justin@iago.org> |
| 18191 | 18129 | ||
| 18192 | * gnus-sum.el (gnus-summary-make-menu-bar): Fix menu items. | 18130 | * gnus-sum.el (gnus-summary-make-menu-bar): Fix menu items. |
| 18193 | 18131 | ||
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el index f314d0e81d7..e773aa3bfac 100644 --- a/lisp/gnus/gmm-utils.el +++ b/lisp/gnus/gmm-utils.el | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | (defgroup gmm nil | 35 | (defgroup gmm nil |
| 36 | "Utility functions for Gnus, Message and MML" | 36 | "Utility functions for Gnus, Message and MML" |
| 37 | :prefix "gmm-" | 37 | :prefix "gmm-" |
| 38 | :version "23.0" ;; No Gnus | 38 | :version "22.1" ;; Gnus 5.10.9 |
| 39 | :group 'lisp) | 39 | :group 'lisp) |
| 40 | 40 | ||
| 41 | ;; Helper functions from `gnus-utils.el': gmm-verbose, gmm-message, gmm-error | 41 | ;; Helper functions from `gnus-utils.el': gmm-verbose, gmm-message, gmm-error |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 39292e33a1f..ecee7ff6847 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -853,6 +853,9 @@ be displayed by the first non-nil matching CONTENT face." | |||
| 853 | (defvar gnus-decode-header-function 'mail-decode-encoded-word-region | 853 | (defvar gnus-decode-header-function 'mail-decode-encoded-word-region |
| 854 | "Function used to decode headers.") | 854 | "Function used to decode headers.") |
| 855 | 855 | ||
| 856 | (defvar gnus-decode-address-function 'mail-decode-encoded-address-region | ||
| 857 | "Function used to decode addresses.") | ||
| 858 | |||
| 856 | (defvar gnus-article-dumbquotes-map | 859 | (defvar gnus-article-dumbquotes-map |
| 857 | '(("\200" "EUR") | 860 | '(("\200" "EUR") |
| 858 | ("\202" ",") | 861 | ("\202" ",") |
| @@ -2377,10 +2380,24 @@ If PROMPT (the prefix), prompt for a coding system to use." | |||
| 2377 | (set-buffer gnus-summary-buffer) | 2380 | (set-buffer gnus-summary-buffer) |
| 2378 | (error)) | 2381 | (error)) |
| 2379 | gnus-newsgroup-ignored-charsets)) | 2382 | gnus-newsgroup-ignored-charsets)) |
| 2380 | (inhibit-read-only t)) | 2383 | (inhibit-read-only t) |
| 2381 | (save-restriction | 2384 | end start) |
| 2382 | (article-narrow-to-head) | 2385 | (goto-char (point-min)) |
| 2383 | (funcall gnus-decode-header-function (point-min) (point-max))))) | 2386 | (when (search-forward "\n\n" nil 'move) |
| 2387 | (forward-line -1)) | ||
| 2388 | (setq end (point)) | ||
| 2389 | (while (not (bobp)) | ||
| 2390 | (while (progn | ||
| 2391 | (forward-line -1) | ||
| 2392 | (and (not (bobp)) | ||
| 2393 | (memq (char-after) '(?\t ? ))))) | ||
| 2394 | (setq start (point)) | ||
| 2395 | (if (looking-at "\ | ||
| 2396 | \\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\ | ||
| 2397 | \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):") | ||
| 2398 | (funcall gnus-decode-address-function start end) | ||
| 2399 | (funcall gnus-decode-header-function start end)) | ||
| 2400 | (goto-char (setq end start))))) | ||
| 2384 | 2401 | ||
| 2385 | (defun article-decode-group-name () | 2402 | (defun article-decode-group-name () |
| 2386 | "Decode group names in `Newsgroups:'." | 2403 | "Decode group names in `Newsgroups:'." |
| @@ -3923,6 +3940,14 @@ commands: | |||
| 3923 | (mm-enable-multibyte) | 3940 | (mm-enable-multibyte) |
| 3924 | (gnus-run-mode-hooks 'gnus-article-mode-hook)) | 3941 | (gnus-run-mode-hooks 'gnus-article-mode-hook)) |
| 3925 | 3942 | ||
| 3943 | ;; Internal variables. Are `gnus-button-regexp' and `gnus-button-last' used | ||
| 3944 | ;; at all? | ||
| 3945 | (defvar gnus-button-regexp nil) | ||
| 3946 | (defvar gnus-button-marker-list nil | ||
| 3947 | "Regexp matching any of the regexps from `gnus-button-alist'.") | ||
| 3948 | (defvar gnus-button-last nil | ||
| 3949 | "The value of `gnus-button-alist' when `gnus-button-regexp' was build.") | ||
| 3950 | |||
| 3926 | (defun gnus-article-setup-buffer () | 3951 | (defun gnus-article-setup-buffer () |
| 3927 | "Initialize the article buffer." | 3952 | "Initialize the article buffer." |
| 3928 | (let* ((name (if gnus-single-article-buffer "*Article*" | 3953 | (let* ((name (if gnus-single-article-buffer "*Article*" |
| @@ -4324,9 +4349,8 @@ Deleting parts may malfunction or destroy the article; continue? ") | |||
| 4324 | (handles gnus-article-mime-handles) | 4349 | (handles gnus-article-mime-handles) |
| 4325 | (none "(none)") | 4350 | (none "(none)") |
| 4326 | (description | 4351 | (description |
| 4327 | (or | 4352 | (mail-decode-encoded-word-string (or (mm-handle-description data) |
| 4328 | (mail-decode-encoded-word-string (or (mm-handle-description data) | 4353 | none))) |
| 4329 | none)))) | ||
| 4330 | (filename | 4354 | (filename |
| 4331 | (or (mail-content-type-get (mm-handle-disposition data) 'filename) | 4355 | (or (mail-content-type-get (mm-handle-disposition data) 'filename) |
| 4332 | none)) | 4356 | none)) |
| @@ -6695,13 +6719,6 @@ HEADER is a regexp to match a header. For a fuller explanation, see | |||
| 6695 | :inline t | 6719 | :inline t |
| 6696 | (integer :tag "Regexp group"))))) | 6720 | (integer :tag "Regexp group"))))) |
| 6697 | 6721 | ||
| 6698 | (defvar gnus-button-regexp nil) | ||
| 6699 | (defvar gnus-button-marker-list nil) | ||
| 6700 | ;; Regexp matching any of the regexps from `gnus-button-alist'. | ||
| 6701 | |||
| 6702 | (defvar gnus-button-last nil) | ||
| 6703 | ;; The value of `gnus-button-alist' when `gnus-button-regexp' was build. | ||
| 6704 | |||
| 6705 | ;;; Commands: | 6722 | ;;; Commands: |
| 6706 | 6723 | ||
| 6707 | (defun gnus-article-push-button (event) | 6724 | (defun gnus-article-push-button (event) |
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el index 8df3a3b0e70..fb28d6440fd 100644 --- a/lisp/gnus/gnus-demon.el +++ b/lisp/gnus/gnus-demon.el | |||
| @@ -218,7 +218,7 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." | |||
| 218 | (< idle gnus-demon-idle-time)) ; Idle timed out. | 218 | (< idle gnus-demon-idle-time)) ; Idle timed out. |
| 219 | (t (< 0 gnus-demon-idle-time)))) ; Or just need to be idle. | 219 | (t (< 0 gnus-demon-idle-time)))) ; Or just need to be idle. |
| 220 | ;; So we call the handler. | 220 | ;; So we call the handler. |
| 221 | (progn | 221 | (gnus-with-local-quit |
| 222 | (ignore-errors (funcall (car handler))) | 222 | (ignore-errors (funcall (car handler))) |
| 223 | ;; And reset the timer. | 223 | ;; And reset the timer. |
| 224 | (setcar (nthcdr 1 handler) | 224 | (setcar (nthcdr 1 handler) |
| @@ -232,14 +232,15 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." | |||
| 232 | (gnus-demon-is-idle-p)) | 232 | (gnus-demon-is-idle-p)) |
| 233 | ;; We want to call this handler each and every time that | 233 | ;; We want to call this handler each and every time that |
| 234 | ;; Emacs is idle. | 234 | ;; Emacs is idle. |
| 235 | (ignore-errors (funcall (car handler)))) | 235 | (gnus-with-local-quit |
| 236 | (ignore-errors (funcall (car handler))))) | ||
| 236 | (t | 237 | (t |
| 237 | ;; We want to call this handler only if Emacs has been idle | 238 | ;; We want to call this handler only if Emacs has been idle |
| 238 | ;; for a specified number of timesteps. | 239 | ;; for a specified number of timesteps. |
| 239 | (and (not (memq (car handler) gnus-demon-idle-has-been-called)) | 240 | (and (not (memq (car handler) gnus-demon-idle-has-been-called)) |
| 240 | (< idle gnus-demon-idle-time) | 241 | (< idle gnus-demon-idle-time) |
| 241 | (gnus-demon-is-idle-p) | 242 | (gnus-demon-is-idle-p) |
| 242 | (progn | 243 | (gnus-with-local-quit |
| 243 | (ignore-errors (funcall (car handler))) | 244 | (ignore-errors (funcall (car handler))) |
| 244 | ;; Make sure the handler won't be called once more in | 245 | ;; Make sure the handler won't be called once more in |
| 245 | ;; this idle-cycle. | 246 | ;; this idle-cycle. |
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index 125e5bebd49..013be410632 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el | |||
| @@ -76,7 +76,6 @@ | |||
| 76 | (when (gnus-visual-p 'draft-menu 'menu) | 76 | (when (gnus-visual-p 'draft-menu 'menu) |
| 77 | (gnus-draft-make-menu-bar)) | 77 | (gnus-draft-make-menu-bar)) |
| 78 | (gnus-add-minor-mode 'gnus-draft-mode " Draft" gnus-draft-mode-map) | 78 | (gnus-add-minor-mode 'gnus-draft-mode " Draft" gnus-draft-mode-map) |
| 79 | (mml-mode) | ||
| 80 | (gnus-run-hooks 'gnus-draft-mode-hook)))) | 79 | (gnus-run-hooks 'gnus-draft-mode-hook)))) |
| 81 | 80 | ||
| 82 | ;;; Commands | 81 | ;;; Commands |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 2e452136f3c..47944aeef41 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | (require 'gnus) | 60 | (require 'gnus) |
| 61 | (require 'gnus-int) | 61 | (require 'gnus-int) |
| 62 | (require 'gnus-sum) | 62 | (require 'gnus-sum) |
| 63 | (require 'gnus-util) | ||
| 63 | (require 'nnmail) | 64 | (require 'nnmail) |
| 64 | 65 | ||
| 65 | (defvar gnus-registry-dirty t | 66 | (defvar gnus-registry-dirty t |
| @@ -243,7 +244,8 @@ way." | |||
| 243 | (gnus-registry-clean-empty-function)) | 244 | (gnus-registry-clean-empty-function)) |
| 244 | ;; now trim the registry appropriately | 245 | ;; now trim the registry appropriately |
| 245 | (setq gnus-registry-alist (gnus-registry-trim | 246 | (setq gnus-registry-alist (gnus-registry-trim |
| 246 | (hashtable-to-alist gnus-registry-hashtb))) | 247 | (gnus-hashtable-to-alist |
| 248 | gnus-registry-hashtb))) | ||
| 247 | ;; really save | 249 | ;; really save |
| 248 | (gnus-registry-cache-save) | 250 | (gnus-registry-cache-save) |
| 249 | (setq gnus-registry-entry-caching caching) | 251 | (setq gnus-registry-entry-caching caching) |
| @@ -262,7 +264,7 @@ way." | |||
| 262 | 264 | ||
| 263 | (defun gnus-registry-read () | 265 | (defun gnus-registry-read () |
| 264 | (gnus-registry-cache-read) | 266 | (gnus-registry-cache-read) |
| 265 | (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist)) | 267 | (setq gnus-registry-hashtb (gnus-alist-to-hashtable gnus-registry-alist)) |
| 266 | (setq gnus-registry-dirty nil)) | 268 | (setq gnus-registry-dirty nil)) |
| 267 | 269 | ||
| 268 | (defun gnus-registry-trim (alist) | 270 | (defun gnus-registry-trim (alist) |
| @@ -290,26 +292,6 @@ way." | |||
| 290 | (cdr (gethash (car a) timehash)) | 292 | (cdr (gethash (car a) timehash)) |
| 291 | (cdr (gethash (car b) timehash)))))))))) | 293 | (cdr (gethash (car b) timehash)))))))))) |
| 292 | 294 | ||
| 293 | (defun alist-to-hashtable (alist) | ||
| 294 | "Build a hashtable from the values in ALIST." | ||
| 295 | (let ((ht (make-hash-table | ||
| 296 | :size 4096 | ||
| 297 | :test 'equal))) | ||
| 298 | (mapc | ||
| 299 | (lambda (kv-pair) | ||
| 300 | (puthash (car kv-pair) (cdr kv-pair) ht)) | ||
| 301 | alist) | ||
| 302 | ht)) | ||
| 303 | |||
| 304 | (defun hashtable-to-alist (hash) | ||
| 305 | "Build an alist from the values in HASH." | ||
| 306 | (let ((list nil)) | ||
| 307 | (maphash | ||
| 308 | (lambda (key value) | ||
| 309 | (setq list (cons (cons key value) list))) | ||
| 310 | hash) | ||
| 311 | list)) | ||
| 312 | |||
| 313 | (defun gnus-registry-action (action data-header from &optional to method) | 295 | (defun gnus-registry-action (action data-header from &optional to method) |
| 314 | (let* ((id (mail-header-id data-header)) | 296 | (let* ((id (mail-header-id data-header)) |
| 315 | (subject (gnus-registry-simplify-subject | 297 | (subject (gnus-registry-simplify-subject |
| @@ -660,7 +642,7 @@ Returns the first place where the trail finds a group name." | |||
| 660 | "Clear the Gnus registry." | 642 | "Clear the Gnus registry." |
| 661 | (interactive) | 643 | (interactive) |
| 662 | (setq gnus-registry-alist nil) | 644 | (setq gnus-registry-alist nil) |
| 663 | (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist)) | 645 | (setq gnus-registry-hashtb (gnus-alist-to-hashtable gnus-registry-alist)) |
| 664 | (setq gnus-registry-dirty t)) | 646 | (setq gnus-registry-dirty t)) |
| 665 | 647 | ||
| 666 | ;;;###autoload | 648 | ;;;###autoload |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index b94d093329a..8dcd0753e59 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -992,7 +992,11 @@ which it may alter in any way." | |||
| 992 | :group 'gnus-summary) | 992 | :group 'gnus-summary) |
| 993 | 993 | ||
| 994 | (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string | 994 | (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string |
| 995 | "Variable that says which function should be used to decode a string with encoded words.") | 995 | "Function used to decode a string with encoded words.") |
| 996 | |||
| 997 | (defvar gnus-decode-encoded-address-function | ||
| 998 | 'mail-decode-encoded-address-string | ||
| 999 | "Function used to decode addresses with encoded words.") | ||
| 996 | 1000 | ||
| 997 | (defcustom gnus-extra-headers '(To Newsgroups) | 1001 | (defcustom gnus-extra-headers '(To Newsgroups) |
| 998 | "*Extra headers to parse." | 1002 | "*Extra headers to parse." |
| @@ -1001,7 +1005,7 @@ which it may alter in any way." | |||
| 1001 | :type '(repeat symbol)) | 1005 | :type '(repeat symbol)) |
| 1002 | 1006 | ||
| 1003 | (defcustom gnus-ignored-from-addresses | 1007 | (defcustom gnus-ignored-from-addresses |
| 1004 | (and user-mail-address | 1008 | (and user-mail-address |
| 1005 | (not (string= user-mail-address "")) | 1009 | (not (string= user-mail-address "")) |
| 1006 | (regexp-quote user-mail-address)) | 1010 | (regexp-quote user-mail-address)) |
| 1007 | "*Regexp of From headers that may be suppressed in favor of To headers." | 1011 | "*Regexp of From headers that may be suppressed in favor of To headers." |
| @@ -2434,7 +2438,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) | |||
| 2434 | ["Unread" gnus-summary-limit-to-unread t] | 2438 | ["Unread" gnus-summary-limit-to-unread t] |
| 2435 | ["Unseen" gnus-summary-limit-to-unseen t] | 2439 | ["Unseen" gnus-summary-limit-to-unseen t] |
| 2436 | ["Non-dormant" gnus-summary-limit-exclude-dormant t] | 2440 | ["Non-dormant" gnus-summary-limit-exclude-dormant t] |
| 2437 | ["Next articles" gnus-summary-limit-to-articles t] | 2441 | ["Next or process marked articles" gnus-summary-limit-to-articles t] |
| 2438 | ["Pop limit" gnus-summary-pop-limit t] | 2442 | ["Pop limit" gnus-summary-pop-limit t] |
| 2439 | ["Show dormant" gnus-summary-limit-include-dormant t] | 2443 | ["Show dormant" gnus-summary-limit-include-dormant t] |
| 2440 | ["Hide childless dormant" | 2444 | ["Hide childless dormant" |
| @@ -3436,7 +3440,7 @@ buffer that was in action when the last article was fetched." | |||
| 3436 | (concat "-> " | 3440 | (concat "-> " |
| 3437 | (inline | 3441 | (inline |
| 3438 | (gnus-summary-extract-address-component | 3442 | (gnus-summary-extract-address-component |
| 3439 | (funcall gnus-decode-encoded-word-function to))))) | 3443 | (funcall gnus-decode-encoded-address-function to))))) |
| 3440 | ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) | 3444 | ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) |
| 3441 | (concat "=> " newsgroups))))) | 3445 | (concat "=> " newsgroups))))) |
| 3442 | (inline (gnus-summary-extract-address-component gnus-tmp-from))))) | 3446 | (inline (gnus-summary-extract-address-component gnus-tmp-from))))) |
| @@ -4182,7 +4186,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." | |||
| 4182 | (error x)) | 4186 | (error x)) |
| 4183 | (condition-case () ; from | 4187 | (condition-case () ; from |
| 4184 | (gnus-remove-odd-characters | 4188 | (gnus-remove-odd-characters |
| 4185 | (funcall gnus-decode-encoded-word-function | 4189 | (funcall gnus-decode-encoded-address-function |
| 4186 | (setq x (nnheader-nov-field)))) | 4190 | (setq x (nnheader-nov-field)))) |
| 4187 | (error x)) | 4191 | (error x)) |
| 4188 | (nnheader-nov-field) ; date | 4192 | (nnheader-nov-field) ; date |
| @@ -5956,7 +5960,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." | |||
| 5956 | (progn | 5960 | (progn |
| 5957 | (goto-char p) | 5961 | (goto-char p) |
| 5958 | (if (search-forward "\nfrom:" nil t) | 5962 | (if (search-forward "\nfrom:" nil t) |
| 5959 | (funcall gnus-decode-encoded-word-function | 5963 | (funcall gnus-decode-encoded-address-function |
| 5960 | (nnheader-header-value)) | 5964 | (nnheader-header-value)) |
| 5961 | "(nobody)")) | 5965 | "(nobody)")) |
| 5962 | ;; Date. | 5966 | ;; Date. |
| @@ -8449,10 +8453,11 @@ to guess what the document format is." | |||
| 8449 | ;; the parent article. | 8453 | ;; the parent article. |
| 8450 | (when (setq to-address (or (gnus-fetch-field "reply-to") | 8454 | (when (setq to-address (or (gnus-fetch-field "reply-to") |
| 8451 | (gnus-fetch-field "from"))) | 8455 | (gnus-fetch-field "from"))) |
| 8452 | (setq params (append | 8456 | (setq params |
| 8453 | (list (cons 'to-address | 8457 | (append |
| 8454 | (funcall gnus-decode-encoded-word-function | 8458 | (list (cons 'to-address |
| 8455 | to-address)))))) | 8459 | (funcall gnus-decode-encoded-address-function |
| 8460 | to-address)))))) | ||
| 8456 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) | 8461 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) |
| 8457 | (insert-buffer-substring gnus-original-article-buffer) | 8462 | (insert-buffer-substring gnus-original-article-buffer) |
| 8458 | ;; Remove lines that may lead nndoc to misinterpret the | 8463 | ;; Remove lines that may lead nndoc to misinterpret the |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 6f706fabce5..09d7ab9432e 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -746,6 +746,28 @@ If there's no subdirectory, delete DIRECTORY as well." | |||
| 746 | (unless dir | 746 | (unless dir |
| 747 | (delete-directory directory))))) | 747 | (delete-directory directory))))) |
| 748 | 748 | ||
| 749 | ;; The following two functions are used in gnus-registry. | ||
| 750 | ;; They were contributed by Andreas Fuchs <asf@void.at>. | ||
| 751 | (defun gnus-alist-to-hashtable (alist) | ||
| 752 | "Build a hashtable from the values in ALIST." | ||
| 753 | (let ((ht (make-hash-table | ||
| 754 | :size 4096 | ||
| 755 | :test 'equal))) | ||
| 756 | (mapc | ||
| 757 | (lambda (kv-pair) | ||
| 758 | (puthash (car kv-pair) (cdr kv-pair) ht)) | ||
| 759 | alist) | ||
| 760 | ht)) | ||
| 761 | |||
| 762 | (defun gnus-hashtable-to-alist (hash) | ||
| 763 | "Build an alist from the values in HASH." | ||
| 764 | (let ((list nil)) | ||
| 765 | (maphash | ||
| 766 | (lambda (key value) | ||
| 767 | (setq list (cons (cons key value) list))) | ||
| 768 | hash) | ||
| 769 | list)) | ||
| 770 | |||
| 749 | (defun gnus-strip-whitespace (string) | 771 | (defun gnus-strip-whitespace (string) |
| 750 | "Return STRING stripped of all whitespace." | 772 | "Return STRING stripped of all whitespace." |
| 751 | (while (string-match "[\r\n\t ]+" string) | 773 | (while (string-match "[\r\n\t ]+" string) |
| @@ -1616,6 +1638,25 @@ empty directories from OLD-PATH." | |||
| 1616 | (defalias 'gnus-set-process-query-on-exit-flag | 1638 | (defalias 'gnus-set-process-query-on-exit-flag |
| 1617 | 'process-kill-without-query)) | 1639 | 'process-kill-without-query)) |
| 1618 | 1640 | ||
| 1641 | (if (fboundp 'with-local-quit) | ||
| 1642 | (defalias 'gnus-with-local-quit 'with-local-quit) | ||
| 1643 | (defmacro gnus-with-local-quit (&rest body) | ||
| 1644 | "Execute BODY, allowing quits to terminate BODY but not escape further. | ||
| 1645 | When a quit terminates BODY, `gnus-with-local-quit' returns nil but | ||
| 1646 | requests another quit. That quit will be processed as soon as quitting | ||
| 1647 | is allowed once again. (Immediately, if `inhibit-quit' is nil.)" | ||
| 1648 | ;;(declare (debug t) (indent 0)) | ||
| 1649 | `(condition-case nil | ||
| 1650 | (let ((inhibit-quit nil)) | ||
| 1651 | ,@body) | ||
| 1652 | (quit (setq quit-flag t) | ||
| 1653 | ;; This call is to give a chance to handle quit-flag | ||
| 1654 | ;; in case inhibit-quit is nil. | ||
| 1655 | ;; Without this, it will not be handled until the next function | ||
| 1656 | ;; call, and that might allow it to exit thru a condition-case | ||
| 1657 | ;; that intends to handle the quit signal next time. | ||
| 1658 | (eval '(ignore nil)))))) | ||
| 1659 | |||
| 1619 | (provide 'gnus-util) | 1660 | (provide 'gnus-util) |
| 1620 | 1661 | ||
| 1621 | ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 | 1662 | ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 |
diff --git a/lisp/gnus/mail-parse.el b/lisp/gnus/mail-parse.el index 6a9a4755bb2..3c1aa8111c2 100644 --- a/lisp/gnus/mail-parse.el +++ b/lisp/gnus/mail-parse.el | |||
| @@ -70,6 +70,8 @@ | |||
| 70 | (defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string) | 70 | (defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string) |
| 71 | (defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region) | 71 | (defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region) |
| 72 | (defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string) | 72 | (defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string) |
| 73 | (defalias 'mail-decode-encoded-address-region 'rfc2047-decode-address-region) | ||
| 74 | (defalias 'mail-decode-encoded-address-string 'rfc2047-decode-address-string) | ||
| 73 | 75 | ||
| 74 | (provide 'mail-parse) | 76 | (provide 'mail-parse) |
| 75 | 77 | ||
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 4ee87933967..36a969fdefd 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -3280,7 +3280,7 @@ prefix, and don't delete any headers." | |||
| 3280 | (message-narrow-to-head-1) | 3280 | (message-narrow-to-head-1) |
| 3281 | (vector 0 | 3281 | (vector 0 |
| 3282 | (or (message-fetch-field "subject") "none") | 3282 | (or (message-fetch-field "subject") "none") |
| 3283 | (message-fetch-field "from") | 3283 | (or (message-fetch-field "from") "nobody") |
| 3284 | (message-fetch-field "date") | 3284 | (message-fetch-field "date") |
| 3285 | (message-fetch-field "message-id" t) | 3285 | (message-fetch-field "message-id" t) |
| 3286 | (message-fetch-field "references") | 3286 | (message-fetch-field "references") |
| @@ -3329,7 +3329,7 @@ prefix, and don't delete any headers." | |||
| 3329 | (message-narrow-to-head-1) | 3329 | (message-narrow-to-head-1) |
| 3330 | (vector 0 | 3330 | (vector 0 |
| 3331 | (or (message-fetch-field "subject") "none") | 3331 | (or (message-fetch-field "subject") "none") |
| 3332 | (message-fetch-field "from") | 3332 | (or (message-fetch-field "from") "nobody") |
| 3333 | (message-fetch-field "date") | 3333 | (message-fetch-field "date") |
| 3334 | (message-fetch-field "message-id" t) | 3334 | (message-fetch-field "message-id" t) |
| 3335 | (message-fetch-field "references") | 3335 | (message-fetch-field "references") |
| @@ -3897,9 +3897,15 @@ If you always want Gnus to send messages in one piece, set | |||
| 3897 | 'call-process-region | 3897 | 'call-process-region |
| 3898 | (append | 3898 | (append |
| 3899 | (list (point-min) (point-max) | 3899 | (list (point-min) (point-max) |
| 3900 | (if (boundp 'sendmail-program) | 3900 | (cond ((boundp 'sendmail-program) |
| 3901 | sendmail-program | 3901 | sendmail-program) |
| 3902 | "/usr/lib/sendmail") | 3902 | ((file-exists-p "/usr/sbin/sendmail") |
| 3903 | "/usr/sbin/sendmail") | ||
| 3904 | ((file-exists-p "/usr/lib/sendmail") | ||
| 3905 | "/usr/lib/sendmail") | ||
| 3906 | ((file-exists-p "/usr/ucblib/sendmail") | ||
| 3907 | "/usr/ucblib/sendmail") | ||
| 3908 | (t "fakemail")) | ||
| 3903 | nil errbuf nil "-oi") | 3909 | nil errbuf nil "-oi") |
| 3904 | ;; Always specify who from, | 3910 | ;; Always specify who from, |
| 3905 | ;; since some systems have broken sendmails. | 3911 | ;; since some systems have broken sendmails. |
| @@ -5837,7 +5843,7 @@ want to get rid of this query permanently."))) | |||
| 5837 | (setq message-id (message-fetch-field "message-id" t) | 5843 | (setq message-id (message-fetch-field "message-id" t) |
| 5838 | references (message-fetch-field "references") | 5844 | references (message-fetch-field "references") |
| 5839 | date (message-fetch-field "date") | 5845 | date (message-fetch-field "date") |
| 5840 | from (message-fetch-field "from") | 5846 | from (or (message-fetch-field "from") "nobody") |
| 5841 | subject (or (message-fetch-field "subject") "none")) | 5847 | subject (or (message-fetch-field "subject") "none")) |
| 5842 | (when gnus-list-identifiers | 5848 | (when gnus-list-identifiers |
| 5843 | (setq subject (message-strip-list-identifiers subject))) | 5849 | (setq subject (message-strip-list-identifiers subject))) |
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 26a1bf23e84..1c9f9749f85 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -253,7 +253,7 @@ superset of iso-8859-1." | |||
| 253 | :tag "Other options" | 253 | :tag "Other options" |
| 254 | (cons (symbol :tag "From charset") | 254 | (cons (symbol :tag "From charset") |
| 255 | (symbol :tag "To charset")))) | 255 | (symbol :tag "To charset")))) |
| 256 | :version "23.0" ;; No Gnus | 256 | :version "22.1" ;; Gnus 5.10.9 |
| 257 | :group 'mime) | 257 | :group 'mime) |
| 258 | 258 | ||
| 259 | (defcustom mm-charset-eval-alist | 259 | (defcustom mm-charset-eval-alist |
| @@ -270,7 +270,7 @@ If an article is encoded in an unknown CHARSET, FORM is | |||
| 270 | evaluated. This allows to load additional libraries providing | 270 | evaluated. This allows to load additional libraries providing |
| 271 | charsets on demand. If supported by your Emacs version, you | 271 | charsets on demand. If supported by your Emacs version, you |
| 272 | could use `autoload-coding-system' here." | 272 | could use `autoload-coding-system' here." |
| 273 | :version "23.0" ;; No Gnus | 273 | :version "22.1" ;; Gnus 5.10.9 |
| 274 | :type '(list (set :inline t | 274 | :type '(list (set :inline t |
| 275 | (const (windows-1250 . (mm-codepage-setup 1250 t))) | 275 | (const (windows-1250 . (mm-codepage-setup 1250 t))) |
| 276 | (const (windows-1251 . (mm-codepage-setup 1251 t))) | 276 | (const (windows-1251 . (mm-codepage-setup 1251 t))) |
diff --git a/lisp/gnus/nnslashdot.el b/lisp/gnus/nnslashdot.el index 66ce4d54472..37ecaf0f32b 100644 --- a/lisp/gnus/nnslashdot.el +++ b/lisp/gnus/nnslashdot.el | |||
| @@ -258,7 +258,9 @@ | |||
| 258 | (setq contents | 258 | (setq contents |
| 259 | (buffer-substring | 259 | (buffer-substring |
| 260 | (search-forward "<div class=\"commentBody\">") | 260 | (search-forward "<div class=\"commentBody\">") |
| 261 | (search-forward "</div>"))))))) | 261 | (progn |
| 262 | (search-forward "<div class=\"commentSub\">") | ||
| 263 | (match-beginning 0)))))))) | ||
| 262 | (search-failed (nnslashdot-lose why))) | 264 | (search-failed (nnslashdot-lose why))) |
| 263 | 265 | ||
| 264 | (when contents | 266 | (when contents |
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 7714c566dce..4b376957377 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el | |||
| @@ -75,22 +75,26 @@ | |||
| 75 | 75 | ||
| 76 | (defcustom pop3-authentication-scheme 'pass | 76 | (defcustom pop3-authentication-scheme 'pass |
| 77 | "*POP3 authentication scheme. | 77 | "*POP3 authentication scheme. |
| 78 | Defaults to 'pass, for the standard USER/PASS authentication. Other valid | 78 | Defaults to `pass', for the standard USER/PASS authentication. The other |
| 79 | values are 'apop." | 79 | valid value is 'apop'." |
| 80 | :version "22.1" ;; Oort Gnus | 80 | :type '(choice (const :tag "Normal user/password" pass) |
| 81 | :type '(choice (const :tag "USER/PASS" pass) | ||
| 82 | (const :tag "APOP" apop)) | 81 | (const :tag "APOP" apop)) |
| 82 | :version "22.1" ;; Oort Gnus | ||
| 83 | :group 'pop3) | 83 | :group 'pop3) |
| 84 | 84 | ||
| 85 | (defcustom pop3-leave-mail-on-server nil | 85 | (defcustom pop3-leave-mail-on-server nil |
| 86 | "*Non-nil if the mail is to be left on the POP server after fetching. | 86 | "*Non-nil if the mail is to be left on the POP server after fetching. |
| 87 | 87 | ||
| 88 | If the `pop3-leave-mail-on-server' is non-`nil' the mail is to be | 88 | If `pop3-leave-mail-on-server' is non-nil the mail is to be left |
| 89 | left on the POP server after fetching. Note that POP servers | 89 | on the POP server after fetching. Note that POP servers maintain |
| 90 | maintain no state information between sessions, so what the | 90 | no state information between sessions, so what the client |
| 91 | client believes is there and what is actually there may not match | 91 | believes is there and what is actually there may not match up. |
| 92 | up. If they do not, then the whole thing can fall apart and | 92 | If they do not, then you may get duplicate mails or the whole |
| 93 | leave you with a corrupt mailbox." | 93 | thing can fall apart and leave you with a corrupt mailbox." |
| 94 | ;; We can't use the UILD support from XEmacs mail-lib or cvs.m17n.org: | ||
| 95 | ;; http://thread.gmane.org/v9lld8fml4.fsf@marauder.physik.uni-ulm.de | ||
| 96 | ;; http://thread.gmane.org/b9yy8hzy9ej.fsf@jpl.org | ||
| 97 | ;; Any volunteer to re-implement this? | ||
| 94 | :version "22.1" ;; Oort Gnus | 98 | :version "22.1" ;; Oort Gnus |
| 95 | :type 'boolean | 99 | :type 'boolean |
| 96 | :group 'pop3) | 100 | :group 'pop3) |
| @@ -166,11 +170,14 @@ Shorter values mean quicker response, but are more CPU intensive.") | |||
| 166 | (unless pop3-leave-mail-on-server | 170 | (unless pop3-leave-mail-on-server |
| 167 | (pop3-dele process n)) | 171 | (pop3-dele process n)) |
| 168 | (setq n (+ 1 n)) | 172 | (setq n (+ 1 n)) |
| 169 | (if pop3-debug (sit-for 1) (sit-for 0.1)) | 173 | (if pop3-debug (sit-for 1) (sit-for 0.1))) ; why? |
| 170 | ) | 174 | (when (and pop3-leave-mail-on-server |
| 175 | (> n 1)) | ||
| 176 | (message "pop3.el doesn't support UIDL. Setting `pop3-leave-mail-on-server' | ||
| 177 | to %s might not give the result you'd expect." pop3-leave-mail-on-server) | ||
| 178 | (sit-for 1)) | ||
| 171 | (pop3-quit process)) | 179 | (pop3-quit process)) |
| 172 | (kill-buffer crashbuf) | 180 | (kill-buffer crashbuf)) |
| 173 | ) | ||
| 174 | t) | 181 | t) |
| 175 | 182 | ||
| 176 | (defun pop3-get-message-count () | 183 | (defun pop3-get-message-count () |
| @@ -312,6 +319,8 @@ If NOW, use that time instead." | |||
| 312 | ;; Date: 08 Jul 1996 23:22:24 -0400 | 319 | ;; Date: 08 Jul 1996 23:22:24 -0400 |
| 313 | ;; should be | 320 | ;; should be |
| 314 | ;; Tue Jul 9 09:04:21 1996 | 321 | ;; Tue Jul 9 09:04:21 1996 |
| 322 | |||
| 323 | ;; Fixme: This should use timezone on the date field contents. | ||
| 315 | (setq date | 324 | (setq date |
| 316 | (cond ((not date) | 325 | (cond ((not date) |
| 317 | "Tue Jan 1 00:00:0 1900") | 326 | "Tue Jan 1 00:00:0 1900") |
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index aa30d9ba783..40b10c07eb4 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el | |||
| @@ -171,6 +171,42 @@ This is either `base64' or `quoted-printable'." | |||
| 171 | (re-search-forward ":[ \t\n]*" nil t) | 171 | (re-search-forward ":[ \t\n]*" nil t) |
| 172 | (buffer-substring-no-properties (point) (point-max))))) | 172 | (buffer-substring-no-properties (point) (point-max))))) |
| 173 | 173 | ||
| 174 | (defun rfc2047-quote-special-characters-in-quoted-strings (&optional | ||
| 175 | encodable-regexp) | ||
| 176 | "Quote special characters with `\\'s in quoted strings. | ||
| 177 | Quoting will not be done in a quoted string if it contains characters | ||
| 178 | matching ENCODABLE-REGEXP." | ||
| 179 | (goto-char (point-min)) | ||
| 180 | (let ((tspecials (concat "[" ietf-drums-tspecials "]")) | ||
| 181 | beg end) | ||
| 182 | (with-syntax-table (standard-syntax-table) | ||
| 183 | (while (search-forward "\"" nil t) | ||
| 184 | (setq beg (match-beginning 0)) | ||
| 185 | (unless (eq (char-before beg) ?\\) | ||
| 186 | (goto-char beg) | ||
| 187 | (setq beg (1+ beg)) | ||
| 188 | (condition-case nil | ||
| 189 | (progn | ||
| 190 | (forward-sexp) | ||
| 191 | (setq end (1- (point))) | ||
| 192 | (goto-char beg) | ||
| 193 | (if (and encodable-regexp | ||
| 194 | (re-search-forward encodable-regexp end t)) | ||
| 195 | (goto-char (1+ end)) | ||
| 196 | (save-restriction | ||
| 197 | (narrow-to-region beg end) | ||
| 198 | (while (re-search-forward tspecials nil 'move) | ||
| 199 | (if (eq (char-before) ?\\) | ||
| 200 | (if (looking-at tspecials) ;; Already quoted. | ||
| 201 | (forward-char) | ||
| 202 | (insert "\\")) | ||
| 203 | (goto-char (match-beginning 0)) | ||
| 204 | (insert "\\") | ||
| 205 | (forward-char)))) | ||
| 206 | (forward-char))) | ||
| 207 | (error | ||
| 208 | (goto-char beg)))))))) | ||
| 209 | |||
| 174 | (defvar rfc2047-encoding-type 'address-mime | 210 | (defvar rfc2047-encoding-type 'address-mime |
| 175 | "The type of encoding done by `rfc2047-encode-region'. | 211 | "The type of encoding done by `rfc2047-encode-region'. |
| 176 | This should be dynamically bound around calls to | 212 | This should be dynamically bound around calls to |
| @@ -187,8 +223,18 @@ Should be called narrowed to the head of the message." | |||
| 187 | (while (not (eobp)) | 223 | (while (not (eobp)) |
| 188 | (save-restriction | 224 | (save-restriction |
| 189 | (rfc2047-narrow-to-field) | 225 | (rfc2047-narrow-to-field) |
| 226 | (setq method nil | ||
| 227 | alist rfc2047-header-encoding-alist) | ||
| 228 | (while (setq elem (pop alist)) | ||
| 229 | (when (or (and (stringp (car elem)) | ||
| 230 | (looking-at (car elem))) | ||
| 231 | (eq (car elem) t)) | ||
| 232 | (setq alist nil | ||
| 233 | method (cdr elem)))) | ||
| 190 | (if (not (rfc2047-encodable-p)) | 234 | (if (not (rfc2047-encodable-p)) |
| 191 | (prog1 | 235 | (prog2 |
| 236 | (when (eq method 'address-mime) | ||
| 237 | (rfc2047-quote-special-characters-in-quoted-strings)) | ||
| 192 | (if (and (eq (mm-body-7-or-8) '8bit) | 238 | (if (and (eq (mm-body-7-or-8) '8bit) |
| 193 | (mm-multibyte-p) | 239 | (mm-multibyte-p) |
| 194 | (mm-coding-system-p | 240 | (mm-coding-system-p |
| @@ -209,14 +255,6 @@ Should be called narrowed to the head of the message." | |||
| 209 | (point)) | 255 | (point)) |
| 210 | (point-max)))) | 256 | (point-max)))) |
| 211 | ;; We found something that may perhaps be encoded. | 257 | ;; We found something that may perhaps be encoded. |
| 212 | (setq method nil | ||
| 213 | alist rfc2047-header-encoding-alist) | ||
| 214 | (while (setq elem (pop alist)) | ||
| 215 | (when (or (and (stringp (car elem)) | ||
| 216 | (looking-at (car elem))) | ||
| 217 | (eq (car elem) t)) | ||
| 218 | (setq alist nil | ||
| 219 | method (cdr elem)))) | ||
| 220 | (re-search-forward "^[^:]+: *" nil t) | 258 | (re-search-forward "^[^:]+: *" nil t) |
| 221 | (cond | 259 | (cond |
| 222 | ((eq method 'address-mime) | 260 | ((eq method 'address-mime) |
| @@ -347,6 +385,7 @@ Dynamically bind `rfc2047-encoding-type' to change that." | |||
| 347 | (rfc2047-encode start (point)) | 385 | (rfc2047-encode start (point)) |
| 348 | (goto-char end)))) | 386 | (goto-char end)))) |
| 349 | ;; `address-mime' case -- take care of quoted words, comments. | 387 | ;; `address-mime' case -- take care of quoted words, comments. |
| 388 | (rfc2047-quote-special-characters-in-quoted-strings encodable-regexp) | ||
| 350 | (with-syntax-table rfc2047-syntax-table | 389 | (with-syntax-table rfc2047-syntax-table |
| 351 | (goto-char (point-min)) | 390 | (goto-char (point-min)) |
| 352 | (condition-case err ; in case of unbalanced quotes | 391 | (condition-case err ; in case of unbalanced quotes |
| @@ -821,6 +860,29 @@ encoded-word, concatenate them, and decode it by charset. Otherwise, | |||
| 821 | the decoder will fully decode each encoded-word before concatenating | 860 | the decoder will fully decode each encoded-word before concatenating |
| 822 | them.") | 861 | them.") |
| 823 | 862 | ||
| 863 | (defun rfc2047-strip-backslashes-in-quoted-strings () | ||
| 864 | "Strip backslashes in quoted strings. `\\\"' remains." | ||
| 865 | (goto-char (point-min)) | ||
| 866 | (let (beg) | ||
| 867 | (with-syntax-table (standard-syntax-table) | ||
| 868 | (while (search-forward "\"" nil t) | ||
| 869 | (unless (eq (char-before) ?\\) | ||
| 870 | (setq beg (match-end 0)) | ||
| 871 | (goto-char (match-beginning 0)) | ||
| 872 | (condition-case nil | ||
| 873 | (progn | ||
| 874 | (forward-sexp) | ||
| 875 | (save-restriction | ||
| 876 | (narrow-to-region beg (1- (point))) | ||
| 877 | (goto-char beg) | ||
| 878 | (while (search-forward "\\" nil 'move) | ||
| 879 | (unless (memq (char-after) '(?\")) | ||
| 880 | (delete-backward-char 1)) | ||
| 881 | (forward-char))) | ||
| 882 | (forward-char)) | ||
| 883 | (error | ||
| 884 | (goto-char beg)))))))) | ||
| 885 | |||
| 824 | (defun rfc2047-charset-to-coding-system (charset) | 886 | (defun rfc2047-charset-to-coding-system (charset) |
| 825 | "Return coding-system corresponding to MIME CHARSET. | 887 | "Return coding-system corresponding to MIME CHARSET. |
| 826 | If your Emacs implementation can't decode CHARSET, return nil." | 888 | If your Emacs implementation can't decode CHARSET, return nil." |
| @@ -898,8 +960,10 @@ ENCODED-WORD)." | |||
| 898 | ;; and worthwhile (is it more correct or not?), e.g. something like | 960 | ;; and worthwhile (is it more correct or not?), e.g. something like |
| 899 | ;; `=?iso-8859-1?q?foo?=@'. | 961 | ;; `=?iso-8859-1?q?foo?=@'. |
| 900 | 962 | ||
| 901 | (defun rfc2047-decode-region (start end) | 963 | (defun rfc2047-decode-region (start end &optional address-mime) |
| 902 | "Decode MIME-encoded words in region between START and END." | 964 | "Decode MIME-encoded words in region between START and END. |
| 965 | If ADDRESS-MIME is non-nil, strip backslashes which precede characters | ||
| 966 | other than `\"' and `\\' in quoted strings." | ||
| 903 | (interactive "r") | 967 | (interactive "r") |
| 904 | (let ((case-fold-search t) | 968 | (let ((case-fold-search t) |
| 905 | (eword-regexp (eval-when-compile | 969 | (eword-regexp (eval-when-compile |
| @@ -910,6 +974,8 @@ ENCODED-WORD)." | |||
| 910 | (save-excursion | 974 | (save-excursion |
| 911 | (save-restriction | 975 | (save-restriction |
| 912 | (narrow-to-region start end) | 976 | (narrow-to-region start end) |
| 977 | (when address-mime | ||
| 978 | (rfc2047-strip-backslashes-in-quoted-strings)) | ||
| 913 | (goto-char (setq b start)) | 979 | (goto-char (setq b start)) |
| 914 | ;; Look for the encoded-words. | 980 | ;; Look for the encoded-words. |
| 915 | (while (setq match (re-search-forward eword-regexp nil t)) | 981 | (while (setq match (re-search-forward eword-regexp nil t)) |
| @@ -995,8 +1061,16 @@ ENCODED-WORD)." | |||
| 995 | (not (eq mail-parse-charset 'gnus-decoded))) | 1061 | (not (eq mail-parse-charset 'gnus-decoded))) |
| 996 | (mm-decode-coding-region b (point-max) mail-parse-charset)))))) | 1062 | (mm-decode-coding-region b (point-max) mail-parse-charset)))))) |
| 997 | 1063 | ||
| 998 | (defun rfc2047-decode-string (string) | 1064 | (defun rfc2047-decode-address-region (start end) |
| 999 | "Decode the quoted-printable-encoded STRING and return the results." | 1065 | "Decode MIME-encoded words in region between START and END. |
| 1066 | Backslashes which precede characters other than `\"' and `\\' in quoted | ||
| 1067 | strings are stripped." | ||
| 1068 | (rfc2047-decode-region start end t)) | ||
| 1069 | |||
| 1070 | (defun rfc2047-decode-string (string &optional address-mime) | ||
| 1071 | "Decode MIME-encoded STRING and return the result. | ||
| 1072 | If ADDRESS-MIME is non-nil, strip backslashes which precede characters | ||
| 1073 | other than `\"' and `\\' in quoted strings." | ||
| 1000 | (let ((m (mm-multibyte-p))) | 1074 | (let ((m (mm-multibyte-p))) |
| 1001 | (if (string-match "=\\?" string) | 1075 | (if (string-match "=\\?" string) |
| 1002 | (with-temp-buffer | 1076 | (with-temp-buffer |
| @@ -1010,8 +1084,16 @@ ENCODED-WORD)." | |||
| 1010 | (mm-enable-multibyte)) | 1084 | (mm-enable-multibyte)) |
| 1011 | (insert string) | 1085 | (insert string) |
| 1012 | (inline | 1086 | (inline |
| 1013 | (rfc2047-decode-region (point-min) (point-max))) | 1087 | (rfc2047-decode-region (point-min) (point-max) address-mime)) |
| 1014 | (buffer-string)) | 1088 | (buffer-string)) |
| 1089 | (when address-mime | ||
| 1090 | (setq string | ||
| 1091 | (with-temp-buffer | ||
| 1092 | (when (mm-multibyte-string-p string) | ||
| 1093 | (mm-enable-multibyte)) | ||
| 1094 | (insert string) | ||
| 1095 | (rfc2047-strip-backslashes-in-quoted-strings) | ||
| 1096 | (buffer-string)))) | ||
| 1015 | ;; Fixme: As above, `m' here is inappropriate. | 1097 | ;; Fixme: As above, `m' here is inappropriate. |
| 1016 | (if (and m | 1098 | (if (and m |
| 1017 | mail-parse-charset | 1099 | mail-parse-charset |
| @@ -1033,6 +1115,12 @@ ENCODED-WORD)." | |||
| 1033 | (mm-decode-coding-string string mail-parse-charset)) | 1115 | (mm-decode-coding-string string mail-parse-charset)) |
| 1034 | (mm-string-as-multibyte string))))) | 1116 | (mm-string-as-multibyte string))))) |
| 1035 | 1117 | ||
| 1118 | (defun rfc2047-decode-address-string (string) | ||
| 1119 | "Decode MIME-encoded STRING and return the result. | ||
| 1120 | Backslashes which precede characters other than `\"' and `\\' in quoted | ||
| 1121 | strings are stripped." | ||
| 1122 | (rfc2047-decode-string string t)) | ||
| 1123 | |||
| 1036 | (defun rfc2047-pad-base64 (string) | 1124 | (defun rfc2047-pad-base64 (string) |
| 1037 | "Pad STRING to quartets." | 1125 | "Pad STRING to quartets." |
| 1038 | ;; Be more liberal to accept buggy base64 strings. If | 1126 | ;; Be more liberal to accept buggy base64 strings. If |
diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el index db00fff6c1c..6d33c155c64 100644 --- a/lisp/help-at-pt.el +++ b/lisp/help-at-pt.el | |||
| @@ -246,7 +246,7 @@ properties, to enable buffer local values." | |||
| 246 | (defun scan-buf-move-to-region (prop &optional arg hook) | 246 | (defun scan-buf-move-to-region (prop &optional arg hook) |
| 247 | "Go to the start of the next region with non-nil PROP property. | 247 | "Go to the start of the next region with non-nil PROP property. |
| 248 | Then run HOOK, which should be a quoted symbol that is a normal | 248 | Then run HOOK, which should be a quoted symbol that is a normal |
| 249 | hook.variable, or an expression evaluating to such a symbol. | 249 | hook variable, or an expression evaluating to such a symbol. |
| 250 | Adjacent areas with different non-nil PROP properties are | 250 | Adjacent areas with different non-nil PROP properties are |
| 251 | considered different regions. | 251 | considered different regions. |
| 252 | 252 | ||
diff --git a/lisp/help.el b/lisp/help.el index db76efb01a0..34b1a2fac61 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -309,7 +309,7 @@ If that doesn't give a function, return nil." | |||
| 309 | The prefix described consists of all but the last event | 309 | The prefix described consists of all but the last event |
| 310 | of the key sequence that ran this command." | 310 | of the key sequence that ran this command." |
| 311 | (interactive) | 311 | (interactive) |
| 312 | (let* ((key (this-command-keys))) | 312 | (let ((key (this-command-keys))) |
| 313 | (describe-bindings | 313 | (describe-bindings |
| 314 | (if (stringp key) | 314 | (if (stringp key) |
| 315 | (substring key 0 (1- (length key))) | 315 | (substring key 0 (1- (length key))) |
| @@ -535,28 +535,6 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." | |||
| 535 | (princ string))))) | 535 | (princ string))))) |
| 536 | nil) | 536 | nil) |
| 537 | 537 | ||
| 538 | (defun string-key-binding (key) | ||
| 539 | "Value is the binding of KEY in a string. | ||
| 540 | If KEY is an event on a string, and that string has a `local-map' | ||
| 541 | or `keymap' property, return the binding of KEY in the string's keymap." | ||
| 542 | (let* ((defn nil) | ||
| 543 | (start (when (vectorp key) | ||
| 544 | (if (memq (aref key 0) | ||
| 545 | '(mode-line header-line left-margin right-margin)) | ||
| 546 | (event-start (aref key 1)) | ||
| 547 | (and (consp (aref key 0)) | ||
| 548 | (event-start (aref key 0)))))) | ||
| 549 | (string-info (and (consp start) (nth 4 start)))) | ||
| 550 | (when string-info | ||
| 551 | (let* ((string (car string-info)) | ||
| 552 | (pos (cdr string-info)) | ||
| 553 | (local-map (and (>= pos 0) | ||
| 554 | (< pos (length string)) | ||
| 555 | (or (get-text-property pos 'local-map string) | ||
| 556 | (get-text-property pos 'keymap string))))) | ||
| 557 | (setq defn (and local-map (lookup-key local-map key))))) | ||
| 558 | defn)) | ||
| 559 | |||
| 560 | (defun help-key-description (key untranslated) | 538 | (defun help-key-description (key untranslated) |
| 561 | (let ((string (key-description key))) | 539 | (let ((string (key-description key))) |
| 562 | (if (or (not untranslated) | 540 | (if (or (not untranslated) |
| @@ -589,11 +567,14 @@ temporarily enables it to allow getting help on disabled items and buttons." | |||
| 589 | (menu-bar-update-yank-menu "(any string)" nil)) | 567 | (menu-bar-update-yank-menu "(any string)" nil)) |
| 590 | (setq key (read-key-sequence "Describe key (or click or menu item): ")) | 568 | (setq key (read-key-sequence "Describe key (or click or menu item): ")) |
| 591 | ;; If KEY is a down-event, read and discard the | 569 | ;; If KEY is a down-event, read and discard the |
| 592 | ;; corresponding up-event. | 570 | ;; corresponding up-event. Note that there are also |
| 593 | (if (and (vectorp key) | 571 | ;; down-events on scroll bars and mode lines: the actual |
| 594 | (eventp (elt key 0)) | 572 | ;; event then is in the second element of the vector. |
| 595 | (memq 'down (event-modifiers (elt key 0)))) | 573 | (and (vectorp key) |
| 596 | (read-event)) | 574 | (let ((last-idx (1- (length key)))) |
| 575 | (and (eventp (aref key last-idx)) | ||
| 576 | (memq 'down (event-modifiers (aref key last-idx))))) | ||
| 577 | (read-event)) | ||
| 597 | (list | 578 | (list |
| 598 | key | 579 | key |
| 599 | (if current-prefix-arg (prefix-numeric-value current-prefix-arg)) | 580 | (if current-prefix-arg (prefix-numeric-value current-prefix-arg)) |
| @@ -604,46 +585,33 @@ temporarily enables it to allow getting help on disabled items and buttons." | |||
| 604 | (fset 'yank-menu (cons 'keymap yank-menu)))))) | 585 | (fset 'yank-menu (cons 'keymap yank-menu)))))) |
| 605 | (if (numberp untranslated) | 586 | (if (numberp untranslated) |
| 606 | (setq untranslated (this-single-command-raw-keys))) | 587 | (setq untranslated (this-single-command-raw-keys))) |
| 607 | (save-excursion | 588 | (let* ((event (if (and (symbolp (aref key 0)) |
| 608 | (let ((modifiers (event-modifiers (aref key 0))) | 589 | (> (length key) 1) |
| 609 | (standard-output (if insert (current-buffer) t)) | 590 | (consp (aref key 1))) |
| 610 | window position) | 591 | (aref key 1) |
| 611 | ;; For a mouse button event, go to the button it applies to | 592 | (aref key 0))) |
| 612 | ;; to get the right key bindings. And go to the right place | 593 | (modifiers (event-modifiers event)) |
| 613 | ;; in case the keymap depends on where you clicked. | 594 | (standard-output (if insert (current-buffer) t)) |
| 614 | (if (or (memq 'click modifiers) (memq 'down modifiers) | 595 | (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) |
| 615 | (memq 'drag modifiers)) | 596 | (memq 'drag modifiers)) " at that spot" "")) |
| 616 | (setq window (posn-window (event-start (aref key 0))) | 597 | (defn (key-binding key t)) |
| 617 | position (posn-point (event-start (aref key 0))))) | 598 | key-desc) |
| 618 | (if (windowp window) | 599 | ;; Handle the case where we faked an entry in "Select and Paste" menu. |
| 619 | (progn | 600 | (if (and (eq defn nil) |
| 620 | (set-buffer (window-buffer window)) | 601 | (stringp (aref key (1- (length key)))) |
| 621 | (goto-char position))) | 602 | (eq (key-binding (substring key 0 -1)) 'yank-menu)) |
| 622 | ;; Ok, now look up the key and name the command. | 603 | (setq defn 'menu-bar-select-yank)) |
| 623 | (let ((defn (or (string-key-binding key) | 604 | ;; Don't bother user with strings from (e.g.) the select-paste menu. |
| 624 | (key-binding key t))) | 605 | (if (stringp (aref key (1- (length key)))) |
| 625 | key-desc) | 606 | (aset key (1- (length key)) "(any string)")) |
| 626 | ;; Handle the case where we faked an entry in "Select and Paste" menu. | 607 | (if (and (> (length untranslated) 0) |
| 627 | (if (and (eq defn nil) | 608 | (stringp (aref untranslated (1- (length untranslated))))) |
| 628 | (stringp (aref key (1- (length key)))) | 609 | (aset untranslated (1- (length untranslated)) "(any string)")) |
| 629 | (eq (key-binding (substring key 0 -1)) 'yank-menu)) | 610 | ;; Now describe the key, perhaps as changed. |
| 630 | (setq defn 'menu-bar-select-yank)) | 611 | (setq key-desc (help-key-description key untranslated)) |
| 631 | ;; Don't bother user with strings from (e.g.) the select-paste menu. | 612 | (if (or (null defn) (integerp defn) (equal defn 'undefined)) |
| 632 | (if (stringp (aref key (1- (length key)))) | 613 | (princ (format "%s%s is undefined" key-desc mouse-msg)) |
| 633 | (aset key (1- (length key)) "(any string)")) | 614 | (princ (format "%s%s runs the command %S" key-desc mouse-msg defn))))) |
| 634 | (if (and (> (length untranslated) 0) | ||
| 635 | (stringp (aref untranslated (1- (length untranslated))))) | ||
| 636 | (aset untranslated (1- (length untranslated)) | ||
| 637 | "(any string)")) | ||
| 638 | ;; Now describe the key, perhaps as changed. | ||
| 639 | (setq key-desc (help-key-description key untranslated)) | ||
| 640 | (if (or (null defn) (integerp defn) (equal defn 'undefined)) | ||
| 641 | (princ (format "%s is undefined" key-desc)) | ||
| 642 | (princ (format (if (windowp window) | ||
| 643 | "%s at that spot runs the command %s" | ||
| 644 | "%s runs the command %s") | ||
| 645 | key-desc | ||
| 646 | (if (symbolp defn) defn (prin1-to-string defn))))))))) | ||
| 647 | 615 | ||
| 648 | (defun describe-key (&optional key untranslated up-event) | 616 | (defun describe-key (&optional key untranslated up-event) |
| 649 | "Display documentation of the function invoked by KEY. | 617 | "Display documentation of the function invoked by KEY. |
| @@ -673,109 +641,119 @@ temporarily enables it to allow getting help on disabled items and buttons." | |||
| 673 | (list | 641 | (list |
| 674 | key | 642 | key |
| 675 | (prefix-numeric-value current-prefix-arg) | 643 | (prefix-numeric-value current-prefix-arg) |
| 676 | ;; If KEY is a down-event, read the corresponding up-event | 644 | ;; If KEY is a down-event, read and discard the |
| 677 | ;; and use it as the third argument. | 645 | ;; corresponding up-event. Note that there are also |
| 678 | (if (and (vectorp key) | 646 | ;; down-events on scroll bars and mode lines: the actual |
| 679 | (eventp (elt key 0)) | 647 | ;; event then is in the second element of the vector. |
| 680 | (memq 'down (event-modifiers (elt key 0)))) | 648 | (and (vectorp key) |
| 681 | (read-event)))) | 649 | (let ((last-idx (1- (length key)))) |
| 650 | (and (eventp (aref key last-idx)) | ||
| 651 | (memq 'down (event-modifiers (aref key last-idx))))) | ||
| 652 | (or (and (eventp (aref key 0)) | ||
| 653 | (memq 'down (event-modifiers (aref key 0))) | ||
| 654 | ;; However, for the C-down-mouse-2 popup | ||
| 655 | ;; menu, there is no subsequent up-event. In | ||
| 656 | ;; this case, the up-event is the next | ||
| 657 | ;; element in the supplied vector. | ||
| 658 | (= (length key) 1)) | ||
| 659 | (and (> (length key) 1) | ||
| 660 | (eventp (aref key 1)) | ||
| 661 | (memq 'down (event-modifiers (aref key 1))))) | ||
| 662 | (read-event)))) | ||
| 682 | ;; Put yank-menu back as it was, if we changed it. | 663 | ;; Put yank-menu back as it was, if we changed it. |
| 683 | (when saved-yank-menu | 664 | (when saved-yank-menu |
| 684 | (setq yank-menu (copy-sequence saved-yank-menu)) | 665 | (setq yank-menu (copy-sequence saved-yank-menu)) |
| 685 | (fset 'yank-menu (cons 'keymap yank-menu)))))) | 666 | (fset 'yank-menu (cons 'keymap yank-menu)))))) |
| 686 | (if (numberp untranslated) | 667 | (if (numberp untranslated) |
| 687 | (setq untranslated (this-single-command-raw-keys))) | 668 | (setq untranslated (this-single-command-raw-keys))) |
| 688 | (save-excursion | 669 | (let* ((event (aref key (if (and (symbolp (aref key 0)) |
| 689 | (let ((modifiers (event-modifiers (aref key 0))) | 670 | (> (length key) 1) |
| 690 | window position) | 671 | (consp (aref key 1))) |
| 691 | ;; For a mouse button event, go to the button it applies to | 672 | 1 |
| 692 | ;; to get the right key bindings. And go to the right place | 673 | 0))) |
| 693 | ;; in case the keymap depends on where you clicked. | 674 | (modifiers (event-modifiers event)) |
| 694 | (if (or (memq 'click modifiers) (memq 'down modifiers) | 675 | (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) |
| 695 | (memq 'drag modifiers)) | 676 | (memq 'drag modifiers)) " at that spot" "")) |
| 696 | (setq window (posn-window (event-start (aref key 0))) | 677 | (defn (key-binding key t)) |
| 697 | position (posn-point (event-start (aref key 0))))) | 678 | defn-up defn-up-tricky ev-type |
| 698 | (when (windowp window) | 679 | mouse-1-remapped mouse-1-tricky) |
| 699 | (set-buffer (window-buffer window)) | 680 | |
| 700 | (goto-char position)) | 681 | ;; Handle the case where we faked an entry in "Select and Paste" menu. |
| 701 | (let ((defn (or (string-key-binding key) (key-binding key t)))) | 682 | (when (and (eq defn nil) |
| 702 | ;; Handle the case where we faked an entry in "Select and Paste" menu. | 683 | (stringp (aref key (1- (length key)))) |
| 703 | (if (and (eq defn nil) | 684 | (eq (key-binding (substring key 0 -1)) 'yank-menu)) |
| 704 | (stringp (aref key (1- (length key)))) | 685 | (setq defn 'menu-bar-select-yank)) |
| 705 | (eq (key-binding (substring key 0 -1)) 'yank-menu)) | 686 | (if (or (null defn) (integerp defn) (equal defn 'undefined)) |
| 706 | (setq defn 'menu-bar-select-yank)) | 687 | (message "%s%s is undefined" |
| 707 | (if (or (null defn) (integerp defn) (equal defn 'undefined)) | 688 | (help-key-description key untranslated) mouse-msg) |
| 708 | (message "%s is undefined" (help-key-description key untranslated)) | 689 | (help-setup-xref (list #'describe-function defn) (interactive-p)) |
| 709 | (help-setup-xref (list #'describe-function defn) (interactive-p)) | 690 | ;; Don't bother user with strings from (e.g.) the select-paste menu. |
| 710 | ;; Don't bother user with strings from (e.g.) the select-paste menu. | 691 | (when (stringp (aref key (1- (length key)))) |
| 711 | (if (stringp (aref key (1- (length key)))) | 692 | (aset key (1- (length key)) "(any string)")) |
| 712 | (aset key (1- (length key)) "(any string)")) | 693 | (when (and untranslated |
| 713 | (if (and untranslated | 694 | (stringp (aref untranslated (1- (length untranslated))))) |
| 714 | (stringp (aref untranslated (1- (length untranslated))))) | 695 | (aset untranslated (1- (length untranslated)) |
| 715 | (aset untranslated (1- (length untranslated)) | 696 | "(any string)")) |
| 716 | "(any string)")) | 697 | ;; Need to do this before erasing *Help* buffer in case event |
| 717 | (with-output-to-temp-buffer (help-buffer) | 698 | ;; is a mouse click in an existing *Help* buffer. |
| 718 | (princ (help-key-description key untranslated)) | 699 | (when up-event |
| 719 | (if (windowp window) | 700 | (setq ev-type (event-basic-type up-event)) |
| 720 | (princ " at that spot")) | 701 | (let ((sequence (vector up-event))) |
| 721 | (princ " runs the command ") | 702 | (when (and (eq ev-type 'mouse-1) |
| 722 | (prin1 defn) | 703 | mouse-1-click-follows-link |
| 723 | (princ "\n which is ") | 704 | (not (eq mouse-1-click-follows-link 'double)) |
| 724 | (describe-function-1 defn) | 705 | (setq mouse-1-remapped |
| 725 | (when up-event | 706 | (mouse-on-link-p (event-start up-event)))) |
| 726 | (let ((type (event-basic-type up-event)) | 707 | (setq mouse-1-tricky (and (integerp mouse-1-click-follows-link) |
| 727 | (hdr "\n\n-------------- up event ---------------\n\n") | 708 | (> mouse-1-click-follows-link 0))) |
| 728 | defn sequence | 709 | (cond ((stringp mouse-1-remapped) |
| 729 | mouse-1-tricky mouse-1-remapped) | 710 | (setq sequence mouse-1-remapped)) |
| 730 | (setq sequence (vector up-event)) | 711 | ((vectorp mouse-1-remapped) |
| 731 | (when (and (eq type 'mouse-1) | 712 | (setcar up-event (elt mouse-1-remapped 0))) |
| 732 | (windowp window) | 713 | (t (setcar up-event 'mouse-2)))) |
| 714 | (setq defn-up (key-binding sequence nil nil (event-start up-event))) | ||
| 715 | (when mouse-1-tricky | ||
| 716 | (setq sequence (vector up-event)) | ||
| 717 | (aset sequence 0 'mouse-1) | ||
| 718 | (setq defn-up-tricky (key-binding sequence nil nil (event-start up-event)))))) | ||
| 719 | (with-output-to-temp-buffer (help-buffer) | ||
| 720 | (princ (help-key-description key untranslated)) | ||
| 721 | (princ (format "\ | ||
| 722 | %s runs the command %S | ||
| 723 | which is " | ||
| 724 | mouse-msg defn)) | ||
| 725 | (describe-function-1 defn) | ||
| 726 | (when up-event | ||
| 727 | (unless (or (null defn-up) | ||
| 728 | (integerp defn-up) | ||
| 729 | (equal defn-up 'undefined)) | ||
| 730 | (princ (format " | ||
| 731 | |||
| 732 | ----------------- up-event %s---------------- | ||
| 733 | |||
| 734 | <%S>%s%s runs the command %S | ||
| 735 | which is " | ||
| 736 | (if mouse-1-tricky "(short click) " "") | ||
| 737 | ev-type mouse-msg | ||
| 738 | (if mouse-1-remapped | ||
| 739 | " is remapped to <mouse-2>\nwhich" "") | ||
| 740 | defn-up)) | ||
| 741 | (describe-function-1 defn-up)) | ||
| 742 | (unless (or (null defn-up-tricky) | ||
| 743 | (integerp defn-up-tricky) | ||
| 744 | (eq defn-up-tricky 'undefined)) | ||
| 745 | (princ (format " | ||
| 746 | |||
| 747 | ----------------- up-event (long click) ---------------- | ||
| 748 | |||
| 749 | Pressing <%S>%s for longer than %d milli-seconds | ||
| 750 | runs the command %S | ||
| 751 | which is " | ||
| 752 | ev-type mouse-msg | ||
| 733 | mouse-1-click-follows-link | 753 | mouse-1-click-follows-link |
| 734 | (not (eq mouse-1-click-follows-link 'double)) | 754 | defn-up-tricky)) |
| 735 | (setq mouse-1-remapped | 755 | (describe-function-1 defn-up-tricky))) |
| 736 | (with-current-buffer (window-buffer window) | 756 | (print-help-return-message))))) |
| 737 | (mouse-on-link-p (posn-point | ||
| 738 | (event-start up-event)))))) | ||
| 739 | (setq mouse-1-tricky (and (integerp mouse-1-click-follows-link) | ||
| 740 | (> mouse-1-click-follows-link 0))) | ||
| 741 | (cond ((stringp mouse-1-remapped) | ||
| 742 | (setq sequence mouse-1-remapped)) | ||
| 743 | ((vectorp mouse-1-remapped) | ||
| 744 | (setcar up-event (elt mouse-1-remapped 0))) | ||
| 745 | (t (setcar up-event 'mouse-2)))) | ||
| 746 | (setq defn (or (string-key-binding sequence) | ||
| 747 | (key-binding sequence))) | ||
| 748 | (unless (or (null defn) (integerp defn) (equal defn 'undefined)) | ||
| 749 | (princ (if mouse-1-tricky | ||
| 750 | "\n\n----------------- up-event (short click) ----------------\n\n" | ||
| 751 | hdr)) | ||
| 752 | (setq hdr nil) | ||
| 753 | (princ (symbol-name type)) | ||
| 754 | (if (windowp window) | ||
| 755 | (princ " at that spot")) | ||
| 756 | (if mouse-1-remapped | ||
| 757 | (princ " is remapped to <mouse-2>\n which" )) | ||
| 758 | (princ " runs the command ") | ||
| 759 | (prin1 defn) | ||
| 760 | (princ "\n which is ") | ||
| 761 | (describe-function-1 defn)) | ||
| 762 | (when mouse-1-tricky | ||
| 763 | (setcar up-event 'mouse-1) | ||
| 764 | (setq defn (or (string-key-binding (vector up-event)) | ||
| 765 | (key-binding (vector up-event)))) | ||
| 766 | (unless (or (null defn) (integerp defn) (eq defn 'undefined)) | ||
| 767 | (princ (or hdr | ||
| 768 | "\n\n----------------- up-event (long click) ----------------\n\n")) | ||
| 769 | (princ "Pressing mouse-1") | ||
| 770 | (if (windowp window) | ||
| 771 | (princ " at that spot")) | ||
| 772 | (princ (format " for longer than %d milli-seconds\n" | ||
| 773 | mouse-1-click-follows-link)) | ||
| 774 | (princ " runs the command ") | ||
| 775 | (prin1 defn) | ||
| 776 | (princ "\n which is ") | ||
| 777 | (describe-function-1 defn))))) | ||
| 778 | (print-help-return-message))))))) | ||
| 779 | 757 | ||
| 780 | (defun describe-mode (&optional buffer) | 758 | (defun describe-mode (&optional buffer) |
| 781 | "Display documentation of current major mode and minor modes. | 759 | "Display documentation of current major mode and minor modes. |
| @@ -786,7 +764,7 @@ descriptions of the minor modes, each on a separate page. | |||
| 786 | For this to work correctly for a minor mode, the mode's indicator | 764 | For this to work correctly for a minor mode, the mode's indicator |
| 787 | variable \(listed in `minor-mode-alist') must also be a function | 765 | variable \(listed in `minor-mode-alist') must also be a function |
| 788 | whose documentation describes the minor mode." | 766 | whose documentation describes the minor mode." |
| 789 | (interactive) | 767 | (interactive "@") |
| 790 | (unless buffer (setq buffer (current-buffer))) | 768 | (unless buffer (setq buffer (current-buffer))) |
| 791 | (help-setup-xref (list #'describe-mode buffer) | 769 | (help-setup-xref (list #'describe-mode buffer) |
| 792 | (interactive-p)) | 770 | (interactive-p)) |
diff --git a/lisp/hl-line.el b/lisp/hl-line.el index c2d2d293010..757a398086d 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el | |||
| @@ -64,16 +64,37 @@ | |||
| 64 | 64 | ||
| 65 | ;;; Code: | 65 | ;;; Code: |
| 66 | 66 | ||
| 67 | (defvar hl-line-overlay nil | ||
| 68 | "Overlay used by Hl-Line mode to highlight the current line.") | ||
| 69 | (make-variable-buffer-local 'hl-line-overlay) | ||
| 70 | |||
| 71 | (defvar global-hl-line-overlay nil | ||
| 72 | "Overlay used by Global-Hl-Line mode to highlight the current line.") | ||
| 73 | |||
| 67 | (defgroup hl-line nil | 74 | (defgroup hl-line nil |
| 68 | "Highlight the current line." | 75 | "Highlight the current line." |
| 69 | :version "21.1" | 76 | :version "21.1" |
| 70 | :group 'editing) | 77 | :group 'editing) |
| 71 | 78 | ||
| 72 | (defcustom hl-line-face 'highlight | 79 | (defface hl-line |
| 73 | "Face with which to highlight the current line." | 80 | '((t :inherit highlight)) |
| 74 | :type 'face | 81 | "Default face for highlighting the current line in Hl-Line mode." |
| 82 | :version "22.1" | ||
| 75 | :group 'hl-line) | 83 | :group 'hl-line) |
| 76 | 84 | ||
| 85 | (defcustom hl-line-face 'hl-line | ||
| 86 | "Face with which to highlight the current line in Hl-Line mode." | ||
| 87 | :type 'face | ||
| 88 | :group 'hl-line | ||
| 89 | :set (lambda (symbol value) | ||
| 90 | (set symbol value) | ||
| 91 | (dolist (buffer (buffer-list)) | ||
| 92 | (with-current-buffer buffer | ||
| 93 | (when hl-line-overlay | ||
| 94 | (overlay-put hl-line-overlay 'face hl-line-face)))) | ||
| 95 | (when global-hl-line-overlay | ||
| 96 | (overlay-put global-hl-line-overlay 'face hl-line-face)))) | ||
| 97 | |||
| 77 | (defcustom hl-line-sticky-flag t | 98 | (defcustom hl-line-sticky-flag t |
| 78 | "*Non-nil means highlight the current line in all windows. | 99 | "*Non-nil means highlight the current line in all windows. |
| 79 | Otherwise Hl-Line mode will highlight only in the selected | 100 | Otherwise Hl-Line mode will highlight only in the selected |
| @@ -92,13 +113,6 @@ It should return nil if there's no region to be highlighted. | |||
| 92 | 113 | ||
| 93 | This variable is expected to be made buffer-local by modes.") | 114 | This variable is expected to be made buffer-local by modes.") |
| 94 | 115 | ||
| 95 | (defvar hl-line-overlay nil | ||
| 96 | "Overlay used by Hl-Line mode to highlight the current line.") | ||
| 97 | (make-variable-buffer-local 'hl-line-overlay) | ||
| 98 | |||
| 99 | (defvar global-hl-line-overlay nil | ||
| 100 | "Overlay used by Global-Hl-Line mode to highlight the current line.") | ||
| 101 | |||
| 102 | ;;;###autoload | 116 | ;;;###autoload |
| 103 | (define-minor-mode hl-line-mode | 117 | (define-minor-mode hl-line-mode |
| 104 | "Buffer-local minor mode to highlight the line about point. | 118 | "Buffer-local minor mode to highlight the line about point. |
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 292e158c097..4ab7b9eda41 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el | |||
| @@ -370,7 +370,11 @@ With numeric ARG, enable auto-update if and only if ARG is positive." | |||
| 370 | "Evaluate FORM in each of the buffers. | 370 | "Evaluate FORM in each of the buffers. |
| 371 | Does not display the buffer during evaluation. See | 371 | Does not display the buffer during evaluation. See |
| 372 | `ibuffer-do-view-and-eval' for that." | 372 | `ibuffer-do-view-and-eval' for that." |
| 373 | (:interactive "xEval in buffers (form): " | 373 | (:interactive |
| 374 | (list | ||
| 375 | (read-from-minibuffer | ||
| 376 | "Eval in buffers (form): " | ||
| 377 | nil read-expression-map t 'read-expression-history)) | ||
| 374 | :opstring "evaluated in" | 378 | :opstring "evaluated in" |
| 375 | :modifier-p :maybe) | 379 | :modifier-p :maybe) |
| 376 | (eval form)) | 380 | (eval form)) |
| @@ -379,7 +383,11 @@ Does not display the buffer during evaluation. See | |||
| 379 | (define-ibuffer-op view-and-eval (form) | 383 | (define-ibuffer-op view-and-eval (form) |
| 380 | "Evaluate FORM while displaying each of the marked buffers. | 384 | "Evaluate FORM while displaying each of the marked buffers. |
| 381 | To evaluate a form without viewing the buffer, see `ibuffer-do-eval'." | 385 | To evaluate a form without viewing the buffer, see `ibuffer-do-eval'." |
| 382 | (:interactive "xEval viewing buffers (form): " | 386 | (:interactive |
| 387 | (list | ||
| 388 | (read-from-minibuffer | ||
| 389 | "Eval viewing in buffers (form): " | ||
| 390 | nil read-expression-map t 'read-expression-history)) | ||
| 383 | :opstring "evaluated in" | 391 | :opstring "evaluated in" |
| 384 | :complex t | 392 | :complex t |
| 385 | :modifier-p :maybe) | 393 | :modifier-p :maybe) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 29767cee7f6..04672f6e29f 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -1972,12 +1972,12 @@ the value of point at the beginning of the line for that buffer." | |||
| 1972 | (not (eq ibuffer-buf buf)))))) | 1972 | (not (eq ibuffer-buf buf)))))) |
| 1973 | 1973 | ||
| 1974 | ;; This function is a special case; it's not defined by | 1974 | ;; This function is a special case; it's not defined by |
| 1975 | ;; `ibuffer-define-sorter'. | 1975 | ;; `define-ibuffer-sorter'. |
| 1976 | (defun ibuffer-do-sort-by-recency () | 1976 | (defun ibuffer-do-sort-by-recency () |
| 1977 | "Sort the buffers by last view time." | 1977 | "Sort the buffers by last view time." |
| 1978 | (interactive) | 1978 | (interactive) |
| 1979 | (setq ibuffer-sorting-mode 'recency) | 1979 | (setq ibuffer-sorting-mode 'recency) |
| 1980 | (ibuffer-redisplay t)) | 1980 | (ibuffer-update nil t)) |
| 1981 | 1981 | ||
| 1982 | (defun ibuffer-update-format () | 1982 | (defun ibuffer-update-format () |
| 1983 | (when (null ibuffer-current-format) | 1983 | (when (null ibuffer-current-format) |
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index f53ef7c91d1..6687c13275b 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -157,6 +157,12 @@ is minibuffer." | |||
| 157 | (< (length x) (length y)))) | 157 | (< (length x) (length y)))) |
| 158 | ", ") | 158 | ", ") |
| 159 | ">")))))) | 159 | ">")))))) |
| 160 | ;;;_ = icomplete-with-completion-tables | ||
| 161 | (defvar icomplete-with-completion-tables '(internal-complete-buffer) | ||
| 162 | "Specialized completion tables with which icomplete should operate. | ||
| 163 | |||
| 164 | Icomplete does not operate with any specialized completion tables | ||
| 165 | except those on this list.") | ||
| 160 | 166 | ||
| 161 | ;;;_ > icomplete-mode (&optional prefix) | 167 | ;;;_ > icomplete-mode (&optional prefix) |
| 162 | ;;;###autoload | 168 | ;;;###autoload |
| @@ -184,8 +190,9 @@ Conditions are: | |||
| 184 | (and (window-minibuffer-p (selected-window)) | 190 | (and (window-minibuffer-p (selected-window)) |
| 185 | (not executing-kbd-macro) | 191 | (not executing-kbd-macro) |
| 186 | minibuffer-completion-table | 192 | minibuffer-completion-table |
| 187 | ;; (or minibuffer-completing-file-name | 193 | (or (not (functionp minibuffer-completion-table)) |
| 188 | (not (functionp minibuffer-completion-table)))) ;; ) | 194 | (member minibuffer-completion-table |
| 195 | icomplete-with-completion-tables)))) | ||
| 189 | 196 | ||
| 190 | ;;;_ > icomplete-minibuffer-setup () | 197 | ;;;_ > icomplete-minibuffer-setup () |
| 191 | (defun icomplete-minibuffer-setup () | 198 | (defun icomplete-minibuffer-setup () |
diff --git a/lisp/ido.el b/lisp/ido.el index 2d531728b67..ff222b2958c 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -2112,7 +2112,7 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2112 | (defun ido-edit-input () | 2112 | (defun ido-edit-input () |
| 2113 | "Edit absolute file name entered so far with ido; terminate by RET." | 2113 | "Edit absolute file name entered so far with ido; terminate by RET." |
| 2114 | (interactive) | 2114 | (interactive) |
| 2115 | (setq ido-text-init (if ido-matches (car ido-matches) ido-text)) | 2115 | (setq ido-text-init (if ido-matches (ido-name (car ido-matches)) ido-text)) |
| 2116 | (setq ido-exit 'edit) | 2116 | (setq ido-exit 'edit) |
| 2117 | (exit-minibuffer)) | 2117 | (exit-minibuffer)) |
| 2118 | 2118 | ||
| @@ -2224,7 +2224,6 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2224 | (let ((ido-current-directory (ido-expand-directory default)) | 2224 | (let ((ido-current-directory (ido-expand-directory default)) |
| 2225 | (ido-context-switch-command switch-cmd) | 2225 | (ido-context-switch-command switch-cmd) |
| 2226 | ido-directory-nonreadable ido-directory-too-big | 2226 | ido-directory-nonreadable ido-directory-too-big |
| 2227 | (minibuffer-completing-file-name t) | ||
| 2228 | filename) | 2227 | filename) |
| 2229 | 2228 | ||
| 2230 | (if (or (not ido-mode) (ido-is-slow-ftp-host)) | 2229 | (if (or (not ido-mode) (ido-is-slow-ftp-host)) |
| @@ -2268,9 +2267,10 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2268 | 2267 | ||
| 2269 | (unless filename | 2268 | (unless filename |
| 2270 | (setq ido-saved-vc-hb vc-handled-backends) | 2269 | (setq ido-saved-vc-hb vc-handled-backends) |
| 2271 | (setq filename (ido-read-internal item | 2270 | (let ((minibuffer-completing-file-name t)) |
| 2272 | (or prompt "Find file: ") | 2271 | (setq filename (ido-read-internal item |
| 2273 | 'ido-file-history nil nil initial))) | 2272 | (or prompt "Find file: ") |
| 2273 | 'ido-file-history nil nil initial)))) | ||
| 2274 | 2274 | ||
| 2275 | ;; Choose the file name: either the text typed in, or the head | 2275 | ;; Choose the file name: either the text typed in, or the head |
| 2276 | ;; of the list of matches | 2276 | ;; of the list of matches |
| @@ -2426,13 +2426,13 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2426 | ((and (= 1 (length ido-matches)) | 2426 | ((and (= 1 (length ido-matches)) |
| 2427 | (not (and ido-enable-tramp-completion | 2427 | (not (and ido-enable-tramp-completion |
| 2428 | (string-equal ido-current-directory "/") | 2428 | (string-equal ido-current-directory "/") |
| 2429 | (string-match "..[@:]\\'" (car ido-matches))))) | 2429 | (string-match "..[@:]\\'" (ido-name (car ido-matches)))))) |
| 2430 | ;; only one choice, so select it. | 2430 | ;; only one choice, so select it. |
| 2431 | (if (not ido-confirm-unique-completion) | 2431 | (if (not ido-confirm-unique-completion) |
| 2432 | (exit-minibuffer) | 2432 | (exit-minibuffer) |
| 2433 | (setq ido-rescan (not ido-enable-prefix)) | 2433 | (setq ido-rescan (not ido-enable-prefix)) |
| 2434 | (delete-region (minibuffer-prompt-end) (point)) | 2434 | (delete-region (minibuffer-prompt-end) (point)) |
| 2435 | (insert (car ido-matches)))) | 2435 | (insert (ido-name (car ido-matches))))) |
| 2436 | 2436 | ||
| 2437 | (t ;; else there could be some completions | 2437 | (t ;; else there could be some completions |
| 2438 | (setq res ido-common-match-string) | 2438 | (setq res ido-common-match-string) |
| @@ -2814,7 +2814,7 @@ If input stack is non-empty, delete current directory component." | |||
| 2814 | "Use first matching item as input text." | 2814 | "Use first matching item as input text." |
| 2815 | (interactive) | 2815 | (interactive) |
| 2816 | (when ido-matches | 2816 | (when ido-matches |
| 2817 | (setq ido-text-init (car ido-matches)) | 2817 | (setq ido-text-init (ido-name (car ido-matches))) |
| 2818 | (setq ido-exit 'refresh) | 2818 | (setq ido-exit 'refresh) |
| 2819 | (exit-minibuffer))) | 2819 | (exit-minibuffer))) |
| 2820 | 2820 | ||
| @@ -2828,7 +2828,7 @@ If input stack is non-empty, delete current directory component." | |||
| 2828 | "Move to previous directory in file name, push first match on stack." | 2828 | "Move to previous directory in file name, push first match on stack." |
| 2829 | (interactive) | 2829 | (interactive) |
| 2830 | (if ido-matches | 2830 | (if ido-matches |
| 2831 | (setq ido-text (car ido-matches))) | 2831 | (setq ido-text (ido-name (car ido-matches)))) |
| 2832 | (setq ido-exit 'push) | 2832 | (setq ido-exit 'push) |
| 2833 | (exit-minibuffer)) | 2833 | (exit-minibuffer)) |
| 2834 | 2834 | ||
| @@ -3084,12 +3084,14 @@ for first matching file." | |||
| 3084 | (let ((oa (ido-file-extension-order a n)) | 3084 | (let ((oa (ido-file-extension-order a n)) |
| 3085 | (ob (ido-file-extension-order b n))) | 3085 | (ob (ido-file-extension-order b n))) |
| 3086 | (cond | 3086 | (cond |
| 3087 | ((= oa ob) | ||
| 3088 | lessp) | ||
| 3089 | ((and oa ob) | 3087 | ((and oa ob) |
| 3090 | (if lessp | 3088 | (cond |
| 3091 | (> oa ob) | 3089 | ((= oa ob) |
| 3092 | (< oa ob))) | 3090 | lessp) |
| 3091 | (lessp | ||
| 3092 | (> oa ob)) | ||
| 3093 | (t | ||
| 3094 | (< oa ob)))) | ||
| 3093 | (oa | 3095 | (oa |
| 3094 | (not lessp)) | 3096 | (not lessp)) |
| 3095 | (ob | 3097 | (ob |
| @@ -3136,7 +3138,12 @@ for first matching file." | |||
| 3136 | (let ((filenames | 3138 | (let ((filenames |
| 3137 | (split-string | 3139 | (split-string |
| 3138 | (shell-command-to-string | 3140 | (shell-command-to-string |
| 3139 | (concat "find " dir " -name \"" (if prefix "" "*") file "*\" -type " (if finddir "d" "f") " -print")))) | 3141 | (concat "find " |
| 3142 | (shell-quote-argument dir) | ||
| 3143 | " -name " | ||
| 3144 | (shell-quote-argument | ||
| 3145 | (concat (if prefix "" "*") file "*")) | ||
| 3146 | " -type " (if finddir "d" "f") " -print")))) | ||
| 3140 | filename d f | 3147 | filename d f |
| 3141 | res) | 3148 | res) |
| 3142 | (while filenames | 3149 | (while filenames |
| @@ -3618,7 +3625,7 @@ for first matching file." | |||
| 3618 | ((stringp nextstr) | 3625 | ((stringp nextstr) |
| 3619 | (and (>= flen (setq slen (length nextstr))) | 3626 | (and (>= flen (setq slen (length nextstr))) |
| 3620 | (string-equal (substring name (- flen slen)) nextstr))) | 3627 | (string-equal (substring name (- flen slen)) nextstr))) |
| 3621 | ((fboundp nextstr) (funcall nextstr name)) | 3628 | ((functionp nextstr) (funcall nextstr name)) |
| 3622 | (t nil)) | 3629 | (t nil)) |
| 3623 | (setq ignorep t | 3630 | (setq ignorep t |
| 3624 | ext-list nil | 3631 | ext-list nil |
| @@ -3628,7 +3635,7 @@ for first matching file." | |||
| 3628 | (setq nextstr (car re-list)) | 3635 | (setq nextstr (car re-list)) |
| 3629 | (if (cond | 3636 | (if (cond |
| 3630 | ((stringp nextstr) (string-match nextstr name)) | 3637 | ((stringp nextstr) (string-match nextstr name)) |
| 3631 | ((fboundp nextstr) (funcall nextstr name)) | 3638 | ((functionp nextstr) (funcall nextstr name)) |
| 3632 | (t nil)) | 3639 | (t nil)) |
| 3633 | (setq ignorep t | 3640 | (setq ignorep t |
| 3634 | re-list nil) | 3641 | re-list nil) |
| @@ -3745,7 +3752,7 @@ for first matching file." | |||
| 3745 | "Kill the buffer at the head of `ido-matches'." | 3752 | "Kill the buffer at the head of `ido-matches'." |
| 3746 | (interactive) | 3753 | (interactive) |
| 3747 | (let ((enable-recursive-minibuffers t) | 3754 | (let ((enable-recursive-minibuffers t) |
| 3748 | (buf (car ido-matches))) | 3755 | (buf (ido-name (car ido-matches)))) |
| 3749 | (when buf | 3756 | (when buf |
| 3750 | (kill-buffer buf) | 3757 | (kill-buffer buf) |
| 3751 | ;; Check if buffer still exists. | 3758 | ;; Check if buffer still exists. |
| @@ -3760,7 +3767,7 @@ for first matching file." | |||
| 3760 | "Delete the file at the head of `ido-matches'." | 3767 | "Delete the file at the head of `ido-matches'." |
| 3761 | (interactive) | 3768 | (interactive) |
| 3762 | (let ((enable-recursive-minibuffers t) | 3769 | (let ((enable-recursive-minibuffers t) |
| 3763 | (file (car ido-matches))) | 3770 | (file (ido-name (car ido-matches)))) |
| 3764 | (if file | 3771 | (if file |
| 3765 | (setq file (concat ido-current-directory file))) | 3772 | (setq file (concat ido-current-directory file))) |
| 3766 | (when (and file | 3773 | (when (and file |
| @@ -3781,7 +3788,8 @@ for first matching file." | |||
| 3781 | (defun ido-visit-buffer (buffer method &optional record) | 3788 | (defun ido-visit-buffer (buffer method &optional record) |
| 3782 | "Switch to BUFFER according to METHOD. | 3789 | "Switch to BUFFER according to METHOD. |
| 3783 | Record command in `command-history' if optional RECORD is non-nil." | 3790 | Record command in `command-history' if optional RECORD is non-nil." |
| 3784 | 3791 | (if (bufferp buffer) | |
| 3792 | (setq buffer (buffer-name buffer))) | ||
| 3785 | (let (win newframe) | 3793 | (let (win newframe) |
| 3786 | (cond | 3794 | (cond |
| 3787 | ((eq method 'kill) | 3795 | ((eq method 'kill) |
| @@ -4201,7 +4209,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." | |||
| 4201 | ((= (length contents) 2) | 4209 | ((= (length contents) 2) |
| 4202 | "/") | 4210 | "/") |
| 4203 | (ido-matches | 4211 | (ido-matches |
| 4204 | (concat ido-current-directory (car ido-matches))) | 4212 | (concat ido-current-directory (ido-name (car ido-matches)))) |
| 4205 | (t | 4213 | (t |
| 4206 | (concat ido-current-directory (substring contents 0 -1))))) | 4214 | (concat ido-current-directory (substring contents 0 -1))))) |
| 4207 | (setq ido-text-init (substring contents -1)) | 4215 | (setq ido-text-init (substring contents -1)) |
| @@ -4237,12 +4245,12 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." | |||
| 4237 | ido-matches | 4245 | ido-matches |
| 4238 | (or (eq ido-enter-matching-directory 'first) | 4246 | (or (eq ido-enter-matching-directory 'first) |
| 4239 | (null (cdr ido-matches))) | 4247 | (null (cdr ido-matches))) |
| 4240 | (ido-final-slash (car ido-matches)) | 4248 | (ido-final-slash (ido-name (car ido-matches))) |
| 4241 | (or try-single-dir-match | 4249 | (or try-single-dir-match |
| 4242 | (eq ido-enter-matching-directory t))) | 4250 | (eq ido-enter-matching-directory t))) |
| 4243 | (ido-trace "single match" (car ido-matches)) | 4251 | (ido-trace "single match" (car ido-matches)) |
| 4244 | (ido-set-current-directory | 4252 | (ido-set-current-directory |
| 4245 | (concat ido-current-directory (car ido-matches))) | 4253 | (concat ido-current-directory (ido-name (car ido-matches)))) |
| 4246 | (setq ido-exit 'refresh) | 4254 | (setq ido-exit 'refresh) |
| 4247 | (exit-minibuffer)) | 4255 | (exit-minibuffer)) |
| 4248 | 4256 | ||
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 523ef3f73a8..66f719ae1eb 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -60,16 +60,19 @@ to toggle between display as an image and display as text." | |||
| 60 | (setq major-mode 'image-mode) | 60 | (setq major-mode 'image-mode) |
| 61 | (use-local-map image-mode-map) | 61 | (use-local-map image-mode-map) |
| 62 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) | 62 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) |
| 63 | (if (not (get-text-property (point-min) 'display)) | 63 | (if (and (display-images-p) |
| 64 | (not (get-text-property (point-min) 'display))) | ||
| 64 | (image-toggle-display) | 65 | (image-toggle-display) |
| 65 | ;; Set next vars when image is already displayed but local | 66 | ;; Set next vars when image is already displayed but local |
| 66 | ;; variables were cleared by kill-all-local-variables | 67 | ;; variables were cleared by kill-all-local-variables |
| 67 | (setq cursor-type nil truncate-lines t)) | 68 | (setq cursor-type nil truncate-lines t)) |
| 68 | (run-mode-hooks 'image-mode-hook) | 69 | (run-mode-hooks 'image-mode-hook) |
| 69 | (message "%s" (concat (substitute-command-keys | 70 | (if (display-images-p) |
| 70 | "Type \\[image-toggle-display] to view the image as ") | 71 | (message "%s" (concat |
| 71 | (if (get-text-property (point-min) 'display) | 72 | (substitute-command-keys |
| 72 | "text" "an image") "."))) | 73 | "Type \\[image-toggle-display] to view the image as ") |
| 74 | (if (get-text-property (point-min) 'display) | ||
| 75 | "text" "an image") ".")))) | ||
| 73 | 76 | ||
| 74 | ;;;###autoload | 77 | ;;;###autoload |
| 75 | (define-minor-mode image-minor-mode | 78 | (define-minor-mode image-minor-mode |
diff --git a/lisp/imenu.el b/lisp/imenu.el index d9c75c5fdd4..ed190c24e12 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -967,15 +967,15 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook." | |||
| 967 | (defvar imenu-buffer-menubar nil) | 967 | (defvar imenu-buffer-menubar nil) |
| 968 | 968 | ||
| 969 | (defvar imenu-menubar-modified-tick 0 | 969 | (defvar imenu-menubar-modified-tick 0 |
| 970 | "The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.") | 970 | "The value of (buffer-chars-modified-tick) as of the last call |
| 971 | to `imenu-update-menubar'.") | ||
| 971 | (make-variable-buffer-local 'imenu-menubar-modified-tick) | 972 | (make-variable-buffer-local 'imenu-menubar-modified-tick) |
| 972 | 973 | ||
| 973 | (defun imenu-update-menubar () | 974 | (defun imenu-update-menubar () |
| 974 | (when (and (current-local-map) | 975 | (when (and (current-local-map) |
| 975 | (keymapp (lookup-key (current-local-map) [menu-bar index])) | 976 | (keymapp (lookup-key (current-local-map) [menu-bar index])) |
| 976 | (not (eq (buffer-modified-tick) | 977 | (/= (buffer-chars-modified-tick) imenu-menubar-modified-tick)) |
| 977 | imenu-menubar-modified-tick))) | 978 | (setq imenu-menubar-modified-tick (buffer-chars-modified-tick)) |
| 978 | (setq imenu-menubar-modified-tick (buffer-modified-tick)) | ||
| 979 | (let ((index-alist (imenu--make-index-alist t))) | 979 | (let ((index-alist (imenu--make-index-alist t))) |
| 980 | ;; Don't bother updating if the index-alist has not changed | 980 | ;; Don't bother updating if the index-alist has not changed |
| 981 | ;; since the last time we did it. | 981 | ;; since the last time we did it. |
diff --git a/lisp/info-look.el b/lisp/info-look.el index 404eee3f2d0..2ac461aa669 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -843,12 +843,13 @@ Return nil if there is nothing appropriate in the buffer near point." | |||
| 843 | (info-lookup-maybe-add-help | 843 | (info-lookup-maybe-add-help |
| 844 | :mode 'maxima-mode | 844 | :mode 'maxima-mode |
| 845 | :ignore-case t | 845 | :ignore-case t |
| 846 | :regexp "[a-zA-Z_%]+" | 846 | :regexp "[a-zA-Z0-9_%]+" |
| 847 | :doc-spec '( ("(maxima)Function and Variable Index" nil | 847 | :doc-spec '( ("(maxima)Function and Variable Index" nil |
| 848 | "^ -+ [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil))) | 848 | "^ -+ [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil))) |
| 849 | 849 | ||
| 850 | (info-lookup-maybe-add-help | 850 | (info-lookup-maybe-add-help |
| 851 | :mode 'inferior-maxima-mode | 851 | :mode 'inferior-maxima-mode |
| 852 | :regexp "[a-zA-Z0-9_%]+" | ||
| 852 | :other-modes '(maxima-mode)) | 853 | :other-modes '(maxima-mode)) |
| 853 | 854 | ||
| 854 | ;; coreutils and bash builtins overlap in places, eg. printf, so there's a | 855 | ;; coreutils and bash builtins overlap in places, eg. printf, so there's a |
diff --git a/lisp/info.el b/lisp/info.el index dc08557e28d..05c07220892 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -2792,7 +2792,8 @@ Use the \\<Info-mode-map>\\[Info-index-next] command to see the other matches. | |||
| 2792 | Give an empty topic name to go to the Index node itself." | 2792 | Give an empty topic name to go to the Index node itself." |
| 2793 | (interactive | 2793 | (interactive |
| 2794 | (list | 2794 | (list |
| 2795 | (let ((Info-complete-menu-buffer (clone-buffer)) | 2795 | (let ((completion-ignore-case t) |
| 2796 | (Info-complete-menu-buffer (clone-buffer)) | ||
| 2796 | (Info-complete-nodes (Info-index-nodes)) | 2797 | (Info-complete-nodes (Info-index-nodes)) |
| 2797 | (Info-history-list nil)) | 2798 | (Info-history-list nil)) |
| 2798 | (if (equal Info-current-file "dir") | 2799 | (if (equal Info-current-file "dir") |
diff --git a/lisp/international/code-pages.el b/lisp/international/code-pages.el index 13181268b36..994450b2a70 100644 --- a/lisp/international/code-pages.el +++ b/lisp/international/code-pages.el | |||
| @@ -1273,6 +1273,138 @@ Return an updated `non-iso-charset-alist'." | |||
| 1273 | ?\■ | 1273 | ?\■ |
| 1274 | ?\ ]) | 1274 | ?\ ]) |
| 1275 | 1275 | ||
| 1276 | ;;;###autoload(autoload-coding-system 'cp858 '(require 'code-pages)) | ||
| 1277 | (cp-make-coding-system | ||
| 1278 | cp858 | ||
| 1279 | [?\Ç | ||
| 1280 | ?\ü | ||
| 1281 | ?\é | ||
| 1282 | ?\â | ||
| 1283 | ?\ä | ||
| 1284 | ?\à | ||
| 1285 | ?\å | ||
| 1286 | ?\ç | ||
| 1287 | ?\ê | ||
| 1288 | ?\ë | ||
| 1289 | ?\è | ||
| 1290 | ?\ï | ||
| 1291 | ?\î | ||
| 1292 | ?\ì | ||
| 1293 | ?\Ä | ||
| 1294 | ?\Å | ||
| 1295 | ?\É | ||
| 1296 | ?\æ | ||
| 1297 | ?\Æ | ||
| 1298 | ?\ô | ||
| 1299 | ?\ö | ||
| 1300 | ?\ò | ||
| 1301 | ?\û | ||
| 1302 | ?\ù | ||
| 1303 | ?\ÿ | ||
| 1304 | ?\Ö | ||
| 1305 | ?\Ü | ||
| 1306 | ?\ø | ||
| 1307 | ?\£ | ||
| 1308 | ?\Ø | ||
| 1309 | ?\× | ||
| 1310 | ?\ƒ | ||
| 1311 | ?\á | ||
| 1312 | ?\í | ||
| 1313 | ?\ó | ||
| 1314 | ?\ú | ||
| 1315 | ?\ñ | ||
| 1316 | ?\Ñ | ||
| 1317 | ?\ª | ||
| 1318 | ?\º | ||
| 1319 | ?\¿ | ||
| 1320 | ?\® | ||
| 1321 | ?\¬ | ||
| 1322 | ?\½ | ||
| 1323 | ?\¼ | ||
| 1324 | ?\¡ | ||
| 1325 | ?\« | ||
| 1326 | ?\» | ||
| 1327 | ?\░ | ||
| 1328 | ?\▒ | ||
| 1329 | ?\▓ | ||
| 1330 | ?\│ | ||
| 1331 | ?\┤ | ||
| 1332 | ?\Á | ||
| 1333 | ?\Â | ||
| 1334 | ?\À | ||
| 1335 | ?\© | ||
| 1336 | ?\╣ | ||
| 1337 | ?\║ | ||
| 1338 | ?\╗ | ||
| 1339 | ?\╝ | ||
| 1340 | ?\¢ | ||
| 1341 | ?\¥ | ||
| 1342 | ?\┐ | ||
| 1343 | ?\└ | ||
| 1344 | ?\┴ | ||
| 1345 | ?\┬ | ||
| 1346 | ?\├ | ||
| 1347 | ?\─ | ||
| 1348 | ?\┼ | ||
| 1349 | ?\ã | ||
| 1350 | ?\Ã | ||
| 1351 | ?\╚ | ||
| 1352 | ?\╔ | ||
| 1353 | ?\╩ | ||
| 1354 | ?\╦ | ||
| 1355 | ?\╠ | ||
| 1356 | ?\═ | ||
| 1357 | ?\╬ | ||
| 1358 | ?\¤ | ||
| 1359 | ?\ð | ||
| 1360 | ?\Ð | ||
| 1361 | ?\Ê | ||
| 1362 | ?\Ë | ||
| 1363 | ?\È | ||
| 1364 | ?\€ | ||
| 1365 | ?\Í | ||
| 1366 | ?\Î | ||
| 1367 | ?\Ï | ||
| 1368 | ?\┘ | ||
| 1369 | ?\┌ | ||
| 1370 | ?\█ | ||
| 1371 | ?\▄ | ||
| 1372 | ?\¦ | ||
| 1373 | ?\Ì | ||
| 1374 | ?\▀ | ||
| 1375 | ?\Ó | ||
| 1376 | ?\ß | ||
| 1377 | ?\Ô | ||
| 1378 | ?\Ò | ||
| 1379 | ?\õ | ||
| 1380 | ?\Õ | ||
| 1381 | ?\µ | ||
| 1382 | ?\þ | ||
| 1383 | ?\Þ | ||
| 1384 | ?\Ú | ||
| 1385 | ?\Û | ||
| 1386 | ?\Ù | ||
| 1387 | ?\ý | ||
| 1388 | ?\Ý | ||
| 1389 | ?\¯ | ||
| 1390 | ?\´ | ||
| 1391 | ?\ | ||
| 1392 | ?\± | ||
| 1393 | ?\‗ | ||
| 1394 | ?\¾ | ||
| 1395 | ?\¶ | ||
| 1396 | ?\§ | ||
| 1397 | ?\÷ | ||
| 1398 | ?\¸ | ||
| 1399 | ?\° | ||
| 1400 | ?\¨ | ||
| 1401 | ?\· | ||
| 1402 | ?\¹ | ||
| 1403 | ?\³ | ||
| 1404 | ?\² | ||
| 1405 | ?\■ | ||
| 1406 | ?\ ]) | ||
| 1407 | |||
| 1276 | ;;;###autoload(autoload-coding-system 'cp860 '(require 'code-pages)) | 1408 | ;;;###autoload(autoload-coding-system 'cp860 '(require 'code-pages)) |
| 1277 | (cp-make-coding-system | 1409 | (cp-make-coding-system |
| 1278 | cp860 | 1410 | cp860 |
| @@ -3442,11 +3574,11 @@ Return an updated `non-iso-charset-alist'." | |||
| 3442 | ?\ƒ | 3574 | ?\ƒ |
| 3443 | ?\§ | 3575 | ?\§ |
| 3444 | ?\¤ | 3576 | ?\¤ |
| 3445 | nil | 3577 | ?\’ |
| 3446 | ?\“ | 3578 | ?\“ |
| 3447 | ?\« | 3579 | ?\« |
| 3448 | nil | 3580 | ?\‹ |
| 3449 | nil | 3581 | ?\› |
| 3450 | ?\fi | 3582 | ?\fi |
| 3451 | ?\fl | 3583 | ?\fl |
| 3452 | ?\® | 3584 | ?\® |
| @@ -3457,8 +3589,8 @@ Return an updated `non-iso-charset-alist'." | |||
| 3457 | ?\¦ | 3589 | ?\¦ |
| 3458 | ?\¶ | 3590 | ?\¶ |
| 3459 | ?\• | 3591 | ?\• |
| 3460 | nil | 3592 | ?\‚ |
| 3461 | nil | 3593 | ?\„ |
| 3462 | ?\” | 3594 | ?\” |
| 3463 | ?\» | 3595 | ?\» |
| 3464 | ?\… | 3596 | ?\… |
| @@ -3804,62 +3936,92 @@ Return an updated `non-iso-charset-alist'." | |||
| 3804 | (cp-make-coding-system | 3936 | (cp-make-coding-system |
| 3805 | ;; The base system uses arabic-iso-8bit, but that's not a MIME charset. | 3937 | ;; The base system uses arabic-iso-8bit, but that's not a MIME charset. |
| 3806 | iso-8859-6 | 3938 | iso-8859-6 |
| 3807 | [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil | 3939 | [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil |
| 3808 | nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil | 3940 | nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil |
| 3809 | ?\ | 3941 | ?\ |
| 3810 | ?\¤ | 3942 | nil |
| 3811 | ?\، | 3943 | nil |
| 3812 | ?\ | 3944 | nil |
| 3813 | ?\؛ | 3945 | ?¤ |
| 3814 | ?\؟ | 3946 | nil |
| 3815 | ?\ء | 3947 | nil |
| 3816 | ?\آ | 3948 | nil |
| 3817 | ?\أ | 3949 | nil |
| 3818 | ?\ؤ | 3950 | nil |
| 3819 | ?\إ | 3951 | nil |
| 3820 | ?\ئ | 3952 | nil |
| 3821 | ?\ا | 3953 | ?، |
| 3822 | ?\ب | 3954 | ? |
| 3823 | ?\ة | 3955 | nil |
| 3824 | ?\ت | 3956 | nil |
| 3825 | ?\ث | 3957 | nil |
| 3826 | ?\ج | 3958 | nil |
| 3827 | ?\ح | 3959 | nil |
| 3828 | ?\خ | 3960 | nil |
| 3829 | ?\د | 3961 | nil |
| 3830 | ?\ذ | 3962 | nil |
| 3831 | ?\ر | 3963 | nil |
| 3832 | ?\ز | 3964 | nil |
| 3833 | ?\س | 3965 | nil |
| 3834 | ?\ش | 3966 | nil |
| 3835 | ?\ص | 3967 | nil |
| 3836 | ?\ض | 3968 | ?؛ |
| 3837 | ?\ط | 3969 | nil |
| 3838 | ?\ظ | 3970 | nil |
| 3839 | ?\ع | 3971 | nil |
| 3840 | ?\غ | 3972 | ?؟ |
| 3841 | ?\ـ | 3973 | nil |
| 3842 | ?\ف | 3974 | ?ء |
| 3843 | ?\ق | 3975 | ?آ |
| 3844 | ?\ك | 3976 | ?أ |
| 3845 | ?\ل | 3977 | ?ؤ |
| 3846 | ?\م | 3978 | ?إ |
| 3847 | ?\ن | 3979 | ?ئ |
| 3848 | ?\ه | 3980 | ?ا |
| 3849 | ?\و | 3981 | ?ب |
| 3850 | ?\ى | 3982 | ?ة |
| 3851 | ?\ي | 3983 | ?ت |
| 3852 | ?\ً | 3984 | ?ث |
| 3853 | ?\ٌ | 3985 | ?ج |
| 3854 | ?\ٍ | 3986 | ?ح |
| 3855 | ?\َ | 3987 | ?خ |
| 3856 | ?\ُ | 3988 | ?د |
| 3857 | ?\ِ | 3989 | ?ذ |
| 3858 | ?\ّ | 3990 | ?ر |
| 3859 | ?\ْ | 3991 | ?ز |
| 3860 | nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil | 3992 | ?س |
| 3861 | nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil | 3993 | ?ش |
| 3862 | nil nil nil nil nil nil nil nil nil nil nil] | 3994 | ?ص |
| 3995 | ?ض | ||
| 3996 | ?ط | ||
| 3997 | ?ظ | ||
| 3998 | ?ع | ||
| 3999 | ?غ | ||
| 4000 | nil | ||
| 4001 | nil | ||
| 4002 | nil | ||
| 4003 | nil | ||
| 4004 | nil | ||
| 4005 | ?ـ | ||
| 4006 | ?ف | ||
| 4007 | ?ق | ||
| 4008 | ?ك | ||
| 4009 | ?ل | ||
| 4010 | ?م | ||
| 4011 | ?ن | ||
| 4012 | ?ه | ||
| 4013 | ?و | ||
| 4014 | ?ى | ||
| 4015 | ?ي | ||
| 4016 | ?ً | ||
| 4017 | ?ٌ | ||
| 4018 | ?ٍ | ||
| 4019 | ?َ | ||
| 4020 | ?ُ | ||
| 4021 | ?ِ | ||
| 4022 | ?ّ | ||
| 4023 | ?ْ | ||
| 4024 | nil nil nil nil nil nil nil nil nil nil nil nil nil] | ||
| 3863 | "Unicode-based Arabic ISO/IEC 8859-6 (MIME: ISO-8859-6)" | 4025 | "Unicode-based Arabic ISO/IEC 8859-6 (MIME: ISO-8859-6)" |
| 3864 | ?6) | 4026 | ?6) |
| 3865 | (define-coding-system-alias 'arabic-iso-8bit 'iso-8859-6) | 4027 | (define-coding-system-alias 'arabic-iso-8bit 'iso-8859-6) |
diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el index 56920b968ac..e2499002a34 100644 --- a/lisp/international/codepage.el +++ b/lisp/international/codepage.el | |||
| @@ -220,16 +220,32 @@ character is generated by (make-char CHARSET OFFSET)." | |||
| 220 | ;; character created by (make-char 'latin-iso8859-1 (+ N 160)). | 220 | ;; character created by (make-char 'latin-iso8859-1 (+ N 160)). |
| 221 | ;; The element nil means there's no corresponding cp850 glyph. | 221 | ;; The element nil means there's no corresponding cp850 glyph. |
| 222 | [ | 222 | [ |
| 223 | 255 173 189 156 207 190 221 245 249 184 166 174 170 240 169 nil | 223 | 255 173 189 156 207 190 221 245 249 184 166 174 170 240 169 238 |
| 224 | 248 241 253 252 239 230 244 250 247 251 167 175 172 171 243 168 | 224 | 248 241 253 252 239 230 244 250 247 251 167 175 172 171 243 168 |
| 225 | 183 181 182 199 142 143 146 128 212 144 210 211 222 214 215 216 | 225 | 183 181 182 199 142 143 146 128 212 144 210 211 222 214 215 216 |
| 226 | 209 165 227 224 226 229 153 158 157 235 233 234 154 237 231 225 | 226 | 209 165 227 224 226 229 153 158 157 235 233 234 154 237 232 225 |
| 227 | 133 160 131 198 132 134 145 135 138 130 136 137 141 161 140 139 | 227 | 133 160 131 198 132 134 145 135 138 130 136 137 141 161 140 139 |
| 228 | 208 164 149 162 147 228 148 246 155 151 163 150 129 236 232 152] | 228 | 208 164 149 162 147 228 148 246 155 151 163 150 129 236 231 152] |
| 229 | "Table for converting ISO-8859-1 characters into codepage 850 glyphs.") | 229 | "Table for converting ISO-8859-1 characters into codepage 850 glyphs.") |
| 230 | (setplist 'cp850-decode-table | 230 | (setplist 'cp850-decode-table |
| 231 | '(charset latin-iso8859-1 language "Latin-1" offset 160)) | 231 | '(charset latin-iso8859-1 language "Latin-1" offset 160)) |
| 232 | 232 | ||
| 233 | ;; Multilingual (Latin-9) | ||
| 234 | (defvar cp858-decode-table | ||
| 235 | ;; Nth element is the code of a cp858 glyph for the multibyte | ||
| 236 | ;; character created by (make-char 'latin-iso8859-15 (+ N 160)). | ||
| 237 | ;; The element nil means there's no corresponding cp858 glyph. | ||
| 238 | [ | ||
| 239 | 255 173 189 156 213 190 221 245 249 184 166 174 170 240 169 238 | ||
| 240 | 248 241 253 252 239 230 244 250 247 251 167 175 172 171 243 168 | ||
| 241 | 183 181 182 199 142 143 146 128 212 144 210 211 222 214 215 216 | ||
| 242 | 209 165 227 224 226 229 153 158 157 235 233 234 154 237 232 225 | ||
| 243 | 133 160 131 198 132 134 145 135 138 130 136 137 141 161 140 139 | ||
| 244 | 208 164 149 162 147 228 148 246 155 151 163 150 129 236 231 152] | ||
| 245 | "Table for converting ISO-8859-15 characters into codepage 858 glyphs.") | ||
| 246 | (setplist 'cp858-decode-table | ||
| 247 | '(charset latin-iso8859-15 language "Latin-9" offset 160)) | ||
| 248 | |||
| 233 | ;; Greek | 249 | ;; Greek |
| 234 | (defvar cp851-decode-table | 250 | (defvar cp851-decode-table |
| 235 | [ | 251 | [ |
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 58e8d6c88e8..4f9b4f740d5 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | ("cp437" . cp437) ; IBM code page 437: 225 is \beta | 63 | ("cp437" . cp437) ; IBM code page 437: 225 is \beta |
| 64 | ("cp850" . cp850) ; IBM code page 850 | 64 | ("cp850" . cp850) ; IBM code page 850 |
| 65 | ("cp852" . cp852) ; IBM code page 852 | 65 | ("cp852" . cp852) ; IBM code page 852 |
| 66 | ;; ("cp858" . undecided) ; IBM code page 850 but with a euro symbol | 66 | ("cp858" . cp858) ; IBM code page 850 but with a euro symbol |
| 67 | ("cp865" . cp865) ; IBM code page 865 | 67 | ("cp865" . cp865) ; IBM code page 865 |
| 68 | ;; The DECMultinational charaterset used by the OpenVMS system | 68 | ;; The DECMultinational charaterset used by the OpenVMS system |
| 69 | ;; ("decmulti" . undecided) | 69 | ;; ("decmulti" . undecided) |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index aecf2128456..5e9846e0155 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -216,19 +216,21 @@ They means `unix', `dos', and `mac' respectively." | |||
| 216 | ((eq eol-type 'dos) 1) | 216 | ((eq eol-type 'dos) 1) |
| 217 | ((eq eol-type 'mac) 2) | 217 | ((eq eol-type 'mac) 2) |
| 218 | (t eol-type)))) | 218 | (t eol-type)))) |
| 219 | (let ((orig-eol-type (coding-system-eol-type coding-system))) | 219 | ;; We call `coding-system-base' before `coding-system-eol-type', |
| 220 | (if (vectorp orig-eol-type) | 220 | ;; because the coding-system may not be initialized until then. |
| 221 | (if (not eol-type) | 221 | (let* ((base (coding-system-base coding-system)) |
| 222 | coding-system | 222 | (orig-eol-type (coding-system-eol-type coding-system))) |
| 223 | (aref orig-eol-type eol-type)) | 223 | (cond ((vectorp orig-eol-type) |
| 224 | (let ((base (coding-system-base coding-system))) | 224 | (if (not eol-type) |
| 225 | (if (not eol-type) | 225 | coding-system |
| 226 | base | 226 | (aref orig-eol-type eol-type))) |
| 227 | (if (= eol-type orig-eol-type) | 227 | ((not eol-type) |
| 228 | coding-system | 228 | base) |
| 229 | (setq orig-eol-type (coding-system-eol-type base)) | 229 | ((= eol-type orig-eol-type) |
| 230 | (if (vectorp orig-eol-type) | 230 | coding-system) |
| 231 | (aref orig-eol-type eol-type)))))))) | 231 | ((progn (setq orig-eol-type (coding-system-eol-type base)) |
| 232 | (vectorp orig-eol-type)) | ||
| 233 | (aref orig-eol-type eol-type))))) | ||
| 232 | 234 | ||
| 233 | (defun coding-system-change-text-conversion (coding-system coding) | 235 | (defun coding-system-change-text-conversion (coding-system coding) |
| 234 | "Return a coding system which differs from CODING-SYSTEM in text conversion. | 236 | "Return a coding system which differs from CODING-SYSTEM in text conversion. |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 1cce13c76a3..9ddb666bfd0 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1871,7 +1871,13 @@ The optional second arg VISIT non-nil means that we are visiting a file." | |||
| 1871 | (let ((pos-marker (copy-marker (+ (point) inserted))) | 1871 | (let ((pos-marker (copy-marker (+ (point) inserted))) |
| 1872 | ;; Prevent locking. | 1872 | ;; Prevent locking. |
| 1873 | (buffer-file-name nil)) | 1873 | (buffer-file-name nil)) |
| 1874 | (set-buffer-multibyte nil) | 1874 | (if visit |
| 1875 | ;; If we're doing this for find-file, | ||
| 1876 | ;; don't record undo info; this counts as | ||
| 1877 | ;; part of producing the buffer's initial contents. | ||
| 1878 | (let ((buffer-undo-list t)) | ||
| 1879 | (set-buffer-multibyte nil)) | ||
| 1880 | (set-buffer-multibyte nil)) | ||
| 1875 | (setq inserted (- pos-marker (point))))) | 1881 | (setq inserted (- pos-marker (point))))) |
| 1876 | (set-buffer-modified-p modified-p)))) | 1882 | (set-buffer-modified-p modified-p)))) |
| 1877 | inserted) | 1883 | inserted) |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 3998764957e..fceebf64f22 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1095,8 +1095,8 @@ Optional 5th arg DECODE-MAP is a Quail decode map. | |||
| 1095 | 1095 | ||
| 1096 | Optional 6th arg PROPS is a property list annotating TRANS. See the | 1096 | Optional 6th arg PROPS is a property list annotating TRANS. See the |
| 1097 | function `quail-define-rules' for the detail." | 1097 | function `quail-define-rules' for the detail." |
| 1098 | (if (null (stringp key)) | 1098 | (if (not (or (stringp key) (vectorp key))) |
| 1099 | "Invalid Quail key `%s'" key) | 1099 | (error "Invalid Quail key `%s'" key)) |
| 1100 | (if (not (or (numberp trans) (stringp trans) (vectorp trans) | 1100 | (if (not (or (numberp trans) (stringp trans) (vectorp trans) |
| 1101 | (consp trans) | 1101 | (consp trans) |
| 1102 | (symbolp trans) | 1102 | (symbolp trans) |
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 384d973db9f..7a57a3d099b 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el | |||
| @@ -309,7 +309,10 @@ use either \\[customize] or the function | |||
| 309 | ;; Here we bind coding-system-for-read to nil so that coding tags | 309 | ;; Here we bind coding-system-for-read to nil so that coding tags |
| 310 | ;; in the files are respected even if the files are not yet | 310 | ;; in the files are respected even if the files are not yet |
| 311 | ;; byte-compiled | 311 | ;; byte-compiled |
| 312 | (let ((coding-system-for-read nil)) | 312 | (let ((coding-system-for-read nil) |
| 313 | ;; We must avoid clobbering this variable, in case the load | ||
| 314 | ;; files below use different coding systems. | ||
| 315 | (last-coding-system-used last-coding-system-used)) | ||
| 313 | (cond ((string= "Korean" current-language-environment) | 316 | (cond ((string= "Korean" current-language-environment) |
| 314 | (load "subst-jis") | 317 | (load "subst-jis") |
| 315 | (load "subst-big5") | 318 | (load "subst-big5") |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 7039dbd6812..85e0bb6763f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1293,23 +1293,18 @@ If search string is empty, just beep." | |||
| 1293 | (defun isearch-mouse-2 (click) | 1293 | (defun isearch-mouse-2 (click) |
| 1294 | "Handle mouse-2 in Isearch mode. | 1294 | "Handle mouse-2 in Isearch mode. |
| 1295 | For a click in the echo area, invoke `isearch-yank-x-selection'. | 1295 | For a click in the echo area, invoke `isearch-yank-x-selection'. |
| 1296 | Otherwise invoke whatever mouse-2 is bound to outside of Isearch." | 1296 | Otherwise invoke whatever the calling mouse-2 command sequence |
| 1297 | is bound to outside of Isearch." | ||
| 1297 | (interactive "e") | 1298 | (interactive "e") |
| 1298 | (let* ((w (posn-window (event-start click))) | 1299 | (let* ((w (posn-window (event-start click))) |
| 1299 | (overriding-terminal-local-map nil) | 1300 | (overriding-terminal-local-map nil) |
| 1300 | (key (vector (event-basic-type click))) | 1301 | (binding (key-binding (this-command-keys-vector) t))) |
| 1301 | ;; FIXME: `key-binding' should accept an event as argument | ||
| 1302 | ;; and do all the overlay/text-properties lookup etc... | ||
| 1303 | (binding (with-current-buffer | ||
| 1304 | (if (window-live-p w) (window-buffer w) (current-buffer)) | ||
| 1305 | (key-binding key)))) | ||
| 1306 | (if (and (window-minibuffer-p w) | 1302 | (if (and (window-minibuffer-p w) |
| 1307 | (not (minibuffer-window-active-p w))) ; in echo area | 1303 | (not (minibuffer-window-active-p w))) ; in echo area |
| 1308 | (isearch-yank-x-selection) | 1304 | (isearch-yank-x-selection) |
| 1309 | (when (functionp binding) | 1305 | (when (functionp binding) |
| 1310 | (call-interactively binding))))) | 1306 | (call-interactively binding))))) |
| 1311 | 1307 | ||
| 1312 | |||
| 1313 | (defun isearch-yank-internal (jumpform) | 1308 | (defun isearch-yank-internal (jumpform) |
| 1314 | "Pull the text from point to the point reached by JUMPFORM. | 1309 | "Pull the text from point to the point reached by JUMPFORM. |
| 1315 | JUMPFORM is a lambda expression that takes no arguments and returns a | 1310 | JUMPFORM is a lambda expression that takes no arguments and returns a |
| @@ -1807,8 +1802,6 @@ Isearch mode." | |||
| 1807 | ((eq char ?|) (isearch-fallback t nil t))) | 1802 | ((eq char ?|) (isearch-fallback t nil t))) |
| 1808 | 1803 | ||
| 1809 | ;; Append the char to the search string, update the message and re-search. | 1804 | ;; Append the char to the search string, update the message and re-search. |
| 1810 | (if (char-table-p translation-table-for-input) | ||
| 1811 | (setq char (or (aref translation-table-for-input char) char))) | ||
| 1812 | (isearch-process-search-string | 1805 | (isearch-process-search-string |
| 1813 | (char-to-string char) | 1806 | (char-to-string char) |
| 1814 | (if (>= char ?\200) | 1807 | (if (>= char ?\200) |
| @@ -1993,6 +1986,36 @@ Can be changed via `isearch-search-fun-function' for special needs." | |||
| 1993 | (t | 1986 | (t |
| 1994 | (if isearch-forward 'search-forward 'search-backward))))) | 1987 | (if isearch-forward 'search-forward 'search-backward))))) |
| 1995 | 1988 | ||
| 1989 | (defun isearch-search-string (string bound noerror) | ||
| 1990 | ;; Search for the first occurance of STRING or its translation. If | ||
| 1991 | ;; found, move point to the end of the occurance, update | ||
| 1992 | ;; isearch-match-beg and isearch-match-end, and return point. | ||
| 1993 | (let ((func (isearch-search-fun)) | ||
| 1994 | (len (length string)) | ||
| 1995 | pos1 pos2) | ||
| 1996 | (setq pos1 (save-excursion (funcall func string bound noerror))) | ||
| 1997 | (if (and (char-table-p translation-table-for-input) | ||
| 1998 | (> (string-bytes string) len)) | ||
| 1999 | (let (translated match-data) | ||
| 2000 | (dotimes (i len) | ||
| 2001 | (let ((x (aref translation-table-for-input (aref string i)))) | ||
| 2002 | (when x | ||
| 2003 | (or translated (setq translated (copy-sequence string))) | ||
| 2004 | (aset translated i x)))) | ||
| 2005 | (when translated | ||
| 2006 | (save-match-data | ||
| 2007 | (save-excursion | ||
| 2008 | (if (setq pos2 (funcall func translated bound noerror)) | ||
| 2009 | (setq match-data (match-data t))))) | ||
| 2010 | (when (and pos2 | ||
| 2011 | (or (not pos1) | ||
| 2012 | (if isearch-forward (< pos2 pos1) (> pos2 pos1)))) | ||
| 2013 | (setq pos1 pos2) | ||
| 2014 | (set-match-data match-data))))) | ||
| 2015 | (if pos1 | ||
| 2016 | (goto-char pos1)) | ||
| 2017 | pos1)) | ||
| 2018 | |||
| 1996 | (defun isearch-search () | 2019 | (defun isearch-search () |
| 1997 | ;; Do the search with the current search string. | 2020 | ;; Do the search with the current search string. |
| 1998 | (isearch-message nil t) | 2021 | (isearch-message nil t) |
| @@ -2008,9 +2031,7 @@ Can be changed via `isearch-search-fun-function' for special needs." | |||
| 2008 | (setq isearch-error nil) | 2031 | (setq isearch-error nil) |
| 2009 | (while retry | 2032 | (while retry |
| 2010 | (setq isearch-success | 2033 | (setq isearch-success |
| 2011 | (funcall | 2034 | (isearch-search-string isearch-string nil t)) |
| 2012 | (isearch-search-fun) | ||
| 2013 | isearch-string nil t)) | ||
| 2014 | ;; Clear RETRY unless we matched some invisible text | 2035 | ;; Clear RETRY unless we matched some invisible text |
| 2015 | ;; and we aren't supposed to do that. | 2036 | ;; and we aren't supposed to do that. |
| 2016 | (if (or (eq search-invisible t) | 2037 | (if (or (eq search-invisible t) |
| @@ -2353,7 +2374,7 @@ Attempt to do the search exactly the way the pending isearch would." | |||
| 2353 | (isearch-regexp isearch-lazy-highlight-regexp) | 2374 | (isearch-regexp isearch-lazy-highlight-regexp) |
| 2354 | (search-spaces-regexp search-whitespace-regexp)) | 2375 | (search-spaces-regexp search-whitespace-regexp)) |
| 2355 | (condition-case nil | 2376 | (condition-case nil |
| 2356 | (funcall (isearch-search-fun) | 2377 | (isearch-search-string |
| 2357 | isearch-lazy-highlight-last-string | 2378 | isearch-lazy-highlight-last-string |
| 2358 | (if isearch-forward | 2379 | (if isearch-forward |
| 2359 | (min (or isearch-lazy-highlight-end-limit (point-max)) | 2380 | (min (or isearch-lazy-highlight-end-limit (point-max)) |
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 89959ad8525..e049579d463 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el | |||
| @@ -349,7 +349,7 @@ Defaults to the whole buffer. END can be out of bounds." | |||
| 349 | ;; Fontify chunks beginning at START. The end of a | 349 | ;; Fontify chunks beginning at START. The end of a |
| 350 | ;; chunk is either `end', or the start of a region | 350 | ;; chunk is either `end', or the start of a region |
| 351 | ;; before `end' that has already been fontified. | 351 | ;; before `end' that has already been fontified. |
| 352 | (while start | 352 | (while (and start (< start end)) |
| 353 | ;; Determine the end of this chunk. | 353 | ;; Determine the end of this chunk. |
| 354 | (setq next (or (text-property-any start end 'fontified t) | 354 | (setq next (or (text-property-any start end 'fontified t) |
| 355 | end)) | 355 | end)) |
| @@ -397,19 +397,21 @@ Defaults to the whole buffer. END can be out of bounds." | |||
| 397 | ;; eagerly extend the refontified region with | 397 | ;; eagerly extend the refontified region with |
| 398 | ;; jit-lock-after-change-extend-region-functions. | 398 | ;; jit-lock-after-change-extend-region-functions. |
| 399 | (when (< start orig-start) | 399 | (when (< start orig-start) |
| 400 | (lexical-let ((start start) | 400 | (run-with-timer 0 nil 'jit-lock-force-redisplay |
| 401 | (orig-start orig-start) | 401 | (current-buffer) start orig-start)) |
| 402 | (buf (current-buffer))) | ||
| 403 | (run-with-timer | ||
| 404 | 0 nil (lambda () | ||
| 405 | (with-current-buffer buf | ||
| 406 | (with-buffer-prepared-for-jit-lock | ||
| 407 | (put-text-property start orig-start | ||
| 408 | 'fontified t))))))) | ||
| 409 | 402 | ||
| 410 | ;; Find the start of the next chunk, if any. | 403 | ;; Find the start of the next chunk, if any. |
| 411 | (setq start (text-property-any next end 'fontified nil)))))))) | 404 | (setq start (text-property-any next end 'fontified nil)))))))) |
| 412 | 405 | ||
| 406 | (defun jit-lock-force-redisplay (buf start end) | ||
| 407 | "Force the display engine to re-render buffer BUF from START to END." | ||
| 408 | (with-current-buffer buf | ||
| 409 | (with-buffer-prepared-for-jit-lock | ||
| 410 | ;; Don't cause refontification (it's already been done), but just do | ||
| 411 | ;; some random buffer change, so as to force redisplay. | ||
| 412 | (put-text-property start end 'fontified t)))) | ||
| 413 | |||
| 414 | |||
| 413 | 415 | ||
| 414 | ;;; Stealth fontification. | 416 | ;;; Stealth fontification. |
| 415 | 417 | ||
diff --git a/lisp/language/european.el b/lisp/language/european.el index fbac0527425..b070fe75607 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | (set-language-info-alist | 37 | (set-language-info-alist |
| 38 | "Latin-1" '((charset ascii latin-iso8859-1) | 38 | "Latin-1" '((charset ascii latin-iso8859-1) |
| 39 | (coding-system iso-latin-1) | 39 | (coding-system iso-latin-1) |
| 40 | (coding-priority iso-latin-1) | 40 | (coding-priority iso-latin-1 windows-1252) |
| 41 | (nonascii-translation . latin-iso8859-1) | 41 | (nonascii-translation . latin-iso8859-1) |
| 42 | (unibyte-syntax . "latin-1") | 42 | (unibyte-syntax . "latin-1") |
| 43 | (unibyte-display . iso-latin-1) | 43 | (unibyte-display . iso-latin-1) |
| @@ -278,7 +278,7 @@ but it selects the Dutch tutorial and input method.")) | |||
| 278 | "German" '((tutorial . "TUTORIAL.de") | 278 | "German" '((tutorial . "TUTORIAL.de") |
| 279 | (charset ascii latin-iso8859-1) | 279 | (charset ascii latin-iso8859-1) |
| 280 | (coding-system iso-latin-1 iso-latin-9) | 280 | (coding-system iso-latin-1 iso-latin-9) |
| 281 | (coding-priority iso-latin-1) | 281 | (coding-priority iso-latin-1 windows-1252) |
| 282 | (input-method . "german-postfix") | 282 | (input-method . "german-postfix") |
| 283 | (nonascii-translation . latin-iso8859-1) | 283 | (nonascii-translation . latin-iso8859-1) |
| 284 | (unibyte-syntax . "latin-1") | 284 | (unibyte-syntax . "latin-1") |
diff --git a/lisp/locate.el b/lisp/locate.el index 5df695d59b9..9cf37e89ee1 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -114,6 +114,7 @@ | |||
| 114 | 114 | ||
| 115 | ;; Variables | 115 | ;; Variables |
| 116 | 116 | ||
| 117 | (defvar locate-current-search nil) | ||
| 117 | (defvar locate-current-filter nil) | 118 | (defvar locate-current-filter nil) |
| 118 | 119 | ||
| 119 | (defgroup locate nil | 120 | (defgroup locate nil |
| @@ -289,29 +290,36 @@ the docstring of that function for its meaning." | |||
| 289 | (run-locate-command | 290 | (run-locate-command |
| 290 | (or (and current-prefix-arg (not locate-prompt-for-command)) | 291 | (or (and current-prefix-arg (not locate-prompt-for-command)) |
| 291 | (and (not current-prefix-arg) locate-prompt-for-command))) | 292 | (and (not current-prefix-arg) locate-prompt-for-command))) |
| 293 | locate-buffer | ||
| 292 | ) | 294 | ) |
| 293 | 295 | ||
| 294 | ;; Find the Locate buffer | 296 | ;; Find the Locate buffer |
| 295 | (save-window-excursion | 297 | (setq locate-buffer (if (eq major-mode 'locate-mode) |
| 296 | (set-buffer (get-buffer-create locate-buffer-name)) | 298 | (current-buffer) |
| 299 | (get-buffer-create locate-buffer-name))) | ||
| 300 | |||
| 301 | (save-excursion | ||
| 302 | (set-buffer locate-buffer) | ||
| 297 | (locate-mode) | 303 | (locate-mode) |
| 304 | |||
| 298 | (let ((inhibit-read-only t) | 305 | (let ((inhibit-read-only t) |
| 299 | (buffer-undo-list t)) | 306 | (buffer-undo-list t)) |
| 300 | (erase-buffer) | 307 | (erase-buffer) |
| 308 | |||
| 309 | (set (make-local-variable 'locate-current-search) search-string) | ||
| 310 | (set (make-local-variable 'locate-current-filter) filter) | ||
| 301 | 311 | ||
| 302 | (setq locate-current-filter filter) | 312 | (if run-locate-command |
| 313 | (shell-command search-string) | ||
| 314 | (apply 'call-process locate-cmd nil t nil locate-cmd-args)) | ||
| 303 | 315 | ||
| 304 | (if run-locate-command | 316 | (and filter |
| 305 | (shell-command search-string locate-buffer-name) | 317 | (locate-filter-output filter)) |
| 306 | (apply 'call-process locate-cmd nil t nil locate-cmd-args)) | ||
| 307 | 318 | ||
| 308 | (and filter | 319 | (locate-do-setup search-string))) |
| 309 | (locate-filter-output filter)) | ||
| 310 | 320 | ||
| 311 | (locate-do-setup search-string) | 321 | (unless (eq (current-buffer) locate-buffer) |
| 312 | )) | 322 | (switch-to-buffer-other-window locate-buffer)) |
| 313 | (and (not (string-equal (buffer-name) locate-buffer-name)) | ||
| 314 | (switch-to-buffer-other-window locate-buffer-name)) | ||
| 315 | 323 | ||
| 316 | (run-hooks 'dired-mode-hook) | 324 | (run-hooks 'dired-mode-hook) |
| 317 | (dired-next-line 3) ;move to first matching file. | 325 | (dired-next-line 3) ;move to first matching file. |
| @@ -461,6 +469,7 @@ do not work in subdirectories. | |||
| 461 | default-directory "/" | 469 | default-directory "/" |
| 462 | buffer-read-only t | 470 | buffer-read-only t |
| 463 | selective-display t) | 471 | selective-display t) |
| 472 | (buffer-disable-undo) | ||
| 464 | (dired-alist-add-1 default-directory (point-min-marker)) | 473 | (dired-alist-add-1 default-directory (point-min-marker)) |
| 465 | (set (make-local-variable 'dired-directory) "/") | 474 | (set (make-local-variable 'dired-directory) "/") |
| 466 | (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) | 475 | (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) |
| @@ -492,11 +501,12 @@ do not work in subdirectories. | |||
| 492 | ;; Nothing returned from locate command? | 501 | ;; Nothing returned from locate command? |
| 493 | (and (eobp) | 502 | (and (eobp) |
| 494 | (progn | 503 | (progn |
| 495 | (kill-buffer locate-buffer-name) | 504 | (let ((filter locate-current-filter)) ; local |
| 496 | (if locate-current-filter | 505 | (kill-buffer (current-buffer)) |
| 497 | (error "Locate: no match for %s in database using filter %s" | 506 | (if filter |
| 498 | search-string locate-current-filter) | 507 | (error "Locate: no match for %s in database using filter %s" |
| 499 | (error "Locate: no match for %s in database" search-string)))) | 508 | search-string filter) |
| 509 | (error "Locate: no match for %s in database" search-string))))) | ||
| 500 | 510 | ||
| 501 | (locate-insert-header search-string) | 511 | (locate-insert-header search-string) |
| 502 | 512 | ||
| @@ -580,15 +590,14 @@ do not work in subdirectories. | |||
| 580 | "Revert the *Locate* buffer. | 590 | "Revert the *Locate* buffer. |
| 581 | If `locate-update-when-revert' is non-nil, offer to update the | 591 | If `locate-update-when-revert' is non-nil, offer to update the |
| 582 | locate database using the shell command in `locate-update-command'." | 592 | locate database using the shell command in `locate-update-command'." |
| 583 | (let ((str (car locate-history-list))) | 593 | (and locate-update-when-revert |
| 584 | (and locate-update-when-revert | 594 | (yes-or-no-p "Update locate database (may take a few seconds)? ") |
| 585 | (yes-or-no-p "Update locate database (may take a few seconds)? ") | 595 | ;; `expand-file-name' is used in order to autoload Tramp if |
| 586 | ;; `expand-file-name' is used in order to autoload Tramp if | 596 | ;; necessary. It cannot be loaded when `default-directory' |
| 587 | ;; necessary. It cannot be loaded when `default-directory' | 597 | ;; is remote. |
| 588 | ;; is remote. | 598 | (let ((default-directory (expand-file-name locate-update-path))) |
| 589 | (let ((default-directory (expand-file-name locate-update-path))) | 599 | (shell-command locate-update-command))) |
| 590 | (shell-command locate-update-command))) | 600 | (locate locate-current-search locate-current-filter)) |
| 591 | (locate str))) | ||
| 592 | 601 | ||
| 593 | ;;; Modified three functions from `dired.el': | 602 | ;;; Modified three functions from `dired.el': |
| 594 | ;;; dired-find-directory, | 603 | ;;; dired-find-directory, |
diff --git a/lisp/longlines.el b/lisp/longlines.el index 77e0b415344..ee469e1be09 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el | |||
| @@ -410,7 +410,7 @@ This is called by `post-command-hook' after each command." | |||
| 410 | 410 | ||
| 411 | (defun longlines-window-change-function () | 411 | (defun longlines-window-change-function () |
| 412 | "Re-wrap the buffer if the window width has changed. | 412 | "Re-wrap the buffer if the window width has changed. |
| 413 | This is called by `window-size-change-functions'." | 413 | This is called by `window-configuration-change-hook'." |
| 414 | (when (/= fill-column (- (window-width) window-min-width)) | 414 | (when (/= fill-column (- (window-width) window-min-width)) |
| 415 | (setq fill-column (- (window-width) window-min-width)) | 415 | (setq fill-column (- (window-width) window-min-width)) |
| 416 | (let ((mod (buffer-modified-p))) | 416 | (let ((mod (buffer-modified-p))) |
diff --git a/lisp/lpr.el b/lisp/lpr.el index 14d1049f074..2c2e8c872c4 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el | |||
| @@ -140,8 +140,9 @@ See definition of `print-region-1' for calling conventions." | |||
| 140 | 140 | ||
| 141 | ;; Berkeley systems support -F, and GNU pr supports both -f and -F, | 141 | ;; Berkeley systems support -F, and GNU pr supports both -f and -F, |
| 142 | ;; So it looks like -F is a better default. | 142 | ;; So it looks like -F is a better default. |
| 143 | (defcustom lpr-page-header-switches '("-F") | 143 | (defcustom lpr-page-header-switches '("-h %s" "-F") |
| 144 | "*List of strings to use as options for the page-header-generating program. | 144 | "*List of strings to use as options for the page-header-generating program. |
| 145 | If `%s' appears in one of the strings, it is substituted by the page title. | ||
| 145 | The variable `lpr-page-header-program' specifies the program to use." | 146 | The variable `lpr-page-header-program' specifies the program to use." |
| 146 | :type '(repeat string) | 147 | :type '(repeat string) |
| 147 | :group 'lpr) | 148 | :group 'lpr) |
| @@ -243,8 +244,8 @@ for further customization of the printer command." | |||
| 243 | (let ((new-coords (print-region-new-buffer start end))) | 244 | (let ((new-coords (print-region-new-buffer start end))) |
| 244 | (apply 'call-process-region (car new-coords) (cdr new-coords) | 245 | (apply 'call-process-region (car new-coords) (cdr new-coords) |
| 245 | lpr-page-header-program t t nil | 246 | lpr-page-header-program t t nil |
| 246 | (nconc (list "-h" title) | 247 | (mapcar (lambda (e) (format e title)) |
| 247 | lpr-page-header-switches))) | 248 | lpr-page-header-switches))) |
| 248 | (setq start (point-min) | 249 | (setq start (point-min) |
| 249 | end (point-max)))) | 250 | end (point-max)))) |
| 250 | (apply (or print-region-function 'call-process-region) | 251 | (apply (or print-region-function 'call-process-region) |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 3bd287541cf..04928fb537b 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -1340,7 +1340,15 @@ complicated cases." | |||
| 1340 | (set-buffer prepped) | 1340 | (set-buffer prepped) |
| 1341 | (apply 'call-process-region | 1341 | (apply 'call-process-region |
| 1342 | (append (list (point-min) (point-max) | 1342 | (append (list (point-min) (point-max) |
| 1343 | (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail") | 1343 | (cond ((boundp 'sendmail-program) |
| 1344 | sendmail-program) | ||
| 1345 | ((file-exists-p "/usr/sbin/sendmail") | ||
| 1346 | "/usr/sbin/sendmail") | ||
| 1347 | ((file-exists-p "/usr/lib/sendmail") | ||
| 1348 | "/usr/lib/sendmail") | ||
| 1349 | ((file-exists-p "/usr/ucblib/sendmail") | ||
| 1350 | "/usr/ucblib/sendmail") | ||
| 1351 | (t "fakemail")) | ||
| 1344 | nil errors-to nil "-oi" "-t") | 1352 | nil errors-to nil "-oi" "-t") |
| 1345 | ;; provide envelope "from" to sendmail; results will vary | 1353 | ;; provide envelope "from" to sendmail; results will vary |
| 1346 | (list "-f" user-mail-address) | 1354 | (list "-f" user-mail-address) |
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index 933e1f6c8a2..bba23111612 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el | |||
| @@ -134,12 +134,11 @@ spam, as one of the fields of `rsf-definitions-alist'" | |||
| 134 | :group 'rmail-spam-filter ) | 134 | :group 'rmail-spam-filter ) |
| 135 | 135 | ||
| 136 | (defcustom rsf-min-region-to-spam-list 7 | 136 | (defcustom rsf-min-region-to-spam-list 7 |
| 137 | "*User may highlight a region in an incomming message and use | 137 | "*Minimum size of region that you can add to the spam list. |
| 138 | the menubar to add this region to the spam definitions. This | 138 | This is a size limit on text that you can specify as |
| 139 | variable specifies the minimum size of region that may be added | 139 | indicating a message is spam. The aim is to avoid |
| 140 | to spam list, to avoid accidentally adding a too short region | 140 | accidentally adding a too short region, which would result |
| 141 | which would result in false positive identification of spam | 141 | in false positive identification of spam." |
| 142 | messages." | ||
| 143 | :type 'integer | 142 | :type 'integer |
| 144 | :group 'rmail-spam-filter ) | 143 | :group 'rmail-spam-filter ) |
| 145 | 144 | ||
| @@ -212,8 +211,8 @@ specify 'this\\&that' in the appropriate spam definition field." | |||
| 212 | :group 'rmail-spam-filter) | 211 | :group 'rmail-spam-filter) |
| 213 | 212 | ||
| 214 | (defvar rsf-scanning-messages-now nil | 213 | (defvar rsf-scanning-messages-now nil |
| 215 | "Non nil when rmail-spam-filter scans messages, | 214 | "Non nil when `rmail-spam-filter' scans messages. |
| 216 | for interaction with `rsf-bbdb-auto-delete-spam-entries'") | 215 | This is for interaction with `rsf-bbdb-auto-delete-spam-entries'.") |
| 217 | 216 | ||
| 218 | ;; the advantage over the automatic filter definitions is the AND conjunction | 217 | ;; the advantage over the automatic filter definitions is the AND conjunction |
| 219 | ;; of in-one-definition-elements | 218 | ;; of in-one-definition-elements |
| @@ -596,8 +595,8 @@ Added to spam definitions as a contents field." | |||
| 596 | (define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) | 595 | (define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) |
| 597 | 596 | ||
| 598 | (defun rsf-add-content-type-field () | 597 | (defun rsf-add-content-type-field () |
| 599 | "Maintain backward compatibility with previous versions of rmail-spam-filter. | 598 | "Maintain backward compatibility for `rmail-spam-filter'. |
| 600 | The most recent version of rmai-spam-filter checks the contents | 599 | The most recent version of `rmail-spam-filter' checks the contents |
| 601 | field of the incoming mail to see if it spam. The format of | 600 | field of the incoming mail to see if it spam. The format of |
| 602 | `rsf-definitions-alist' has therefore changed. This function | 601 | `rsf-definitions-alist' has therefore changed. This function |
| 603 | checks to see if old format is used, and if it is, it converts | 602 | checks to see if old format is used, and if it is, it converts |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 195eb60830c..68dfd9f7ca4 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -623,7 +623,7 @@ the variable `rmail-mime-feature'.") | |||
| 623 | 623 | ||
| 624 | ;;;###autoload | 624 | ;;;###autoload |
| 625 | (defvar rmail-mime-charset-pattern | 625 | (defvar rmail-mime-charset-pattern |
| 626 | (concat "^content-type:[ ]*text/plain;" | 626 | (concat "^content-type:[ \t]*text/plain;" |
| 627 | "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" | 627 | "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" |
| 628 | "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") | 628 | "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") |
| 629 | "Regexp to match MIME-charset specification in a header of message. | 629 | "Regexp to match MIME-charset specification in a header of message. |
| @@ -1677,12 +1677,15 @@ It returns t if it got any new messages." | |||
| 1677 | (if (and (featurep 'rmail-spam-filter) | 1677 | (if (and (featurep 'rmail-spam-filter) |
| 1678 | rmail-use-spam-filter | 1678 | rmail-use-spam-filter |
| 1679 | (> rsf-number-of-spam 0)) | 1679 | (> rsf-number-of-spam 0)) |
| 1680 | (if (= 1 new-messages) | 1680 | (cond ((= 1 new-messages) |
| 1681 | ", and found to be a spam message" | 1681 | ", and appears to be spam") |
| 1682 | (if (> rsf-number-of-spam 1) | 1682 | ((= rsf-number-of-spam new-messages) |
| 1683 | (format ", %d of which found to be spam messages" | 1683 | ", and all appear to be spam") |
| 1684 | rsf-number-of-spam) | 1684 | ((> rsf-number-of-spam 1) |
| 1685 | ", one of which found to be a spam message")) | 1685 | (format ", and %d appear to be spam" |
| 1686 | rsf-number-of-spam)) | ||
| 1687 | (t | ||
| 1688 | ", and 1 appears to be spam")) | ||
| 1686 | "")) | 1689 | "")) |
| 1687 | (if (and (featurep 'rmail-spam-filter) | 1690 | (if (and (featurep 'rmail-spam-filter) |
| 1688 | rmail-use-spam-filter | 1691 | rmail-use-spam-filter |
| @@ -1900,6 +1903,7 @@ is non-nil if the user has supplied the password interactively. | |||
| 1900 | (defun rmail-convert-to-babyl-format () | 1903 | (defun rmail-convert-to-babyl-format () |
| 1901 | (let ((count 0) start | 1904 | (let ((count 0) start |
| 1902 | (case-fold-search nil) | 1905 | (case-fold-search nil) |
| 1906 | (buffer-undo-list t) | ||
| 1903 | (invalid-input-resync | 1907 | (invalid-input-resync |
| 1904 | (function (lambda () | 1908 | (function (lambda () |
| 1905 | (message "Invalid Babyl format in inbox!") | 1909 | (message "Invalid Babyl format in inbox!") |
| @@ -2173,6 +2177,7 @@ is non-nil if the user has supplied the password interactively. | |||
| 2173 | ;; may still be in use. -- rms, 7 May 1993. | 2177 | ;; may still be in use. -- rms, 7 May 1993. |
| 2174 | ((eolp) (delete-char 1)) | 2178 | ((eolp) (delete-char 1)) |
| 2175 | (t (error "Cannot convert to babyl format"))))) | 2179 | (t (error "Cannot convert to babyl format"))))) |
| 2180 | (setq buffer-undo-list nil) | ||
| 2176 | count)) | 2181 | count)) |
| 2177 | 2182 | ||
| 2178 | ;; Delete the "From ..." line, creating various other headers with | 2183 | ;; Delete the "From ..." line, creating various other headers with |
| @@ -2870,6 +2875,12 @@ iso-8859, koi8-r, etc." | |||
| 2870 | (coding-system-change-eol-conversion | 2875 | (coding-system-change-eol-conversion |
| 2871 | coding | 2876 | coding |
| 2872 | (coding-system-eol-type old-coding))) | 2877 | (coding-system-eol-type old-coding))) |
| 2878 | ;; If old-coding is `undecided', encode-coding-region | ||
| 2879 | ;; will not encode the text at all. Find a proper | ||
| 2880 | ;; non-trivial encoding to use. | ||
| 2881 | (if (memq (coding-system-base old-coding) '(nil undecided)) | ||
| 2882 | (setq old-coding | ||
| 2883 | (car (find-coding-systems-region msgbeg msgend)))) | ||
| 2873 | (setq x-coding-header (point-marker)) | 2884 | (setq x-coding-header (point-marker)) |
| 2874 | (narrow-to-region msgbeg msgend) | 2885 | (narrow-to-region msgbeg msgend) |
| 2875 | (encode-coding-region (point) msgend old-coding) | 2886 | (encode-coding-region (point) msgend old-coding) |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 28463208c45..288e5bd0df3 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -48,6 +48,16 @@ | |||
| 48 | :group 'sendmail | 48 | :group 'sendmail |
| 49 | :version "22.1") | 49 | :version "22.1") |
| 50 | 50 | ||
| 51 | (defcustom sendmail-program | ||
| 52 | (cond | ||
| 53 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | ||
| 54 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | ||
| 55 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | ||
| 56 | (t "fakemail")) ;In ../etc, to interface to /bin/mail. | ||
| 57 | "Program used to send messages." | ||
| 58 | :group 'mail | ||
| 59 | :type 'file) | ||
| 60 | |||
| 51 | ;;;###autoload | 61 | ;;;###autoload |
| 52 | (defcustom mail-from-style 'angles | 62 | (defcustom mail-from-style 'angles |
| 53 | "Specifies how \"From:\" fields look. | 63 | "Specifies how \"From:\" fields look. |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index ff38cd25ff8..9557844a32a 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -176,7 +176,12 @@ looks like `user@realm'." | |||
| 176 | (defcustom smtpmail-starttls-credentials '(("" 25 "" "")) | 176 | (defcustom smtpmail-starttls-credentials '(("" 25 "" "")) |
| 177 | "Specify STARTTLS keys and certificates for servers. | 177 | "Specify STARTTLS keys and certificates for servers. |
| 178 | This is a list of four-element list with `servername' (a string), | 178 | This is a list of four-element list with `servername' (a string), |
| 179 | `port' (an integer), `key' (a filename) and `certificate' (a filename)." | 179 | `port' (an integer), `key' (a filename) and `certificate' (a |
| 180 | filename). | ||
| 181 | If you do not have a certificate/key pair, leave the `key' and | ||
| 182 | `certificate' fields as `nil'. A key/certificate pair is only | ||
| 183 | needed if you want to use X.509 client authenticated | ||
| 184 | connections." | ||
| 180 | :type '(repeat (list (string :tag "Server") | 185 | :type '(repeat (list (string :tag "Server") |
| 181 | (integer :tag "Port") | 186 | (integer :tag "Port") |
| 182 | (file :tag "Key") | 187 | (file :tag "Key") |
| @@ -536,7 +541,7 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 536 | (decoded (base64-decode-string challenge)) | 541 | (decoded (base64-decode-string challenge)) |
| 537 | (hash (rfc2104-hash 'md5 64 16 passwd decoded)) | 542 | (hash (rfc2104-hash 'md5 64 16 passwd decoded)) |
| 538 | (response (concat (smtpmail-cred-user cred) " " hash)) | 543 | (response (concat (smtpmail-cred-user cred) " " hash)) |
| 539 | (encoded (base64-encode-string response))) | 544 | (encoded (base64-encode-string response t))) |
| 540 | (smtpmail-send-command process (format "%s" encoded)) | 545 | (smtpmail-send-command process (format "%s" encoded)) |
| 541 | (if (or (null (car (setq ret (smtpmail-read-response process)))) | 546 | (if (or (null (car (setq ret (smtpmail-read-response process)))) |
| 542 | (not (integerp (car ret))) | 547 | (not (integerp (car ret))) |
| @@ -549,12 +554,12 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 549 | (>= (car ret) 400)) | 554 | (>= (car ret) 400)) |
| 550 | (throw 'done nil)) | 555 | (throw 'done nil)) |
| 551 | (smtpmail-send-command | 556 | (smtpmail-send-command |
| 552 | process (base64-encode-string (smtpmail-cred-user cred))) | 557 | process (base64-encode-string (smtpmail-cred-user cred) t)) |
| 553 | (if (or (null (car (setq ret (smtpmail-read-response process)))) | 558 | (if (or (null (car (setq ret (smtpmail-read-response process)))) |
| 554 | (not (integerp (car ret))) | 559 | (not (integerp (car ret))) |
| 555 | (>= (car ret) 400)) | 560 | (>= (car ret) 400)) |
| 556 | (throw 'done nil)) | 561 | (throw 'done nil)) |
| 557 | (smtpmail-send-command process (base64-encode-string passwd)) | 562 | (smtpmail-send-command process (base64-encode-string passwd t)) |
| 558 | (if (or (null (car (setq ret (smtpmail-read-response process)))) | 563 | (if (or (null (car (setq ret (smtpmail-read-response process)))) |
| 559 | (not (integerp (car ret))) | 564 | (not (integerp (car ret))) |
| 560 | (>= (car ret) 400)) | 565 | (>= (car ret) 400)) |
| @@ -571,7 +576,7 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 571 | (concat "\0" | 576 | (concat "\0" |
| 572 | (smtpmail-cred-user cred) | 577 | (smtpmail-cred-user cred) |
| 573 | "\0" | 578 | "\0" |
| 574 | passwd)))) | 579 | passwd) t))) |
| 575 | (if (or (null (car (setq ret (smtpmail-read-response process)))) | 580 | (if (or (null (car (setq ret (smtpmail-read-response process)))) |
| 576 | (not (integerp (car ret))) | 581 | (not (integerp (car ret))) |
| 577 | (not (equal (car ret) 235))) | 582 | (not (equal (car ret) 235))) |
diff --git a/lisp/man.el b/lisp/man.el index 77c089b9d8d..2351853eeca 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -388,6 +388,8 @@ Otherwise, the value is whatever the function | |||
| 388 | /\e\\[[0-9][0-9]*m/ s///g" | 388 | /\e\\[[0-9][0-9]*m/ s///g" |
| 389 | "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.") | 389 | "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.") |
| 390 | 390 | ||
| 391 | (defvar Man-topic-history nil "Topic read history.") | ||
| 392 | |||
| 391 | (defvar man-mode-syntax-table | 393 | (defvar man-mode-syntax-table |
| 392 | (let ((table (copy-syntax-table (standard-syntax-table)))) | 394 | (let ((table (copy-syntax-table (standard-syntax-table)))) |
| 393 | (modify-syntax-entry ?. "w" table) | 395 | (modify-syntax-entry ?. "w" table) |
| @@ -686,7 +688,7 @@ all sections related to a subject, put something appropriate into the | |||
| 686 | (if (string= default-entry "") | 688 | (if (string= default-entry "") |
| 687 | ": " | 689 | ": " |
| 688 | (format " (default %s): " default-entry))) | 690 | (format " (default %s): " default-entry))) |
| 689 | nil nil default-entry))) | 691 | nil 'Man-topic-history default-entry))) |
| 690 | (if (string= input "") | 692 | (if (string= input "") |
| 691 | (error "No man args given") | 693 | (error "No man args given") |
| 692 | input)))) | 694 | input)))) |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index b3909559d03..642149baaf7 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -510,7 +510,7 @@ A large number or nil slows down menu responsiveness." | |||
| 510 | 510 | ||
| 511 | (defun clipboard-yank () | 511 | (defun clipboard-yank () |
| 512 | "Insert the clipboard contents, or the last stretch of killed text." | 512 | "Insert the clipboard contents, or the last stretch of killed text." |
| 513 | (interactive) | 513 | (interactive "*") |
| 514 | (let ((x-select-enable-clipboard t)) | 514 | (let ((x-select-enable-clipboard t)) |
| 515 | (yank))) | 515 | (yank))) |
| 516 | 516 | ||
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index a49e3b2a4a3..76875b2849b 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2006-09-25 Stephen Gildea <gildea@stop.mail-abuse.org> | ||
| 2 | |||
| 3 | * mh-junk.el (mh-spamassassin-whitelist): Add two missing | ||
| 4 | quotation marks, so that the last two arguments of sa-learn | ||
| 5 | are separated properly (closes SF #1565460). | ||
| 6 | |||
| 7 | * (mh-spamassassin-blacklist): In example .procmailrc, add | ||
| 8 | PATH element to find mhparam on Debian. | ||
| 9 | |||
| 10 | 2006-09-24 Stephen Gildea <gildea@stop.mail-abuse.org> | ||
| 11 | |||
| 12 | * mh-comp.el (mh-send-args): Initialize to "" instead of nil | ||
| 13 | so that we always have a valid string for split-string even if | ||
| 14 | nothing is added in mh-send-letter (closes SF #1564742). | ||
| 15 | |||
| 1 | 2006-07-03 Bill Wohler <wohler@newt.com> | 16 | 2006-07-03 Bill Wohler <wohler@newt.com> |
| 2 | 17 | ||
| 3 | Release MH-E version 8.0.2. | 18 | Release MH-E version 8.0.2. |
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 7156b0cf318..a967a2c8d9e 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el | |||
| @@ -127,7 +127,7 @@ Used by the \\[mh-edit-again] and \\[mh-extract-rejected-mail] commands.") | |||
| 127 | (make-syntax-table text-mode-syntax-table)) | 127 | (make-syntax-table text-mode-syntax-table)) |
| 128 | (modify-syntax-entry ?% "." mh-letter-mode-syntax-table)) | 128 | (modify-syntax-entry ?% "." mh-letter-mode-syntax-table)) |
| 129 | 129 | ||
| 130 | (defvar mh-send-args nil | 130 | (defvar mh-send-args "" |
| 131 | "Extra args to pass to \"send\" command.") | 131 | "Extra args to pass to \"send\" command.") |
| 132 | 132 | ||
| 133 | (defvar mh-annotate-char nil | 133 | (defvar mh-annotate-char nil |
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 9d02db0dc11..67f267d672f 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el | |||
| @@ -115,6 +115,9 @@ http://spamassassin.org/. | |||
| 115 | To use SpamAssassin, add the following recipes to | 115 | To use SpamAssassin, add the following recipes to |
| 116 | \".procmailrc\": | 116 | \".procmailrc\": |
| 117 | 117 | ||
| 118 | # Append to $PATH the location of mhparam in some distros. | ||
| 119 | PATH=$PATH:/usr/bin/mh | ||
| 120 | |||
| 118 | MAILDIR=$HOME/`mhparam Path` | 121 | MAILDIR=$HOME/`mhparam Path` |
| 119 | 122 | ||
| 120 | # Fight spam with SpamAssassin. | 123 | # Fight spam with SpamAssassin. |
| @@ -244,7 +247,7 @@ See `mh-spamassassin-blacklist' for more information." | |||
| 244 | (when mh-sa-learn-executable | 247 | (when mh-sa-learn-executable |
| 245 | (message "Recategorizing this message as ham...") | 248 | (message "Recategorizing this message as ham...") |
| 246 | (call-process mh-sa-learn-executable msg-file mh-temp-buffer nil | 249 | (call-process mh-sa-learn-executable msg-file mh-temp-buffer nil |
| 247 | "--single" "--ham" "--local --no-rebuild")) | 250 | "--single" "--ham" "--local" "--no-rebuild")) |
| 248 | (message "Whitelisting message %d..." msg) | 251 | (message "Whitelisting message %d..." msg) |
| 249 | (setq from | 252 | (setq from |
| 250 | (car (mh-funcall-if-exists | 253 | (car (mh-funcall-if-exists |
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el index a64dabaec81..a1209f827f1 100644 --- a/lisp/mouse-sel.el +++ b/lisp/mouse-sel.el | |||
| @@ -702,7 +702,7 @@ Sel mode does not support using a `double' value to follow links | |||
| 702 | using double-clicks." | 702 | using double-clicks." |
| 703 | (and initial final mouse-1-click-follows-link | 703 | (and initial final mouse-1-click-follows-link |
| 704 | (eq (car initial) 'down-mouse-1) | 704 | (eq (car initial) 'down-mouse-1) |
| 705 | (mouse-on-link-p (posn-point (event-start initial))) | 705 | (mouse-on-link-p (event-start initial)) |
| 706 | (= (posn-point (event-start initial)) | 706 | (= (posn-point (event-start initial)) |
| 707 | (posn-point (event-end final))) | 707 | (posn-point (event-end final))) |
| 708 | (= (event-click-count initial) 1) | 708 | (= (event-click-count initial) 1) |
| @@ -737,7 +737,8 @@ If `mouse-yank-at-point' is non-nil, insert at point instead." | |||
| 737 | (mouse-set-point event)) | 737 | (mouse-set-point event)) |
| 738 | (when mouse-sel-get-selection-function | 738 | (when mouse-sel-get-selection-function |
| 739 | (push-mark (point) 'nomsg) | 739 | (push-mark (point) 'nomsg) |
| 740 | (insert (or (funcall mouse-sel-get-selection-function selection) "")))) | 740 | (insert-for-yank |
| 741 | (or (funcall mouse-sel-get-selection-function selection) "")))) | ||
| 741 | 742 | ||
| 742 | ;;=== Handle loss of selections =========================================== | 743 | ;;=== Handle loss of selections =========================================== |
| 743 | 744 | ||
diff --git a/lisp/mouse.el b/lisp/mouse.el index 4e11b1d4c96..0b6cccd86c6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -556,7 +556,7 @@ resized by dragging their header-line." | |||
| 556 | (echo-keystrokes 0) | 556 | (echo-keystrokes 0) |
| 557 | (start-event-frame (window-frame (car (car (cdr start-event))))) | 557 | (start-event-frame (window-frame (car (car (cdr start-event))))) |
| 558 | (start-event-window (car (car (cdr start-event)))) | 558 | (start-event-window (car (car (cdr start-event)))) |
| 559 | event mouse x left right edges wconfig growth | 559 | event mouse x left right edges growth |
| 560 | (which-side | 560 | (which-side |
| 561 | (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) | 561 | (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) |
| 562 | 'right))) | 562 | 'right))) |
| @@ -775,6 +775,24 @@ If the click is in the echo area, display the `*Messages*' buffer." | |||
| 775 | (mouse-drag-track start-event t)))) | 775 | (mouse-drag-track start-event t)))) |
| 776 | 776 | ||
| 777 | 777 | ||
| 778 | (defun mouse-posn-property (pos property) | ||
| 779 | "Look for a property at click position. | ||
| 780 | POS may be either a buffer position or a click position like | ||
| 781 | those returned from `event-start'. If the click position is on | ||
| 782 | a string, the text property PROPERTY is examined. | ||
| 783 | If this is nil or the click is not on a string, then | ||
| 784 | the corresponding buffer position is searched for PROPERTY. | ||
| 785 | If PROPERTY is encountered in one of those places, | ||
| 786 | its value is returned." | ||
| 787 | (if (consp pos) | ||
| 788 | (let ((w (posn-window pos)) (pt (posn-point pos)) | ||
| 789 | (str (posn-string pos))) | ||
| 790 | (or (and str | ||
| 791 | (get-text-property (cdr str) property (car str))) | ||
| 792 | (and pt | ||
| 793 | (get-char-property pt property w)))) | ||
| 794 | (get-char-property pos property))) | ||
| 795 | |||
| 778 | (defun mouse-on-link-p (pos) | 796 | (defun mouse-on-link-p (pos) |
| 779 | "Return non-nil if POS is on a link in the current buffer. | 797 | "Return non-nil if POS is on a link in the current buffer. |
| 780 | POS must be a buffer position in the current buffer or a mouse | 798 | POS must be a buffer position in the current buffer or a mouse |
| @@ -814,24 +832,23 @@ click is the local or global binding of that event. | |||
| 814 | 832 | ||
| 815 | - Otherwise, the mouse-1 event is translated into a mouse-2 event | 833 | - Otherwise, the mouse-1 event is translated into a mouse-2 event |
| 816 | at the same position." | 834 | at the same position." |
| 817 | (let ((w (and (consp pos) (posn-window pos)))) | 835 | (let ((action |
| 818 | (if (consp pos) | 836 | (and (or (not (consp pos)) |
| 819 | (setq pos (and (or mouse-1-click-in-non-selected-windows | 837 | mouse-1-click-in-non-selected-windows |
| 820 | (eq (selected-window) w)) | 838 | (eq (selected-window) (posn-window pos))) |
| 821 | (posn-point pos)))) | 839 | (or (mouse-posn-property pos 'follow-link) |
| 822 | (when pos | 840 | (key-binding [follow-link] nil t pos))))) |
| 823 | (with-current-buffer (window-buffer w) | 841 | (cond |
| 824 | (let ((action | 842 | ((eq action 'mouse-face) |
| 825 | (or (get-char-property pos 'follow-link) | 843 | (and (mouse-posn-property pos 'mouse-face) t)) |
| 826 | (save-excursion | 844 | ((functionp action) |
| 827 | (goto-char pos) | 845 | ;; FIXME: This seems questionable if the click is not in a buffer. |
| 828 | (key-binding [follow-link] nil t))))) | 846 | ;; Should we instead decide that `action' takes a `posn'? |
| 829 | (cond | 847 | (if (consp pos) |
| 830 | ((eq action 'mouse-face) | 848 | (with-current-buffer (window-buffer (posn-window pos)) |
| 831 | (and (get-char-property pos 'mouse-face) t)) | 849 | (funcall action (posn-point pos))) |
| 832 | ((functionp action) | 850 | (funcall action pos))) |
| 833 | (funcall action pos)) | 851 | (t action)))) |
| 834 | (t action))))))) | ||
| 835 | 852 | ||
| 836 | (defun mouse-fixup-help-message (msg) | 853 | (defun mouse-fixup-help-message (msg) |
| 837 | "Fix help message MSG for `mouse-1-click-follows-link'." | 854 | "Fix help message MSG for `mouse-1-click-follows-link'." |
| @@ -904,7 +921,7 @@ should only be used by mouse-drag-region." | |||
| 904 | ;; Use start-point before the intangibility | 921 | ;; Use start-point before the intangibility |
| 905 | ;; treatment, in case we click on a link inside an | 922 | ;; treatment, in case we click on a link inside an |
| 906 | ;; intangible text. | 923 | ;; intangible text. |
| 907 | (mouse-on-link-p start-point))) | 924 | (mouse-on-link-p start-posn))) |
| 908 | (click-count (1- (event-click-count start-event))) | 925 | (click-count (1- (event-click-count start-event))) |
| 909 | (remap-double-click (and on-link | 926 | (remap-double-click (and on-link |
| 910 | (eq mouse-1-click-follows-link 'double) | 927 | (eq mouse-1-click-follows-link 'double) |
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 2a63615a602..18b96a7cce1 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el | |||
| @@ -490,9 +490,11 @@ to try to connect to. Each host name may optionally be of the form HOST:PORT. | |||
| 490 | for each matching entry. If nil, return all available attributes. | 490 | for each matching entry. If nil, return all available attributes. |
| 491 | `attrsonly', if non-nil, indicates that only attributes are retrieved, | 491 | `attrsonly', if non-nil, indicates that only attributes are retrieved, |
| 492 | not their associated values. | 492 | not their associated values. |
| 493 | `auth' is one of the symbols `simple', `krbv41' or `krbv42'. | ||
| 493 | `base' is the base for the search as described in RFC 1779. | 494 | `base' is the base for the search as described in RFC 1779. |
| 494 | `scope' is one of the three symbols `sub', `base' or `one'. | 495 | `scope' is one of the three symbols `sub', `base' or `one'. |
| 495 | `binddn' is the distinguished name of the user to bind as (in RFC 1779 syntax). | 496 | `binddn' is the distinguished name of the user to bind as (in RFC 1779 syntax). |
| 497 | `auth' is one of the symbols `simple', `krbv41' or `krbv42' | ||
| 496 | `passwd' is the password to use for simple authentication. | 498 | `passwd' is the password to use for simple authentication. |
| 497 | `deref' is one of the symbols `never', `always', `search' or `find'. | 499 | `deref' is one of the symbols `never', `always', `search' or `find'. |
| 498 | `timelimit' is the timeout limit for the connection in seconds. | 500 | `timelimit' is the timeout limit for the connection in seconds. |
| @@ -512,6 +514,7 @@ an alist of attribute/value pairs." | |||
| 512 | ldap-default-base)) | 514 | ldap-default-base)) |
| 513 | (scope (plist-get search-plist 'scope)) | 515 | (scope (plist-get search-plist 'scope)) |
| 514 | (binddn (plist-get search-plist 'binddn)) | 516 | (binddn (plist-get search-plist 'binddn)) |
| 517 | (auth (plist-get search-plist 'auth)) | ||
| 515 | (passwd (plist-get search-plist 'passwd)) | 518 | (passwd (plist-get search-plist 'passwd)) |
| 516 | (deref (plist-get search-plist 'deref)) | 519 | (deref (plist-get search-plist 'deref)) |
| 517 | (timelimit (plist-get search-plist 'timelimit)) | 520 | (timelimit (plist-get search-plist 'timelimit)) |
| @@ -541,6 +544,9 @@ an alist of attribute/value pairs." | |||
| 541 | (if (and binddn | 544 | (if (and binddn |
| 542 | (not (equal "" binddn))) | 545 | (not (equal "" binddn))) |
| 543 | (setq arglist (nconc arglist (list (format "-D%s" binddn))))) | 546 | (setq arglist (nconc arglist (list (format "-D%s" binddn))))) |
| 547 | (if (and auth | ||
| 548 | (equal 'simple auth)) | ||
| 549 | (setq arglist (nconc arglist (list "-x")))) | ||
| 544 | (if (and passwd | 550 | (if (and passwd |
| 545 | (not (equal "" passwd))) | 551 | (not (equal "" passwd))) |
| 546 | (setq arglist (nconc arglist (list (format "-w%s" passwd))))) | 552 | (setq arglist (nconc arglist (list (format "-w%s" passwd))))) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index c34ac7dcf78..a639afeecf8 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -142,9 +142,11 @@ number. If zero or nil, no truncating is done." | |||
| 142 | (integer :tag "Number of lines")) | 142 | (integer :tag "Number of lines")) |
| 143 | :group 'rcirc) | 143 | :group 'rcirc) |
| 144 | 144 | ||
| 145 | (defcustom rcirc-show-maximum-output t | 145 | (defcustom rcirc-scroll-show-maximum-output t |
| 146 | "*If non-nil, scroll buffer to keep the point at the bottom of | 146 | "*If non-nil, scroll buffer to keep the point at the bottom of |
| 147 | the window.") | 147 | the window." |
| 148 | :type 'boolean | ||
| 149 | :group 'rcirc) | ||
| 148 | 150 | ||
| 149 | (defcustom rcirc-authinfo nil | 151 | (defcustom rcirc-authinfo nil |
| 150 | "List of authentication passwords. | 152 | "List of authentication passwords. |
| @@ -200,6 +202,11 @@ use either M-x customize or also call `rcirc-update-prompt'." | |||
| 200 | :initialize 'custom-initialize-default | 202 | :initialize 'custom-initialize-default |
| 201 | :group 'rcirc) | 203 | :group 'rcirc) |
| 202 | 204 | ||
| 205 | (defcustom rcirc-keywords nil | ||
| 206 | "List of keywords to highlight in message text." | ||
| 207 | :type '(repeat string) | ||
| 208 | :group 'rcirc) | ||
| 209 | |||
| 203 | (defcustom rcirc-ignore-list () | 210 | (defcustom rcirc-ignore-list () |
| 204 | "List of ignored nicks. | 211 | "List of ignored nicks. |
| 205 | Use /ignore to list them, use /ignore NICK to add or remove a nick." | 212 | Use /ignore to list them, use /ignore NICK to add or remove a nick." |
| @@ -212,16 +219,16 @@ When an ignored person renames, their nick is added to both lists. | |||
| 212 | Nicks will be removed from the automatic list on follow-up renamings or | 219 | Nicks will be removed from the automatic list on follow-up renamings or |
| 213 | parts.") | 220 | parts.") |
| 214 | 221 | ||
| 215 | (defcustom rcirc-bright-nick-regexp nil | 222 | (defcustom rcirc-bright-nicks nil |
| 216 | "Regexp matching nicks to be emphasized. | 223 | "List of nicks to be emphasized. |
| 217 | See `rcirc-bright-nick' face." | 224 | See `rcirc-bright-nick' face." |
| 218 | :type 'regexp | 225 | :type '(repeat string) |
| 219 | :group 'rcirc) | 226 | :group 'rcirc) |
| 220 | 227 | ||
| 221 | (defcustom rcirc-dim-nick-regexp nil | 228 | (defcustom rcirc-dim-nicks nil |
| 222 | "Regexp matching nicks to be deemphasized. | 229 | "List of nicks to be deemphasized. |
| 223 | See `rcirc-dim-nick' face." | 230 | See `rcirc-dim-nick' face." |
| 224 | :type 'regexp | 231 | :type '(repeat string) |
| 225 | :group 'rcirc) | 232 | :group 'rcirc) |
| 226 | 233 | ||
| 227 | (defcustom rcirc-print-hooks nil | 234 | (defcustom rcirc-print-hooks nil |
| @@ -246,7 +253,7 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." | |||
| 246 | :group 'rcirc) | 253 | :group 'rcirc) |
| 247 | 254 | ||
| 248 | (defcustom rcirc-coding-system-alist nil | 255 | (defcustom rcirc-coding-system-alist nil |
| 249 | "Alist to decide a coding system to use for a file I/O operation. | 256 | "Alist to decide a coding system to use for a channel I/O operation. |
| 250 | The format is ((PATTERN . VAL) ...). | 257 | The format is ((PATTERN . VAL) ...). |
| 251 | PATTERN is either a string or a cons of strings. | 258 | PATTERN is either a string or a cons of strings. |
| 252 | If PATTERN is a string, it is used to match a target. | 259 | If PATTERN is a string, it is used to match a target. |
| @@ -528,10 +535,14 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") | |||
| 528 | process cmd sender args text))) | 535 | process cmd sender args text))) |
| 529 | (message "UNHANDLED: %s" text))) | 536 | (message "UNHANDLED: %s" text))) |
| 530 | 537 | ||
| 531 | (defun rcirc-handler-generic (process command sender args text) | 538 | (defvar rcirc-responses-no-activity '("305" "306") |
| 539 | "Responses that don't trigger activity in the mode-line indicator.") | ||
| 540 | |||
| 541 | (defun rcirc-handler-generic (process response sender args text) | ||
| 532 | "Generic server response handler." | 542 | "Generic server response handler." |
| 533 | (rcirc-print process sender command nil | 543 | (rcirc-print process sender response nil |
| 534 | (mapconcat 'identity (cdr args) " ") t)) | 544 | (mapconcat 'identity (cdr args) " ") |
| 545 | (not (member response rcirc-responses-no-activity)))) | ||
| 535 | 546 | ||
| 536 | (defun rcirc-send-string (process string) | 547 | (defun rcirc-send-string (process string) |
| 537 | "Send PROCESS a STRING plus a newline." | 548 | "Send PROCESS a STRING plus a newline." |
| @@ -748,13 +759,8 @@ If NOTICEP is non-nil, send a notice instead of privmsg." | |||
| 748 | 759 | ||
| 749 | ;; if the user changes the major mode or kills the buffer, there is | 760 | ;; if the user changes the major mode or kills the buffer, there is |
| 750 | ;; cleanup work to do | 761 | ;; cleanup work to do |
| 751 | (make-local-variable 'change-major-mode-hook) | 762 | (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook nil t) |
| 752 | (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook) | 763 | (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook nil t) |
| 753 | (make-local-variable 'kill-buffer-hook) | ||
| 754 | (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook) | ||
| 755 | |||
| 756 | (make-local-variable 'window-scroll-functions) | ||
| 757 | (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom) | ||
| 758 | 764 | ||
| 759 | ;; add to buffer list, and update buffer abbrevs | 765 | ;; add to buffer list, and update buffer abbrevs |
| 760 | (when target ; skip server buffer | 766 | (when target ; skip server buffer |
| @@ -941,7 +947,7 @@ Create the buffer if it doesn't exist." | |||
| 941 | (if (fboundp fun) | 947 | (if (fboundp fun) |
| 942 | (funcall fun args process rcirc-target) | 948 | (funcall fun args process rcirc-target) |
| 943 | (rcirc-send-string process | 949 | (rcirc-send-string process |
| 944 | (concat command " " args))))))) | 950 | (concat command " :" args))))))) |
| 945 | 951 | ||
| 946 | (defvar rcirc-parent-buffer nil) | 952 | (defvar rcirc-parent-buffer nil) |
| 947 | (defvar rcirc-window-configuration nil) | 953 | (defvar rcirc-window-configuration nil) |
| @@ -1073,7 +1079,8 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1073 | "%") | 1079 | "%") |
| 1074 | ((or (eq key ?n) (eq key ?N)) | 1080 | ((or (eq key ?n) (eq key ?N)) |
| 1075 | ;; %n/%N -- nick | 1081 | ;; %n/%N -- nick |
| 1076 | (let ((nick (concat (if (string= (with-rcirc-process-buffer process | 1082 | (let ((nick (concat (if (string= (with-rcirc-process-buffer |
| 1083 | process | ||
| 1077 | rcirc-server) | 1084 | rcirc-server) |
| 1078 | sender) | 1085 | sender) |
| 1079 | "" | 1086 | "" |
| @@ -1084,26 +1091,26 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1084 | face | 1091 | face |
| 1085 | (cond ((string= sender (rcirc-nick process)) | 1092 | (cond ((string= sender (rcirc-nick process)) |
| 1086 | 'rcirc-my-nick) | 1093 | 'rcirc-my-nick) |
| 1087 | ((and rcirc-bright-nick-regexp | 1094 | ((and rcirc-bright-nicks |
| 1088 | (string-match rcirc-bright-nick-regexp sender)) | 1095 | (string-match |
| 1096 | (regexp-opt rcirc-bright-nicks) | ||
| 1097 | sender)) | ||
| 1089 | 'rcirc-bright-nick) | 1098 | 'rcirc-bright-nick) |
| 1090 | ((and rcirc-dim-nick-regexp | 1099 | ((and rcirc-dim-nicks |
| 1091 | (string-match rcirc-dim-nick-regexp sender)) | 1100 | (string-match |
| 1101 | (regexp-opt rcirc-dim-nicks) | ||
| 1102 | sender)) | ||
| 1092 | 'rcirc-dim-nick) | 1103 | 'rcirc-dim-nick) |
| 1093 | (t | 1104 | (t |
| 1094 | 'rcirc-other-nick)))))) | 1105 | 'rcirc-other-nick)))))) |
| 1095 | ((eq key ?T) | 1106 | ((eq key ?T) |
| 1096 | ;; %T -- timestamp | 1107 | ;; %T -- timestamp |
| 1097 | (rcirc-facify | 1108 | (rcirc-facify |
| 1098 | (format-time-string rcirc-time-format (current-time)) | 1109 | (format-time-string rcirc-time-format (current-time)) |
| 1099 | 'rcirc-timestamp)) | 1110 | 'rcirc-timestamp)) |
| 1100 | ((eq key ?m) | 1111 | ((eq key ?m) |
| 1101 | ;; %m -- message text | 1112 | ;; %m -- message text |
| 1102 | ;; We add the text property `rcirc-text' to identify this | 1113 | (rcirc-markup-text process sender response (rcirc-facify text face))) |
| 1103 | ;; as the body text. | ||
| 1104 | (propertize | ||
| 1105 | (rcirc-mangle-text process (rcirc-facify text face)) | ||
| 1106 | 'rcirc-text text)) | ||
| 1107 | ((eq key ?t) | 1114 | ((eq key ?t) |
| 1108 | ;; %t -- target | 1115 | ;; %t -- target |
| 1109 | (rcirc-facify (or rcirc-target "") face)) | 1116 | (rcirc-facify (or rcirc-target "") face)) |
| @@ -1152,20 +1159,10 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1152 | ((or (rcirc-get-buffer process target) | 1159 | ((or (rcirc-get-buffer process target) |
| 1153 | (rcirc-any-buffer process)))))) | 1160 | (rcirc-any-buffer process)))))) |
| 1154 | 1161 | ||
| 1155 | (defvar rcirc-activity-type nil) | 1162 | (defvar rcirc-activity-types nil) |
| 1156 | (make-variable-buffer-local 'rcirc-activity-type) | 1163 | (make-variable-buffer-local 'rcirc-activity-types) |
| 1157 | (defvar rcirc-last-sender nil) | 1164 | (defvar rcirc-last-sender nil) |
| 1158 | (make-variable-buffer-local 'rcirc-last-sender) | 1165 | (make-variable-buffer-local 'rcirc-last-sender) |
| 1159 | (defvar rcirc-gray-toggle nil) | ||
| 1160 | (make-variable-buffer-local 'rcirc-gray-toggle) | ||
| 1161 | |||
| 1162 | (defun rcirc-scroll-to-bottom (window display-start) | ||
| 1163 | "Scroll window to show maximum output if `rcirc-show-maximum-output' is | ||
| 1164 | non-nil." | ||
| 1165 | (when rcirc-show-maximum-output | ||
| 1166 | (with-selected-window window | ||
| 1167 | (when (>= (window-point) rcirc-prompt-end-marker) | ||
| 1168 | (recenter -1))))) | ||
| 1169 | 1166 | ||
| 1170 | (defun rcirc-print (process sender response target text &optional activity) | 1167 | (defun rcirc-print (process sender response target text &optional activity) |
| 1171 | "Print TEXT in the buffer associated with TARGET. | 1168 | "Print TEXT in the buffer associated with TARGET. |
| @@ -1245,42 +1242,45 @@ record activity." | |||
| 1245 | 1242 | ||
| 1246 | ;; set the window point for buffers show in windows | 1243 | ;; set the window point for buffers show in windows |
| 1247 | (walk-windows (lambda (w) | 1244 | (walk-windows (lambda (w) |
| 1248 | (unless (eq (selected-window) w) | 1245 | (when (and (not (eq (selected-window) w)) |
| 1249 | (when (and (eq (current-buffer) | 1246 | (eq (current-buffer) |
| 1250 | (window-buffer w)) | 1247 | (window-buffer w)) |
| 1251 | (>= (window-point w) | 1248 | (>= (window-point w) |
| 1252 | rcirc-prompt-end-marker)) | 1249 | rcirc-prompt-end-marker)) |
| 1253 | (set-window-point w (point-max))))) | 1250 | (set-window-point w (point-max)))) |
| 1254 | nil t) | 1251 | nil t) |
| 1255 | 1252 | ||
| 1256 | ;; restore the point | 1253 | ;; restore the point |
| 1257 | (goto-char (if moving rcirc-prompt-end-marker old-point)) | 1254 | (goto-char (if moving rcirc-prompt-end-marker old-point)) |
| 1258 | 1255 | ||
| 1256 | ;; keep window on bottom line if it was already there | ||
| 1257 | (when rcirc-scroll-show-maximum-output | ||
| 1258 | (walk-windows (lambda (w) | ||
| 1259 | (when (eq (window-buffer w) (current-buffer)) | ||
| 1260 | (with-current-buffer (window-buffer w) | ||
| 1261 | (when (eq major-mode 'rcirc-mode) | ||
| 1262 | (with-selected-window w | ||
| 1263 | (when (<= (- (window-height) | ||
| 1264 | (count-screen-lines | ||
| 1265 | (window-point) | ||
| 1266 | (window-start)) | ||
| 1267 | 1) | ||
| 1268 | 0) | ||
| 1269 | (recenter -1))))))) | ||
| 1270 | nil t)) | ||
| 1271 | |||
| 1259 | ;; flush undo (can we do something smarter here?) | 1272 | ;; flush undo (can we do something smarter here?) |
| 1260 | (buffer-disable-undo) | 1273 | (buffer-disable-undo) |
| 1261 | (buffer-enable-undo)) | 1274 | (buffer-enable-undo)) |
| 1262 | 1275 | ||
| 1263 | ;; record modeline activity | 1276 | ;; record modeline activity |
| 1264 | (when activity | 1277 | (when (and activity |
| 1265 | (let ((nick-match | 1278 | (not rcirc-ignore-buffer-activity-flag) |
| 1266 | (with-syntax-table rcirc-nick-syntax-table | 1279 | (not (and rcirc-dim-nicks sender |
| 1267 | (string-match (concat "\\b" | 1280 | (string-match (regexp-opt rcirc-dim-nicks) sender)))) |
| 1268 | (regexp-quote (rcirc-nick process)) | 1281 | (rcirc-record-activity (current-buffer) |
| 1269 | "\\b") | 1282 | (when (not (rcirc-channel-p rcirc-target)) |
| 1270 | text)))) | 1283 | 'nick))) |
| 1271 | (when (if rcirc-ignore-buffer-activity-flag | ||
| 1272 | ;; - Always notice when our nick is mentioned | ||
| 1273 | nick-match | ||
| 1274 | ;; - unless our nick is mentioned, don't bother us | ||
| 1275 | ;; - with dim-nicks | ||
| 1276 | (or nick-match | ||
| 1277 | (not (and rcirc-dim-nick-regexp sender | ||
| 1278 | (string-match rcirc-dim-nick-regexp sender))))) | ||
| 1279 | (rcirc-record-activity | ||
| 1280 | (current-buffer) | ||
| 1281 | (when (or nick-match (and (not (rcirc-channel-p rcirc-target)) | ||
| 1282 | (not rcirc-low-priority-flag))) | ||
| 1283 | 'nick))))) | ||
| 1284 | 1284 | ||
| 1285 | (sit-for 0) ; displayed text before hook | 1285 | (sit-for 0) ; displayed text before hook |
| 1286 | (run-hook-with-args 'rcirc-print-hooks | 1286 | (run-hook-with-args 'rcirc-print-hooks |
| @@ -1501,8 +1501,7 @@ activity. Only run if the buffer is not visible and | |||
| 1501 | (let ((t1 (with-current-buffer b1 rcirc-last-post-time)) | 1501 | (let ((t1 (with-current-buffer b1 rcirc-last-post-time)) |
| 1502 | (t2 (with-current-buffer b2 rcirc-last-post-time))) | 1502 | (t2 (with-current-buffer b2 rcirc-last-post-time))) |
| 1503 | (time-less-p t2 t1))))) | 1503 | (time-less-p t2 t1))))) |
| 1504 | (if (not rcirc-activity-type) | 1504 | (pushnew type rcirc-activity-types) |
| 1505 | (setq rcirc-activity-type type)) | ||
| 1506 | (rcirc-update-activity-string))) | 1505 | (rcirc-update-activity-string))) |
| 1507 | (run-hook-with-args 'rcirc-activity-hooks buffer)) | 1506 | (run-hook-with-args 'rcirc-activity-hooks buffer)) |
| 1508 | 1507 | ||
| @@ -1510,7 +1509,7 @@ activity. Only run if the buffer is not visible and | |||
| 1510 | "Clear the BUFFER activity." | 1509 | "Clear the BUFFER activity." |
| 1511 | (setq rcirc-activity (delete buffer rcirc-activity)) | 1510 | (setq rcirc-activity (delete buffer rcirc-activity)) |
| 1512 | (with-current-buffer buffer | 1511 | (with-current-buffer buffer |
| 1513 | (setq rcirc-activity-type nil))) | 1512 | (setq rcirc-activity-types nil))) |
| 1514 | 1513 | ||
| 1515 | (defun rcirc-split-activity (activity) | 1514 | (defun rcirc-split-activity (activity) |
| 1516 | "Return a cons cell with ACTIVITY split into (lopri . hipri)." | 1515 | "Return a cons cell with ACTIVITY split into (lopri . hipri)." |
| @@ -1518,7 +1517,7 @@ activity. Only run if the buffer is not visible and | |||
| 1518 | (dolist (buf rcirc-activity) | 1517 | (dolist (buf rcirc-activity) |
| 1519 | (with-current-buffer buf | 1518 | (with-current-buffer buf |
| 1520 | (if (and rcirc-low-priority-flag | 1519 | (if (and rcirc-low-priority-flag |
| 1521 | (not (eq rcirc-activity-type 'nick))) | 1520 | (not (member 'nick rcirc-activity-types))) |
| 1522 | (add-to-list 'lopri buf t) | 1521 | (add-to-list 'lopri buf t) |
| 1523 | (add-to-list 'hipri buf t)))) | 1522 | (add-to-list 'hipri buf t)))) |
| 1524 | (cons lopri hipri))) | 1523 | (cons lopri hipri))) |
| @@ -1547,11 +1546,15 @@ activity. Only run if the buffer is not visible and | |||
| 1547 | 1546 | ||
| 1548 | (defun rcirc-activity-string (buffers) | 1547 | (defun rcirc-activity-string (buffers) |
| 1549 | (mapconcat (lambda (b) | 1548 | (mapconcat (lambda (b) |
| 1550 | (let ((s (rcirc-short-buffer-name b))) | 1549 | (let ((s (substring-no-properties (rcirc-short-buffer-name b)))) |
| 1551 | (with-current-buffer b | 1550 | (with-current-buffer b |
| 1552 | (if (not (eq rcirc-activity-type 'nick)) | 1551 | (dolist (type rcirc-activity-types) |
| 1553 | s | 1552 | (rcirc-add-face 0 (length s) |
| 1554 | (rcirc-facify s 'rcirc-mode-line-nick))))) | 1553 | (case type |
| 1554 | (nick 'rcirc-track-nick) | ||
| 1555 | (keyword 'rcirc-track-keyword)) | ||
| 1556 | s))) | ||
| 1557 | s)) | ||
| 1555 | buffers ",")) | 1558 | buffers ",")) |
| 1556 | 1559 | ||
| 1557 | (defun rcirc-short-buffer-name (buffer) | 1560 | (defun rcirc-short-buffer-name (buffer) |
| @@ -1566,15 +1569,18 @@ Also, clear the overlay arrow if the current buffer is now hidden." | |||
| 1566 | (let ((current-now-hidden t)) | 1569 | (let ((current-now-hidden t)) |
| 1567 | (walk-windows (lambda (w) | 1570 | (walk-windows (lambda (w) |
| 1568 | (let ((buf (window-buffer w))) | 1571 | (let ((buf (window-buffer w))) |
| 1569 | (when (eq major-mode 'rcirc-mode) | 1572 | (with-current-buffer buf |
| 1570 | (rcirc-clear-activity buf) | 1573 | (when (eq major-mode 'rcirc-mode) |
| 1574 | (rcirc-clear-activity buf))) | ||
| 1571 | (when (eq buf rcirc-current-buffer) | 1575 | (when (eq buf rcirc-current-buffer) |
| 1572 | (setq current-now-hidden nil)))))) | 1576 | (setq current-now-hidden nil))))) |
| 1573 | ;; add overlay arrow if the buffer isn't displayed | 1577 | ;; add overlay arrow if the buffer isn't displayed |
| 1574 | (when (and rcirc-current-buffer current-now-hidden) | 1578 | (when (and current-now-hidden |
| 1579 | rcirc-current-buffer | ||
| 1580 | (buffer-live-p rcirc-current-buffer)) | ||
| 1575 | (with-current-buffer rcirc-current-buffer | 1581 | (with-current-buffer rcirc-current-buffer |
| 1576 | (when (eq major-mode 'rcirc-mode) | 1582 | (when (and (eq major-mode 'rcirc-mode) |
| 1577 | (marker-position overlay-arrow-position) | 1583 | (marker-position overlay-arrow-position)) |
| 1578 | (set-marker overlay-arrow-position nil))))) | 1584 | (set-marker overlay-arrow-position nil))))) |
| 1579 | 1585 | ||
| 1580 | ;; remove any killed buffers from list | 1586 | ;; remove any killed buffers from list |
| @@ -1792,17 +1798,21 @@ With a prefix arg, prompt for new topic." | |||
| 1792 | (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" | 1798 | (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" |
| 1793 | target args))) | 1799 | target args))) |
| 1794 | 1800 | ||
| 1801 | (defun rcirc-add-or-remove (set &optional elt) | ||
| 1802 | (if (and elt (not (string= "" elt))) | ||
| 1803 | (if (member-ignore-case elt set) | ||
| 1804 | (delete elt set) | ||
| 1805 | (cons elt set)) | ||
| 1806 | set)) | ||
| 1807 | |||
| 1795 | (defun-rcirc-command ignore (nick) | 1808 | (defun-rcirc-command ignore (nick) |
| 1796 | "Manage the ignore list. | 1809 | "Manage the ignore list. |
| 1797 | Ignore NICK, unignore NICK if already ignored, or list ignored | 1810 | Ignore NICK, unignore NICK if already ignored, or list ignored |
| 1798 | nicks when no NICK is given. When listing ignored nicks, the | 1811 | nicks when no NICK is given. When listing ignored nicks, the |
| 1799 | ones added to the list automatically are marked with an asterisk." | 1812 | ones added to the list automatically are marked with an asterisk." |
| 1800 | (interactive "sToggle ignoring of nick: ") | 1813 | (interactive "sToggle ignoring of nick: ") |
| 1801 | (when (not (string= "" nick)) | 1814 | (setq rcirc-ignore-list (rcirc-add-or-remove rcirc-ignore-list nick)) |
| 1802 | (if (member-ignore-case nick rcirc-ignore-list) | 1815 | (rcirc-print process nil "IGNORE" target |
| 1803 | (setq rcirc-ignore-list (delete nick rcirc-ignore-list)) | ||
| 1804 | (setq rcirc-ignore-list (cons nick rcirc-ignore-list)))) | ||
| 1805 | (rcirc-print process (rcirc-nick process) "IGNORE" target | ||
| 1806 | (mapconcat | 1816 | (mapconcat |
| 1807 | (lambda (nick) | 1817 | (lambda (nick) |
| 1808 | (concat nick | 1818 | (concat nick |
| @@ -1810,14 +1820,47 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1810 | "*" ""))) | 1820 | "*" ""))) |
| 1811 | rcirc-ignore-list " "))) | 1821 | rcirc-ignore-list " "))) |
| 1812 | 1822 | ||
| 1823 | (defun-rcirc-command bright (nick) | ||
| 1824 | "Manage the bright nick list." | ||
| 1825 | (interactive "sToggle emphasis of nick: ") | ||
| 1826 | (setq rcirc-bright-nicks (rcirc-add-or-remove rcirc-bright-nicks nick)) | ||
| 1827 | (rcirc-print process nil "BRIGHT" target | ||
| 1828 | (mapconcat 'identity rcirc-bright-nicks " "))) | ||
| 1829 | |||
| 1830 | (defun-rcirc-command dim (nick) | ||
| 1831 | "Manage the dim nick list." | ||
| 1832 | (interactive "sToggle deemphasis of nick: ") | ||
| 1833 | (setq rcirc-dim-nicks (rcirc-add-or-remove rcirc-dim-nicks nick)) | ||
| 1834 | (rcirc-print process nil "DIM" target | ||
| 1835 | (mapconcat 'identity rcirc-dim-nicks " "))) | ||
| 1836 | |||
| 1837 | (defun-rcirc-command keyword (keyword) | ||
| 1838 | "Manage the keyword list. | ||
| 1839 | Mark KEYWORD, unmark KEYWORD if already marked, or list marked | ||
| 1840 | keywords when no KEYWORD is given." | ||
| 1841 | (interactive "sToggle highlighting of keyword: ") | ||
| 1842 | (setq rcirc-keywords (rcirc-add-or-remove rcirc-keywords keyword)) | ||
| 1843 | (rcirc-print process nil "KEYWORD" target | ||
| 1844 | (mapconcat 'identity rcirc-keywords " "))) | ||
| 1845 | |||
| 1813 | 1846 | ||
| 1814 | (defun rcirc-message-leader (sender face) | 1847 | (defun rcirc-add-face (start end name &optional object) |
| 1815 | "Return a string with SENDER propertized with FACE." | 1848 | "Add face NAME to the face text property of the text from START to END." |
| 1816 | (rcirc-facify (concat "<" sender "> ") face)) | 1849 | (when name |
| 1850 | (let ((pos start) | ||
| 1851 | next prop) | ||
| 1852 | (while (< pos end) | ||
| 1853 | (setq prop (get-text-property pos 'face object) | ||
| 1854 | next (next-single-property-change pos 'face object end)) | ||
| 1855 | (unless (member name (get-text-property pos 'face object)) | ||
| 1856 | (add-text-properties pos next (list 'face (cons name prop)) object)) | ||
| 1857 | (setq pos next))))) | ||
| 1817 | 1858 | ||
| 1818 | (defun rcirc-facify (string face) | 1859 | (defun rcirc-facify (string face) |
| 1819 | "Return a copy of STRING with FACE property added." | 1860 | "Return a copy of STRING with FACE property added." |
| 1820 | (propertize (or string "") 'face face 'rear-nonsticky t)) | 1861 | (let ((string (or string ""))) |
| 1862 | (rcirc-add-face 0 (length string) face string) | ||
| 1863 | string)) | ||
| 1821 | 1864 | ||
| 1822 | (defvar rcirc-url-regexp | 1865 | (defvar rcirc-url-regexp |
| 1823 | (rx-to-string | 1866 | (rx-to-string |
| @@ -1835,8 +1878,8 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1835 | word-boundary)) | 1878 | word-boundary)) |
| 1836 | (optional | 1879 | (optional |
| 1837 | (and "/" | 1880 | (and "/" |
| 1838 | (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]")) | 1881 | (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]()")) |
| 1839 | (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]"))))) | 1882 | (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]()"))))) |
| 1840 | "Regexp matching URLs. Set to nil to disable URL features in rcirc.") | 1883 | "Regexp matching URLs. Set to nil to disable URL features in rcirc.") |
| 1841 | 1884 | ||
| 1842 | (defun rcirc-browse-url (&optional arg) | 1885 | (defun rcirc-browse-url (&optional arg) |
| @@ -1863,68 +1906,99 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1863 | (with-current-buffer (window-buffer (posn-window position)) | 1906 | (with-current-buffer (window-buffer (posn-window position)) |
| 1864 | (rcirc-browse-url-at-point (posn-point position))))) | 1907 | (rcirc-browse-url-at-point (posn-point position))))) |
| 1865 | 1908 | ||
| 1866 | (defun rcirc-map-regexp (function regexp string) | 1909 | |
| 1867 | "Return a copy of STRING after calling FUNCTION for each REGEXP match. | 1910 | (defvar rcirc-markup-text-functions |
| 1868 | FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING." | 1911 | '(rcirc-markup-body-text |
| 1869 | (let ((start 0)) | 1912 | rcirc-markup-attributes |
| 1870 | (while (string-match regexp string start) | 1913 | rcirc-markup-my-nick |
| 1871 | (setq start (match-end 0)) | 1914 | rcirc-markup-urls |
| 1872 | (funcall function (match-beginning 0) (match-end 0) string))) | 1915 | rcirc-markup-keywords |
| 1873 | string) | 1916 | rcirc-markup-bright-nicks) |
| 1874 | 1917 | "List of functions used to manipulate text before it is printed. | |
| 1875 | (defun rcirc-mangle-text (process text) | 1918 | |
| 1919 | Each function takes three arguments, PROCESS, SENDER, RESPONSE | ||
| 1920 | and CHANNEL-BUFFER. The current buffer is temporary buffer that | ||
| 1921 | contains the text to manipulate. Each function works on the text | ||
| 1922 | in this buffer.") | ||
| 1923 | |||
| 1924 | (defun rcirc-markup-text (process sender response text) | ||
| 1876 | "Return TEXT with properties added based on various patterns." | 1925 | "Return TEXT with properties added based on various patterns." |
| 1877 | ;; ^B | 1926 | (let ((channel-buffer (current-buffer))) |
| 1878 | (setq text | 1927 | (with-temp-buffer |
| 1879 | (rcirc-map-regexp | 1928 | (insert text) |
| 1880 | (lambda (start end string) | 1929 | (goto-char (point-min)) |
| 1881 | (let ((orig-face (get-text-property start 'face string))) | 1930 | (dolist (fn rcirc-markup-text-functions) |
| 1882 | (add-text-properties | 1931 | (save-excursion |
| 1883 | start end | 1932 | (funcall fn process sender response channel-buffer))) |
| 1884 | (list 'face (if (listp orig-face) | 1933 | (buffer-substring (point-min) (point-max))))) |
| 1885 | (append orig-face | 1934 | |
| 1886 | (list 'bold)) | 1935 | (defun rcirc-markup-body-text (process sender response channel-buffer) |
| 1887 | (list orig-face 'bold)) | 1936 | ;; We add the text property `rcirc-text' to identify this as the |
| 1888 | 'rear-nonsticky t) | 1937 | ;; body text. |
| 1889 | string))) | 1938 | (add-text-properties (point-min) (point-max) |
| 1890 | ".*?" | 1939 | (list 'rcirc-text (buffer-substring-no-properties |
| 1891 | text)) | 1940 | (point-min) (point-max))))) |
| 1892 | ;; TODO: deal with ^_ and ^C colors sequences | 1941 | |
| 1893 | (while (string-match "\\(.*\\)[]\\(.*\\)" text) | 1942 | (defun rcirc-markup-attributes (process sender response channel-buffer) |
| 1894 | (setq text (concat (match-string 1 text) | 1943 | (while (re-search-forward "\\([\C-b\C-_\C-v]\\).*?\\(\\1\\|\C-o\\)" nil t) |
| 1895 | (match-string 2 text)))) | 1944 | (rcirc-add-face (match-beginning 0) (match-end 0) |
| 1896 | ;; my nick | 1945 | (case (char-after (match-beginning 1)) |
| 1897 | (setq text | 1946 | (?\C-b 'bold) |
| 1898 | (with-syntax-table rcirc-nick-syntax-table | 1947 | (?\C-v 'italic) |
| 1899 | (rcirc-map-regexp (lambda (start end string) | 1948 | (?\C-_ 'underline))) |
| 1900 | (add-text-properties | 1949 | ;; keep the ^O since it could terminate other attributes |
| 1901 | start end | 1950 | (when (not (eq ?\C-o (char-before (match-end 2)))) |
| 1902 | (list 'face 'rcirc-nick-in-message | 1951 | (delete-region (match-beginning 2) (match-end 2))) |
| 1903 | 'rear-nonsticky t) | 1952 | (delete-region (match-beginning 1) (match-end 1)) |
| 1904 | string)) | 1953 | (goto-char (1+ (match-beginning 1)))) |
| 1905 | (concat "\\b" | 1954 | ;; remove the ^O characters now |
| 1906 | (regexp-quote (rcirc-nick process)) | 1955 | (while (re-search-forward "\C-o+" nil t) |
| 1907 | "\\b") | 1956 | (delete-region (match-beginning 0) (match-end 0)))) |
| 1908 | text))) | 1957 | |
| 1909 | ;; urls | 1958 | (defun rcirc-markup-my-nick (process sender response channel-buffer) |
| 1910 | (setq text | 1959 | (with-syntax-table rcirc-nick-syntax-table |
| 1911 | (rcirc-map-regexp | 1960 | (while (re-search-forward (concat "\\b" |
| 1912 | (lambda (start end string) | 1961 | (regexp-quote (rcirc-nick process)) |
| 1913 | (let ((orig-face (get-text-property start 'face string))) | 1962 | "\\b") |
| 1914 | (add-text-properties start end | 1963 | nil t) |
| 1915 | (list 'face (if (listp orig-face) | 1964 | (rcirc-add-face (match-beginning 0) (match-end 0) |
| 1916 | (append orig-face | 1965 | 'rcirc-nick-in-message) |
| 1917 | (list 'bold)) | 1966 | (when (string= response "PRIVMSG") |
| 1918 | (list orig-face 'bold)) | 1967 | (rcirc-add-face (point-min) (point-max) 'rcirc-nick-in-message-full-line) |
| 1919 | 'rear-nonsticky t | 1968 | (rcirc-record-activity channel-buffer 'nick))))) |
| 1920 | 'mouse-face 'highlight | 1969 | |
| 1921 | 'keymap rcirc-browse-url-map) | 1970 | (defun rcirc-markup-urls (process sender response channel-buffer) |
| 1922 | string)) | 1971 | (while (re-search-forward rcirc-url-regexp nil t) |
| 1923 | (push (substring-no-properties string start end) rcirc-urls)) | 1972 | (let ((start (match-beginning 0)) |
| 1924 | rcirc-url-regexp | 1973 | (end (match-end 0))) |
| 1925 | text)) | 1974 | (rcirc-add-face start end 'rcirc-url) |
| 1926 | text) | 1975 | (add-text-properties start end (list 'mouse-face 'highlight |
| 1927 | 1976 | 'keymap rcirc-browse-url-map)) | |
| 1977 | ;; record the url | ||
| 1978 | (let ((url (buffer-substring-no-properties start end))) | ||
| 1979 | (with-current-buffer channel-buffer | ||
| 1980 | (push url rcirc-urls)))))) | ||
| 1981 | |||
| 1982 | (defun rcirc-markup-keywords (process sender response channel-buffer) | ||
| 1983 | (let* ((target (with-current-buffer channel-buffer (or rcirc-target ""))) | ||
| 1984 | (keywords (delq nil (mapcar (lambda (keyword) | ||
| 1985 | (when (not (string-match keyword target)) | ||
| 1986 | keyword)) | ||
| 1987 | rcirc-keywords)))) | ||
| 1988 | (when keywords | ||
| 1989 | (while (re-search-forward (regexp-opt keywords 'words) nil t) | ||
| 1990 | (rcirc-add-face (match-beginning 0) (match-end 0) 'rcirc-keyword) | ||
| 1991 | (when (and (string= response "PRIVMSG") | ||
| 1992 | (not (string= sender (rcirc-nick process)))) | ||
| 1993 | (rcirc-record-activity channel-buffer 'keyword)))))) | ||
| 1994 | |||
| 1995 | (defun rcirc-markup-bright-nicks (process sender response channel-buffer) | ||
| 1996 | (when (and rcirc-bright-nicks | ||
| 1997 | (string= response "NAMES")) | ||
| 1998 | (with-syntax-table rcirc-nick-syntax-table | ||
| 1999 | (while (re-search-forward (regexp-opt rcirc-bright-nicks 'words) nil t) | ||
| 2000 | (rcirc-add-face (match-beginning 0) (match-end 0) | ||
| 2001 | 'rcirc-bright-nick))))) | ||
| 1928 | 2002 | ||
| 1929 | ;;; handlers | 2003 | ;;; handlers |
| 1930 | ;; these are called with the server PROCESS, the SENDER, which is a | 2004 | ;; these are called with the server PROCESS, the SENDER, which is a |
| @@ -2275,12 +2349,12 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2275 | (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) | 2349 | (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) |
| 2276 | (((class color) (min-colors 8)) (:foreground "magenta")) | 2350 | (((class color) (min-colors 8)) (:foreground "magenta")) |
| 2277 | (t (:weight bold :underline t))) | 2351 | (t (:weight bold :underline t))) |
| 2278 | "Face used for nicks matched by `rcirc-bright-nick-regexp'." | 2352 | "Face used for nicks matched by `rcirc-bright-nicks'." |
| 2279 | :group 'rcirc-faces) | 2353 | :group 'rcirc-faces) |
| 2280 | 2354 | ||
| 2281 | (defface rcirc-dim-nick | 2355 | (defface rcirc-dim-nick |
| 2282 | '((t :inherit default)) | 2356 | '((t :inherit default)) |
| 2283 | "Face used for nicks matched by `rcirc-dim-nick-regexp'." | 2357 | "Face used for nicks in `rcirc-dim-nicks'." |
| 2284 | :group 'rcirc-faces) | 2358 | :group 'rcirc-faces) |
| 2285 | 2359 | ||
| 2286 | (defface rcirc-server ; font-lock-comment-face | 2360 | (defface rcirc-server ; font-lock-comment-face |
| @@ -2329,9 +2403,14 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2329 | (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) | 2403 | (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) |
| 2330 | (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) | 2404 | (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) |
| 2331 | (t (:weight bold))) | 2405 | (t (:weight bold))) |
| 2332 | "The face used to highlight instances of nick within messages." | 2406 | "The face used to highlight instances of your nick within messages." |
| 2333 | :group 'rcirc-faces) | 2407 | :group 'rcirc-faces) |
| 2334 | 2408 | ||
| 2409 | (defface rcirc-nick-in-message-full-line | ||
| 2410 | '((t (:bold t))) | ||
| 2411 | "The face used emphasize the entire message when your nick is mentioned." | ||
| 2412 | :group 'rcirc-faces) | ||
| 2413 | |||
| 2335 | (defface rcirc-prompt ; comint-highlight-prompt | 2414 | (defface rcirc-prompt ; comint-highlight-prompt |
| 2336 | '((((min-colors 88) (background dark)) (:foreground "cyan1")) | 2415 | '((((min-colors 88) (background dark)) (:foreground "cyan1")) |
| 2337 | (((background dark)) (:foreground "cyan")) | 2416 | (((background dark)) (:foreground "cyan")) |
| @@ -2339,9 +2418,24 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2339 | "The face used to highlight prompts." | 2418 | "The face used to highlight prompts." |
| 2340 | :group 'rcirc-faces) | 2419 | :group 'rcirc-faces) |
| 2341 | 2420 | ||
| 2342 | (defface rcirc-mode-line-nick | 2421 | (defface rcirc-track-nick |
| 2422 | '((t (:inverse-video t))) | ||
| 2423 | "The face used in the mode-line when your nick is mentioned." | ||
| 2424 | :group 'rcirc-faces) | ||
| 2425 | |||
| 2426 | (defface rcirc-track-keyword | ||
| 2427 | '((t (:bold t ))) | ||
| 2428 | "The face used in the mode-line when keywords are mentioned." | ||
| 2429 | :group 'rcirc-faces) | ||
| 2430 | |||
| 2431 | (defface rcirc-url | ||
| 2343 | '((t (:bold t))) | 2432 | '((t (:bold t))) |
| 2344 | "The face used indicate activity directed at you." | 2433 | "The face used to highlight urls." |
| 2434 | :group 'rcirc-faces) | ||
| 2435 | |||
| 2436 | (defface rcirc-keyword | ||
| 2437 | '((t (:inherit highlight))) | ||
| 2438 | "The face used to highlight keywords." | ||
| 2345 | :group 'rcirc-faces) | 2439 | :group 'rcirc-faces) |
| 2346 | 2440 | ||
| 2347 | 2441 | ||
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cb5a6d75331..97b08e7e704 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3888,37 +3888,50 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3888 | (defun tramp-handle-make-auto-save-file-name () | 3888 | (defun tramp-handle-make-auto-save-file-name () |
| 3889 | "Like `make-auto-save-file-name' for tramp files. | 3889 | "Like `make-auto-save-file-name' for tramp files. |
| 3890 | Returns a file name in `tramp-auto-save-directory' for autosaving this file." | 3890 | Returns a file name in `tramp-auto-save-directory' for autosaving this file." |
| 3891 | (when tramp-auto-save-directory | 3891 | (let ((tramp-auto-save-directory tramp-auto-save-directory)) |
| 3892 | (unless (file-exists-p tramp-auto-save-directory) | 3892 | ;; File name must be unique. This is ensured with Emacs 22 (see |
| 3893 | (make-directory tramp-auto-save-directory t))) | 3893 | ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for |
| 3894 | ;; jka-compr doesn't like auto-saving, so by appending "~" to the | 3894 | ;; all other cases we must do it ourselves. |
| 3895 | ;; file name we make sure that jka-compr isn't used for the | 3895 | (when (boundp 'auto-save-file-name-transforms) |
| 3896 | ;; auto-save file. | 3896 | (mapcar |
| 3897 | (let ((buffer-file-name | 3897 | '(lambda (x) |
| 3898 | (if tramp-auto-save-directory | 3898 | (when (and (string-match (car x) buffer-file-name) |
| 3899 | (expand-file-name | 3899 | (not (car (cddr x)))) |
| 3900 | (tramp-subst-strs-in-string | 3900 | (setq tramp-auto-save-directory |
| 3901 | '(("_" . "|") | 3901 | (or tramp-auto-save-directory temporary-file-directory)))) |
| 3902 | ("/" . "_a") | 3902 | (symbol-value 'auto-save-file-name-transforms))) |
| 3903 | (":" . "_b") | 3903 | ;; Create directory. |
| 3904 | ("|" . "__") | 3904 | (when tramp-auto-save-directory |
| 3905 | ("[" . "_l") | 3905 | (unless (file-exists-p tramp-auto-save-directory) |
| 3906 | ("]" . "_r")) | 3906 | (make-directory tramp-auto-save-directory t))) |
| 3907 | (buffer-file-name)) | 3907 | ;; jka-compr doesn't like auto-saving, so by appending "~" to the |
| 3908 | tramp-auto-save-directory) | 3908 | ;; file name we make sure that jka-compr isn't used for the |
| 3909 | (buffer-file-name)))) | 3909 | ;; auto-save file. |
| 3910 | ;; Run plain `make-auto-save-file-name'. There might be an advice when | 3910 | (let ((buffer-file-name |
| 3911 | ;; it is not a magic file name operation (since Emacs 22). | 3911 | (if tramp-auto-save-directory |
| 3912 | ;; We must deactivate it temporarily. | 3912 | (expand-file-name |
| 3913 | (if (not (ad-is-active 'make-auto-save-file-name)) | 3913 | (tramp-subst-strs-in-string |
| 3914 | (tramp-run-real-handler | 3914 | '(("_" . "|") |
| 3915 | 'make-auto-save-file-name nil) | 3915 | ("/" . "_a") |
| 3916 | ;; else | 3916 | (":" . "_b") |
| 3917 | (ad-deactivate 'make-auto-save-file-name) | 3917 | ("|" . "__") |
| 3918 | (prog1 | 3918 | ("[" . "_l") |
| 3919 | (tramp-run-real-handler | 3919 | ("]" . "_r")) |
| 3920 | 'make-auto-save-file-name nil) | 3920 | (buffer-file-name)) |
| 3921 | (ad-activate 'make-auto-save-file-name))))) | 3921 | tramp-auto-save-directory) |
| 3922 | (buffer-file-name)))) | ||
| 3923 | ;; Run plain `make-auto-save-file-name'. There might be an advice when | ||
| 3924 | ;; it is not a magic file name operation (since Emacs 22). | ||
| 3925 | ;; We must deactivate it temporarily. | ||
| 3926 | (if (not (ad-is-active 'make-auto-save-file-name)) | ||
| 3927 | (tramp-run-real-handler | ||
| 3928 | 'make-auto-save-file-name nil) | ||
| 3929 | ;; else | ||
| 3930 | (ad-deactivate 'make-auto-save-file-name) | ||
| 3931 | (prog1 | ||
| 3932 | (tramp-run-real-handler | ||
| 3933 | 'make-auto-save-file-name nil) | ||
| 3934 | (ad-activate 'make-auto-save-file-name)))))) | ||
| 3922 | 3935 | ||
| 3923 | 3936 | ||
| 3924 | ;; CCC grok APPEND, LOCKNAME, CONFIRM | 3937 | ;; CCC grok APPEND, LOCKNAME, CONFIRM |
| @@ -4333,7 +4346,12 @@ Falls back to normal file name handler if no tramp file name handler exists." | |||
| 4333 | "Add tramp file name handlers to `file-name-handler-alist'." | 4346 | "Add tramp file name handlers to `file-name-handler-alist'." |
| 4334 | (add-to-list 'file-name-handler-alist | 4347 | (add-to-list 'file-name-handler-alist |
| 4335 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) | 4348 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) |
| 4336 | (when (or partial-completion-mode (featurep 'ido)) | 4349 | ;; `partial-completion-mode' is unknown in XEmacs. So we should |
| 4350 | ;; load it unconditionally there. In the GNU Emacs case, method/ | ||
| 4351 | ;; user/host name completion shall be bound to `partial-completion-mode'. | ||
| 4352 | (when (or (not (boundp 'partial-completion-mode)) | ||
| 4353 | (symbol-value 'partial-completion-mode) | ||
| 4354 | (featurep 'ido)) | ||
| 4337 | (add-to-list 'file-name-handler-alist | 4355 | (add-to-list 'file-name-handler-alist |
| 4338 | (cons tramp-completion-file-name-regexp | 4356 | (cons tramp-completion-file-name-regexp |
| 4339 | 'tramp-completion-file-name-handler)) | 4357 | 'tramp-completion-file-name-handler)) |
| @@ -6749,8 +6767,8 @@ Return ATTR." | |||
| 6749 | ;; Set file's gid change bit. Possible only when id-format is 'integer. | 6767 | ;; Set file's gid change bit. Possible only when id-format is 'integer. |
| 6750 | (when (numberp (nth 3 attr)) | 6768 | (when (numberp (nth 3 attr)) |
| 6751 | (setcar (nthcdr 9 attr) | 6769 | (setcar (nthcdr 9 attr) |
| 6752 | (not (= (nth 3 attr) | 6770 | (not (eql (nth 3 attr) |
| 6753 | (tramp-get-remote-gid multi-method method user host))))) | 6771 | (tramp-get-remote-gid multi-method method user host))))) |
| 6754 | ;; Set virtual device number. | 6772 | ;; Set virtual device number. |
| 6755 | (setcar (nthcdr 11 attr) | 6773 | (setcar (nthcdr 11 attr) |
| 6756 | (tramp-get-device multi-method method user host)) | 6774 | (tramp-get-device multi-method method user host)) |
| @@ -7200,10 +7218,7 @@ Invokes `password-read' if available, `read-passwd' else." | |||
| 7200 | 7218 | ||
| 7201 | (defun tramp-time-diff (t1 t2) | 7219 | (defun tramp-time-diff (t1 t2) |
| 7202 | "Return the difference between the two times, in seconds. | 7220 | "Return the difference between the two times, in seconds. |
| 7203 | T1 and T2 are time values (as returned by `current-time' for example). | 7221 | T1 and T2 are time values (as returned by `current-time' for example)." |
| 7204 | |||
| 7205 | NOTE: This function will fail if the time difference is too large to | ||
| 7206 | fit in an integer." | ||
| 7207 | ;; Pacify byte-compiler with `symbol-function'. | 7222 | ;; Pacify byte-compiler with `symbol-function'. |
| 7208 | (cond ((and (fboundp 'subtract-time) | 7223 | (cond ((and (fboundp 'subtract-time) |
| 7209 | (fboundp 'float-time)) | 7224 | (fboundp 'float-time)) |
| @@ -7214,10 +7229,9 @@ fit in an integer." | |||
| 7214 | (funcall (symbol-function 'time-to-seconds) | 7229 | (funcall (symbol-function 'time-to-seconds) |
| 7215 | (funcall (symbol-function 'subtract-time) t1 t2))) | 7230 | (funcall (symbol-function 'subtract-time) t1 t2))) |
| 7216 | ((fboundp 'itimer-time-difference) | 7231 | ((fboundp 'itimer-time-difference) |
| 7217 | (floor (funcall | 7232 | (funcall (symbol-function 'itimer-time-difference) |
| 7218 | (symbol-function 'itimer-time-difference) | 7233 | (if (< (length t1) 3) (append t1 '(0)) t1) |
| 7219 | (if (< (length t1) 3) (append t1 '(0)) t1) | 7234 | (if (< (length t2) 3) (append t2 '(0)) t2))) |
| 7220 | (if (< (length t2) 3) (append t2 '(0)) t2)))) | ||
| 7221 | (t | 7235 | (t |
| 7222 | ;; snarfed from Emacs 21 time-date.el; combining | 7236 | ;; snarfed from Emacs 21 time-date.el; combining |
| 7223 | ;; time-to-seconds and subtract-time | 7237 | ;; time-to-seconds and subtract-time |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index c7edf9a4cdc..710022f885b 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run | 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run |
| 31 | ;; "autoconf && ./configure" to change them. | 31 | ;; "autoconf && ./configure" to change them. |
| 32 | 32 | ||
| 33 | (defconst tramp-version "2.0.53" | 33 | (defconst tramp-version "2.0.54" |
| 34 | "This version of Tramp.") | 34 | "This version of Tramp.") |
| 35 | 35 | ||
| 36 | (defconst tramp-bug-report-address "tramp-devel@gnu.org" | 36 | (defconst tramp-bug-report-address "tramp-devel@gnu.org" |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 0cf0160afb1..9d089a2e164 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -238,7 +238,7 @@ behavior for explicit filling, you might as well use \\[newline-and-indent]." | |||
| 238 | (defcustom comment-empty-lines nil | 238 | (defcustom comment-empty-lines nil |
| 239 | "If nil, `comment-region' does not comment out empty lines. | 239 | "If nil, `comment-region' does not comment out empty lines. |
| 240 | If t, it always comments out empty lines. | 240 | If t, it always comments out empty lines. |
| 241 | if `eol' it only comments out empty lines if comments are | 241 | If `eol' it only comments out empty lines if comments are |
| 242 | terminated by the end of line (i.e. `comment-end' is empty)." | 242 | terminated by the end of line (i.e. `comment-end' is empty)." |
| 243 | :type '(choice (const :tag "Never" nil) | 243 | :type '(choice (const :tag "Never" nil) |
| 244 | (const :tag "Always" t) | 244 | (const :tag "Always" t) |
| @@ -1124,12 +1124,44 @@ This has no effect in modes that do not define a comment syntax." | |||
| 1124 | :group 'comment) | 1124 | :group 'comment) |
| 1125 | 1125 | ||
| 1126 | (defun comment-valid-prefix-p (prefix compos) | 1126 | (defun comment-valid-prefix-p (prefix compos) |
| 1127 | (or | 1127 | "Check that the adaptive-fill-prefix is consistent with the context. |
| 1128 | ;; Accept any prefix if the current comment is not EOL-terminated. | 1128 | PREFIX is the prefix (presumably guessed by `adaptive-fill-mode'). |
| 1129 | (save-excursion (goto-char compos) (comment-forward) (not (bolp))) | 1129 | COMPOS is the position of the beginning of the comment we're in, or nil |
| 1130 | ;; Accept any prefix that starts with a comment-start marker. | 1130 | if we're not inside a comment." |
| 1131 | (string-match (concat "\\`[ \t]*\\(?:" comment-start-skip "\\)") | 1131 | ;; This consistency checking is mostly needed to workaround the limitation |
| 1132 | prefix))) | 1132 | ;; of auto-fill-mode whose paragraph-determination doesn't pay attention |
| 1133 | ;; to comment boundaries. | ||
| 1134 | (if (null compos) | ||
| 1135 | ;; We're not inside a comment: the prefix shouldn't match | ||
| 1136 | ;; a comment-starter. | ||
| 1137 | (not (and comment-start comment-start-skip | ||
| 1138 | (string-match comment-start-skip prefix))) | ||
| 1139 | (or | ||
| 1140 | ;; Accept any prefix if the current comment is not EOL-terminated. | ||
| 1141 | (save-excursion (goto-char compos) (comment-forward) (not (bolp))) | ||
| 1142 | ;; Accept any prefix that starts with the same comment-start marker | ||
| 1143 | ;; as the current one. | ||
| 1144 | (when (string-match (concat "\\`[ \t]*\\(?:" comment-start-skip "\\)") | ||
| 1145 | prefix) | ||
| 1146 | (let ((prefix-com (comment-string-strip (match-string 0 prefix) nil t))) | ||
| 1147 | (string-match "\\`[ \t]*" prefix-com) | ||
| 1148 | (let* ((prefix-space (match-string 0 prefix-com)) | ||
| 1149 | (prefix-indent (string-width prefix-space)) | ||
| 1150 | (prefix-comstart (substring prefix-com (match-end 0)))) | ||
| 1151 | (save-excursion | ||
| 1152 | (goto-char compos) | ||
| 1153 | ;; The comstart marker is the same. | ||
| 1154 | (and (looking-at (regexp-quote prefix-comstart)) | ||
| 1155 | ;; The indentation as well. | ||
| 1156 | (or (= prefix-indent | ||
| 1157 | (- (current-column) (current-left-margin))) | ||
| 1158 | ;; Check the indentation in two different ways, just | ||
| 1159 | ;; to try and avoid most of the potential funny cases. | ||
| 1160 | (equal prefix-space | ||
| 1161 | (buffer-substring (point) | ||
| 1162 | (progn (move-to-left-margin) | ||
| 1163 | (point))))))))))))) | ||
| 1164 | |||
| 1133 | 1165 | ||
| 1134 | ;;;###autoload | 1166 | ;;;###autoload |
| 1135 | (defun comment-indent-new-line (&optional soft) | 1167 | (defun comment-indent-new-line (&optional soft) |
| @@ -1182,8 +1214,7 @@ unless optional argument SOFT is non-nil." | |||
| 1182 | ;; If there's an adaptive prefix, use it unless we're inside | 1214 | ;; If there's an adaptive prefix, use it unless we're inside |
| 1183 | ;; a comment and the prefix is not a comment starter. | 1215 | ;; a comment and the prefix is not a comment starter. |
| 1184 | ((and fill-prefix | 1216 | ((and fill-prefix |
| 1185 | (or (not compos) | 1217 | (comment-valid-prefix-p fill-prefix compos)) |
| 1186 | (comment-valid-prefix-p fill-prefix compos))) | ||
| 1187 | (indent-to-left-margin) | 1218 | (indent-to-left-margin) |
| 1188 | (insert-and-inherit fill-prefix)) | 1219 | (insert-and-inherit fill-prefix)) |
| 1189 | ;; If we're not inside a comment, just try to indent. | 1220 | ;; If we're not inside a comment, just try to indent. |
diff --git a/lisp/novice.el b/lisp/novice.el index 97e27da5e5e..7fff480e2c2 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -44,6 +44,8 @@ If nil, the feature is disabled, i.e., all commands work normally.") | |||
| 44 | ;;;###autoload | 44 | ;;;###autoload |
| 45 | (define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1") | 45 | (define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1") |
| 46 | 46 | ||
| 47 | ;; It is ok here to assume that this-command is a symbol | ||
| 48 | ;; because we won't get called otherwise. | ||
| 47 | ;;;###autoload | 49 | ;;;###autoload |
| 48 | (defun disabled-command-function (&rest ignore) | 50 | (defun disabled-command-function (&rest ignore) |
| 49 | (let (char) | 51 | (let (char) |
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 60c7988a66b..de4b494826a 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el | |||
| @@ -623,9 +623,9 @@ See `fast-lock-cache-directory'." | |||
| 623 | ;; Compile all keywords in case some are and some aren't. | 623 | ;; Compile all keywords in case some are and some aren't. |
| 624 | (when font-lock-syntactic-keywords | 624 | (when font-lock-syntactic-keywords |
| 625 | (setq font-lock-syntactic-keywords (font-lock-compile-keywords | 625 | (setq font-lock-syntactic-keywords (font-lock-compile-keywords |
| 626 | font-lock-syntactic-keywords))) | 626 | font-lock-syntactic-keywords t))) |
| 627 | (when syntactic-keywords | 627 | (when syntactic-keywords |
| 628 | (setq syntactic-keywords (font-lock-compile-keywords syntactic-keywords))) | 628 | (setq syntactic-keywords (font-lock-compile-keywords syntactic-keywords t))) |
| 629 | (setq font-lock-keywords (font-lock-compile-keywords font-lock-keywords) | 629 | (setq font-lock-keywords (font-lock-compile-keywords font-lock-keywords) |
| 630 | keywords (font-lock-compile-keywords keywords)) | 630 | keywords (font-lock-compile-keywords keywords)) |
| 631 | ;; Use the Font Lock cache SYNTACTIC-PROPERTIES and FACE-PROPERTIES if we're | 631 | ;; Use the Font Lock cache SYNTACTIC-PROPERTIES and FACE-PROPERTIES if we're |
diff --git a/lisp/paths.el b/lisp/paths.el index 846f91793d1..022f12dd1fc 100644 --- a/lisp/paths.el +++ b/lisp/paths.el | |||
| @@ -159,16 +159,6 @@ The `ORGANIZATION' environment variable is used instead if defined.") | |||
| 159 | "Name of directory used by system mailer for delivering new mail. | 159 | "Name of directory used by system mailer for delivering new mail. |
| 160 | Its name should end with a slash.") | 160 | Its name should end with a slash.") |
| 161 | 161 | ||
| 162 | (defcustom sendmail-program | ||
| 163 | (cond | ||
| 164 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | ||
| 165 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | ||
| 166 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | ||
| 167 | (t "fakemail")) ;In ../etc, to interface to /bin/mail. | ||
| 168 | "Program used to send messages." | ||
| 169 | :group 'mail | ||
| 170 | :type 'file) | ||
| 171 | |||
| 172 | (defcustom remote-shell-program | 162 | (defcustom remote-shell-program |
| 173 | (cond | 163 | (cond |
| 174 | ;; Some systems use rsh for the remote shell; others use that name for the | 164 | ;; Some systems use rsh for the remote shell; others use that name for the |
diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index e2c6396bdb2..d0c1950f1f8 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el | |||
| @@ -98,7 +98,7 @@ repositories. It can be set interactively with \\[cvs-change-cvsroot.] | |||
| 98 | There is no need to set this if $CVSROOT is set to a correct value.") | 98 | There is no need to set this if $CVSROOT is set to a correct value.") |
| 99 | 99 | ||
| 100 | (defcustom cvs-auto-remove-handled nil | 100 | (defcustom cvs-auto-remove-handled nil |
| 101 | "*If up-to-date files should be acknowledged automatically. | 101 | "If up-to-date files should be acknowledged automatically. |
| 102 | If T, they will be removed from the *cvs* buffer after every command. | 102 | If T, they will be removed from the *cvs* buffer after every command. |
| 103 | If DELAYED, they will be removed from the *cvs* buffer before every command. | 103 | If DELAYED, they will be removed from the *cvs* buffer before every command. |
| 104 | If STATUS, they will only be removed after a `cvs-mode-status' command. | 104 | If STATUS, they will only be removed after a `cvs-mode-status' command. |
| @@ -107,24 +107,24 @@ Else, they will never be automatically removed from the *cvs* buffer." | |||
| 107 | :type '(choice (const nil) (const status) (const delayed) (const t))) | 107 | :type '(choice (const nil) (const status) (const delayed) (const t))) |
| 108 | 108 | ||
| 109 | (defcustom cvs-auto-remove-directories 'handled | 109 | (defcustom cvs-auto-remove-directories 'handled |
| 110 | "*If ALL, directory entries will never be shown. | 110 | "If ALL, directory entries will never be shown. |
| 111 | If HANDLED, only non-handled directories will be shown. | 111 | If HANDLED, only non-handled directories will be shown. |
| 112 | If EMPTY, only non-empty directories will be shown." | 112 | If EMPTY, only non-empty directories will be shown." |
| 113 | :group 'pcl-cvs | 113 | :group 'pcl-cvs |
| 114 | :type '(choice (const :tag "No" nil) (const all) (const handled) (const empty))) | 114 | :type '(choice (const :tag "No" nil) (const all) (const handled) (const empty))) |
| 115 | 115 | ||
| 116 | (defcustom cvs-auto-revert t | 116 | (defcustom cvs-auto-revert t |
| 117 | "*Non-nil if changed files should automatically be reverted." | 117 | "Non-nil if changed files should automatically be reverted." |
| 118 | :group 'pcl-cvs | 118 | :group 'pcl-cvs |
| 119 | :type '(boolean)) | 119 | :type '(boolean)) |
| 120 | 120 | ||
| 121 | (defcustom cvs-sort-ignore-file t | 121 | (defcustom cvs-sort-ignore-file t |
| 122 | "*Non-nil if `cvs-mode-ignore' should sort the .cvsignore automatically." | 122 | "Non-nil if `cvs-mode-ignore' should sort the .cvsignore automatically." |
| 123 | :group 'pcl-cvs | 123 | :group 'pcl-cvs |
| 124 | :type '(boolean)) | 124 | :type '(boolean)) |
| 125 | 125 | ||
| 126 | (defcustom cvs-force-dir-tag t | 126 | (defcustom cvs-force-dir-tag t |
| 127 | "*If non-nil, tagging can only be applied to directories. | 127 | "If non-nil, tagging can only be applied to directories. |
| 128 | Tagging should generally be applied a directory at a time, but sometimes it is | 128 | Tagging should generally be applied a directory at a time, but sometimes it is |
| 129 | useful to be able to tag a single file. The normal way to do that is to use | 129 | useful to be able to tag a single file. The normal way to do that is to use |
| 130 | `cvs-mode-force-command' so as to temporarily override the restrictions," | 130 | `cvs-mode-force-command' so as to temporarily override the restrictions," |
| @@ -132,7 +132,7 @@ useful to be able to tag a single file. The normal way to do that is to use | |||
| 132 | :type '(boolean)) | 132 | :type '(boolean)) |
| 133 | 133 | ||
| 134 | (defcustom cvs-default-ignore-marks nil | 134 | (defcustom cvs-default-ignore-marks nil |
| 135 | "*Non-nil if cvs mode commands should ignore any marked files. | 135 | "Non-nil if cvs mode commands should ignore any marked files. |
| 136 | Normally they run on the files that are marked (with `cvs-mode-mark'), | 136 | Normally they run on the files that are marked (with `cvs-mode-mark'), |
| 137 | or the file under the cursor if no files are marked. If this variable | 137 | or the file under the cursor if no files are marked. If this variable |
| 138 | is set to a non-nil value they will by default run on the file on the | 138 | is set to a non-nil value they will by default run on the file on the |
| @@ -151,7 +151,7 @@ current line. See also `cvs-invert-ignore-marks'" | |||
| 151 | (when (and cvs-force-dir-tag (not cvs-default-ignore-marks)) | 151 | (when (and cvs-force-dir-tag (not cvs-default-ignore-marks)) |
| 152 | (push "tag" l)) | 152 | (push "tag" l)) |
| 153 | l) | 153 | l) |
| 154 | "*List of cvs commands that invert the default ignore-mark behavior. | 154 | "List of cvs commands that invert the default ignore-mark behavior. |
| 155 | Commands in this set will use the opposite default from the one set | 155 | Commands in this set will use the opposite default from the one set |
| 156 | in `cvs-default-ignore-marks'." | 156 | in `cvs-default-ignore-marks'." |
| 157 | :group 'pcl-cvs | 157 | :group 'pcl-cvs |
| @@ -160,7 +160,7 @@ in `cvs-default-ignore-marks'." | |||
| 160 | (const "ignore"))) | 160 | (const "ignore"))) |
| 161 | 161 | ||
| 162 | (defcustom cvs-confirm-removals t | 162 | (defcustom cvs-confirm-removals t |
| 163 | "*Ask for confirmation before removing files. | 163 | "Ask for confirmation before removing files. |
| 164 | Non-nil means that PCL-CVS will ask confirmation before removing files | 164 | Non-nil means that PCL-CVS will ask confirmation before removing files |
| 165 | except for files whose content can readily be recovered from the repository. | 165 | except for files whose content can readily be recovered from the repository. |
| 166 | A value of `list' means that the list of files to be deleted will be | 166 | A value of `list' means that the list of files to be deleted will be |
| @@ -171,7 +171,7 @@ displayed when asking for confirmation." | |||
| 171 | (const nil))) | 171 | (const nil))) |
| 172 | 172 | ||
| 173 | (defcustom cvs-add-default-message nil | 173 | (defcustom cvs-add-default-message nil |
| 174 | "*Default message to use when adding files. | 174 | "Default message to use when adding files. |
| 175 | If set to nil, `cvs-mode-add' will always prompt for a message." | 175 | If set to nil, `cvs-mode-add' will always prompt for a message." |
| 176 | :group 'pcl-cvs | 176 | :group 'pcl-cvs |
| 177 | :type '(choice (const :tag "Prompt" nil) | 177 | :type '(choice (const :tag "Prompt" nil) |
| @@ -195,7 +195,7 @@ have no effect." | |||
| 195 | ("tree" "*cvs-info*" cvs-status-mode) | 195 | ("tree" "*cvs-info*" cvs-status-mode) |
| 196 | ("message" "*cvs-commit*" nil log-edit) | 196 | ("message" "*cvs-commit*" nil log-edit) |
| 197 | ("log" "*cvs-info*" log-view-mode)) | 197 | ("log" "*cvs-info*" log-view-mode)) |
| 198 | "*Buffer name and mode to be used for each command. | 198 | "Buffer name and mode to be used for each command. |
| 199 | This is a list of elements of the form | 199 | This is a list of elements of the form |
| 200 | 200 | ||
| 201 | (CMD BUFNAME MODE &optional POSTPROC) | 201 | (CMD BUFNAME MODE &optional POSTPROC) |
| @@ -250,7 +250,7 @@ Output from cvs is placed here for asynchronous commands.") | |||
| 250 | (if (fboundp 'ediff) | 250 | (if (fboundp 'ediff) |
| 251 | '(cvs-ediff-diff . cvs-ediff-merge) | 251 | '(cvs-ediff-diff . cvs-ediff-merge) |
| 252 | '(cvs-emerge-diff . cvs-emerge-merge)) | 252 | '(cvs-emerge-diff . cvs-emerge-merge)) |
| 253 | "*Pair of functions to be used for resp. diff'ing and merg'ing interactively." | 253 | "Pair of functions to be used for resp. diff'ing and merg'ing interactively." |
| 254 | :group 'pcl-cvs | 254 | :group 'pcl-cvs |
| 255 | :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge)) | 255 | :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge)) |
| 256 | (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge)))) | 256 | (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge)))) |
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index a9105227bfd..1f2bad13dcd 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -618,7 +618,6 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 618 | (str (car hf)) | 618 | (str (car hf)) |
| 619 | (done "") | 619 | (done "") |
| 620 | (tin (ewoc-nth cvs-cookies 0))) | 620 | (tin (ewoc-nth cvs-cookies 0))) |
| 621 | (if (eq (length str) 2) (setq str "")) | ||
| 622 | ;; look for the first *real* fileinfo (to determine emptyness) | 621 | ;; look for the first *real* fileinfo (to determine emptyness) |
| 623 | (while | 622 | (while |
| 624 | (and tin | 623 | (and tin |
| @@ -626,14 +625,17 @@ If non-nil, NEW means to create a new buffer no matter what." | |||
| 626 | '(MESSAGE DIRCHANGE))) | 625 | '(MESSAGE DIRCHANGE))) |
| 627 | (setq tin (ewoc-next cvs-cookies tin))) | 626 | (setq tin (ewoc-next cvs-cookies tin))) |
| 628 | (if add | 627 | (if add |
| 629 | (setq str (concat "-- Running " cmd " ...\n" str)) | 628 | (progn |
| 629 | ;; Remove the default empty line, if applicable. | ||
| 630 | (if (not (string-match "." str)) (setq str "\n")) | ||
| 631 | (setq str (concat "-- Running " cmd " ...\n" str))) | ||
| 630 | (if (not (string-match | 632 | (if (not (string-match |
| 631 | (concat "^-- Running " (regexp-quote cmd) " \\.\\.\\.\n") str)) | 633 | (concat "^-- Running " (regexp-quote cmd) " \\.\\.\\.\n") str)) |
| 632 | (error "Internal PCL-CVS error while removing message") | 634 | (error "Internal PCL-CVS error while removing message") |
| 633 | (setq str (replace-match "" t t str)) | 635 | (setq str (replace-match "" t t str)) |
| 634 | (if (zerop (length str)) (setq str "\n")) | 636 | ;; Re-add the default empty line, if applicable. |
| 635 | (setq done (concat "-- last cmd: " cmd " --")))) | 637 | (if (not (string-match "." str)) (setq str "\n\n")) |
| 636 | (setq str (concat str "\n") done (concat done "\n")) | 638 | (setq done (concat "-- last cmd: " cmd " --\n")))) |
| 637 | ;; set the new header and footer | 639 | ;; set the new header and footer |
| 638 | (ewoc-set-hf cvs-cookies | 640 | (ewoc-set-hf cvs-cookies |
| 639 | str (concat "\n--------------------- " | 641 | str (concat "\n--------------------- " |
diff --git a/lisp/pgg-def.el b/lisp/pgg-def.el index 6481a433423..790b6bd1e6b 100644 --- a/lisp/pgg-def.el +++ b/lisp/pgg-def.el | |||
| @@ -71,6 +71,13 @@ Whether the passphrase is cached at all is controlled by | |||
| 71 | :group 'pgg | 71 | :group 'pgg |
| 72 | :type 'integer) | 72 | :type 'integer) |
| 73 | 73 | ||
| 74 | (defcustom pgg-passphrase-coding-system | ||
| 75 | (if (boundp 'locale-coding-system) | ||
| 76 | locale-coding-system) | ||
| 77 | "Coding system to encode passphrase." | ||
| 78 | :group 'pgg | ||
| 79 | :type 'coding-system) | ||
| 80 | |||
| 74 | (defvar pgg-messages-coding-system nil | 81 | (defvar pgg-messages-coding-system nil |
| 75 | "Coding system used when reading from a PGP external process.") | 82 | "Coding system used when reading from a PGP external process.") |
| 76 | 83 | ||
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index ab91471a619..4b8b79b068e 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el | |||
| @@ -74,23 +74,39 @@ | |||
| 74 | (errors-buffer pgg-errors-buffer) | 74 | (errors-buffer pgg-errors-buffer) |
| 75 | (orig-mode (default-file-modes)) | 75 | (orig-mode (default-file-modes)) |
| 76 | (process-connection-type nil) | 76 | (process-connection-type nil) |
| 77 | exit-status) | 77 | (inhibit-redisplay t) |
| 78 | process status exit-status | ||
| 79 | passphrase-with-newline | ||
| 80 | encoded-passphrase-with-new-line) | ||
| 78 | (with-current-buffer (get-buffer-create errors-buffer) | 81 | (with-current-buffer (get-buffer-create errors-buffer) |
| 79 | (buffer-disable-undo) | 82 | (buffer-disable-undo) |
| 80 | (erase-buffer)) | 83 | (erase-buffer)) |
| 81 | (unwind-protect | 84 | (unwind-protect |
| 82 | (progn | 85 | (progn |
| 83 | (set-default-file-modes 448) | 86 | (set-default-file-modes 448) |
| 84 | (let ((coding-system-for-write 'binary) | 87 | (let ((coding-system-for-write 'binary)) |
| 85 | (input (buffer-substring-no-properties start end)) | 88 | (setq process |
| 86 | (default-enable-multibyte-characters nil)) | 89 | (apply #'start-process "*GnuPG*" errors-buffer |
| 87 | (with-temp-buffer | 90 | program args))) |
| 88 | (when passphrase | 91 | (set-process-sentinel process #'ignore) |
| 89 | (insert passphrase "\n")) | 92 | (when passphrase |
| 90 | (insert input) | 93 | (setq passphrase-with-newline (concat passphrase "\n")) |
| 91 | (setq exit-status | 94 | (if pgg-passphrase-coding-system |
| 92 | (apply #'call-process-region (point-min) (point-max) program | 95 | (progn |
| 93 | nil errors-buffer nil args)))) | 96 | (setq encoded-passphrase-with-new-line |
| 97 | (encode-coding-string passphrase-with-newline | ||
| 98 | pgg-passphrase-coding-system)) | ||
| 99 | (pgg-clear-string passphrase-with-newline)) | ||
| 100 | (setq encoded-passphrase-with-new-line passphrase-with-newline | ||
| 101 | passphrase-with-newline nil)) | ||
| 102 | (process-send-string process encoded-passphrase-with-new-line)) | ||
| 103 | (process-send-region process start end) | ||
| 104 | (process-send-eof process) | ||
| 105 | (while (eq 'run (process-status process)) | ||
| 106 | (accept-process-output process 5)) | ||
| 107 | (setq status (process-status process) | ||
| 108 | exit-status (process-exit-status process)) | ||
| 109 | (delete-process process) | ||
| 94 | (with-current-buffer (get-buffer-create output-buffer) | 110 | (with-current-buffer (get-buffer-create output-buffer) |
| 95 | (buffer-disable-undo) | 111 | (buffer-disable-undo) |
| 96 | (erase-buffer) | 112 | (erase-buffer) |
| @@ -100,9 +116,16 @@ | |||
| 100 | 'binary))) | 116 | 'binary))) |
| 101 | (insert-file-contents output-file-name))) | 117 | (insert-file-contents output-file-name))) |
| 102 | (set-buffer errors-buffer) | 118 | (set-buffer errors-buffer) |
| 103 | (if (not (equal exit-status 0)) | 119 | (if (memq status '(stop signal)) |
| 104 | (insert (format "\n%s exited abnormally: '%s'\n" | 120 | (error "%s exited abnormally: '%s'" program exit-status)) |
| 105 | program exit-status))))) | 121 | (if (= 127 exit-status) |
| 122 | (error "%s could not be found" program)))) | ||
| 123 | (if passphrase-with-newline | ||
| 124 | (pgg-clear-string passphrase-with-newline)) | ||
| 125 | (if encoded-passphrase-with-new-line | ||
| 126 | (pgg-clear-string encoded-passphrase-with-new-line)) | ||
| 127 | (if (and process (eq 'run (process-status process))) | ||
| 128 | (interrupt-process process)) | ||
| 106 | (if (file-exists-p output-file-name) | 129 | (if (file-exists-p output-file-name) |
| 107 | (delete-file output-file-name)) | 130 | (delete-file output-file-name)) |
| 108 | (set-default-file-modes orig-mode)))) | 131 | (set-default-file-modes orig-mode)))) |
diff --git a/lisp/pgg.el b/lisp/pgg.el index 7a30dafce8d..e8a85b58fae 100644 --- a/lisp/pgg.el +++ b/lisp/pgg.el | |||
| @@ -148,6 +148,11 @@ regulate cache behavior." | |||
| 148 | #'pgg-remove-passphrase-from-cache | 148 | #'pgg-remove-passphrase-from-cache |
| 149 | key notruncate)))) | 149 | key notruncate)))) |
| 150 | 150 | ||
| 151 | (if (fboundp 'clear-string) | ||
| 152 | (defalias 'pgg-clear-string 'clear-string) | ||
| 153 | (defun pgg-clear-string (string) | ||
| 154 | (fillarray string ?_))) | ||
| 155 | |||
| 151 | (defun pgg-remove-passphrase-from-cache (key &optional notruncate) | 156 | (defun pgg-remove-passphrase-from-cache (key &optional notruncate) |
| 152 | "Omit passphrase associated with KEY in time-limited passphrase cache. | 157 | "Omit passphrase associated with KEY in time-limited passphrase cache. |
| 153 | 158 | ||
| @@ -166,7 +171,7 @@ regulate cache behavior." | |||
| 166 | (interned-timer-key (intern-soft key pgg-pending-timers)) | 171 | (interned-timer-key (intern-soft key pgg-pending-timers)) |
| 167 | (old-timer (symbol-value interned-timer-key))) | 172 | (old-timer (symbol-value interned-timer-key))) |
| 168 | (when passphrase | 173 | (when passphrase |
| 169 | (fillarray passphrase ?_) | 174 | (pgg-clear-string passphrase) |
| 170 | (unintern key pgg-passphrase-cache)) | 175 | (unintern key pgg-passphrase-cache)) |
| 171 | (when old-timer | 176 | (when old-timer |
| 172 | (pgg-cancel-timer old-timer) | 177 | (pgg-cancel-timer old-timer) |
diff --git a/lisp/play/life.el b/lisp/play/life.el index 263c4450c9d..ddbbcd70c70 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el | |||
| @@ -56,7 +56,28 @@ | |||
| 56 | " @@ " " @@ " " @@ " | 56 | " @@ " " @@ " " @@ " |
| 57 | " @@") | 57 | " @@") |
| 58 | ("@@@@@@@@@" "@ @ @" "@ @@@@@ @" "@ @ @ @" "@@@ @@@" | 58 | ("@@@@@@@@@" "@ @ @" "@ @@@@@ @" "@ @ @ @" "@@@ @@@" |
| 59 | "@ @ @ @" "@ @@@@@ @" "@ @ @" "@@@@@@@@@")] | 59 | "@ @ @ @" "@ @@@@@ @" "@ @ @" "@@@@@@@@@") |
| 60 | (" @ " | ||
| 61 | " @ @ " | ||
| 62 | " @@ @@ @@" | ||
| 63 | " @ @ @@ @@" | ||
| 64 | "@@ @ @ @@ " | ||
| 65 | "@@ @ @ @@ @ @ " | ||
| 66 | " @ @ @ " | ||
| 67 | " @ @ " | ||
| 68 | " @@ ") | ||
| 69 | (" @ " | ||
| 70 | " @ @@" | ||
| 71 | " @ @ " | ||
| 72 | " @ " | ||
| 73 | " @ " | ||
| 74 | "@ @ ") | ||
| 75 | ("@@@ @" | ||
| 76 | "@ " | ||
| 77 | " @@" | ||
| 78 | " @@ @" | ||
| 79 | "@ @ @") | ||
| 80 | ("@@@@@@@@ @@@@@ @@@ @@@@@@@ @@@@@")] | ||
| 60 | "Vector of rectangles containing some Life startup patterns.") | 81 | "Vector of rectangles containing some Life startup patterns.") |
| 61 | 82 | ||
| 62 | ;; Macros are used macros for manifest constants instead of variables | 83 | ;; Macros are used macros for manifest constants instead of variables |
| @@ -128,6 +149,7 @@ generations (this defaults to 1)." | |||
| 128 | mode-name "Life" | 149 | mode-name "Life" |
| 129 | major-mode 'life-mode | 150 | major-mode 'life-mode |
| 130 | truncate-lines t | 151 | truncate-lines t |
| 152 | show-trailing-whitespace nil | ||
| 131 | life-current-generation 0 | 153 | life-current-generation 0 |
| 132 | life-generation-string "0" | 154 | life-generation-string "0" |
| 133 | mode-line-buffer-identification '("Life: generation " | 155 | mode-line-buffer-identification '("Life: generation " |
| @@ -269,7 +291,8 @@ generations (this defaults to 1)." | |||
| 269 | (recenter 0) | 291 | (recenter 0) |
| 270 | 292 | ||
| 271 | ;; Redisplay; if the user has hit a key, exit the loop. | 293 | ;; Redisplay; if the user has hit a key, exit the loop. |
| 272 | (or (eq t (sit-for sleeptime)) | 294 | (or (and (sit-for sleeptime) (< 0 sleeptime)) |
| 295 | (not (input-pending-p)) | ||
| 273 | (throw 'life-exit nil))) | 296 | (throw 'life-exit nil))) |
| 274 | 297 | ||
| 275 | (defun life-extinct-quit () | 298 | (defun life-extinct-quit () |
diff --git a/lisp/printing.el b/lisp/printing.el index 94be3dfbfab..18252155e49 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 8 | ;; Time-stamp: <2006-02-06 15:06:40 ttn> | 8 | ;; Time-stamp: <2006/09/15 18:53:14 vinicius> |
| 9 | ;; Keywords: wp, print, PostScript | 9 | ;; Keywords: wp, print, PostScript |
| 10 | ;; Version: 6.8.4 | 10 | ;; Version: 6.8.4 |
| 11 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ | 11 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 12 | 12 | ||
| 13 | (defconst pr-version "6.8.4" | 13 | (defconst pr-version "6.8.4" |
| 14 | "printing.el, v 6.8.4 <2005/06/11 vinicius> | 14 | "printing.el, v 6.8.4 <2005/06/11 vinicius> |
| @@ -2799,7 +2799,7 @@ See `pr-ps-printer-alist'.") | |||
| 2799 | 2799 | ||
| 2800 | 2800 | ||
| 2801 | (defalias 'pr-get-symbol | 2801 | (defalias 'pr-get-symbol |
| 2802 | (if (fboundp 'easy-menu-intern) | 2802 | (if (fboundp 'easy-menu-intern) ; hacked from easymenu.el |
| 2803 | 'easy-menu-intern | 2803 | 'easy-menu-intern |
| 2804 | (lambda (s) (if (stringp s) (intern s) s)))) | 2804 | (lambda (s) (if (stringp s) (intern s) s)))) |
| 2805 | 2805 | ||
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 1b62774a72d..b70fe58b543 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -85,6 +85,12 @@ This includes those for cfservd as well as cfagent.")) | |||
| 85 | ;; File, acl &c in group: { token ... } | 85 | ;; File, acl &c in group: { token ... } |
| 86 | ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) | 86 | ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) |
| 87 | 87 | ||
| 88 | (defconst cfengine-font-lock-syntactic-keywords | ||
| 89 | ;; In the main syntax-table, backslash is marked as a punctuation, because | ||
| 90 | ;; of its use in DOS-style directory separators. Here we try to recognize | ||
| 91 | ;; the cases where backslash is used as an escape inside strings. | ||
| 92 | '(("\\(\\(?:\\\\\\)+\\)\"" . "\\"))) | ||
| 93 | |||
| 88 | (defvar cfengine-imenu-expression | 94 | (defvar cfengine-imenu-expression |
| 89 | `((nil ,(concat "^[ \t]*" (eval-when-compile | 95 | `((nil ,(concat "^[ \t]*" (eval-when-compile |
| 90 | (regexp-opt cfengine-actions t)) | 96 | (regexp-opt cfengine-actions t)) |
| @@ -218,7 +224,7 @@ to the action header." | |||
| 218 | ;; variable substitution: | 224 | ;; variable substitution: |
| 219 | (modify-syntax-entry ?$ "." cfengine-mode-syntax-table) | 225 | (modify-syntax-entry ?$ "." cfengine-mode-syntax-table) |
| 220 | ;; Doze path separators: | 226 | ;; Doze path separators: |
| 221 | (modify-syntax-entry ?\\ "_" cfengine-mode-syntax-table) | 227 | (modify-syntax-entry ?\\ "." cfengine-mode-syntax-table) |
| 222 | ;; Otherwise, syntax defaults seem OK to give reasonable word | 228 | ;; Otherwise, syntax defaults seem OK to give reasonable word |
| 223 | ;; movement. | 229 | ;; movement. |
| 224 | 230 | ||
| @@ -237,7 +243,9 @@ to the action header." | |||
| 237 | ;; functions in evaluated classes to string syntax, and then obey | 243 | ;; functions in evaluated classes to string syntax, and then obey |
| 238 | ;; syntax properties. | 244 | ;; syntax properties. |
| 239 | (setq font-lock-defaults | 245 | (setq font-lock-defaults |
| 240 | '(cfengine-font-lock-keywords nil nil nil beginning-of-line)) | 246 | '(cfengine-font-lock-keywords nil nil nil beginning-of-line |
| 247 | (font-lock-syntactic-keywords | ||
| 248 | . cfengine-font-lock-syntactic-keywords))) | ||
| 241 | (setq imenu-generic-expression cfengine-imenu-expression) | 249 | (setq imenu-generic-expression cfengine-imenu-expression) |
| 242 | (set (make-local-variable 'beginning-of-defun-function) | 250 | (set (make-local-variable 'beginning-of-defun-function) |
| 243 | #'cfengine-beginning-of-defun) | 251 | #'cfengine-beginning-of-defun) |
| @@ -249,5 +257,5 @@ to the action header." | |||
| 249 | 257 | ||
| 250 | (provide 'cfengine) | 258 | (provide 'cfengine) |
| 251 | 259 | ||
| 252 | ;;; arch-tag: 6b931be2-1505-4124-afa6-9675971e26d4 | 260 | ;; arch-tag: 6b931be2-1505-4124-afa6-9675971e26d4 |
| 253 | ;;; cfengine.el ends here | 261 | ;;; cfengine.el ends here |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e8c09113d39..7d9ce41229c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -218,10 +218,6 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 218 | nil 1 nil 2 0 | 218 | nil 1 nil 2 0 |
| 219 | (2 (compilation-face '(3)))) | 219 | (2 (compilation-face '(3)))) |
| 220 | 220 | ||
| 221 | (gcc-include | ||
| 222 | "^\\(?:In file included\\| \\) from \ | ||
| 223 | \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) | ||
| 224 | |||
| 225 | (gnu | 221 | (gnu |
| 226 | ;; I have no idea what this first line is supposed to match, but it | 222 | ;; I have no idea what this first line is supposed to match, but it |
| 227 | ;; makes things ambiguous with output such as "foo:344:50:blabla" since | 223 | ;; makes things ambiguous with output such as "foo:344:50:blabla" since |
| @@ -233,7 +229,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 233 | ;; the last line tries to rule out message where the info after the | 229 | ;; the last line tries to rule out message where the info after the |
| 234 | ;; line number starts with "SS". --Stef | 230 | ;; line number starts with "SS". --Stef |
| 235 | "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ | 231 | "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ |
| 236 | \\([0-9]*[^0-9\n].*?\\): ?\ | 232 | \\([0-9]*[^0-9\n]\\(?:[^\n ]\\| [^-\n]\\)*?\\): ?\ |
| 237 | \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ | 233 | \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ |
| 238 | \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ | 234 | \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ |
| 239 | \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ | 235 | \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ |
| @@ -241,6 +237,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 241 | \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)" | 237 | \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)" |
| 242 | 1 (2 . 5) (4 . 6) (7 . 8)) | 238 | 1 (2 . 5) (4 . 6) (7 . 8)) |
| 243 | 239 | ||
| 240 | ;; The `gnu' style above can incorrectly match gcc's "In file | ||
| 241 | ;; included from" message, so we process that first. -- cyd | ||
| 242 | (gcc-include | ||
| 243 | "^\\(?:In file included\\| \\) from \ | ||
| 244 | \\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) | ||
| 245 | |||
| 244 | (lcc | 246 | (lcc |
| 245 | "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" | 247 | "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" |
| 246 | 2 3 4 (1)) | 248 | 2 3 4 (1)) |
| @@ -623,7 +625,7 @@ Faces `compilation-error-face', `compilation-warning-face', | |||
| 623 | (cons (match-string-no-properties idx) dir)) | 625 | (cons (match-string-no-properties idx) dir)) |
| 624 | mouse-face highlight | 626 | mouse-face highlight |
| 625 | keymap compilation-button-map | 627 | keymap compilation-button-map |
| 626 | help-echo "mouse-2: visit current directory"))) | 628 | help-echo "mouse-2: visit this directory"))) |
| 627 | 629 | ||
| 628 | ;; Data type `reverse-ordered-alist' retriever. This function retrieves the | 630 | ;; Data type `reverse-ordered-alist' retriever. This function retrieves the |
| 629 | ;; KEY element from the ALIST, creating it in the right position if not already | 631 | ;; KEY element from the ALIST, creating it in the right position if not already |
| @@ -1066,7 +1068,8 @@ Returns the compilation buffer created." | |||
| 1066 | (window-width)))) | 1068 | (window-width)))) |
| 1067 | ;; Set the EMACS variable, but | 1069 | ;; Set the EMACS variable, but |
| 1068 | ;; don't override users' setting of $EMACS. | 1070 | ;; don't override users' setting of $EMACS. |
| 1069 | (unless (getenv "EMACS") '("EMACS=t")) | 1071 | (unless (getenv "EMACS") |
| 1072 | (list (concat "EMACS=" invocation-directory invocation-name))) | ||
| 1070 | (copy-sequence process-environment)))) | 1073 | (copy-sequence process-environment)))) |
| 1071 | (set (make-local-variable 'compilation-arguments) | 1074 | (set (make-local-variable 'compilation-arguments) |
| 1072 | (list command mode name-function highlight-regexp)) | 1075 | (list command mode name-function highlight-regexp)) |
| @@ -1781,17 +1784,31 @@ and overlay is highlighted between MK and END-MK." | |||
| 1781 | (current-buffer))) | 1784 | (current-buffer))) |
| 1782 | (move-overlay compilation-highlight-overlay | 1785 | (move-overlay compilation-highlight-overlay |
| 1783 | (point) end (current-buffer))) | 1786 | (point) end (current-buffer))) |
| 1784 | (if (numberp next-error-highlight) | 1787 | (if (or (eq next-error-highlight t) |
| 1785 | (setq next-error-highlight-timer | 1788 | (numberp next-error-highlight)) |
| 1786 | (run-at-time next-error-highlight nil 'delete-overlay | 1789 | ;; We want highlighting: delete overlay on next input. |
| 1787 | compilation-highlight-overlay))) | 1790 | (add-hook 'pre-command-hook |
| 1788 | (if (not (or (eq next-error-highlight t) | 1791 | 'compilation-goto-locus-delete-o) |
| 1789 | (numberp next-error-highlight))) | 1792 | ;; We don't want highlighting: delete overlay now. |
| 1790 | (delete-overlay compilation-highlight-overlay)))))) | 1793 | (delete-overlay compilation-highlight-overlay)) |
| 1794 | ;; We want highlighting for a limited time: | ||
| 1795 | ;; set up a timer to delete it. | ||
| 1796 | (when (numberp next-error-highlight) | ||
| 1797 | (setq next-error-highlight-timer | ||
| 1798 | (run-at-time next-error-highlight nil | ||
| 1799 | 'compilation-goto-locus-delete-o))))))) | ||
| 1791 | (when (and (eq next-error-highlight 'fringe-arrow)) | 1800 | (when (and (eq next-error-highlight 'fringe-arrow)) |
| 1801 | ;; We want a fringe arrow (instead of highlighting). | ||
| 1792 | (setq next-error-overlay-arrow-position | 1802 | (setq next-error-overlay-arrow-position |
| 1793 | (copy-marker (line-beginning-position)))))) | 1803 | (copy-marker (line-beginning-position)))))) |
| 1794 | 1804 | ||
| 1805 | (defun compilation-goto-locus-delete-o () | ||
| 1806 | (delete-overlay compilation-highlight-overlay) | ||
| 1807 | ;; Get rid of timer and hook that would try to do this again. | ||
| 1808 | (if (timerp next-error-highlight-timer) | ||
| 1809 | (cancel-timer next-error-highlight-timer)) | ||
| 1810 | (remove-hook 'pre-command-hook | ||
| 1811 | 'compilation-goto-locus-delete-o)) | ||
| 1795 | 1812 | ||
| 1796 | (defun compilation-find-file (marker filename directory &rest formats) | 1813 | (defun compilation-find-file (marker filename directory &rest formats) |
| 1797 | "Find a buffer for file FILENAME. | 1814 | "Find a buffer for file FILENAME. |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index ad44753f352..3264e0e72f6 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Free Software Foundation, Inc. | 5 | ;; Free Software Foundation, Inc. |
| 6 | 6 | ||
| 7 | ;; Author: Ilya Zakharevich and Bob Olson | 7 | ;; Author: Ilya Zakharevich and Bob Olson |
| 8 | ;; Maintainer: Ilya Zakharevich <cperl@ilyaz.org> | 8 | ;; Maintainer: Ilya Zakharevich <ilyaz@cpan.org> |
| 9 | ;; Keywords: languages, Perl | 9 | ;; Keywords: languages, Perl |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| @@ -25,7 +25,7 @@ | |||
| 25 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 25 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 26 | ;; Boston, MA 02110-1301, USA. | 26 | ;; Boston, MA 02110-1301, USA. |
| 27 | 27 | ||
| 28 | ;;; Corrections made by Ilya Zakharevich cperl@ilyaz.org | 28 | ;;; Corrections made by Ilya Zakharevich ilyaz@cpan.org |
| 29 | 29 | ||
| 30 | ;;; Commentary: | 30 | ;;; Commentary: |
| 31 | 31 | ||
| @@ -67,67 +67,89 @@ | |||
| 67 | ;; likewise with m, tr, y, q, qX instead of s | 67 | ;; likewise with m, tr, y, q, qX instead of s |
| 68 | 68 | ||
| 69 | ;;; Code: | 69 | ;;; Code: |
| 70 | 70 | ||
| 71 | (defvar vc-rcs-header) | 71 | (defvar vc-rcs-header) |
| 72 | (defvar vc-sccs-header) | 72 | (defvar vc-sccs-header) |
| 73 | 73 | ||
| 74 | ;; Some macros are needed for `defcustom' | ||
| 75 | (eval-when-compile | 74 | (eval-when-compile |
| 76 | (condition-case nil | 75 | (condition-case nil |
| 77 | (require 'man) | 76 | (require 'custom) |
| 78 | (error nil)) | 77 | (error nil)) |
| 79 | (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version)) | 78 | (condition-case nil |
| 80 | (defvar cperl-can-font-lock | 79 | (require 'man) |
| 81 | (or cperl-xemacs-p | 80 | (error nil)) |
| 82 | (and (boundp 'emacs-major-version) | 81 | (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version)) |
| 83 | (or window-system | 82 | (defvar cperl-can-font-lock |
| 84 | (> emacs-major-version 20))))) | 83 | (or cperl-xemacs-p |
| 85 | (if cperl-can-font-lock | 84 | (and (boundp 'emacs-major-version) |
| 86 | (require 'font-lock)) | 85 | (or window-system |
| 87 | (defvar msb-menu-cond) | 86 | (> emacs-major-version 20))))) |
| 88 | (defvar gud-perldb-history) | 87 | (if cperl-can-font-lock |
| 89 | (defvar font-lock-background-mode) ; not in Emacs | 88 | (require 'font-lock)) |
| 90 | (defvar font-lock-display-type) ; ditto | 89 | (defvar msb-menu-cond) |
| 91 | (defmacro cperl-is-face (arg) ; Takes quoted arg | 90 | (defvar gud-perldb-history) |
| 92 | (cond ((fboundp 'find-face) | 91 | (defvar font-lock-background-mode) ; not in Emacs |
| 93 | `(find-face ,arg)) | 92 | (defvar font-lock-display-type) ; ditto |
| 94 | (;;(and (fboundp 'face-list) | 93 | (defvar paren-backwards-message) ; Not in newer XEmacs? |
| 95 | ;; (face-list)) | 94 | (or (fboundp 'defgroup) |
| 96 | (fboundp 'face-list) | 95 | (defmacro defgroup (name val doc &rest arr) |
| 97 | `(member ,arg (and (fboundp 'face-list) | 96 | nil)) |
| 98 | (face-list)))) | 97 | (or (fboundp 'custom-declare-variable) |
| 99 | (t | 98 | (defmacro defcustom (name val doc &rest arr) |
| 100 | `(boundp ,arg)))) | 99 | (` (defvar (, name) (, val) (, doc))))) |
| 101 | (defmacro cperl-make-face (arg descr) ; Takes unquoted arg | 100 | (or (and (fboundp 'custom-declare-variable) |
| 102 | (cond ((fboundp 'make-face) | 101 | (string< "19.31" emacs-version)) ; Checked with 19.30: defface does not work |
| 103 | `(make-face (quote ,arg))) | 102 | (defmacro defface (&rest arr) |
| 104 | (t | 103 | nil)) |
| 105 | `(defvar ,arg (quote ,arg) ,descr)))) | 104 | ;; Avoid warning (tmp definitions) |
| 106 | (defmacro cperl-force-face (arg descr) ; Takes unquoted arg | 105 | (or (fboundp 'x-color-defined-p) |
| 107 | `(progn | 106 | (defmacro x-color-defined-p (col) |
| 108 | (or (cperl-is-face (quote ,arg)) | 107 | (cond ((fboundp 'color-defined-p) (` (color-defined-p (, col)))) |
| 109 | (cperl-make-face ,arg ,descr)) | 108 | ;; XEmacs >= 19.12 |
| 110 | (or (boundp (quote ,arg)) ; We use unquoted variants too | 109 | ((fboundp 'valid-color-name-p) (` (valid-color-name-p (, col)))) |
| 111 | (defvar ,arg (quote ,arg) ,descr)))) | 110 | ;; XEmacs 19.11 |
| 112 | (if cperl-xemacs-p | 111 | ((fboundp 'x-valid-color-name-p) (` (x-valid-color-name-p (, col)))) |
| 113 | (defmacro cperl-etags-snarf-tag (file line) | 112 | (t '(error "Cannot implement color-defined-p"))))) |
| 114 | `(progn | 113 | (defmacro cperl-is-face (arg) ; Takes quoted arg |
| 115 | (beginning-of-line 2) | 114 | (cond ((fboundp 'find-face) |
| 116 | (list ,file ,line))) | 115 | (` (find-face (, arg)))) |
| 117 | (defmacro cperl-etags-snarf-tag (file line) | 116 | (;;(and (fboundp 'face-list) |
| 118 | `(etags-snarf-tag))) | 117 | ;; (face-list)) |
| 119 | (if cperl-xemacs-p | 118 | (fboundp 'face-list) |
| 120 | (defmacro cperl-etags-goto-tag-location (elt) | 119 | (` (member (, arg) (and (fboundp 'face-list) |
| 121 | ;;(progn | 120 | (face-list))))) |
| 122 | ;; (switch-to-buffer (get-file-buffer (elt (, elt) 0))) | 121 | (t |
| 123 | ;; (set-buffer (get-file-buffer (elt (, elt) 0))) | 122 | (` (boundp (, arg)))))) |
| 124 | ;; Probably will not work due to some save-excursion??? | 123 | (defmacro cperl-make-face (arg descr) ; Takes unquoted arg |
| 125 | ;; Or save-file-position? | 124 | (cond ((fboundp 'make-face) |
| 126 | ;; (message "Did I get to line %s?" (elt (, elt) 1)) | 125 | (` (make-face (quote (, arg))))) |
| 127 | `(goto-line (string-to-number (elt ,elt 1)))) | 126 | (t |
| 128 | ;;) | 127 | (` (defvar (, arg) (quote (, arg)) (, descr)))))) |
| 129 | (defmacro cperl-etags-goto-tag-location (elt) | 128 | (defmacro cperl-force-face (arg descr) ; Takes unquoted arg |
| 130 | `(etags-goto-tag-location ,elt)))) | 129 | (` (progn |
| 130 | (or (cperl-is-face (quote (, arg))) | ||
| 131 | (cperl-make-face (, arg) (, descr))) | ||
| 132 | (or (boundp (quote (, arg))) ; We use unquoted variants too | ||
| 133 | (defvar (, arg) (quote (, arg)) (, descr)))))) | ||
| 134 | (if cperl-xemacs-p | ||
| 135 | (defmacro cperl-etags-snarf-tag (file line) | ||
| 136 | (` (progn | ||
| 137 | (beginning-of-line 2) | ||
| 138 | (list (, file) (, line))))) | ||
| 139 | (defmacro cperl-etags-snarf-tag (file line) | ||
| 140 | (` (etags-snarf-tag)))) | ||
| 141 | (if cperl-xemacs-p | ||
| 142 | (defmacro cperl-etags-goto-tag-location (elt) | ||
| 143 | (`;;(progn | ||
| 144 | ;; (switch-to-buffer (get-file-buffer (elt (, elt) 0))) | ||
| 145 | ;; (set-buffer (get-file-buffer (elt (, elt) 0))) | ||
| 146 | ;; Probably will not work due to some save-excursion??? | ||
| 147 | ;; Or save-file-position? | ||
| 148 | ;; (message "Did I get to line %s?" (elt (, elt) 1)) | ||
| 149 | (goto-line (string-to-int (elt (, elt) 1))))) | ||
| 150 | ;;) | ||
| 151 | (defmacro cperl-etags-goto-tag-location (elt) | ||
| 152 | (` (etags-goto-tag-location (, elt)))))) | ||
| 131 | 153 | ||
| 132 | (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version)) | 154 | (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version)) |
| 133 | 155 | ||
| @@ -251,6 +273,12 @@ This is in addition to cperl-continued-statement-offset." | |||
| 251 | :type 'integer | 273 | :type 'integer |
| 252 | :group 'cperl-indentation-details) | 274 | :group 'cperl-indentation-details) |
| 253 | 275 | ||
| 276 | (defcustom cperl-indent-wrt-brace t | ||
| 277 | "*Non-nil means indent statements in if/etc block relative brace, not if/etc. | ||
| 278 | Versions 5.2 ... 5.20 behaved as if this were `nil'." | ||
| 279 | :type 'boolean | ||
| 280 | :group 'cperl-indentation-details) | ||
| 281 | |||
| 254 | (defcustom cperl-auto-newline nil | 282 | (defcustom cperl-auto-newline nil |
| 255 | "*Non-nil means automatically newline before and after braces, | 283 | "*Non-nil means automatically newline before and after braces, |
| 256 | and after colons and semicolons, inserted in CPerl code. The following | 284 | and after colons and semicolons, inserted in CPerl code. The following |
| @@ -347,20 +375,26 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', | |||
| 347 | :type 'integer | 375 | :type 'integer |
| 348 | :group 'cperl-indentation-details) | 376 | :group 'cperl-indentation-details) |
| 349 | 377 | ||
| 350 | (defvar cperl-vc-header-alist nil) | 378 | (defcustom cperl-indent-comment-at-column-0 nil |
| 351 | (make-obsolete-variable | 379 | "*Non-nil means that comment started at column 0 should be indentable." |
| 352 | 'cperl-vc-header-alist | 380 | :type 'boolean |
| 353 | "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.") | 381 | :group 'cperl-indentation-details) |
| 354 | 382 | ||
| 355 | (defcustom cperl-vc-sccs-header '("($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;") | 383 | (defcustom cperl-vc-sccs-header '("($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;") |
| 356 | "*Special version of `vc-sccs-header' that is used in CPerl mode buffers." | 384 | "*Special version of `vc-sccs-header' that is used in CPerl mode buffers." |
| 357 | :type '(repeat string) | 385 | :type '(repeat string) |
| 358 | :group 'cperl) | 386 | :group 'cperl) |
| 359 | 387 | ||
| 360 | (defcustom cperl-vc-rcs-header '("($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/) ;") | 388 | (defcustom cperl-vc-rcs-header '("($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/);") |
| 361 | "*Special version of `vc-rcs-header' that is used in CPerl mode buffers." | 389 | "*Special version of `vc-rcs-header' that is used in CPerl mode buffers." |
| 362 | :type '(repeat string) | 390 | :type '(repeat string) |
| 363 | :group 'cperl) | 391 | :group 'cperl) |
| 392 | |||
| 393 | ;; This became obsolete... | ||
| 394 | (defvar cperl-vc-header-alist nil) | ||
| 395 | (make-obsolete-variable | ||
| 396 | 'cperl-vc-header-alist | ||
| 397 | "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.") | ||
| 364 | 398 | ||
| 365 | (defcustom cperl-clobber-mode-lists | 399 | (defcustom cperl-clobber-mode-lists |
| 366 | (not | 400 | (not |
| @@ -408,8 +442,15 @@ Font for POD headers." | |||
| 408 | :type 'face | 442 | :type 'face |
| 409 | :group 'cperl-faces) | 443 | :group 'cperl-faces) |
| 410 | 444 | ||
| 411 | (defcustom cperl-invalid-face 'underline | 445 | ;;; Some double-evaluation happened with font-locks... Needed with 21.2... |
| 412 | "*Face for highlighting trailing whitespace." | 446 | (defvar cperl-singly-quote-face cperl-xemacs-p) |
| 447 | |||
| 448 | (defcustom cperl-invalid-face ; Does not customize with '' on XEmacs | ||
| 449 | (if cperl-singly-quote-face | ||
| 450 | 'underline ''underline) ; On older Emacsen was evaluated by `font-lock' | ||
| 451 | (if cperl-singly-quote-face | ||
| 452 | "*This face is used for highlighting trailing whitespace." | ||
| 453 | "*Face for highlighting trailing whitespace.") | ||
| 413 | :type 'face | 454 | :type 'face |
| 414 | :version "21.1" | 455 | :version "21.1" |
| 415 | :group 'cperl-faces) | 456 | :group 'cperl-faces) |
| @@ -441,7 +482,14 @@ You can always make lookup from menu or using \\[cperl-find-pods-heres]." | |||
| 441 | 482 | ||
| 442 | (defcustom cperl-regexp-scan t | 483 | (defcustom cperl-regexp-scan t |
| 443 | "*Not-nil means make marking of regular expression more thorough. | 484 | "*Not-nil means make marking of regular expression more thorough. |
| 444 | Effective only with `cperl-pod-here-scan'. Not implemented yet." | 485 | Effective only with `cperl-pod-here-scan'." |
| 486 | :type 'boolean | ||
| 487 | :group 'cperl-speed) | ||
| 488 | |||
| 489 | (defcustom cperl-hook-after-change t | ||
| 490 | "*Not-nil means install hook to know which regions of buffer are changed. | ||
| 491 | May significantly speed up delayed fontification. Changes take effect | ||
| 492 | after reload." | ||
| 445 | :type 'boolean | 493 | :type 'boolean |
| 446 | :group 'cperl-speed) | 494 | :group 'cperl-speed) |
| 447 | 495 | ||
| @@ -564,17 +612,25 @@ when syntaxifying a chunk of buffer." | |||
| 564 | :type 'boolean | 612 | :type 'boolean |
| 565 | :group 'cperl-speed) | 613 | :group 'cperl-speed) |
| 566 | 614 | ||
| 615 | (defcustom cperl-syntaxify-for-menu | ||
| 616 | t | ||
| 617 | "*Non-nil means that CPerl syntaxifies up to the point before showing menu. | ||
| 618 | This way enabling/disabling of menu items is more correct." | ||
| 619 | :type 'boolean | ||
| 620 | :group 'cperl-speed) | ||
| 621 | |||
| 567 | (defcustom cperl-ps-print-face-properties | 622 | (defcustom cperl-ps-print-face-properties |
| 568 | '((font-lock-keyword-face nil nil bold shadow) | 623 | '((font-lock-keyword-face nil nil bold shadow) |
| 569 | (font-lock-variable-name-face nil nil bold) | 624 | (font-lock-variable-name-face nil nil bold) |
| 570 | (font-lock-function-name-face nil nil bold italic box) | 625 | (font-lock-function-name-face nil nil bold italic box) |
| 571 | (font-lock-constant-face nil "LightGray" bold) | 626 | (font-lock-constant-face nil "LightGray" bold) |
| 572 | (cperl-array nil "LightGray" bold underline) | 627 | (cperl-array-face nil "LightGray" bold underline) |
| 573 | (cperl-hash nil "LightGray" bold italic underline) | 628 | (cperl-hash-face nil "LightGray" bold italic underline) |
| 574 | (font-lock-comment-face nil "LightGray" italic) | 629 | (font-lock-comment-face nil "LightGray" italic) |
| 575 | (font-lock-string-face nil nil italic underline) | 630 | (font-lock-string-face nil nil italic underline) |
| 576 | (cperl-nonoverridable nil nil italic underline) | 631 | (cperl-nonoverridable-face nil nil italic underline) |
| 577 | (font-lock-type-face nil nil underline) | 632 | (font-lock-type-face nil nil underline) |
| 633 | (font-lock-warning-face nil "LightGray" bold italic box) | ||
| 578 | (underline nil "LightGray" strikeout)) | 634 | (underline nil "LightGray" strikeout)) |
| 579 | "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'." | 635 | "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'." |
| 580 | :type '(repeat (cons symbol | 636 | :type '(repeat (cons symbol |
| @@ -588,7 +644,7 @@ when syntaxifying a chunk of buffer." | |||
| 588 | (defvar cperl-dark-foreground | 644 | (defvar cperl-dark-foreground |
| 589 | (cperl-choose-color "orchid1" "orange")) | 645 | (cperl-choose-color "orchid1" "orange")) |
| 590 | 646 | ||
| 591 | (defface cperl-nonoverridable | 647 | (defface cperl-nonoverridable-face |
| 592 | `((((class grayscale) (background light)) | 648 | `((((class grayscale) (background light)) |
| 593 | (:background "Gray90" :slant italic :underline t)) | 649 | (:background "Gray90" :slant italic :underline t)) |
| 594 | (((class grayscale) (background dark)) | 650 | (((class grayscale) (background dark)) |
| @@ -600,10 +656,8 @@ when syntaxifying a chunk of buffer." | |||
| 600 | (t (:weight bold :underline t))) | 656 | (t (:weight bold :underline t))) |
| 601 | "Font Lock mode face used non-overridable keywords and modifiers of regexps." | 657 | "Font Lock mode face used non-overridable keywords and modifiers of regexps." |
| 602 | :group 'cperl-faces) | 658 | :group 'cperl-faces) |
| 603 | ;; backward-compatibility alias | ||
| 604 | (put 'cperl-nonoverridable-face 'face-alias 'cperl-nonoverridable) | ||
| 605 | 659 | ||
| 606 | (defface cperl-array | 660 | (defface cperl-array-face |
| 607 | `((((class grayscale) (background light)) | 661 | `((((class grayscale) (background light)) |
| 608 | (:background "Gray90" :weight bold)) | 662 | (:background "Gray90" :weight bold)) |
| 609 | (((class grayscale) (background dark)) | 663 | (((class grayscale) (background dark)) |
| @@ -615,10 +669,8 @@ when syntaxifying a chunk of buffer." | |||
| 615 | (t (:weight bold))) | 669 | (t (:weight bold))) |
| 616 | "Font Lock mode face used to highlight array names." | 670 | "Font Lock mode face used to highlight array names." |
| 617 | :group 'cperl-faces) | 671 | :group 'cperl-faces) |
| 618 | ;; backward-compatibility alias | ||
| 619 | (put 'cperl-array-face 'face-alias 'cperl-array) | ||
| 620 | 672 | ||
| 621 | (defface cperl-hash | 673 | (defface cperl-hash-face |
| 622 | `((((class grayscale) (background light)) | 674 | `((((class grayscale) (background light)) |
| 623 | (:background "Gray90" :weight bold :slant italic)) | 675 | (:background "Gray90" :weight bold :slant italic)) |
| 624 | (((class grayscale) (background dark)) | 676 | (((class grayscale) (background dark)) |
| @@ -630,8 +682,6 @@ when syntaxifying a chunk of buffer." | |||
| 630 | (t (:weight bold :slant italic))) | 682 | (t (:weight bold :slant italic))) |
| 631 | "Font Lock mode face used to highlight hash names." | 683 | "Font Lock mode face used to highlight hash names." |
| 632 | :group 'cperl-faces) | 684 | :group 'cperl-faces) |
| 633 | ;; backward-compatibility alias | ||
| 634 | (put 'cperl-hash-face 'face-alias 'cperl-hash) | ||
| 635 | 685 | ||
| 636 | 686 | ||
| 637 | 687 | ||
| @@ -639,9 +689,7 @@ when syntaxifying a chunk of buffer." | |||
| 639 | 689 | ||
| 640 | (defvar cperl-tips 'please-ignore-this-line | 690 | (defvar cperl-tips 'please-ignore-this-line |
| 641 | "Get maybe newer version of this package from | 691 | "Get maybe newer version of this package from |
| 642 | ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs | 692 | http://ilyaz.org/software/emacs |
| 643 | and/or | ||
| 644 | ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl | ||
| 645 | Subdirectory `cperl-mode' may contain yet newer development releases and/or | 693 | Subdirectory `cperl-mode' may contain yet newer development releases and/or |
| 646 | patches to related files. | 694 | patches to related files. |
| 647 | 695 | ||
| @@ -666,9 +714,9 @@ want it to: put the following into your .emacs file: | |||
| 666 | (defalias 'perl-mode 'cperl-mode) | 714 | (defalias 'perl-mode 'cperl-mode) |
| 667 | 715 | ||
| 668 | Get perl5-info from | 716 | Get perl5-info from |
| 669 | $CPAN/doc/manual/info/perl-info.tar.gz | 717 | $CPAN/doc/manual/info/perl5-old/perl5-info.tar.gz |
| 670 | older version was on | 718 | Also, one can generate a newer documentation running `pod2texi' converter |
| 671 | http://www.metronet.com:70/9/perlinfo/perl5/manual/perl5-info.tar.gz | 719 | $CPAN/doc/manual/info/perl5/pod2texi-0.1.tar.gz |
| 672 | 720 | ||
| 673 | If you use imenu-go, run imenu on perl5-info buffer (you can do it | 721 | If you use imenu-go, run imenu on perl5-info buffer (you can do it |
| 674 | from Perl menu). If many files are related, generate TAGS files from | 722 | from Perl menu). If many files are related, generate TAGS files from |
| @@ -700,11 +748,18 @@ micro-docs on what I know about CPerl problems.") | |||
| 700 | "Description of problems in CPerl mode. | 748 | "Description of problems in CPerl mode. |
| 701 | Some faces will not be shown on some versions of Emacs unless you | 749 | Some faces will not be shown on some versions of Emacs unless you |
| 702 | install choose-color.el, available from | 750 | install choose-color.el, available from |
| 703 | ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/ | 751 | http://ilyaz.org/software/emacs |
| 704 | 752 | ||
| 705 | `fill-paragraph' on a comment may leave the point behind the | 753 | `fill-paragraph' on a comment may leave the point behind the |
| 706 | paragraph. Parsing of lines with several <<EOF is not implemented | 754 | paragraph. It also triggers a bug in some versions of Emacs (CPerl tries |
| 707 | yet. | 755 | to detect it and bulk out). |
| 756 | |||
| 757 | See documentation of a variable `cperl-problems-old-emaxen' for the | ||
| 758 | problems which disappear if you upgrade Emacs to a reasonably new | ||
| 759 | version (20.3 for Emacs, and those of 2004 for XEmacs).") | ||
| 760 | |||
| 761 | (defvar cperl-problems-old-emaxen 'please-ignore-this-line | ||
| 762 | "Description of problems in CPerl mode specific for older Emacs versions. | ||
| 708 | 763 | ||
| 709 | Emacs had a _very_ restricted syntax parsing engine until version | 764 | Emacs had a _very_ restricted syntax parsing engine until version |
| 710 | 20.1. Most problems below are corrected starting from this version of | 765 | 20.1. Most problems below are corrected starting from this version of |
| @@ -812,6 +867,13 @@ voice); | |||
| 812 | o) Highlights trailing whitespace; | 867 | o) Highlights trailing whitespace; |
| 813 | p) Is able to manipulate Perl Regular Expressions to ease | 868 | p) Is able to manipulate Perl Regular Expressions to ease |
| 814 | conversion to a more readable form. | 869 | conversion to a more readable form. |
| 870 | q) Can ispell POD sections and HERE-DOCs. | ||
| 871 | r) Understands comments and character classes inside regular | ||
| 872 | expressions; can find matching () and [] in a regular expression. | ||
| 873 | s) Allows indentation of //x-style regular expressions; | ||
| 874 | t) Highlights different symbols in regular expressions according | ||
| 875 | to their function; much less problems with backslashitis; | ||
| 876 | u) Allows to find regular expressions which contain interpolated parts. | ||
| 815 | 877 | ||
| 816 | 5) The indentation engine was very smart, but most of tricks may be | 878 | 5) The indentation engine was very smart, but most of tricks may be |
| 817 | not needed anymore with the support for `syntax-table' property. Has | 879 | not needed anymore with the support for `syntax-table' property. Has |
| @@ -829,7 +891,10 @@ the settings present before the switch. | |||
| 829 | line-breaks/spacing between elements of the construct. | 891 | line-breaks/spacing between elements of the construct. |
| 830 | 892 | ||
| 831 | 10) Uses a linear-time algorith for indentation of regions (on Emaxen with | 893 | 10) Uses a linear-time algorith for indentation of regions (on Emaxen with |
| 832 | capable syntax engines).") | 894 | capable syntax engines). |
| 895 | |||
| 896 | 11) Syntax-highlight, indentation, sexp-recognition inside regular expressions. | ||
| 897 | ") | ||
| 833 | 898 | ||
| 834 | (defvar cperl-speed 'please-ignore-this-line | 899 | (defvar cperl-speed 'please-ignore-this-line |
| 835 | "This is an incomplete compendium of what is available in other parts | 900 | "This is an incomplete compendium of what is available in other parts |
| @@ -878,19 +943,19 @@ B) Speed of editing operations. | |||
| 878 | (defvar cperl-tips-faces 'please-ignore-this-line | 943 | (defvar cperl-tips-faces 'please-ignore-this-line |
| 879 | "CPerl mode uses following faces for highlighting: | 944 | "CPerl mode uses following faces for highlighting: |
| 880 | 945 | ||
| 881 | `cperl-array' Array names | 946 | `cperl-array-face' Array names |
| 882 | `cperl-hash' Hash names | 947 | `cperl-hash-face' Hash names |
| 883 | `font-lock-comment-face' Comments, PODs and whatever is considered | 948 | `font-lock-comment-face' Comments, PODs and whatever is considered |
| 884 | syntaxically to be not code | 949 | syntaxically to be not code |
| 885 | `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of | 950 | `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of |
| 886 | 2-arg operators s/y/tr/ or of RExen, | 951 | 2-arg operators s/y/tr/ or of RExen, |
| 887 | `font-lock-function-name-face' Special-cased m// and s//foo/, _ as | 952 | `font-lock-warning-face' Special-cased m// and s//foo/, |
| 888 | a target of a file tests, file tests, | 953 | `font-lock-function-name-face' _ as a target of a file tests, file tests, |
| 889 | subroutine names at the moment of definition | 954 | subroutine names at the moment of definition |
| 890 | (except those conflicting with Perl operators), | 955 | (except those conflicting with Perl operators), |
| 891 | package names (when recognized), format names | 956 | package names (when recognized), format names |
| 892 | `font-lock-keyword-face' Control flow switch constructs, declarators | 957 | `font-lock-keyword-face' Control flow switch constructs, declarators |
| 893 | `cperl-nonoverridable' Non-overridable keywords, modifiers of RExen | 958 | `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen |
| 894 | `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, | 959 | `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, |
| 895 | literal parts and the terminator of formats | 960 | literal parts and the terminator of formats |
| 896 | and whatever is syntaxically considered | 961 | and whatever is syntaxically considered |
| @@ -908,7 +973,25 @@ m// and s/// which do not do what one would expect them to do. | |||
| 908 | Help with best setup of these faces for printout requested (for each of | 973 | Help with best setup of these faces for printout requested (for each of |
| 909 | the faces: please specify bold, italic, underline, shadow and box.) | 974 | the faces: please specify bold, italic, underline, shadow and box.) |
| 910 | 975 | ||
| 911 | \(Not finished.)") | 976 | In regular expressions (except character classes): |
| 977 | `font-lock-string-face' \"Normal\" stuff and non-0-length constructs | ||
| 978 | `font-lock-constant-face': Delimiters | ||
| 979 | `font-lock-warning-face' Special-cased m// and s//foo/, | ||
| 980 | Mismatched closing delimiters, parens | ||
| 981 | we couldn't match, misplaced quantifiers, | ||
| 982 | unrecognized escape sequences | ||
| 983 | `cperl-nonoverridable-face' Modifiers, as gism in m/REx/gism | ||
| 984 | `font-lock-type-face' POSIX classes inside charclasses, | ||
| 985 | escape sequences with arguments (\x \23 \p \N) | ||
| 986 | and others match-a-char escape sequences | ||
| 987 | `font-lock-keyword-face' Capturing parens, and | | ||
| 988 | `font-lock-function-name-face' Special symbols: $ ^ . [ ] [^ ] (?{ }) (??{ }) | ||
| 989 | `font-lock-builtin-face' \"Remaining\" 0-length constructs, executable | ||
| 990 | parts of a REx, not-capturing parens | ||
| 991 | `font-lock-variable-name-face' Interpolated constructs, embedded code | ||
| 992 | `font-lock-comment-face' Embedded comments | ||
| 993 | |||
| 994 | ") | ||
| 912 | 995 | ||
| 913 | 996 | ||
| 914 | 997 | ||
| @@ -985,6 +1068,25 @@ the faces: please specify bold, italic, underline, shadow and box.) | |||
| 985 | (cperl-hairy (or hairy t)) | 1068 | (cperl-hairy (or hairy t)) |
| 986 | (t (symbol-value symbol)))) | 1069 | (t (symbol-value symbol)))) |
| 987 | 1070 | ||
| 1071 | |||
| 1072 | (defun cperl-make-indent (column &optional minimum keep) | ||
| 1073 | "Makes indent of the current line the requested amount. | ||
| 1074 | Unless KEEP, removes the old indentation. Works around a bug in ancient | ||
| 1075 | versions of Emacs." | ||
| 1076 | (let ((prop (get-text-property (point) 'syntax-type))) | ||
| 1077 | (or keep | ||
| 1078 | (delete-horizontal-space)) | ||
| 1079 | (indent-to column minimum) | ||
| 1080 | ;; In old versions (e.g., 19.33) `indent-to' would not inherit properties | ||
| 1081 | (and prop | ||
| 1082 | (> (current-column) 0) | ||
| 1083 | (save-excursion | ||
| 1084 | (beginning-of-line) | ||
| 1085 | (or (get-text-property (point) 'syntax-type) | ||
| 1086 | (and (looking-at "\\=[ \t]") | ||
| 1087 | (put-text-property (point) (match-end 0) | ||
| 1088 | 'syntax-type prop))))))) | ||
| 1089 | |||
| 988 | ;;; Probably it is too late to set these guys already, but it can help later: | 1090 | ;;; Probably it is too late to set these guys already, but it can help later: |
| 989 | 1091 | ||
| 990 | ;;;(and cperl-clobber-mode-lists | 1092 | ;;;(and cperl-clobber-mode-lists |
| @@ -1035,7 +1137,16 @@ the faces: please specify bold, italic, underline, shadow and box.) | |||
| 1035 | (cperl-define-key "\C-c\C-w" 'cperl-toggle-construct-fix) | 1137 | (cperl-define-key "\C-c\C-w" 'cperl-toggle-construct-fix) |
| 1036 | (cperl-define-key "\C-c\C-f" 'auto-fill-mode) | 1138 | (cperl-define-key "\C-c\C-f" 'auto-fill-mode) |
| 1037 | (cperl-define-key "\C-c\C-e" 'cperl-toggle-electric) | 1139 | (cperl-define-key "\C-c\C-e" 'cperl-toggle-electric) |
| 1140 | (cperl-define-key "\C-c\C-b" 'cperl-find-bad-style) | ||
| 1141 | (cperl-define-key "\C-c\C-p" 'cperl-pod-spell) | ||
| 1142 | (cperl-define-key "\C-c\C-d" 'cperl-here-doc-spell) | ||
| 1143 | (cperl-define-key "\C-c\C-n" 'cperl-narrow-to-here-doc) | ||
| 1144 | (cperl-define-key "\C-c\C-v" 'cperl-next-interpolated-REx) | ||
| 1145 | (cperl-define-key "\C-c\C-x" 'cperl-next-interpolated-REx-0) | ||
| 1146 | (cperl-define-key "\C-c\C-y" 'cperl-next-interpolated-REx-1) | ||
| 1038 | (cperl-define-key "\C-c\C-ha" 'cperl-toggle-autohelp) | 1147 | (cperl-define-key "\C-c\C-ha" 'cperl-toggle-autohelp) |
| 1148 | (cperl-define-key "\C-c\C-hp" 'cperl-perldoc) | ||
| 1149 | (cperl-define-key "\C-c\C-hP" 'cperl-perldoc-at-point) | ||
| 1039 | (cperl-define-key "\e\C-q" 'cperl-indent-exp) ; Usually not bound | 1150 | (cperl-define-key "\e\C-q" 'cperl-indent-exp) ; Usually not bound |
| 1040 | (cperl-define-key [?\C-\M-\|] 'cperl-lineup | 1151 | (cperl-define-key [?\C-\M-\|] 'cperl-lineup |
| 1041 | [(control meta |)]) | 1152 | [(control meta |)]) |
| @@ -1074,9 +1185,13 @@ the faces: please specify bold, italic, underline, shadow and box.) | |||
| 1074 | (<= emacs-minor-version 11) (<= emacs-major-version 19)) | 1185 | (<= emacs-minor-version 11) (<= emacs-major-version 19)) |
| 1075 | (progn | 1186 | (progn |
| 1076 | ;; substitute-key-definition is usefulness-deenhanced... | 1187 | ;; substitute-key-definition is usefulness-deenhanced... |
| 1077 | (cperl-define-key "\M-q" 'cperl-fill-paragraph) | 1188 | ;;;;;(cperl-define-key "\M-q" 'cperl-fill-paragraph) |
| 1078 | (cperl-define-key "\e;" 'cperl-indent-for-comment) | 1189 | (cperl-define-key "\e;" 'cperl-indent-for-comment) |
| 1079 | (cperl-define-key "\e\C-\\" 'cperl-indent-region)) | 1190 | (cperl-define-key "\e\C-\\" 'cperl-indent-region)) |
| 1191 | (or (boundp 'fill-paragraph-function) | ||
| 1192 | (substitute-key-definition | ||
| 1193 | 'fill-paragraph 'cperl-fill-paragraph | ||
| 1194 | cperl-mode-map global-map)) | ||
| 1080 | (substitute-key-definition | 1195 | (substitute-key-definition |
| 1081 | 'indent-sexp 'cperl-indent-exp | 1196 | 'indent-sexp 'cperl-indent-exp |
| 1082 | cperl-mode-map global-map) | 1197 | cperl-mode-map global-map) |
| @@ -1094,52 +1209,101 @@ the faces: please specify bold, italic, underline, shadow and box.) | |||
| 1094 | (progn | 1209 | (progn |
| 1095 | (require 'easymenu) | 1210 | (require 'easymenu) |
| 1096 | (easy-menu-define | 1211 | (easy-menu-define |
| 1097 | cperl-menu cperl-mode-map "Menu for CPerl mode" | 1212 | cperl-menu cperl-mode-map "Menu for CPerl mode" |
| 1098 | '("Perl" | 1213 | '("Perl" |
| 1099 | ["Beginning of function" beginning-of-defun t] | 1214 | ["Beginning of function" beginning-of-defun t] |
| 1100 | ["End of function" end-of-defun t] | 1215 | ["End of function" end-of-defun t] |
| 1101 | ["Mark function" mark-defun t] | 1216 | ["Mark function" mark-defun t] |
| 1102 | ["Indent expression" cperl-indent-exp t] | 1217 | ["Indent expression" cperl-indent-exp t] |
| 1103 | ["Fill paragraph/comment" fill-paragraph t] | 1218 | ["Fill paragraph/comment" fill-paragraph t] |
| 1219 | "----" | ||
| 1220 | ["Line up a construction" cperl-lineup (cperl-use-region-p)] | ||
| 1221 | ["Invert if/unless/while etc" cperl-invert-if-unless t] | ||
| 1222 | ("Regexp" | ||
| 1223 | ["Beautify" cperl-beautify-regexp | ||
| 1224 | cperl-use-syntax-table-text-property] | ||
| 1225 | ["Beautify one level deep" (cperl-beautify-regexp 1) | ||
| 1226 | cperl-use-syntax-table-text-property] | ||
| 1227 | ["Beautify a group" cperl-beautify-level | ||
| 1228 | cperl-use-syntax-table-text-property] | ||
| 1229 | ["Beautify a group one level deep" (cperl-beautify-level 1) | ||
| 1230 | cperl-use-syntax-table-text-property] | ||
| 1231 | ["Contract a group" cperl-contract-level | ||
| 1232 | cperl-use-syntax-table-text-property] | ||
| 1233 | ["Contract groups" cperl-contract-levels | ||
| 1234 | cperl-use-syntax-table-text-property] | ||
| 1104 | "----" | 1235 | "----" |
| 1105 | ["Line up a construction" cperl-lineup (cperl-use-region-p)] | 1236 | ["Find next interpolated" cperl-next-interpolated-REx |
| 1106 | ["Invert if/unless/while etc" cperl-invert-if-unless t] | 1237 | (next-single-property-change (point-min) 'REx-interpolated)] |
| 1107 | ("Regexp" | 1238 | ["Find next interpolated (no //o)" |
| 1108 | ["Beautify" cperl-beautify-regexp | 1239 | cperl-next-interpolated-REx-0 |
| 1109 | cperl-use-syntax-table-text-property] | 1240 | (or (text-property-any (point-min) (point-max) 'REx-interpolated t) |
| 1110 | ["Beautify one level deep" (cperl-beautify-regexp 1) | 1241 | (text-property-any (point-min) (point-max) 'REx-interpolated 1))] |
| 1111 | cperl-use-syntax-table-text-property] | 1242 | ["Find next interpolated (neither //o nor whole-REx)" |
| 1112 | ["Beautify a group" cperl-beautify-level | 1243 | cperl-next-interpolated-REx-1 |
| 1113 | cperl-use-syntax-table-text-property] | 1244 | (text-property-any (point-min) (point-max) 'REx-interpolated t)]) |
| 1114 | ["Beautify a group one level deep" (cperl-beautify-level 1) | 1245 | ["Insert spaces if needed to fix style" cperl-find-bad-style t] |
| 1115 | cperl-use-syntax-table-text-property] | 1246 | ["Refresh \"hard\" constructions" cperl-find-pods-heres t] |
| 1116 | ["Contract a group" cperl-contract-level | 1247 | "----" |
| 1117 | cperl-use-syntax-table-text-property] | 1248 | ["Indent region" cperl-indent-region (cperl-use-region-p)] |
| 1118 | ["Contract groups" cperl-contract-levels | 1249 | ["Comment region" cperl-comment-region (cperl-use-region-p)] |
| 1119 | cperl-use-syntax-table-text-property]) | 1250 | ["Uncomment region" cperl-uncomment-region (cperl-use-region-p)] |
| 1120 | ["Refresh \"hard\" constructions" cperl-find-pods-heres t] | 1251 | "----" |
| 1252 | ["Run" mode-compile (fboundp 'mode-compile)] | ||
| 1253 | ["Kill" mode-compile-kill (and (fboundp 'mode-compile-kill) | ||
| 1254 | (get-buffer "*compilation*"))] | ||
| 1255 | ["Next error" next-error (get-buffer "*compilation*")] | ||
| 1256 | ["Check syntax" cperl-check-syntax (fboundp 'mode-compile)] | ||
| 1257 | "----" | ||
| 1258 | ["Debugger" cperl-db t] | ||
| 1259 | "----" | ||
| 1260 | ("Tools" | ||
| 1261 | ["Imenu" imenu (fboundp 'imenu)] | ||
| 1262 | ["Imenu on Perl Info" cperl-imenu-on-info (featurep 'imenu)] | ||
| 1121 | "----" | 1263 | "----" |
| 1122 | ["Indent region" cperl-indent-region (cperl-use-region-p)] | 1264 | ["Ispell PODs" cperl-pod-spell |
| 1123 | ["Comment region" cperl-comment-region (cperl-use-region-p)] | 1265 | ;; Better not to update syntaxification here: |
| 1124 | ["Uncomment region" cperl-uncomment-region (cperl-use-region-p)] | 1266 | ;; debugging syntaxificatio can be broken by this??? |
| 1267 | (or | ||
| 1268 | (get-text-property (point-min) 'in-pod) | ||
| 1269 | (< (progn | ||
| 1270 | (and cperl-syntaxify-for-menu | ||
| 1271 | (cperl-update-syntaxification (point-max) (point-max))) | ||
| 1272 | (next-single-property-change (point-min) 'in-pod nil (point-max))) | ||
| 1273 | (point-max)))] | ||
| 1274 | ["Ispell HERE-DOCs" cperl-here-doc-spell | ||
| 1275 | (< (progn | ||
| 1276 | (and cperl-syntaxify-for-menu | ||
| 1277 | (cperl-update-syntaxification (point-max) (point-max))) | ||
| 1278 | (next-single-property-change (point-min) 'here-doc-group nil (point-max))) | ||
| 1279 | (point-max))] | ||
| 1280 | ["Narrow to this HERE-DOC" cperl-narrow-to-here-doc | ||
| 1281 | (eq 'here-doc (progn | ||
| 1282 | (and cperl-syntaxify-for-menu | ||
| 1283 | (cperl-update-syntaxification (point) (point))) | ||
| 1284 | (get-text-property (point) 'syntax-type)))] | ||
| 1285 | ["Select this HERE-DOC or POD section" | ||
| 1286 | cperl-select-this-pod-or-here-doc | ||
| 1287 | (memq (progn | ||
| 1288 | (and cperl-syntaxify-for-menu | ||
| 1289 | (cperl-update-syntaxification (point) (point))) | ||
| 1290 | (get-text-property (point) 'syntax-type)) | ||
| 1291 | '(here-doc pod))] | ||
| 1125 | "----" | 1292 | "----" |
| 1126 | ["Run" mode-compile (fboundp 'mode-compile)] | 1293 | ["CPerl pretty print (exprmntl)" cperl-ps-print |
| 1127 | ["Kill" mode-compile-kill (and (fboundp 'mode-compile-kill) | 1294 | (fboundp 'ps-extend-face-list)] |
| 1128 | (get-buffer "*compilation*"))] | ||
| 1129 | ["Next error" next-error (get-buffer "*compilation*")] | ||
| 1130 | ["Check syntax" cperl-check-syntax (fboundp 'mode-compile)] | ||
| 1131 | "----" | 1295 | "----" |
| 1132 | ["Debugger" cperl-db t] | 1296 | ["Syntaxify region" cperl-find-pods-heres-region |
| 1297 | (cperl-use-region-p)] | ||
| 1298 | ["Profile syntaxification" cperl-time-fontification t] | ||
| 1299 | ["Debug errors in delayed fontification" cperl-emulate-lazy-lock t] | ||
| 1300 | ["Debug unwind for syntactic scan" cperl-toggle-set-debug-unwind t] | ||
| 1301 | ["Debug backtrace on syntactic scan (BEWARE!!!)" | ||
| 1302 | (cperl-toggle-set-debug-unwind nil t) t] | ||
| 1133 | "----" | 1303 | "----" |
| 1134 | ("Tools" | 1304 | ["Class Hierarchy from TAGS" cperl-tags-hier-init t] |
| 1135 | ["Imenu" imenu (fboundp 'imenu)] | 1305 | ;;["Update classes" (cperl-tags-hier-init t) tags-table-list] |
| 1136 | ["Insert spaces if needed" cperl-find-bad-style t] | 1306 | ("Tags" |
| 1137 | ["Class Hierarchy from TAGS" cperl-tags-hier-init t] | ||
| 1138 | ;;["Update classes" (cperl-tags-hier-init t) tags-table-list] | ||
| 1139 | ["CPerl pretty print (exprmntl)" cperl-ps-print | ||
| 1140 | (fboundp 'ps-extend-face-list)] | ||
| 1141 | ["Imenu on info" cperl-imenu-on-info (featurep 'imenu)] | ||
| 1142 | ("Tags" | ||
| 1143 | ;;; ["Create tags for current file" cperl-etags t] | 1307 | ;;; ["Create tags for current file" cperl-etags t] |
| 1144 | ;;; ["Add tags for current file" (cperl-etags t) t] | 1308 | ;;; ["Add tags for current file" (cperl-etags t) t] |
| 1145 | ;;; ["Create tags for Perl files in directory" (cperl-etags nil t) t] | 1309 | ;;; ["Create tags for Perl files in directory" (cperl-etags nil t) t] |
| @@ -1186,10 +1350,10 @@ the faces: please specify bold, italic, underline, shadow and box.) | |||
| 1186 | ["PerlStyle" (cperl-set-style "PerlStyle") t] | 1350 | ["PerlStyle" (cperl-set-style "PerlStyle") t] |
| 1187 | ["GNU" (cperl-set-style "GNU") t] | 1351 | ["GNU" (cperl-set-style "GNU") t] |
| 1188 | ["C++" (cperl-set-style "C++") t] | 1352 | ["C++" (cperl-set-style "C++") t] |
| 1189 | ["FSF" (cperl-set-style "FSF") t] | 1353 | ["K&R" (cperl-set-style "K&R") t] |
| 1190 | ["BSD" (cperl-set-style "BSD") t] | 1354 | ["BSD" (cperl-set-style "BSD") t] |
| 1191 | ["Whitesmith" (cperl-set-style "Whitesmith") t] | 1355 | ["Whitesmith" (cperl-set-style "Whitesmith") t] |
| 1192 | ["Current" (cperl-set-style "Current") t] | 1356 | ["Memorize Current" (cperl-set-style "Current") t] |
| 1193 | ["Memorized" (cperl-set-style-back) cperl-old-style]) | 1357 | ["Memorized" (cperl-set-style-back) cperl-old-style]) |
| 1194 | ("Micro-docs" | 1358 | ("Micro-docs" |
| 1195 | ["Tips" (describe-variable 'cperl-tips) t] | 1359 | ["Tips" (describe-variable 'cperl-tips) t] |
| @@ -1208,12 +1372,73 @@ the faces: please specify bold, italic, underline, shadow and box.) | |||
| 1208 | The expansion is entirely correct because it uses the C preprocessor." | 1372 | The expansion is entirely correct because it uses the C preprocessor." |
| 1209 | t) | 1373 | t) |
| 1210 | 1374 | ||
| 1375 | ;;; These two must be unwound, otherwise take exponential time | ||
| 1376 | (defconst cperl-maybe-white-and-comment-rex "[ \t\n]*\\(#[^\n]*\n[ \t\n]*\\)*" | ||
| 1377 | "Regular expression to match optional whitespace with interpspersed comments. | ||
| 1378 | Should contain exactly one group.") | ||
| 1379 | |||
| 1380 | ;;; This one is tricky to unwind; still very inefficient... | ||
| 1381 | (defconst cperl-white-and-comment-rex "\\([ \t\n]\\|#[^\n]*\n\\)+" | ||
| 1382 | "Regular expression to match whitespace with interpspersed comments. | ||
| 1383 | Should contain exactly one group.") | ||
| 1384 | |||
| 1385 | |||
| 1386 | ;;; Is incorporated in `cperl-imenu--function-name-regexp-perl' | ||
| 1387 | ;;; `cperl-outline-regexp', `defun-prompt-regexp'. | ||
| 1388 | ;;; Details of groups in this may be used in several functions; see comments | ||
| 1389 | ;;; near mentioned above variable(s)... | ||
| 1390 | ;;; sub($$):lvalue{} sub:lvalue{} Both allowed... | ||
| 1391 | (defsubst cperl-after-sub-regexp (named attr) ; 9 groups without attr... | ||
| 1392 | "Match the text after `sub' in a subroutine declaration. | ||
| 1393 | If NAMED is nil, allows anonymous subroutines. Matches up to the first \":\" | ||
| 1394 | of attributes (if present), or end of the name or prototype (whatever is | ||
| 1395 | the last)." | ||
| 1396 | (concat ; Assume n groups before this... | ||
| 1397 | "\\(" ; n+1=name-group | ||
| 1398 | cperl-white-and-comment-rex ; n+2=pre-name | ||
| 1399 | "\\(::[a-zA-Z_0-9:']+\\|[a-zA-Z_'][a-zA-Z_0-9:']*\\)" ; n+3=name | ||
| 1400 | "\\)" ; END n+1=name-group | ||
| 1401 | (if named "" "?") | ||
| 1402 | "\\(" ; n+4=proto-group | ||
| 1403 | cperl-maybe-white-and-comment-rex ; n+5=pre-proto | ||
| 1404 | "\\(([^()]*)\\)" ; n+6=prototype | ||
| 1405 | "\\)?" ; END n+4=proto-group | ||
| 1406 | "\\(" ; n+7=attr-group | ||
| 1407 | cperl-maybe-white-and-comment-rex ; n+8=pre-attr | ||
| 1408 | "\\(" ; n+9=start-attr | ||
| 1409 | ":" | ||
| 1410 | (if attr (concat | ||
| 1411 | "\\(" | ||
| 1412 | cperl-maybe-white-and-comment-rex ; whitespace-comments | ||
| 1413 | "\\(\\sw\\|_\\)+" ; attr-name | ||
| 1414 | ;; attr-arg (1 level of internal parens allowed!) | ||
| 1415 | "\\((\\(\\\\.\\|[^\\\\()]\\|([^\\\\()]*)\\)*)\\)?" | ||
| 1416 | "\\(" ; optional : (XXX allows trailing???) | ||
| 1417 | cperl-maybe-white-and-comment-rex ; whitespace-comments | ||
| 1418 | ":\\)?" | ||
| 1419 | "\\)+") | ||
| 1420 | "[^:]") | ||
| 1421 | "\\)" | ||
| 1422 | "\\)?" ; END n+6=proto-group | ||
| 1423 | )) | ||
| 1424 | |||
| 1425 | ;;; Details of groups in this are used in `cperl-imenu--create-perl-index' | ||
| 1426 | ;;; and `cperl-outline-level'. | ||
| 1427 | ;;;; Was: 2=sub|package; now 2=package-group, 5=package-name 8=sub-name (+3) | ||
| 1211 | (defvar cperl-imenu--function-name-regexp-perl | 1428 | (defvar cperl-imenu--function-name-regexp-perl |
| 1212 | (concat | 1429 | (concat |
| 1213 | "^\\(" | 1430 | "^\\(" ; 1 = all |
| 1214 | "[ \t]*\\(sub\\|package\\)[ \t\n]+\\([a-zA-Z_0-9:']+\\)[ \t]*\\(([^()]*)[ \t]*\\)?" | 1431 | "\\([ \t]*package" ; 2 = package-group |
| 1215 | "\\|" | 1432 | "\\(" ; 3 = package-name-group |
| 1216 | "=head\\([12]\\)[ \t]+\\([^\n]+\\)$" | 1433 | cperl-white-and-comment-rex ; 4 = pre-package-name |
| 1434 | "\\([a-zA-Z_0-9:']+\\)\\)?\\)" ; 5 = package-name | ||
| 1435 | "\\|" | ||
| 1436 | "[ \t]*sub" | ||
| 1437 | (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start | ||
| 1438 | cperl-maybe-white-and-comment-rex ; 15=pre-block | ||
| 1439 | "\\|" | ||
| 1440 | "=head\\([1-4]\\)[ \t]+" ; 16=level | ||
| 1441 | "\\([^\n]+\\)$" ; 17=text | ||
| 1217 | "\\)")) | 1442 | "\\)")) |
| 1218 | 1443 | ||
| 1219 | (defvar cperl-outline-regexp | 1444 | (defvar cperl-outline-regexp |
| @@ -1225,6 +1450,12 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 1225 | (defvar cperl-string-syntax-table nil | 1450 | (defvar cperl-string-syntax-table nil |
| 1226 | "Syntax table in use in CPerl mode string-like chunks.") | 1451 | "Syntax table in use in CPerl mode string-like chunks.") |
| 1227 | 1452 | ||
| 1453 | (defsubst cperl-1- (p) | ||
| 1454 | (max (point-min) (1- p))) | ||
| 1455 | |||
| 1456 | (defsubst cperl-1+ (p) | ||
| 1457 | (min (point-max) (1+ p))) | ||
| 1458 | |||
| 1228 | (if cperl-mode-syntax-table | 1459 | (if cperl-mode-syntax-table |
| 1229 | () | 1460 | () |
| 1230 | (setq cperl-mode-syntax-table (make-syntax-table)) | 1461 | (setq cperl-mode-syntax-table (make-syntax-table)) |
| @@ -1249,6 +1480,8 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 1249 | (modify-syntax-entry ?| "." cperl-mode-syntax-table) | 1480 | (modify-syntax-entry ?| "." cperl-mode-syntax-table) |
| 1250 | (setq cperl-string-syntax-table (copy-syntax-table cperl-mode-syntax-table)) | 1481 | (setq cperl-string-syntax-table (copy-syntax-table cperl-mode-syntax-table)) |
| 1251 | (modify-syntax-entry ?$ "." cperl-string-syntax-table) | 1482 | (modify-syntax-entry ?$ "." cperl-string-syntax-table) |
| 1483 | (modify-syntax-entry ?\{ "." cperl-string-syntax-table) | ||
| 1484 | (modify-syntax-entry ?\} "." cperl-string-syntax-table) | ||
| 1252 | (modify-syntax-entry ?# "." cperl-string-syntax-table)) ; (?# comment ) | 1485 | (modify-syntax-entry ?# "." cperl-string-syntax-table)) ; (?# comment ) |
| 1253 | 1486 | ||
| 1254 | 1487 | ||
| @@ -1257,6 +1490,10 @@ The expansion is entirely correct because it uses the C preprocessor." | |||
| 1257 | ;; Fix for msb.el | 1490 | ;; Fix for msb.el |
| 1258 | (defvar cperl-msb-fixed nil) | 1491 | (defvar cperl-msb-fixed nil) |
| 1259 | (defvar cperl-use-major-mode 'cperl-mode) | 1492 | (defvar cperl-use-major-mode 'cperl-mode) |
| 1493 | (defvar cperl-font-lock-multiline-start nil) | ||
| 1494 | (defvar cperl-font-lock-multiline nil) | ||
| 1495 | (defvar cperl-compilation-error-regexp-alist nil) | ||
| 1496 | (defvar cperl-font-locking nil) | ||
| 1260 | 1497 | ||
| 1261 | ;;;###autoload | 1498 | ;;;###autoload |
| 1262 | (defun cperl-mode () | 1499 | (defun cperl-mode () |
| @@ -1402,16 +1639,24 @@ Variables controlling indentation style: | |||
| 1402 | `cperl-min-label-indent' | 1639 | `cperl-min-label-indent' |
| 1403 | Minimal indentation for line that is a label. | 1640 | Minimal indentation for line that is a label. |
| 1404 | 1641 | ||
| 1405 | Settings for K&R and BSD indentation styles are | 1642 | Settings for classic indent-styles: K&R BSD=C++ GNU PerlStyle=Whitesmith |
| 1406 | `cperl-indent-level' 5 8 | 1643 | `cperl-indent-level' 5 4 2 4 |
| 1407 | `cperl-continued-statement-offset' 5 8 | 1644 | `cperl-brace-offset' 0 0 0 0 |
| 1408 | `cperl-brace-offset' -5 -8 | 1645 | `cperl-continued-brace-offset' -5 -4 0 0 |
| 1409 | `cperl-label-offset' -5 -8 | 1646 | `cperl-label-offset' -5 -4 -2 -4 |
| 1647 | `cperl-continued-statement-offset' 5 4 2 4 | ||
| 1410 | 1648 | ||
| 1411 | CPerl knows several indentation styles, and may bulk set the | 1649 | CPerl knows several indentation styles, and may bulk set the |
| 1412 | corresponding variables. Use \\[cperl-set-style] to do this. Use | 1650 | corresponding variables. Use \\[cperl-set-style] to do this. Use |
| 1413 | \\[cperl-set-style-back] to restore the memorized preexisting values | 1651 | \\[cperl-set-style-back] to restore the memorized preexisting values |
| 1414 | \(both available from menu). | 1652 | \(both available from menu). See examples in `cperl-style-examples'. |
| 1653 | |||
| 1654 | Part of the indentation style is how different parts of if/elsif/else | ||
| 1655 | statements are broken into lines; in CPerl, this is reflected on how | ||
| 1656 | templates for these constructs are created (controlled by | ||
| 1657 | `cperl-extra-newline-before-brace'), and how reflow-logic should treat \"continuation\" blocks of else/elsif/continue, controlled by the same variable, | ||
| 1658 | and by `cperl-extra-newline-before-brace-multiline', | ||
| 1659 | `cperl-merge-trailing-else', `cperl-indent-region-fix-constructs'. | ||
| 1415 | 1660 | ||
| 1416 | If `cperl-indent-level' is 0, the statement after opening brace in | 1661 | If `cperl-indent-level' is 0, the statement after opening brace in |
| 1417 | column 0 is indented on | 1662 | column 0 is indented on |
| @@ -1465,8 +1710,12 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1465 | ("head2" "head2" cperl-electric-pod 0))) | 1710 | ("head2" "head2" cperl-electric-pod 0))) |
| 1466 | (setq abbrevs-changed prev-a-c))) | 1711 | (setq abbrevs-changed prev-a-c))) |
| 1467 | (setq local-abbrev-table cperl-mode-abbrev-table) | 1712 | (setq local-abbrev-table cperl-mode-abbrev-table) |
| 1468 | (abbrev-mode (if (cperl-val 'cperl-electric-keywords) 1 0)) | 1713 | (if (cperl-val 'cperl-electric-keywords) |
| 1714 | (abbrev-mode 1)) | ||
| 1469 | (set-syntax-table cperl-mode-syntax-table) | 1715 | (set-syntax-table cperl-mode-syntax-table) |
| 1716 | ;; Until Emacs is multi-threaded, we do not actually need it local: | ||
| 1717 | (make-local-variable 'cperl-font-lock-multiline-start) | ||
| 1718 | (make-local-variable 'cperl-font-locking) | ||
| 1470 | (make-local-variable 'outline-regexp) | 1719 | (make-local-variable 'outline-regexp) |
| 1471 | ;; (setq outline-regexp imenu-example--function-name-regexp-perl) | 1720 | ;; (setq outline-regexp imenu-example--function-name-regexp-perl) |
| 1472 | (setq outline-regexp cperl-outline-regexp) | 1721 | (setq outline-regexp cperl-outline-regexp) |
| @@ -1478,7 +1727,10 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1478 | (setq paragraph-separate paragraph-start) | 1727 | (setq paragraph-separate paragraph-start) |
| 1479 | (make-local-variable 'paragraph-ignore-fill-prefix) | 1728 | (make-local-variable 'paragraph-ignore-fill-prefix) |
| 1480 | (setq paragraph-ignore-fill-prefix t) | 1729 | (setq paragraph-ignore-fill-prefix t) |
| 1481 | (set (make-local-variable 'fill-paragraph-function) 'cperl-fill-paragraph) | 1730 | (if cperl-xemacs-p |
| 1731 | (progn | ||
| 1732 | (make-local-variable 'paren-backwards-message) | ||
| 1733 | (set 'paren-backwards-message t))) | ||
| 1482 | (make-local-variable 'indent-line-function) | 1734 | (make-local-variable 'indent-line-function) |
| 1483 | (setq indent-line-function 'cperl-indent-line) | 1735 | (setq indent-line-function 'cperl-indent-line) |
| 1484 | (make-local-variable 'require-final-newline) | 1736 | (make-local-variable 'require-final-newline) |
| @@ -1492,9 +1744,22 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1492 | (make-local-variable 'comment-start-skip) | 1744 | (make-local-variable 'comment-start-skip) |
| 1493 | (setq comment-start-skip "#+ *") | 1745 | (setq comment-start-skip "#+ *") |
| 1494 | (make-local-variable 'defun-prompt-regexp) | 1746 | (make-local-variable 'defun-prompt-regexp) |
| 1495 | (setq defun-prompt-regexp "^[ \t]*sub[ \t\n]+\\([^ \t\n{(;]+\\)\\([ \t\n]*([^()]*)[ \t\n]*\\)?[ \t\n]*") | 1747 | ;;; "[ \t]*sub" |
| 1748 | ;;; (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start | ||
| 1749 | ;;; cperl-maybe-white-and-comment-rex ; 15=pre-block | ||
| 1750 | (setq defun-prompt-regexp | ||
| 1751 | (concat "^[ \t]*\\(sub" | ||
| 1752 | (cperl-after-sub-regexp 'named 'attr-groups) | ||
| 1753 | "\\|" ; per toke.c | ||
| 1754 | "\\(BEGIN\\|CHECK\\|INIT\\|END\\|AUTOLOAD\\|DESTROY\\)" | ||
| 1755 | "\\)" | ||
| 1756 | cperl-maybe-white-and-comment-rex)) | ||
| 1496 | (make-local-variable 'comment-indent-function) | 1757 | (make-local-variable 'comment-indent-function) |
| 1497 | (setq comment-indent-function 'cperl-comment-indent) | 1758 | (setq comment-indent-function 'cperl-comment-indent) |
| 1759 | (and (boundp 'fill-paragraph-function) | ||
| 1760 | (progn | ||
| 1761 | (make-local-variable 'fill-paragraph-function) | ||
| 1762 | (set 'fill-paragraph-function 'cperl-fill-paragraph))) | ||
| 1498 | (make-local-variable 'parse-sexp-ignore-comments) | 1763 | (make-local-variable 'parse-sexp-ignore-comments) |
| 1499 | (setq parse-sexp-ignore-comments t) | 1764 | (setq parse-sexp-ignore-comments t) |
| 1500 | (make-local-variable 'indent-region-function) | 1765 | (make-local-variable 'indent-region-function) |
| @@ -1509,21 +1774,40 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1509 | (set 'vc-rcs-header cperl-vc-rcs-header) | 1774 | (set 'vc-rcs-header cperl-vc-rcs-header) |
| 1510 | (make-local-variable 'vc-sccs-header) | 1775 | (make-local-variable 'vc-sccs-header) |
| 1511 | (set 'vc-sccs-header cperl-vc-sccs-header) | 1776 | (set 'vc-sccs-header cperl-vc-sccs-header) |
| 1777 | ;; This one is obsolete... | ||
| 1778 | (make-local-variable 'vc-header-alist) | ||
| 1779 | (set 'vc-header-alist (or cperl-vc-header-alist ; Avoid warning | ||
| 1780 | (` ((SCCS (, (car cperl-vc-sccs-header))) | ||
| 1781 | (RCS (, (car cperl-vc-rcs-header))))))) | ||
| 1782 | (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x | ||
| 1783 | (make-local-variable 'compilation-error-regexp-alist-alist) | ||
| 1784 | (set 'compilation-error-regexp-alist-alist | ||
| 1785 | (cons (cons 'cperl cperl-compilation-error-regexp-alist) | ||
| 1786 | (symbol-value 'compilation-error-regexp-alist-alist))) | ||
| 1787 | (if (fboundp 'compilation-build-compilation-error-regexp-alist) | ||
| 1788 | (let ((f 'compilation-build-compilation-error-regexp-alist)) | ||
| 1789 | (funcall f)) | ||
| 1790 | (push 'cperl compilation-error-regexp-alist))) | ||
| 1791 | ((boundp 'compilation-error-regexp-alist);; xmeacs 19.x | ||
| 1792 | (make-local-variable 'compilation-error-regexp-alist) | ||
| 1793 | (set 'compilation-error-regexp-alist | ||
| 1794 | (cons cperl-compilation-error-regexp-alist | ||
| 1795 | (symbol-value 'compilation-error-regexp-alist))))) | ||
| 1512 | (make-local-variable 'font-lock-defaults) | 1796 | (make-local-variable 'font-lock-defaults) |
| 1513 | (setq font-lock-defaults | 1797 | (setq font-lock-defaults |
| 1514 | (cond | 1798 | (cond |
| 1515 | ((string< emacs-version "19.30") | 1799 | ((string< emacs-version "19.30") |
| 1516 | '(cperl-font-lock-keywords-2)) | 1800 | '(cperl-font-lock-keywords-2 nil nil ((?_ . "w")))) |
| 1517 | ((string< emacs-version "19.33") ; Which one to use? | 1801 | ((string< emacs-version "19.33") ; Which one to use? |
| 1518 | '((cperl-font-lock-keywords | 1802 | '((cperl-font-lock-keywords |
| 1519 | cperl-font-lock-keywords-1 | 1803 | cperl-font-lock-keywords-1 |
| 1520 | cperl-font-lock-keywords-2))) | 1804 | cperl-font-lock-keywords-2) nil nil ((?_ . "w")))) |
| 1521 | (t | 1805 | (t |
| 1522 | '((cperl-load-font-lock-keywords | 1806 | '((cperl-load-font-lock-keywords |
| 1523 | cperl-load-font-lock-keywords-1 | 1807 | cperl-load-font-lock-keywords-1 |
| 1524 | cperl-load-font-lock-keywords-2) | 1808 | cperl-load-font-lock-keywords-2) nil nil ((?_ . "w")))))) |
| 1525 | nil nil ((?_ . "w")))))) | ||
| 1526 | (make-local-variable 'cperl-syntax-state) | 1809 | (make-local-variable 'cperl-syntax-state) |
| 1810 | (setq cperl-syntax-state nil) ; reset syntaxification cache | ||
| 1527 | (if cperl-use-syntax-table-text-property | 1811 | (if cperl-use-syntax-table-text-property |
| 1528 | (progn | 1812 | (progn |
| 1529 | (make-local-variable 'parse-sexp-lookup-properties) | 1813 | (make-local-variable 'parse-sexp-lookup-properties) |
| @@ -1533,10 +1817,12 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1533 | (or (boundp 'font-lock-unfontify-region-function) | 1817 | (or (boundp 'font-lock-unfontify-region-function) |
| 1534 | (set 'font-lock-unfontify-region-function | 1818 | (set 'font-lock-unfontify-region-function |
| 1535 | 'font-lock-default-unfontify-region)) | 1819 | 'font-lock-default-unfontify-region)) |
| 1536 | (make-local-variable 'font-lock-unfontify-region-function) | 1820 | (unless cperl-xemacs-p ; Our: just a plug for wrong font-lock |
| 1537 | (set 'font-lock-unfontify-region-function ; not present with old Emacs | 1821 | (make-local-variable 'font-lock-unfontify-region-function) |
| 1538 | 'cperl-font-lock-unfontify-region-function) | 1822 | (set 'font-lock-unfontify-region-function ; not present with old Emacs |
| 1823 | 'cperl-font-lock-unfontify-region-function)) | ||
| 1539 | (make-local-variable 'cperl-syntax-done-to) | 1824 | (make-local-variable 'cperl-syntax-done-to) |
| 1825 | (setq cperl-syntax-done-to nil) ; reset syntaxification cache | ||
| 1540 | (make-local-variable 'font-lock-syntactic-keywords) | 1826 | (make-local-variable 'font-lock-syntactic-keywords) |
| 1541 | (setq font-lock-syntactic-keywords | 1827 | (setq font-lock-syntactic-keywords |
| 1542 | (if cperl-syntaxify-by-font-lock | 1828 | (if cperl-syntaxify-by-font-lock |
| @@ -1546,10 +1832,20 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1546 | ;; to make font-lock think that font-lock-syntactic-keywords | 1832 | ;; to make font-lock think that font-lock-syntactic-keywords |
| 1547 | ;; are defined. | 1833 | ;; are defined. |
| 1548 | '(t))))) | 1834 | '(t))))) |
| 1835 | (if (boundp 'font-lock-multiline) ; Newer font-lock; use its facilities | ||
| 1836 | (progn | ||
| 1837 | (setq cperl-font-lock-multiline t) ; Not localized... | ||
| 1838 | (set 'font-lock-multiline t)) ; not present with old Emacs; auto-local | ||
| 1839 | (make-local-variable 'font-lock-fontify-region-function) | ||
| 1840 | (set 'font-lock-fontify-region-function ; not present with old Emacs | ||
| 1841 | 'cperl-font-lock-fontify-region-function)) | ||
| 1842 | (make-local-variable 'font-lock-fontify-region-function) | ||
| 1843 | (set 'font-lock-fontify-region-function ; not present with old Emacs | ||
| 1844 | 'cperl-font-lock-fontify-region-function) | ||
| 1549 | (make-local-variable 'cperl-old-style) | 1845 | (make-local-variable 'cperl-old-style) |
| 1550 | (if (boundp 'normal-auto-fill-function) ; 19.33 and later | 1846 | (if (boundp 'normal-auto-fill-function) ; 19.33 and later |
| 1551 | (set (make-local-variable 'normal-auto-fill-function) | 1847 | (set (make-local-variable 'normal-auto-fill-function) |
| 1552 | 'cperl-do-auto-fill) ; RMS has it as #'cperl-do-auto-fill ??? | 1848 | 'cperl-do-auto-fill) |
| 1553 | (or (fboundp 'cperl-old-auto-fill-mode) | 1849 | (or (fboundp 'cperl-old-auto-fill-mode) |
| 1554 | (progn | 1850 | (progn |
| 1555 | (fset 'cperl-old-auto-fill-mode (symbol-function 'auto-fill-mode)) | 1851 | (fset 'cperl-old-auto-fill-mode (symbol-function 'auto-fill-mode)) |
| @@ -1562,12 +1858,18 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1562 | (if (cperl-val 'cperl-font-lock) | 1858 | (if (cperl-val 'cperl-font-lock) |
| 1563 | (progn (or cperl-faces-init (cperl-init-faces)) | 1859 | (progn (or cperl-faces-init (cperl-init-faces)) |
| 1564 | (font-lock-mode 1)))) | 1860 | (font-lock-mode 1)))) |
| 1861 | (set (make-local-variable 'facemenu-add-face-function) | ||
| 1862 | 'cperl-facemenu-add-face-function) ; XXXX What this guy is for??? | ||
| 1565 | (and (boundp 'msb-menu-cond) | 1863 | (and (boundp 'msb-menu-cond) |
| 1566 | (not cperl-msb-fixed) | 1864 | (not cperl-msb-fixed) |
| 1567 | (cperl-msb-fix)) | 1865 | (cperl-msb-fix)) |
| 1568 | (if (featurep 'easymenu) | 1866 | (if (featurep 'easymenu) |
| 1569 | (easy-menu-add cperl-menu)) ; A NOP in Emacs. | 1867 | (easy-menu-add cperl-menu)) ; A NOP in Emacs. |
| 1570 | (run-mode-hooks 'cperl-mode-hook) | 1868 | (run-mode-hooks 'cperl-mode-hook) |
| 1869 | (if cperl-hook-after-change | ||
| 1870 | (progn | ||
| 1871 | (make-local-hook 'after-change-functions) | ||
| 1872 | (add-hook 'after-change-functions 'cperl-after-change-function nil t))) | ||
| 1571 | ;; After hooks since fontification will break this | 1873 | ;; After hooks since fontification will break this |
| 1572 | (if cperl-pod-here-scan | 1874 | (if cperl-pod-here-scan |
| 1573 | (or cperl-syntaxify-by-font-lock | 1875 | (or cperl-syntaxify-by-font-lock |
| @@ -1616,31 +1918,37 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1616 | (defvar cperl-st-ket '(5 . ?\<)) | 1918 | (defvar cperl-st-ket '(5 . ?\<)) |
| 1617 | 1919 | ||
| 1618 | 1920 | ||
| 1619 | (defun cperl-comment-indent () | 1921 | (defun cperl-comment-indent () ; called at point at supposed comment |
| 1620 | (let ((p (point)) (c (current-column)) was phony) | 1922 | (let ((p (point)) (c (current-column)) was phony) |
| 1621 | (if (looking-at "^#") 0 ; Existing comment at bol stays there. | 1923 | (if (and (not cperl-indent-comment-at-column-0) |
| 1924 | (looking-at "^#")) | ||
| 1925 | 0 ; Existing comment at bol stays there. | ||
| 1622 | ;; Wrong comment found | 1926 | ;; Wrong comment found |
| 1623 | (save-excursion | 1927 | (save-excursion |
| 1624 | (setq was (cperl-to-comment-or-eol) | 1928 | (setq was (cperl-to-comment-or-eol) |
| 1625 | phony (eq (get-text-property (point) 'syntax-table) | 1929 | phony (eq (get-text-property (point) 'syntax-table) |
| 1626 | cperl-st-cfence)) | 1930 | cperl-st-cfence)) |
| 1627 | (if phony | 1931 | (if phony |
| 1628 | (progn | 1932 | (progn ; Too naive??? |
| 1629 | (re-search-forward "#\\|$") ; Hmm, what about embedded #? | 1933 | (re-search-forward "#\\|$") ; Hmm, what about embedded #? |
| 1630 | (if (eq (preceding-char) ?\#) | 1934 | (if (eq (preceding-char) ?\#) |
| 1631 | (forward-char -1)) | 1935 | (forward-char -1)) |
| 1632 | (setq was nil))) | 1936 | (setq was nil))) |
| 1633 | (if (= (point) p) | 1937 | (if (= (point) p) ; Our caller found a correct place |
| 1634 | (progn | 1938 | (progn |
| 1635 | (skip-chars-backward " \t") | 1939 | (skip-chars-backward " \t") |
| 1636 | (max (1+ (current-column)) ; Else indent at comment column | 1940 | (setq was (current-column)) |
| 1637 | comment-column)) | 1941 | (if (eq was 0) |
| 1942 | comment-column | ||
| 1943 | (max (1+ was) ; Else indent at comment column | ||
| 1944 | comment-column))) | ||
| 1945 | ;; No, the caller found a random place; we need to edit ourselves | ||
| 1638 | (if was nil | 1946 | (if was nil |
| 1639 | (insert comment-start) | 1947 | (insert comment-start) |
| 1640 | (backward-char (length comment-start))) | 1948 | (backward-char (length comment-start))) |
| 1641 | (setq cperl-wrong-comment t) | 1949 | (setq cperl-wrong-comment t) |
| 1642 | (indent-to comment-column 1) ; Indent minimum 1 | 1950 | (cperl-make-indent comment-column 1) ; Indent min 1 |
| 1643 | c))))) ; except leave at least one space. | 1951 | c))))) |
| 1644 | 1952 | ||
| 1645 | ;;;(defun cperl-comment-indent-fallback () | 1953 | ;;;(defun cperl-comment-indent-fallback () |
| 1646 | ;;; "Is called if the standard comment-search procedure fails. | 1954 | ;;; "Is called if the standard comment-search procedure fails. |
| @@ -1666,7 +1974,7 @@ or as help on variables `cperl-tips', `cperl-problems', | |||
| 1666 | (interactive) | 1974 | (interactive) |
| 1667 | (let (cperl-wrong-comment) | 1975 | (let (cperl-wrong-comment) |
| 1668 | (indent-for-comment) | 1976 | (indent-for-comment) |
| 1669 | (if cperl-wrong-comment | 1977 | (if cperl-wrong-comment ; set by `cperl-comment-indent' |
| 1670 | (progn (cperl-to-comment-or-eol) | 1978 | (progn (cperl-to-comment-or-eol) |
| 1671 | (forward-char (length comment-start)))))) | 1979 | (forward-char (length comment-start)))))) |
| 1672 | 1980 | ||
| @@ -1966,15 +2274,10 @@ to nil." | |||
| 1966 | (or | 2274 | (or |
| 1967 | (get-text-property (point) 'in-pod) | 2275 | (get-text-property (point) 'in-pod) |
| 1968 | (cperl-after-expr-p nil "{;:") | 2276 | (cperl-after-expr-p nil "{;:") |
| 1969 | (and (re-search-backward | 2277 | (and (re-search-backward "\\(\\`\n?\\|^\n\\)=\\sw+" (point-min) t) |
| 1970 | ;; "\\(\\`\n?\\|\n\n\\)=\\sw+" | 2278 | (not (looking-at "\n*=cut")) |
| 1971 | "\\(\\`\n?\\|^\n\\)=\\sw+" | 2279 | (or (not cperl-use-syntax-table-text-property) |
| 1972 | (point-min) t) | 2280 | (eq (get-text-property (point) 'syntax-type) 'pod)))))) |
| 1973 | (not (or | ||
| 1974 | (looking-at "=cut") | ||
| 1975 | (and cperl-use-syntax-table-text-property | ||
| 1976 | (not (eq (get-text-property (point) 'syntax-type) | ||
| 1977 | 'pod))))))))) | ||
| 1978 | (progn | 2281 | (progn |
| 1979 | (save-excursion | 2282 | (save-excursion |
| 1980 | (setq notlast (re-search-forward "^\n=" nil t))) | 2283 | (setq notlast (re-search-forward "^\n=" nil t))) |
| @@ -2252,7 +2555,7 @@ key. Will untabify if `cperl-electric-backspace-untabify' is non-nil." | |||
| 2252 | 2555 | ||
| 2253 | (put 'cperl-electric-backspace 'delete-selection 'supersede) | 2556 | (put 'cperl-electric-backspace 'delete-selection 'supersede) |
| 2254 | 2557 | ||
| 2255 | (defun cperl-inside-parens-p () | 2558 | (defun cperl-inside-parens-p () ;; NOT USED???? |
| 2256 | (condition-case () | 2559 | (condition-case () |
| 2257 | (save-excursion | 2560 | (save-excursion |
| 2258 | (save-restriction | 2561 | (save-restriction |
| @@ -2332,8 +2635,9 @@ Return the amount the indentation changed by." | |||
| 2332 | (zerop shift-amt)) | 2635 | (zerop shift-amt)) |
| 2333 | (if (> (- (point-max) pos) (point)) | 2636 | (if (> (- (point-max) pos) (point)) |
| 2334 | (goto-char (- (point-max) pos))) | 2637 | (goto-char (- (point-max) pos))) |
| 2335 | (delete-region beg (point)) | 2638 | ;;;(delete-region beg (point)) |
| 2336 | (indent-to indent) | 2639 | ;;;(indent-to indent) |
| 2640 | (cperl-make-indent indent) | ||
| 2337 | ;; If initial point was within line's indentation, | 2641 | ;; If initial point was within line's indentation, |
| 2338 | ;; position after the indentation. Else stay at same point in text. | 2642 | ;; position after the indentation. Else stay at same point in text. |
| 2339 | (if (> (- (point-max) pos) (point)) | 2643 | (if (> (- (point-max) pos) (point)) |
| @@ -2380,63 +2684,55 @@ Return the amount the indentation changed by." | |||
| 2380 | (or state (setq state (parse-partial-sexp start start-point -1 nil start-state))) | 2684 | (or state (setq state (parse-partial-sexp start start-point -1 nil start-state))) |
| 2381 | (list start state depth prestart)))) | 2685 | (list start state depth prestart)))) |
| 2382 | 2686 | ||
| 2383 | (defun cperl-block-p () ; Do not C-M-q ! One string contains ";" ! | ||
| 2384 | ;; Positions is before ?\{. Checks whether it starts a block. | ||
| 2385 | ;; No save-excursion! | ||
| 2386 | (cperl-backward-to-noncomment (point-min)) | ||
| 2387 | (or (memq (preceding-char) (append ";){}$@&%\C-@" nil)) ; Or label! \C-@ at bobp | ||
| 2388 | ; Label may be mixed up with `$blah :' | ||
| 2389 | (save-excursion (cperl-after-label)) | ||
| 2390 | (and (memq (char-syntax (preceding-char)) '(?w ?_)) | ||
| 2391 | (progn | ||
| 2392 | (backward-sexp) | ||
| 2393 | ;; Need take into account `bless', `return', `tr',... | ||
| 2394 | (or (and (looking-at "[a-zA-Z0-9_:]+[ \t\n\f]*[{#]") ; Method call syntax | ||
| 2395 | (not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\)\\>"))) | ||
| 2396 | (progn | ||
| 2397 | (skip-chars-backward " \t\n\f") | ||
| 2398 | (and (memq (char-syntax (preceding-char)) '(?w ?_)) | ||
| 2399 | (progn | ||
| 2400 | (backward-sexp) | ||
| 2401 | (looking-at | ||
| 2402 | "sub[ \t]+[a-zA-Z0-9_:]+[ \t\n\f]*\\(([^()]*)[ \t\n\f]*\\)?[#{]"))))))))) | ||
| 2403 | |||
| 2404 | (defvar cperl-look-for-prop '((pod in-pod) (here-doc-delim here-doc-group))) | 2687 | (defvar cperl-look-for-prop '((pod in-pod) (here-doc-delim here-doc-group))) |
| 2405 | 2688 | ||
| 2406 | (defun cperl-calculate-indent (&optional parse-data) ; was parse-start | 2689 | (defun cperl-beginning-of-property (p prop &optional lim) |
| 2407 | "Return appropriate indentation for current line as Perl code. | 2690 | "Given that P has a property PROP, find where the property starts. |
| 2408 | In usual case returns an integer: the column to indent to. | 2691 | Will not look before LIM." |
| 2409 | Returns nil if line starts inside a string, t if in a comment. | 2692 | ;;; XXXX What to do at point-max??? |
| 2410 | 2693 | (or (previous-single-property-change (cperl-1+ p) prop lim) | |
| 2411 | Will not correct the indentation for labels, but will correct it for braces | 2694 | (point-min)) |
| 2412 | and closing parentheses and brackets." | 2695 | ;;; (cond ((eq p (point-min)) |
| 2696 | ;;; p) | ||
| 2697 | ;;; ((and lim (<= p lim)) | ||
| 2698 | ;;; p) | ||
| 2699 | ;;; ((not (get-text-property (1- p) prop)) | ||
| 2700 | ;;; p) | ||
| 2701 | ;;; (t (or (previous-single-property-change p look-prop lim) | ||
| 2702 | ;;; (point-min)))) | ||
| 2703 | ) | ||
| 2704 | |||
| 2705 | (defun cperl-sniff-for-indent (&optional parse-data) ; was parse-start | ||
| 2706 | ;; Old workhorse for calculation of indentation; the major problem | ||
| 2707 | ;; is that it mixes the sniffer logic to understand what the current line | ||
| 2708 | ;; MEANS with the logic to actually calculate where to indent it. | ||
| 2709 | ;; The latter part should be eventually moved to `cperl-calculate-indent'; | ||
| 2710 | ;; actually, this is mostly done now... | ||
| 2413 | (cperl-update-syntaxification (point) (point)) | 2711 | (cperl-update-syntaxification (point) (point)) |
| 2414 | (save-excursion | 2712 | (let ((res (get-text-property (point) 'syntax-type))) |
| 2415 | (if (or | 2713 | (save-excursion |
| 2416 | (and (memq (get-text-property (point) 'syntax-type) | 2714 | (cond |
| 2417 | '(pod here-doc here-doc-delim format)) | 2715 | ((and (memq res '(pod here-doc here-doc-delim format)) |
| 2418 | (not (get-text-property (point) 'indentable))) | 2716 | (not (get-text-property (point) 'indentable))) |
| 2419 | ;; before start of POD - whitespace found since do not have 'pod! | 2717 | (vector res)) |
| 2420 | (and (looking-at "[ \t]*\n=") | 2718 | ;; before start of POD - whitespace found since do not have 'pod! |
| 2421 | (error "Spaces before POD section!")) | 2719 | ((looking-at "[ \t]*\n=") |
| 2422 | (and (not cperl-indent-left-aligned-comments) | 2720 | (error "Spaces before POD section!")) |
| 2423 | (looking-at "^#"))) | 2721 | ((and (not cperl-indent-left-aligned-comments) |
| 2424 | nil | 2722 | (looking-at "^#")) |
| 2425 | (beginning-of-line) | 2723 | [comment-special:at-beginning-of-line]) |
| 2426 | (let ((indent-point (point)) | 2724 | ((get-text-property (point) 'in-pod) |
| 2427 | (char-after (save-excursion | 2725 | [in-pod]) |
| 2428 | (skip-chars-forward " \t") | 2726 | (t |
| 2429 | (following-char))) | 2727 | (beginning-of-line) |
| 2430 | (in-pod (get-text-property (point) 'in-pod)) | 2728 | (let* ((indent-point (point)) |
| 2431 | (pre-indent-point (point)) | 2729 | (char-after-pos (save-excursion |
| 2432 | p prop look-prop is-block delim) | 2730 | (skip-chars-forward " \t") |
| 2433 | (cond | 2731 | (point))) |
| 2434 | (in-pod | 2732 | (char-after (char-after char-after-pos)) |
| 2435 | ;; In the verbatim part, probably code example. What to do??? | 2733 | (pre-indent-point (point)) |
| 2436 | ) | 2734 | p prop look-prop is-block delim) |
| 2437 | (t | 2735 | (save-excursion ; Know we are not in POD, find appropriate pos before |
| 2438 | (save-excursion | ||
| 2439 | ;; Not in POD | ||
| 2440 | (cperl-backward-to-noncomment nil) | 2736 | (cperl-backward-to-noncomment nil) |
| 2441 | (setq p (max (point-min) (1- (point))) | 2737 | (setq p (max (point-min) (1- (point))) |
| 2442 | prop (get-text-property p 'syntax-type) | 2738 | prop (get-text-property p 'syntax-type) |
| @@ -2444,437 +2740,597 @@ and closing parentheses and brackets." | |||
| 2444 | 'syntax-type)) | 2740 | 'syntax-type)) |
| 2445 | (if (memq prop '(pod here-doc format here-doc-delim)) | 2741 | (if (memq prop '(pod here-doc format here-doc-delim)) |
| 2446 | (progn | 2742 | (progn |
| 2447 | (goto-char (or (previous-single-property-change p look-prop) | 2743 | (goto-char (cperl-beginning-of-property p look-prop)) |
| 2448 | (point-min))) | ||
| 2449 | (beginning-of-line) | 2744 | (beginning-of-line) |
| 2450 | (setq pre-indent-point (point))))))) | 2745 | (setq pre-indent-point (point))))) |
| 2451 | (goto-char pre-indent-point) | 2746 | (goto-char pre-indent-point) ; Orig line skipping preceeding pod/etc |
| 2452 | (let* ((case-fold-search nil) | 2747 | (let* ((case-fold-search nil) |
| 2453 | (s-s (cperl-get-state (car parse-data) (nth 1 parse-data))) | 2748 | (s-s (cperl-get-state (car parse-data) (nth 1 parse-data))) |
| 2454 | (start (or (nth 2 parse-data) | 2749 | (start (or (nth 2 parse-data) ; last complete sexp terminated |
| 2455 | (nth 0 s-s))) | 2750 | (nth 0 s-s))) ; Good place to start parsing |
| 2456 | (state (nth 1 s-s)) | 2751 | (state (nth 1 s-s)) |
| 2457 | (containing-sexp (car (cdr state))) | 2752 | (containing-sexp (car (cdr state))) |
| 2458 | old-indent) | 2753 | old-indent) |
| 2459 | (if (and | 2754 | (if (and |
| 2460 | ;;containing-sexp ;; We are buggy at toplevel :-( | 2755 | ;;containing-sexp ;; We are buggy at toplevel :-( |
| 2461 | parse-data) | 2756 | parse-data) |
| 2462 | (progn | 2757 | (progn |
| 2463 | (setcar parse-data pre-indent-point) | 2758 | (setcar parse-data pre-indent-point) |
| 2464 | (setcar (cdr parse-data) state) | 2759 | (setcar (cdr parse-data) state) |
| 2465 | (or (nth 2 parse-data) | 2760 | (or (nth 2 parse-data) |
| 2466 | (setcar (cddr parse-data) start)) | 2761 | (setcar (cddr parse-data) start)) |
| 2467 | ;; Before this point: end of statement | 2762 | ;; Before this point: end of statement |
| 2468 | (setq old-indent (nth 3 parse-data)))) | 2763 | (setq old-indent (nth 3 parse-data)))) |
| 2469 | (cond ((get-text-property (point) 'indentable) | 2764 | (cond ((get-text-property (point) 'indentable) |
| 2470 | ;; indent to just after the surrounding open, | 2765 | ;; indent to "after" the surrounding open |
| 2471 | ;; skip blanks if we do not close the expression. | 2766 | ;; (same offset as `cperl-beautify-regexp-piece'), |
| 2472 | (goto-char (1+ (previous-single-property-change (point) 'indentable))) | 2767 | ;; skip blanks if we do not close the expression. |
| 2473 | (or (memq char-after (append ")]}" nil)) | 2768 | (setq delim ; We do not close the expression |
| 2474 | (looking-at "[ \t]*\\(#\\|$\\)") | 2769 | (get-text-property |
| 2475 | (skip-chars-forward " \t")) | 2770 | (cperl-1+ char-after-pos) 'indentable) |
| 2476 | (current-column)) | 2771 | p (1+ (cperl-beginning-of-property |
| 2477 | ((or (nth 3 state) (nth 4 state)) | 2772 | (point) 'indentable)) |
| 2478 | ;; return nil or t if should not change this line | 2773 | is-block ; misused for: preceeding line in REx |
| 2479 | (nth 4 state)) | 2774 | (save-excursion ; Find preceeding line |
| 2480 | ;; XXXX Do we need to special-case this? | 2775 | (cperl-backward-to-noncomment p) |
| 2481 | ((null containing-sexp) | 2776 | (beginning-of-line) |
| 2482 | ;; Line is at top level. May be data or function definition, | 2777 | (if (<= (point) p) |
| 2483 | ;; or may be function argument declaration. | 2778 | (progn ; get indent from the first line |
| 2484 | ;; Indent like the previous top level line | 2779 | (goto-char p) |
| 2485 | ;; unless that ends in a closeparen without semicolon, | 2780 | (skip-chars-forward " \t") |
| 2486 | ;; in which case this line is the first argument decl. | 2781 | (if (memq (char-after (point)) |
| 2487 | (skip-chars-forward " \t") | 2782 | (append "#\n" nil)) |
| 2488 | (+ (save-excursion | 2783 | nil ; Can't use intentation of this line... |
| 2489 | (goto-char start) | 2784 | (point))) |
| 2490 | (- (current-indentation) | 2785 | (skip-chars-forward " \t") |
| 2491 | (if (nth 2 s-s) cperl-indent-level 0))) | 2786 | (point))) |
| 2492 | (if (= char-after ?{) cperl-continued-brace-offset 0) | 2787 | prop (parse-partial-sexp p char-after-pos)) |
| 2493 | (progn | 2788 | (cond ((not delim) ; End the REx, ignore is-block |
| 2494 | (cperl-backward-to-noncomment (or old-indent (point-min))) | 2789 | (vector 'indentable 'terminator p is-block)) |
| 2495 | ;; Look at previous line that's at column 0 | 2790 | (is-block ; Indent w.r.t. preceeding line |
| 2496 | ;; to determine whether we are in top-level decls | 2791 | (vector 'indentable 'cont-line char-after-pos |
| 2497 | ;; or function's arg decls. Set basic-indent accordingly. | 2792 | is-block char-after p)) |
| 2498 | ;; Now add a little if this is a continuation line. | 2793 | (t ; No preceeding line... |
| 2499 | (if (or (bobp) | 2794 | (vector 'indentable 'first-line p)))) |
| 2500 | (eq (point) old-indent) ; old-indent was at comment | 2795 | ((get-text-property char-after-pos 'REx-part2) |
| 2501 | (eq (preceding-char) ?\;) | 2796 | (vector 'REx-part2 (point))) |
| 2502 | ;; Had ?\) too | 2797 | ((nth 3 state) |
| 2503 | (and (eq (preceding-char) ?\}) | 2798 | [comment]) |
| 2504 | (cperl-after-block-and-statement-beg | 2799 | ((nth 4 state) |
| 2505 | (point-min))) ; Was start - too close | 2800 | [string]) |
| 2506 | (memq char-after (append ")]}" nil)) | 2801 | ;; XXXX Do we need to special-case this? |
| 2507 | (and (eq (preceding-char) ?\:) ; label | 2802 | ((null containing-sexp) |
| 2508 | (progn | 2803 | ;; Line is at top level. May be data or function definition, |
| 2509 | (forward-sexp -1) | 2804 | ;; or may be function argument declaration. |
| 2510 | (skip-chars-backward " \t") | 2805 | ;; Indent like the previous top level line |
| 2511 | (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:"))) | 2806 | ;; unless that ends in a closeparen without semicolon, |
| 2512 | (get-text-property (point) 'first-format-line)) | 2807 | ;; in which case this line is the first argument decl. |
| 2513 | (progn | 2808 | (skip-chars-forward " \t") |
| 2514 | (if (and parse-data | 2809 | (cperl-backward-to-noncomment (or old-indent (point-min))) |
| 2515 | (not (eq char-after ?\C-j))) | 2810 | (setq state |
| 2516 | (setcdr (cddr parse-data) | 2811 | (or (bobp) |
| 2517 | (list pre-indent-point))) | 2812 | (eq (point) old-indent) ; old-indent was at comment |
| 2518 | 0) | 2813 | (eq (preceding-char) ?\;) |
| 2519 | cperl-continued-statement-offset)))) | 2814 | ;; Had ?\) too |
| 2520 | ((not | 2815 | (and (eq (preceding-char) ?\}) |
| 2521 | (or (setq is-block | 2816 | (cperl-after-block-and-statement-beg |
| 2522 | (and (setq delim (= (char-after containing-sexp) ?{)) | 2817 | (point-min))) ; Was start - too close |
| 2523 | (save-excursion ; Is it a hash? | 2818 | (memq char-after (append ")]}" nil)) |
| 2524 | (goto-char containing-sexp) | 2819 | (and (eq (preceding-char) ?\:) ; label |
| 2525 | (cperl-block-p)))) | ||
| 2526 | cperl-indent-parens-as-block)) | ||
| 2527 | ;; group is an expression, not a block: | ||
| 2528 | ;; indent to just after the surrounding open parens, | ||
| 2529 | ;; skip blanks if we do not close the expression. | ||
| 2530 | (goto-char (1+ containing-sexp)) | ||
| 2531 | (or (memq char-after | ||
| 2532 | (append (if delim "}" ")]}") nil)) | ||
| 2533 | (looking-at "[ \t]*\\(#\\|$\\)") | ||
| 2534 | (skip-chars-forward " \t")) | ||
| 2535 | (+ (current-column) | ||
| 2536 | (if (and delim | ||
| 2537 | (eq char-after ?\})) | ||
| 2538 | ;; Correct indentation of trailing ?\} | ||
| 2539 | (+ cperl-indent-level cperl-close-paren-offset) | ||
| 2540 | 0))) | ||
| 2541 | ;;; ((and (/= (char-after containing-sexp) ?{) | ||
| 2542 | ;;; (not cperl-indent-parens-as-block)) | ||
| 2543 | ;;; ;; line is expression, not statement: | ||
| 2544 | ;;; ;; indent to just after the surrounding open, | ||
| 2545 | ;;; ;; skip blanks if we do not close the expression. | ||
| 2546 | ;;; (goto-char (1+ containing-sexp)) | ||
| 2547 | ;;; (or (memq char-after (append ")]}" nil)) | ||
| 2548 | ;;; (looking-at "[ \t]*\\(#\\|$\\)") | ||
| 2549 | ;;; (skip-chars-forward " \t")) | ||
| 2550 | ;;; (current-column)) | ||
| 2551 | ;;; ((progn | ||
| 2552 | ;;; ;; Containing-expr starts with \{. Check whether it is a hash. | ||
| 2553 | ;;; (goto-char containing-sexp) | ||
| 2554 | ;;; (and (not (cperl-block-p)) | ||
| 2555 | ;;; (not cperl-indent-parens-as-block))) | ||
| 2556 | ;;; (goto-char (1+ containing-sexp)) | ||
| 2557 | ;;; (or (eq char-after ?\}) | ||
| 2558 | ;;; (looking-at "[ \t]*\\(#\\|$\\)") | ||
| 2559 | ;;; (skip-chars-forward " \t")) | ||
| 2560 | ;;; (+ (current-column) ; Correct indentation of trailing ?\} | ||
| 2561 | ;;; (if (eq char-after ?\}) (+ cperl-indent-level | ||
| 2562 | ;;; cperl-close-paren-offset) | ||
| 2563 | ;;; 0))) | ||
| 2564 | (t | ||
| 2565 | ;; Statement level. Is it a continuation or a new statement? | ||
| 2566 | ;; Find previous non-comment character. | ||
| 2567 | (goto-char pre-indent-point) | ||
| 2568 | (cperl-backward-to-noncomment containing-sexp) | ||
| 2569 | ;; Back up over label lines, since they don't | ||
| 2570 | ;; affect whether our line is a continuation. | ||
| 2571 | ;; (Had \, too) | ||
| 2572 | (while ;;(or (eq (preceding-char) ?\,) | ||
| 2573 | (and (eq (preceding-char) ?:) | ||
| 2574 | (or ;;(eq (char-after (- (point) 2)) ?\') ; ???? | ||
| 2575 | (memq (char-syntax (char-after (- (point) 2))) | ||
| 2576 | '(?w ?_)))) | ||
| 2577 | ;;) | ||
| 2578 | (if (eq (preceding-char) ?\,) | ||
| 2579 | ;; Will go to beginning of line, essentially. | ||
| 2580 | ;; Will ignore embedded sexpr XXXX. | ||
| 2581 | (cperl-backward-to-start-of-continued-exp containing-sexp)) | ||
| 2582 | (beginning-of-line) | ||
| 2583 | (cperl-backward-to-noncomment containing-sexp)) | ||
| 2584 | ;; Now we get the answer. | ||
| 2585 | (if (not (or (eq (1- (point)) containing-sexp) | ||
| 2586 | (memq (preceding-char) | ||
| 2587 | (append (if is-block " ;{" " ,;{") '(nil))) | ||
| 2588 | (and (eq (preceding-char) ?\}) | ||
| 2589 | (cperl-after-block-and-statement-beg | ||
| 2590 | containing-sexp)) | ||
| 2591 | (get-text-property (point) 'first-format-line))) | ||
| 2592 | ;; This line is continuation of preceding line's statement; | ||
| 2593 | ;; indent `cperl-continued-statement-offset' more than the | ||
| 2594 | ;; previous line of the statement. | ||
| 2595 | ;; | ||
| 2596 | ;; There might be a label on this line, just | ||
| 2597 | ;; consider it bad style and ignore it. | ||
| 2598 | (progn | ||
| 2599 | (cperl-backward-to-start-of-continued-exp containing-sexp) | ||
| 2600 | (+ (if (memq char-after (append "}])" nil)) | ||
| 2601 | 0 ; Closing parenth | ||
| 2602 | cperl-continued-statement-offset) | ||
| 2603 | (if (or is-block | ||
| 2604 | (not delim) | ||
| 2605 | (not (eq char-after ?\}))) | ||
| 2606 | 0 | ||
| 2607 | ;; Now it is a hash reference | ||
| 2608 | (+ cperl-indent-level cperl-close-paren-offset)) | ||
| 2609 | (if (looking-at "\\w+[ \t]*:") | ||
| 2610 | (if (> (current-indentation) cperl-min-label-indent) | ||
| 2611 | (- (current-indentation) cperl-label-offset) | ||
| 2612 | ;; Do not move `parse-data', this should | ||
| 2613 | ;; be quick anyway (this comment comes | ||
| 2614 | ;; from different location): | ||
| 2615 | (cperl-calculate-indent)) | ||
| 2616 | (current-column)) | ||
| 2617 | (if (eq char-after ?\{) | ||
| 2618 | cperl-continued-brace-offset 0))) | ||
| 2619 | ;; This line starts a new statement. | ||
| 2620 | ;; Position following last unclosed open. | ||
| 2621 | (goto-char containing-sexp) | ||
| 2622 | ;; Is line first statement after an open-brace? | ||
| 2623 | (or | ||
| 2624 | ;; If no, find that first statement and indent like | ||
| 2625 | ;; it. If the first statement begins with label, do | ||
| 2626 | ;; not believe when the indentation of the label is too | ||
| 2627 | ;; small. | ||
| 2628 | (save-excursion | ||
| 2629 | (forward-char 1) | ||
| 2630 | (setq old-indent (current-indentation)) | ||
| 2631 | (let ((colon-line-end 0)) | ||
| 2632 | (while | ||
| 2633 | (progn (skip-chars-forward " \t\n") | ||
| 2634 | (looking-at "#\\|[a-zA-Z0-9_$]*:[^:]\\|=[a-zA-Z]")) | ||
| 2635 | ;; Skip over comments and labels following openbrace. | ||
| 2636 | (cond ((= (following-char) ?\#) | ||
| 2637 | (forward-line 1)) | ||
| 2638 | ((= (following-char) ?\=) | ||
| 2639 | (goto-char | ||
| 2640 | (or (next-single-property-change (point) 'in-pod) | ||
| 2641 | (point-max)))) ; do not loop if no syntaxification | ||
| 2642 | ;; label: | ||
| 2643 | (t | ||
| 2644 | (save-excursion (end-of-line) | ||
| 2645 | (setq colon-line-end (point))) | ||
| 2646 | (search-forward ":")))) | ||
| 2647 | ;; The first following code counts | ||
| 2648 | ;; if it is before the line we want to indent. | ||
| 2649 | (and (< (point) indent-point) | ||
| 2650 | (if (> colon-line-end (point)) ; After label | ||
| 2651 | (if (> (current-indentation) | ||
| 2652 | cperl-min-label-indent) | ||
| 2653 | (- (current-indentation) cperl-label-offset) | ||
| 2654 | ;; Do not believe: `max' is involved | ||
| 2655 | (+ old-indent cperl-indent-level)) | ||
| 2656 | (current-column))))) | ||
| 2657 | ;; If no previous statement, | ||
| 2658 | ;; indent it relative to line brace is on. | ||
| 2659 | ;; For open brace in column zero, don't let statement | ||
| 2660 | ;; start there too. If cperl-indent-level is zero, | ||
| 2661 | ;; use cperl-brace-offset + cperl-continued-statement-offset instead. | ||
| 2662 | ;; For open-braces not the first thing in a line, | ||
| 2663 | ;; add in cperl-brace-imaginary-offset. | ||
| 2664 | |||
| 2665 | ;; If first thing on a line: ????? | ||
| 2666 | (+ (if (and (bolp) (zerop cperl-indent-level)) | ||
| 2667 | (+ cperl-brace-offset cperl-continued-statement-offset) | ||
| 2668 | cperl-indent-level) | ||
| 2669 | (if (or is-block | ||
| 2670 | (not delim) | ||
| 2671 | (not (eq char-after ?\}))) | ||
| 2672 | 0 | ||
| 2673 | ;; Now it is a hash reference | ||
| 2674 | (+ cperl-indent-level cperl-close-paren-offset)) | ||
| 2675 | ;; Move back over whitespace before the openbrace. | ||
| 2676 | ;; If openbrace is not first nonwhite thing on the line, | ||
| 2677 | ;; add the cperl-brace-imaginary-offset. | ||
| 2678 | (progn (skip-chars-backward " \t") | ||
| 2679 | (if (bolp) 0 cperl-brace-imaginary-offset)) | ||
| 2680 | ;; If the openbrace is preceded by a parenthesized exp, | ||
| 2681 | ;; move to the beginning of that; | ||
| 2682 | ;; possibly a different line | ||
| 2683 | (progn | ||
| 2684 | (if (eq (preceding-char) ?\)) | ||
| 2685 | (forward-sexp -1)) | ||
| 2686 | ;; In the case it starts a subroutine, indent with | ||
| 2687 | ;; respect to `sub', not with respect to the | ||
| 2688 | ;; first thing on the line, say in the case of | ||
| 2689 | ;; anonymous sub in a hash. | ||
| 2690 | ;; | ||
| 2691 | (skip-chars-backward " \t") | ||
| 2692 | (if (and (eq (preceding-char) ?b) | ||
| 2693 | (progn | 2820 | (progn |
| 2694 | (forward-sexp -1) | 2821 | (forward-sexp -1) |
| 2695 | (looking-at "sub\\>")) | 2822 | (skip-chars-backward " \t") |
| 2696 | (setq old-indent | 2823 | (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:"))) |
| 2697 | (nth 1 | 2824 | (get-text-property (point) 'first-format-line))) |
| 2698 | (parse-partial-sexp | 2825 | |
| 2699 | (save-excursion (beginning-of-line) (point)) | 2826 | ;; Look at previous line that's at column 0 |
| 2700 | (point))))) | 2827 | ;; to determine whether we are in top-level decls |
| 2701 | (progn (goto-char (1+ old-indent)) | 2828 | ;; or function's arg decls. Set basic-indent accordingly. |
| 2702 | (skip-chars-forward " \t") | 2829 | ;; Now add a little if this is a continuation line. |
| 2703 | (current-column)) | 2830 | (and state |
| 2704 | ;; Get initial indentation of the line we are on. | 2831 | parse-data |
| 2705 | ;; If line starts with label, calculate label indentation | 2832 | (not (eq char-after ?\C-j)) |
| 2706 | (if (save-excursion | 2833 | (setcdr (cddr parse-data) |
| 2707 | (beginning-of-line) | 2834 | (list pre-indent-point))) |
| 2708 | (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) | 2835 | (vector 'toplevel start char-after state (nth 2 s-s))) |
| 2709 | (if (> (current-indentation) cperl-min-label-indent) | 2836 | ((not |
| 2710 | (- (current-indentation) cperl-label-offset) | 2837 | (or (setq is-block |
| 2711 | ;; Do not move `parse-data', this should | 2838 | (and (setq delim (= (char-after containing-sexp) ?{)) |
| 2712 | ;; be quick anyway: | 2839 | (save-excursion ; Is it a hash? |
| 2713 | (cperl-calculate-indent)) | 2840 | (goto-char containing-sexp) |
| 2714 | (current-indentation)))))))))))))) | 2841 | (cperl-block-p)))) |
| 2715 | 2842 | cperl-indent-parens-as-block)) | |
| 2716 | ;; (defvar cperl-indent-alist | 2843 | ;; group is an expression, not a block: |
| 2717 | ;; '((string nil) | 2844 | ;; indent to just after the surrounding open parens, |
| 2718 | ;; (comment nil) | 2845 | ;; skip blanks if we do not close the expression. |
| 2719 | ;; (toplevel 0) | 2846 | (goto-char (1+ containing-sexp)) |
| 2720 | ;; (toplevel-after-parenth 2) | 2847 | (or (memq char-after |
| 2721 | ;; (toplevel-continued 2) | 2848 | (append (if delim "}" ")]}") nil)) |
| 2722 | ;; (expression 1)) | 2849 | (looking-at "[ \t]*\\(#\\|$\\)") |
| 2723 | ;; "Alist of indentation rules for CPerl mode. | 2850 | (skip-chars-forward " \t")) |
| 2724 | ;; The values mean: | 2851 | (setq old-indent (point)) ; delim=is-brace |
| 2725 | ;; nil: do not indent; | 2852 | (vector 'in-parens char-after (point) delim containing-sexp)) |
| 2726 | ;; number: add this amount of indentation. | 2853 | (t |
| 2727 | 2854 | ;; Statement level. Is it a continuation or a new statement? | |
| 2728 | ;; Not finished, not used.") | 2855 | ;; Find previous non-comment character. |
| 2729 | 2856 | (goto-char pre-indent-point) ; Skip one level of POD/etc | |
| 2730 | ;; (defun cperl-where-am-i (&optional parse-start start-state) | 2857 | (cperl-backward-to-noncomment containing-sexp) |
| 2731 | ;; ;; Unfinished | 2858 | ;; Back up over label lines, since they don't |
| 2732 | ;; "Return a list of lists ((TYPE POS)...) of good points before the point. | 2859 | ;; affect whether our line is a continuation. |
| 2733 | ;; ;; POS may be nil if it is hard to find, say, when TYPE is `string' or `comment'. | 2860 | ;; (Had \, too) |
| 2734 | 2861 | (while;;(or (eq (preceding-char) ?\,) | |
| 2735 | ;; ;; Not finished, not used." | 2862 | (and (eq (preceding-char) ?:) |
| 2736 | ;; (save-excursion | 2863 | (or;;(eq (char-after (- (point) 2)) ?\') ; ???? |
| 2737 | ;; (let* ((start-point (point)) | 2864 | (memq (char-syntax (char-after (- (point) 2))) |
| 2738 | ;; (s-s (cperl-get-state)) | 2865 | '(?w ?_)))) |
| 2739 | ;; (start (nth 0 s-s)) | 2866 | ;;) |
| 2740 | ;; (state (nth 1 s-s)) | 2867 | ;; This is always FALSE? |
| 2741 | ;; (prestart (nth 3 s-s)) | 2868 | (if (eq (preceding-char) ?\,) |
| 2742 | ;; (containing-sexp (car (cdr state))) | 2869 | ;; Will go to beginning of line, essentially. |
| 2743 | ;; (case-fold-search nil) | 2870 | ;; Will ignore embedded sexpr XXXX. |
| 2744 | ;; (res (list (list 'parse-start start) (list 'parse-prestart prestart)))) | 2871 | (cperl-backward-to-start-of-continued-exp containing-sexp)) |
| 2745 | ;; (cond ((nth 3 state) ; In string | 2872 | (beginning-of-line) |
| 2746 | ;; (setq res (cons (list 'string nil (nth 3 state)) res))) ; What started string | 2873 | (cperl-backward-to-noncomment containing-sexp)) |
| 2747 | ;; ((nth 4 state) ; In comment | 2874 | ;; Now we get non-label preceeding the indent point |
| 2748 | ;; (setq res (cons '(comment) res))) | 2875 | (if (not (or (eq (1- (point)) containing-sexp) |
| 2749 | ;; ((null containing-sexp) | 2876 | (memq (preceding-char) |
| 2750 | ;; ;; Line is at top level. | 2877 | (append (if is-block " ;{" " ,;{") '(nil))) |
| 2751 | ;; ;; Indent like the previous top level line | 2878 | (and (eq (preceding-char) ?\}) |
| 2752 | ;; ;; unless that ends in a closeparen without semicolon, | 2879 | (cperl-after-block-and-statement-beg |
| 2753 | ;; ;; in which case this line is the first argument decl. | 2880 | containing-sexp)) |
| 2754 | ;; (cperl-backward-to-noncomment (or parse-start (point-min))) | 2881 | (get-text-property (point) 'first-format-line))) |
| 2755 | ;; ;;(skip-chars-backward " \t\f\n") | 2882 | ;; This line is continuation of preceding line's statement; |
| 2756 | ;; (cond | 2883 | ;; indent `cperl-continued-statement-offset' more than the |
| 2757 | ;; ((or (bobp) | 2884 | ;; previous line of the statement. |
| 2758 | ;; (memq (preceding-char) (append ";}" nil))) | 2885 | ;; |
| 2759 | ;; (setq res (cons (list 'toplevel start) res))) | 2886 | ;; There might be a label on this line, just |
| 2760 | ;; ((eq (preceding-char) ?\) ) | 2887 | ;; consider it bad style and ignore it. |
| 2761 | ;; (setq res (cons (list 'toplevel-after-parenth start) res))) | 2888 | (progn |
| 2762 | ;; (t | 2889 | (cperl-backward-to-start-of-continued-exp containing-sexp) |
| 2763 | ;; (setq res (cons (list 'toplevel-continued start) res))))) | 2890 | (vector 'continuation (point) char-after is-block delim)) |
| 2764 | ;; ((/= (char-after containing-sexp) ?{) | 2891 | ;; This line starts a new statement. |
| 2765 | ;; ;; line is expression, not statement: | 2892 | ;; Position following last unclosed open brace |
| 2766 | ;; ;; indent to just after the surrounding open. | 2893 | (goto-char containing-sexp) |
| 2767 | ;; ;; skip blanks if we do not close the expression. | 2894 | ;; Is line first statement after an open-brace? |
| 2768 | ;; (setq res (cons (list 'expression-blanks | 2895 | (or |
| 2769 | ;; (progn | 2896 | ;; If no, find that first statement and indent like |
| 2770 | ;; (goto-char (1+ containing-sexp)) | 2897 | ;; it. If the first statement begins with label, do |
| 2771 | ;; (or (looking-at "[ \t]*\\(#\\|$\\)") | 2898 | ;; not believe when the indentation of the label is too |
| 2772 | ;; (skip-chars-forward " \t")) | 2899 | ;; small. |
| 2773 | ;; (point))) | 2900 | (save-excursion |
| 2774 | ;; (cons (list 'expression containing-sexp) res)))) | 2901 | (forward-char 1) |
| 2775 | ;; ((progn | 2902 | (let ((colon-line-end 0)) |
| 2776 | ;; ;; Containing-expr starts with \{. Check whether it is a hash. | 2903 | (while |
| 2777 | ;; (goto-char containing-sexp) | 2904 | (progn (skip-chars-forward " \t\n") |
| 2778 | ;; (not (cperl-block-p))) | 2905 | (looking-at "#\\|[a-zA-Z0-9_$]*:[^:]\\|=[a-zA-Z]")) |
| 2779 | ;; (setq res (cons (list 'expression-blanks | 2906 | ;; Skip over comments and labels following openbrace. |
| 2780 | ;; (progn | 2907 | (cond ((= (following-char) ?\#) |
| 2781 | ;; (goto-char (1+ containing-sexp)) | 2908 | (forward-line 1)) |
| 2782 | ;; (or (looking-at "[ \t]*\\(#\\|$\\)") | 2909 | ((= (following-char) ?\=) |
| 2783 | ;; (skip-chars-forward " \t")) | 2910 | (goto-char |
| 2784 | ;; (point))) | 2911 | (or (next-single-property-change (point) 'in-pod) |
| 2785 | ;; (cons (list 'expression containing-sexp) res)))) | 2912 | (point-max)))) ; do not loop if no syntaxification |
| 2786 | ;; (t | 2913 | ;; label: |
| 2787 | ;; ;; Statement level. | 2914 | (t |
| 2788 | ;; (setq res (cons (list 'in-block containing-sexp) res)) | 2915 | (save-excursion (end-of-line) |
| 2789 | ;; ;; Is it a continuation or a new statement? | 2916 | (setq colon-line-end (point))) |
| 2790 | ;; ;; Find previous non-comment character. | 2917 | (search-forward ":")))) |
| 2791 | ;; (cperl-backward-to-noncomment containing-sexp) | 2918 | ;; We are at beginning of code (NOT label or comment) |
| 2792 | ;; ;; Back up over label lines, since they don't | 2919 | ;; First, the following code counts |
| 2793 | ;; ;; affect whether our line is a continuation. | 2920 | ;; if it is before the line we want to indent. |
| 2794 | ;; ;; Back up comma-delimited lines too ????? | 2921 | (and (< (point) indent-point) |
| 2795 | ;; (while (or (eq (preceding-char) ?\,) | 2922 | (vector 'have-prev-sibling (point) colon-line-end |
| 2796 | ;; (save-excursion (cperl-after-label))) | 2923 | containing-sexp)))) |
| 2797 | ;; (if (eq (preceding-char) ?\,) | 2924 | (progn |
| 2798 | ;; ;; Will go to beginning of line, essentially | 2925 | ;; If no previous statement, |
| 2799 | ;; ;; Will ignore embedded sexpr XXXX. | 2926 | ;; indent it relative to line brace is on. |
| 2800 | ;; (cperl-backward-to-start-of-continued-exp containing-sexp)) | 2927 | |
| 2801 | ;; (beginning-of-line) | 2928 | ;; For open-braces not the first thing in a line, |
| 2802 | ;; (cperl-backward-to-noncomment containing-sexp)) | 2929 | ;; add in cperl-brace-imaginary-offset. |
| 2803 | ;; ;; Now we get the answer. | 2930 | |
| 2804 | ;; (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\, | 2931 | ;; If first thing on a line: ????? |
| 2805 | ;; ;; This line is continuation of preceding line's statement. | 2932 | ;; Move back over whitespace before the openbrace. |
| 2806 | ;; (list (list 'statement-continued containing-sexp)) | 2933 | (setq ; brace first thing on a line |
| 2807 | ;; ;; This line starts a new statement. | 2934 | old-indent (progn (skip-chars-backward " \t") (bolp))) |
| 2808 | ;; ;; Position following last unclosed open. | 2935 | ;; Should we indent w.r.t. earlier than start? |
| 2809 | ;; (goto-char containing-sexp) | 2936 | ;; Move to start of control group, possibly on a different line |
| 2810 | ;; ;; Is line first statement after an open-brace? | 2937 | (or cperl-indent-wrt-brace |
| 2811 | ;; (or | 2938 | (cperl-backward-to-noncomment (point-min))) |
| 2812 | ;; ;; If no, find that first statement and indent like | 2939 | ;; If the openbrace is preceded by a parenthesized exp, |
| 2813 | ;; ;; it. If the first statement begins with label, do | 2940 | ;; move to the beginning of that; |
| 2814 | ;; ;; not believe when the indentation of the label is too | 2941 | (if (eq (preceding-char) ?\)) |
| 2815 | ;; ;; small. | 2942 | (progn |
| 2816 | ;; (save-excursion | 2943 | (forward-sexp -1) |
| 2817 | ;; (forward-char 1) | 2944 | (cperl-backward-to-noncomment (point-min)))) |
| 2818 | ;; (let ((colon-line-end 0)) | 2945 | ;; In the case it starts a subroutine, indent with |
| 2819 | ;; (while (progn (skip-chars-forward " \t\n" start-point) | 2946 | ;; respect to `sub', not with respect to the |
| 2820 | ;; (and (< (point) start-point) | 2947 | ;; first thing on the line, say in the case of |
| 2821 | ;; (looking-at | 2948 | ;; anonymous sub in a hash. |
| 2822 | ;; "#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]"))) | 2949 | (if (and;; Is it a sub in group starting on this line? |
| 2823 | ;; ;; Skip over comments and labels following openbrace. | 2950 | (cond ((get-text-property (point) 'attrib-group) |
| 2824 | ;; (cond ((= (following-char) ?\#) | 2951 | (goto-char (cperl-beginning-of-property |
| 2825 | ;; ;;(forward-line 1) | 2952 | (point) 'attrib-group))) |
| 2826 | ;; (end-of-line)) | 2953 | ((eq (preceding-char) ?b) |
| 2827 | ;; ;; label: | 2954 | (forward-sexp -1) |
| 2828 | ;; (t | 2955 | (looking-at "sub\\>"))) |
| 2829 | ;; (save-excursion (end-of-line) | 2956 | (setq p (nth 1 ; start of innermost containing list |
| 2830 | ;; (setq colon-line-end (point))) | 2957 | (parse-partial-sexp |
| 2831 | ;; (search-forward ":")))) | 2958 | (save-excursion (beginning-of-line) |
| 2832 | ;; ;; Now at the point, after label, or at start | 2959 | (point)) |
| 2833 | ;; ;; of first statement in the block. | 2960 | (point))))) |
| 2834 | ;; (and (< (point) start-point) | 2961 | (progn |
| 2835 | ;; (if (> colon-line-end (point)) | 2962 | (goto-char (1+ p)) ; enclosing block on the same line |
| 2836 | ;; ;; Before statement after label | 2963 | (skip-chars-forward " \t") |
| 2837 | ;; (if (> (current-indentation) | 2964 | (vector 'code-start-in-block containing-sexp char-after |
| 2838 | ;; cperl-min-label-indent) | 2965 | (and delim (not is-block)) ; is a HASH |
| 2839 | ;; (list (list 'label-in-block (point))) | 2966 | old-indent ; brace first thing on a line |
| 2840 | ;; ;; Do not believe: `max' is involved | 2967 | t (point) ; have something before... |
| 2841 | ;; (list | 2968 | ) |
| 2842 | ;; (list 'label-in-block-min-indent (point)))) | 2969 | ;;(current-column) |
| 2843 | ;; ;; Before statement | 2970 | ) |
| 2844 | ;; (list 'statement-in-block (point)))))) | 2971 | ;; Get initial indentation of the line we are on. |
| 2845 | ;; ;; If no previous statement, | 2972 | ;; If line starts with label, calculate label indentation |
| 2846 | ;; ;; indent it relative to line brace is on. | 2973 | (vector 'code-start-in-block containing-sexp char-after |
| 2847 | ;; ;; For open brace in column zero, don't let statement | 2974 | (and delim (not is-block)) ; is a HASH |
| 2848 | ;; ;; start there too. If cperl-indent-level is zero, | 2975 | old-indent ; brace first thing on a line |
| 2849 | ;; ;; use cperl-brace-offset + cperl-continued-statement-offset instead. | 2976 | nil (point) ; nothing interesting before |
| 2850 | ;; ;; For open-braces not the first thing in a line, | 2977 | )))))))))))))) |
| 2851 | ;; ;; add in cperl-brace-imaginary-offset. | 2978 | |
| 2852 | 2979 | (defvar cperl-indent-rules-alist | |
| 2853 | ;; ;; If first thing on a line: ????? | 2980 | '((pod nil) ; via `syntax-type' property |
| 2854 | ;; (+ (if (and (bolp) (zerop cperl-indent-level)) | 2981 | (here-doc nil) ; via `syntax-type' property |
| 2855 | ;; (+ cperl-brace-offset cperl-continued-statement-offset) | 2982 | (here-doc-delim nil) ; via `syntax-type' property |
| 2856 | ;; cperl-indent-level) | 2983 | (format nil) ; via `syntax-type' property |
| 2857 | ;; ;; Move back over whitespace before the openbrace. | 2984 | (in-pod nil) ; via `in-pod' property |
| 2858 | ;; ;; If openbrace is not first nonwhite thing on the line, | 2985 | (comment-special:at-beginning-of-line nil) |
| 2859 | ;; ;; add the cperl-brace-imaginary-offset. | 2986 | (string t) |
| 2860 | ;; (progn (skip-chars-backward " \t") | 2987 | (comment nil)) |
| 2861 | ;; (if (bolp) 0 cperl-brace-imaginary-offset)) | 2988 | "Alist of indentation rules for CPerl mode. |
| 2862 | ;; ;; If the openbrace is preceded by a parenthesized exp, | 2989 | The values mean: |
| 2863 | ;; ;; move to the beginning of that; | 2990 | nil: do not indent; |
| 2864 | ;; ;; possibly a different line | 2991 | number: add this amount of indentation. |
| 2865 | ;; (progn | 2992 | |
| 2866 | ;; (if (eq (preceding-char) ?\)) | 2993 | Not finished.") |
| 2867 | ;; (forward-sexp -1)) | 2994 | |
| 2868 | ;; ;; Get initial indentation of the line we are on. | 2995 | (defun cperl-calculate-indent (&optional parse-data) ; was parse-start |
| 2869 | ;; ;; If line starts with label, calculate label indentation | 2996 | "Return appropriate indentation for current line as Perl code. |
| 2870 | ;; (if (save-excursion | 2997 | In usual case returns an integer: the column to indent to. |
| 2871 | ;; (beginning-of-line) | 2998 | Returns nil if line starts inside a string, t if in a comment. |
| 2872 | ;; (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) | 2999 | |
| 2873 | ;; (if (> (current-indentation) cperl-min-label-indent) | 3000 | Will not correct the indentation for labels, but will correct it for braces |
| 2874 | ;; (- (current-indentation) cperl-label-offset) | 3001 | and closing parentheses and brackets." |
| 2875 | ;; (cperl-calculate-indent)) | 3002 | ;; This code is still a broken architecture: in some cases we need to |
| 2876 | ;; (current-indentation)))))))) | 3003 | ;; compensate for some modifications which `cperl-indent-line' will add later |
| 2877 | ;; res))) | 3004 | (save-excursion |
| 3005 | (let ((i (cperl-sniff-for-indent parse-data)) what p) | ||
| 3006 | (cond | ||
| 3007 | ;;((or (null i) (eq i t) (numberp i)) | ||
| 3008 | ;; i) | ||
| 3009 | ((vectorp i) | ||
| 3010 | (setq what (assoc (elt i 0) cperl-indent-rules-alist)) | ||
| 3011 | (cond | ||
| 3012 | (what (cadr what)) ; Load from table | ||
| 3013 | ;; | ||
| 3014 | ;; Indenters for regular expressions with //x and qw() | ||
| 3015 | ;; | ||
| 3016 | ((eq 'REx-part2 (elt i 0)) ;; [self start] start of /REP in s//REP/x | ||
| 3017 | (goto-char (elt i 1)) | ||
| 3018 | (condition-case nil ; Use indentation of the 1st part | ||
| 3019 | (forward-sexp -1)) | ||
| 3020 | (current-column)) | ||
| 3021 | ((eq 'indentable (elt i 0)) ; Indenter for REGEXP qw() etc | ||
| 3022 | (cond ;;; [indentable terminator start-pos is-block] | ||
| 3023 | ((eq 'terminator (elt i 1)) ; Lone terminator of "indentable string" | ||
| 3024 | (goto-char (elt i 2)) ; After opening parens | ||
| 3025 | (1- (current-column))) | ||
| 3026 | ((eq 'first-line (elt i 1)); [indentable first-line start-pos] | ||
| 3027 | (goto-char (elt i 2)) | ||
| 3028 | (+ (or cperl-regexp-indent-step cperl-indent-level) | ||
| 3029 | -1 | ||
| 3030 | (current-column))) | ||
| 3031 | ((eq 'cont-line (elt i 1)); [indentable cont-line pos prev-pos first-char start-pos] | ||
| 3032 | ;; Indent as the level after closing parens | ||
| 3033 | (goto-char (elt i 2)) ; indent line | ||
| 3034 | (skip-chars-forward " \t)") ; Skip closing parens | ||
| 3035 | (setq p (point)) | ||
| 3036 | (goto-char (elt i 3)) ; previous line | ||
| 3037 | (skip-chars-forward " \t)") ; Skip closing parens | ||
| 3038 | ;; Number of parens in between: | ||
| 3039 | (setq p (nth 0 (parse-partial-sexp (point) p)) | ||
| 3040 | what (elt i 4)) ; First char on current line | ||
| 3041 | (goto-char (elt i 3)) ; previous line | ||
| 3042 | (+ (* p (or cperl-regexp-indent-step cperl-indent-level)) | ||
| 3043 | (cond ((eq what ?\) ) | ||
| 3044 | (- cperl-close-paren-offset)) ; compensate | ||
| 3045 | ((eq what ?\| ) | ||
| 3046 | (- (or cperl-regexp-indent-step cperl-indent-level))) | ||
| 3047 | (t 0)) | ||
| 3048 | (if (eq (following-char) ?\| ) | ||
| 3049 | (or cperl-regexp-indent-step cperl-indent-level) | ||
| 3050 | 0) | ||
| 3051 | (current-column))) | ||
| 3052 | (t | ||
| 3053 | (error "Unrecognized value of indent: %s" i)))) | ||
| 3054 | ;; | ||
| 3055 | ;; Indenter for stuff at toplevel | ||
| 3056 | ;; | ||
| 3057 | ((eq 'toplevel (elt i 0)) ;; [toplevel start char-after state immed-after-block] | ||
| 3058 | (+ (save-excursion ; To beg-of-defun, or end of last sexp | ||
| 3059 | (goto-char (elt i 1)) ; start = Good place to start parsing | ||
| 3060 | (- (current-indentation) ; | ||
| 3061 | (if (elt i 4) cperl-indent-level 0))) ; immed-after-block | ||
| 3062 | (if (eq (elt i 2) ?{) cperl-continued-brace-offset 0) ; char-after | ||
| 3063 | ;; Look at previous line that's at column 0 | ||
| 3064 | ;; to determine whether we are in top-level decls | ||
| 3065 | ;; or function's arg decls. Set basic-indent accordingly. | ||
| 3066 | ;; Now add a little if this is a continuation line. | ||
| 3067 | (if (elt i 3) ; state (XXX What is the semantic???) | ||
| 3068 | 0 | ||
| 3069 | cperl-continued-statement-offset))) | ||
| 3070 | ;; | ||
| 3071 | ;; Indenter for stuff in "parentheses" (or brackets, braces-as-hash) | ||
| 3072 | ;; | ||
| 3073 | ((eq 'in-parens (elt i 0)) | ||
| 3074 | ;; in-parens char-after old-indent-point is-brace containing-sexp | ||
| 3075 | |||
| 3076 | ;; group is an expression, not a block: | ||
| 3077 | ;; indent to just after the surrounding open parens, | ||
| 3078 | ;; skip blanks if we do not close the expression. | ||
| 3079 | (+ (progn | ||
| 3080 | (goto-char (elt i 2)) ; old-indent-point | ||
| 3081 | (current-column)) | ||
| 3082 | (if (and (elt i 3) ; is-brace | ||
| 3083 | (eq (elt i 1) ?\})) ; char-after | ||
| 3084 | ;; Correct indentation of trailing ?\} | ||
| 3085 | (+ cperl-indent-level cperl-close-paren-offset) | ||
| 3086 | 0))) | ||
| 3087 | ;; | ||
| 3088 | ;; Indenter for continuation lines | ||
| 3089 | ;; | ||
| 3090 | ((eq 'continuation (elt i 0)) | ||
| 3091 | ;; [continuation statement-start char-after is-block is-brace] | ||
| 3092 | (goto-char (elt i 1)) ; statement-start | ||
| 3093 | (+ (if (memq (elt i 2) (append "}])" nil)) ; char-after | ||
| 3094 | 0 ; Closing parenth | ||
| 3095 | cperl-continued-statement-offset) | ||
| 3096 | (if (or (elt i 3) ; is-block | ||
| 3097 | (not (elt i 4)) ; is-brace | ||
| 3098 | (not (eq (elt i 2) ?\}))) ; char-after | ||
| 3099 | 0 | ||
| 3100 | ;; Now it is a hash reference | ||
| 3101 | (+ cperl-indent-level cperl-close-paren-offset)) | ||
| 3102 | ;; Labels do not take :: ... | ||
| 3103 | (if (looking-at "\\(\\w\\|_\\)+[ \t]*:") | ||
| 3104 | (if (> (current-indentation) cperl-min-label-indent) | ||
| 3105 | (- (current-indentation) cperl-label-offset) | ||
| 3106 | ;; Do not move `parse-data', this should | ||
| 3107 | ;; be quick anyway (this comment comes | ||
| 3108 | ;; from different location): | ||
| 3109 | (cperl-calculate-indent)) | ||
| 3110 | (current-column)) | ||
| 3111 | (if (eq (elt i 2) ?\{) ; char-after | ||
| 3112 | cperl-continued-brace-offset 0))) | ||
| 3113 | ;; | ||
| 3114 | ;; Indenter for lines in a block which are not leading lines | ||
| 3115 | ;; | ||
| 3116 | ((eq 'have-prev-sibling (elt i 0)) | ||
| 3117 | ;; [have-prev-sibling sibling-beg colon-line-end block-start] | ||
| 3118 | (goto-char (elt i 1)) | ||
| 3119 | (if (> (elt i 2) (point)) ; colon-line-end; After-label, same line | ||
| 3120 | (if (> (current-indentation) | ||
| 3121 | cperl-min-label-indent) | ||
| 3122 | (- (current-indentation) cperl-label-offset) | ||
| 3123 | ;; Do not believe: `max' was involved in calculation of indent | ||
| 3124 | (+ cperl-indent-level | ||
| 3125 | (save-excursion | ||
| 3126 | (goto-char (elt i 3)) ; block-start | ||
| 3127 | (current-indentation)))) | ||
| 3128 | (current-column))) | ||
| 3129 | ;; | ||
| 3130 | ;; Indenter for the first line in a block | ||
| 3131 | ;; | ||
| 3132 | ((eq 'code-start-in-block (elt i 0)) | ||
| 3133 | ;;[code-start-in-block before-brace char-after | ||
| 3134 | ;; is-a-HASH-ref brace-is-first-thing-on-a-line | ||
| 3135 | ;; group-starts-before-start-of-sub start-of-control-group] | ||
| 3136 | (goto-char (elt i 1)) | ||
| 3137 | ;; For open brace in column zero, don't let statement | ||
| 3138 | ;; start there too. If cperl-indent-level=0, | ||
| 3139 | ;; use cperl-brace-offset + cperl-continued-statement-offset instead. | ||
| 3140 | (+ (if (and (bolp) (zerop cperl-indent-level)) | ||
| 3141 | (+ cperl-brace-offset cperl-continued-statement-offset) | ||
| 3142 | cperl-indent-level) | ||
| 3143 | (if (and (elt i 3) ; is-a-HASH-ref | ||
| 3144 | (eq (elt i 2) ?\})) ; char-after: End of a hash reference | ||
| 3145 | (+ cperl-indent-level cperl-close-paren-offset) | ||
| 3146 | 0) | ||
| 3147 | ;; Unless openbrace is the first nonwhite thing on the line, | ||
| 3148 | ;; add the cperl-brace-imaginary-offset. | ||
| 3149 | (if (elt i 4) 0 ; brace-is-first-thing-on-a-line | ||
| 3150 | cperl-brace-imaginary-offset) | ||
| 3151 | (progn | ||
| 3152 | (goto-char (elt i 6)) ; start-of-control-group | ||
| 3153 | (if (elt i 5) ; group-starts-before-start-of-sub | ||
| 3154 | (current-column) | ||
| 3155 | ;; Get initial indentation of the line we are on. | ||
| 3156 | ;; If line starts with label, calculate label indentation | ||
| 3157 | (if (save-excursion | ||
| 3158 | (beginning-of-line) | ||
| 3159 | (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) | ||
| 3160 | (if (> (current-indentation) cperl-min-label-indent) | ||
| 3161 | (- (current-indentation) cperl-label-offset) | ||
| 3162 | ;; Do not move `parse-data', this should | ||
| 3163 | ;; be quick anyway: | ||
| 3164 | (cperl-calculate-indent)) | ||
| 3165 | (current-indentation)))))) | ||
| 3166 | (t | ||
| 3167 | (error "Unrecognized value of indent: %s" i)))) | ||
| 3168 | (t | ||
| 3169 | (error "Got strange value of indent: %s" i)))))) | ||
| 3170 | |||
| 3171 | (defvar cperl-indent-alist | ||
| 3172 | '((string nil) | ||
| 3173 | (comment nil) | ||
| 3174 | (toplevel 0) | ||
| 3175 | (toplevel-after-parenth 2) | ||
| 3176 | (toplevel-continued 2) | ||
| 3177 | (expression 1)) | ||
| 3178 | "Alist of indentation rules for CPerl mode. | ||
| 3179 | The values mean: | ||
| 3180 | nil: do not indent; | ||
| 3181 | number: add this amount of indentation. | ||
| 3182 | |||
| 3183 | Not finished, not used.") | ||
| 3184 | |||
| 3185 | (defun cperl-where-am-i (&optional parse-start start-state) | ||
| 3186 | ;; Unfinished | ||
| 3187 | "Return a list of lists ((TYPE POS)...) of good points before the point. | ||
| 3188 | POS may be nil if it is hard to find, say, when TYPE is `string' or `comment'. | ||
| 3189 | |||
| 3190 | Not finished, not used." | ||
| 3191 | (save-excursion | ||
| 3192 | (let* ((start-point (point)) unused | ||
| 3193 | (s-s (cperl-get-state)) | ||
| 3194 | (start (nth 0 s-s)) | ||
| 3195 | (state (nth 1 s-s)) | ||
| 3196 | (prestart (nth 3 s-s)) | ||
| 3197 | (containing-sexp (car (cdr state))) | ||
| 3198 | (case-fold-search nil) | ||
| 3199 | (res (list (list 'parse-start start) (list 'parse-prestart prestart)))) | ||
| 3200 | (cond ((nth 3 state) ; In string | ||
| 3201 | (setq res (cons (list 'string nil (nth 3 state)) res))) ; What started string | ||
| 3202 | ((nth 4 state) ; In comment | ||
| 3203 | (setq res (cons '(comment) res))) | ||
| 3204 | ((null containing-sexp) | ||
| 3205 | ;; Line is at top level. | ||
| 3206 | ;; Indent like the previous top level line | ||
| 3207 | ;; unless that ends in a closeparen without semicolon, | ||
| 3208 | ;; in which case this line is the first argument decl. | ||
| 3209 | (cperl-backward-to-noncomment (or parse-start (point-min))) | ||
| 3210 | ;;(skip-chars-backward " \t\f\n") | ||
| 3211 | (cond | ||
| 3212 | ((or (bobp) | ||
| 3213 | (memq (preceding-char) (append ";}" nil))) | ||
| 3214 | (setq res (cons (list 'toplevel start) res))) | ||
| 3215 | ((eq (preceding-char) ?\) ) | ||
| 3216 | (setq res (cons (list 'toplevel-after-parenth start) res))) | ||
| 3217 | (t | ||
| 3218 | (setq res (cons (list 'toplevel-continued start) res))))) | ||
| 3219 | ((/= (char-after containing-sexp) ?{) | ||
| 3220 | ;; line is expression, not statement: | ||
| 3221 | ;; indent to just after the surrounding open. | ||
| 3222 | ;; skip blanks if we do not close the expression. | ||
| 3223 | (setq res (cons (list 'expression-blanks | ||
| 3224 | (progn | ||
| 3225 | (goto-char (1+ containing-sexp)) | ||
| 3226 | (or (looking-at "[ \t]*\\(#\\|$\\)") | ||
| 3227 | (skip-chars-forward " \t")) | ||
| 3228 | (point))) | ||
| 3229 | (cons (list 'expression containing-sexp) res)))) | ||
| 3230 | ((progn | ||
| 3231 | ;; Containing-expr starts with \{. Check whether it is a hash. | ||
| 3232 | (goto-char containing-sexp) | ||
| 3233 | (not (cperl-block-p))) | ||
| 3234 | (setq res (cons (list 'expression-blanks | ||
| 3235 | (progn | ||
| 3236 | (goto-char (1+ containing-sexp)) | ||
| 3237 | (or (looking-at "[ \t]*\\(#\\|$\\)") | ||
| 3238 | (skip-chars-forward " \t")) | ||
| 3239 | (point))) | ||
| 3240 | (cons (list 'expression containing-sexp) res)))) | ||
| 3241 | (t | ||
| 3242 | ;; Statement level. | ||
| 3243 | (setq res (cons (list 'in-block containing-sexp) res)) | ||
| 3244 | ;; Is it a continuation or a new statement? | ||
| 3245 | ;; Find previous non-comment character. | ||
| 3246 | (cperl-backward-to-noncomment containing-sexp) | ||
| 3247 | ;; Back up over label lines, since they don't | ||
| 3248 | ;; affect whether our line is a continuation. | ||
| 3249 | ;; Back up comma-delimited lines too ????? | ||
| 3250 | (while (or (eq (preceding-char) ?\,) | ||
| 3251 | (save-excursion (cperl-after-label))) | ||
| 3252 | (if (eq (preceding-char) ?\,) | ||
| 3253 | ;; Will go to beginning of line, essentially | ||
| 3254 | ;; Will ignore embedded sexpr XXXX. | ||
| 3255 | (cperl-backward-to-start-of-continued-exp containing-sexp)) | ||
| 3256 | (beginning-of-line) | ||
| 3257 | (cperl-backward-to-noncomment containing-sexp)) | ||
| 3258 | ;; Now we get the answer. | ||
| 3259 | (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\, | ||
| 3260 | ;; This line is continuation of preceding line's statement. | ||
| 3261 | (list (list 'statement-continued containing-sexp)) | ||
| 3262 | ;; This line starts a new statement. | ||
| 3263 | ;; Position following last unclosed open. | ||
| 3264 | (goto-char containing-sexp) | ||
| 3265 | ;; Is line first statement after an open-brace? | ||
| 3266 | (or | ||
| 3267 | ;; If no, find that first statement and indent like | ||
| 3268 | ;; it. If the first statement begins with label, do | ||
| 3269 | ;; not believe when the indentation of the label is too | ||
| 3270 | ;; small. | ||
| 3271 | (save-excursion | ||
| 3272 | (forward-char 1) | ||
| 3273 | (let ((colon-line-end 0)) | ||
| 3274 | (while (progn (skip-chars-forward " \t\n" start-point) | ||
| 3275 | (and (< (point) start-point) | ||
| 3276 | (looking-at | ||
| 3277 | "#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]"))) | ||
| 3278 | ;; Skip over comments and labels following openbrace. | ||
| 3279 | (cond ((= (following-char) ?\#) | ||
| 3280 | ;;(forward-line 1) | ||
| 3281 | (end-of-line)) | ||
| 3282 | ;; label: | ||
| 3283 | (t | ||
| 3284 | (save-excursion (end-of-line) | ||
| 3285 | (setq colon-line-end (point))) | ||
| 3286 | (search-forward ":")))) | ||
| 3287 | ;; Now at the point, after label, or at start | ||
| 3288 | ;; of first statement in the block. | ||
| 3289 | (and (< (point) start-point) | ||
| 3290 | (if (> colon-line-end (point)) | ||
| 3291 | ;; Before statement after label | ||
| 3292 | (if (> (current-indentation) | ||
| 3293 | cperl-min-label-indent) | ||
| 3294 | (list (list 'label-in-block (point))) | ||
| 3295 | ;; Do not believe: `max' is involved | ||
| 3296 | (list | ||
| 3297 | (list 'label-in-block-min-indent (point)))) | ||
| 3298 | ;; Before statement | ||
| 3299 | (list 'statement-in-block (point)))))) | ||
| 3300 | ;; If no previous statement, | ||
| 3301 | ;; indent it relative to line brace is on. | ||
| 3302 | ;; For open brace in column zero, don't let statement | ||
| 3303 | ;; start there too. If cperl-indent-level is zero, | ||
| 3304 | ;; use cperl-brace-offset + cperl-continued-statement-offset instead. | ||
| 3305 | ;; For open-braces not the first thing in a line, | ||
| 3306 | ;; add in cperl-brace-imaginary-offset. | ||
| 3307 | |||
| 3308 | ;; If first thing on a line: ????? | ||
| 3309 | (setq unused ; This is not finished... | ||
| 3310 | (+ (if (and (bolp) (zerop cperl-indent-level)) | ||
| 3311 | (+ cperl-brace-offset cperl-continued-statement-offset) | ||
| 3312 | cperl-indent-level) | ||
| 3313 | ;; Move back over whitespace before the openbrace. | ||
| 3314 | ;; If openbrace is not first nonwhite thing on the line, | ||
| 3315 | ;; add the cperl-brace-imaginary-offset. | ||
| 3316 | (progn (skip-chars-backward " \t") | ||
| 3317 | (if (bolp) 0 cperl-brace-imaginary-offset)) | ||
| 3318 | ;; If the openbrace is preceded by a parenthesized exp, | ||
| 3319 | ;; move to the beginning of that; | ||
| 3320 | ;; possibly a different line | ||
| 3321 | (progn | ||
| 3322 | (if (eq (preceding-char) ?\)) | ||
| 3323 | (forward-sexp -1)) | ||
| 3324 | ;; Get initial indentation of the line we are on. | ||
| 3325 | ;; If line starts with label, calculate label indentation | ||
| 3326 | (if (save-excursion | ||
| 3327 | (beginning-of-line) | ||
| 3328 | (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) | ||
| 3329 | (if (> (current-indentation) cperl-min-label-indent) | ||
| 3330 | (- (current-indentation) cperl-label-offset) | ||
| 3331 | (cperl-calculate-indent)) | ||
| 3332 | (current-indentation))))))))) | ||
| 3333 | res))) | ||
| 2878 | 3334 | ||
| 2879 | (defun cperl-calculate-indent-within-comment () | 3335 | (defun cperl-calculate-indent-within-comment () |
| 2880 | "Return the indentation amount for line, assuming that | 3336 | "Return the indentation amount for line, assuming that |
| @@ -2894,14 +3350,22 @@ the current line is to be regarded as part of a block comment." | |||
| 2894 | 3350 | ||
| 2895 | (defun cperl-to-comment-or-eol () | 3351 | (defun cperl-to-comment-or-eol () |
| 2896 | "Go to position before comment on the current line, or to end of line. | 3352 | "Go to position before comment on the current line, or to end of line. |
| 2897 | Returns true if comment is found." | 3353 | Returns true if comment is found. In POD will not move the point." |
| 2898 | (let (state stop-in cpoint (lim (progn (end-of-line) (point)))) | 3354 | ;; If the line is inside other syntax groups (qq-style strings, HERE-docs) |
| 3355 | ;; then looks for literal # or end-of-line. | ||
| 3356 | (let (state stop-in cpoint (lim (progn (end-of-line) (point))) pr e) | ||
| 3357 | (or cperl-font-locking | ||
| 3358 | (cperl-update-syntaxification lim lim)) | ||
| 2899 | (beginning-of-line) | 3359 | (beginning-of-line) |
| 2900 | (if (or | 3360 | (if (setq pr (get-text-property (point) 'syntax-type)) |
| 2901 | (eq (get-text-property (point) 'syntax-type) 'pod) | 3361 | (setq e (next-single-property-change (point) 'syntax-type nil (point-max)))) |
| 2902 | (re-search-forward "\\=[ \t]*\\(#\\|$\\)" lim t)) | 3362 | (if (or (eq pr 'pod) |
| 3363 | (if (or (not e) (> e lim)) ; deep inside a group | ||
| 3364 | (re-search-forward "\\=[ \t]*\\(#\\|$\\)" lim t))) | ||
| 2903 | (if (eq (preceding-char) ?\#) (progn (backward-char 1) t)) | 3365 | (if (eq (preceding-char) ?\#) (progn (backward-char 1) t)) |
| 2904 | ;; Else | 3366 | ;; Else - need to do it the hard way |
| 3367 | (and (and e (<= e lim)) | ||
| 3368 | (goto-char e)) | ||
| 2905 | (while (not stop-in) | 3369 | (while (not stop-in) |
| 2906 | (setq state (parse-partial-sexp (point) lim nil nil nil t)) | 3370 | (setq state (parse-partial-sexp (point) lim nil nil nil t)) |
| 2907 | ; stop at comment | 3371 | ; stop at comment |
| @@ -2933,17 +3397,11 @@ Returns true if comment is found." | |||
| 2933 | (setq stop-in t))) ; Finish | 3397 | (setq stop-in t))) ; Finish |
| 2934 | (nth 4 state)))) | 3398 | (nth 4 state)))) |
| 2935 | 3399 | ||
| 2936 | (defsubst cperl-1- (p) | ||
| 2937 | (max (point-min) (1- p))) | ||
| 2938 | |||
| 2939 | (defsubst cperl-1+ (p) | ||
| 2940 | (min (point-max) (1+ p))) | ||
| 2941 | |||
| 2942 | (defsubst cperl-modify-syntax-type (at how) | 3400 | (defsubst cperl-modify-syntax-type (at how) |
| 2943 | (if (< at (point-max)) | 3401 | (if (< at (point-max)) |
| 2944 | (progn | 3402 | (progn |
| 2945 | (put-text-property at (1+ at) 'syntax-table how) | 3403 | (put-text-property at (1+ at) 'syntax-table how) |
| 2946 | (put-text-property at (1+ at) 'rear-nonsticky t)))) | 3404 | (put-text-property at (1+ at) 'rear-nonsticky '(syntax-table))))) |
| 2947 | 3405 | ||
| 2948 | (defun cperl-protect-defun-start (s e) | 3406 | (defun cperl-protect-defun-start (s e) |
| 2949 | ;; C code looks for "^\\s(" to skip comment backward in "hard" situations | 3407 | ;; C code looks for "^\\s(" to skip comment backward in "hard" situations |
| @@ -2978,35 +3436,53 @@ Returns true if comment is found." | |||
| 2978 | ( ?\{ . ?\} ) | 3436 | ( ?\{ . ?\} ) |
| 2979 | ( ?\< . ?\> ))) | 3437 | ( ?\< . ?\> ))) |
| 2980 | 3438 | ||
| 2981 | (defun cperl-forward-re (lim end is-2arg set-st st-l err-l argument | 3439 | (defun cperl-cached-syntax-table (st) |
| 3440 | "Get a syntax table cached in ST, or create and cache into ST a syntax table. | ||
| 3441 | All the entries of the syntax table are \".\", except for a backslash, which | ||
| 3442 | is quoting." | ||
| 3443 | (if (car-safe st) | ||
| 3444 | (car st) | ||
| 3445 | (setcar st (make-syntax-table)) | ||
| 3446 | (setq st (car st)) | ||
| 3447 | (let ((i 0)) | ||
| 3448 | (while (< i 256) | ||
| 3449 | (modify-syntax-entry i "." st) | ||
| 3450 | (setq i (1+ i)))) | ||
| 3451 | (modify-syntax-entry ?\\ "\\" st) | ||
| 3452 | st)) | ||
| 3453 | |||
| 3454 | (defun cperl-forward-re (lim end is-2arg st-l err-l argument | ||
| 2982 | &optional ostart oend) | 3455 | &optional ostart oend) |
| 2983 | ;; Works *before* syntax recognition is done | 3456 | "Find the end of a regular expression or a stringish construct (q[] etc). |
| 2984 | ;; May modify syntax-type text property if the situation is too hard | 3457 | The point should be before the starting delimiter. |
| 2985 | (let (b starter ender st i i2 go-forward reset-st) | 3458 | |
| 3459 | Goes to LIM if none is found. If IS-2ARG is non-nil, assumes that it | ||
| 3460 | is s/// or tr/// like expression. If END is nil, generates an error | ||
| 3461 | message if needed. If SET-ST is non-nil, will use (or generate) a | ||
| 3462 | cached syntax table in ST-L. If ERR-L is non-nil, will store the | ||
| 3463 | error message in its CAR (unless it already contains some error | ||
| 3464 | message). ARGUMENT should be the name of the construct (used in error | ||
| 3465 | messages). OSTART, OEND may be set in recursive calls when processing | ||
| 3466 | the second argument of 2ARG construct. | ||
| 3467 | |||
| 3468 | Works *before* syntax recognition is done. In IS-2ARG situation may | ||
| 3469 | modify syntax-type text property if the situation is too hard." | ||
| 3470 | (let (b starter ender st i i2 go-forward reset-st set-st) | ||
| 2986 | (skip-chars-forward " \t") | 3471 | (skip-chars-forward " \t") |
| 2987 | ;; ender means matching-char matcher. | 3472 | ;; ender means matching-char matcher. |
| 2988 | (setq b (point) | 3473 | (setq b (point) |
| 2989 | starter (if (eobp) 0 (char-after b)) | 3474 | starter (if (eobp) 0 (char-after b)) |
| 2990 | ender (cdr (assoc starter cperl-starters))) | 3475 | ender (cdr (assoc starter cperl-starters))) |
| 2991 | ;; What if starter == ?\\ ???? | 3476 | ;; What if starter == ?\\ ???? |
| 2992 | (if set-st | 3477 | (setq st (cperl-cached-syntax-table st-l)) |
| 2993 | (if (car st-l) | ||
| 2994 | (setq st (car st-l)) | ||
| 2995 | (setcar st-l (make-syntax-table)) | ||
| 2996 | (setq i 0 st (car st-l)) | ||
| 2997 | (while (< i 256) | ||
| 2998 | (modify-syntax-entry i "." st) | ||
| 2999 | (setq i (1+ i))) | ||
| 3000 | (modify-syntax-entry ?\\ "\\" st))) | ||
| 3001 | (setq set-st t) | 3478 | (setq set-st t) |
| 3002 | ;; Whether we have an intermediate point | 3479 | ;; Whether we have an intermediate point |
| 3003 | (setq i nil) | 3480 | (setq i nil) |
| 3004 | ;; Prepare the syntax table: | 3481 | ;; Prepare the syntax table: |
| 3005 | (and set-st | 3482 | (if (not ender) ; m/blah/, s/x//, s/x/y/ |
| 3006 | (if (not ender) ; m/blah/, s/x//, s/x/y/ | 3483 | (modify-syntax-entry starter "$" st) |
| 3007 | (modify-syntax-entry starter "$" st) | 3484 | (modify-syntax-entry starter (concat "(" (list ender)) st) |
| 3008 | (modify-syntax-entry starter (concat "(" (list ender)) st) | 3485 | (modify-syntax-entry ender (concat ")" (list starter)) st)) |
| 3009 | (modify-syntax-entry ender (concat ")" (list starter)) st))) | ||
| 3010 | (condition-case bb | 3486 | (condition-case bb |
| 3011 | (progn | 3487 | (progn |
| 3012 | ;; We use `$' syntax class to find matching stuff, but $$ | 3488 | ;; We use `$' syntax class to find matching stuff, but $$ |
| @@ -3053,7 +3529,7 @@ Returns true if comment is found." | |||
| 3053 | (modify-syntax-entry starter (if (eq starter ?\\) "\\" ".") st) | 3529 | (modify-syntax-entry starter (if (eq starter ?\\) "\\" ".") st) |
| 3054 | (if ender (modify-syntax-entry ender "." st)) | 3530 | (if ender (modify-syntax-entry ender "." st)) |
| 3055 | (setq set-st nil) | 3531 | (setq set-st nil) |
| 3056 | (setq ender (cperl-forward-re lim end nil t st-l err-l | 3532 | (setq ender (cperl-forward-re lim end nil st-l err-l |
| 3057 | argument starter ender) | 3533 | argument starter ender) |
| 3058 | ender (nth 2 ender))))) | 3534 | ender (nth 2 ender))))) |
| 3059 | (error (goto-char lim) | 3535 | (error (goto-char lim) |
| @@ -3078,6 +3554,33 @@ Returns true if comment is found." | |||
| 3078 | ;; go-forward: has 2 args, and the second part is empty | 3554 | ;; go-forward: has 2 args, and the second part is empty |
| 3079 | (list i i2 ender starter go-forward))) | 3555 | (list i i2 ender starter go-forward))) |
| 3080 | 3556 | ||
| 3557 | (defun cperl-forward-group-in-re (&optional st-l) | ||
| 3558 | "Find the end of a group in a REx. | ||
| 3559 | Return the error message (if any). Does not work if delimiter is `)'. | ||
| 3560 | Works before syntax recognition is done." | ||
| 3561 | ;; Works *before* syntax recognition is done | ||
| 3562 | (or st-l (setq st-l (list nil))) ; Avoid overwriting '() | ||
| 3563 | (let (st b reset-st) | ||
| 3564 | (condition-case b | ||
| 3565 | (progn | ||
| 3566 | (setq st (cperl-cached-syntax-table st-l)) | ||
| 3567 | (modify-syntax-entry ?\( "()" st) | ||
| 3568 | (modify-syntax-entry ?\) ")(" st) | ||
| 3569 | (setq reset-st (syntax-table)) | ||
| 3570 | (set-syntax-table st) | ||
| 3571 | (forward-sexp 1)) | ||
| 3572 | (error (message | ||
| 3573 | "cperl-forward-group-in-re: error %s" b))) | ||
| 3574 | ;; now restore the initial state | ||
| 3575 | (if st | ||
| 3576 | (progn | ||
| 3577 | (modify-syntax-entry ?\( "." st) | ||
| 3578 | (modify-syntax-entry ?\) "." st))) | ||
| 3579 | (if reset-st | ||
| 3580 | (set-syntax-table reset-st)) | ||
| 3581 | b)) | ||
| 3582 | |||
| 3583 | |||
| 3081 | (defvar font-lock-string-face) | 3584 | (defvar font-lock-string-face) |
| 3082 | ;;(defvar font-lock-reference-face) | 3585 | ;;(defvar font-lock-reference-face) |
| 3083 | (defvar font-lock-constant-face) | 3586 | (defvar font-lock-constant-face) |
| @@ -3103,13 +3606,24 @@ Returns true if comment is found." | |||
| 3103 | ;; d) 'Q'uoted string: | 3606 | ;; d) 'Q'uoted string: |
| 3104 | ;; part between markers inclusive is marked `syntax-type' ==> `string' | 3607 | ;; part between markers inclusive is marked `syntax-type' ==> `string' |
| 3105 | ;; part between `q' and the first marker is marked `syntax-type' ==> `prestring' | 3608 | ;; part between `q' and the first marker is marked `syntax-type' ==> `prestring' |
| 3609 | ;; second part of s///e is marked `syntax-type' ==> `multiline' | ||
| 3610 | ;; e) Attributes of subroutines: `attrib-group' ==> t | ||
| 3611 | ;; (or 0 if declaration); up to `{' or ';': `syntax-type' => `sub-decl'. | ||
| 3612 | ;; f) Multiline my/our declaration lists etc: `syntax-type' => `multiline' | ||
| 3613 | |||
| 3614 | ;;; In addition, some parts of RExes may be marked as `REx-interpolated' | ||
| 3615 | ;;; (value: 0 in //o, 1 if "interpolated variable" is whole-REx, t otherwise). | ||
| 3106 | 3616 | ||
| 3107 | (defun cperl-unwind-to-safe (before &optional end) | 3617 | (defun cperl-unwind-to-safe (before &optional end) |
| 3108 | ;; if BEFORE, go to the previous start-of-line on each step of unwinding | 3618 | ;; if BEFORE, go to the previous start-of-line on each step of unwinding |
| 3109 | (let ((pos (point)) opos) | 3619 | (let ((pos (point)) opos) |
| 3110 | (setq opos pos) | 3620 | (while (and pos (progn |
| 3111 | (while (and pos (get-text-property pos 'syntax-type)) | 3621 | (beginning-of-line) |
| 3112 | (setq pos (previous-single-property-change pos 'syntax-type)) | 3622 | (get-text-property (setq pos (point)) 'syntax-type))) |
| 3623 | (setq opos pos | ||
| 3624 | pos (cperl-beginning-of-property pos 'syntax-type)) | ||
| 3625 | (if (eq pos (point-min)) | ||
| 3626 | (setq pos nil)) | ||
| 3113 | (if pos | 3627 | (if pos |
| 3114 | (if before | 3628 | (if before |
| 3115 | (progn | 3629 | (progn |
| @@ -3126,32 +3640,117 @@ Returns true if comment is found." | |||
| 3126 | (setq pos (point)) | 3640 | (setq pos (point)) |
| 3127 | (if end | 3641 | (if end |
| 3128 | ;; Do the same for end, going small steps | 3642 | ;; Do the same for end, going small steps |
| 3129 | (progn | 3643 | (save-excursion |
| 3130 | (while (and end (get-text-property end 'syntax-type)) | 3644 | (while (and end (get-text-property end 'syntax-type)) |
| 3131 | (setq pos end | 3645 | (setq pos end |
| 3132 | end (next-single-property-change end 'syntax-type))) | 3646 | end (next-single-property-change end 'syntax-type nil (point-max))) |
| 3647 | (if end (progn (goto-char end) | ||
| 3648 | (or (bolp) (forward-line 1)) | ||
| 3649 | (setq end (point))))) | ||
| 3133 | (or end pos))))) | 3650 | (or end pos))))) |
| 3134 | 3651 | ||
| 3652 | ;;; These are needed for byte-compile (at least with v19) | ||
| 3135 | (defvar cperl-nonoverridable-face) | 3653 | (defvar cperl-nonoverridable-face) |
| 3654 | (defvar font-lock-variable-name-face) | ||
| 3136 | (defvar font-lock-function-name-face) | 3655 | (defvar font-lock-function-name-face) |
| 3656 | (defvar font-lock-keyword-face) | ||
| 3657 | (defvar font-lock-builtin-face) | ||
| 3658 | (defvar font-lock-type-face) | ||
| 3137 | (defvar font-lock-comment-face) | 3659 | (defvar font-lock-comment-face) |
| 3660 | (defvar font-lock-warning-face) | ||
| 3138 | 3661 | ||
| 3139 | (defun cperl-find-pods-heres (&optional min max non-inter end ignore-max) | 3662 | (defun cperl-find-sub-attrs (&optional st-l b-fname e-fname pos) |
| 3663 | "Syntaxically mark (and fontify) attributes of a subroutine. | ||
| 3664 | Should be called with the point before leading colon of an attribute." | ||
| 3665 | ;; Works *before* syntax recognition is done | ||
| 3666 | (or st-l (setq st-l (list nil))) ; Avoid overwriting '() | ||
| 3667 | (let (st b p reset-st after-first (start (point)) start1 end1) | ||
| 3668 | (condition-case b | ||
| 3669 | (while (looking-at | ||
| 3670 | (concat | ||
| 3671 | "\\(" ; 1=optional? colon | ||
| 3672 | ":" cperl-maybe-white-and-comment-rex ; 2=whitespace/comment? | ||
| 3673 | "\\)" | ||
| 3674 | (if after-first "?" "") | ||
| 3675 | ;; No space between name and paren allowed... | ||
| 3676 | "\\(\\sw+\\)" ; 3=name | ||
| 3677 | "\\((\\)?")) ; 4=optional paren | ||
| 3678 | (and (match-beginning 1) | ||
| 3679 | (cperl-postpone-fontification | ||
| 3680 | (match-beginning 0) (cperl-1+ (match-beginning 0)) | ||
| 3681 | 'face font-lock-constant-face)) | ||
| 3682 | (setq start1 (match-beginning 3) end1 (match-end 3)) | ||
| 3683 | (cperl-postpone-fontification start1 end1 | ||
| 3684 | 'face font-lock-constant-face) | ||
| 3685 | (goto-char end1) ; end or before `(' | ||
| 3686 | (if (match-end 4) ; Have attribute arguments... | ||
| 3687 | (progn | ||
| 3688 | (if st nil | ||
| 3689 | (setq st (cperl-cached-syntax-table st-l)) | ||
| 3690 | (modify-syntax-entry ?\( "()" st) | ||
| 3691 | (modify-syntax-entry ?\) ")(" st)) | ||
| 3692 | (setq reset-st (syntax-table) p (point)) | ||
| 3693 | (set-syntax-table st) | ||
| 3694 | (forward-sexp 1) | ||
| 3695 | (set-syntax-table reset-st) | ||
| 3696 | (setq reset-st nil) | ||
| 3697 | (cperl-commentify p (point) t))) ; mark as string | ||
| 3698 | (forward-comment (buffer-size)) | ||
| 3699 | (setq after-first t)) | ||
| 3700 | (error (message | ||
| 3701 | "L%d: attribute `%s': %s" | ||
| 3702 | (count-lines (point-min) (point)) | ||
| 3703 | (and start1 end1 (buffer-substring start1 end1)) b) | ||
| 3704 | (setq start nil))) | ||
| 3705 | (and start | ||
| 3706 | (progn | ||
| 3707 | (put-text-property start (point) | ||
| 3708 | 'attrib-group (if (looking-at "{") t 0)) | ||
| 3709 | (and pos | ||
| 3710 | (< 1 (count-lines (+ 3 pos) (point))) ; end of `sub' | ||
| 3711 | ;; Apparently, we do not need `multiline': faces added now | ||
| 3712 | (put-text-property (+ 3 pos) (cperl-1+ (point)) | ||
| 3713 | 'syntax-type 'sub-decl)) | ||
| 3714 | (and b-fname ; Fontify here: the following condition | ||
| 3715 | (cperl-postpone-fontification ; is too hard to determine by | ||
| 3716 | b-fname e-fname 'face ; a REx, so do it here | ||
| 3717 | (if (looking-at "{") | ||
| 3718 | font-lock-function-name-face | ||
| 3719 | font-lock-variable-name-face))))) | ||
| 3720 | ;; now restore the initial state | ||
| 3721 | (if st | ||
| 3722 | (progn | ||
| 3723 | (modify-syntax-entry ?\( "." st) | ||
| 3724 | (modify-syntax-entry ?\) "." st))) | ||
| 3725 | (if reset-st | ||
| 3726 | (set-syntax-table reset-st)))) | ||
| 3727 | |||
| 3728 | (defsubst cperl-look-at-leading-count (is-x-REx e) | ||
| 3729 | (if (re-search-forward (concat "\\=" (if is-x-REx "[ \t\n]*" "") "[{?+*]") | ||
| 3730 | (1- e) t) ; return nil on failure, no moving | ||
| 3731 | (if (eq ?\{ (preceding-char)) nil | ||
| 3732 | (cperl-postpone-fontification | ||
| 3733 | (1- (point)) (point) | ||
| 3734 | 'face font-lock-warning-face)))) | ||
| 3735 | |||
| 3736 | ;;; Debugging this may require (setq max-specpdl-size 2000)... | ||
| 3737 | (defun cperl-find-pods-heres (&optional min max non-inter end ignore-max end-of-here-doc) | ||
| 3140 | "Scans the buffer for hard-to-parse Perl constructions. | 3738 | "Scans the buffer for hard-to-parse Perl constructions. |
| 3141 | If `cperl-pod-here-fontify' is not-nil after evaluation, will fontify | 3739 | If `cperl-pod-here-fontify' is not-nil after evaluation, will fontify |
| 3142 | the sections using `cperl-pod-head-face', `cperl-pod-face', | 3740 | the sections using `cperl-pod-head-face', `cperl-pod-face', |
| 3143 | `cperl-here-face'." | 3741 | `cperl-here-face'." |
| 3144 | (interactive) | 3742 | (interactive) |
| 3145 | (or min (setq min (point-min) | 3743 | (or min (setq min (point-min) |
| 3146 | cperl-syntax-state nil | 3744 | cperl-syntax-state nil |
| 3147 | cperl-syntax-done-to min)) | 3745 | cperl-syntax-done-to min)) |
| 3148 | (or max (setq max (point-max))) | 3746 | (or max (setq max (point-max))) |
| 3149 | (let* ((cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend | 3747 | (let* ((cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend |
| 3150 | face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb | 3748 | face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb |
| 3151 | is-REx is-x-REx REx-comment-start REx-comment-end was-comment i2 | 3749 | is-REx is-x-REx REx-subgr-start REx-subgr-end was-subgr i2 hairy-RE |
| 3152 | (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) | 3750 | (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) |
| 3153 | (modified (buffer-modified-p)) | 3751 | (modified (buffer-modified-p)) overshoot is-o-REx |
| 3154 | (after-change-functions nil) | 3752 | (after-change-functions nil) |
| 3753 | (cperl-font-locking t) | ||
| 3155 | (use-syntax-state (and cperl-syntax-state | 3754 | (use-syntax-state (and cperl-syntax-state |
| 3156 | (>= min (car cperl-syntax-state)))) | 3755 | (>= min (car cperl-syntax-state)))) |
| 3157 | (state-point (if use-syntax-state | 3756 | (state-point (if use-syntax-state |
| @@ -3162,33 +3761,62 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3162 | ;; (st-l '(nil)) (err-l '(nil)) ; Would overwrite - propagates from a function call to a function call! | 3761 | ;; (st-l '(nil)) (err-l '(nil)) ; Would overwrite - propagates from a function call to a function call! |
| 3163 | (st-l (list nil)) (err-l (list nil)) | 3762 | (st-l (list nil)) (err-l (list nil)) |
| 3164 | ;; Somehow font-lock may be not loaded yet... | 3763 | ;; Somehow font-lock may be not loaded yet... |
| 3764 | ;; (e.g., when building TAGS via command-line call) | ||
| 3165 | (font-lock-string-face (if (boundp 'font-lock-string-face) | 3765 | (font-lock-string-face (if (boundp 'font-lock-string-face) |
| 3166 | font-lock-string-face | 3766 | font-lock-string-face |
| 3167 | 'font-lock-string-face)) | 3767 | 'font-lock-string-face)) |
| 3168 | (font-lock-constant-face (if (boundp 'font-lock-constant-face) | 3768 | (my-cperl-delimiters-face (if (boundp 'font-lock-constant-face) |
| 3169 | font-lock-constant-face | 3769 | font-lock-constant-face |
| 3170 | 'font-lock-constant-face)) | 3770 | 'font-lock-constant-face)) |
| 3171 | (font-lock-function-name-face | 3771 | (my-cperl-REx-spec-char-face ; [] ^.$ and wrapper-of ({}) |
| 3172 | (if (boundp 'font-lock-function-name-face) | 3772 | (if (boundp 'font-lock-function-name-face) |
| 3173 | font-lock-function-name-face | 3773 | font-lock-function-name-face |
| 3174 | 'font-lock-function-name-face)) | 3774 | 'font-lock-function-name-face)) |
| 3775 | (font-lock-variable-name-face ; interpolated vars and ({})-code | ||
| 3776 | (if (boundp 'font-lock-variable-name-face) | ||
| 3777 | font-lock-variable-name-face | ||
| 3778 | 'font-lock-variable-name-face)) | ||
| 3779 | (font-lock-function-name-face ; used in `cperl-find-sub-attrs' | ||
| 3780 | (if (boundp 'font-lock-function-name-face) | ||
| 3781 | font-lock-function-name-face | ||
| 3782 | 'font-lock-function-name-face)) | ||
| 3783 | (font-lock-constant-face ; used in `cperl-find-sub-attrs' | ||
| 3784 | (if (boundp 'font-lock-constant-face) | ||
| 3785 | font-lock-constant-face | ||
| 3786 | 'font-lock-constant-face)) | ||
| 3787 | (my-cperl-REx-0length-face ; 0-length, (?:)etc, non-literal \ | ||
| 3788 | (if (boundp 'font-lock-builtin-face) | ||
| 3789 | font-lock-builtin-face | ||
| 3790 | 'font-lock-builtin-face)) | ||
| 3175 | (font-lock-comment-face | 3791 | (font-lock-comment-face |
| 3176 | (if (boundp 'font-lock-comment-face) | 3792 | (if (boundp 'font-lock-comment-face) |
| 3177 | font-lock-comment-face | 3793 | font-lock-comment-face |
| 3178 | 'font-lock-comment-face)) | 3794 | 'font-lock-comment-face)) |
| 3179 | (cperl-nonoverridable-face | 3795 | (font-lock-warning-face |
| 3796 | (if (boundp 'font-lock-warning-face) | ||
| 3797 | font-lock-warning-face | ||
| 3798 | 'font-lock-warning-face)) | ||
| 3799 | (my-cperl-REx-ctl-face ; (|) | ||
| 3800 | (if (boundp 'font-lock-keyword-face) | ||
| 3801 | font-lock-keyword-face | ||
| 3802 | 'font-lock-keyword-face)) | ||
| 3803 | (my-cperl-REx-modifiers-face ; //gims | ||
| 3180 | (if (boundp 'cperl-nonoverridable-face) | 3804 | (if (boundp 'cperl-nonoverridable-face) |
| 3181 | cperl-nonoverridable-face | 3805 | cperl-nonoverridable-face |
| 3182 | 'cperl-nonoverridable)) | 3806 | 'cperl-nonoverridable-face)) |
| 3807 | (my-cperl-REx-length1-face ; length=1 escaped chars, POSIX classes | ||
| 3808 | (if (boundp 'font-lock-type-face) | ||
| 3809 | font-lock-type-face | ||
| 3810 | 'font-lock-type-face)) | ||
| 3183 | (stop-point (if ignore-max | 3811 | (stop-point (if ignore-max |
| 3184 | (point-max) | 3812 | (point-max) |
| 3185 | max)) | 3813 | max)) |
| 3186 | (search | 3814 | (search |
| 3187 | (concat | 3815 | (concat |
| 3188 | "\\(\\`\n?\\|^\n\\)=" | 3816 | "\\(\\`\n?\\|^\n\\)=" ; POD |
| 3189 | "\\|" | 3817 | "\\|" |
| 3190 | ;; One extra () before this: | 3818 | ;; One extra () before this: |
| 3191 | "<<" | 3819 | "<<" ; HERE-DOC |
| 3192 | "\\(" ; 1 + 1 | 3820 | "\\(" ; 1 + 1 |
| 3193 | ;; First variant "BLAH" or just ``. | 3821 | ;; First variant "BLAH" or just ``. |
| 3194 | "[ \t]*" ; Yes, whitespace is allowed! | 3822 | "[ \t]*" ; Yes, whitespace is allowed! |
| @@ -3204,36 +3832,44 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3204 | "\\)" | 3832 | "\\)" |
| 3205 | "\\|" | 3833 | "\\|" |
| 3206 | ;; 1+6 extra () before this: | 3834 | ;; 1+6 extra () before this: |
| 3207 | "^[ \t]*\\(format\\)[ \t]*\\([a-zA-Z0-9_]+\\)?[ \t]*=[ \t]*$" | 3835 | "^[ \t]*\\(format\\)[ \t]*\\([a-zA-Z0-9_]+\\)?[ \t]*=[ \t]*$" ;FRMAT |
| 3208 | (if cperl-use-syntax-table-text-property | 3836 | (if cperl-use-syntax-table-text-property |
| 3209 | (concat | 3837 | (concat |
| 3210 | "\\|" | 3838 | "\\|" |
| 3211 | ;; 1+6+2=9 extra () before this: | 3839 | ;; 1+6+2=9 extra () before this: |
| 3212 | "\\<\\(q[wxqr]?\\|[msy]\\|tr\\)\\>" | 3840 | "\\<\\(q[wxqr]?\\|[msy]\\|tr\\)\\>" ; QUOTED CONSTRUCT |
| 3213 | "\\|" | 3841 | "\\|" |
| 3214 | ;; 1+6+2+1=10 extra () before this: | 3842 | ;; 1+6+2+1=10 extra () before this: |
| 3215 | "\\([?/<]\\)" ; /blah/ or ?blah? or <file*glob> | 3843 | "\\([?/<]\\)" ; /blah/ or ?blah? or <file*glob> |
| 3216 | "\\|" | 3844 | "\\|" |
| 3217 | ;; 1+6+2+1+1=11 extra () before this: | 3845 | ;; 1+6+2+1+1=11 extra () before this |
| 3218 | "\\<sub\\>[ \t]*\\([a-zA-Z_:'0-9]+[ \t]*\\)?\\(([^()]*)\\)" | 3846 | "\\<sub\\>" ; sub with proto/attr |
| 3847 | "\\(" | ||
| 3848 | cperl-white-and-comment-rex | ||
| 3849 | "\\(::[a-zA-Z_:'0-9]*\\|[a-zA-Z_'][a-zA-Z_:'0-9]*\\)\\)?" ; name | ||
| 3850 | "\\(" | ||
| 3851 | cperl-maybe-white-and-comment-rex | ||
| 3852 | "\\(([^()]*)\\|:[^:]\\)\\)" ; prototype or attribute start | ||
| 3219 | "\\|" | 3853 | "\\|" |
| 3220 | ;; 1+6+2+1+1+2=13 extra () before this: | 3854 | ;; 1+6+2+1+1+6=17 extra () before this: |
| 3221 | "\\$\\(['{]\\)" | 3855 | "\\$\\(['{]\\)" ; $' or ${foo} |
| 3222 | "\\|" | 3856 | "\\|" |
| 3223 | ;; 1+6+2+1+1+2+1=14 extra () before this: | 3857 | ;; 1+6+2+1+1+6+1=18 extra () before this (old pack'var syntax; |
| 3858 | ;; we do not support intervening comments...): | ||
| 3224 | "\\(\\<sub[ \t\n\f]+\\|[&*$@%]\\)[a-zA-Z0-9_]*'" | 3859 | "\\(\\<sub[ \t\n\f]+\\|[&*$@%]\\)[a-zA-Z0-9_]*'" |
| 3225 | ;; 1+6+2+1+1+2+1+1=15 extra () before this: | 3860 | ;; 1+6+2+1+1+6+1+1=19 extra () before this: |
| 3226 | "\\|" | 3861 | "\\|" |
| 3227 | "__\\(END\\|DATA\\)__" | 3862 | "__\\(END\\|DATA\\)__" ; __END__ or __DATA__ |
| 3228 | ;; 1+6+2+1+1+2+1+1+1=16 extra () before this: | 3863 | ;; 1+6+2+1+1+6+1+1+1=20 extra () before this: |
| 3229 | "\\|" | 3864 | "\\|" |
| 3230 | "\\\\\\(['`\"($]\\)") | 3865 | "\\\\\\(['`\"($]\\)") ; BACKWACKED something-hairy |
| 3231 | "")))) | 3866 | "")))) |
| 3232 | (unwind-protect | 3867 | (unwind-protect |
| 3233 | (progn | 3868 | (progn |
| 3234 | (save-excursion | 3869 | (save-excursion |
| 3235 | (or non-inter | 3870 | (or non-inter |
| 3236 | (message "Scanning for \"hard\" Perl constructions...")) | 3871 | (message "Scanning for \"hard\" Perl constructions...")) |
| 3872 | ;;(message "find: %s --> %s" min max) | ||
| 3237 | (and cperl-pod-here-fontify | 3873 | (and cperl-pod-here-fontify |
| 3238 | ;; We had evals here, do not know why... | 3874 | ;; We had evals here, do not know why... |
| 3239 | (setq face cperl-pod-face | 3875 | (setq face cperl-pod-face |
| @@ -3241,16 +3877,22 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3241 | here-face cperl-here-face)) | 3877 | here-face cperl-here-face)) |
| 3242 | (remove-text-properties min max | 3878 | (remove-text-properties min max |
| 3243 | '(syntax-type t in-pod t syntax-table t | 3879 | '(syntax-type t in-pod t syntax-table t |
| 3880 | attrib-group t | ||
| 3881 | REx-interpolated t | ||
| 3244 | cperl-postpone t | 3882 | cperl-postpone t |
| 3245 | syntax-subtype t | 3883 | syntax-subtype t |
| 3246 | rear-nonsticky t | 3884 | rear-nonsticky t |
| 3885 | front-sticky t | ||
| 3247 | here-doc-group t | 3886 | here-doc-group t |
| 3248 | first-format-line t | 3887 | first-format-line t |
| 3888 | REx-part2 t | ||
| 3249 | indentable t)) | 3889 | indentable t)) |
| 3250 | ;; Need to remove face as well... | 3890 | ;; Need to remove face as well... |
| 3251 | (goto-char min) | 3891 | (goto-char min) |
| 3252 | (and (eq system-type 'emx) | 3892 | (and (eq system-type 'emx) |
| 3253 | (looking-at "extproc[ \t]") ; Analogue of #! | 3893 | (eq (point) 1) |
| 3894 | (let ((case-fold-search t)) | ||
| 3895 | (looking-at "extproc[ \t]")) ; Analogue of #! | ||
| 3254 | (cperl-commentify min | 3896 | (cperl-commentify min |
| 3255 | (save-excursion (end-of-line) (point)) | 3897 | (save-excursion (end-of-line) (point)) |
| 3256 | nil)) | 3898 | nil)) |
| @@ -3258,11 +3900,38 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3258 | (< (point) max) | 3900 | (< (point) max) |
| 3259 | (re-search-forward search max t)) | 3901 | (re-search-forward search max t)) |
| 3260 | (setq tmpend nil) ; Valid for most cases | 3902 | (setq tmpend nil) ; Valid for most cases |
| 3903 | (setq b (match-beginning 0) | ||
| 3904 | state (save-excursion (parse-partial-sexp | ||
| 3905 | state-point b nil nil state)) | ||
| 3906 | state-point b) | ||
| 3261 | (cond | 3907 | (cond |
| 3908 | ;; 1+6+2+1+1+6=17 extra () before this: | ||
| 3909 | ;; "\\$\\(['{]\\)" | ||
| 3910 | ((match-beginning 18) ; $' or ${foo} | ||
| 3911 | (if (eq (preceding-char) ?\') ; $' | ||
| 3912 | (progn | ||
| 3913 | (setq b (1- (point)) | ||
| 3914 | state (parse-partial-sexp | ||
| 3915 | state-point (1- b) nil nil state) | ||
| 3916 | state-point (1- b)) | ||
| 3917 | (if (nth 3 state) ; in string | ||
| 3918 | (cperl-modify-syntax-type (1- b) cperl-st-punct)) | ||
| 3919 | (goto-char (1+ b))) | ||
| 3920 | ;; else: ${ | ||
| 3921 | (setq bb (match-beginning 0)) | ||
| 3922 | (cperl-modify-syntax-type bb cperl-st-punct))) | ||
| 3923 | ;; No processing in strings/comments beyond this point: | ||
| 3924 | ((or (nth 3 state) (nth 4 state)) | ||
| 3925 | t) ; Do nothing in comment/string | ||
| 3262 | ((match-beginning 1) ; POD section | 3926 | ((match-beginning 1) ; POD section |
| 3263 | ;; "\\(\\`\n?\\|^\n\\)=" | 3927 | ;; "\\(\\`\n?\\|^\n\\)=" |
| 3264 | (if (looking-at "cut\\>") | 3928 | (setq b (match-beginning 0) |
| 3265 | (if ignore-max | 3929 | state (parse-partial-sexp |
| 3930 | state-point b nil nil state) | ||
| 3931 | state-point b) | ||
| 3932 | (if (or (nth 3 state) (nth 4 state) | ||
| 3933 | (looking-at "cut\\>")) | ||
| 3934 | (if (or (nth 3 state) (nth 4 state) ignore-max) | ||
| 3266 | nil ; Doing a chunk only | 3935 | nil ; Doing a chunk only |
| 3267 | (message "=cut is not preceded by a POD section") | 3936 | (message "=cut is not preceded by a POD section") |
| 3268 | (or (car err-l) (setcar err-l (point)))) | 3937 | (or (car err-l) (setcar err-l (point)))) |
| @@ -3288,11 +3957,15 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3288 | (progn | 3957 | (progn |
| 3289 | (remove-text-properties | 3958 | (remove-text-properties |
| 3290 | max e '(syntax-type t in-pod t syntax-table t | 3959 | max e '(syntax-type t in-pod t syntax-table t |
| 3960 | attrib-group t | ||
| 3961 | REx-interpolated t | ||
| 3291 | cperl-postpone t | 3962 | cperl-postpone t |
| 3292 | syntax-subtype t | 3963 | syntax-subtype t |
| 3293 | here-doc-group t | 3964 | here-doc-group t |
| 3294 | rear-nonsticky t | 3965 | rear-nonsticky t |
| 3966 | front-sticky t | ||
| 3295 | first-format-line t | 3967 | first-format-line t |
| 3968 | REx-part2 t | ||
| 3296 | indentable t)) | 3969 | indentable t)) |
| 3297 | (setq tmpend tb))) | 3970 | (setq tmpend tb))) |
| 3298 | (put-text-property b e 'in-pod t) | 3971 | (put-text-property b e 'in-pod t) |
| @@ -3335,7 +4008,8 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3335 | (or (eq e (point-max)) | 4008 | (or (eq e (point-max)) |
| 3336 | (forward-char -1)))) ; Prepare for immediate POD start. | 4009 | (forward-char -1)))) ; Prepare for immediate POD start. |
| 3337 | ;; Here document | 4010 | ;; Here document |
| 3338 | ;; We do only one here-per-line | 4011 | ;; We can do many here-per-line; |
| 4012 | ;; but multiline quote on the same line as <<HERE confuses us... | ||
| 3339 | ;; ;; One extra () before this: | 4013 | ;; ;; One extra () before this: |
| 3340 | ;;"<<" | 4014 | ;;"<<" |
| 3341 | ;; "\\(" ; 1 + 1 | 4015 | ;; "\\(" ; 1 + 1 |
| @@ -3352,21 +4026,42 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3352 | ;; "\\(\\)" ; To preserve count of pars :-( 6 + 1 | 4026 | ;; "\\(\\)" ; To preserve count of pars :-( 6 + 1 |
| 3353 | ;; "\\)" | 4027 | ;; "\\)" |
| 3354 | ((match-beginning 2) ; 1 + 1 | 4028 | ((match-beginning 2) ; 1 + 1 |
| 3355 | ;; Abort in comment: | 4029 | (setq b (point) |
| 3356 | (setq b (point)) | ||
| 3357 | (setq state (parse-partial-sexp state-point b nil nil state) | ||
| 3358 | state-point b | ||
| 3359 | tb (match-beginning 0) | 4030 | tb (match-beginning 0) |
| 3360 | i (or (nth 3 state) (nth 4 state))) | 4031 | c (and ; not HERE-DOC |
| 3361 | (if i | 4032 | (match-beginning 5) |
| 3362 | (setq c t) | 4033 | (save-match-data |
| 3363 | (setq c (and | 4034 | (or (looking-at "[ \t]*(") ; << function_call() |
| 3364 | (match-beginning 5) | 4035 | (save-excursion ; 1 << func_name, or $foo << 10 |
| 3365 | (not (match-beginning 6)) ; Empty | 4036 | (condition-case nil |
| 3366 | (looking-at | 4037 | (progn |
| 3367 | "[ \t]*[=0-9$@%&(]")))) | 4038 | (goto-char tb) |
| 4039 | ;;; XXX What to do: foo <<bar ??? | ||
| 4040 | ;;; XXX Need to support print {a} <<B ??? | ||
| 4041 | (forward-sexp -1) | ||
| 4042 | (save-match-data | ||
| 4043 | ; $foo << b; $f .= <<B; | ||
| 4044 | ; ($f+1) << b; a($f) . <<B; | ||
| 4045 | ; foo 1, <<B; $x{a} <<b; | ||
| 4046 | (cond | ||
| 4047 | ((looking-at "[0-9$({]") | ||
| 4048 | (forward-sexp 1) | ||
| 4049 | (and | ||
| 4050 | (looking-at "[ \t]*<<") | ||
| 4051 | (condition-case nil | ||
| 4052 | ;; print $foo <<EOF | ||
| 4053 | (progn | ||
| 4054 | (forward-sexp -2) | ||
| 4055 | (not | ||
| 4056 | (looking-at "\\(printf?\\|system\\|exec\\|sort\\)\\>"))) | ||
| 4057 | (error t))))))) | ||
| 4058 | (error nil))) ; func(<<EOF) | ||
| 4059 | (and (not (match-beginning 6)) ; Empty | ||
| 4060 | (looking-at | ||
| 4061 | "[ \t]*[=0-9$@%&(]")))))) | ||
| 3368 | (if c ; Not here-doc | 4062 | (if c ; Not here-doc |
| 3369 | nil ; Skip it. | 4063 | nil ; Skip it. |
| 4064 | (setq c (match-end 2)) ; 1 + 1 | ||
| 3370 | (if (match-beginning 5) ;4 + 1 | 4065 | (if (match-beginning 5) ;4 + 1 |
| 3371 | (setq b1 (match-beginning 5) ; 4 + 1 | 4066 | (setq b1 (match-beginning 5) ; 4 + 1 |
| 3372 | e1 (match-end 5)) ; 4 + 1 | 4067 | e1 (match-end 5)) ; 4 + 1 |
| @@ -3376,15 +4071,20 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3376 | qtag (regexp-quote tag)) | 4071 | qtag (regexp-quote tag)) |
| 3377 | (cond (cperl-pod-here-fontify | 4072 | (cond (cperl-pod-here-fontify |
| 3378 | ;; Highlight the starting delimiter | 4073 | ;; Highlight the starting delimiter |
| 3379 | (cperl-postpone-fontification b1 e1 'face font-lock-constant-face) | 4074 | (cperl-postpone-fontification |
| 4075 | b1 e1 'face my-cperl-delimiters-face) | ||
| 3380 | (cperl-put-do-not-fontify b1 e1 t))) | 4076 | (cperl-put-do-not-fontify b1 e1 t))) |
| 3381 | (forward-line) | 4077 | (forward-line) |
| 4078 | (setq i (point)) | ||
| 4079 | (if end-of-here-doc | ||
| 4080 | (goto-char end-of-here-doc)) | ||
| 3382 | (setq b (point)) | 4081 | (setq b (point)) |
| 3383 | ;; We do not search to max, since we may be called from | 4082 | ;; We do not search to max, since we may be called from |
| 3384 | ;; some hook of fontification, and max is random | 4083 | ;; some hook of fontification, and max is random |
| 3385 | (or (and (re-search-forward (concat "^" qtag "$") | 4084 | (or (and (re-search-forward (concat "^" qtag "$") |
| 3386 | stop-point 'toend) | 4085 | stop-point 'toend) |
| 3387 | (eq (following-char) ?\n)) | 4086 | ;;;(eq (following-char) ?\n) ; XXXX WHY??? |
| 4087 | ) | ||
| 3388 | (progn ; Pretend we matched at the end | 4088 | (progn ; Pretend we matched at the end |
| 3389 | (goto-char (point-max)) | 4089 | (goto-char (point-max)) |
| 3390 | (re-search-forward "\\'") | 4090 | (re-search-forward "\\'") |
| @@ -3393,8 +4093,9 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3393 | (if cperl-pod-here-fontify | 4093 | (if cperl-pod-here-fontify |
| 3394 | (progn | 4094 | (progn |
| 3395 | ;; Highlight the ending delimiter | 4095 | ;; Highlight the ending delimiter |
| 3396 | (cperl-postpone-fontification (match-beginning 0) (match-end 0) | 4096 | (cperl-postpone-fontification |
| 3397 | 'face font-lock-constant-face) | 4097 | (match-beginning 0) (match-end 0) |
| 4098 | 'face my-cperl-delimiters-face) | ||
| 3398 | (cperl-put-do-not-fontify b (match-end 0) t) | 4099 | (cperl-put-do-not-fontify b (match-end 0) t) |
| 3399 | ;; Highlight the HERE-DOC | 4100 | ;; Highlight the HERE-DOC |
| 3400 | (cperl-postpone-fontification b (match-beginning 0) | 4101 | (cperl-postpone-fontification b (match-beginning 0) |
| @@ -3404,10 +4105,21 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3404 | 'syntax-type 'here-doc) | 4105 | 'syntax-type 'here-doc) |
| 3405 | (put-text-property (match-beginning 0) e1 | 4106 | (put-text-property (match-beginning 0) e1 |
| 3406 | 'syntax-type 'here-doc-delim) | 4107 | 'syntax-type 'here-doc-delim) |
| 3407 | (put-text-property b e1 | 4108 | (put-text-property b e1 'here-doc-group t) |
| 3408 | 'here-doc-group t) | 4109 | ;; This makes insertion at the start of HERE-DOC update |
| 4110 | ;; the whole construct: | ||
| 4111 | (put-text-property b (cperl-1+ b) 'front-sticky '(syntax-type)) | ||
| 3409 | (cperl-commentify b e1 nil) | 4112 | (cperl-commentify b e1 nil) |
| 3410 | (cperl-put-do-not-fontify b (match-end 0) t) | 4113 | (cperl-put-do-not-fontify b (match-end 0) t) |
| 4114 | ;; Cache the syntax info... | ||
| 4115 | (setq cperl-syntax-state (cons state-point state)) | ||
| 4116 | ;; ... and process the rest of the line... | ||
| 4117 | (setq overshoot | ||
| 4118 | (elt ; non-inter ignore-max | ||
| 4119 | (cperl-find-pods-heres c i t end t e1) 1)) | ||
| 4120 | (if (and overshoot (> overshoot (point))) | ||
| 4121 | (goto-char overshoot) | ||
| 4122 | (setq overshoot e1)) | ||
| 3411 | (if (> e1 max) | 4123 | (if (> e1 max) |
| 3412 | (setq tmpend tb)))) | 4124 | (setq tmpend tb)))) |
| 3413 | ;; format | 4125 | ;; format |
| @@ -3462,7 +4174,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3462 | (if (> (point) max) | 4174 | (if (> (point) max) |
| 3463 | (setq tmpend tb)) | 4175 | (setq tmpend tb)) |
| 3464 | (put-text-property b (point) 'syntax-type 'format)) | 4176 | (put-text-property b (point) 'syntax-type 'format)) |
| 3465 | ;; Regexp: | 4177 | ;; qq-like String or Regexp: |
| 3466 | ((or (match-beginning 10) (match-beginning 11)) | 4178 | ((or (match-beginning 10) (match-beginning 11)) |
| 3467 | ;; 1+6+2=9 extra () before this: | 4179 | ;; 1+6+2=9 extra () before this: |
| 3468 | ;; "\\<\\(q[wxqr]?\\|[msy]\\|tr\\)\\>" | 4180 | ;; "\\<\\(q[wxqr]?\\|[msy]\\|tr\\)\\>" |
| @@ -3471,10 +4183,10 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3471 | (setq b1 (if (match-beginning 10) 10 11) | 4183 | (setq b1 (if (match-beginning 10) 10 11) |
| 3472 | argument (buffer-substring | 4184 | argument (buffer-substring |
| 3473 | (match-beginning b1) (match-end b1)) | 4185 | (match-beginning b1) (match-end b1)) |
| 3474 | b (point) | 4186 | b (point) ; end of qq etc |
| 3475 | i b | 4187 | i b |
| 3476 | c (char-after (match-beginning b1)) | 4188 | c (char-after (match-beginning b1)) |
| 3477 | bb (char-after (1- (match-beginning b1))) ; tmp holder | 4189 | bb (char-after (1- (match-beginning b1))) ; tmp holder |
| 3478 | ;; bb == "Not a stringy" | 4190 | ;; bb == "Not a stringy" |
| 3479 | bb (if (eq b1 10) ; user variables/whatever | 4191 | bb (if (eq b1 10) ; user variables/whatever |
| 3480 | (and (memq bb (append "$@%*#_:-&>" nil)) ; $#y) | 4192 | (and (memq bb (append "$@%*#_:-&>" nil)) ; $#y) |
| @@ -3488,7 +4200,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3488 | (- (match-beginning b1) 2)) | 4200 | (- (match-beginning b1) 2)) |
| 3489 | ?\-)) | 4201 | ?\-)) |
| 3490 | ((eq bb ?\&) | 4202 | ((eq bb ?\&) |
| 3491 | (not (eq (char-after ; &&m/blah/ | 4203 | (not (eq (char-after ; &&m/blah/ |
| 3492 | (- (match-beginning b1) 2)) | 4204 | (- (match-beginning b1) 2)) |
| 3493 | ?\&))) | 4205 | ?\&))) |
| 3494 | (t t))) | 4206 | (t t))) |
| @@ -3506,41 +4218,40 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3506 | (setq argument "" | 4218 | (setq argument "" |
| 3507 | b1 nil | 4219 | b1 nil |
| 3508 | bb ; Not a regexp? | 4220 | bb ; Not a regexp? |
| 3509 | (progn | 4221 | (not |
| 3510 | (not | 4222 | ;; What is below: regexp-p? |
| 3511 | ;; What is below: regexp-p? | 4223 | (and |
| 3512 | (and | 4224 | (or (memq (preceding-char) |
| 3513 | (or (memq (preceding-char) | 4225 | (append (if (memq c '(?\? ?\<)) |
| 3514 | (append (if (memq c '(?\? ?\<)) | 4226 | ;; $a++ ? 1 : 2 |
| 3515 | ;; $a++ ? 1 : 2 | 4227 | "~{(=|&*!,;:[" |
| 3516 | "~{(=|&*!,;:" | 4228 | "~{(=|&+-*!,;:[") nil)) |
| 3517 | "~{(=|&+-*!,;:") nil)) | 4229 | (and (eq (preceding-char) ?\}) |
| 3518 | (and (eq (preceding-char) ?\}) | 4230 | (cperl-after-block-p (point-min))) |
| 3519 | (cperl-after-block-p (point-min))) | 4231 | (and (eq (char-syntax (preceding-char)) ?w) |
| 3520 | (and (eq (char-syntax (preceding-char)) ?w) | 4232 | (progn |
| 3521 | (progn | 4233 | (forward-sexp -1) |
| 3522 | (forward-sexp -1) | ||
| 3523 | ;; After these keywords `/' starts a RE. One should add all the | 4234 | ;; After these keywords `/' starts a RE. One should add all the |
| 3524 | ;; functions/builtins which expect an argument, but ... | 4235 | ;; functions/builtins which expect an argument, but ... |
| 3525 | (if (eq (preceding-char) ?-) | 4236 | (if (eq (preceding-char) ?-) |
| 3526 | ;; -d ?foo? is a RE | 4237 | ;; -d ?foo? is a RE |
| 3527 | (looking-at "[a-zA-Z]\\>") | 4238 | (looking-at "[a-zA-Z]\\>") |
| 3528 | (and | 4239 | (and |
| 3529 | (not (memq (preceding-char) | 4240 | (not (memq (preceding-char) |
| 3530 | '(?$ ?@ ?& ?%))) | 4241 | '(?$ ?@ ?& ?%))) |
| 3531 | (looking-at | 4242 | (looking-at |
| 3532 | "\\(while\\|if\\|unless\\|until\\|and\\|or\\|not\\|xor\\|split\\|grep\\|map\\|print\\)\\>"))))) | 4243 | "\\(while\\|if\\|unless\\|until\\|and\\|or\\|not\\|xor\\|split\\|grep\\|map\\|print\\)\\>"))))) |
| 3533 | (and (eq (preceding-char) ?.) | 4244 | (and (eq (preceding-char) ?.) |
| 3534 | (eq (char-after (- (point) 2)) ?.)) | 4245 | (eq (char-after (- (point) 2)) ?.)) |
| 3535 | (bobp)) | 4246 | (bobp)) |
| 3536 | ;; m|blah| ? foo : bar; | 4247 | ;; m|blah| ? foo : bar; |
| 3537 | (not | 4248 | (not |
| 3538 | (and (eq c ?\?) | 4249 | (and (eq c ?\?) |
| 3539 | cperl-use-syntax-table-text-property | 4250 | cperl-use-syntax-table-text-property |
| 3540 | (not (bobp)) | 4251 | (not (bobp)) |
| 3541 | (progn | 4252 | (progn |
| 3542 | (forward-char -1) | 4253 | (forward-char -1) |
| 3543 | (looking-at "\\s|"))))))) | 4254 | (looking-at "\\s|")))))) |
| 3544 | b (1- b)) | 4255 | b (1- b)) |
| 3545 | ;; s y tr m | 4256 | ;; s y tr m |
| 3546 | ;; Check for $a -> y | 4257 | ;; Check for $a -> y |
| @@ -3550,13 +4261,9 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3550 | (eq (char-after (- go 2)) ?-)) | 4261 | (eq (char-after (- go 2)) ?-)) |
| 3551 | ;; Not a regexp | 4262 | ;; Not a regexp |
| 3552 | (setq bb t)))) | 4263 | (setq bb t)))) |
| 3553 | (or bb (setq state (parse-partial-sexp | ||
| 3554 | state-point b nil nil state) | ||
| 3555 | state-point b)) | ||
| 3556 | (setq bb (or bb (nth 3 state) (nth 4 state))) | ||
| 3557 | (goto-char b) | ||
| 3558 | (or bb | 4264 | (or bb |
| 3559 | (progn | 4265 | (progn |
| 4266 | (goto-char b) | ||
| 3560 | (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ \t\n\f]*\\)+") | 4267 | (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ \t\n\f]*\\)+") |
| 3561 | (goto-char (match-end 0)) | 4268 | (goto-char (match-end 0)) |
| 3562 | (skip-chars-forward " \t\n\f")) | 4269 | (skip-chars-forward " \t\n\f")) |
| @@ -3593,6 +4300,8 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3593 | (skip-chars-backward " \t\n\f") | 4300 | (skip-chars-backward " \t\n\f") |
| 3594 | (memq (preceding-char) | 4301 | (memq (preceding-char) |
| 3595 | (append "$@%&*" nil)))) | 4302 | (append "$@%&*" nil)))) |
| 4303 | (setq bb t)) | ||
| 4304 | ((eobp) | ||
| 3596 | (setq bb t))))) | 4305 | (setq bb t))))) |
| 3597 | (if bb | 4306 | (if bb |
| 3598 | (goto-char i) | 4307 | (goto-char i) |
| @@ -3605,15 +4314,16 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3605 | ;; qtag means two-arg matcher, may be reset to | 4314 | ;; qtag means two-arg matcher, may be reset to |
| 3606 | ;; 2 or 3 later if some special quoting is needed. | 4315 | ;; 2 or 3 later if some special quoting is needed. |
| 3607 | ;; e1 means matching-char matcher. | 4316 | ;; e1 means matching-char matcher. |
| 3608 | (setq b (point) | 4317 | (setq b (point) ; before the first delimiter |
| 3609 | ;; has 2 args | 4318 | ;; has 2 args |
| 3610 | i2 (string-match "^\\([sy]\\|tr\\)$" argument) | 4319 | i2 (string-match "^\\([sy]\\|tr\\)$" argument) |
| 3611 | ;; We do not search to max, since we may be called from | 4320 | ;; We do not search to max, since we may be called from |
| 3612 | ;; some hook of fontification, and max is random | 4321 | ;; some hook of fontification, and max is random |
| 3613 | i (cperl-forward-re stop-point end | 4322 | i (cperl-forward-re stop-point end |
| 3614 | i2 | 4323 | i2 |
| 3615 | t st-l err-l argument) | 4324 | st-l err-l argument) |
| 3616 | ;; Note that if `go', then it is considered as 1-arg | 4325 | ;; If `go', then it is considered as 1-arg, `b1' is nil |
| 4326 | ;; as in s/foo//x; the point is before final "slash" | ||
| 3617 | b1 (nth 1 i) ; start of the second part | 4327 | b1 (nth 1 i) ; start of the second part |
| 3618 | tag (nth 2 i) ; ender-char, true if second part | 4328 | tag (nth 2 i) ; ender-char, true if second part |
| 3619 | ; is with matching chars [] | 4329 | ; is with matching chars [] |
| @@ -3625,13 +4335,18 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3625 | (1- e1)) | 4335 | (1- e1)) |
| 3626 | e (if i i e1) ; end of the first part | 4336 | e (if i i e1) ; end of the first part |
| 3627 | qtag nil ; need to preserve backslashitis | 4337 | qtag nil ; need to preserve backslashitis |
| 3628 | is-x-REx nil) ; REx has //x modifier | 4338 | is-x-REx nil is-o-REx nil); REx has //x //o modifiers |
| 4339 | ;; If s{} (), then b/b1 are at "{", "(", e1/i after ")", "}" | ||
| 3629 | ;; Commenting \\ is dangerous, what about ( ? | 4340 | ;; Commenting \\ is dangerous, what about ( ? |
| 3630 | (and i tail | 4341 | (and i tail |
| 3631 | (eq (char-after i) ?\\) | 4342 | (eq (char-after i) ?\\) |
| 3632 | (setq qtag t)) | 4343 | (setq qtag t)) |
| 3633 | (if (looking-at "\\sw*x") ; qr//x | 4344 | (and (if go (looking-at ".\\sw*x") |
| 3634 | (setq is-x-REx t)) | 4345 | (looking-at "\\sw*x")) ; qr//x |
| 4346 | (setq is-x-REx t)) | ||
| 4347 | (and (if go (looking-at ".\\sw*o") | ||
| 4348 | (looking-at "\\sw*o")) ; //o | ||
| 4349 | (setq is-o-REx t)) | ||
| 3635 | (if (null i) | 4350 | (if (null i) |
| 3636 | ;; Considered as 1arg form | 4351 | ;; Considered as 1arg form |
| 3637 | (progn | 4352 | (progn |
| @@ -3648,9 +4363,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3648 | (cperl-commentify b i t) | 4363 | (cperl-commentify b i t) |
| 3649 | (if (looking-at "\\sw*e") ; s///e | 4364 | (if (looking-at "\\sw*e") ; s///e |
| 3650 | (progn | 4365 | (progn |
| 4366 | ;; Cache the syntax info... | ||
| 4367 | (setq cperl-syntax-state (cons state-point state)) | ||
| 3651 | (and | 4368 | (and |
| 3652 | ;; silent: | 4369 | ;; silent: |
| 3653 | (cperl-find-pods-heres b1 (1- (point)) t end) | 4370 | (car (cperl-find-pods-heres b1 (1- (point)) t end)) |
| 3654 | ;; Error | 4371 | ;; Error |
| 3655 | (goto-char (1+ max))) | 4372 | (goto-char (1+ max))) |
| 3656 | (if (and tag (eq (preceding-char) ?\>)) | 4373 | (if (and tag (eq (preceding-char) ?\>)) |
| @@ -3658,6 +4375,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3658 | (cperl-modify-syntax-type (1- (point)) cperl-st-ket) | 4375 | (cperl-modify-syntax-type (1- (point)) cperl-st-ket) |
| 3659 | (cperl-modify-syntax-type i cperl-st-bra))) | 4376 | (cperl-modify-syntax-type i cperl-st-bra))) |
| 3660 | (put-text-property b i 'syntax-type 'string) | 4377 | (put-text-property b i 'syntax-type 'string) |
| 4378 | (put-text-property i (point) 'syntax-type 'multiline) | ||
| 3661 | (if is-x-REx | 4379 | (if is-x-REx |
| 3662 | (put-text-property b i 'indentable t))) | 4380 | (put-text-property b i 'indentable t))) |
| 3663 | (cperl-commentify b1 (point) t) | 4381 | (cperl-commentify b1 (point) t) |
| @@ -3673,7 +4391,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3673 | (forward-word 1) ; skip modifiers s///s | 4391 | (forward-word 1) ; skip modifiers s///s |
| 3674 | (if tail (cperl-commentify tail (point) t)) | 4392 | (if tail (cperl-commentify tail (point) t)) |
| 3675 | (cperl-postpone-fontification | 4393 | (cperl-postpone-fontification |
| 3676 | e1 (point) 'face 'cperl-nonoverridable))) | 4394 | e1 (point) 'face my-cperl-REx-modifiers-face))) |
| 3677 | ;; Check whether it is m// which means "previous match" | 4395 | ;; Check whether it is m// which means "previous match" |
| 3678 | ;; and highlight differently | 4396 | ;; and highlight differently |
| 3679 | (setq is-REx | 4397 | (setq is-REx |
| @@ -3691,7 +4409,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3691 | (not (looking-at "split\\>"))) | 4409 | (not (looking-at "split\\>"))) |
| 3692 | (error t)))) | 4410 | (error t)))) |
| 3693 | (cperl-postpone-fontification | 4411 | (cperl-postpone-fontification |
| 3694 | b e 'face font-lock-function-name-face) | 4412 | b e 'face font-lock-warning-face) |
| 3695 | (if (or i2 ; Has 2 args | 4413 | (if (or i2 ; Has 2 args |
| 3696 | (and cperl-fontify-m-as-s | 4414 | (and cperl-fontify-m-as-s |
| 3697 | (or | 4415 | (or |
| @@ -3700,135 +4418,417 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3700 | (not (eq ?\< (char-after b))))))) | 4418 | (not (eq ?\< (char-after b))))))) |
| 3701 | (progn | 4419 | (progn |
| 3702 | (cperl-postpone-fontification | 4420 | (cperl-postpone-fontification |
| 3703 | b (cperl-1+ b) 'face font-lock-constant-face) | 4421 | b (cperl-1+ b) 'face my-cperl-delimiters-face) |
| 3704 | (cperl-postpone-fontification | 4422 | (cperl-postpone-fontification |
| 3705 | (1- e) e 'face font-lock-constant-face))) | 4423 | (1- e) e 'face my-cperl-delimiters-face))) |
| 3706 | (if (and is-REx cperl-regexp-scan) | 4424 | (if (and is-REx cperl-regexp-scan) |
| 3707 | ;; Process RExen better | 4425 | ;; Process RExen: embedded comments, charclasses and ] |
| 4426 | ;;;/\3333\xFg\x{FFF}a\ppp\PPP\qqq\C\99f(?{ foo })(??{ foo })/; | ||
| 4427 | ;;;/a\.b[^a[:ff:]b]x$ab->$[|$,$ab->[cd]->[ef]|$ab[xy].|^${a,b}{c,d}/; | ||
| 4428 | ;;;/(?<=foo)(?<!bar)(x)(?:$ab|\$\/)$|\\\b\x888\776\[\:$/xxx; | ||
| 4429 | ;;;m?(\?\?{b,a})? + m/(??{aa})(?(?=xx)aa|bb)(?#aac)/; | ||
| 4430 | ;;;m$(^ab[c]\$)$ + m+(^ab[c]\$\+)+ + m](^ab[c\]$|.+)] + m)(^ab[c]$|.+\)); | ||
| 4431 | ;;;m^a[\^b]c^ + m.a[^b]\.c.; | ||
| 3708 | (save-excursion | 4432 | (save-excursion |
| 3709 | (goto-char (1+ b)) | 4433 | (goto-char (1+ b)) |
| 4434 | ;; First | ||
| 4435 | (cperl-look-at-leading-count is-x-REx e) | ||
| 4436 | (setq hairy-RE | ||
| 4437 | (concat | ||
| 4438 | (if is-x-REx | ||
| 4439 | (if (eq (char-after b) ?\#) | ||
| 4440 | "\\((\\?\\\\#\\)\\|\\(\\\\#\\)" | ||
| 4441 | "\\((\\?#\\)\\|\\(#\\)") | ||
| 4442 | ;; keep the same count: add a fake group | ||
| 4443 | (if (eq (char-after b) ?\#) | ||
| 4444 | "\\((\\?\\\\#\\)\\(\\)" | ||
| 4445 | "\\((\\?#\\)\\(\\)")) | ||
| 4446 | "\\|" | ||
| 4447 | "\\(\\[\\)" ; 3=[ | ||
| 4448 | "\\|" | ||
| 4449 | "\\(]\\)" ; 4=] | ||
| 4450 | "\\|" | ||
| 4451 | ;; XXXX Will not be able to use it in s))) | ||
| 4452 | (if (eq (char-after b) ?\) ) | ||
| 4453 | "\\())))\\)" ; Will never match | ||
| 4454 | (if (eq (char-after b) ?? ) | ||
| 4455 | ;;"\\((\\\\\\?\\(\\\\\\?\\)?{\\)" | ||
| 4456 | "\\((\\\\\\?\\\\\\?{\\|()\\\\\\?{\\)" | ||
| 4457 | "\\((\\?\\??{\\)")) ; 5= (??{ (?{ | ||
| 4458 | "\\|" ; 6= 0-length, 7: name, 8,9:code, 10:group | ||
| 4459 | "\\(" ;; XXXX 1-char variables, exc. |()\s | ||
| 4460 | "[$@]" | ||
| 4461 | "\\(" | ||
| 4462 | "[_a-zA-Z:][_a-zA-Z0-9:]*" | ||
| 4463 | "\\|" | ||
| 4464 | "{[^{}]*}" ; only one-level allowed | ||
| 4465 | "\\|" | ||
| 4466 | "[^{(|) \t\r\n\f]" | ||
| 4467 | "\\)" | ||
| 4468 | "\\(" ;;8,9:code part of array/hash elt | ||
| 4469 | "\\(" "->" "\\)?" | ||
| 4470 | "\\[[^][]*\\]" | ||
| 4471 | "\\|" | ||
| 4472 | "{[^{}]*}" | ||
| 4473 | "\\)*" | ||
| 4474 | ;; XXXX: what if u is delim? | ||
| 4475 | "\\|" | ||
| 4476 | "[)^|$.*?+]" | ||
| 4477 | "\\|" | ||
| 4478 | "{[0-9]+}" | ||
| 4479 | "\\|" | ||
| 4480 | "{[0-9]+,[0-9]*}" | ||
| 4481 | "\\|" | ||
| 4482 | "\\\\[luLUEQbBAzZG]" | ||
| 4483 | "\\|" | ||
| 4484 | "(" ; Group opener | ||
| 4485 | "\\(" ; 10 group opener follower | ||
| 4486 | "\\?\\((\\?\\)" ; 11: in (?(?=C)A|B) | ||
| 4487 | "\\|" | ||
| 4488 | "\\?[:=!>?{]" ; "?" something | ||
| 4489 | "\\|" | ||
| 4490 | "\\?[-imsx]+[:)]" ; (?i) (?-s:.) | ||
| 4491 | "\\|" | ||
| 4492 | "\\?([0-9]+)" ; (?(1)foo|bar) | ||
| 4493 | "\\|" | ||
| 4494 | "\\?<[=!]" | ||
| 4495 | ;;;"\\|" | ||
| 4496 | ;;; "\\?" | ||
| 4497 | "\\)?" | ||
| 4498 | "\\)" | ||
| 4499 | "\\|" | ||
| 4500 | "\\\\\\(.\\)" ; 12=\SYMBOL | ||
| 4501 | )) | ||
| 3710 | (while | 4502 | (while |
| 3711 | (and (< (point) e) | 4503 | (and (< (point) (1- e)) |
| 3712 | (re-search-forward | 4504 | (re-search-forward hairy-RE (1- e) 'to-end)) |
| 3713 | (if is-x-REx | ||
| 3714 | (if (eq (char-after b) ?\#) | ||
| 3715 | "\\((\\?\\\\#\\)\\|\\(\\\\#\\)" | ||
| 3716 | "\\((\\?#\\)\\|\\(#\\)") | ||
| 3717 | (if (eq (char-after b) ?\#) | ||
| 3718 | "\\((\\?\\\\#\\)" | ||
| 3719 | "\\((\\?#\\)")) | ||
| 3720 | (1- e) 'to-end)) | ||
| 3721 | (goto-char (match-beginning 0)) | 4505 | (goto-char (match-beginning 0)) |
| 3722 | (setq REx-comment-start (point) | 4506 | (setq REx-subgr-start (point) |
| 3723 | was-comment t) | 4507 | was-subgr (following-char)) |
| 3724 | (if (save-excursion | 4508 | (cond |
| 3725 | (and | 4509 | ((match-beginning 6) ; 0-length builtins, groups |
| 3726 | ;; XXX not working if outside delimiter is # | 4510 | (goto-char (match-end 0)) |
| 3727 | (eq (preceding-char) ?\\) | 4511 | (if (match-beginning 11) |
| 3728 | (= (% (skip-chars-backward "$\\\\") 2) -1))) | 4512 | (goto-char (match-beginning 11))) |
| 3729 | ;; Not a comment, avoid loop: | 4513 | (if (>= (point) e) |
| 3730 | (progn (setq was-comment nil) | 4514 | (goto-char (1- e))) |
| 3731 | (forward-char 1)) | 4515 | (cperl-postpone-fontification |
| 3732 | (if (match-beginning 2) | 4516 | (match-beginning 0) (point) |
| 4517 | 'face | ||
| 4518 | (cond | ||
| 4519 | ((eq was-subgr ?\) ) | ||
| 4520 | (condition-case nil | ||
| 4521 | (save-excursion | ||
| 4522 | (forward-sexp -1) | ||
| 4523 | (if (> (point) b) | ||
| 4524 | (if (if (eq (char-after b) ?? ) | ||
| 4525 | (looking-at "(\\\\\\?") | ||
| 4526 | (eq (char-after (1+ (point))) ?\?)) | ||
| 4527 | my-cperl-REx-0length-face | ||
| 4528 | my-cperl-REx-ctl-face) | ||
| 4529 | font-lock-warning-face)) | ||
| 4530 | (error font-lock-warning-face))) | ||
| 4531 | ((eq was-subgr ?\| ) | ||
| 4532 | my-cperl-REx-ctl-face) | ||
| 4533 | ((eq was-subgr ?\$ ) | ||
| 4534 | (if (> (point) (1+ REx-subgr-start)) | ||
| 4535 | (progn | ||
| 4536 | (put-text-property | ||
| 4537 | (match-beginning 0) (point) | ||
| 4538 | 'REx-interpolated | ||
| 4539 | (if is-o-REx 0 | ||
| 4540 | (if (and (eq (match-beginning 0) | ||
| 4541 | (1+ b)) | ||
| 4542 | (eq (point) | ||
| 4543 | (1- e))) 1 t))) | ||
| 4544 | font-lock-variable-name-face) | ||
| 4545 | my-cperl-REx-spec-char-face)) | ||
| 4546 | ((memq was-subgr (append "^." nil) ) | ||
| 4547 | my-cperl-REx-spec-char-face) | ||
| 4548 | ((eq was-subgr ?\( ) | ||
| 4549 | (if (not (match-beginning 10)) | ||
| 4550 | my-cperl-REx-ctl-face | ||
| 4551 | my-cperl-REx-0length-face)) | ||
| 4552 | (t my-cperl-REx-0length-face))) | ||
| 4553 | (if (and (memq was-subgr (append "(|" nil)) | ||
| 4554 | (not (string-match "(\\?[-imsx]+)" | ||
| 4555 | (match-string 0)))) | ||
| 4556 | (cperl-look-at-leading-count is-x-REx e)) | ||
| 4557 | (setq was-subgr nil)) ; We do stuff here | ||
| 4558 | ((match-beginning 12) ; \SYMBOL | ||
| 4559 | (forward-char 2) | ||
| 4560 | (if (>= (point) e) | ||
| 4561 | (goto-char (1- e)) | ||
| 4562 | ;; How many chars to not highlight: | ||
| 4563 | ;; 0-len special-alnums in other branch => | ||
| 4564 | ;; Generic: \non-alnum (1), \alnum (1+face) | ||
| 4565 | ;; Is-delim: \non-alnum (1/spec-2) alnum-1 (=what hai) | ||
| 4566 | (setq REx-subgr-start (point) | ||
| 4567 | qtag (preceding-char)) | ||
| 4568 | (cperl-postpone-fontification | ||
| 4569 | (- (point) 2) (- (point) 1) 'face | ||
| 4570 | (if (memq qtag | ||
| 4571 | (append "ghijkmoqvFHIJKMORTVY" nil)) | ||
| 4572 | font-lock-warning-face | ||
| 4573 | my-cperl-REx-0length-face)) | ||
| 4574 | (if (and (eq (char-after b) qtag) | ||
| 4575 | (memq qtag (append ".])^$|*?+" nil))) | ||
| 4576 | (progn | ||
| 4577 | (if (and cperl-use-syntax-table-text-property | ||
| 4578 | (eq qtag ?\) )) | ||
| 4579 | (put-text-property | ||
| 4580 | REx-subgr-start (1- (point)) | ||
| 4581 | 'syntax-table cperl-st-punct)) | ||
| 4582 | (cperl-postpone-fontification | ||
| 4583 | (1- (point)) (point) 'face | ||
| 4584 | ; \] can't appear below | ||
| 4585 | (if (memq qtag (append ".]^$" nil)) | ||
| 4586 | 'my-cperl-REx-spec-char-face | ||
| 4587 | (if (memq qtag (append "*?+" nil)) | ||
| 4588 | 'my-cperl-REx-0length-face | ||
| 4589 | 'my-cperl-REx-ctl-face))))) ; )| | ||
| 4590 | ;; Test for arguments: | ||
| 4591 | (cond | ||
| 4592 | ;; This is not pretty: the 5.8.7 logic: | ||
| 4593 | ;; \0numx -> octal (up to total 3 dig) | ||
| 4594 | ;; \DIGIT -> backref unless \0 | ||
| 4595 | ;; \DIGITs -> backref if legal | ||
| 4596 | ;; otherwise up to 3 -> octal | ||
| 4597 | ;; Do not try to distinguish, we guess | ||
| 4598 | ((or (and (memq qtag (append "01234567" nil)) | ||
| 4599 | (re-search-forward | ||
| 4600 | "\\=[01234567]?[01234567]?" | ||
| 4601 | (1- e) 'to-end)) | ||
| 4602 | (and (memq qtag (append "89" nil)) | ||
| 4603 | (re-search-forward | ||
| 4604 | "\\=[0123456789]*" (1- e) 'to-end)) | ||
| 4605 | (and (eq qtag ?x) | ||
| 4606 | (re-search-forward | ||
| 4607 | "\\=[0-9a-fA-F][0-9a-fA-F]?\\|\\={[0-9a-fA-F]+}" | ||
| 4608 | (1- e) 'to-end)) | ||
| 4609 | (and (memq qtag (append "pPN" nil)) | ||
| 4610 | (re-search-forward "\\={[^{}]+}\\|." | ||
| 4611 | (1- e) 'to-end)) | ||
| 4612 | (eq (char-syntax qtag) ?w)) | ||
| 4613 | (cperl-postpone-fontification | ||
| 4614 | (1- REx-subgr-start) (point) | ||
| 4615 | 'face my-cperl-REx-length1-face)))) | ||
| 4616 | (setq was-subgr nil)) ; We do stuff here | ||
| 4617 | ((match-beginning 3) ; [charclass] | ||
| 4618 | (forward-char 1) | ||
| 4619 | (if (eq (char-after b) ?^ ) | ||
| 4620 | (and (eq (following-char) ?\\ ) | ||
| 4621 | (eq (char-after (cperl-1+ (point))) | ||
| 4622 | ?^ ) | ||
| 4623 | (forward-char 2)) | ||
| 4624 | (and (eq (following-char) ?^ ) | ||
| 4625 | (forward-char 1))) | ||
| 4626 | (setq argument b ; continue? | ||
| 4627 | tag nil ; list of POSIX classes | ||
| 4628 | qtag (point)) | ||
| 4629 | (if (eq (char-after b) ?\] ) | ||
| 4630 | (and (eq (following-char) ?\\ ) | ||
| 4631 | (eq (char-after (cperl-1+ (point))) | ||
| 4632 | ?\] ) | ||
| 4633 | (setq qtag (1+ qtag)) | ||
| 4634 | (forward-char 2)) | ||
| 4635 | (and (eq (following-char) ?\] ) | ||
| 4636 | (forward-char 1))) | ||
| 4637 | ;; Apparently, I can't put \] into a charclass | ||
| 4638 | ;; in m]]: m][\\\]\]] produces [\\]] | ||
| 4639 | ;;; POSIX? [:word:] [:^word:] only inside [] | ||
| 4640 | ;;; "\\=\\(\\\\.\\|[^][\\\\]\\|\\[:\\^?\sw+:]\\|\\[[^:]\\)*]") | ||
| 4641 | (while | ||
| 4642 | (and argument | ||
| 4643 | (re-search-forward | ||
| 4644 | (if (eq (char-after b) ?\] ) | ||
| 4645 | "\\=\\(\\\\[^]]\\|[^]\\\\]\\)*\\\\]" | ||
| 4646 | "\\=\\(\\\\.\\|[^]\\\\]\\)*]") | ||
| 4647 | (1- e) 'toend)) | ||
| 4648 | ;; Is this ] an end of POSIX class? | ||
| 4649 | (if (save-excursion | ||
| 4650 | (and | ||
| 4651 | (search-backward "[" argument t) | ||
| 4652 | (< REx-subgr-start (point)) | ||
| 4653 | (not | ||
| 4654 | (and ; Should work with delim = \ | ||
| 4655 | (eq (preceding-char) ?\\ ) | ||
| 4656 | (= (% (skip-chars-backward | ||
| 4657 | "\\\\") 2) 0))) | ||
| 4658 | (looking-at | ||
| 4659 | (cond | ||
| 4660 | ((eq (char-after b) ?\] ) | ||
| 4661 | "\\\\*\\[:\\^?\\sw+:\\\\\\]") | ||
| 4662 | ((eq (char-after b) ?\: ) | ||
| 4663 | "\\\\*\\[\\\\:\\^?\\sw+\\\\:]") | ||
| 4664 | ((eq (char-after b) ?^ ) | ||
| 4665 | "\\\\*\\[:\\(\\\\\\^\\)?\\sw+:\]") | ||
| 4666 | ((eq (char-syntax (char-after b)) | ||
| 4667 | ?w) | ||
| 4668 | (concat | ||
| 4669 | "\\\\*\\[:\\(\\\\\\^\\)?\\(\\\\" | ||
| 4670 | (char-to-string (char-after b)) | ||
| 4671 | "\\|\\sw\\)+:\]")) | ||
| 4672 | (t "\\\\*\\[:\\^?\\sw*:]"))) | ||
| 4673 | (setq argument (point)))) | ||
| 4674 | (setq tag (cons (cons argument (point)) | ||
| 4675 | tag) | ||
| 4676 | argument (point)) ; continue | ||
| 4677 | (setq argument nil))) | ||
| 4678 | (and argument | ||
| 4679 | (message "Couldn't find end of charclass in a REx, pos=%s" | ||
| 4680 | REx-subgr-start)) | ||
| 4681 | (if (and cperl-use-syntax-table-text-property | ||
| 4682 | (> (- (point) 2) REx-subgr-start)) | ||
| 4683 | (put-text-property | ||
| 4684 | (1+ REx-subgr-start) (1- (point)) | ||
| 4685 | 'syntax-table cperl-st-punct)) | ||
| 4686 | (cperl-postpone-fontification | ||
| 4687 | REx-subgr-start qtag | ||
| 4688 | 'face my-cperl-REx-spec-char-face) | ||
| 4689 | (cperl-postpone-fontification | ||
| 4690 | (1- (point)) (point) 'face | ||
| 4691 | my-cperl-REx-spec-char-face) | ||
| 4692 | (if (eq (char-after b) ?\] ) | ||
| 4693 | (cperl-postpone-fontification | ||
| 4694 | (- (point) 2) (1- (point)) | ||
| 4695 | 'face my-cperl-REx-0length-face)) | ||
| 4696 | (while tag | ||
| 4697 | (cperl-postpone-fontification | ||
| 4698 | (car (car tag)) (cdr (car tag)) | ||
| 4699 | 'face my-cperl-REx-length1-face) | ||
| 4700 | (setq tag (cdr tag))) | ||
| 4701 | (setq was-subgr nil)) ; did facing already | ||
| 4702 | ;; Now rare stuff: | ||
| 4703 | ((and (match-beginning 2) ; #-comment | ||
| 4704 | (/= (match-beginning 2) (match-end 2))) | ||
| 4705 | (beginning-of-line 2) | ||
| 4706 | (if (> (point) e) | ||
| 4707 | (goto-char (1- e)))) | ||
| 4708 | ((match-beginning 4) ; character "]" | ||
| 4709 | (setq was-subgr nil) ; We do stuff here | ||
| 4710 | (goto-char (match-end 0)) | ||
| 4711 | (if cperl-use-syntax-table-text-property | ||
| 4712 | (put-text-property | ||
| 4713 | (1- (point)) (point) | ||
| 4714 | 'syntax-table cperl-st-punct)) | ||
| 4715 | (cperl-postpone-fontification | ||
| 4716 | (1- (point)) (point) | ||
| 4717 | 'face font-lock-warning-face)) | ||
| 4718 | ((match-beginning 5) ; before (?{}) (??{}) | ||
| 4719 | (setq tag (match-end 0)) | ||
| 4720 | (if (or (setq qtag | ||
| 4721 | (cperl-forward-group-in-re st-l)) | ||
| 4722 | (and (>= (point) e) | ||
| 4723 | (setq qtag "no matching `)' found")) | ||
| 4724 | (and (not (eq (char-after (- (point) 2)) | ||
| 4725 | ?\} )) | ||
| 4726 | (setq qtag "Can't find })"))) | ||
| 3733 | (progn | 4727 | (progn |
| 3734 | (beginning-of-line 2) | 4728 | (goto-char (1- e)) |
| 3735 | (if (> (point) e) | 4729 | (message qtag)) |
| 3736 | (goto-char (1- e)))) | 4730 | (cperl-postpone-fontification |
| 3737 | ;; Works also if the outside delimiters are (). | 4731 | (1- tag) (1- (point)) |
| 3738 | (or (search-forward ")" (1- e) 'toend) | 4732 | 'face font-lock-variable-name-face) |
| 3739 | (message | 4733 | (cperl-postpone-fontification |
| 3740 | "Couldn't find end of (?#...)-comment in a REx, pos=%s" | 4734 | REx-subgr-start (1- tag) |
| 3741 | REx-comment-start)))) | 4735 | 'face my-cperl-REx-spec-char-face) |
| 4736 | (cperl-postpone-fontification | ||
| 4737 | (1- (point)) (point) | ||
| 4738 | 'face my-cperl-REx-spec-char-face) | ||
| 4739 | (if cperl-use-syntax-table-text-property | ||
| 4740 | (progn | ||
| 4741 | (put-text-property | ||
| 4742 | (- (point) 2) (1- (point)) | ||
| 4743 | 'syntax-table cperl-st-cfence) | ||
| 4744 | (put-text-property | ||
| 4745 | (+ REx-subgr-start 2) | ||
| 4746 | (+ REx-subgr-start 3) | ||
| 4747 | 'syntax-table cperl-st-cfence)))) | ||
| 4748 | (setq was-subgr nil)) | ||
| 4749 | (t ; (?#)-comment | ||
| 4750 | ;; Inside "(" and "\" arn't special in any way | ||
| 4751 | ;; Works also if the outside delimiters are (). | ||
| 4752 | (or;;(if (eq (char-after b) ?\) ) | ||
| 4753 | ;;(re-search-forward | ||
| 4754 | ;; "[^\\\\]\\(\\\\\\\\\\)*\\\\)" | ||
| 4755 | ;; (1- e) 'toend) | ||
| 4756 | (search-forward ")" (1- e) 'toend) | ||
| 4757 | ;;) | ||
| 4758 | (message | ||
| 4759 | "Couldn't find end of (?#...)-comment in a REx, pos=%s" | ||
| 4760 | REx-subgr-start)))) | ||
| 3742 | (if (>= (point) e) | 4761 | (if (>= (point) e) |
| 3743 | (goto-char (1- e))) | 4762 | (goto-char (1- e))) |
| 3744 | (if was-comment | 4763 | (cond |
| 3745 | (progn | 4764 | (was-subgr |
| 3746 | (setq REx-comment-end (point)) | 4765 | (setq REx-subgr-end (point)) |
| 3747 | (cperl-commentify | 4766 | (cperl-commentify |
| 3748 | REx-comment-start REx-comment-end nil) | 4767 | REx-subgr-start REx-subgr-end nil) |
| 3749 | (cperl-postpone-fontification | 4768 | (cperl-postpone-fontification |
| 3750 | REx-comment-start REx-comment-end | 4769 | REx-subgr-start REx-subgr-end |
| 3751 | 'face font-lock-comment-face)))))) | 4770 | 'face font-lock-comment-face)))))) |
| 3752 | (if (and is-REx is-x-REx) | 4771 | (if (and is-REx is-x-REx) |
| 3753 | (put-text-property (1+ b) (1- e) | 4772 | (put-text-property (1+ b) (1- e) |
| 3754 | 'syntax-subtype 'x-REx))) | 4773 | 'syntax-subtype 'x-REx))) |
| 3755 | (if i2 | 4774 | (if i2 |
| 3756 | (progn | 4775 | (progn |
| 3757 | (cperl-postpone-fontification | 4776 | (cperl-postpone-fontification |
| 3758 | (1- e1) e1 'face font-lock-constant-face) | 4777 | (1- e1) e1 'face my-cperl-delimiters-face) |
| 3759 | (if (assoc (char-after b) cperl-starters) | 4778 | (if (assoc (char-after b) cperl-starters) |
| 3760 | (cperl-postpone-fontification | 4779 | (progn |
| 3761 | b1 (1+ b1) 'face font-lock-constant-face)))) | 4780 | (cperl-postpone-fontification |
| 4781 | b1 (1+ b1) 'face my-cperl-delimiters-face) | ||
| 4782 | (put-text-property b1 (1+ b1) | ||
| 4783 | 'REx-part2 t))))) | ||
| 3762 | (if (> (point) max) | 4784 | (if (> (point) max) |
| 3763 | (setq tmpend tb)))) | 4785 | (setq tmpend tb)))) |
| 3764 | ((match-beginning 13) ; sub with prototypes | 4786 | ((match-beginning 17) ; sub with prototype or attribute |
| 3765 | (setq b (match-beginning 0)) | 4787 | ;; 1+6+2+1+1=11 extra () before this (sub with proto/attr): |
| 4788 | ;;"\\<sub\\>\\(" ;12 | ||
| 4789 | ;; cperl-white-and-comment-rex ;13 | ||
| 4790 | ;; "\\([a-zA-Z_:'0-9]+\\)\\)?" ; name ;14 | ||
| 4791 | ;;"\\(" cperl-maybe-white-and-comment-rex ;15,16 | ||
| 4792 | ;; "\\(([^()]*)\\|:[^:]\\)\\)" ; 17:proto or attribute start | ||
| 4793 | (setq b1 (match-beginning 14) e1 (match-end 14)) | ||
| 3766 | (if (memq (char-after (1- b)) | 4794 | (if (memq (char-after (1- b)) |
| 3767 | '(?\$ ?\@ ?\% ?\& ?\*)) | 4795 | '(?\$ ?\@ ?\% ?\& ?\*)) |
| 3768 | nil | 4796 | nil |
| 3769 | (setq state (parse-partial-sexp | 4797 | (goto-char b) |
| 3770 | state-point b nil nil state) | 4798 | (if (eq (char-after (match-beginning 17)) ?\( ) |
| 3771 | state-point b) | 4799 | (progn |
| 3772 | (if (or (nth 3 state) (nth 4 state)) | 4800 | (cperl-commentify ; Prototypes; mark as string |
| 3773 | nil | 4801 | (match-beginning 17) (match-end 17) t) |
| 3774 | ;; Mark as string | 4802 | (goto-char (match-end 0)) |
| 3775 | (cperl-commentify (match-beginning 13) (match-end 13) t)) | 4803 | ;; Now look for attributes after prototype: |
| 3776 | (goto-char (match-end 0)))) | 4804 | (forward-comment (buffer-size)) |
| 3777 | ;; 1+6+2+1+1+2=13 extra () before this: | 4805 | (and (looking-at ":[^:]") |
| 3778 | ;; "\\$\\(['{]\\)" | 4806 | (cperl-find-sub-attrs st-l b1 e1 b))) |
| 3779 | ((and (match-beginning 14) | 4807 | ;; treat attributes without prototype |
| 3780 | (eq (preceding-char) ?\')) ; $' | 4808 | (goto-char (match-beginning 17)) |
| 3781 | (setq b (1- (point)) | 4809 | (cperl-find-sub-attrs st-l b1 e1 b)))) |
| 3782 | state (parse-partial-sexp | 4810 | ;; 1+6+2+1+1+6+1=18 extra () before this: |
| 3783 | state-point (1- b) nil nil state) | ||
| 3784 | state-point (1- b)) | ||
| 3785 | (if (nth 3 state) ; in string | ||
| 3786 | (cperl-modify-syntax-type (1- b) cperl-st-punct)) | ||
| 3787 | (goto-char (1+ b))) | ||
| 3788 | ;; 1+6+2+1+1+2=13 extra () before this: | ||
| 3789 | ;; "\\$\\(['{]\\)" | ||
| 3790 | ((match-beginning 14) ; ${ | ||
| 3791 | (setq bb (match-beginning 0)) | ||
| 3792 | (cperl-modify-syntax-type bb cperl-st-punct)) | ||
| 3793 | ;; 1+6+2+1+1+2+1=14 extra () before this: | ||
| 3794 | ;; "\\(\\<sub[ \t\n\f]+\\|[&*$@%]\\)[a-zA-Z0-9_]*'") | 4811 | ;; "\\(\\<sub[ \t\n\f]+\\|[&*$@%]\\)[a-zA-Z0-9_]*'") |
| 3795 | ((match-beginning 15) ; old $abc'efg syntax | 4812 | ((match-beginning 19) ; old $abc'efg syntax |
| 3796 | (setq bb (match-end 0) | 4813 | (setq bb (match-end 0)) |
| 3797 | b (match-beginning 0) | 4814 | ;;;(if (nth 3 state) nil ; in string |
| 3798 | state (parse-partial-sexp | 4815 | (put-text-property (1- bb) bb 'syntax-table cperl-st-word) |
| 3799 | state-point b nil nil state) | ||
| 3800 | state-point b) | ||
| 3801 | (if (nth 3 state) ; in string | ||
| 3802 | nil | ||
| 3803 | (put-text-property (1- bb) bb 'syntax-table cperl-st-word)) | ||
| 3804 | (goto-char bb)) | 4816 | (goto-char bb)) |
| 3805 | ;; 1+6+2+1+1+2+1+1=15 extra () before this: | 4817 | ;; 1+6+2+1+1+6+1+1=19 extra () before this: |
| 3806 | ;; "__\\(END\\|DATA\\)__" | 4818 | ;; "__\\(END\\|DATA\\)__" |
| 3807 | ((match-beginning 16) ; __END__, __DATA__ | 4819 | ((match-beginning 20) ; __END__, __DATA__ |
| 3808 | (setq bb (match-end 0) | 4820 | (setq bb (match-end 0)) |
| 3809 | b (match-beginning 0) | 4821 | ;; (put-text-property b (1+ bb) 'syntax-type 'pod) ; Cheat |
| 3810 | state (parse-partial-sexp | 4822 | (cperl-commentify b bb nil) |
| 3811 | state-point b nil nil state) | 4823 | (setq end t)) |
| 3812 | state-point b) | 4824 | ;; "\\\\\\(['`\"($]\\)" |
| 3813 | (if (or (nth 3 state) (nth 4 state)) | 4825 | ((match-beginning 21) |
| 3814 | nil | 4826 | ;; Trailing backslash; make non-quoting outside string/comment |
| 3815 | ;; (put-text-property b (1+ bb) 'syntax-type 'pod) ; Cheat | 4827 | (setq bb (match-end 0)) |
| 3816 | (cperl-commentify b bb nil) | ||
| 3817 | (setq end t)) | ||
| 3818 | (goto-char bb)) | ||
| 3819 | ((match-beginning 17) ; "\\\\\\(['`\"($]\\)" | ||
| 3820 | ;; Trailing backslash ==> non-quoting outside string/comment | ||
| 3821 | (setq bb (match-end 0) | ||
| 3822 | b (match-beginning 0)) | ||
| 3823 | (goto-char b) | 4828 | (goto-char b) |
| 3824 | (skip-chars-backward "\\\\") | 4829 | (skip-chars-backward "\\\\") |
| 3825 | ;;;(setq i2 (= (% (skip-chars-backward "\\\\") 2) -1)) | 4830 | ;;;(setq i2 (= (% (skip-chars-backward "\\\\") 2) -1)) |
| 3826 | (setq state (parse-partial-sexp | 4831 | (cperl-modify-syntax-type b cperl-st-punct) |
| 3827 | state-point b nil nil state) | ||
| 3828 | state-point b) | ||
| 3829 | (if (or (nth 3 state) (nth 4 state) ) | ||
| 3830 | nil | ||
| 3831 | (cperl-modify-syntax-type b cperl-st-punct)) | ||
| 3832 | (goto-char bb)) | 4832 | (goto-char bb)) |
| 3833 | (t (error "Error in regexp of the sniffer"))) | 4833 | (t (error "Error in regexp of the sniffer"))) |
| 3834 | (if (> (point) stop-point) | 4834 | (if (> (point) stop-point) |
| @@ -3839,7 +4839,10 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3839 | (or (car err-l) (setcar err-l b))) | 4839 | (or (car err-l) (setcar err-l b))) |
| 3840 | (goto-char stop-point)))) | 4840 | (goto-char stop-point)))) |
| 3841 | (setq cperl-syntax-state (cons state-point state) | 4841 | (setq cperl-syntax-state (cons state-point state) |
| 3842 | cperl-syntax-done-to (or tmpend (max (point) max)))) | 4842 | ;; Do not mark syntax as done past tmpend??? |
| 4843 | cperl-syntax-done-to (or tmpend (max (point) max))) | ||
| 4844 | ;;(message "state-at=%s, done-to=%s" state-point cperl-syntax-done-to) | ||
| 4845 | ) | ||
| 3843 | (if (car err-l) (goto-char (car err-l)) | 4846 | (if (car err-l) (goto-char (car err-l)) |
| 3844 | (or non-inter | 4847 | (or non-inter |
| 3845 | (message "Scanning for \"hard\" Perl constructions... done")))) | 4848 | (message "Scanning for \"hard\" Perl constructions... done")))) |
| @@ -3851,48 +4854,91 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', | |||
| 3851 | ;; cperl-mode-syntax-table. | 4854 | ;; cperl-mode-syntax-table. |
| 3852 | ;; (set-syntax-table cperl-mode-syntax-table) | 4855 | ;; (set-syntax-table cperl-mode-syntax-table) |
| 3853 | ) | 4856 | ) |
| 3854 | (car err-l))) | 4857 | (list (car err-l) overshoot))) |
| 4858 | |||
| 4859 | (defun cperl-find-pods-heres-region (min max) | ||
| 4860 | (interactive "r") | ||
| 4861 | (cperl-find-pods-heres min max)) | ||
| 3855 | 4862 | ||
| 3856 | (defun cperl-backward-to-noncomment (lim) | 4863 | (defun cperl-backward-to-noncomment (lim) |
| 3857 | ;; Stops at lim or after non-whitespace that is not in comment | 4864 | ;; Stops at lim or after non-whitespace that is not in comment |
| 4865 | ;; XXXX Wrongly understands end-of-multiline strings with # as comment | ||
| 3858 | (let (stop p pr) | 4866 | (let (stop p pr) |
| 3859 | (while (and (not stop) (> (point) (or lim 1))) | 4867 | (while (and (not stop) (> (point) (or lim (point-min)))) |
| 3860 | (skip-chars-backward " \t\n\f" lim) | 4868 | (skip-chars-backward " \t\n\f" lim) |
| 3861 | (setq p (point)) | 4869 | (setq p (point)) |
| 3862 | (beginning-of-line) | 4870 | (beginning-of-line) |
| 3863 | (if (memq (setq pr (get-text-property (point) 'syntax-type)) | 4871 | (if (memq (setq pr (get-text-property (point) 'syntax-type)) |
| 3864 | '(pod here-doc here-doc-delim)) | 4872 | '(pod here-doc here-doc-delim)) |
| 3865 | (cperl-unwind-to-safe nil) | 4873 | (cperl-unwind-to-safe nil) |
| 3866 | (or (looking-at "^[ \t]*\\(#\\|$\\)") | 4874 | (or (and (looking-at "^[ \t]*\\(#\\|$\\)") |
| 3867 | (progn (cperl-to-comment-or-eol) (bolp)) | 4875 | (not (memq pr '(string prestring)))) |
| 3868 | (progn | 4876 | (progn (cperl-to-comment-or-eol) (bolp)) |
| 3869 | (skip-chars-backward " \t") | 4877 | (progn |
| 3870 | (if (< p (point)) (goto-char p)) | 4878 | (skip-chars-backward " \t") |
| 3871 | (setq stop t))))))) | 4879 | (if (< p (point)) (goto-char p)) |
| 4880 | (setq stop t))))))) | ||
| 3872 | 4881 | ||
| 4882 | ;; Used only in `cperl-calculate-indent'... | ||
| 4883 | (defun cperl-block-p () ; Do not C-M-q ! One string contains ";" ! | ||
| 4884 | ;; Positions is before ?\{. Checks whether it starts a block. | ||
| 4885 | ;; No save-excursion! This is more a distinguisher of a block/hash ref... | ||
| 4886 | (cperl-backward-to-noncomment (point-min)) | ||
| 4887 | (or (memq (preceding-char) (append ";){}$@&%\C-@" nil)) ; Or label! \C-@ at bobp | ||
| 4888 | ; Label may be mixed up with `$blah :' | ||
| 4889 | (save-excursion (cperl-after-label)) | ||
| 4890 | (get-text-property (cperl-1- (point)) 'attrib-group) | ||
| 4891 | (and (memq (char-syntax (preceding-char)) '(?w ?_)) | ||
| 4892 | (progn | ||
| 4893 | (backward-sexp) | ||
| 4894 | ;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr' | ||
| 4895 | (or (and (looking-at "[a-zA-Z0-9_:]+[ \t\n\f]*[{#]") ; Method call syntax | ||
| 4896 | (not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\)\\>"))) | ||
| 4897 | ;; sub bless::foo {} | ||
| 4898 | (progn | ||
| 4899 | (cperl-backward-to-noncomment (point-min)) | ||
| 4900 | (and (eq (preceding-char) ?b) | ||
| 4901 | (progn | ||
| 4902 | (forward-sexp -1) | ||
| 4903 | (looking-at "sub[ \t\n\f#]"))))))))) | ||
| 4904 | |||
| 4905 | ;;; What is the difference of (cperl-after-block-p lim t) and (cperl-block-p)? | ||
| 4906 | ;;; No save-excursion; condition-case ... In (cperl-block-p) the block | ||
| 4907 | ;;; may be a part of an in-statement construct, such as | ||
| 4908 | ;;; ${something()}, print {FH} $data. | ||
| 4909 | ;;; Moreover, one takes positive approach (looks for else,grep etc) | ||
| 4910 | ;;; another negative (looks for bless,tr etc) | ||
| 3873 | (defun cperl-after-block-p (lim &optional pre-block) | 4911 | (defun cperl-after-block-p (lim &optional pre-block) |
| 3874 | "Return true if the preceeding } ends a block or a following { starts one. | 4912 | "Return true if the preceeding } (if PRE-BLOCK, following {) delimits a block. |
| 3875 | Would not look before LIM. If PRE-BLOCK is nil checks preceeding }. | 4913 | Would not look before LIM. Assumes that LIM is a good place to begin a |
| 3876 | otherwise following {." | 4914 | statement. The kind of block we treat here is one after which a new |
| 3877 | ;; We suppose that the preceding char is }. | 4915 | statement would start; thus the block in ${func()} does not count." |
| 3878 | (save-excursion | 4916 | (save-excursion |
| 3879 | (condition-case nil | 4917 | (condition-case nil |
| 3880 | (progn | 4918 | (progn |
| 3881 | (or pre-block (forward-sexp -1)) | 4919 | (or pre-block (forward-sexp -1)) |
| 3882 | (cperl-backward-to-noncomment lim) | 4920 | (cperl-backward-to-noncomment lim) |
| 3883 | (or (eq (point) lim) | 4921 | (or (eq (point) lim) |
| 3884 | (eq (preceding-char) ?\) ) ; if () {} sub f () {} | 4922 | ;; if () {} // sub f () {} // sub f :a(') {} |
| 3885 | (if (eq (char-syntax (preceding-char)) ?w) ; else {} | 4923 | (eq (preceding-char) ?\) ) |
| 4924 | ;; label: {} | ||
| 4925 | (save-excursion (cperl-after-label)) | ||
| 4926 | ;; sub :attr {} | ||
| 4927 | (get-text-property (cperl-1- (point)) 'attrib-group) | ||
| 4928 | (if (memq (char-syntax (preceding-char)) '(?w ?_)) ; else {} | ||
| 3886 | (save-excursion | 4929 | (save-excursion |
| 3887 | (forward-sexp -1) | 4930 | (forward-sexp -1) |
| 3888 | (or (looking-at "\\(else\\|continue\\|grep\\|map\\|BEGIN\\|END\\|CHECK\\|INIT\\)\\>") | 4931 | ;; else {} but not else::func {} |
| 4932 | (or (and (looking-at "\\(else\\|continue\\|grep\\|map\\|BEGIN\\|END\\|CHECK\\|INIT\\)\\>") | ||
| 4933 | (not (looking-at "\\(\\sw\\|_\\)+::"))) | ||
| 3889 | ;; sub f {} | 4934 | ;; sub f {} |
| 3890 | (progn | 4935 | (progn |
| 3891 | (cperl-backward-to-noncomment lim) | 4936 | (cperl-backward-to-noncomment lim) |
| 3892 | (and (eq (char-syntax (preceding-char)) ?w) | 4937 | (and (eq (preceding-char) ?b) |
| 3893 | (progn | 4938 | (progn |
| 3894 | (forward-sexp -1) | 4939 | (forward-sexp -1) |
| 3895 | (looking-at "sub\\>")))))) | 4940 | (looking-at "sub[ \t\n\f#]")))))) |
| 4941 | ;; What preceeds is not word... XXXX Last statement in sub??? | ||
| 3896 | (cperl-after-expr-p lim)))) | 4942 | (cperl-after-expr-p lim)))) |
| 3897 | (error nil)))) | 4943 | (error nil)))) |
| 3898 | 4944 | ||
| @@ -3914,12 +4960,12 @@ CHARS is a string that contains good characters to have before us (however, | |||
| 3914 | (if (get-text-property (point) 'here-doc-group) | 4960 | (if (get-text-property (point) 'here-doc-group) |
| 3915 | (progn | 4961 | (progn |
| 3916 | (goto-char | 4962 | (goto-char |
| 3917 | (previous-single-property-change (point) 'here-doc-group)) | 4963 | (cperl-beginning-of-property (point) 'here-doc-group)) |
| 3918 | (beginning-of-line 0))) | 4964 | (beginning-of-line 0))) |
| 3919 | (if (get-text-property (point) 'in-pod) | 4965 | (if (get-text-property (point) 'in-pod) |
| 3920 | (progn | 4966 | (progn |
| 3921 | (goto-char | 4967 | (goto-char |
| 3922 | (previous-single-property-change (point) 'in-pod)) | 4968 | (cperl-beginning-of-property (point) 'in-pod)) |
| 3923 | (beginning-of-line 0))) | 4969 | (beginning-of-line 0))) |
| 3924 | (if (looking-at "^[ \t]*\\(#\\|$\\)") nil ; Only comment, skip | 4970 | (if (looking-at "^[ \t]*\\(#\\|$\\)") nil ; Only comment, skip |
| 3925 | ;; Else: last iteration, or a label | 4971 | ;; Else: last iteration, or a label |
| @@ -3931,7 +4977,7 @@ CHARS is a string that contains good characters to have before us (however, | |||
| 3931 | (progn | 4977 | (progn |
| 3932 | (forward-char -1) | 4978 | (forward-char -1) |
| 3933 | (skip-chars-backward " \t\n\f" lim) | 4979 | (skip-chars-backward " \t\n\f" lim) |
| 3934 | (eq (char-syntax (preceding-char)) ?w))) | 4980 | (memq (char-syntax (preceding-char)) '(?w ?_)))) |
| 3935 | (forward-sexp -1) ; Possibly label. Skip it | 4981 | (forward-sexp -1) ; Possibly label. Skip it |
| 3936 | (goto-char p) | 4982 | (goto-char p) |
| 3937 | (setq stop t)))) | 4983 | (setq stop t)))) |
| @@ -3947,6 +4993,44 @@ CHARS is a string that contains good characters to have before us (however, | |||
| 3947 | (eq (get-text-property (point) 'syntax-type) | 4993 | (eq (get-text-property (point) 'syntax-type) |
| 3948 | 'format))))))))) | 4994 | 'format))))))))) |
| 3949 | 4995 | ||
| 4996 | (defun cperl-backward-to-start-of-expr (&optional lim) | ||
| 4997 | (condition-case nil | ||
| 4998 | (progn | ||
| 4999 | (while (and (or (not lim) | ||
| 5000 | (> (point) lim)) | ||
| 5001 | (not (cperl-after-expr-p lim))) | ||
| 5002 | (forward-sexp -1) | ||
| 5003 | ;; May be after $, @, $# etc of a variable | ||
| 5004 | (skip-chars-backward "$@%#"))) | ||
| 5005 | (error nil))) | ||
| 5006 | |||
| 5007 | (defun cperl-at-end-of-expr (&optional lim) | ||
| 5008 | ;; Since the SEXP approach below is very fragile, do some overengineering | ||
| 5009 | (or (looking-at (concat cperl-maybe-white-and-comment-rex "[;}]")) | ||
| 5010 | (condition-case nil | ||
| 5011 | (save-excursion | ||
| 5012 | ;; If nothing interesting after, does as (forward-sexp -1); | ||
| 5013 | ;; otherwise fails, or ends at a start of following sexp. | ||
| 5014 | ;; XXXX PROBLEMS: if what follows (after ";") @FOO, or ${bar} | ||
| 5015 | ;; may be stuck after @ or $; just put some stupid workaround now: | ||
| 5016 | (let ((p (point))) | ||
| 5017 | (forward-sexp 1) | ||
| 5018 | (forward-sexp -1) | ||
| 5019 | (while (memq (preceding-char) (append "%&@$*" nil)) | ||
| 5020 | (forward-char -1)) | ||
| 5021 | (or (< (point) p) | ||
| 5022 | (cperl-after-expr-p lim)))) | ||
| 5023 | (error t)))) | ||
| 5024 | |||
| 5025 | (defun cperl-forward-to-end-of-expr (&optional lim) | ||
| 5026 | (let ((p (point)))) | ||
| 5027 | (condition-case nil | ||
| 5028 | (progn | ||
| 5029 | (while (and (< (point) (or lim (point-max))) | ||
| 5030 | (not (cperl-at-end-of-expr))) | ||
| 5031 | (forward-sexp 1))) | ||
| 5032 | (error nil))) | ||
| 5033 | |||
| 3950 | (defun cperl-backward-to-start-of-continued-exp (lim) | 5034 | (defun cperl-backward-to-start-of-continued-exp (lim) |
| 3951 | (if (memq (preceding-char) (append ")]}\"'`" nil)) | 5035 | (if (memq (preceding-char) (append ")]}\"'`" nil)) |
| 3952 | (forward-sexp -1)) | 5036 | (forward-sexp -1)) |
| @@ -3987,18 +5071,51 @@ conditional/loop constructs." | |||
| 3987 | (beginning-of-line) | 5071 | (beginning-of-line) |
| 3988 | (while (null done) | 5072 | (while (null done) |
| 3989 | (setq top (point)) | 5073 | (setq top (point)) |
| 3990 | (while (= (nth 0 (parse-partial-sexp (point) tmp-end | 5074 | ;; Plan A: if line has an unfinished paren-group, go to end-of-group |
| 3991 | -1)) -1) | 5075 | (while (= -1 (nth 0 (parse-partial-sexp (point) tmp-end -1))) |
| 3992 | (setq top (point))) ; Get the outermost parenths in line | 5076 | (setq top (point))) ; Get the outermost parenths in line |
| 3993 | (goto-char top) | 5077 | (goto-char top) |
| 3994 | (while (< (point) tmp-end) | 5078 | (while (< (point) tmp-end) |
| 3995 | (parse-partial-sexp (point) tmp-end nil t) ; To start-sexp or eol | 5079 | (parse-partial-sexp (point) tmp-end nil t) ; To start-sexp or eol |
| 3996 | (or (eolp) (forward-sexp 1))) | 5080 | (or (eolp) (forward-sexp 1))) |
| 3997 | (if (> (point) tmp-end) | 5081 | (if (> (point) tmp-end) ; Yes, there an unfinished block |
| 3998 | (save-excursion | 5082 | nil |
| 3999 | (end-of-line) | 5083 | (if (eq ?\) (preceding-char)) |
| 4000 | (setq tmp-end (point))) | 5084 | (progn ;; Plan B: find by REGEXP block followup this line |
| 4001 | (setq done t))) | 5085 | (setq top (point)) |
| 5086 | (condition-case nil | ||
| 5087 | (progn | ||
| 5088 | (forward-sexp -2) | ||
| 5089 | (if (eq (following-char) ?$ ) ; for my $var (list) | ||
| 5090 | (progn | ||
| 5091 | (forward-sexp -1) | ||
| 5092 | (if (looking-at "\\(my\\|local\\|our\\)\\>") | ||
| 5093 | (forward-sexp -1)))) | ||
| 5094 | (if (looking-at | ||
| 5095 | (concat "\\(\\elsif\\|if\\|unless\\|while\\|until" | ||
| 5096 | "\\|for\\(each\\)?\\>\\(\\(" | ||
| 5097 | cperl-maybe-white-and-comment-rex | ||
| 5098 | "\\(my\\|local\\|our\\)\\)?" | ||
| 5099 | cperl-maybe-white-and-comment-rex | ||
| 5100 | "\\$[_a-zA-Z0-9]+\\)?\\)\\>")) | ||
| 5101 | (progn | ||
| 5102 | (goto-char top) | ||
| 5103 | (forward-sexp 1) | ||
| 5104 | (setq top (point))))) | ||
| 5105 | (error (setq done t))) | ||
| 5106 | (goto-char top)) | ||
| 5107 | (if (looking-at ; Try Plan C: continuation block | ||
| 5108 | (concat cperl-maybe-white-and-comment-rex | ||
| 5109 | "\\<\\(else\\|elsif\|continue\\)\\>")) | ||
| 5110 | (progn | ||
| 5111 | (goto-char (match-end 0)) | ||
| 5112 | (save-excursion | ||
| 5113 | (end-of-line) | ||
| 5114 | (setq tmp-end (point)))) | ||
| 5115 | (setq done t)))) | ||
| 5116 | (save-excursion | ||
| 5117 | (end-of-line) | ||
| 5118 | (setq tmp-end (point)))) | ||
| 4002 | (goto-char tmp-end) | 5119 | (goto-char tmp-end) |
| 4003 | (setq tmp-end (point-marker))) | 5120 | (setq tmp-end (point-marker))) |
| 4004 | (if cperl-indent-region-fix-constructs | 5121 | (if cperl-indent-region-fix-constructs |
| @@ -4027,16 +5144,26 @@ Returns some position at the last line." | |||
| 4027 | ;; Looking at: | 5144 | ;; Looking at: |
| 4028 | ;; } | 5145 | ;; } |
| 4029 | ;; else | 5146 | ;; else |
| 4030 | (if (and cperl-merge-trailing-else | 5147 | (if cperl-merge-trailing-else |
| 4031 | (looking-at | 5148 | (if (looking-at |
| 4032 | "[ \t]*}[ \t]*\n[ \t\n]*\\(els\\(e\\|if\\)\\|continue\\)\\>")) | 5149 | "[ \t]*}[ \t]*\n[ \t\n]*\\(els\\(e\\|if\\)\\|continue\\)\\>") |
| 4033 | (progn | 5150 | (progn |
| 4034 | (search-forward "}") | 5151 | (search-forward "}") |
| 4035 | (setq p (point)) | 5152 | (setq p (point)) |
| 4036 | (skip-chars-forward " \t\n") | 5153 | (skip-chars-forward " \t\n") |
| 4037 | (delete-region p (point)) | 5154 | (delete-region p (point)) |
| 4038 | (insert (make-string cperl-indent-region-fix-constructs ?\s)) | 5155 | (insert (make-string cperl-indent-region-fix-constructs ?\s)) |
| 4039 | (beginning-of-line))) | 5156 | (beginning-of-line))) |
| 5157 | (if (looking-at "[ \t]*}[ \t]*\\(els\\(e\\|if\\)\\|continue\\)\\>") | ||
| 5158 | (save-excursion | ||
| 5159 | (search-forward "}") | ||
| 5160 | (delete-horizontal-space) | ||
| 5161 | (insert "\n") | ||
| 5162 | (setq ret (point)) | ||
| 5163 | (if (cperl-indent-line parse-data) | ||
| 5164 | (progn | ||
| 5165 | (cperl-fix-line-spacing end parse-data) | ||
| 5166 | (setq ret (point))))))) | ||
| 4040 | ;; Looking at: | 5167 | ;; Looking at: |
| 4041 | ;; } else | 5168 | ;; } else |
| 4042 | (if (looking-at "[ \t]*}\\(\t*\\|[ \t][ \t]+\\)\\<\\(els\\(e\\|if\\)\\|continue\\)\\>") | 5169 | (if (looking-at "[ \t]*}\\(\t*\\|[ \t][ \t]+\\)\\<\\(els\\(e\\|if\\)\\|continue\\)\\>") |
| @@ -4073,19 +5200,19 @@ Returns some position at the last line." | |||
| 4073 | (insert | 5200 | (insert |
| 4074 | (make-string cperl-indent-region-fix-constructs ?\s)) | 5201 | (make-string cperl-indent-region-fix-constructs ?\s)) |
| 4075 | (beginning-of-line))) | 5202 | (beginning-of-line))) |
| 4076 | ;; Looking at: | 5203 | ;; Looking at (with or without "}" at start, ending after "({"): |
| 4077 | ;; } foreach my $var () { | 5204 | ;; } foreach my $var () OR { |
| 4078 | (if (looking-at | 5205 | (if (looking-at |
| 4079 | "[ \t]*\\(}[ \t]*\\)?\\<\\(\\els\\(e\\|if\\)\\|continue\\|if\\|unless\\|while\\|for\\(each\\)?\\(\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\$[_a-zA-Z0-9]+\\)?\\|until\\)\\>\\([ \t]*(\\|[ \t\n]*{\\)\\|[ \t]*{") | 5206 | "[ \t]*\\(}[ \t]*\\)?\\<\\(\\els\\(e\\|if\\)\\|continue\\|if\\|unless\\|while\\|for\\(each\\)?\\(\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\$[_a-zA-Z0-9]+\\)?\\|until\\)\\>\\([ \t]*(\\|[ \t\n]*{\\)\\|[ \t]*{") |
| 4080 | (progn | 5207 | (progn |
| 4081 | (setq ml (match-beginning 8)) | 5208 | (setq ml (match-beginning 8)) ; "(" or "{" after control word |
| 4082 | (re-search-forward "[({]") | 5209 | (re-search-forward "[({]") |
| 4083 | (forward-char -1) | 5210 | (forward-char -1) |
| 4084 | (setq p (point)) | 5211 | (setq p (point)) |
| 4085 | (if (eq (following-char) ?\( ) | 5212 | (if (eq (following-char) ?\( ) |
| 4086 | (progn | 5213 | (progn |
| 4087 | (forward-sexp 1) | 5214 | (forward-sexp 1) |
| 4088 | (setq pp (point))) | 5215 | (setq pp (point))) ; past parenth-group |
| 4089 | ;; after `else' or nothing | 5216 | ;; after `else' or nothing |
| 4090 | (if ml ; after `else' | 5217 | (if ml ; after `else' |
| 4091 | (skip-chars-backward " \t\n") | 5218 | (skip-chars-backward " \t\n") |
| @@ -4095,13 +5222,13 @@ Returns some position at the last line." | |||
| 4095 | ;; Multiline expr should be special | 5222 | ;; Multiline expr should be special |
| 4096 | (setq ml (and pp (save-excursion (goto-char p) | 5223 | (setq ml (and pp (save-excursion (goto-char p) |
| 4097 | (search-forward "\n" pp t)))) | 5224 | (search-forward "\n" pp t)))) |
| 4098 | (if (and (or (not pp) (< pp end)) | 5225 | (if (and (or (not pp) (< pp end)) ; Do not go too far... |
| 4099 | (looking-at "[ \t\n]*{")) | 5226 | (looking-at "[ \t\n]*{")) |
| 4100 | (progn | 5227 | (progn |
| 4101 | (cond | 5228 | (cond |
| 4102 | ((bolp) ; Were before `{', no if/else/etc | 5229 | ((bolp) ; Were before `{', no if/else/etc |
| 4103 | nil) | 5230 | nil) |
| 4104 | ((looking-at "\\(\t*\\| [ \t]+\\){") | 5231 | ((looking-at "\\(\t*\\| [ \t]+\\){") ; Not exactly 1 SPACE |
| 4105 | (delete-horizontal-space) | 5232 | (delete-horizontal-space) |
| 4106 | (if (if ml | 5233 | (if (if ml |
| 4107 | cperl-extra-newline-before-brace-multiline | 5234 | cperl-extra-newline-before-brace-multiline |
| @@ -4124,7 +5251,17 @@ Returns some position at the last line." | |||
| 4124 | (skip-chars-forward " \t\n") | 5251 | (skip-chars-forward " \t\n") |
| 4125 | (delete-region pp (point)) | 5252 | (delete-region pp (point)) |
| 4126 | (insert | 5253 | (insert |
| 4127 | (make-string cperl-indent-region-fix-constructs ?\s)))) | 5254 | (make-string cperl-indent-region-fix-constructs ?\ ))) |
| 5255 | ((and (looking-at "[\t ]*{") | ||
| 5256 | (if ml cperl-extra-newline-before-brace-multiline | ||
| 5257 | cperl-extra-newline-before-brace)) | ||
| 5258 | (delete-horizontal-space) | ||
| 5259 | (insert "\n") | ||
| 5260 | (setq ret (point)) | ||
| 5261 | (if (cperl-indent-line parse-data) | ||
| 5262 | (progn | ||
| 5263 | (cperl-fix-line-spacing end parse-data) | ||
| 5264 | (setq ret (point)))))) | ||
| 4128 | ;; Now we are before `{' | 5265 | ;; Now we are before `{' |
| 4129 | (if (looking-at "[ \t\n]*{[ \t]*[^ \t\n#]") | 5266 | (if (looking-at "[ \t\n]*{[ \t]*[^ \t\n#]") |
| 4130 | (progn | 5267 | (progn |
| @@ -4276,7 +5413,7 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4276 | ;; (interactive "P") ; Only works when called from fill-paragraph. -stef | 5413 | ;; (interactive "P") ; Only works when called from fill-paragraph. -stef |
| 4277 | (let (;; Non-nil if the current line contains a comment. | 5414 | (let (;; Non-nil if the current line contains a comment. |
| 4278 | has-comment | 5415 | has-comment |
| 4279 | 5416 | fill-paragraph-function ; do not recurse | |
| 4280 | ;; If has-comment, the appropriate fill-prefix for the comment. | 5417 | ;; If has-comment, the appropriate fill-prefix for the comment. |
| 4281 | comment-fill-prefix | 5418 | comment-fill-prefix |
| 4282 | ;; Line that contains code and comment (or nil) | 5419 | ;; Line that contains code and comment (or nil) |
| @@ -4308,7 +5445,7 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4308 | dc (- c (current-column)) len (- start (point)) | 5445 | dc (- c (current-column)) len (- start (point)) |
| 4309 | start (point-marker)) | 5446 | start (point-marker)) |
| 4310 | (delete-char len) | 5447 | (delete-char len) |
| 4311 | (insert (make-string dc ?-))))) | 5448 | (insert (make-string dc ?-))))) ; Placeholder (to avoid splitting???) |
| 4312 | (if (not has-comment) | 5449 | (if (not has-comment) |
| 4313 | (fill-paragraph justify) ; Do the usual thing outside of comment | 5450 | (fill-paragraph justify) ; Do the usual thing outside of comment |
| 4314 | ;; Narrow to include only the comment, and then fill the region. | 5451 | ;; Narrow to include only the comment, and then fill the region. |
| @@ -4330,11 +5467,16 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4330 | (point))) | 5467 | (point))) |
| 4331 | ;; Remove existing hashes | 5468 | ;; Remove existing hashes |
| 4332 | (save-excursion | 5469 | (save-excursion |
| 4333 | (goto-char (point-min)) | 5470 | (goto-char (point-min)) |
| 4334 | (while (progn (forward-line 1) (< (point) (point-max))) | 5471 | (while (progn (forward-line 1) (< (point) (point-max))) |
| 4335 | (skip-chars-forward " \t") | 5472 | (skip-chars-forward " \t") |
| 4336 | (and (looking-at "#+") | 5473 | (if (looking-at "#+") |
| 4337 | (delete-char (- (match-end 0) (match-beginning 0)))))) | 5474 | (progn |
| 5475 | (if (and (eq (point) (match-beginning 0)) | ||
| 5476 | (not (eq (point) (match-end 0)))) nil | ||
| 5477 | (error | ||
| 5478 | "Bug in Emacs: `looking-at' in `narrow-to-region': match-data is garbage")) | ||
| 5479 | (delete-char (- (match-end 0) (match-beginning 0))))))) | ||
| 4338 | 5480 | ||
| 4339 | ;; Lines with only hashes on them can be paragraph boundaries. | 5481 | ;; Lines with only hashes on them can be paragraph boundaries. |
| 4340 | (let ((paragraph-start (concat paragraph-start "\\|^[ \t#]*$")) | 5482 | (let ((paragraph-start (concat paragraph-start "\\|^[ \t#]*$")) |
| @@ -4350,7 +5492,8 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4350 | (setq comment-column c) | 5492 | (setq comment-column c) |
| 4351 | (indent-for-comment) | 5493 | (indent-for-comment) |
| 4352 | ;; Repeat once more, flagging as iteration | 5494 | ;; Repeat once more, flagging as iteration |
| 4353 | (cperl-fill-paragraph justify t))))))) | 5495 | (cperl-fill-paragraph justify t)))))) |
| 5496 | t) | ||
| 4354 | 5497 | ||
| 4355 | (defun cperl-do-auto-fill () | 5498 | (defun cperl-do-auto-fill () |
| 4356 | ;; Break out if the line is short enough | 5499 | ;; Break out if the line is short enough |
| @@ -4401,8 +5544,8 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4401 | (let ((index-alist '()) (index-pack-alist '()) (index-pod-alist '()) | 5544 | (let ((index-alist '()) (index-pack-alist '()) (index-pod-alist '()) |
| 4402 | (index-unsorted-alist '()) (i-s-f (default-value 'imenu-sort-function)) | 5545 | (index-unsorted-alist '()) (i-s-f (default-value 'imenu-sort-function)) |
| 4403 | (index-meth-alist '()) meth | 5546 | (index-meth-alist '()) meth |
| 4404 | packages ends-ranges p marker | 5547 | packages ends-ranges p marker is-proto |
| 4405 | (prev-pos 0) char fchar index index1 name (end-range 0) package) | 5548 | (prev-pos 0) is-pack index index1 name (end-range 0) package) |
| 4406 | (goto-char (point-min)) | 5549 | (goto-char (point-min)) |
| 4407 | (cperl-update-syntaxification (point-max) (point-max)) | 5550 | (cperl-update-syntaxification (point-max) (point-max)) |
| 4408 | ;; Search for the function | 5551 | ;; Search for the function |
| @@ -4410,72 +5553,81 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4410 | (while (re-search-forward | 5553 | (while (re-search-forward |
| 4411 | (or regexp cperl-imenu--function-name-regexp-perl) | 5554 | (or regexp cperl-imenu--function-name-regexp-perl) |
| 4412 | nil t) | 5555 | nil t) |
| 5556 | ;; 2=package-group, 5=package-name 8=sub-name | ||
| 4413 | (cond | 5557 | (cond |
| 4414 | ((and ; Skip some noise if building tags | 5558 | ((and ; Skip some noise if building tags |
| 4415 | (match-beginning 2) ; package or sub | 5559 | (match-beginning 5) ; package name |
| 4416 | (eq (char-after (match-beginning 2)) ?p) ; package | 5560 | ;;(eq (char-after (match-beginning 2)) ?p) ; package |
| 4417 | (not (save-match-data | 5561 | (not (save-match-data |
| 4418 | (looking-at "[ \t\n]*;")))) ; Plain text word 'package' | 5562 | (looking-at "[ \t\n]*;")))) ; Plain text word 'package' |
| 4419 | nil) | 5563 | nil) |
| 4420 | ((and | 5564 | ((and |
| 4421 | (match-beginning 2) ; package or sub | 5565 | (or (match-beginning 2) |
| 5566 | (match-beginning 8)) ; package or sub | ||
| 4422 | ;; Skip if quoted (will not skip multi-line ''-strings :-(): | 5567 | ;; Skip if quoted (will not skip multi-line ''-strings :-(): |
| 4423 | (null (get-text-property (match-beginning 1) 'syntax-table)) | 5568 | (null (get-text-property (match-beginning 1) 'syntax-table)) |
| 4424 | (null (get-text-property (match-beginning 1) 'syntax-type)) | 5569 | (null (get-text-property (match-beginning 1) 'syntax-type)) |
| 4425 | (null (get-text-property (match-beginning 1) 'in-pod))) | 5570 | (null (get-text-property (match-beginning 1) 'in-pod))) |
| 4426 | (save-excursion | 5571 | (setq is-pack (match-beginning 2)) |
| 4427 | (goto-char (match-beginning 2)) | ||
| 4428 | (setq fchar (following-char))) | ||
| 4429 | ;; (if (looking-at "([^()]*)[ \t\n\f]*") | 5572 | ;; (if (looking-at "([^()]*)[ \t\n\f]*") |
| 4430 | ;; (goto-char (match-end 0))) ; Messes what follows | 5573 | ;; (goto-char (match-end 0))) ; Messes what follows |
| 4431 | (setq char (following-char) ; ?\; for "sub foo () ;" | 5574 | (setq meth nil |
| 4432 | meth nil | ||
| 4433 | p (point)) | 5575 | p (point)) |
| 4434 | (while (and ends-ranges (>= p (car ends-ranges))) | 5576 | (while (and ends-ranges (>= p (car ends-ranges))) |
| 4435 | ;; delete obsolete entries | 5577 | ;; delete obsolete entries |
| 4436 | (setq ends-ranges (cdr ends-ranges) packages (cdr packages))) | 5578 | (setq ends-ranges (cdr ends-ranges) packages (cdr packages))) |
| 4437 | (setq package (or (car packages) "") | 5579 | (setq package (or (car packages) "") |
| 4438 | end-range (or (car ends-ranges) 0)) | 5580 | end-range (or (car ends-ranges) 0)) |
| 4439 | (if (eq fchar ?p) | 5581 | (if is-pack ; doing "package" |
| 4440 | (setq name (buffer-substring (match-beginning 3) (match-end 3)) | 5582 | (progn |
| 4441 | name (progn | 5583 | (if (match-beginning 5) ; named package |
| 4442 | (set-text-properties 0 (length name) nil name) | 5584 | (setq name (buffer-substring (match-beginning 5) |
| 4443 | name) | 5585 | (match-end 5)) |
| 4444 | package (concat name "::") | 5586 | name (progn |
| 4445 | name (concat "package " name) | 5587 | (set-text-properties 0 (length name) nil name) |
| 4446 | end-range | 5588 | name) |
| 4447 | (save-excursion | 5589 | package (concat name "::") |
| 4448 | (parse-partial-sexp (point) (point-max) -1) (point)) | 5590 | name (concat "package " name)) |
| 4449 | ends-ranges (cons end-range ends-ranges) | 5591 | ;; Support nameless packages |
| 4450 | packages (cons package packages))) | 5592 | (setq name "package;" package "")) |
| 4451 | ;; ) | 5593 | (setq end-range |
| 5594 | (save-excursion | ||
| 5595 | (parse-partial-sexp (point) (point-max) -1) (point)) | ||
| 5596 | ends-ranges (cons end-range ends-ranges) | ||
| 5597 | packages (cons package packages))) | ||
| 5598 | (setq is-proto | ||
| 5599 | (or (eq (following-char) ?\;) | ||
| 5600 | (eq 0 (get-text-property (point) 'attrib-group))))) | ||
| 4452 | ;; Skip this function name if it is a prototype declaration. | 5601 | ;; Skip this function name if it is a prototype declaration. |
| 4453 | (if (and (eq fchar ?s) (eq char ?\;)) nil | 5602 | (if (and is-proto (not is-pack)) nil |
| 4454 | (setq name (buffer-substring (match-beginning 3) (match-end 3)) | 5603 | (or is-pack |
| 4455 | marker (make-marker)) | 5604 | (setq name |
| 4456 | (set-text-properties 0 (length name) nil name) | 5605 | (buffer-substring (match-beginning 8) (match-end 8))) |
| 4457 | (set-marker marker (match-end 3)) | 5606 | (set-text-properties 0 (length name) nil name)) |
| 4458 | (if (eq fchar ?p) | 5607 | (setq marker (make-marker)) |
| 4459 | (setq name (concat "package " name)) | 5608 | (set-marker marker (match-end (if is-pack 2 8))) |
| 4460 | (cond ((string-match "[:']" name) | 5609 | (cond (is-pack nil) |
| 4461 | (setq meth t)) | 5610 | ((string-match "[:']" name) |
| 4462 | ((> p end-range) nil) | 5611 | (setq meth t)) |
| 4463 | (t | 5612 | ((> p end-range) nil) |
| 4464 | (setq name (concat package name) meth t)))) | 5613 | (t |
| 5614 | (setq name (concat package name) meth t))) | ||
| 4465 | (setq index (cons name marker)) | 5615 | (setq index (cons name marker)) |
| 4466 | (if (eq fchar ?p) | 5616 | (if is-pack |
| 4467 | (push index index-pack-alist) | 5617 | (push index index-pack-alist) |
| 4468 | (push index index-alist)) | 5618 | (push index index-alist)) |
| 4469 | (if meth (push index index-meth-alist)) | 5619 | (if meth (push index index-meth-alist)) |
| 4470 | (push index index-unsorted-alist))) | 5620 | (push index index-unsorted-alist))) |
| 4471 | ((match-beginning 5) ; POD section | 5621 | ((match-beginning 16) ; POD section |
| 4472 | ;; (beginning-of-line) | 5622 | (setq name (buffer-substring (match-beginning 17) (match-end 17)) |
| 4473 | (setq index (imenu-example--name-and-position) | 5623 | marker (make-marker)) |
| 4474 | name (buffer-substring (match-beginning 6) (match-end 6))) | 5624 | (set-marker marker (match-beginning 17)) |
| 4475 | (set-text-properties 0 (length name) nil name) | 5625 | (set-text-properties 0 (length name) nil name) |
| 4476 | (if (eq (char-after (match-beginning 5)) ?2) | 5626 | (setq name (concat (make-string |
| 4477 | (setq name (concat " " name))) | 5627 | (* 3 (- (char-after (match-beginning 16)) ?1)) |
| 4478 | (setcar index name) | 5628 | ?\ ) |
| 5629 | name) | ||
| 5630 | index (cons name marker)) | ||
| 4479 | (setq index1 (cons (concat "=" name) (cdr index))) | 5631 | (setq index1 (cons (concat "=" name) (cdr index))) |
| 4480 | (push index index-pod-alist) | 5632 | (push index index-pod-alist) |
| 4481 | (push index1 index-unsorted-alist))))) | 5633 | (push index1 index-unsorted-alist))))) |
| @@ -4539,29 +5691,20 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4539 | (defun cperl-outline-level () | 5691 | (defun cperl-outline-level () |
| 4540 | (looking-at outline-regexp) | 5692 | (looking-at outline-regexp) |
| 4541 | (cond ((not (match-beginning 1)) 0) ; beginning-of-file | 5693 | (cond ((not (match-beginning 1)) 0) ; beginning-of-file |
| 4542 | ((match-beginning 2) | 5694 | ;;;; 2=package-group, 5=package-name 8=sub-name 16=head-level |
| 4543 | (if (eq (char-after (match-beginning 2)) ?p) | 5695 | ((match-beginning 2) 0) ; package |
| 4544 | 0 ; package | 5696 | ((match-beginning 8) 1) ; sub |
| 4545 | 1)) ; sub | 5697 | ((match-beginning 16) |
| 4546 | ((match-beginning 5) | 5698 | (- (char-after (match-beginning 16)) ?0)) ; headN ==> N |
| 4547 | (if (eq (char-after (match-beginning 5)) ?1) | 5699 | (t 5))) ; should not happen |
| 4548 | 1 ; head1 | ||
| 4549 | 2)) ; head2 | ||
| 4550 | (t 3))) ; should not happen | ||
| 4551 | 5700 | ||
| 4552 | 5701 | ||
| 4553 | (defvar cperl-compilation-error-regexp-alist | 5702 | (defvar cperl-compilation-error-regexp-alist |
| 4554 | ;; This look like a paranoiac regexp: could anybody find a better one? (which WORK). | 5703 | ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). |
| 4555 | '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" | 5704 | '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" |
| 4556 | 2 3)) | 5705 | 2 3)) |
| 4557 | "Alist that specifies how to match errors in perl output.") | 5706 | "Alist that specifies how to match errors in perl output.") |
| 4558 | 5707 | ||
| 4559 | (if (fboundp 'eval-after-load) | ||
| 4560 | (eval-after-load | ||
| 4561 | "mode-compile" | ||
| 4562 | '(setq perl-compilation-error-regexp-alist | ||
| 4563 | cperl-compilation-error-regexp-alist))) | ||
| 4564 | |||
| 4565 | 5708 | ||
| 4566 | (defun cperl-windowed-init () | 5709 | (defun cperl-windowed-init () |
| 4567 | "Initialization under windowed version." | 5710 | "Initialization under windowed version." |
| @@ -4602,9 +5745,12 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4602 | ;; Allow `cperl-find-pods-heres' to run. | 5745 | ;; Allow `cperl-find-pods-heres' to run. |
| 4603 | (or (boundp 'font-lock-constant-face) | 5746 | (or (boundp 'font-lock-constant-face) |
| 4604 | (cperl-force-face font-lock-constant-face | 5747 | (cperl-force-face font-lock-constant-face |
| 4605 | "Face for constant and label names") | 5748 | "Face for constant and label names")) |
| 4606 | ;;(setq font-lock-constant-face 'font-lock-constant-face) | 5749 | (or (boundp 'font-lock-warning-face) |
| 4607 | )) | 5750 | (cperl-force-face font-lock-warning-face |
| 5751 | "Face for things which should stand out")) | ||
| 5752 | ;;(setq font-lock-constant-face 'font-lock-constant-face) | ||
| 5753 | ) | ||
| 4608 | 5754 | ||
| 4609 | (defun cperl-init-faces () | 5755 | (defun cperl-init-faces () |
| 4610 | (condition-case errs | 5756 | (condition-case errs |
| @@ -4627,7 +5773,7 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4627 | 'identity | 5773 | 'identity |
| 4628 | '("if" "until" "while" "elsif" "else" "unless" "for" | 5774 | '("if" "until" "while" "elsif" "else" "unless" "for" |
| 4629 | "foreach" "continue" "exit" "die" "last" "goto" "next" | 5775 | "foreach" "continue" "exit" "die" "last" "goto" "next" |
| 4630 | "redo" "return" "local" "exec" "sub" "do" "dump" "use" | 5776 | "redo" "return" "local" "exec" "sub" "do" "dump" "use" "our" |
| 4631 | "require" "package" "eval" "my" "BEGIN" "END" "CHECK" "INIT") | 5777 | "require" "package" "eval" "my" "BEGIN" "END" "CHECK" "INIT") |
| 4632 | "\\|") ; Flow control | 5778 | "\\|") ; Flow control |
| 4633 | "\\)\\>") 2) ; was "\\)[ \n\t;():,\|&]" | 5779 | "\\)\\>") 2) ; was "\\)[ \n\t;():,\|&]" |
| @@ -4711,7 +5857,7 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4711 | ;; "chop" "defined" "delete" "do" "each" "else" "elsif" | 5857 | ;; "chop" "defined" "delete" "do" "each" "else" "elsif" |
| 4712 | ;; "eval" "exists" "for" "foreach" "format" "goto" | 5858 | ;; "eval" "exists" "for" "foreach" "format" "goto" |
| 4713 | ;; "grep" "if" "keys" "last" "local" "map" "my" "next" | 5859 | ;; "grep" "if" "keys" "last" "local" "map" "my" "next" |
| 4714 | ;; "no" "package" "pop" "pos" "print" "printf" "push" | 5860 | ;; "no" "our" "package" "pop" "pos" "print" "printf" "push" |
| 4715 | ;; "q" "qq" "qw" "qx" "redo" "return" "scalar" "shift" | 5861 | ;; "q" "qq" "qw" "qx" "redo" "return" "scalar" "shift" |
| 4716 | ;; "sort" "splice" "split" "study" "sub" "tie" "tr" | 5862 | ;; "sort" "splice" "split" "study" "sub" "tie" "tr" |
| 4717 | ;; "undef" "unless" "unshift" "untie" "until" "use" | 5863 | ;; "undef" "unless" "unshift" "untie" "until" "use" |
| @@ -4726,15 +5872,38 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4726 | "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" | 5872 | "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" |
| 4727 | "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually | 5873 | "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually |
| 4728 | "\\|[sm]" ; Added manually | 5874 | "\\|[sm]" ; Added manually |
| 4729 | "\\)\\>") 2 'cperl-nonoverridable) | 5875 | "\\)\\>") 2 'cperl-nonoverridable-face) |
| 4730 | ;; (mapconcat 'identity | 5876 | ;; (mapconcat 'identity |
| 4731 | ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" | 5877 | ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" |
| 4732 | ;; "#include" "#define" "#undef") | 5878 | ;; "#include" "#define" "#undef") |
| 4733 | ;; "\\|") | 5879 | ;; "\\|") |
| 4734 | '("-[rwxoRWXOezsfdlpSbctugkTBMAC]\\>\\([ \t]+_\\>\\)?" 0 | 5880 | '("-[rwxoRWXOezsfdlpSbctugkTBMAC]\\>\\([ \t]+_\\>\\)?" 0 |
| 4735 | font-lock-function-name-face keep) ; Not very good, triggers at "[a-z]" | 5881 | font-lock-function-name-face keep) ; Not very good, triggers at "[a-z]" |
| 4736 | '("\\<sub[ \t]+\\([^ \t{;()]+\\)[ \t]*\\(([^()]*)[ \t]*\\)?[#{\n]" 1 | 5882 | ;; This highlights declarations and definitions differenty. |
| 4737 | font-lock-function-name-face) | 5883 | ;; We do not try to highlight in the case of attributes: |
| 5884 | ;; it is already done by `cperl-find-pods-heres' | ||
| 5885 | (list (concat "\\<sub" | ||
| 5886 | cperl-white-and-comment-rex ; whitespace/comments | ||
| 5887 | "\\([^ \n\t{;()]+\\)" ; 2=name (assume non-anonymous) | ||
| 5888 | "\\(" | ||
| 5889 | cperl-maybe-white-and-comment-rex ;whitespace/comments? | ||
| 5890 | "([^()]*)\\)?" ; prototype | ||
| 5891 | cperl-maybe-white-and-comment-rex ; whitespace/comments? | ||
| 5892 | "[{;]") | ||
| 5893 | 2 (if cperl-font-lock-multiline | ||
| 5894 | '(if (eq (char-after (cperl-1- (match-end 0))) ?\{ ) | ||
| 5895 | 'font-lock-function-name-face | ||
| 5896 | 'font-lock-variable-name-face) | ||
| 5897 | ;; need to manually set 'multiline' for older font-locks | ||
| 5898 | '(progn | ||
| 5899 | (if (< 1 (count-lines (match-beginning 0) | ||
| 5900 | (match-end 0))) | ||
| 5901 | (put-text-property | ||
| 5902 | (+ 3 (match-beginning 0)) (match-end 0) | ||
| 5903 | 'syntax-type 'multiline)) | ||
| 5904 | (if (eq (char-after (cperl-1- (match-end 0))) ?\{ ) | ||
| 5905 | 'font-lock-function-name-face | ||
| 5906 | 'font-lock-variable-name-face)))) | ||
| 4738 | '("\\<\\(package\\|require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B; | 5907 | '("\\<\\(package\\|require\\|use\\|import\\|no\\|bootstrap\\)[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t;]" ; require A if B; |
| 4739 | 2 font-lock-function-name-face) | 5908 | 2 font-lock-function-name-face) |
| 4740 | '("^[ \t]*format[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t]*=[ \t]*$" | 5909 | '("^[ \t]*format[ \t]+\\([a-zA-z_][a-zA-z_0-9:]*\\)[ \t]*=[ \t]*$" |
| @@ -4770,12 +5939,56 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4770 | (2 '(restart 2 nil) nil t))) | 5939 | (2 '(restart 2 nil) nil t))) |
| 4771 | nil t))) ; local variables, multiple | 5940 | nil t))) ; local variables, multiple |
| 4772 | (font-lock-anchored | 5941 | (font-lock-anchored |
| 4773 | '("^[ \t{}]*\\(my\\|local\\|our\\)[ \t]*\\(([ \t]*\\)?\\([$@%*][a-zA-Z0-9_:]+\\)" | 5942 | ;; 1=my_etc, 2=white? 3=(+white? 4=white? 5=var |
| 4774 | (3 font-lock-variable-name-face) | 5943 | (` ((, (concat "\\<\\(my\\|local\\|our\\)" |
| 4775 | ("\\=[ \t]*,[ \t]*\\([$@%*][a-zA-Z0-9_:]+\\)" | 5944 | cperl-maybe-white-and-comment-rex |
| 4776 | nil nil | 5945 | "\\((" |
| 4777 | (1 font-lock-variable-name-face)))) | 5946 | cperl-maybe-white-and-comment-rex |
| 4778 | (t '("^[ \t{}]*\\(my\\|local\\our\\)[ \t]*\\(([ \t]*\\)?\\([$@%*][a-zA-Z0-9_:]+\\)" | 5947 | "\\)?\\([$@%*]\\([a-zA-Z0-9_:]+\\|[^a-zA-Z0-9_]\\)\\)")) |
| 5948 | (5 (, (if cperl-font-lock-multiline | ||
| 5949 | 'font-lock-variable-name-face | ||
| 5950 | '(progn (setq cperl-font-lock-multiline-start | ||
| 5951 | (match-beginning 0)) | ||
| 5952 | 'font-lock-variable-name-face)))) | ||
| 5953 | ((, (concat "\\=" | ||
| 5954 | cperl-maybe-white-and-comment-rex | ||
| 5955 | "," | ||
| 5956 | cperl-maybe-white-and-comment-rex | ||
| 5957 | "\\([$@%*]\\([a-zA-Z0-9_:]+\\|[^a-zA-Z0-9_]\\)\\)")) | ||
| 5958 | ;; Bug in font-lock: limit is used not only to limit | ||
| 5959 | ;; searches, but to set the "extend window for | ||
| 5960 | ;; facification" property. Thus we need to minimize. | ||
| 5961 | (, (if cperl-font-lock-multiline | ||
| 5962 | '(if (match-beginning 3) | ||
| 5963 | (save-excursion | ||
| 5964 | (goto-char (match-beginning 3)) | ||
| 5965 | (condition-case nil | ||
| 5966 | (forward-sexp 1) | ||
| 5967 | (error | ||
| 5968 | (condition-case nil | ||
| 5969 | (forward-char 200) | ||
| 5970 | (error nil)))) ; typeahead | ||
| 5971 | (1- (point))) ; report limit | ||
| 5972 | (forward-char -2)) ; disable continued expr | ||
| 5973 | '(if (match-beginning 3) | ||
| 5974 | (point-max) ; No limit for continuation | ||
| 5975 | (forward-char -2)))) ; disable continued expr | ||
| 5976 | (, (if cperl-font-lock-multiline | ||
| 5977 | nil | ||
| 5978 | '(progn ; Do at end | ||
| 5979 | ;; "my" may be already fontified (POD), | ||
| 5980 | ;; so cperl-font-lock-multiline-start is nil | ||
| 5981 | (if (or (not cperl-font-lock-multiline-start) | ||
| 5982 | (> 2 (count-lines | ||
| 5983 | cperl-font-lock-multiline-start | ||
| 5984 | (point)))) | ||
| 5985 | nil | ||
| 5986 | (put-text-property | ||
| 5987 | (1+ cperl-font-lock-multiline-start) (point) | ||
| 5988 | 'syntax-type 'multiline)) | ||
| 5989 | (setq cperl-font-lock-multiline-start nil)))) | ||
| 5990 | (3 font-lock-variable-name-face))))) | ||
| 5991 | (t '("^[ \t{}]*\\(my\\|local\\|our\\)[ \t]*\\(([ \t]*\\)?\\([$@%*][a-zA-Z0-9_:]+\\)" | ||
| 4779 | 3 font-lock-variable-name-face))) | 5992 | 3 font-lock-variable-name-face))) |
| 4780 | '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*(" | 5993 | '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*(" |
| 4781 | 4 font-lock-variable-name-face) | 5994 | 4 font-lock-variable-name-face) |
| @@ -4785,21 +5998,32 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4785 | (setq | 5998 | (setq |
| 4786 | t-font-lock-keywords-1 | 5999 | t-font-lock-keywords-1 |
| 4787 | (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock | 6000 | (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock |
| 4788 | (not cperl-xemacs-p) ; not yet as of XEmacs 19.12 | 6001 | ;; not yet as of XEmacs 19.12, works with 21.1.11 |
| 6002 | (or | ||
| 6003 | (not cperl-xemacs-p) | ||
| 6004 | (string< "21.1.9" emacs-version) | ||
| 6005 | (and (string< "21.1.10" emacs-version) | ||
| 6006 | (string< emacs-version "21.1.2"))) | ||
| 4789 | '( | 6007 | '( |
| 4790 | ("\\(\\([@%]\\|\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1 | 6008 | ("\\(\\([@%]\\|\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1 |
| 4791 | (if (eq (char-after (match-beginning 2)) ?%) | 6009 | (if (eq (char-after (match-beginning 2)) ?%) |
| 4792 | 'cperl-hash | 6010 | 'cperl-hash-face |
| 4793 | 'cperl-array) | 6011 | 'cperl-array-face) |
| 4794 | t) ; arrays and hashes | 6012 | t) ; arrays and hashes |
| 4795 | ("\\(\\([$@]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)" | 6013 | ("\\(\\([$@]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)" |
| 4796 | 1 | 6014 | 1 |
| 4797 | (if (= (- (match-end 2) (match-beginning 2)) 1) | 6015 | (if (= (- (match-end 2) (match-beginning 2)) 1) |
| 4798 | (if (eq (char-after (match-beginning 3)) ?{) | 6016 | (if (eq (char-after (match-beginning 3)) ?{) |
| 4799 | 'cperl-hash | 6017 | 'cperl-hash-face |
| 4800 | 'cperl-array) ; arrays and hashes | 6018 | 'cperl-array-face) ; arrays and hashes |
| 4801 | font-lock-variable-name-face) ; Just to put something | 6019 | font-lock-variable-name-face) ; Just to put something |
| 4802 | t) | 6020 | t) |
| 6021 | ("\\(@\\|\\$#\\)\\(\\$+\\([a-zA-Z_:][a-zA-Z0-9_:]*\\|[^ \t\n]\\)\\)" | ||
| 6022 | (1 cperl-array-face) | ||
| 6023 | (2 font-lock-variable-name-face)) | ||
| 6024 | ("\\(%\\)\\(\\$+\\([a-zA-Z_:][a-zA-Z0-9_:]*\\|[^ \t\n]\\)\\)" | ||
| 6025 | (1 cperl-hash-face) | ||
| 6026 | (2 font-lock-variable-name-face)) | ||
| 4803 | ;;("\\([smy]\\|tr\\)\\([^a-z_A-Z0-9]\\)\\(\\([^\n\\]*||\\)\\)\\2") | 6027 | ;;("\\([smy]\\|tr\\)\\([^a-z_A-Z0-9]\\)\\(\\([^\n\\]*||\\)\\)\\2") |
| 4804 | ;;; Too much noise from \s* @s[ and friends | 6028 | ;;; Too much noise from \s* @s[ and friends |
| 4805 | ;;("\\(\\<\\([msy]\\|tr\\)[ \t]*\\([^ \t\na-zA-Z0-9_]\\)\\|\\(/\\)\\)" | 6029 | ;;("\\(\\<\\([msy]\\|tr\\)[ \t]*\\([^ \t\na-zA-Z0-9_]\\)\\|\\(/\\)\\)" |
| @@ -4811,7 +6035,7 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4811 | (if cperl-highlight-variables-indiscriminately | 6035 | (if cperl-highlight-variables-indiscriminately |
| 4812 | (setq t-font-lock-keywords-1 | 6036 | (setq t-font-lock-keywords-1 |
| 4813 | (append t-font-lock-keywords-1 | 6037 | (append t-font-lock-keywords-1 |
| 4814 | (list '("[$*]{?\\(\\sw+\\)" 1 | 6038 | (list '("\\([$*]{?\\sw+\\)" 1 |
| 4815 | font-lock-variable-name-face))))) | 6039 | font-lock-variable-name-face))))) |
| 4816 | (setq cperl-font-lock-keywords-1 | 6040 | (setq cperl-font-lock-keywords-1 |
| 4817 | (if cperl-syntaxify-by-font-lock | 6041 | (if cperl-syntaxify-by-font-lock |
| @@ -4864,27 +6088,35 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4864 | [nil nil t t t] | 6088 | [nil nil t t t] |
| 4865 | nil | 6089 | nil |
| 4866 | [nil nil t t t]) | 6090 | [nil nil t t t]) |
| 6091 | (list 'font-lock-warning-face | ||
| 6092 | ["Pink" "Red" "Gray50" "LightGray"] | ||
| 6093 | ["gray20" "gray90" | ||
| 6094 | "gray80" "gray20"] | ||
| 6095 | [nil nil t t t] | ||
| 6096 | nil | ||
| 6097 | [nil nil t t t] | ||
| 6098 | ) | ||
| 4867 | (list 'font-lock-constant-face | 6099 | (list 'font-lock-constant-face |
| 4868 | ["CadetBlue" "Aquamarine" "Gray50" "LightGray"] | 6100 | ["CadetBlue" "Aquamarine" "Gray50" "LightGray"] |
| 4869 | nil | 6101 | nil |
| 4870 | [nil nil t t t] | 6102 | [nil nil t t t] |
| 4871 | nil | 6103 | nil |
| 4872 | [nil nil t t t]) | 6104 | [nil nil t t t]) |
| 4873 | (list 'cperl-nonoverridable | 6105 | (list 'cperl-nonoverridable-face |
| 4874 | ["chartreuse3" ("orchid1" "orange") | 6106 | ["chartreuse3" ("orchid1" "orange") |
| 4875 | nil "Gray80"] | 6107 | nil "Gray80"] |
| 4876 | [nil nil "gray90"] | 6108 | [nil nil "gray90"] |
| 4877 | [nil nil nil t t] | 6109 | [nil nil nil t t] |
| 4878 | [nil nil t t] | 6110 | [nil nil t t] |
| 4879 | [nil nil t t t]) | 6111 | [nil nil t t t]) |
| 4880 | (list 'cperl-array | 6112 | (list 'cperl-array-face |
| 4881 | ["blue" "yellow" nil "Gray80"] | 6113 | ["blue" "yellow" nil "Gray80"] |
| 4882 | ["lightyellow2" ("navy" "os2blue" "darkgreen") | 6114 | ["lightyellow2" ("navy" "os2blue" "darkgreen") |
| 4883 | "gray90"] | 6115 | "gray90"] |
| 4884 | t | 6116 | t |
| 4885 | nil | 6117 | nil |
| 4886 | nil) | 6118 | nil) |
| 4887 | (list 'cperl-hash | 6119 | (list 'cperl-hash-face |
| 4888 | ["red" "red" nil "Gray80"] | 6120 | ["red" "red" nil "Gray80"] |
| 4889 | ["lightyellow2" ("navy" "os2blue" "darkgreen") | 6121 | ["lightyellow2" ("navy" "os2blue" "darkgreen") |
| 4890 | "gray90"] | 6122 | "gray90"] |
| @@ -4907,15 +6139,17 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4907 | "Face for variable names") | 6139 | "Face for variable names") |
| 4908 | (cperl-force-face font-lock-type-face | 6140 | (cperl-force-face font-lock-type-face |
| 4909 | "Face for data types") | 6141 | "Face for data types") |
| 4910 | (cperl-force-face cperl-nonoverridable | 6142 | (cperl-force-face cperl-nonoverridable-face |
| 4911 | "Face for data types from another group") | 6143 | "Face for data types from another group") |
| 6144 | (cperl-force-face font-lock-warning-face | ||
| 6145 | "Face for things which should stand out") | ||
| 4912 | (cperl-force-face font-lock-comment-face | 6146 | (cperl-force-face font-lock-comment-face |
| 4913 | "Face for comments") | 6147 | "Face for comments") |
| 4914 | (cperl-force-face font-lock-function-name-face | 6148 | (cperl-force-face font-lock-function-name-face |
| 4915 | "Face for function names") | 6149 | "Face for function names") |
| 4916 | (cperl-force-face cperl-hash | 6150 | (cperl-force-face cperl-hash-face |
| 4917 | "Face for hashes") | 6151 | "Face for hashes") |
| 4918 | (cperl-force-face cperl-array | 6152 | (cperl-force-face cperl-array-face |
| 4919 | "Face for arrays") | 6153 | "Face for arrays") |
| 4920 | ;;(defvar font-lock-constant-face 'font-lock-constant-face) | 6154 | ;;(defvar font-lock-constant-face 'font-lock-constant-face) |
| 4921 | ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face) | 6155 | ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face) |
| @@ -4925,7 +6159,7 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4925 | ;; "Face to use for data types.")) | 6159 | ;; "Face to use for data types.")) |
| 4926 | ;;(or (boundp 'cperl-nonoverridable-face) | 6160 | ;;(or (boundp 'cperl-nonoverridable-face) |
| 4927 | ;; (defconst cperl-nonoverridable-face | 6161 | ;; (defconst cperl-nonoverridable-face |
| 4928 | ;; 'cperl-nonoverridable | 6162 | ;; 'cperl-nonoverridable-face |
| 4929 | ;; "Face to use for data types from another group.")) | 6163 | ;; "Face to use for data types from another group.")) |
| 4930 | ;;(if (not cperl-xemacs-p) nil | 6164 | ;;(if (not cperl-xemacs-p) nil |
| 4931 | ;; (or (boundp 'font-lock-comment-face) | 6165 | ;; (or (boundp 'font-lock-comment-face) |
| @@ -4941,24 +6175,24 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4941 | ;; 'font-lock-function-name-face | 6175 | ;; 'font-lock-function-name-face |
| 4942 | ;; "Face to use for function names."))) | 6176 | ;; "Face to use for function names."))) |
| 4943 | (if (and | 6177 | (if (and |
| 4944 | (not (cperl-is-face 'cperl-array)) | 6178 | (not (cperl-is-face 'cperl-array-face)) |
| 4945 | (cperl-is-face 'font-lock-emphasized-face)) | 6179 | (cperl-is-face 'font-lock-emphasized-face)) |
| 4946 | (copy-face 'font-lock-emphasized-face 'cperl-array)) | 6180 | (copy-face 'font-lock-emphasized-face 'cperl-array-face)) |
| 4947 | (if (and | 6181 | (if (and |
| 4948 | (not (cperl-is-face 'cperl-hash)) | 6182 | (not (cperl-is-face 'cperl-hash-face)) |
| 4949 | (cperl-is-face 'font-lock-other-emphasized-face)) | 6183 | (cperl-is-face 'font-lock-other-emphasized-face)) |
| 4950 | (copy-face 'font-lock-other-emphasized-face 'cperl-hash)) | 6184 | (copy-face 'font-lock-other-emphasized-face 'cperl-hash-face)) |
| 4951 | (if (and | 6185 | (if (and |
| 4952 | (not (cperl-is-face 'cperl-nonoverridable)) | 6186 | (not (cperl-is-face 'cperl-nonoverridable-face)) |
| 4953 | (cperl-is-face 'font-lock-other-type-face)) | 6187 | (cperl-is-face 'font-lock-other-type-face)) |
| 4954 | (copy-face 'font-lock-other-type-face 'cperl-nonoverridable)) | 6188 | (copy-face 'font-lock-other-type-face 'cperl-nonoverridable-face)) |
| 4955 | ;;(or (boundp 'cperl-hash-face) | 6189 | ;;(or (boundp 'cperl-hash-face) |
| 4956 | ;; (defconst cperl-hash-face | 6190 | ;; (defconst cperl-hash-face |
| 4957 | ;; 'cperl-hash | 6191 | ;; 'cperl-hash-face |
| 4958 | ;; "Face to use for hashes.")) | 6192 | ;; "Face to use for hashes.")) |
| 4959 | ;;(or (boundp 'cperl-array-face) | 6193 | ;;(or (boundp 'cperl-array-face) |
| 4960 | ;; (defconst cperl-array-face | 6194 | ;; (defconst cperl-array-face |
| 4961 | ;; 'cperl-array | 6195 | ;; 'cperl-array-face |
| 4962 | ;; "Face to use for arrays.")) | 6196 | ;; "Face to use for arrays.")) |
| 4963 | ;; Here we try to guess background | 6197 | ;; Here we try to guess background |
| 4964 | (let ((background | 6198 | (let ((background |
| @@ -4997,17 +6231,17 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 4997 | "pink"))) | 6231 | "pink"))) |
| 4998 | (t | 6232 | (t |
| 4999 | (set-face-background 'font-lock-type-face "gray90")))) | 6233 | (set-face-background 'font-lock-type-face "gray90")))) |
| 5000 | (if (cperl-is-face 'cperl-nonoverridable) | 6234 | (if (cperl-is-face 'cperl-nonoverridable-face) |
| 5001 | nil | 6235 | nil |
| 5002 | (copy-face 'font-lock-type-face 'cperl-nonoverridable) | 6236 | (copy-face 'font-lock-type-face 'cperl-nonoverridable-face) |
| 5003 | (cond | 6237 | (cond |
| 5004 | ((eq background 'light) | 6238 | ((eq background 'light) |
| 5005 | (set-face-foreground 'cperl-nonoverridable | 6239 | (set-face-foreground 'cperl-nonoverridable-face |
| 5006 | (if (x-color-defined-p "chartreuse3") | 6240 | (if (x-color-defined-p "chartreuse3") |
| 5007 | "chartreuse3" | 6241 | "chartreuse3" |
| 5008 | "chartreuse"))) | 6242 | "chartreuse"))) |
| 5009 | ((eq background 'dark) | 6243 | ((eq background 'dark) |
| 5010 | (set-face-foreground 'cperl-nonoverridable | 6244 | (set-face-foreground 'cperl-nonoverridable-face |
| 5011 | (if (x-color-defined-p "orchid1") | 6245 | (if (x-color-defined-p "orchid1") |
| 5012 | "orchid1" | 6246 | "orchid1" |
| 5013 | "orange"))))) | 6247 | "orange"))))) |
| @@ -5059,15 +6293,15 @@ indentation and initial hashes. Behaves usually outside of comment." | |||
| 5059 | '(setq ps-bold-faces | 6293 | '(setq ps-bold-faces |
| 5060 | ;; font-lock-variable-name-face | 6294 | ;; font-lock-variable-name-face |
| 5061 | ;; font-lock-constant-face | 6295 | ;; font-lock-constant-face |
| 5062 | (append '(cperl-array cperl-hash) | 6296 | (append '(cperl-array-face cperl-hash-face) |
| 5063 | ps-bold-faces) | 6297 | ps-bold-faces) |
| 5064 | ps-italic-faces | 6298 | ps-italic-faces |
| 5065 | ;; font-lock-constant-face | 6299 | ;; font-lock-constant-face |
| 5066 | (append '(cperl-nonoverridable cperl-hash) | 6300 | (append '(cperl-nonoverridable-face cperl-hash-face) |
| 5067 | ps-italic-faces) | 6301 | ps-italic-faces) |
| 5068 | ps-underlined-faces | 6302 | ps-underlined-faces |
| 5069 | ;; font-lock-type-face | 6303 | ;; font-lock-type-face |
| 5070 | (append '(cperl-array cperl-hash underline cperl-nonoverridable) | 6304 | (append '(cperl-array-face cperl-hash-face underline cperl-nonoverridable-face) |
| 5071 | ps-underlined-faces)))) | 6305 | ps-underlined-faces)))) |
| 5072 | 6306 | ||
| 5073 | (defvar ps-print-face-extension-alist) | 6307 | (defvar ps-print-face-extension-alist) |
| @@ -5100,27 +6334,27 @@ Style of printout regulated by the variable `cperl-ps-print-face-properties'." | |||
| 5100 | ;;; (defvar ps-italic-faces nil) | 6334 | ;;; (defvar ps-italic-faces nil) |
| 5101 | ;;; (setq ps-bold-faces | 6335 | ;;; (setq ps-bold-faces |
| 5102 | ;;; (append '(font-lock-emphasized-face | 6336 | ;;; (append '(font-lock-emphasized-face |
| 5103 | ;;; cperl-array | 6337 | ;;; cperl-array-face |
| 5104 | ;;; font-lock-keyword-face | 6338 | ;;; font-lock-keyword-face |
| 5105 | ;;; font-lock-variable-name-face | 6339 | ;;; font-lock-variable-name-face |
| 5106 | ;;; font-lock-constant-face | 6340 | ;;; font-lock-constant-face |
| 5107 | ;;; font-lock-reference-face | 6341 | ;;; font-lock-reference-face |
| 5108 | ;;; font-lock-other-emphasized-face | 6342 | ;;; font-lock-other-emphasized-face |
| 5109 | ;;; cperl-hash) | 6343 | ;;; cperl-hash-face) |
| 5110 | ;;; ps-bold-faces)) | 6344 | ;;; ps-bold-faces)) |
| 5111 | ;;; (setq ps-italic-faces | 6345 | ;;; (setq ps-italic-faces |
| 5112 | ;;; (append '(cperl-nonoverridable | 6346 | ;;; (append '(cperl-nonoverridable-face |
| 5113 | ;;; font-lock-constant-face | 6347 | ;;; font-lock-constant-face |
| 5114 | ;;; font-lock-reference-face | 6348 | ;;; font-lock-reference-face |
| 5115 | ;;; font-lock-other-emphasized-face | 6349 | ;;; font-lock-other-emphasized-face |
| 5116 | ;;; cperl-hash) | 6350 | ;;; cperl-hash-face) |
| 5117 | ;;; ps-italic-faces)) | 6351 | ;;; ps-italic-faces)) |
| 5118 | ;;; (setq ps-underlined-faces | 6352 | ;;; (setq ps-underlined-faces |
| 5119 | ;;; (append '(font-lock-emphasized-face | 6353 | ;;; (append '(font-lock-emphasized-face |
| 5120 | ;;; cperl-array | 6354 | ;;; cperl-array-face |
| 5121 | ;;; font-lock-other-emphasized-face | 6355 | ;;; font-lock-other-emphasized-face |
| 5122 | ;;; cperl-hash | 6356 | ;;; cperl-hash-face |
| 5123 | ;;; cperl-nonoverridable font-lock-type-face) | 6357 | ;;; cperl-nonoverridable-face font-lock-type-face) |
| 5124 | ;;; ps-underlined-faces)) | 6358 | ;;; ps-underlined-faces)) |
| 5125 | ;;; (cons 'font-lock-type-face ps-underlined-faces)) | 6359 | ;;; (cons 'font-lock-type-face ps-underlined-faces)) |
| 5126 | 6360 | ||
| @@ -5130,79 +6364,211 @@ Style of printout regulated by the variable `cperl-ps-print-face-properties'." | |||
| 5130 | (defconst cperl-styles-entries | 6364 | (defconst cperl-styles-entries |
| 5131 | '(cperl-indent-level cperl-brace-offset cperl-continued-brace-offset | 6365 | '(cperl-indent-level cperl-brace-offset cperl-continued-brace-offset |
| 5132 | cperl-label-offset cperl-extra-newline-before-brace | 6366 | cperl-label-offset cperl-extra-newline-before-brace |
| 6367 | cperl-extra-newline-before-brace-multiline | ||
| 5133 | cperl-merge-trailing-else | 6368 | cperl-merge-trailing-else |
| 5134 | cperl-continued-statement-offset)) | 6369 | cperl-continued-statement-offset)) |
| 5135 | 6370 | ||
| 6371 | (defconst cperl-style-examples | ||
| 6372 | "##### Numbers etc are: cperl-indent-level cperl-brace-offset | ||
| 6373 | ##### cperl-continued-brace-offset cperl-label-offset | ||
| 6374 | ##### cperl-continued-statement-offset | ||
| 6375 | ##### cperl-merge-trailing-else cperl-extra-newline-before-brace | ||
| 6376 | |||
| 6377 | ########### (Do not forget cperl-extra-newline-before-brace-multiline) | ||
| 6378 | |||
| 6379 | ### CPerl (=GNU - extra-newline-before-brace + merge-trailing-else) 2/0/0/-2/2/t/nil | ||
| 6380 | if (foo) { | ||
| 6381 | bar | ||
| 6382 | baz; | ||
| 6383 | label: | ||
| 6384 | { | ||
| 6385 | boon; | ||
| 6386 | } | ||
| 6387 | } else { | ||
| 6388 | stop; | ||
| 6389 | } | ||
| 6390 | |||
| 6391 | ### PerlStyle (=CPerl with 4 as indent) 4/0/0/-4/4/t/nil | ||
| 6392 | if (foo) { | ||
| 6393 | bar | ||
| 6394 | baz; | ||
| 6395 | label: | ||
| 6396 | { | ||
| 6397 | boon; | ||
| 6398 | } | ||
| 6399 | } else { | ||
| 6400 | stop; | ||
| 6401 | } | ||
| 6402 | |||
| 6403 | ### GNU 2/0/0/-2/2/nil/t | ||
| 6404 | if (foo) | ||
| 6405 | { | ||
| 6406 | bar | ||
| 6407 | baz; | ||
| 6408 | label: | ||
| 6409 | { | ||
| 6410 | boon; | ||
| 6411 | } | ||
| 6412 | } | ||
| 6413 | else | ||
| 6414 | { | ||
| 6415 | stop; | ||
| 6416 | } | ||
| 6417 | |||
| 6418 | ### C++ (=PerlStyle with braces aligned with control words) 4/0/-4/-4/4/nil/t | ||
| 6419 | if (foo) | ||
| 6420 | { | ||
| 6421 | bar | ||
| 6422 | baz; | ||
| 6423 | label: | ||
| 6424 | { | ||
| 6425 | boon; | ||
| 6426 | } | ||
| 6427 | } | ||
| 6428 | else | ||
| 6429 | { | ||
| 6430 | stop; | ||
| 6431 | } | ||
| 6432 | |||
| 6433 | ### BSD (=C++, but will not change preexisting merge-trailing-else | ||
| 6434 | ### and extra-newline-before-brace ) 4/0/-4/-4/4 | ||
| 6435 | if (foo) | ||
| 6436 | { | ||
| 6437 | bar | ||
| 6438 | baz; | ||
| 6439 | label: | ||
| 6440 | { | ||
| 6441 | boon; | ||
| 6442 | } | ||
| 6443 | } | ||
| 6444 | else | ||
| 6445 | { | ||
| 6446 | stop; | ||
| 6447 | } | ||
| 6448 | |||
| 6449 | ### K&R (=C++ with indent 5 - merge-trailing-else, but will not | ||
| 6450 | ### change preexisting extra-newline-before-brace) 5/0/-5/-5/5/nil | ||
| 6451 | if (foo) | ||
| 6452 | { | ||
| 6453 | bar | ||
| 6454 | baz; | ||
| 6455 | label: | ||
| 6456 | { | ||
| 6457 | boon; | ||
| 6458 | } | ||
| 6459 | } | ||
| 6460 | else | ||
| 6461 | { | ||
| 6462 | stop; | ||
| 6463 | } | ||
| 6464 | |||
| 6465 | ### Whitesmith (=PerlStyle, but will not change preexisting | ||
| 6466 | ### extra-newline-before-brace and merge-trailing-else) 4/0/0/-4/4 | ||
| 6467 | if (foo) | ||
| 6468 | { | ||
| 6469 | bar | ||
| 6470 | baz; | ||
| 6471 | label: | ||
| 6472 | { | ||
| 6473 | boon; | ||
| 6474 | } | ||
| 6475 | } | ||
| 6476 | else | ||
| 6477 | { | ||
| 6478 | stop; | ||
| 6479 | } | ||
| 6480 | " | ||
| 6481 | "Examples of if/else with different indent styles (with v4.23).") | ||
| 6482 | |||
| 5136 | (defconst cperl-style-alist | 6483 | (defconst cperl-style-alist |
| 5137 | '(("CPerl" ; =GNU without extra-newline-before-brace | 6484 | '(("CPerl" ;; =GNU - extra-newline-before-brace + cperl-merge-trailing-else |
| 5138 | (cperl-indent-level . 2) | 6485 | (cperl-indent-level . 2) |
| 5139 | (cperl-brace-offset . 0) | 6486 | (cperl-brace-offset . 0) |
| 5140 | (cperl-continued-brace-offset . 0) | 6487 | (cperl-continued-brace-offset . 0) |
| 5141 | (cperl-label-offset . -2) | 6488 | (cperl-label-offset . -2) |
| 6489 | (cperl-continued-statement-offset . 2) | ||
| 5142 | (cperl-extra-newline-before-brace . nil) | 6490 | (cperl-extra-newline-before-brace . nil) |
| 5143 | (cperl-merge-trailing-else . t) | 6491 | (cperl-extra-newline-before-brace-multiline . nil) |
| 5144 | (cperl-continued-statement-offset . 2)) | 6492 | (cperl-merge-trailing-else . t)) |
| 6493 | |||
| 5145 | ("PerlStyle" ; CPerl with 4 as indent | 6494 | ("PerlStyle" ; CPerl with 4 as indent |
| 5146 | (cperl-indent-level . 4) | 6495 | (cperl-indent-level . 4) |
| 5147 | (cperl-brace-offset . 0) | 6496 | (cperl-brace-offset . 0) |
| 5148 | (cperl-continued-brace-offset . 0) | 6497 | (cperl-continued-brace-offset . 0) |
| 5149 | (cperl-label-offset . -4) | 6498 | (cperl-label-offset . -4) |
| 6499 | (cperl-continued-statement-offset . 4) | ||
| 5150 | (cperl-extra-newline-before-brace . nil) | 6500 | (cperl-extra-newline-before-brace . nil) |
| 5151 | (cperl-merge-trailing-else . t) | 6501 | (cperl-extra-newline-before-brace-multiline . nil) |
| 5152 | (cperl-continued-statement-offset . 4)) | 6502 | (cperl-merge-trailing-else . t)) |
| 6503 | |||
| 5153 | ("GNU" | 6504 | ("GNU" |
| 5154 | (cperl-indent-level . 2) | 6505 | (cperl-indent-level . 2) |
| 5155 | (cperl-brace-offset . 0) | 6506 | (cperl-brace-offset . 0) |
| 5156 | (cperl-continued-brace-offset . 0) | 6507 | (cperl-continued-brace-offset . 0) |
| 5157 | (cperl-label-offset . -2) | 6508 | (cperl-label-offset . -2) |
| 6509 | (cperl-continued-statement-offset . 2) | ||
| 5158 | (cperl-extra-newline-before-brace . t) | 6510 | (cperl-extra-newline-before-brace . t) |
| 5159 | (cperl-merge-trailing-else . nil) | 6511 | (cperl-extra-newline-before-brace-multiline . t) |
| 5160 | (cperl-continued-statement-offset . 2)) | 6512 | (cperl-merge-trailing-else . nil)) |
| 6513 | |||
| 5161 | ("K&R" | 6514 | ("K&R" |
| 5162 | (cperl-indent-level . 5) | 6515 | (cperl-indent-level . 5) |
| 5163 | (cperl-brace-offset . 0) | 6516 | (cperl-brace-offset . 0) |
| 5164 | (cperl-continued-brace-offset . -5) | 6517 | (cperl-continued-brace-offset . -5) |
| 5165 | (cperl-label-offset . -5) | 6518 | (cperl-label-offset . -5) |
| 6519 | (cperl-continued-statement-offset . 5) | ||
| 5166 | ;;(cperl-extra-newline-before-brace . nil) ; ??? | 6520 | ;;(cperl-extra-newline-before-brace . nil) ; ??? |
| 5167 | (cperl-merge-trailing-else . nil) | 6521 | ;;(cperl-extra-newline-before-brace-multiline . nil) |
| 5168 | (cperl-continued-statement-offset . 5)) | 6522 | (cperl-merge-trailing-else . nil)) |
| 6523 | |||
| 5169 | ("BSD" | 6524 | ("BSD" |
| 5170 | (cperl-indent-level . 4) | 6525 | (cperl-indent-level . 4) |
| 5171 | (cperl-brace-offset . 0) | 6526 | (cperl-brace-offset . 0) |
| 5172 | (cperl-continued-brace-offset . -4) | 6527 | (cperl-continued-brace-offset . -4) |
| 5173 | (cperl-label-offset . -4) | 6528 | (cperl-label-offset . -4) |
| 6529 | (cperl-continued-statement-offset . 4) | ||
| 5174 | ;;(cperl-extra-newline-before-brace . nil) ; ??? | 6530 | ;;(cperl-extra-newline-before-brace . nil) ; ??? |
| 5175 | (cperl-continued-statement-offset . 4)) | 6531 | ;;(cperl-extra-newline-before-brace-multiline . nil) |
| 6532 | ;;(cperl-merge-trailing-else . nil) ; ??? | ||
| 6533 | ) | ||
| 6534 | |||
| 5176 | ("C++" | 6535 | ("C++" |
| 5177 | (cperl-indent-level . 4) | 6536 | (cperl-indent-level . 4) |
| 5178 | (cperl-brace-offset . 0) | 6537 | (cperl-brace-offset . 0) |
| 5179 | (cperl-continued-brace-offset . -4) | 6538 | (cperl-continued-brace-offset . -4) |
| 5180 | (cperl-label-offset . -4) | 6539 | (cperl-label-offset . -4) |
| 5181 | (cperl-continued-statement-offset . 4) | 6540 | (cperl-continued-statement-offset . 4) |
| 5182 | (cperl-merge-trailing-else . nil) | 6541 | (cperl-extra-newline-before-brace . t) |
| 5183 | (cperl-extra-newline-before-brace . t)) | 6542 | (cperl-extra-newline-before-brace-multiline . t) |
| 5184 | ("Current") | 6543 | (cperl-merge-trailing-else . nil)) |
| 6544 | |||
| 5185 | ("Whitesmith" | 6545 | ("Whitesmith" |
| 5186 | (cperl-indent-level . 4) | 6546 | (cperl-indent-level . 4) |
| 5187 | (cperl-brace-offset . 0) | 6547 | (cperl-brace-offset . 0) |
| 5188 | (cperl-continued-brace-offset . 0) | 6548 | (cperl-continued-brace-offset . 0) |
| 5189 | (cperl-label-offset . -4) | 6549 | (cperl-label-offset . -4) |
| 6550 | (cperl-continued-statement-offset . 4) | ||
| 5190 | ;;(cperl-extra-newline-before-brace . nil) ; ??? | 6551 | ;;(cperl-extra-newline-before-brace . nil) ; ??? |
| 5191 | (cperl-continued-statement-offset . 4))) | 6552 | ;;(cperl-extra-newline-before-brace-multiline . nil) |
| 5192 | "(Experimental) list of variables to set to get a particular indentation style. | 6553 | ;;(cperl-merge-trailing-else . nil) ; ??? |
| 5193 | Should be used via `cperl-set-style' or via Perl menu.") | 6554 | ) |
| 6555 | ("Current")) | ||
| 6556 | "List of variables to set to get a particular indentation style. | ||
| 6557 | Should be used via `cperl-set-style' or via Perl menu. | ||
| 6558 | |||
| 6559 | See examples in `cperl-style-examples'.") | ||
| 5194 | 6560 | ||
| 5195 | (defun cperl-set-style (style) | 6561 | (defun cperl-set-style (style) |
| 5196 | "Set CPerl mode variables to use one of several different indentation styles. | 6562 | "Set CPerl mode variables to use one of several different indentation styles. |
| 5197 | The arguments are a string representing the desired style. | 6563 | The arguments are a string representing the desired style. |
| 5198 | The list of styles is in `cperl-style-alist', available styles | 6564 | The list of styles is in `cperl-style-alist', available styles |
| 5199 | are GNU, K&R, BSD, C++ and Whitesmith. | 6565 | are CPerl, PerlStyle, GNU, K&R, BSD, C++ and Whitesmith. |
| 5200 | 6566 | ||
| 5201 | The current value of style is memorized (unless there is a memorized | 6567 | The current value of style is memorized (unless there is a memorized |
| 5202 | data already), may be restored by `cperl-set-style-back'. | 6568 | data already), may be restored by `cperl-set-style-back'. |
| 5203 | 6569 | ||
| 5204 | Chosing \"Current\" style will not change style, so this may be used for | 6570 | Chosing \"Current\" style will not change style, so this may be used for |
| 5205 | side-effect of memorizing only." | 6571 | side-effect of memorizing only. Examples in `cperl-style-examples'." |
| 5206 | (interactive | 6572 | (interactive |
| 5207 | (let ((list (mapcar (function (lambda (elt) (list (car elt)))) | 6573 | (let ((list (mapcar (function (lambda (elt) (list (car elt)))) |
| 5208 | cperl-style-alist))) | 6574 | cperl-style-alist))) |
| @@ -5373,6 +6739,8 @@ Customized by setting variables `cperl-shrink-wrap-info-frame', | |||
| 5373 | (match-beginning 1) (match-end 1))) | 6739 | (match-beginning 1) (match-end 1))) |
| 5374 | 6740 | ||
| 5375 | (defun cperl-imenu-on-info () | 6741 | (defun cperl-imenu-on-info () |
| 6742 | "Shows imenu for Perl Info Buffer. | ||
| 6743 | Opens Perl Info buffer if needed." | ||
| 5376 | (interactive) | 6744 | (interactive) |
| 5377 | (let* ((buffer (current-buffer)) | 6745 | (let* ((buffer (current-buffer)) |
| 5378 | imenu-create-index-function | 6746 | imenu-create-index-function |
| @@ -5412,7 +6780,7 @@ If STEP is nil, `cperl-lineup-step' will be used | |||
| 5412 | \(or `cperl-indent-level', if `cperl-lineup-step' is nil). | 6780 | \(or `cperl-indent-level', if `cperl-lineup-step' is nil). |
| 5413 | Will not move the position at the start to the left." | 6781 | Will not move the position at the start to the left." |
| 5414 | (interactive "r") | 6782 | (interactive "r") |
| 5415 | (let (search col tcol seen b e) | 6783 | (let (search col tcol seen b) |
| 5416 | (save-excursion | 6784 | (save-excursion |
| 5417 | (goto-char end) | 6785 | (goto-char end) |
| 5418 | (end-of-line) | 6786 | (end-of-line) |
| @@ -5450,22 +6818,25 @@ Will not move the position at the start to the left." | |||
| 5450 | (if (/= (% col step) 0) (setq step (* step (1+ (/ col step))))) | 6818 | (if (/= (% col step) 0) (setq step (* step (1+ (/ col step))))) |
| 5451 | (while | 6819 | (while |
| 5452 | (progn | 6820 | (progn |
| 5453 | (setq e (point)) | 6821 | (cperl-make-indent col) |
| 5454 | (skip-chars-backward " \t") | ||
| 5455 | (delete-region (point) e) | ||
| 5456 | (indent-to-column col) ;(make-string (- col (current-column)) ?\s)) | ||
| 5457 | (beginning-of-line 2) | 6822 | (beginning-of-line 2) |
| 5458 | (and (< (point) end) | 6823 | (and (< (point) end) |
| 5459 | (re-search-forward search end t) | 6824 | (re-search-forward search end t) |
| 5460 | (goto-char (match-beginning 0)))))))) ; No body | 6825 | (goto-char (match-beginning 0)))))))) ; No body |
| 5461 | 6826 | ||
| 5462 | (defun cperl-etags (&optional add all files) | 6827 | (defun cperl-etags (&optional add all files) ;; NOT USED??? |
| 5463 | "Run etags with appropriate options for Perl files. | 6828 | "Run etags with appropriate options for Perl files. |
| 5464 | If optional argument ALL is `recursive', will process Perl files | 6829 | If optional argument ALL is `recursive', will process Perl files |
| 5465 | in subdirectories too." | 6830 | in subdirectories too." |
| 5466 | (interactive) | 6831 | (interactive) |
| 5467 | (let ((cmd "etags") | 6832 | (let ((cmd "etags") |
| 5468 | (args '("-l" "none" "-r" "/\\<\\(package\\|sub\\)[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)[ \\t]*\\(([^()]*)[ \t]*\\)?\\([{#]\\|$\\)\\)/\\4/")) | 6833 | (args '("-l" "none" "-r" |
| 6834 | ;; 1=fullname 2=package? 3=name 4=proto? 5=attrs? (VERY APPROX!) | ||
| 6835 | "/\\<sub[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\(([^()]*)[ \t]*\\)?\\([ \t]*:[^#{;]*\\)?\\([{#]\\|$\\)/\\3/" | ||
| 6836 | "-r" | ||
| 6837 | "/\\<package[ \\t]+\\(\\([a-zA-Z0-9:_]*::\\)?\\([a-zA-Z0-9_]+\\)\\)[ \\t]*\\([#;]\\|$\\)/\\1/" | ||
| 6838 | "-r" | ||
| 6839 | "/\\<\\(package\\)[ \\t]*;/\\1;/")) | ||
| 5469 | res) | 6840 | res) |
| 5470 | (if add (setq args (cons "-a" args))) | 6841 | (if add (setq args (cons "-a" args))) |
| 5471 | (or files (setq files (list buffer-file-name))) | 6842 | (or files (setq files (list buffer-file-name))) |
| @@ -5537,6 +6908,29 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." | |||
| 5537 | (message "indent-region/indent-sexp will %sbe automatically fix whitespace." | 6908 | (message "indent-region/indent-sexp will %sbe automatically fix whitespace." |
| 5538 | (if cperl-indent-region-fix-constructs "" "not "))) | 6909 | (if cperl-indent-region-fix-constructs "" "not "))) |
| 5539 | 6910 | ||
| 6911 | (defun cperl-toggle-set-debug-unwind (arg &optional backtrace) | ||
| 6912 | "Toggle (or, with numeric argument, set) debugging state of syntaxification. | ||
| 6913 | Nonpositive numeric argument disables debugging messages. The message | ||
| 6914 | summarizes which regions it was decided to rescan for syntactic constructs. | ||
| 6915 | |||
| 6916 | The message looks like this: | ||
| 6917 | |||
| 6918 | Syxify req=123..138 actual=101..146 done-to: 112=>146 statepos: 73=>117 | ||
| 6919 | |||
| 6920 | Numbers are character positions in the buffer. REQ provides the range to | ||
| 6921 | rescan requested by `font-lock'. ACTUAL is the range actually resyntaxified; | ||
| 6922 | for correct operation it should start and end outside any special syntactic | ||
| 6923 | construct. DONE-TO and STATEPOS indicate changes to internal caches maintained | ||
| 6924 | by CPerl." | ||
| 6925 | (interactive "P") | ||
| 6926 | (or arg | ||
| 6927 | (setq arg (if (eq cperl-syntaxify-by-font-lock | ||
| 6928 | (if backtrace 'backtrace 'message)) 0 1))) | ||
| 6929 | (setq arg (if (> arg 0) (if backtrace 'backtrace 'message) t)) | ||
| 6930 | (setq cperl-syntaxify-by-font-lock arg) | ||
| 6931 | (message "Debugging messages of syntax unwind %sabled." | ||
| 6932 | (if (eq arg t) "dis" "en"))) | ||
| 6933 | |||
| 5540 | ;;;; Tags file creation. | 6934 | ;;;; Tags file creation. |
| 5541 | 6935 | ||
| 5542 | (defvar cperl-tmp-buffer " *cperl-tmp*") | 6936 | (defvar cperl-tmp-buffer " *cperl-tmp*") |
| @@ -5677,13 +7071,22 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." | |||
| 5677 | ret)))) | 7071 | ret)))) |
| 5678 | 7072 | ||
| 5679 | (defun cperl-add-tags-recurse-noxs () | 7073 | (defun cperl-add-tags-recurse-noxs () |
| 5680 | "Add to TAGS data for Perl and XSUB files in the current directory and kids. | 7074 | "Add to TAGS data for \"pure\" Perl files in the current directory and kids. |
| 5681 | Use as | 7075 | Use as |
| 5682 | emacs -batch -q -no-site-file -l emacs/cperl-mode.el \ | 7076 | emacs -batch -q -no-site-file -l emacs/cperl-mode.el \ |
| 5683 | -f cperl-add-tags-recurse | 7077 | -f cperl-add-tags-recurse-noxs |
| 5684 | " | 7078 | " |
| 5685 | (cperl-write-tags nil nil t t nil t)) | 7079 | (cperl-write-tags nil nil t t nil t)) |
| 5686 | 7080 | ||
| 7081 | (defun cperl-add-tags-recurse-noxs-fullpath () | ||
| 7082 | "Add to TAGS data for \"pure\" Perl in the current directory and kids. | ||
| 7083 | Writes down fullpath, so TAGS is relocatable (but if the build directory | ||
| 7084 | is relocated, the file TAGS inside it breaks). Use as | ||
| 7085 | emacs -batch -q -no-site-file -l emacs/cperl-mode.el \ | ||
| 7086 | -f cperl-add-tags-recurse-noxs-fullpath | ||
| 7087 | " | ||
| 7088 | (cperl-write-tags nil nil t t nil t "")) | ||
| 7089 | |||
| 5687 | (defun cperl-add-tags-recurse () | 7090 | (defun cperl-add-tags-recurse () |
| 5688 | "Add to TAGS file data for Perl files in the current directory and kids. | 7091 | "Add to TAGS file data for Perl files in the current directory and kids. |
| 5689 | Use as | 7092 | Use as |
| @@ -5853,9 +7256,9 @@ One may build such TAGS files from CPerl mode menu." | |||
| 5853 | (cperl-tags-hier-fill)) | 7256 | (cperl-tags-hier-fill)) |
| 5854 | (or tags-table-list | 7257 | (or tags-table-list |
| 5855 | (call-interactively 'visit-tags-table)) | 7258 | (call-interactively 'visit-tags-table)) |
| 5856 | (mapcar | 7259 | (mapcar |
| 5857 | (function | 7260 | (function |
| 5858 | (lambda (tagsfile) | 7261 | (lambda (tagsfile) |
| 5859 | (message "Updating list of classes... %s" tagsfile) | 7262 | (message "Updating list of classes... %s" tagsfile) |
| 5860 | (set-buffer (get-file-buffer tagsfile)) | 7263 | (set-buffer (get-file-buffer tagsfile)) |
| 5861 | (cperl-tags-hier-fill))) | 7264 | (cperl-tags-hier-fill))) |
| @@ -6017,7 +7420,7 @@ One may build such TAGS files from CPerl mode menu." | |||
| 6017 | '("[^-\t <>=+]\\(--\\|\\+\\+\\)" ; var-- var++ | 7420 | '("[^-\t <>=+]\\(--\\|\\+\\+\\)" ; var-- var++ |
| 6018 | "[a-zA-Z0-9_][|&][a-zA-Z0-9_$]" ; abc|def abc&def are often used. | 7421 | "[a-zA-Z0-9_][|&][a-zA-Z0-9_$]" ; abc|def abc&def are often used. |
| 6019 | "&[(a-zA-Z0-9_$]" ; &subroutine &(var->field) | 7422 | "&[(a-zA-Z0-9_$]" ; &subroutine &(var->field) |
| 6020 | "<\\$?\\sw+\\(\\.\\sw+\\)?>" ; <IN> <stdin.h> | 7423 | "<\\$?\\sw+\\(\\.\\(\\sw\\|_\\)+\\)?>" ; <IN> <stdin.h> |
| 6021 | "-[a-zA-Z][ \t]+[_$\"'`a-zA-Z]" ; -f file, -t STDIN | 7424 | "-[a-zA-Z][ \t]+[_$\"'`a-zA-Z]" ; -f file, -t STDIN |
| 6022 | "-[0-9]" ; -5 | 7425 | "-[0-9]" ; -5 |
| 6023 | "\\+\\+" ; ++var | 7426 | "\\+\\+" ; ++var |
| @@ -6049,8 +7452,7 @@ Currently it is tuned to C and Perl syntax." | |||
| 6049 | (interactive) | 7452 | (interactive) |
| 6050 | (let (found-bad (p (point))) | 7453 | (let (found-bad (p (point))) |
| 6051 | (setq last-nonmenu-event 13) ; To disable popup | 7454 | (setq last-nonmenu-event 13) ; To disable popup |
| 6052 | (with-no-warnings ; It is useful to push the mark here. | 7455 | (goto-char (point-min)) |
| 6053 | (beginning-of-buffer)) | ||
| 6054 | (map-y-or-n-p "Insert space here? " | 7456 | (map-y-or-n-p "Insert space here? " |
| 6055 | (lambda (arg) (insert " ")) | 7457 | (lambda (arg) (insert " ")) |
| 6056 | 'cperl-next-bad-style | 7458 | 'cperl-next-bad-style |
| @@ -6446,7 +7848,7 @@ endservent | |||
| 6446 | eof[([FILEHANDLE])] | 7848 | eof[([FILEHANDLE])] |
| 6447 | ... eq ... String equality. | 7849 | ... eq ... String equality. |
| 6448 | eval(EXPR) or eval { BLOCK } | 7850 | eval(EXPR) or eval { BLOCK } |
| 6449 | exec(LIST) | 7851 | exec([TRUENAME] ARGV0, ARGVs) or exec(SHELL_COMMAND_LINE) |
| 6450 | exit(EXPR) | 7852 | exit(EXPR) |
| 6451 | exp(EXPR) | 7853 | exp(EXPR) |
| 6452 | fcntl(FILEHANDLE,FUNCTION,SCALAR) | 7854 | fcntl(FILEHANDLE,FUNCTION,SCALAR) |
| @@ -6582,7 +7984,7 @@ substr(EXPR,OFFSET[,LEN]) | |||
| 6582 | symlink(OLDFILE,NEWFILE) | 7984 | symlink(OLDFILE,NEWFILE) |
| 6583 | syscall(LIST) | 7985 | syscall(LIST) |
| 6584 | sysread(FILEHANDLE,SCALAR,LENGTH[,OFFSET]) | 7986 | sysread(FILEHANDLE,SCALAR,LENGTH[,OFFSET]) |
| 6585 | system(LIST) | 7987 | system([TRUENAME] ARGV0 [,ARGV]) or system(SHELL_COMMAND_LINE) |
| 6586 | syswrite(FILEHANDLE,SCALAR,LENGTH[,OFFSET]) | 7988 | syswrite(FILEHANDLE,SCALAR,LENGTH[,OFFSET]) |
| 6587 | tell[(FILEHANDLE)] | 7989 | tell[(FILEHANDLE)] |
| 6588 | telldir(DIRHANDLE) | 7990 | telldir(DIRHANDLE) |
| @@ -6683,7 +8085,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6683 | ;; b is before the starting delimiter, e before the ending | 8085 | ;; b is before the starting delimiter, e before the ending |
| 6684 | ;; e should be a marker, may be changed, but remains "correct". | 8086 | ;; e should be a marker, may be changed, but remains "correct". |
| 6685 | ;; EMBED is nil iff we process the whole REx. | 8087 | ;; EMBED is nil iff we process the whole REx. |
| 6686 | ;; The REx is guarantied to have //x | 8088 | ;; The REx is guaranteed to have //x |
| 6687 | ;; LEVEL shows how many levels deep to go | 8089 | ;; LEVEL shows how many levels deep to go |
| 6688 | ;; position at enter and at leave is not defined | 8090 | ;; position at enter and at leave is not defined |
| 6689 | (let (s c tmp (m (make-marker)) (m1 (make-marker)) c1 spaces inline code pos) | 8091 | (let (s c tmp (m (make-marker)) (m1 (make-marker)) c1 spaces inline code pos) |
| @@ -6712,7 +8114,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6712 | (goto-char e) | 8114 | (goto-char e) |
| 6713 | (delete-horizontal-space) | 8115 | (delete-horizontal-space) |
| 6714 | (insert "\n") | 8116 | (insert "\n") |
| 6715 | (indent-to-column c) | 8117 | (cperl-make-indent c) |
| 6716 | (set-marker e (point)))) | 8118 | (set-marker e (point)))) |
| 6717 | (goto-char b) | 8119 | (goto-char b) |
| 6718 | (end-of-line 2) | 8120 | (end-of-line 2) |
| @@ -6722,7 +8124,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6722 | inline t) | 8124 | inline t) |
| 6723 | (skip-chars-forward " \t") | 8125 | (skip-chars-forward " \t") |
| 6724 | (delete-region s (point)) | 8126 | (delete-region s (point)) |
| 6725 | (indent-to-column c1) | 8127 | (cperl-make-indent c1) |
| 6726 | (while (and | 8128 | (while (and |
| 6727 | inline | 8129 | inline |
| 6728 | (looking-at | 8130 | (looking-at |
| @@ -6748,6 +8150,16 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6748 | (eq (preceding-char) ?\{))) | 8150 | (eq (preceding-char) ?\{))) |
| 6749 | (forward-char -1) | 8151 | (forward-char -1) |
| 6750 | (forward-sexp 1)) | 8152 | (forward-sexp 1)) |
| 8153 | ((and ; [], already syntaxified | ||
| 8154 | (match-beginning 6) | ||
| 8155 | cperl-regexp-scan | ||
| 8156 | cperl-use-syntax-table-text-property) | ||
| 8157 | (forward-char -1) | ||
| 8158 | (forward-sexp 1) | ||
| 8159 | (or (eq (preceding-char) ?\]) | ||
| 8160 | (error "[]-group not terminated")) | ||
| 8161 | (re-search-forward | ||
| 8162 | "\\=\\([*+?]\\|{[0-9]+\\(,[0-9]*\\)?}\\)\\??" e t)) | ||
| 6751 | ((match-beginning 6) ; [] | 8163 | ((match-beginning 6) ; [] |
| 6752 | (setq tmp (point)) | 8164 | (setq tmp (point)) |
| 6753 | (if (looking-at "\\^?\\]") | 8165 | (if (looking-at "\\^?\\]") |
| @@ -6761,12 +8173,8 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6761 | (setq pos t))) | 8173 | (setq pos t))) |
| 6762 | (or (eq (preceding-char) ?\]) | 8174 | (or (eq (preceding-char) ?\]) |
| 6763 | (error "[]-group not terminated")) | 8175 | (error "[]-group not terminated")) |
| 6764 | (if (eq (following-char) ?\{) | 8176 | (re-search-forward |
| 6765 | (progn | 8177 | "\\=\\([*+?]\\|{[0-9]+\\(,[0-9]*\\)?}\\)\\??" e t)) |
| 6766 | (forward-sexp 1) | ||
| 6767 | (and (eq (following-char) ??) | ||
| 6768 | (forward-char 1))) | ||
| 6769 | (re-search-forward "\\=\\([*+?]\\??\\)" e t))) | ||
| 6770 | ((match-beginning 7) ; () | 8178 | ((match-beginning 7) ; () |
| 6771 | (goto-char (match-beginning 0)) | 8179 | (goto-char (match-beginning 0)) |
| 6772 | (setq pos (current-column)) | 8180 | (setq pos (current-column)) |
| @@ -6774,7 +8182,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6774 | (progn | 8182 | (progn |
| 6775 | (delete-horizontal-space) | 8183 | (delete-horizontal-space) |
| 6776 | (insert "\n") | 8184 | (insert "\n") |
| 6777 | (indent-to-column c1))) | 8185 | (cperl-make-indent c1))) |
| 6778 | (setq tmp (point)) | 8186 | (setq tmp (point)) |
| 6779 | (forward-sexp 1) | 8187 | (forward-sexp 1) |
| 6780 | ;; (or (forward-sexp 1) | 8188 | ;; (or (forward-sexp 1) |
| @@ -6834,7 +8242,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6834 | (insert "\n")) | 8242 | (insert "\n")) |
| 6835 | ;; first at line | 8243 | ;; first at line |
| 6836 | (delete-region (point) tmp)) | 8244 | (delete-region (point) tmp)) |
| 6837 | (indent-to-column c) | 8245 | (cperl-make-indent c) |
| 6838 | (forward-char 1) | 8246 | (forward-char 1) |
| 6839 | (skip-chars-forward " \t") | 8247 | (skip-chars-forward " \t") |
| 6840 | (setq spaces nil) | 8248 | (setq spaces nil) |
| @@ -6857,10 +8265,7 @@ prototype \\&SUB Returns prototype of the function given a reference. | |||
| 6857 | (/= (current-indentation) c)) | 8265 | (/= (current-indentation) c)) |
| 6858 | (progn | 8266 | (progn |
| 6859 | (beginning-of-line) | 8267 | (beginning-of-line) |
| 6860 | (setq s (point)) | 8268 | (cperl-make-indent c))))) |
| 6861 | (skip-chars-forward " \t") | ||
| 6862 | (delete-region s (point)) | ||
| 6863 | (indent-to-column c))))) | ||
| 6864 | 8269 | ||
| 6865 | (defun cperl-make-regexp-x () | 8270 | (defun cperl-make-regexp-x () |
| 6866 | ;; Returns position of the start | 8271 | ;; Returns position of the start |
| @@ -6929,7 +8334,7 @@ We suppose that the regexp is scanned already." | |||
| 6929 | (interactive) | 8334 | (interactive) |
| 6930 | ;; (save-excursion ; Can't, breaks `cperl-contract-levels' | 8335 | ;; (save-excursion ; Can't, breaks `cperl-contract-levels' |
| 6931 | (cperl-regext-to-level-start) | 8336 | (cperl-regext-to-level-start) |
| 6932 | (let ((b (point)) (e (make-marker)) s c) | 8337 | (let ((b (point)) (e (make-marker)) c) |
| 6933 | (forward-sexp 1) | 8338 | (forward-sexp 1) |
| 6934 | (set-marker e (1- (point))) | 8339 | (set-marker e (1- (point))) |
| 6935 | (goto-char b) | 8340 | (goto-char b) |
| @@ -6938,10 +8343,7 @@ We suppose that the regexp is scanned already." | |||
| 6938 | ((match-beginning 1) ; #-comment | 8343 | ((match-beginning 1) ; #-comment |
| 6939 | (or c (setq c (current-indentation))) | 8344 | (or c (setq c (current-indentation))) |
| 6940 | (beginning-of-line 2) ; Skip | 8345 | (beginning-of-line 2) ; Skip |
| 6941 | (setq s (point)) | 8346 | (cperl-make-indent c)) |
| 6942 | (skip-chars-forward " \t") | ||
| 6943 | (delete-region s (point)) | ||
| 6944 | (indent-to-column c)) | ||
| 6945 | (t | 8347 | (t |
| 6946 | (delete-char -1) | 8348 | (delete-char -1) |
| 6947 | (just-one-space)))))) | 8349 | (just-one-space)))))) |
| @@ -6980,96 +8382,197 @@ We suppose that the regexp is scanned already." | |||
| 6980 | (set-marker e (1- (point))) | 8382 | (set-marker e (1- (point))) |
| 6981 | (cperl-beautify-regexp-piece b e nil deep)))) | 8383 | (cperl-beautify-regexp-piece b e nil deep)))) |
| 6982 | 8384 | ||
| 8385 | (defun cperl-invert-if-unless-modifiers () | ||
| 8386 | "Change `B if A;' into `if (A) {B}' etc if possible. | ||
| 8387 | \(Unfinished.)" | ||
| 8388 | (interactive) ; | ||
| 8389 | (let (A B pre-B post-B pre-if post-if pre-A post-A if-string | ||
| 8390 | (w-rex "\\<\\(if\\|unless\\|while\\|until\\|for\\|foreach\\)\\>")) | ||
| 8391 | (and (= (char-syntax (preceding-char)) ?w) | ||
| 8392 | (forward-sexp -1)) | ||
| 8393 | (setq pre-if (point)) | ||
| 8394 | (cperl-backward-to-start-of-expr) | ||
| 8395 | (setq pre-B (point)) | ||
| 8396 | (forward-sexp 1) ; otherwise forward-to-end-of-expr is NOP | ||
| 8397 | (cperl-forward-to-end-of-expr) | ||
| 8398 | (setq post-A (point)) | ||
| 8399 | (goto-char pre-if) | ||
| 8400 | (or (looking-at w-rex) | ||
| 8401 | ;; Find the position | ||
| 8402 | (progn (goto-char post-A) | ||
| 8403 | (while (and | ||
| 8404 | (not (looking-at w-rex)) | ||
| 8405 | (> (point) pre-B)) | ||
| 8406 | (forward-sexp -1)) | ||
| 8407 | (setq pre-if (point)))) | ||
| 8408 | (or (looking-at w-rex) | ||
| 8409 | (error "Can't find `if', `unless', `while', `until', `for' or `foreach'")) | ||
| 8410 | ;; 1 B 2 ... 3 B-com ... 4 if 5 ... if-com 6 ... 7 A 8 | ||
| 8411 | (setq if-string (buffer-substring (match-beginning 0) (match-end 0))) | ||
| 8412 | ;; First, simple part: find code boundaries | ||
| 8413 | (forward-sexp 1) | ||
| 8414 | (setq post-if (point)) | ||
| 8415 | (forward-sexp -2) | ||
| 8416 | (forward-sexp 1) | ||
| 8417 | (setq post-B (point)) | ||
| 8418 | (cperl-backward-to-start-of-expr) | ||
| 8419 | (setq pre-B (point)) | ||
| 8420 | (setq B (buffer-substring pre-B post-B)) | ||
| 8421 | (goto-char pre-if) | ||
| 8422 | (forward-sexp 2) | ||
| 8423 | (forward-sexp -1) | ||
| 8424 | ;; May be after $, @, $# etc of a variable | ||
| 8425 | (skip-chars-backward "$@%#") | ||
| 8426 | (setq pre-A (point)) | ||
| 8427 | (cperl-forward-to-end-of-expr) | ||
| 8428 | (setq post-A (point)) | ||
| 8429 | (setq A (buffer-substring pre-A post-A)) | ||
| 8430 | ;; Now modify (from end, to not break the stuff) | ||
| 8431 | (skip-chars-forward " \t;") | ||
| 8432 | (delete-region pre-A (point)) ; we move to pre-A | ||
| 8433 | (insert "\n" B ";\n}") | ||
| 8434 | (and (looking-at "[ \t]*#") (cperl-indent-for-comment)) | ||
| 8435 | (delete-region pre-if post-if) | ||
| 8436 | (delete-region pre-B post-B) | ||
| 8437 | (goto-char pre-B) | ||
| 8438 | (insert if-string " (" A ") {") | ||
| 8439 | (setq post-B (point)) | ||
| 8440 | (if (looking-at "[ \t]+$") | ||
| 8441 | (delete-horizontal-space) | ||
| 8442 | (if (looking-at "[ \t]*#") | ||
| 8443 | (cperl-indent-for-comment) | ||
| 8444 | (just-one-space))) | ||
| 8445 | (forward-line 1) | ||
| 8446 | (if (looking-at "[ \t]*$") | ||
| 8447 | (progn ; delete line | ||
| 8448 | (delete-horizontal-space) | ||
| 8449 | (delete-region (point) (1+ (point))))) | ||
| 8450 | (cperl-indent-line) | ||
| 8451 | (goto-char (1- post-B)) | ||
| 8452 | (forward-sexp 1) | ||
| 8453 | (cperl-indent-line) | ||
| 8454 | (goto-char pre-B))) | ||
| 8455 | |||
| 6983 | (defun cperl-invert-if-unless () | 8456 | (defun cperl-invert-if-unless () |
| 6984 | "Change `if (A) {B}' into `B if A;' etc if possible." | 8457 | "Change `if (A) {B}' into `B if A;' etc (or visa versa) if possible. |
| 8458 | If the cursor is not on the leading keyword of the BLOCK flavor of | ||
| 8459 | construct, will assume it is the STATEMENT flavor, so will try to find | ||
| 8460 | the appropriate statement modifier." | ||
| 6985 | (interactive) | 8461 | (interactive) |
| 6986 | (or (looking-at "\\<") | 8462 | (and (= (char-syntax (preceding-char)) ?w) |
| 6987 | (forward-sexp -1)) | 8463 | (forward-sexp -1)) |
| 6988 | (if (looking-at "\\<\\(if\\|unless\\|while\\|until\\|for\\|foreach\\)\\>") | 8464 | (if (looking-at "\\<\\(if\\|unless\\|while\\|until\\|for\\|foreach\\)\\>") |
| 6989 | (let ((pos1 (point)) | 8465 | (let ((pre-if (point)) |
| 6990 | pos2 pos3 pos4 pos5 s1 s2 state p pos45 | 8466 | pre-A post-A pre-B post-B A B state p end-B-code is-block B-comment |
| 6991 | (s0 (buffer-substring (match-beginning 0) (match-end 0)))) | 8467 | (if-string (buffer-substring (match-beginning 0) (match-end 0)))) |
| 6992 | (forward-sexp 2) | 8468 | (forward-sexp 2) |
| 6993 | (setq pos3 (point)) | 8469 | (setq post-A (point)) |
| 6994 | (forward-sexp -1) | 8470 | (forward-sexp -1) |
| 6995 | (setq pos2 (point)) | 8471 | (setq pre-A (point)) |
| 6996 | (if (eq (following-char) ?\( ) | 8472 | (setq is-block (and (eq (following-char) ?\( ) |
| 8473 | (save-excursion | ||
| 8474 | (condition-case nil | ||
| 8475 | (progn | ||
| 8476 | (forward-sexp 2) | ||
| 8477 | (forward-sexp -1) | ||
| 8478 | (eq (following-char) ?\{ )) | ||
| 8479 | (error nil))))) | ||
| 8480 | (if is-block | ||
| 6997 | (progn | 8481 | (progn |
| 6998 | (goto-char pos3) | 8482 | (goto-char post-A) |
| 6999 | (forward-sexp 1) | 8483 | (forward-sexp 1) |
| 7000 | (setq pos5 (point)) | 8484 | (setq post-B (point)) |
| 7001 | (forward-sexp -1) | 8485 | (forward-sexp -1) |
| 7002 | (setq pos4 (point)) | 8486 | (setq pre-B (point)) |
| 7003 | ;; XXXX In fact may be `A if (B); {C}' ... | ||
| 7004 | (if (and (eq (following-char) ?\{ ) | 8487 | (if (and (eq (following-char) ?\{ ) |
| 7005 | (progn | 8488 | (progn |
| 7006 | (cperl-backward-to-noncomment pos3) | 8489 | (cperl-backward-to-noncomment post-A) |
| 7007 | (eq (preceding-char) ?\) ))) | 8490 | (eq (preceding-char) ?\) ))) |
| 7008 | (if (condition-case nil | 8491 | (if (condition-case nil |
| 7009 | (progn | 8492 | (progn |
| 7010 | (goto-char pos5) | 8493 | (goto-char post-B) |
| 7011 | (forward-sexp 1) | 8494 | (forward-sexp 1) |
| 7012 | (forward-sexp -1) | 8495 | (forward-sexp -1) |
| 7013 | (looking-at "\\<els\\(e\\|if\\)\\>")) | 8496 | (looking-at "\\<els\\(e\\|if\\)\\>")) |
| 7014 | (error nil)) | 8497 | (error nil)) |
| 7015 | (error | 8498 | (error |
| 7016 | "`%s' (EXPR) {BLOCK} with `else'/`elsif'" s0) | 8499 | "`%s' (EXPR) {BLOCK} with `else'/`elsif'" if-string) |
| 7017 | (goto-char (1- pos5)) | 8500 | (goto-char (1- post-B)) |
| 7018 | (cperl-backward-to-noncomment pos4) | 8501 | (cperl-backward-to-noncomment pre-B) |
| 7019 | (if (eq (preceding-char) ?\;) | 8502 | (if (eq (preceding-char) ?\;) |
| 7020 | (forward-char -1)) | 8503 | (forward-char -1)) |
| 7021 | (setq pos45 (point)) | 8504 | (setq end-B-code (point)) |
| 7022 | (goto-char pos4) | 8505 | (goto-char pre-B) |
| 7023 | (while (re-search-forward "\\<\\(for\\|foreach\\|if\\|unless\\|while\\|until\\)\\>\\|;" pos45 t) | 8506 | (while (re-search-forward "\\<\\(for\\|foreach\\|if\\|unless\\|while\\|until\\)\\>\\|;" end-B-code t) |
| 7024 | (setq p (match-beginning 0) | 8507 | (setq p (match-beginning 0) |
| 7025 | s1 (buffer-substring p (match-end 0)) | 8508 | A (buffer-substring p (match-end 0)) |
| 7026 | state (parse-partial-sexp pos4 p)) | 8509 | state (parse-partial-sexp pre-B p)) |
| 7027 | (or (nth 3 state) | 8510 | (or (nth 3 state) |
| 7028 | (nth 4 state) | 8511 | (nth 4 state) |
| 7029 | (nth 5 state) | 8512 | (nth 5 state) |
| 7030 | (error "`%s' inside `%s' BLOCK" s1 s0)) | 8513 | (error "`%s' inside `%s' BLOCK" A if-string)) |
| 7031 | (goto-char (match-end 0))) | 8514 | (goto-char (match-end 0))) |
| 7032 | ;; Finally got it | 8515 | ;; Finally got it |
| 7033 | (goto-char (1+ pos4)) | 8516 | (goto-char (1+ pre-B)) |
| 7034 | (skip-chars-forward " \t\n") | 8517 | (skip-chars-forward " \t\n") |
| 7035 | (setq s2 (buffer-substring (point) pos45)) | 8518 | (setq B (buffer-substring (point) end-B-code)) |
| 7036 | (goto-char pos45) | 8519 | (goto-char end-B-code) |
| 7037 | (or (looking-at ";?[ \t\n]*}") | 8520 | (or (looking-at ";?[ \t\n]*}") |
| 7038 | (progn | 8521 | (progn |
| 7039 | (skip-chars-forward "; \t\n") | 8522 | (skip-chars-forward "; \t\n") |
| 7040 | (setq s2 (concat s2 "\n" (buffer-substring (point) (1- pos5)))))) | 8523 | (setq B-comment |
| 7041 | (and (equal s2 "") | 8524 | (buffer-substring (point) (1- post-B))))) |
| 7042 | (setq s2 "1")) | 8525 | (and (equal B "") |
| 7043 | (goto-char (1- pos3)) | 8526 | (setq B "1")) |
| 7044 | (cperl-backward-to-noncomment pos2) | 8527 | (goto-char (1- post-A)) |
| 8528 | (cperl-backward-to-noncomment pre-A) | ||
| 7045 | (or (looking-at "[ \t\n]*)") | 8529 | (or (looking-at "[ \t\n]*)") |
| 7046 | (goto-char (1- pos3))) | 8530 | (goto-char (1- post-A))) |
| 7047 | (setq p (point)) | 8531 | (setq p (point)) |
| 7048 | (goto-char (1+ pos2)) | 8532 | (goto-char (1+ pre-A)) |
| 7049 | (skip-chars-forward " \t\n") | 8533 | (skip-chars-forward " \t\n") |
| 7050 | (setq s1 (buffer-substring (point) p)) | 8534 | (setq A (buffer-substring (point) p)) |
| 7051 | (delete-region pos4 pos5) | 8535 | (delete-region pre-B post-B) |
| 7052 | (delete-region pos2 pos3) | 8536 | (delete-region pre-A post-A) |
| 7053 | (goto-char pos1) | 8537 | (goto-char pre-if) |
| 7054 | (insert s2 " ") | 8538 | (insert B " ") |
| 8539 | (and B-comment (insert B-comment " ")) | ||
| 7055 | (just-one-space) | 8540 | (just-one-space) |
| 7056 | (forward-word 1) | 8541 | (forward-word 1) |
| 7057 | (setq pos1 (point)) | 8542 | (setq pre-A (point)) |
| 7058 | (insert " " s1 ";") | 8543 | (insert " " A ";") |
| 7059 | (delete-horizontal-space) | 8544 | (delete-horizontal-space) |
| 8545 | (setq post-B (point)) | ||
| 8546 | (if (looking-at "#") | ||
| 8547 | (indent-for-comment)) | ||
| 8548 | (goto-char post-B) | ||
| 7060 | (forward-char -1) | 8549 | (forward-char -1) |
| 7061 | (delete-horizontal-space) | 8550 | (delete-horizontal-space) |
| 7062 | (goto-char pos1) | 8551 | (goto-char pre-A) |
| 7063 | (just-one-space) | 8552 | (just-one-space) |
| 7064 | (cperl-indent-line)) | 8553 | (goto-char pre-if) |
| 7065 | (error "`%s' (EXPR) not with an {BLOCK}" s0))) | 8554 | (setq pre-A (set-marker (make-marker) pre-A)) |
| 7066 | (error "`%s' not with an (EXPR)" s0))) | 8555 | (while (<= (point) (marker-position pre-A)) |
| 7067 | (error "Not at `if', `unless', `while', `until', `for' or `foreach'"))) | 8556 | (cperl-indent-line) |
| 8557 | (forward-line 1)) | ||
| 8558 | (goto-char (marker-position pre-A)) | ||
| 8559 | (if B-comment | ||
| 8560 | (progn | ||
| 8561 | (forward-line -1) | ||
| 8562 | (indent-for-comment) | ||
| 8563 | (goto-char (marker-position pre-A))))) | ||
| 8564 | (error "`%s' (EXPR) not with an {BLOCK}" if-string))) | ||
| 8565 | ;; (error "`%s' not with an (EXPR)" if-string) | ||
| 8566 | (forward-sexp -1) | ||
| 8567 | (cperl-invert-if-unless-modifiers))) | ||
| 8568 | ;;(error "Not at `if', `unless', `while', `until', `for' or `foreach'") | ||
| 8569 | (cperl-invert-if-unless-modifiers))) | ||
| 7068 | 8570 | ||
| 7069 | ;;; By Anthony Foiani <afoiani@uswest.com> | 8571 | ;;; By Anthony Foiani <afoiani@uswest.com> |
| 7070 | ;;; Getting help on modules in C-h f ? | 8572 | ;;; Getting help on modules in C-h f ? |
| 7071 | ;;; This is a modified version of `man'. | 8573 | ;;; This is a modified version of `man'. |
| 7072 | ;;; Need to teach it how to lookup functions | 8574 | ;;; Need to teach it how to lookup functions |
| 8575 | ;;;###autoload | ||
| 7073 | (defun cperl-perldoc (word) | 8576 | (defun cperl-perldoc (word) |
| 7074 | "Run `perldoc' on WORD." | 8577 | "Run `perldoc' on WORD." |
| 7075 | (interactive | 8578 | (interactive |
| @@ -7101,6 +8604,7 @@ We suppose that the regexp is scanned already." | |||
| 7101 | (t | 8604 | (t |
| 7102 | (Man-getpage-in-background word))))) | 8605 | (Man-getpage-in-background word))))) |
| 7103 | 8606 | ||
| 8607 | ;;;###autoload | ||
| 7104 | (defun cperl-perldoc-at-point () | 8608 | (defun cperl-perldoc-at-point () |
| 7105 | "Run a `perldoc' on the word around point." | 8609 | "Run a `perldoc' on the word around point." |
| 7106 | (interactive) | 8610 | (interactive) |
| @@ -7145,7 +8649,7 @@ We suppose that the regexp is scanned already." | |||
| 7145 | (defun cperl-pod2man-build-command () | 8649 | (defun cperl-pod2man-build-command () |
| 7146 | "Builds the entire background manpage and cleaning command." | 8650 | "Builds the entire background manpage and cleaning command." |
| 7147 | (let ((command (concat pod2man-program " %s 2>/dev/null")) | 8651 | (let ((command (concat pod2man-program " %s 2>/dev/null")) |
| 7148 | (flist Man-filter-list)) | 8652 | (flist (and (boundp 'Man-filter-list) Man-filter-list))) |
| 7149 | (while (and flist (car flist)) | 8653 | (while (and flist (car flist)) |
| 7150 | (let ((pcom (car (car flist))) | 8654 | (let ((pcom (car (car flist))) |
| 7151 | (pargs (cdr (car flist)))) | 8655 | (pargs (cdr (car flist)))) |
| @@ -7159,6 +8663,205 @@ We suppose that the regexp is scanned already." | |||
| 7159 | (setq flist (cdr flist)))) | 8663 | (setq flist (cdr flist)))) |
| 7160 | command)) | 8664 | command)) |
| 7161 | 8665 | ||
| 8666 | |||
| 8667 | (defun cperl-next-interpolated-REx-1 () | ||
| 8668 | "Move point to next REx which has interpolated parts without //o. | ||
| 8669 | Skips RExes consisting of one interpolated variable. | ||
| 8670 | |||
| 8671 | Note that skipped RExen are not performance hits." | ||
| 8672 | (interactive "") | ||
| 8673 | (cperl-next-interpolated-REx 1)) | ||
| 8674 | |||
| 8675 | (defun cperl-next-interpolated-REx-0 () | ||
| 8676 | "Move point to next REx which has interpolated parts without //o." | ||
| 8677 | (interactive "") | ||
| 8678 | (cperl-next-interpolated-REx 0)) | ||
| 8679 | |||
| 8680 | (defun cperl-next-interpolated-REx (&optional skip beg limit) | ||
| 8681 | "Move point to next REx which has interpolated parts. | ||
| 8682 | SKIP is a list of possible types to skip, BEG and LIMIT are the starting | ||
| 8683 | point and the limit of search (default to point and end of buffer). | ||
| 8684 | |||
| 8685 | SKIP may be a number, then it behaves as list of numbers up to SKIP; this | ||
| 8686 | semantic may be used as a numeric argument. | ||
| 8687 | |||
| 8688 | Types are 0 for / $rex /o (interpolated once), 1 for /$rex/ (if $rex is | ||
| 8689 | a result of qr//, this is not a performance hit), t for the rest." | ||
| 8690 | (interactive "P") | ||
| 8691 | (if (numberp skip) (setq skip (list 0 skip))) | ||
| 8692 | (or beg (setq beg (point))) | ||
| 8693 | (or limit (setq limit (point-max))) ; needed for n-s-p-c | ||
| 8694 | (let (pp) | ||
| 8695 | (and (eq (get-text-property beg 'syntax-type) 'string) | ||
| 8696 | (setq beg (next-single-property-change beg 'syntax-type nil limit))) | ||
| 8697 | (cperl-map-pods-heres | ||
| 8698 | (function (lambda (s e p) | ||
| 8699 | (if (memq (get-text-property s 'REx-interpolated) skip) | ||
| 8700 | t | ||
| 8701 | (setq pp s) | ||
| 8702 | nil))) ; nil stops | ||
| 8703 | 'REx-interpolated beg limit) | ||
| 8704 | (if pp (goto-char pp) | ||
| 8705 | (message "No more interpolated REx")))) | ||
| 8706 | |||
| 8707 | ;;; Initial version contributed by Trey Belew | ||
| 8708 | (defun cperl-here-doc-spell (&optional beg end) | ||
| 8709 | "Spell-check HERE-documents in the Perl buffer. | ||
| 8710 | If a region is highlighted, restricts to the region." | ||
| 8711 | (interactive "") | ||
| 8712 | (cperl-pod-spell t beg end)) | ||
| 8713 | |||
| 8714 | (defun cperl-pod-spell (&optional do-heres beg end) | ||
| 8715 | "Spell-check POD documentation. | ||
| 8716 | If invoked with prefix argument, will do HERE-DOCs instead. | ||
| 8717 | If a region is highlighted, restricts to the region." | ||
| 8718 | (interactive "P") | ||
| 8719 | (save-excursion | ||
| 8720 | (let (beg end) | ||
| 8721 | (if (cperl-mark-active) | ||
| 8722 | (setq beg (min (mark) (point)) | ||
| 8723 | end (max (mark) (point))) | ||
| 8724 | (setq beg (point-min) | ||
| 8725 | end (point-max))) | ||
| 8726 | (cperl-map-pods-heres (function | ||
| 8727 | (lambda (s e p) | ||
| 8728 | (if do-heres | ||
| 8729 | (setq e (save-excursion | ||
| 8730 | (goto-char e) | ||
| 8731 | (forward-line -1) | ||
| 8732 | (point)))) | ||
| 8733 | (ispell-region s e) | ||
| 8734 | t)) | ||
| 8735 | (if do-heres 'here-doc-group 'in-pod) | ||
| 8736 | beg end)))) | ||
| 8737 | |||
| 8738 | (defun cperl-map-pods-heres (func &optional prop s end) | ||
| 8739 | "Executes a function over regions of pods or here-documents. | ||
| 8740 | PROP is the text-property to search for; default to `in-pod'. Stop when | ||
| 8741 | function returns nil." | ||
| 8742 | (let (pos posend has-prop (cont t)) | ||
| 8743 | (or prop (setq prop 'in-pod)) | ||
| 8744 | (or s (setq s (point-min))) | ||
| 8745 | (or end (setq end (point-max))) | ||
| 8746 | (cperl-update-syntaxification end end) | ||
| 8747 | (save-excursion | ||
| 8748 | (goto-char (setq pos s)) | ||
| 8749 | (while (and cont (< pos end)) | ||
| 8750 | (setq has-prop (get-text-property pos prop)) | ||
| 8751 | (setq posend (next-single-property-change pos prop nil end)) | ||
| 8752 | (and has-prop | ||
| 8753 | (setq cont (funcall func pos posend prop))) | ||
| 8754 | (setq pos posend))))) | ||
| 8755 | |||
| 8756 | ;;; Based on code by Masatake YAMATO: | ||
| 8757 | (defun cperl-get-here-doc-region (&optional pos pod) | ||
| 8758 | "Return HERE document region around the point. | ||
| 8759 | Return nil if the point is not in a HERE document region. If POD is non-nil, | ||
| 8760 | will return a POD section if point is in a POD section." | ||
| 8761 | (or pos (setq pos (point))) | ||
| 8762 | (cperl-update-syntaxification pos pos) | ||
| 8763 | (if (or (eq 'here-doc (get-text-property pos 'syntax-type)) | ||
| 8764 | (and pod | ||
| 8765 | (eq 'pod (get-text-property pos 'syntax-type)))) | ||
| 8766 | (let ((b (cperl-beginning-of-property pos 'syntax-type)) | ||
| 8767 | (e (next-single-property-change pos 'syntax-type))) | ||
| 8768 | (cons b (or e (point-max)))))) | ||
| 8769 | |||
| 8770 | (defun cperl-narrow-to-here-doc (&optional pos) | ||
| 8771 | "Narrows editing region to the HERE-DOC at POS. | ||
| 8772 | POS defaults to the point." | ||
| 8773 | (interactive "d") | ||
| 8774 | (or pos (setq pos (point))) | ||
| 8775 | (let ((p (cperl-get-here-doc-region pos))) | ||
| 8776 | (or p (error "Not inside a HERE document")) | ||
| 8777 | (narrow-to-region (car p) (cdr p)) | ||
| 8778 | (message | ||
| 8779 | "When you are finished with narrow editing, type C-x n w"))) | ||
| 8780 | |||
| 8781 | (defun cperl-select-this-pod-or-here-doc (&optional pos) | ||
| 8782 | "Select the HERE-DOC (or POD section) at POS. | ||
| 8783 | POS defaults to the point." | ||
| 8784 | (interactive "d") | ||
| 8785 | (let ((p (cperl-get-here-doc-region pos t))) | ||
| 8786 | (if p | ||
| 8787 | (progn | ||
| 8788 | (goto-char (car p)) | ||
| 8789 | (push-mark (cdr p) nil t)) ; Message, activate in transient-mode | ||
| 8790 | (message "I do not think POS is in POD or a HERE-doc...")))) | ||
| 8791 | |||
| 8792 | (defun cperl-facemenu-add-face-function (face end) | ||
| 8793 | "A callback to process user-initiated font-change requests. | ||
| 8794 | Translates `bold', `italic', and `bold-italic' requests to insertion of | ||
| 8795 | corresponding POD directives, and `underline' to C<> POD directive. | ||
| 8796 | |||
| 8797 | Such requests are usually bound to M-o LETTER." | ||
| 8798 | (or (get-text-property (point) 'in-pod) | ||
| 8799 | (error "Faces can only be set within POD")) | ||
| 8800 | (setq facemenu-end-add-face (if (eq face 'bold-italic) ">>" ">")) | ||
| 8801 | (cdr (or (assq face '((bold . "B<") | ||
| 8802 | (italic . "I<") | ||
| 8803 | (bold-italic . "B<I<") | ||
| 8804 | (underline . "C<"))) | ||
| 8805 | (error "Face %s not configured for cperl-mode" | ||
| 8806 | face)))) | ||
| 8807 | |||
| 8808 | (defun cperl-time-fontification (&optional l step lim) | ||
| 8809 | "Times how long it takes to do incremental fontification in a region. | ||
| 8810 | L is the line to start at, STEP is the number of lines to skip when | ||
| 8811 | doing next incremental fontification, LIM is the maximal number of | ||
| 8812 | incremental fontification to perform. Messages are accumulated in | ||
| 8813 | *Messages* buffer. | ||
| 8814 | |||
| 8815 | May be used for pinpointing which construct slows down buffer fontification: | ||
| 8816 | start with default arguments, then refine the slowdown regions." | ||
| 8817 | (interactive "nLine to start at: \nnStep to do incremental fontification: ") | ||
| 8818 | (or l (setq l 1)) | ||
| 8819 | (or step (setq step 500)) | ||
| 8820 | (or lim (setq lim 40)) | ||
| 8821 | (let* ((timems (function (lambda () | ||
| 8822 | (let ((tt (current-time))) | ||
| 8823 | (+ (* 1000 (nth 1 tt)) (/ (nth 2 tt) 1000)))))) | ||
| 8824 | (tt (funcall timems)) (c 0) delta tot) | ||
| 8825 | (goto-line l) | ||
| 8826 | (cperl-mode) | ||
| 8827 | (setq tot (- (- tt (setq tt (funcall timems))))) | ||
| 8828 | (message "cperl-mode at %s: %s" l tot) | ||
| 8829 | (while (and (< c lim) (not (eobp))) | ||
| 8830 | (forward-line step) | ||
| 8831 | (setq l (+ l step)) | ||
| 8832 | (setq c (1+ c)) | ||
| 8833 | (cperl-update-syntaxification (point) (point)) | ||
| 8834 | (setq delta (- (- tt (setq tt (funcall timems)))) tot (+ tot delta)) | ||
| 8835 | (message "to %s:%6s,%7s" l delta tot)) | ||
| 8836 | tot)) | ||
| 8837 | |||
| 8838 | (defun cperl-emulate-lazy-lock (&optional window-size) | ||
| 8839 | "Emulate `lazy-lock' without `condition-case', so `debug-on-error' works. | ||
| 8840 | Start fontifying the buffer from the start (or end) using the given | ||
| 8841 | WINDOW-SIZE (units is lines). Negative WINDOW-SIZE starts at end, and | ||
| 8842 | goes backwards; default is -50. This function is not CPerl-specific; it | ||
| 8843 | may be used to debug problems with delayed incremental fontification." | ||
| 8844 | (interactive | ||
| 8845 | "nSize of window for incremental fontification, negative goes backwards: ") | ||
| 8846 | (or window-size (setq window-size -50)) | ||
| 8847 | (let ((pos (if (> window-size 0) | ||
| 8848 | (point-min) | ||
| 8849 | (point-max))) | ||
| 8850 | p) | ||
| 8851 | (goto-char pos) | ||
| 8852 | (normal-mode) | ||
| 8853 | ;; Why needed??? With older font-locks??? | ||
| 8854 | (set (make-local-variable 'font-lock-cache-position) (make-marker)) | ||
| 8855 | (while (if (> window-size 0) | ||
| 8856 | (< pos (point-max)) | ||
| 8857 | (> pos (point-min))) | ||
| 8858 | (setq p (progn | ||
| 8859 | (forward-line window-size) | ||
| 8860 | (point))) | ||
| 8861 | (font-lock-fontify-region (min p pos) (max p pos)) | ||
| 8862 | (setq pos p)))) | ||
| 8863 | |||
| 8864 | |||
| 7162 | (defun cperl-lazy-install ()) ; Avoid a warning | 8865 | (defun cperl-lazy-install ()) ; Avoid a warning |
| 7163 | (defun cperl-lazy-unstall ()) ; Avoid a warning | 8866 | (defun cperl-lazy-unstall ()) ; Avoid a warning |
| 7164 | 8867 | ||
| @@ -7174,7 +8877,7 @@ We suppose that the regexp is scanned already." | |||
| 7174 | "Switches on Auto-Help on Perl constructs (put in the message area). | 8877 | "Switches on Auto-Help on Perl constructs (put in the message area). |
| 7175 | Delay of auto-help controlled by `cperl-lazy-help-time'." | 8878 | Delay of auto-help controlled by `cperl-lazy-help-time'." |
| 7176 | (interactive) | 8879 | (interactive) |
| 7177 | (make-variable-buffer-local 'cperl-help-shown) | 8880 | (make-local-variable 'cperl-help-shown) |
| 7178 | (if (and (cperl-val 'cperl-lazy-help-time) | 8881 | (if (and (cperl-val 'cperl-lazy-help-time) |
| 7179 | (not cperl-lazy-installed)) | 8882 | (not cperl-lazy-installed)) |
| 7180 | (progn | 8883 | (progn |
| @@ -7207,48 +8910,109 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." | |||
| 7207 | ;;; Plug for wrong font-lock: | 8910 | ;;; Plug for wrong font-lock: |
| 7208 | 8911 | ||
| 7209 | (defun cperl-font-lock-unfontify-region-function (beg end) | 8912 | (defun cperl-font-lock-unfontify-region-function (beg end) |
| 7210 | ;; Simplified now that font-lock-unfontify-region uses save-buffer-state. | 8913 | (let* ((modified (buffer-modified-p)) (buffer-undo-list t) |
| 7211 | (let (before-change-functions after-change-functions) | 8914 | (inhibit-read-only t) (inhibit-point-motion-hooks t) |
| 7212 | (remove-text-properties beg end '(face nil)))) | 8915 | before-change-functions after-change-functions |
| 8916 | deactivate-mark buffer-file-name buffer-file-truename) | ||
| 8917 | (remove-text-properties beg end '(face nil)) | ||
| 8918 | (if (and (not modified) (buffer-modified-p)) | ||
| 8919 | (set-buffer-modified-p nil)))) | ||
| 8920 | |||
| 8921 | (defun cperl-font-lock-fontify-region-function (beg end loudly) | ||
| 8922 | "Extends the region to safe positions, then calls the default function. | ||
| 8923 | Newer `font-lock's can do it themselves. | ||
| 8924 | We unwind only as far as needed for fontification. Syntaxification may | ||
| 8925 | do extra unwind via `cperl-unwind-to-safe'." | ||
| 8926 | (save-excursion | ||
| 8927 | (goto-char beg) | ||
| 8928 | (while (and beg | ||
| 8929 | (progn | ||
| 8930 | (beginning-of-line) | ||
| 8931 | (eq (get-text-property (setq beg (point)) 'syntax-type) | ||
| 8932 | 'multiline))) | ||
| 8933 | (if (setq beg (cperl-beginning-of-property beg 'syntax-type)) | ||
| 8934 | (goto-char beg))) | ||
| 8935 | (setq beg (point)) | ||
| 8936 | (goto-char end) | ||
| 8937 | (while (and end | ||
| 8938 | (progn | ||
| 8939 | (or (bolp) (condition-case nil | ||
| 8940 | (forward-line 1) | ||
| 8941 | (error nil))) | ||
| 8942 | (eq (get-text-property (setq end (point)) 'syntax-type) | ||
| 8943 | 'multiline))) | ||
| 8944 | (setq end (next-single-property-change end 'syntax-type nil (point-max))) | ||
| 8945 | (goto-char end)) | ||
| 8946 | (setq end (point))) | ||
| 8947 | (font-lock-default-fontify-region beg end loudly)) | ||
| 7213 | 8948 | ||
| 7214 | (defvar cperl-d-l nil) | 8949 | (defvar cperl-d-l nil) |
| 7215 | (defun cperl-fontify-syntaxically (end) | 8950 | (defun cperl-fontify-syntaxically (end) |
| 7216 | ;; Some vars for debugging only | 8951 | ;; Some vars for debugging only |
| 7217 | ;; (message "Syntaxifying...") | 8952 | ;; (message "Syntaxifying...") |
| 7218 | (let ((dbg (point)) (iend end) | 8953 | (let ((dbg (point)) (iend end) (idone cperl-syntax-done-to) |
| 7219 | (istate (car cperl-syntax-state)) | 8954 | (istate (car cperl-syntax-state)) |
| 7220 | start) | 8955 | start from-start edebug-backtrace-buffer) |
| 7221 | (and cperl-syntaxify-unwind | 8956 | (if (eq cperl-syntaxify-by-font-lock 'backtrace) |
| 7222 | (setq end (cperl-unwind-to-safe t end))) | 8957 | (progn |
| 7223 | (setq start (point)) | 8958 | (require 'edebug) |
| 8959 | (let ((f 'edebug-backtrace)) | ||
| 8960 | (funcall f)))) ; Avoid compile-time warning | ||
| 7224 | (or cperl-syntax-done-to | 8961 | (or cperl-syntax-done-to |
| 7225 | (setq cperl-syntax-done-to (point-min))) | 8962 | (setq cperl-syntax-done-to (point-min) |
| 7226 | (if (or (not (boundp 'font-lock-hot-pass)) | 8963 | from-start t)) |
| 7227 | (eval 'font-lock-hot-pass) | 8964 | (setq start (if (and cperl-hook-after-change |
| 7228 | t) ; Not debugged otherwise | 8965 | (not from-start)) |
| 7229 | ;; Need to forget what is after `start' | 8966 | cperl-syntax-done-to ; Fontify without change; ignore start |
| 7230 | (setq start (min cperl-syntax-done-to start)) | 8967 | ;; Need to forget what is after `start' |
| 7231 | ;; Fontification without a change | 8968 | (min cperl-syntax-done-to (point)))) |
| 7232 | (setq start (max cperl-syntax-done-to start))) | 8969 | (goto-char start) |
| 8970 | (beginning-of-line) | ||
| 8971 | (setq start (point)) | ||
| 8972 | (and cperl-syntaxify-unwind | ||
| 8973 | (setq end (cperl-unwind-to-safe t end) | ||
| 8974 | start (point))) | ||
| 7233 | (and (> end start) | 8975 | (and (> end start) |
| 7234 | (setq cperl-syntax-done-to start) ; In case what follows fails | 8976 | (setq cperl-syntax-done-to start) ; In case what follows fails |
| 7235 | (cperl-find-pods-heres start end t nil t)) | 8977 | (cperl-find-pods-heres start end t nil t)) |
| 7236 | (if (eq cperl-syntaxify-by-font-lock 'message) | 8978 | (if (memq cperl-syntaxify-by-font-lock '(backtrace message)) |
| 7237 | (message "Syntaxified %s..%s from %s to %s(%s), state %s-->%s" | 8979 | (message "Syxify req=%s..%s actual=%s..%s done-to: %s=>%s statepos: %s=>%s" |
| 7238 | dbg iend | 8980 | dbg iend start end idone cperl-syntax-done-to |
| 7239 | start end cperl-syntax-done-to | ||
| 7240 | istate (car cperl-syntax-state))) ; For debugging | 8981 | istate (car cperl-syntax-state))) ; For debugging |
| 7241 | nil)) ; Do not iterate | 8982 | nil)) ; Do not iterate |
| 7242 | 8983 | ||
| 7243 | (defun cperl-fontify-update (end) | 8984 | (defun cperl-fontify-update (end) |
| 7244 | (let ((pos (point)) prop posend) | 8985 | (let ((pos (point-min)) prop posend) |
| 8986 | (setq end (point-max)) | ||
| 7245 | (while (< pos end) | 8987 | (while (< pos end) |
| 7246 | (setq prop (get-text-property pos 'cperl-postpone)) | 8988 | (setq prop (get-text-property pos 'cperl-postpone) |
| 7247 | (setq posend (next-single-property-change pos 'cperl-postpone nil end)) | 8989 | posend (next-single-property-change pos 'cperl-postpone nil end)) |
| 7248 | (and prop (put-text-property pos posend (car prop) (cdr prop))) | 8990 | (and prop (put-text-property pos posend (car prop) (cdr prop))) |
| 7249 | (setq pos posend))) | 8991 | (setq pos posend))) |
| 7250 | nil) ; Do not iterate | 8992 | nil) ; Do not iterate |
| 7251 | 8993 | ||
| 8994 | (defun cperl-fontify-update-bad (end) | ||
| 8995 | ;; Since fontification happens with different region than syntaxification, | ||
| 8996 | ;; do to the end of buffer, not to END;;; likewise, start earlier if needed | ||
| 8997 | (let* ((pos (point)) (prop (get-text-property pos 'cperl-postpone)) posend) | ||
| 8998 | (if prop | ||
| 8999 | (setq pos (or (cperl-beginning-of-property | ||
| 9000 | (cperl-1+ pos) 'cperl-postpone) | ||
| 9001 | (point-min)))) | ||
| 9002 | (while (< pos end) | ||
| 9003 | (setq posend (next-single-property-change pos 'cperl-postpone)) | ||
| 9004 | (and prop (put-text-property pos posend (car prop) (cdr prop))) | ||
| 9005 | (setq pos posend) | ||
| 9006 | (setq prop (get-text-property pos 'cperl-postpone)))) | ||
| 9007 | nil) ; Do not iterate | ||
| 9008 | |||
| 9009 | ;; Called when any modification is made to buffer text. | ||
| 9010 | (defun cperl-after-change-function (beg end old-len) | ||
| 9011 | ;; We should have been informed about changes by `font-lock'. Since it | ||
| 9012 | ;; does not inform as which calls are defered, do it ourselves | ||
| 9013 | (if cperl-syntax-done-to | ||
| 9014 | (setq cperl-syntax-done-to (min cperl-syntax-done-to beg)))) | ||
| 9015 | |||
| 7252 | (defun cperl-update-syntaxification (from to) | 9016 | (defun cperl-update-syntaxification (from to) |
| 7253 | (if (and cperl-use-syntax-table-text-property | 9017 | (if (and cperl-use-syntax-table-text-property |
| 7254 | cperl-syntaxify-by-font-lock | 9018 | cperl-syntaxify-by-font-lock |
| @@ -7260,7 +9024,7 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." | |||
| 7260 | (cperl-fontify-syntaxically to))))) | 9024 | (cperl-fontify-syntaxically to))))) |
| 7261 | 9025 | ||
| 7262 | (defvar cperl-version | 9026 | (defvar cperl-version |
| 7263 | (let ((v "Revision: 5.0")) | 9027 | (let ((v "Revision: 5.22")) |
| 7264 | (string-match ":\\s *\\([0-9.]+\\)" v) | 9028 | (string-match ":\\s *\\([0-9.]+\\)" v) |
| 7265 | (substring v (match-beginning 1) (match-end 1))) | 9029 | (substring v (match-beginning 1) (match-end 1))) |
| 7266 | "Version of IZ-supported CPerl package this file is based on.") | 9030 | "Version of IZ-supported CPerl package this file is based on.") |
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index bce4381c614..9f27c8a60f1 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 8 | ;; Time-stamp: <2005-09-18 07:27:20 deego> | 8 | ;; Time-stamp: <2006/09/26 21:49:46 vinicius> |
| 9 | ;; Keywords: wp, ebnf, PostScript | 9 | ;; Keywords: wp, ebnf, PostScript |
| 10 | ;; Version: 4.2 | 10 | ;; Version: 4.3 |
| 11 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ | 11 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| 14 | 14 | ||
| @@ -27,8 +27,8 @@ | |||
| 27 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 27 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 28 | ;; Boston, MA 02110-1301, USA. | 28 | ;; Boston, MA 02110-1301, USA. |
| 29 | 29 | ||
| 30 | (defconst ebnf-version "4.2" | 30 | (defconst ebnf-version "4.3" |
| 31 | "ebnf2ps.el, v 4.2 <2004/04/04 vinicius> | 31 | "ebnf2ps.el, v 4.3 <2006/09/26 vinicius> |
| 32 | 32 | ||
| 33 | Vinicius's last change version. When reporting bugs, please also | 33 | Vinicius's last change version. When reporting bugs, please also |
| 34 | report the version of Emacs, if any, that ebnf2ps was running with. | 34 | report the version of Emacs, if any, that ebnf2ps was running with. |
| @@ -73,18 +73,18 @@ Please send all bug fixes and enhancements to | |||
| 73 | ;; ebnf2ps provides the following commands for generating PostScript syntactic | 73 | ;; ebnf2ps provides the following commands for generating PostScript syntactic |
| 74 | ;; chart images of Emacs buffers: | 74 | ;; chart images of Emacs buffers: |
| 75 | ;; | 75 | ;; |
| 76 | ;; ebnf-print-directory | 76 | ;; ebnf-print-directory |
| 77 | ;; ebnf-print-file | 77 | ;; ebnf-print-file |
| 78 | ;; ebnf-print-buffer | 78 | ;; ebnf-print-buffer |
| 79 | ;; ebnf-print-region | 79 | ;; ebnf-print-region |
| 80 | ;; ebnf-spool-directory | 80 | ;; ebnf-spool-directory |
| 81 | ;; ebnf-spool-file | 81 | ;; ebnf-spool-file |
| 82 | ;; ebnf-spool-buffer | 82 | ;; ebnf-spool-buffer |
| 83 | ;; ebnf-spool-region | 83 | ;; ebnf-spool-region |
| 84 | ;; ebnf-eps-directory | 84 | ;; ebnf-eps-directory |
| 85 | ;; ebnf-eps-file | 85 | ;; ebnf-eps-file |
| 86 | ;; ebnf-eps-buffer | 86 | ;; ebnf-eps-buffer |
| 87 | ;; ebnf-eps-region | 87 | ;; ebnf-eps-region |
| 88 | ;; | 88 | ;; |
| 89 | ;; These commands all perform essentially the same function: they generate | 89 | ;; These commands all perform essentially the same function: they generate |
| 90 | ;; PostScript syntactic chart images suitable for printing on a PostScript | 90 | ;; PostScript syntactic chart images suitable for printing on a PostScript |
| @@ -94,14 +94,14 @@ Please send all bug fixes and enhancements to | |||
| 94 | ;; The word "print", "spool" and "eps" in the command name determines when the | 94 | ;; The word "print", "spool" and "eps" in the command name determines when the |
| 95 | ;; PostScript image is sent to the printer (or file): | 95 | ;; PostScript image is sent to the printer (or file): |
| 96 | ;; | 96 | ;; |
| 97 | ;; print - The PostScript image is immediately sent to the printer; | 97 | ;; print - The PostScript image is immediately sent to the printer; |
| 98 | ;; | 98 | ;; |
| 99 | ;; spool - The PostScript image is saved temporarily in an Emacs buffer. | 99 | ;; spool - The PostScript image is saved temporarily in an Emacs buffer. |
| 100 | ;; Many images may be spooled locally before printing them. To | 100 | ;; Many images may be spooled locally before printing them. To |
| 101 | ;; send the spooled images to the printer, use the command | 101 | ;; send the spooled images to the printer, use the command |
| 102 | ;; `ebnf-despool'. | 102 | ;; `ebnf-despool'. |
| 103 | ;; | 103 | ;; |
| 104 | ;; eps - The PostScript image is immediately sent to a EPS file. | 104 | ;; eps - The PostScript image is immediately sent to a EPS file. |
| 105 | ;; | 105 | ;; |
| 106 | ;; The spooling mechanism is the same as used by ps-print and was designed for | 106 | ;; The spooling mechanism is the same as used by ps-print and was designed for |
| 107 | ;; printing lots of small files to save paper that would otherwise be wasted on | 107 | ;; printing lots of small files to save paper that would otherwise be wasted on |
| @@ -120,22 +120,22 @@ Please send all bug fixes and enhancements to | |||
| 120 | ;; The word "directory", "file", "buffer" or "region" in the command name | 120 | ;; The word "directory", "file", "buffer" or "region" in the command name |
| 121 | ;; determines how much of the buffer is printed: | 121 | ;; determines how much of the buffer is printed: |
| 122 | ;; | 122 | ;; |
| 123 | ;; directory - Read files in the directory and print them. | 123 | ;; directory - Read files in the directory and print them. |
| 124 | ;; | 124 | ;; |
| 125 | ;; file - Read file and print it. | 125 | ;; file - Read file and print it. |
| 126 | ;; | 126 | ;; |
| 127 | ;; buffer - Print the entire buffer. | 127 | ;; buffer - Print the entire buffer. |
| 128 | ;; | 128 | ;; |
| 129 | ;; region - Print just the current region. | 129 | ;; region - Print just the current region. |
| 130 | ;; | 130 | ;; |
| 131 | ;; Two ebnf- command examples: | 131 | ;; Two ebnf- command examples: |
| 132 | ;; | 132 | ;; |
| 133 | ;; ebnf-print-buffer - translate and print the entire buffer, and send it | 133 | ;; ebnf-print-buffer - translate and print the entire buffer, and send it |
| 134 | ;; immediately to the printer. | 134 | ;; immediately to the printer. |
| 135 | ;; | 135 | ;; |
| 136 | ;; ebnf-spool-region - translate and print just the current region, and | 136 | ;; ebnf-spool-region - translate and print just the current region, and |
| 137 | ;; spool the image in Emacs to send to the printer | 137 | ;; spool the image in Emacs to send to the printer |
| 138 | ;; later. | 138 | ;; later. |
| 139 | ;; | 139 | ;; |
| 140 | ;; Note that `ebnf-eps-directory', `ebnf-eps-file', `ebnf-eps-buffer' and | 140 | ;; Note that `ebnf-eps-directory', `ebnf-eps-file', `ebnf-eps-buffer' and |
| 141 | ;; `ebnf-eps-region' never spool the EPS image, so they don't use the ps-print | 141 | ;; `ebnf-eps-region' never spool the EPS image, so they don't use the ps-print |
| @@ -148,13 +148,13 @@ Please send all bug fixes and enhancements to | |||
| 148 | ;; | 148 | ;; |
| 149 | ;; To translate and print your buffer, type | 149 | ;; To translate and print your buffer, type |
| 150 | ;; | 150 | ;; |
| 151 | ;; M-x ebnf-print-buffer | 151 | ;; M-x ebnf-print-buffer |
| 152 | ;; | 152 | ;; |
| 153 | ;; or substitute one of the other four ebnf- commands. The command will | 153 | ;; or substitute one of the other four ebnf- commands. The command will |
| 154 | ;; generate the PostScript image and print or spool it as specified. By giving | 154 | ;; generate the PostScript image and print or spool it as specified. By giving |
| 155 | ;; the command a prefix argument | 155 | ;; the command a prefix argument |
| 156 | ;; | 156 | ;; |
| 157 | ;; C-u M-x ebnf-print-buffer | 157 | ;; C-u M-x ebnf-print-buffer |
| 158 | ;; | 158 | ;; |
| 159 | ;; it will save the PostScript image to a file instead of sending it to the | 159 | ;; it will save the PostScript image to a file instead of sending it to the |
| 160 | ;; printer; you will be prompted for the name of the file to save the image to. | 160 | ;; printer; you will be prompted for the name of the file to save the image to. |
| @@ -162,7 +162,7 @@ Please send all bug fixes and enhancements to | |||
| 162 | ;; you may save the spooled images to a file by giving a prefix argument to | 162 | ;; you may save the spooled images to a file by giving a prefix argument to |
| 163 | ;; `ebnf-despool': | 163 | ;; `ebnf-despool': |
| 164 | ;; | 164 | ;; |
| 165 | ;; C-u M-x ebnf-despool | 165 | ;; C-u M-x ebnf-despool |
| 166 | ;; | 166 | ;; |
| 167 | ;; When invoked this way, `ebnf-despool' will prompt you for the name of the | 167 | ;; When invoked this way, `ebnf-despool' will prompt you for the name of the |
| 168 | ;; file to save to. | 168 | ;; file to save to. |
| @@ -172,9 +172,9 @@ Please send all bug fixes and enhancements to | |||
| 172 | ;; | 172 | ;; |
| 173 | ;; Any of the `ebnf-' commands can be bound to keys. Here are some examples: | 173 | ;; Any of the `ebnf-' commands can be bound to keys. Here are some examples: |
| 174 | ;; | 174 | ;; |
| 175 | ;; (global-set-key 'f22 'ebnf-print-buffer) ;f22 is prsc | 175 | ;; (global-set-key 'f22 'ebnf-print-buffer) ;f22 is prsc |
| 176 | ;; (global-set-key '(shift f22) 'ebnf-print-region) | 176 | ;; (global-set-key '(shift f22) 'ebnf-print-region) |
| 177 | ;; (global-set-key '(control f22) 'ebnf-despool) | 177 | ;; (global-set-key '(control f22) 'ebnf-despool) |
| 178 | ;; | 178 | ;; |
| 179 | ;; | 179 | ;; |
| 180 | ;; Invoking Ebnf2ps in Batch | 180 | ;; Invoking Ebnf2ps in Batch |
| @@ -523,14 +523,14 @@ Please send all bug fixes and enhancements to | |||
| 523 | ;; | 523 | ;; |
| 524 | ;; The following table summarizes the results: | 524 | ;; The following table summarizes the results: |
| 525 | ;; | 525 | ;; |
| 526 | ;; EPS FILE NAME NO SORT ASCENDING SORT DESCENDING SORT | 526 | ;; EPS FILE NAME NO SORT ASCENDING SORT DESCENDING SORT |
| 527 | ;; ebnf--AA.eps A C A C C A | 527 | ;; ebnf--AA.eps A C A C C A |
| 528 | ;; ebnf--BB.eps C B B C C B | 528 | ;; ebnf--BB.eps C B B C C B |
| 529 | ;; ebnf--CC.eps A C B F A B C F F C B A | 529 | ;; ebnf--CC.eps A C B F A B C F F C B A |
| 530 | ;; ebnf--D.eps D D D | 530 | ;; ebnf--D.eps D D D |
| 531 | ;; ebnf--E.eps E E E | 531 | ;; ebnf--E.eps E E E |
| 532 | ;; ebnf--G.eps G G G | 532 | ;; ebnf--G.eps G G G |
| 533 | ;; ebnf--Z.eps Z Z Z | 533 | ;; ebnf--Z.eps Z Z Z |
| 534 | ;; | 534 | ;; |
| 535 | ;; As you can see if EPS actions is not used, each single production is | 535 | ;; As you can see if EPS actions is not used, each single production is |
| 536 | ;; generated per EPS file. To avoid overriding EPS files, use names in ;[ that | 536 | ;; generated per EPS file. To avoid overriding EPS files, use names in ;[ that |
| @@ -692,6 +692,11 @@ Please send all bug fixes and enhancements to | |||
| 692 | ;; | 692 | ;; |
| 693 | ;; `ebnf-line-color' Specify flow line color. | 693 | ;; `ebnf-line-color' Specify flow line color. |
| 694 | ;; | 694 | ;; |
| 695 | ;; `ebnf-arrow-extra-width' Specify extra width for arrow shape | ||
| 696 | ;; drawing. | ||
| 697 | ;; | ||
| 698 | ;; `ebnf-arrow-scale' Specify the arrow scale. | ||
| 699 | ;; | ||
| 695 | ;; `ebnf-user-arrow' Specify a sexp for user arrow shape (a | 700 | ;; `ebnf-user-arrow' Specify a sexp for user arrow shape (a |
| 696 | ;; PostScript code). | 701 | ;; PostScript code). |
| 697 | ;; | 702 | ;; |
| @@ -824,6 +829,8 @@ Please send all bug fixes and enhancements to | |||
| 824 | ;; entry is the vertical position used to know where it should | 829 | ;; entry is the vertical position used to know where it should |
| 825 | ;; be drawn the flow line in the current element. | 830 | ;; be drawn the flow line in the current element. |
| 826 | ;; | 831 | ;; |
| 832 | ;; extra is given by `ebnf-arrow-extra-width'. | ||
| 833 | ;; | ||
| 827 | ;; | 834 | ;; |
| 828 | ;; * SPECIAL, TERMINAL and NON-TERMINAL | 835 | ;; * SPECIAL, TERMINAL and NON-TERMINAL |
| 829 | ;; | 836 | ;; |
| @@ -835,17 +842,17 @@ Please send all bug fixes and enhancements to | |||
| 835 | ;; : | : : | : } font height / 2 } | 842 | ;; : | : : | : } font height / 2 } |
| 836 | ;; : +==============+...:............................... | 843 | ;; : +==============+...:............................... |
| 837 | ;; : : : : : : | 844 | ;; : : : : : : |
| 838 | ;; : : : : : :...................... | 845 | ;; : : : : : :......................... |
| 839 | ;; : : : : : } font height } | 846 | ;; : : : : : } font height } |
| 840 | ;; : : : : :....... } | 847 | ;; : : : : :....... } |
| 841 | ;; : : : : } font height / 2 } | 848 | ;; : : : : } font height / 2 } |
| 842 | ;; : : : :........... } | 849 | ;; : : : :........... } |
| 843 | ;; : : : } text width } width | 850 | ;; : : : } text width } width |
| 844 | ;; : : :.................. } | 851 | ;; : : :.................. } |
| 845 | ;; : : } font height / 2 } | 852 | ;; : : } font height / 2 } |
| 846 | ;; : :...................... } | 853 | ;; : :...................... } |
| 847 | ;; : } font height } | 854 | ;; : } font height + extra } |
| 848 | ;; :............................................. | 855 | ;; :................................................. |
| 849 | ;; | 856 | ;; |
| 850 | ;; | 857 | ;; |
| 851 | ;; * OPTIONAL | 858 | ;; * OPTIONAL |
| @@ -976,21 +983,21 @@ Please send all bug fixes and enhancements to | |||
| 976 | ;; : | : : : : | : } font height / 2 } | 983 | ;; : | : : : : | : } font height / 2 } |
| 977 | ;; : +================+...:............................... | 984 | ;; : +================+...:............................... |
| 978 | ;; : : : : : : : : | 985 | ;; : : : : : : : : |
| 979 | ;; : : : : : : : :...................... | 986 | ;; : : : : : : : :.......................... |
| 980 | ;; : : : : : : : } font height } | 987 | ;; : : : : : : : } font height } |
| 981 | ;; : : : : : : :....... } | 988 | ;; : : : : : : :....... } |
| 982 | ;; : : : : : : } font height / 2 } | 989 | ;; : : : : : : } font height / 2 } |
| 983 | ;; : : : : : :........... } | 990 | ;; : : : : : :........... } |
| 984 | ;; : : : : : } X width } | 991 | ;; : : : : : } X width } |
| 985 | ;; : : : : :............... } | 992 | ;; : : : : :............... } |
| 986 | ;; : : : : } font height / 2 } width | 993 | ;; : : : : } font height / 2 } width |
| 987 | ;; : : : :.................. } | 994 | ;; : : : :.................. } |
| 988 | ;; : : : } text width } | 995 | ;; : : : } text width } |
| 989 | ;; : : :..................... } | 996 | ;; : : :..................... } |
| 990 | ;; : : } font height / 2 } | 997 | ;; : : } font height / 2 } |
| 991 | ;; : :........................ } | 998 | ;; : :........................ } |
| 992 | ;; : } font height } | 999 | ;; : } font height + extra } |
| 993 | ;; :............................................... | 1000 | ;; :................................................... |
| 994 | ;; | 1001 | ;; |
| 995 | ;; | 1002 | ;; |
| 996 | ;; * EXCEPT | 1003 | ;; * EXCEPT |
| @@ -1003,21 +1010,21 @@ Please send all bug fixes and enhancements to | |||
| 1003 | ;; : | : : : : | : } font height / 2 } | 1010 | ;; : | : : : : | : } font height / 2 } |
| 1004 | ;; : +==================+...:............................... | 1011 | ;; : +==================+...:............................... |
| 1005 | ;; : : : : : : : : | 1012 | ;; : : : : : : : : |
| 1006 | ;; : : : : : : : :...................... | 1013 | ;; : : : : : : : :.......................... |
| 1007 | ;; : : : : : : : } font height } | 1014 | ;; : : : : : : : } font height } |
| 1008 | ;; : : : : : : :....... } | 1015 | ;; : : : : : : :....... } |
| 1009 | ;; : : : : : : } font height / 2 } | 1016 | ;; : : : : : : } font height / 2 } |
| 1010 | ;; : : : : : :........... } | 1017 | ;; : : : : : :........... } |
| 1011 | ;; : : : : : } Y width } | 1018 | ;; : : : : : } Y width } |
| 1012 | ;; : : : : :............... } | 1019 | ;; : : : : :............... } |
| 1013 | ;; : : : : } font height } width | 1020 | ;; : : : : } font height } width |
| 1014 | ;; : : : :................... } | 1021 | ;; : : : :................... } |
| 1015 | ;; : : : } X width } | 1022 | ;; : : : } X width } |
| 1016 | ;; : : :....................... } | 1023 | ;; : : :....................... } |
| 1017 | ;; : : } font height / 2 } | 1024 | ;; : : } font height / 2 } |
| 1018 | ;; : :.......................... } | 1025 | ;; : :.......................... } |
| 1019 | ;; : } font height } | 1026 | ;; : } font height + extra } |
| 1020 | ;; :................................................. | 1027 | ;; :..................................................... |
| 1021 | ;; | 1028 | ;; |
| 1022 | ;; NOTE: If Y element is empty, it's draw nothing at Y place. | 1029 | ;; NOTE: If Y element is empty, it's draw nothing at Y place. |
| 1023 | ;; | 1030 | ;; |
| @@ -1089,7 +1096,8 @@ Please send all bug fixes and enhancements to | |||
| 1089 | ;; ---------------- | 1096 | ;; ---------------- |
| 1090 | ;; | 1097 | ;; |
| 1091 | ;; Thanks to Drew Adams <drew.adams@oracle.com> for suggestions: | 1098 | ;; Thanks to Drew Adams <drew.adams@oracle.com> for suggestions: |
| 1092 | ;; - `ebnf-production-name-p', `ebnf-stop-on-error', | 1099 | ;; - `ebnf-arrow-extra-width', `ebnf-arrow-scale', |
| 1100 | ;; `ebnf-production-name-p', `ebnf-stop-on-error', | ||
| 1093 | ;; `ebnf-file-suffix-regexp'and `ebnf-special-show-delimiter' variables. | 1101 | ;; `ebnf-file-suffix-regexp'and `ebnf-special-show-delimiter' variables. |
| 1094 | ;; - `ebnf-delete-style', `ebnf-eps-file' and `ebnf-eps-directory' | 1102 | ;; - `ebnf-delete-style', `ebnf-eps-file' and `ebnf-eps-directory' |
| 1095 | ;; commands. | 1103 | ;; commands. |
| @@ -1911,6 +1919,29 @@ special." | |||
| 1911 | :group 'ebnf2ps) | 1919 | :group 'ebnf2ps) |
| 1912 | 1920 | ||
| 1913 | 1921 | ||
| 1922 | (defcustom ebnf-arrow-extra-width | ||
| 1923 | (if (eq ebnf-arrow-shape 'none) | ||
| 1924 | 0.0 | ||
| 1925 | (* (sqrt 5.0) 0.65 ebnf-line-width)) | ||
| 1926 | "*Specify extra width for arrow shape drawing. | ||
| 1927 | |||
| 1928 | The extra width is used to avoid that the arrowhead and the terminal border | ||
| 1929 | overlap. It depens on `ebnf-arrow-shape' and `ebnf-line-width'." | ||
| 1930 | :type 'number | ||
| 1931 | :version "22" | ||
| 1932 | :group 'ebnf-shape) | ||
| 1933 | |||
| 1934 | |||
| 1935 | (defcustom ebnf-arrow-scale 1.0 | ||
| 1936 | "*Specify the arrow scale. | ||
| 1937 | |||
| 1938 | Values lower than 1.0, shrink the arrow. | ||
| 1939 | Values greater than 1.0, expand the arrow." | ||
| 1940 | :type 'number | ||
| 1941 | :version "22" | ||
| 1942 | :group 'ebnf-shape) | ||
| 1943 | |||
| 1944 | |||
| 1914 | (defcustom ebnf-debug-ps nil | 1945 | (defcustom ebnf-debug-ps nil |
| 1915 | "*Non-nil means to generate PostScript debug procedures. | 1946 | "*Non-nil means to generate PostScript debug procedures. |
| 1916 | 1947 | ||
| @@ -2859,9 +2890,9 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and | |||
| 2859 | /HeightNT FontHeight FontHeight add def | 2890 | /HeightNT FontHeight FontHeight add def |
| 2860 | 2891 | ||
| 2861 | /T HeightT HeightNT add 0.5 mul def | 2892 | /T HeightT HeightNT add 0.5 mul def |
| 2862 | /hT T 0.5 mul def | 2893 | /hT T 0.5 mul def |
| 2863 | /hT2 hT 0.5 mul def | 2894 | /hT2 hT 0.5 mul ArrowScale mul def |
| 2864 | /hT4 hT 0.25 mul def | 2895 | /hT4 hT 0.25 mul ArrowScale mul def |
| 2865 | 2896 | ||
| 2866 | /Er 0.1 def % Error factor | 2897 | /Er 0.1 def % Error factor |
| 2867 | 2898 | ||
| @@ -2947,6 +2978,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and | |||
| 2947 | RA-vector ArrowShape get exec | 2978 | RA-vector ArrowShape get exec |
| 2948 | Gstroke | 2979 | Gstroke |
| 2949 | moveto | 2980 | moveto |
| 2981 | ExtraWidth 0 rmoveto | ||
| 2950 | }def | 2982 | }def |
| 2951 | 2983 | ||
| 2952 | % rotation DrawArrow | 2984 | % rotation DrawArrow |
| @@ -3245,7 +3277,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and | |||
| 3245 | % string width prepare-width |- string | 3277 | % string width prepare-width |- string |
| 3246 | /prepare-width | 3278 | /prepare-width |
| 3247 | {/width exch def | 3279 | {/width exch def |
| 3248 | dup stringwidth pop space add space add width exch sub 0.5 mul | 3280 | dup stringwidth pop space add space add width exch sub ExtraWidth sub 0.5 mul |
| 3249 | /w exch def | 3281 | /w exch def |
| 3250 | }def | 3282 | }def |
| 3251 | 3283 | ||
| @@ -4877,7 +4909,6 @@ killed after process termination." | |||
| 4877 | (progn | 4909 | (progn |
| 4878 | ;; adjust creator comment | 4910 | ;; adjust creator comment |
| 4879 | (end-of-line) | 4911 | (end-of-line) |
| 4880 | (backward-char) | ||
| 4881 | (insert " & ebnf2ps v" ebnf-version) | 4912 | (insert " & ebnf2ps v" ebnf-version) |
| 4882 | ;; insert ebnf settings & engine | 4913 | ;; insert ebnf settings & engine |
| 4883 | (goto-char (point-max)) | 4914 | (goto-char (point-max)) |
| @@ -5066,6 +5097,10 @@ killed after process termination." | |||
| 5066 | (format "/ShadowR %s def\n" | 5097 | (format "/ShadowR %s def\n" |
| 5067 | (ebnf-boolean ebnf-repeat-shadow)) | 5098 | (ebnf-boolean ebnf-repeat-shadow)) |
| 5068 | ;; miscellaneous | 5099 | ;; miscellaneous |
| 5100 | (format "/ExtraWidth %s def\n" | ||
| 5101 | (ebnf-format-float ebnf-arrow-extra-width)) | ||
| 5102 | (format "/ArrowScale %s def\n" | ||
| 5103 | (ebnf-format-float ebnf-arrow-scale)) | ||
| 5069 | (format "/DefaultWidth %s def\n" | 5104 | (format "/DefaultWidth %s def\n" |
| 5070 | (ebnf-format-float ebnf-default-width)) | 5105 | (ebnf-format-float ebnf-default-width)) |
| 5071 | (format "/LineWidth %s def\n" | 5106 | (format "/LineWidth %s def\n" |
| @@ -5152,7 +5187,7 @@ killed after process termination." | |||
| 5152 | (len (length (ebnf-node-name node)))) | 5187 | (len (length (ebnf-node-name node)))) |
| 5153 | (ebnf-node-entry node (* height 0.5)) | 5188 | (ebnf-node-entry node (* height 0.5)) |
| 5154 | (ebnf-node-height node height) | 5189 | (ebnf-node-height node height) |
| 5155 | (ebnf-node-width node (+ ebnf-basic-width space | 5190 | (ebnf-node-width node (+ ebnf-basic-width ebnf-arrow-extra-width space |
| 5156 | (* len font-width) | 5191 | (* len font-width) |
| 5157 | space ebnf-basic-width)))) | 5192 | space ebnf-basic-width)))) |
| 5158 | 5193 | ||
| @@ -5173,6 +5208,7 @@ killed after process termination." | |||
| 5173 | ebnf-font-height-S) | 5208 | ebnf-font-height-S) |
| 5174 | ebnf-space-R ebnf-space-R)) | 5209 | ebnf-space-R ebnf-space-R)) |
| 5175 | (ebnf-node-width repeat (+ (ebnf-node-width element) | 5210 | (ebnf-node-width repeat (+ (ebnf-node-width element) |
| 5211 | ebnf-arrow-extra-width | ||
| 5176 | ebnf-space-R ebnf-space-R ebnf-space-R | 5212 | ebnf-space-R ebnf-space-R ebnf-space-R |
| 5177 | ebnf-horizontal-space | 5213 | ebnf-horizontal-space |
| 5178 | (* (length times) ebnf-font-width-R))))) | 5214 | (* (length times) ebnf-font-width-R))))) |
| @@ -5194,6 +5230,7 @@ killed after process termination." | |||
| 5194 | ebnf-space-E ebnf-space-E)) | 5230 | ebnf-space-E ebnf-space-E)) |
| 5195 | (ebnf-node-width except (+ (ebnf-node-width factor) | 5231 | (ebnf-node-width except (+ (ebnf-node-width factor) |
| 5196 | (ebnf-node-width element) | 5232 | (ebnf-node-width element) |
| 5233 | ebnf-arrow-extra-width | ||
| 5197 | ebnf-space-E ebnf-space-E | 5234 | ebnf-space-E ebnf-space-E |
| 5198 | ebnf-space-E ebnf-space-E | 5235 | ebnf-space-E ebnf-space-E |
| 5199 | ebnf-font-width-E | 5236 | ebnf-font-width-E |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f45bb2fe524..52360a73970 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -782,7 +782,7 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 782 | 782 | ||
| 783 | (defconst gdb-var-list-children-regexp | 783 | (defconst gdb-var-list-children-regexp |
| 784 | "child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\ | 784 | "child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\ |
| 785 | numchild=\"\\(.*?\\)\",.*?type=\"\\(.*?\\)\".*?}") | 785 | numchild=\"\\(.*?\\)\"\\(}\\|,.*?\\(type=\"\\(.*?\\)\"\\)?.*?}\\)") |
| 786 | 786 | ||
| 787 | (defun gdb-var-list-children-handler (varnum) | 787 | (defun gdb-var-list-children-handler (varnum) |
| 788 | (goto-char (point-min)) | 788 | (goto-char (point-min)) |
| @@ -796,7 +796,7 @@ numchild=\"\\(.*?\\)\",.*?type=\"\\(.*?\\)\".*?}") | |||
| 796 | (let ((varchild (list (match-string 1) | 796 | (let ((varchild (list (match-string 1) |
| 797 | (match-string 2) | 797 | (match-string 2) |
| 798 | (match-string 3) | 798 | (match-string 3) |
| 799 | (match-string 4) | 799 | (match-string 6) |
| 800 | nil nil))) | 800 | nil nil))) |
| 801 | (if (assoc (car varchild) gdb-var-list) | 801 | (if (assoc (car varchild) gdb-var-list) |
| 802 | (throw 'child-already-watched nil)) | 802 | (throw 'child-already-watched nil)) |
| @@ -902,20 +902,23 @@ Changed values are highlighted with the face `font-lock-warning-face'." | |||
| 902 | TEXT is the text of the button we clicked on, a + or - item. | 902 | TEXT is the text of the button we clicked on, a + or - item. |
| 903 | TOKEN is data related to this node. | 903 | TOKEN is data related to this node. |
| 904 | INDENT is the current indentation depth." | 904 | INDENT is the current indentation depth." |
| 905 | (cond ((string-match "+" text) ;expand this node | 905 | (if (and gud-comint-buffer (buffer-name gud-comint-buffer)) |
| 906 | (if (and | 906 | (progn |
| 907 | (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 907 | (cond ((string-match "+" text) ;expand this node |
| 908 | (string-equal gdb-version "pre-6.4")) | 908 | (if (and (eq (buffer-local-value |
| 909 | (gdb-var-list-children token) | 909 | 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 910 | (gdb-var-list-children-1 token))) | 910 | (string-equal gdb-version "pre-6.4")) |
| 911 | ((string-match "-" text) ;contract this node | 911 | (gdb-var-list-children token) |
| 912 | (dolist (var gdb-var-list) | 912 | (gdb-var-list-children-1 token))) |
| 913 | (if (string-match (concat token "\\.") (car var)) | 913 | ((string-match "-" text) ;contract this node |
| 914 | (setq gdb-var-list (delq var gdb-var-list)))) | 914 | (dolist (var gdb-var-list) |
| 915 | (speedbar-change-expand-button-char ?+) | 915 | (if (string-match (concat token "\\.") (car var)) |
| 916 | (speedbar-delete-subblock indent)) | 916 | (setq gdb-var-list (delq var gdb-var-list)))) |
| 917 | (t (error "Ooops... not sure what to do"))) | 917 | (speedbar-change-expand-button-char ?+) |
| 918 | (speedbar-center-buffer-smartly)) | 918 | (speedbar-delete-subblock indent)) |
| 919 | (t (error "Ooops... not sure what to do"))) | ||
| 920 | (speedbar-center-buffer-smartly)) | ||
| 921 | (message-box "GUD session has been killed"))) | ||
| 919 | 922 | ||
| 920 | (defun gdb-get-target-string () | 923 | (defun gdb-get-target-string () |
| 921 | (with-current-buffer gud-comint-buffer | 924 | (with-current-buffer gud-comint-buffer |
| @@ -1132,7 +1135,7 @@ This filter may simply queue input for a later time." | |||
| 1132 | (if gdb-prompting | 1135 | (if gdb-prompting |
| 1133 | (progn | 1136 | (progn |
| 1134 | (gdb-send-item item) | 1137 | (gdb-send-item item) |
| 1135 | (setq gdb-prompting nil)) | 1138 | (setq gdb-prompting nil)) |
| 1136 | (push item gdb-input-queue)))) | 1139 | (push item gdb-input-queue)))) |
| 1137 | 1140 | ||
| 1138 | (defun gdb-dequeue-input () | 1141 | (defun gdb-dequeue-input () |
| @@ -3346,7 +3349,8 @@ is set in them." | |||
| 3346 | 3349 | ||
| 3347 | (defconst gdb-var-list-children-regexp-1 | 3350 | (defconst gdb-var-list-children-regexp-1 |
| 3348 | "child={.*?name=\"\\(.+?\\)\",.*?exp=\"\\(.+?\\)\",.*?\ | 3351 | "child={.*?name=\"\\(.+?\\)\",.*?exp=\"\\(.+?\\)\",.*?\ |
| 3349 | numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | 3352 | numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\)\ |
| 3353 | \\(}\\|,.*?\\(type=\"\\(.+?\\)\"\\)?.*?}\\)") | ||
| 3350 | 3354 | ||
| 3351 | (defun gdb-var-list-children-handler-1 (varnum) | 3355 | (defun gdb-var-list-children-handler-1 (varnum) |
| 3352 | (goto-char (point-min)) | 3356 | (goto-char (point-min)) |
| @@ -3360,7 +3364,7 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | |||
| 3360 | (let ((varchild (list (match-string 1) | 3364 | (let ((varchild (list (match-string 1) |
| 3361 | (match-string 2) | 3365 | (match-string 2) |
| 3362 | (match-string 3) | 3366 | (match-string 3) |
| 3363 | (match-string 5) | 3367 | (match-string 7) |
| 3364 | (read (match-string 4)) | 3368 | (read (match-string 4)) |
| 3365 | nil))) | 3369 | nil))) |
| 3366 | (if (assoc (car varchild) gdb-var-list) | 3370 | (if (assoc (car varchild) gdb-var-list) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 84b40e8ba80..b42e1b7fdc7 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -456,8 +456,8 @@ required by the caller." | |||
| 456 | (while var-list | 456 | (while var-list |
| 457 | (let* (char (depth 0) (start 0) (var (car var-list)) | 457 | (let* (char (depth 0) (start 0) (var (car var-list)) |
| 458 | (varnum (car var)) (expr (nth 1 var)) | 458 | (varnum (car var)) (expr (nth 1 var)) |
| 459 | (type (nth 3 var)) (value (nth 4 var)) | 459 | (type (if (nth 3 var) (nth 3 var) " ")) |
| 460 | (status (nth 5 var))) | 460 | (value (nth 4 var)) (status (nth 5 var))) |
| 461 | (put-text-property | 461 | (put-text-property |
| 462 | 0 (length expr) 'face font-lock-variable-name-face expr) | 462 | 0 (length expr) 'face font-lock-variable-name-face expr) |
| 463 | (put-text-property | 463 | (put-text-property |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 2f26c90ac21..52cfa602e59 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -75,7 +75,7 @@ | |||
| 75 | ;; of the documentation is available from the maintainers webpage (see | 75 | ;; of the documentation is available from the maintainers webpage (see |
| 76 | ;; SOURCE). | 76 | ;; SOURCE). |
| 77 | ;; | 77 | ;; |
| 78 | ;; | 78 | ;; |
| 79 | ;; ACKNOWLEDGMENTS | 79 | ;; ACKNOWLEDGMENTS |
| 80 | ;; =============== | 80 | ;; =============== |
| 81 | ;; | 81 | ;; |
| @@ -125,7 +125,7 @@ | |||
| 125 | ;; up inserting the character that expanded the abbrev after moving | 125 | ;; up inserting the character that expanded the abbrev after moving |
| 126 | ;; point backward, e.g., "\cl" expanded with a space becomes | 126 | ;; point backward, e.g., "\cl" expanded with a space becomes |
| 127 | ;; "LONG( )" with point before the close paren. This is solved by | 127 | ;; "LONG( )" with point before the close paren. This is solved by |
| 128 | ;; using a temporary function in `post-command-hook' - not pretty, | 128 | ;; using a temporary function in `post-command-hook' - not pretty, |
| 129 | ;; but it works. | 129 | ;; but it works. |
| 130 | ;; | 130 | ;; |
| 131 | ;; Tabs and spaces are treated equally as whitespace when filling a | 131 | ;; Tabs and spaces are treated equally as whitespace when filling a |
| @@ -178,13 +178,13 @@ | |||
| 178 | nil ;; We've got what we needed | 178 | nil ;; We've got what we needed |
| 179 | ;; We have the old or no custom-library, hack around it! | 179 | ;; We have the old or no custom-library, hack around it! |
| 180 | (defmacro defgroup (&rest args) nil) | 180 | (defmacro defgroup (&rest args) nil) |
| 181 | (defmacro defcustom (var value doc &rest args) | 181 | (defmacro defcustom (var value doc &rest args) |
| 182 | `(defvar ,var ,value ,doc)))) | 182 | `(defvar ,var ,value ,doc)))) |
| 183 | 183 | ||
| 184 | (defgroup idlwave nil | 184 | (defgroup idlwave nil |
| 185 | "Major mode for editing IDL .pro files." | 185 | "Major mode for editing IDL .pro files." |
| 186 | :tag "IDLWAVE" | 186 | :tag "IDLWAVE" |
| 187 | :link '(url-link :tag "Home Page" | 187 | :link '(url-link :tag "Home Page" |
| 188 | "http://idlwave.org") | 188 | "http://idlwave.org") |
| 189 | :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" | 189 | :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" |
| 190 | "idlw-shell.el") | 190 | "idlw-shell.el") |
| @@ -298,8 +298,8 @@ extends to the end of the match for the regular expression." | |||
| 298 | 298 | ||
| 299 | (defcustom idlwave-auto-fill-split-string t | 299 | (defcustom idlwave-auto-fill-split-string t |
| 300 | "*If non-nil then auto fill will split strings with the IDL `+' operator. | 300 | "*If non-nil then auto fill will split strings with the IDL `+' operator. |
| 301 | When the line end falls within a string, string concatenation with the | 301 | When the line end falls within a string, string concatenation with the |
| 302 | '+' operator will be used to distribute a long string over lines. | 302 | '+' operator will be used to distribute a long string over lines. |
| 303 | If nil and a string is split then a terminal beep and warning are issued. | 303 | If nil and a string is split then a terminal beep and warning are issued. |
| 304 | 304 | ||
| 305 | This variable is ignored when `idlwave-fill-comment-line-only' is | 305 | This variable is ignored when `idlwave-fill-comment-line-only' is |
| @@ -418,7 +418,7 @@ t All available | |||
| 418 | (const :tag "When saving a buffer" save-buffer) | 418 | (const :tag "When saving a buffer" save-buffer) |
| 419 | (const :tag "After a buffer was killed" kill-buffer) | 419 | (const :tag "After a buffer was killed" kill-buffer) |
| 420 | (const :tag "After a buffer was compiled successfully, update shell info" compile-buffer)))) | 420 | (const :tag "After a buffer was compiled successfully, update shell info" compile-buffer)))) |
| 421 | 421 | ||
| 422 | (defcustom idlwave-rinfo-max-source-lines 5 | 422 | (defcustom idlwave-rinfo-max-source-lines 5 |
| 423 | "*Maximum number of source files displayed in the Routine Info window. | 423 | "*Maximum number of source files displayed in the Routine Info window. |
| 424 | When an integer, it is the maximum number of source files displayed. | 424 | When an integer, it is the maximum number of source files displayed. |
| @@ -453,7 +453,7 @@ value of `!DIR'. See also `idlwave-library-path'." | |||
| 453 | :type 'directory) | 453 | :type 'directory) |
| 454 | 454 | ||
| 455 | ;; Configuration files | 455 | ;; Configuration files |
| 456 | (defcustom idlwave-config-directory | 456 | (defcustom idlwave-config-directory |
| 457 | (convert-standard-filename "~/.idlwave") | 457 | (convert-standard-filename "~/.idlwave") |
| 458 | "*Directory for configuration files and user-library catalog." | 458 | "*Directory for configuration files and user-library catalog." |
| 459 | :group 'idlwave-routine-info | 459 | :group 'idlwave-routine-info |
| @@ -469,7 +469,7 @@ value of `!DIR'. See also `idlwave-library-path'." | |||
| 469 | (defcustom idlwave-special-lib-alist nil | 469 | (defcustom idlwave-special-lib-alist nil |
| 470 | "Alist of regular expressions matching special library directories. | 470 | "Alist of regular expressions matching special library directories. |
| 471 | When listing routine source locations, IDLWAVE gives a short hint where | 471 | When listing routine source locations, IDLWAVE gives a short hint where |
| 472 | the file defining the routine is located. By default it lists `SystemLib' | 472 | the file defining the routine is located. By default it lists `SystemLib' |
| 473 | for routines in the system library `!DIR/lib' and `Library' for anything | 473 | for routines in the system library `!DIR/lib' and `Library' for anything |
| 474 | else. This variable can define additional types. The car of each entry | 474 | else. This variable can define additional types. The car of each entry |
| 475 | is a regular expression matching the file name (they normally will match | 475 | is a regular expression matching the file name (they normally will match |
| @@ -480,7 +480,7 @@ chars are allowed." | |||
| 480 | (cons regexp string))) | 480 | (cons regexp string))) |
| 481 | 481 | ||
| 482 | (defcustom idlwave-auto-write-paths t | 482 | (defcustom idlwave-auto-write-paths t |
| 483 | "Write out path (!PATH) and system directory (!DIR) info automatically. | 483 | "Write out path (!PATH) and system directory (!DIR) info automatically. |
| 484 | Path info is needed to locate library catalog files. If non-nil, | 484 | Path info is needed to locate library catalog files. If non-nil, |
| 485 | whenever the path-list changes as a result of shell-query, etc., it is | 485 | whenever the path-list changes as a result of shell-query, etc., it is |
| 486 | written to file. Otherwise, the menu option \"Write Paths\" can be | 486 | written to file. Otherwise, the menu option \"Write Paths\" can be |
| @@ -511,7 +511,7 @@ used to force a write." | |||
| 511 | This variable determines the case (UPPER/lower/Capitalized...) of | 511 | This variable determines the case (UPPER/lower/Capitalized...) of |
| 512 | words inserted into the buffer by completion. The preferred case can | 512 | words inserted into the buffer by completion. The preferred case can |
| 513 | be specified separately for routine names, keywords, classes and | 513 | be specified separately for routine names, keywords, classes and |
| 514 | methods. | 514 | methods. |
| 515 | This alist should therefore have entries for `routine' (normal | 515 | This alist should therefore have entries for `routine' (normal |
| 516 | functions and procedures, i.e. non-methods), `keyword', `class', and | 516 | functions and procedures, i.e. non-methods), `keyword', `class', and |
| 517 | `method'. Plausible values are | 517 | `method'. Plausible values are |
| @@ -598,7 +598,7 @@ certain methods this assumption is almost always true. The methods | |||
| 598 | for which to assume this can be set here." | 598 | for which to assume this can be set here." |
| 599 | :group 'idlwave-routine-info | 599 | :group 'idlwave-routine-info |
| 600 | :type '(repeat (regexp :tag "Match method:"))) | 600 | :type '(repeat (regexp :tag "Match method:"))) |
| 601 | 601 | ||
| 602 | 602 | ||
| 603 | (defcustom idlwave-completion-show-classes 1 | 603 | (defcustom idlwave-completion-show-classes 1 |
| 604 | "*Number of classes to show when completing object methods and keywords. | 604 | "*Number of classes to show when completing object methods and keywords. |
| @@ -663,7 +663,7 @@ should contain at least two elements: (method-default . VALUE) and | |||
| 663 | specify if the class should be found during method and keyword | 663 | specify if the class should be found during method and keyword |
| 664 | completion, respectively. | 664 | completion, respectively. |
| 665 | 665 | ||
| 666 | The alist may have additional entries specifying exceptions from the | 666 | The alist may have additional entries specifying exceptions from the |
| 667 | keyword completion rule for specific methods, like INIT or | 667 | keyword completion rule for specific methods, like INIT or |
| 668 | GETPROPERTY. In order to turn on class specification for the INIT | 668 | GETPROPERTY. In order to turn on class specification for the INIT |
| 669 | method, add an entry (\"INIT\" . t). The method name must be ALL-CAPS." | 669 | method, add an entry (\"INIT\" . t). The method name must be ALL-CAPS." |
| @@ -687,7 +687,7 @@ particular object method call. This happens during the commands | |||
| 687 | value of the variable `idlwave-query-class'. | 687 | value of the variable `idlwave-query-class'. |
| 688 | 688 | ||
| 689 | When you specify a class, this information can be stored as a text | 689 | When you specify a class, this information can be stored as a text |
| 690 | property on the `->' arrow in the source code, so that during the same | 690 | property on the `->' arrow in the source code, so that during the same |
| 691 | editing session, IDLWAVE will not have to ask again. When this | 691 | editing session, IDLWAVE will not have to ask again. When this |
| 692 | variable is non-nil, IDLWAVE will store and reuse the class information. | 692 | variable is non-nil, IDLWAVE will store and reuse the class information. |
| 693 | The class stored can be checked and removed with `\\[idlwave-routine-info]' | 693 | The class stored can be checked and removed with `\\[idlwave-routine-info]' |
| @@ -1065,7 +1065,7 @@ IDL process is made." | |||
| 1065 | :group 'idlwave-misc | 1065 | :group 'idlwave-misc |
| 1066 | :type 'boolean) | 1066 | :type 'boolean) |
| 1067 | 1067 | ||
| 1068 | (defcustom idlwave-default-font-lock-items | 1068 | (defcustom idlwave-default-font-lock-items |
| 1069 | '(pros-and-functions batch-files idlwave-idl-keywords label goto | 1069 | '(pros-and-functions batch-files idlwave-idl-keywords label goto |
| 1070 | common-blocks class-arrows) | 1070 | common-blocks class-arrows) |
| 1071 | "Items which should be fontified on the default fontification level 2. | 1071 | "Items which should be fontified on the default fontification level 2. |
| @@ -1127,25 +1127,25 @@ As a user, you should not set this to t.") | |||
| 1127 | ;;; and Carsten Dominik... | 1127 | ;;; and Carsten Dominik... |
| 1128 | 1128 | ||
| 1129 | ;; The following are the reserved words in IDL. Maybe we should | 1129 | ;; The following are the reserved words in IDL. Maybe we should |
| 1130 | ;; highlight some more stuff as well? | 1130 | ;; highlight some more stuff as well? |
| 1131 | ;; Procedure declarations. Fontify keyword plus procedure name. | 1131 | ;; Procedure declarations. Fontify keyword plus procedure name. |
| 1132 | (defvar idlwave-idl-keywords | 1132 | (defvar idlwave-idl-keywords |
| 1133 | ;; To update this regexp, update the list of keywords and | 1133 | ;; To update this regexp, update the list of keywords and |
| 1134 | ;; evaluate the form. | 1134 | ;; evaluate the form. |
| 1135 | ;; (insert | 1135 | ;; (insert |
| 1136 | ;; (prin1-to-string | 1136 | ;; (prin1-to-string |
| 1137 | ;; (concat | 1137 | ;; (concat |
| 1138 | ;; "\\<\\(" | 1138 | ;; "\\<\\(" |
| 1139 | ;; (regexp-opt | 1139 | ;; (regexp-opt |
| 1140 | ;; '("||" "&&" "and" "or" "xor" "not" | 1140 | ;; '("||" "&&" "and" "or" "xor" "not" |
| 1141 | ;; "eq" "ge" "gt" "le" "lt" "ne" | 1141 | ;; "eq" "ge" "gt" "le" "lt" "ne" |
| 1142 | ;; "for" "do" "endfor" | 1142 | ;; "for" "do" "endfor" |
| 1143 | ;; "if" "then" "endif" "else" "endelse" | 1143 | ;; "if" "then" "endif" "else" "endelse" |
| 1144 | ;; "case" "of" "endcase" | 1144 | ;; "case" "of" "endcase" |
| 1145 | ;; "switch" "break" "continue" "endswitch" | 1145 | ;; "switch" "break" "continue" "endswitch" |
| 1146 | ;; "begin" "end" | 1146 | ;; "begin" "end" |
| 1147 | ;; "repeat" "until" "endrep" | 1147 | ;; "repeat" "until" "endrep" |
| 1148 | ;; "while" "endwhile" | 1148 | ;; "while" "endwhile" |
| 1149 | ;; "goto" "return" | 1149 | ;; "goto" "return" |
| 1150 | ;; "inherits" "mod" | 1150 | ;; "inherits" "mod" |
| 1151 | ;; "compile_opt" "forward_function" | 1151 | ;; "compile_opt" "forward_function" |
| @@ -1168,7 +1168,7 @@ As a user, you should not set this to t.") | |||
| 1168 | (2 font-lock-reference-face nil t) ; block name | 1168 | (2 font-lock-reference-face nil t) ; block name |
| 1169 | ("[ \t]*\\(\\sw+\\)[ ,]*" | 1169 | ("[ \t]*\\(\\sw+\\)[ ,]*" |
| 1170 | ;; Start with point after block name and comma | 1170 | ;; Start with point after block name and comma |
| 1171 | (goto-char (match-end 0)) ; needed for XEmacs, could be nil | 1171 | (goto-char (match-end 0)) ; needed for XEmacs, could be nil |
| 1172 | nil | 1172 | nil |
| 1173 | (1 font-lock-variable-name-face) ; variable names | 1173 | (1 font-lock-variable-name-face) ; variable names |
| 1174 | ))) | 1174 | ))) |
| @@ -1223,7 +1223,7 @@ As a user, you should not set this to t.") | |||
| 1223 | ;; All operators (not used because too noisy) | 1223 | ;; All operators (not used because too noisy) |
| 1224 | (all-operators | 1224 | (all-operators |
| 1225 | '("[-*^#+<>/]" (0 font-lock-keyword-face))) | 1225 | '("[-*^#+<>/]" (0 font-lock-keyword-face))) |
| 1226 | 1226 | ||
| 1227 | ;; Arrows with text property `idlwave-class' | 1227 | ;; Arrows with text property `idlwave-class' |
| 1228 | (class-arrows | 1228 | (class-arrows |
| 1229 | '(idlwave-match-class-arrows (0 idlwave-class-arrow-face)))) | 1229 | '(idlwave-match-class-arrows (0 idlwave-class-arrow-face)))) |
| @@ -1260,14 +1260,14 @@ As a user, you should not set this to t.") | |||
| 1260 | 1260 | ||
| 1261 | (defvar idlwave-font-lock-defaults | 1261 | (defvar idlwave-font-lock-defaults |
| 1262 | '((idlwave-font-lock-keywords | 1262 | '((idlwave-font-lock-keywords |
| 1263 | idlwave-font-lock-keywords-1 | 1263 | idlwave-font-lock-keywords-1 |
| 1264 | idlwave-font-lock-keywords-2 | 1264 | idlwave-font-lock-keywords-2 |
| 1265 | idlwave-font-lock-keywords-3) | 1265 | idlwave-font-lock-keywords-3) |
| 1266 | nil t | 1266 | nil t |
| 1267 | ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w")) | 1267 | ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w")) |
| 1268 | beginning-of-line)) | 1268 | beginning-of-line)) |
| 1269 | 1269 | ||
| 1270 | (put 'idlwave-mode 'font-lock-defaults | 1270 | (put 'idlwave-mode 'font-lock-defaults |
| 1271 | idlwave-font-lock-defaults) ; XEmacs | 1271 | idlwave-font-lock-defaults) ; XEmacs |
| 1272 | 1272 | ||
| 1273 | (defconst idlwave-comment-line-start-skip "^[ \t]*;" | 1273 | (defconst idlwave-comment-line-start-skip "^[ \t]*;" |
| @@ -1275,7 +1275,7 @@ As a user, you should not set this to t.") | |||
| 1275 | That is the _beginning_ of a line containing a comment delimiter `;' preceded | 1275 | That is the _beginning_ of a line containing a comment delimiter `;' preceded |
| 1276 | only by whitespace.") | 1276 | only by whitespace.") |
| 1277 | 1277 | ||
| 1278 | (defconst idlwave-begin-block-reg | 1278 | (defconst idlwave-begin-block-reg |
| 1279 | "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>" | 1279 | "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>" |
| 1280 | "Regular expression to find the beginning of a block. The case does | 1280 | "Regular expression to find the beginning of a block. The case does |
| 1281 | not matter. The search skips matches in comments.") | 1281 | not matter. The search skips matches in comments.") |
| @@ -1352,17 +1352,17 @@ blocks starting with a BEGIN statement. The matches must have associations | |||
| 1352 | '(goto . ("goto\\>" nil)) | 1352 | '(goto . ("goto\\>" nil)) |
| 1353 | '(case . ("case\\>" nil)) | 1353 | '(case . ("case\\>" nil)) |
| 1354 | '(switch . ("switch\\>" nil)) | 1354 | '(switch . ("switch\\>" nil)) |
| 1355 | (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *" | 1355 | (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *" |
| 1356 | "\\(" idlwave-method-call "\\s *\\)?" | 1356 | "\\(" idlwave-method-call "\\s *\\)?" |
| 1357 | idlwave-identifier | 1357 | idlwave-identifier |
| 1358 | "\\s *(") nil)) | 1358 | "\\s *(") nil)) |
| 1359 | (cons 'call (list (concat | 1359 | (cons 'call (list (concat |
| 1360 | "\\(" idlwave-method-call "\\s *\\)?" | 1360 | "\\(" idlwave-method-call "\\s *\\)?" |
| 1361 | idlwave-identifier | 1361 | idlwave-identifier |
| 1362 | "\\( *\\($\\|\\$\\)\\|\\s *,\\)") nil)) | 1362 | "\\( *\\($\\|\\$\\)\\|\\s *,\\)") nil)) |
| 1363 | (cons 'assign (list (concat | 1363 | (cons 'assign (list (concat |
| 1364 | "\\(" idlwave-variable "\\) *=") nil))) | 1364 | "\\(" idlwave-variable "\\) *=") nil))) |
| 1365 | 1365 | ||
| 1366 | "Associated list of statement matching regular expressions. | 1366 | "Associated list of statement matching regular expressions. |
| 1367 | Each regular expression matches the start of an IDL statement. The | 1367 | Each regular expression matches the start of an IDL statement. The |
| 1368 | first element of each association is a symbol giving the statement | 1368 | first element of each association is a symbol giving the statement |
| @@ -1385,7 +1385,7 @@ the leftover unidentified statements containing an equal sign." ) | |||
| 1385 | ;; Note that this is documented in the v18 manuals as being a string | 1385 | ;; Note that this is documented in the v18 manuals as being a string |
| 1386 | ;; of length one rather than a single character. | 1386 | ;; of length one rather than a single character. |
| 1387 | ;; The code in this file accepts either format for compatibility. | 1387 | ;; The code in this file accepts either format for compatibility. |
| 1388 | (defvar idlwave-comment-indent-char ?\ | 1388 | (defvar idlwave-comment-indent-char ?\ |
| 1389 | "Character to be inserted for IDL comment indentation. | 1389 | "Character to be inserted for IDL comment indentation. |
| 1390 | Normally a space.") | 1390 | Normally a space.") |
| 1391 | 1391 | ||
| @@ -1557,15 +1557,15 @@ Capitalize system variables - action only | |||
| 1557 | (not (equal idlwave-shell-debug-modifiers '()))) | 1557 | (not (equal idlwave-shell-debug-modifiers '()))) |
| 1558 | ;; Bind the debug commands also with the special modifiers. | 1558 | ;; Bind the debug commands also with the special modifiers. |
| 1559 | (let ((shift (memq 'shift idlwave-shell-debug-modifiers)) | 1559 | (let ((shift (memq 'shift idlwave-shell-debug-modifiers)) |
| 1560 | (mods-noshift (delq 'shift | 1560 | (mods-noshift (delq 'shift |
| 1561 | (copy-sequence idlwave-shell-debug-modifiers)))) | 1561 | (copy-sequence idlwave-shell-debug-modifiers)))) |
| 1562 | (define-key idlwave-mode-map | 1562 | (define-key idlwave-mode-map |
| 1563 | (vector (append mods-noshift (list (if shift ?C ?c)))) | 1563 | (vector (append mods-noshift (list (if shift ?C ?c)))) |
| 1564 | 'idlwave-shell-save-and-run) | 1564 | 'idlwave-shell-save-and-run) |
| 1565 | (define-key idlwave-mode-map | 1565 | (define-key idlwave-mode-map |
| 1566 | (vector (append mods-noshift (list (if shift ?B ?b)))) | 1566 | (vector (append mods-noshift (list (if shift ?B ?b)))) |
| 1567 | 'idlwave-shell-break-here) | 1567 | 'idlwave-shell-break-here) |
| 1568 | (define-key idlwave-mode-map | 1568 | (define-key idlwave-mode-map |
| 1569 | (vector (append mods-noshift (list (if shift ?E ?e)))) | 1569 | (vector (append mods-noshift (list (if shift ?E ?e)))) |
| 1570 | 'idlwave-shell-run-region))) | 1570 | 'idlwave-shell-run-region))) |
| 1571 | (define-key idlwave-mode-map "\C-c\C-d\C-c" 'idlwave-shell-save-and-run) | 1571 | (define-key idlwave-mode-map "\C-c\C-d\C-c" 'idlwave-shell-save-and-run) |
| @@ -1602,7 +1602,7 @@ Capitalize system variables - action only | |||
| 1602 | (define-key idlwave-mode-map "\M-\C-i" 'idlwave-complete) | 1602 | (define-key idlwave-mode-map "\M-\C-i" 'idlwave-complete) |
| 1603 | (define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info) | 1603 | (define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info) |
| 1604 | (define-key idlwave-mode-map "\C-c=" 'idlwave-resolve) | 1604 | (define-key idlwave-mode-map "\C-c=" 'idlwave-resolve) |
| 1605 | (define-key idlwave-mode-map | 1605 | (define-key idlwave-mode-map |
| 1606 | (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)]) | 1606 | (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)]) |
| 1607 | 'idlwave-mouse-context-help) | 1607 | 'idlwave-mouse-context-help) |
| 1608 | 1608 | ||
| @@ -1617,7 +1617,7 @@ Capitalize system variables - action only | |||
| 1617 | ;; to go ahead of > and <, so >= and <= will be treated correctly | 1617 | ;; to go ahead of > and <, so >= and <= will be treated correctly |
| 1618 | (idlwave-action-and-binding "=" '(idlwave-expand-equal -1 -1)) | 1618 | (idlwave-action-and-binding "=" '(idlwave-expand-equal -1 -1)) |
| 1619 | 1619 | ||
| 1620 | ;; Actions for > and < are complicated by >=, <=, and ->... | 1620 | ;; Actions for > and < are complicated by >=, <=, and ->... |
| 1621 | (idlwave-action-and-binding "<" '(idlwave-custom-ltgtr-surround nil)) | 1621 | (idlwave-action-and-binding "<" '(idlwave-custom-ltgtr-surround nil)) |
| 1622 | (idlwave-action-and-binding ">" '(idlwave-custom-ltgtr-surround 'gtr)) | 1622 | (idlwave-action-and-binding ">" '(idlwave-custom-ltgtr-surround 'gtr)) |
| 1623 | 1623 | ||
| @@ -1650,7 +1650,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil." | |||
| 1650 | (error (apply 'define-abbrev args))))) | 1650 | (error (apply 'define-abbrev args))))) |
| 1651 | 1651 | ||
| 1652 | (condition-case nil | 1652 | (condition-case nil |
| 1653 | (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) | 1653 | (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) |
| 1654 | "w" idlwave-mode-syntax-table) | 1654 | "w" idlwave-mode-syntax-table) |
| 1655 | (error nil)) | 1655 | (error nil)) |
| 1656 | 1656 | ||
| @@ -1774,7 +1774,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil." | |||
| 1774 | (defvar imenu-extract-index-name-function) | 1774 | (defvar imenu-extract-index-name-function) |
| 1775 | (defvar imenu-prev-index-position-function) | 1775 | (defvar imenu-prev-index-position-function) |
| 1776 | ;; defined later - so just make the compiler hush | 1776 | ;; defined later - so just make the compiler hush |
| 1777 | (defvar idlwave-mode-menu) | 1777 | (defvar idlwave-mode-menu) |
| 1778 | (defvar idlwave-mode-debug-menu) | 1778 | (defvar idlwave-mode-debug-menu) |
| 1779 | 1779 | ||
| 1780 | ;;;###autoload | 1780 | ;;;###autoload |
| @@ -1858,7 +1858,7 @@ The main features of this mode are | |||
| 1858 | \\i IF statement template | 1858 | \\i IF statement template |
| 1859 | \\elif IF-ELSE statement template | 1859 | \\elif IF-ELSE statement template |
| 1860 | \\b BEGIN | 1860 | \\b BEGIN |
| 1861 | 1861 | ||
| 1862 | For a full list, use \\[idlwave-list-abbrevs]. Some templates also | 1862 | For a full list, use \\[idlwave-list-abbrevs]. Some templates also |
| 1863 | have direct keybindings - see the list of keybindings below. | 1863 | have direct keybindings - see the list of keybindings below. |
| 1864 | 1864 | ||
| @@ -1900,19 +1900,19 @@ The main features of this mode are | |||
| 1900 | 1900 | ||
| 1901 | (interactive) | 1901 | (interactive) |
| 1902 | (kill-all-local-variables) | 1902 | (kill-all-local-variables) |
| 1903 | 1903 | ||
| 1904 | (if idlwave-startup-message | 1904 | (if idlwave-startup-message |
| 1905 | (message "Emacs IDLWAVE mode version %s." idlwave-mode-version)) | 1905 | (message "Emacs IDLWAVE mode version %s." idlwave-mode-version)) |
| 1906 | (setq idlwave-startup-message nil) | 1906 | (setq idlwave-startup-message nil) |
| 1907 | 1907 | ||
| 1908 | (setq local-abbrev-table idlwave-mode-abbrev-table) | 1908 | (setq local-abbrev-table idlwave-mode-abbrev-table) |
| 1909 | (set-syntax-table idlwave-mode-syntax-table) | 1909 | (set-syntax-table idlwave-mode-syntax-table) |
| 1910 | 1910 | ||
| 1911 | (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action) | 1911 | (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action) |
| 1912 | 1912 | ||
| 1913 | (make-local-variable idlwave-comment-indent-function) | 1913 | (make-local-variable idlwave-comment-indent-function) |
| 1914 | (set idlwave-comment-indent-function 'idlwave-comment-hook) | 1914 | (set idlwave-comment-indent-function 'idlwave-comment-hook) |
| 1915 | 1915 | ||
| 1916 | (set (make-local-variable 'comment-start-skip) ";+[ \t]*") | 1916 | (set (make-local-variable 'comment-start-skip) ";+[ \t]*") |
| 1917 | (set (make-local-variable 'comment-start) ";") | 1917 | (set (make-local-variable 'comment-start) ";") |
| 1918 | (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions | 1918 | (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions |
| @@ -1920,7 +1920,7 @@ The main features of this mode are | |||
| 1920 | (set (make-local-variable 'abbrev-all-caps) t) | 1920 | (set (make-local-variable 'abbrev-all-caps) t) |
| 1921 | (set (make-local-variable 'indent-tabs-mode) nil) | 1921 | (set (make-local-variable 'indent-tabs-mode) nil) |
| 1922 | (set (make-local-variable 'completion-ignore-case) t) | 1922 | (set (make-local-variable 'completion-ignore-case) t) |
| 1923 | 1923 | ||
| 1924 | (use-local-map idlwave-mode-map) | 1924 | (use-local-map idlwave-mode-map) |
| 1925 | 1925 | ||
| 1926 | (when (featurep 'easymenu) | 1926 | (when (featurep 'easymenu) |
| @@ -1930,11 +1930,11 @@ The main features of this mode are | |||
| 1930 | (setq mode-name "IDLWAVE") | 1930 | (setq mode-name "IDLWAVE") |
| 1931 | (setq major-mode 'idlwave-mode) | 1931 | (setq major-mode 'idlwave-mode) |
| 1932 | (setq abbrev-mode t) | 1932 | (setq abbrev-mode t) |
| 1933 | 1933 | ||
| 1934 | (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill) | 1934 | (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill) |
| 1935 | (setq comment-end "") | 1935 | (setq comment-end "") |
| 1936 | (set (make-local-variable 'comment-multi-line) nil) | 1936 | (set (make-local-variable 'comment-multi-line) nil) |
| 1937 | (set (make-local-variable 'paragraph-separate) | 1937 | (set (make-local-variable 'paragraph-separate) |
| 1938 | "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$") | 1938 | "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$") |
| 1939 | (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]") | 1939 | (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]") |
| 1940 | (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) | 1940 | (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) |
| @@ -1943,7 +1943,7 @@ The main features of this mode are | |||
| 1943 | ;; Set tag table list to use IDLTAGS as file name. | 1943 | ;; Set tag table list to use IDLTAGS as file name. |
| 1944 | (if (boundp 'tag-table-alist) | 1944 | (if (boundp 'tag-table-alist) |
| 1945 | (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) | 1945 | (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) |
| 1946 | 1946 | ||
| 1947 | ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow | 1947 | ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow |
| 1948 | ;; Following line is for Emacs - XEmacs uses the corresponding property | 1948 | ;; Following line is for Emacs - XEmacs uses the corresponding property |
| 1949 | ;; on the `idlwave-mode' symbol. | 1949 | ;; on the `idlwave-mode' symbol. |
| @@ -1968,7 +1968,7 @@ The main features of this mode are | |||
| 1968 | idlwave-end-block-reg | 1968 | idlwave-end-block-reg |
| 1969 | ";" | 1969 | ";" |
| 1970 | 'idlwave-forward-block nil)) | 1970 | 'idlwave-forward-block nil)) |
| 1971 | 1971 | ||
| 1972 | 1972 | ||
| 1973 | ;; Make a local post-command-hook and add our hook to it | 1973 | ;; Make a local post-command-hook and add our hook to it |
| 1974 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 1974 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| @@ -2000,16 +2000,16 @@ The main features of this mode are | |||
| 2000 | (unless idlwave-setup-done | 2000 | (unless idlwave-setup-done |
| 2001 | (if (not (file-directory-p idlwave-config-directory)) | 2001 | (if (not (file-directory-p idlwave-config-directory)) |
| 2002 | (make-directory idlwave-config-directory)) | 2002 | (make-directory idlwave-config-directory)) |
| 2003 | (setq | 2003 | (setq |
| 2004 | idlwave-user-catalog-file (expand-file-name | 2004 | idlwave-user-catalog-file (expand-file-name |
| 2005 | idlwave-user-catalog-file | 2005 | idlwave-user-catalog-file |
| 2006 | idlwave-config-directory) | 2006 | idlwave-config-directory) |
| 2007 | idlwave-xml-system-rinfo-converted-file | 2007 | idlwave-xml-system-rinfo-converted-file |
| 2008 | (expand-file-name | 2008 | (expand-file-name |
| 2009 | idlwave-xml-system-rinfo-converted-file | 2009 | idlwave-xml-system-rinfo-converted-file |
| 2010 | idlwave-config-directory) | 2010 | idlwave-config-directory) |
| 2011 | idlwave-path-file (expand-file-name | 2011 | idlwave-path-file (expand-file-name |
| 2012 | idlwave-path-file | 2012 | idlwave-path-file |
| 2013 | idlwave-config-directory)) | 2013 | idlwave-config-directory)) |
| 2014 | (idlwave-read-paths) ; we may need these early | 2014 | (idlwave-read-paths) ; we may need these early |
| 2015 | (setq idlwave-setup-done t))) | 2015 | (setq idlwave-setup-done t))) |
| @@ -2028,7 +2028,7 @@ The main features of this mode are | |||
| 2028 | 2028 | ||
| 2029 | ;; | 2029 | ;; |
| 2030 | ;; Code Formatting ---------------------------------------------------- | 2030 | ;; Code Formatting ---------------------------------------------------- |
| 2031 | ;; | 2031 | ;; |
| 2032 | 2032 | ||
| 2033 | (defun idlwave-hard-tab () | 2033 | (defun idlwave-hard-tab () |
| 2034 | "Inserts TAB in buffer in current position." | 2034 | "Inserts TAB in buffer in current position." |
| @@ -2171,7 +2171,7 @@ Also checks if the correct end statement has been used." | |||
| 2171 | (if (> end-pos eol-pos) | 2171 | (if (> end-pos eol-pos) |
| 2172 | (setq end-pos pos)) | 2172 | (setq end-pos pos)) |
| 2173 | (goto-char end-pos) | 2173 | (goto-char end-pos) |
| 2174 | (setq end (buffer-substring | 2174 | (setq end (buffer-substring |
| 2175 | (progn | 2175 | (progn |
| 2176 | (skip-chars-backward "a-zA-Z") | 2176 | (skip-chars-backward "a-zA-Z") |
| 2177 | (point)) | 2177 | (point)) |
| @@ -2193,7 +2193,7 @@ Also checks if the correct end statement has been used." | |||
| 2193 | (sit-for 1)) | 2193 | (sit-for 1)) |
| 2194 | (t | 2194 | (t |
| 2195 | (beep) | 2195 | (beep) |
| 2196 | (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" | 2196 | (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" |
| 2197 | end1 end) | 2197 | end1 end) |
| 2198 | (sit-for 1)))))))) | 2198 | (sit-for 1)))))))) |
| 2199 | ;;(delete-char 1)) | 2199 | ;;(delete-char 1)) |
| @@ -2205,8 +2205,8 @@ Also checks if the correct end statement has been used." | |||
| 2205 | ((looking-at "pro\\|case\\|switch\\|function\\>") | 2205 | ((looking-at "pro\\|case\\|switch\\|function\\>") |
| 2206 | (assoc (downcase (match-string 0)) idlwave-block-matches)) | 2206 | (assoc (downcase (match-string 0)) idlwave-block-matches)) |
| 2207 | ((looking-at "begin\\>") | 2207 | ((looking-at "begin\\>") |
| 2208 | (let ((limit (save-excursion | 2208 | (let ((limit (save-excursion |
| 2209 | (idlwave-beginning-of-statement) | 2209 | (idlwave-beginning-of-statement) |
| 2210 | (point)))) | 2210 | (point)))) |
| 2211 | (cond | 2211 | (cond |
| 2212 | ((re-search-backward ":[ \t]*\\=" limit t) | 2212 | ((re-search-backward ":[ \t]*\\=" limit t) |
| @@ -2490,7 +2490,7 @@ Returns non-nil if successfull." | |||
| 2490 | (let ((eos (save-excursion | 2490 | (let ((eos (save-excursion |
| 2491 | (idlwave-block-jump-out -1 'nomark) | 2491 | (idlwave-block-jump-out -1 'nomark) |
| 2492 | (point)))) | 2492 | (point)))) |
| 2493 | (if (setq status (idlwave-find-key | 2493 | (if (setq status (idlwave-find-key |
| 2494 | idlwave-end-block-reg -1 'nomark eos)) | 2494 | idlwave-end-block-reg -1 'nomark eos)) |
| 2495 | (idlwave-beginning-of-statement) | 2495 | (idlwave-beginning-of-statement) |
| 2496 | (message "No nested block before beginning of containing block."))) | 2496 | (message "No nested block before beginning of containing block."))) |
| @@ -2498,7 +2498,7 @@ Returns non-nil if successfull." | |||
| 2498 | (let ((eos (save-excursion | 2498 | (let ((eos (save-excursion |
| 2499 | (idlwave-block-jump-out 1 'nomark) | 2499 | (idlwave-block-jump-out 1 'nomark) |
| 2500 | (point)))) | 2500 | (point)))) |
| 2501 | (if (setq status (idlwave-find-key | 2501 | (if (setq status (idlwave-find-key |
| 2502 | idlwave-begin-block-reg 1 'nomark eos)) | 2502 | idlwave-begin-block-reg 1 'nomark eos)) |
| 2503 | (idlwave-end-of-statement) | 2503 | (idlwave-end-of-statement) |
| 2504 | (message "No nested block before end of containing block.")))) | 2504 | (message "No nested block before end of containing block.")))) |
| @@ -2512,7 +2512,7 @@ The marks are pushed." | |||
| 2512 | (here (point))) | 2512 | (here (point))) |
| 2513 | (goto-char (point-max)) | 2513 | (goto-char (point-max)) |
| 2514 | (if (re-search-backward idlwave-doclib-start nil t) | 2514 | (if (re-search-backward idlwave-doclib-start nil t) |
| 2515 | (progn | 2515 | (progn |
| 2516 | (setq beg (progn (beginning-of-line) (point))) | 2516 | (setq beg (progn (beginning-of-line) (point))) |
| 2517 | (if (re-search-forward idlwave-doclib-end nil t) | 2517 | (if (re-search-forward idlwave-doclib-end nil t) |
| 2518 | (progn | 2518 | (progn |
| @@ -2545,7 +2545,7 @@ actual statement." | |||
| 2545 | ((eq major-mode 'idlwave-shell-mode) | 2545 | ((eq major-mode 'idlwave-shell-mode) |
| 2546 | (if (re-search-backward idlwave-shell-prompt-pattern nil t) | 2546 | (if (re-search-backward idlwave-shell-prompt-pattern nil t) |
| 2547 | (goto-char (match-end 0)))) | 2547 | (goto-char (match-end 0)))) |
| 2548 | (t | 2548 | (t |
| 2549 | (if (save-excursion (forward-line -1) (idlwave-is-continuation-line)) | 2549 | (if (save-excursion (forward-line -1) (idlwave-is-continuation-line)) |
| 2550 | (idlwave-previous-statement) | 2550 | (idlwave-previous-statement) |
| 2551 | (beginning-of-line))))) | 2551 | (beginning-of-line))))) |
| @@ -2622,7 +2622,7 @@ If not in a statement just moves to end of line. Returns position." | |||
| 2622 | (let ((save-point (point))) | 2622 | (let ((save-point (point))) |
| 2623 | (when (re-search-forward ".*&" lim t) | 2623 | (when (re-search-forward ".*&" lim t) |
| 2624 | (goto-char (match-end 0)) | 2624 | (goto-char (match-end 0)) |
| 2625 | (if (idlwave-quoted) | 2625 | (if (idlwave-quoted) |
| 2626 | (goto-char save-point) | 2626 | (goto-char save-point) |
| 2627 | (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) | 2627 | (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) |
| 2628 | (point))) | 2628 | (point))) |
| @@ -2639,7 +2639,7 @@ If there is no label point is not moved and nil is returned." | |||
| 2639 | ;; - not in parenthesis (like a[0:3]) | 2639 | ;; - not in parenthesis (like a[0:3]) |
| 2640 | ;; - not followed by another ":" in explicit class, ala a->b::c | 2640 | ;; - not followed by another ":" in explicit class, ala a->b::c |
| 2641 | ;; As many in this mode, this function is heuristic and not an exact | 2641 | ;; As many in this mode, this function is heuristic and not an exact |
| 2642 | ;; parser. | 2642 | ;; parser. |
| 2643 | (let* ((start (point)) | 2643 | (let* ((start (point)) |
| 2644 | (eos (save-excursion (idlwave-end-of-statement) (point))) | 2644 | (eos (save-excursion (idlwave-end-of-statement) (point))) |
| 2645 | (end (idlwave-find-key ":" 1 'nomark eos))) | 2645 | (end (idlwave-find-key ":" 1 'nomark eos))) |
| @@ -2716,7 +2716,7 @@ equal sign will be surrounded by BEFORE and AFTER blanks. If | |||
| 2716 | `idlwave-pad-keyword' is t then keyword assignment is treated just | 2716 | `idlwave-pad-keyword' is t then keyword assignment is treated just |
| 2717 | like assignment statements. When nil, spaces are removed for keyword | 2717 | like assignment statements. When nil, spaces are removed for keyword |
| 2718 | assignment. Any other value keeps the current space around the `='. | 2718 | assignment. Any other value keeps the current space around the `='. |
| 2719 | Limits in for loops are treated as keyword assignment. | 2719 | Limits in for loops are treated as keyword assignment. |
| 2720 | 2720 | ||
| 2721 | Starting with IDL 6.0, a number of op= assignments are available. | 2721 | Starting with IDL 6.0, a number of op= assignments are available. |
| 2722 | Since ambiguities of the form: | 2722 | Since ambiguities of the form: |
| @@ -2733,25 +2733,25 @@ IS-ACTION is ignored. | |||
| 2733 | 2733 | ||
| 2734 | See `idlwave-surround'." | 2734 | See `idlwave-surround'." |
| 2735 | (if idlwave-surround-by-blank | 2735 | (if idlwave-surround-by-blank |
| 2736 | (let | 2736 | (let |
| 2737 | ((non-an-ops "\\(##\\|\\*\\|\\+\\|-\\|/\\|<\\|>\\|\\^\\)\\=") | 2737 | ((non-an-ops "\\(##\\|\\*\\|\\+\\|-\\|/\\|<\\|>\\|\\^\\)\\=") |
| 2738 | (an-ops | 2738 | (an-ops |
| 2739 | "\\s-\\(AND\\|EQ\\|GE\\|GT\\|LE\\|LT\\|MOD\\|NE\\|OR\\|XOR\\)\\=") | 2739 | "\\s-\\(AND\\|EQ\\|GE\\|GT\\|LE\\|LT\\|MOD\\|NE\\|OR\\|XOR\\)\\=") |
| 2740 | (len 1)) | 2740 | (len 1)) |
| 2741 | 2741 | ||
| 2742 | (save-excursion | 2742 | (save-excursion |
| 2743 | (let ((case-fold-search t)) | 2743 | (let ((case-fold-search t)) |
| 2744 | (backward-char) | 2744 | (backward-char) |
| 2745 | (if (or | 2745 | (if (or |
| 2746 | (re-search-backward non-an-ops nil t) | 2746 | (re-search-backward non-an-ops nil t) |
| 2747 | ;; Why doesn't ##? work for both? | 2747 | ;; Why doesn't ##? work for both? |
| 2748 | (re-search-backward "\\(#\\)\\=" nil t)) | 2748 | (re-search-backward "\\(#\\)\\=" nil t)) |
| 2749 | (setq len (1+ (length (match-string 1)))) | 2749 | (setq len (1+ (length (match-string 1)))) |
| 2750 | (when (re-search-backward an-ops nil t) | 2750 | (when (re-search-backward an-ops nil t) |
| 2751 | ;(setq begin nil) ; won't modify begin | 2751 | ;(setq begin nil) ; won't modify begin |
| 2752 | (setq len (1+ (length (match-string 1)))))))) | 2752 | (setq len (1+ (length (match-string 1)))))))) |
| 2753 | 2753 | ||
| 2754 | (if (eq t idlwave-pad-keyword) | 2754 | (if (eq t idlwave-pad-keyword) |
| 2755 | ;; Everything gets padded equally | 2755 | ;; Everything gets padded equally |
| 2756 | (idlwave-surround before after len) | 2756 | (idlwave-surround before after len) |
| 2757 | ;; Treating keywords/for variables specially... | 2757 | ;; Treating keywords/for variables specially... |
| @@ -2762,22 +2762,22 @@ See `idlwave-surround'." | |||
| 2762 | (skip-chars-backward "= \t") | 2762 | (skip-chars-backward "= \t") |
| 2763 | (nth 2 (idlwave-where))))) | 2763 | (nth 2 (idlwave-where))))) |
| 2764 | (cond ((or (memq what '(function-keyword procedure-keyword)) | 2764 | (cond ((or (memq what '(function-keyword procedure-keyword)) |
| 2765 | (memq (caar st) '(for pdef))) | 2765 | (memq (caar st) '(for pdef))) |
| 2766 | (cond | 2766 | (cond |
| 2767 | ((null idlwave-pad-keyword) | 2767 | ((null idlwave-pad-keyword) |
| 2768 | (idlwave-surround 0 0) | 2768 | (idlwave-surround 0 0) |
| 2769 | ) ; remove space | 2769 | ) ; remove space |
| 2770 | (t))) ; leave any spaces alone | 2770 | (t))) ; leave any spaces alone |
| 2771 | (t (idlwave-surround before after len)))))))) | 2771 | (t (idlwave-surround before after len)))))))) |
| 2772 | 2772 | ||
| 2773 | 2773 | ||
| 2774 | (defun idlwave-indent-and-action (&optional arg) | 2774 | (defun idlwave-indent-and-action (&optional arg) |
| 2775 | "Call `idlwave-indent-line' and do expand actions. | 2775 | "Call `idlwave-indent-line' and do expand actions. |
| 2776 | With prefix ARG non-nil, indent the entire sub-statement." | 2776 | With prefix ARG non-nil, indent the entire sub-statement." |
| 2777 | (interactive "p") | 2777 | (interactive "p") |
| 2778 | (save-excursion | 2778 | (save-excursion |
| 2779 | (if (and idlwave-expand-generic-end | 2779 | (if (and idlwave-expand-generic-end |
| 2780 | (re-search-backward "\\<\\(end\\)\\s-*\\=" | 2780 | (re-search-backward "\\<\\(end\\)\\s-*\\=" |
| 2781 | (max 0 (- (point) 10)) t) | 2781 | (max 0 (- (point) 10)) t) |
| 2782 | (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)")) | 2782 | (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)")) |
| 2783 | (progn (goto-char (match-end 1)) | 2783 | (progn (goto-char (match-end 1)) |
| @@ -2787,7 +2787,7 @@ With prefix ARG non-nil, indent the entire sub-statement." | |||
| 2787 | (when (and (not arg) current-prefix-arg) | 2787 | (when (and (not arg) current-prefix-arg) |
| 2788 | (setq arg current-prefix-arg) | 2788 | (setq arg current-prefix-arg) |
| 2789 | (setq current-prefix-arg nil)) | 2789 | (setq current-prefix-arg nil)) |
| 2790 | (if arg | 2790 | (if arg |
| 2791 | (idlwave-indent-statement) | 2791 | (idlwave-indent-statement) |
| 2792 | (idlwave-indent-line t))) | 2792 | (idlwave-indent-line t))) |
| 2793 | 2793 | ||
| @@ -2922,7 +2922,7 @@ Inserts spaces before markers at point." | |||
| 2922 | (save-excursion | 2922 | (save-excursion |
| 2923 | (cond | 2923 | (cond |
| 2924 | ;; Beginning of file | 2924 | ;; Beginning of file |
| 2925 | ((prog1 | 2925 | ((prog1 |
| 2926 | (idlwave-previous-statement) | 2926 | (idlwave-previous-statement) |
| 2927 | (setq beg-prev-pos (point))) | 2927 | (setq beg-prev-pos (point))) |
| 2928 | 0) | 2928 | 0) |
| @@ -2932,7 +2932,7 @@ Inserts spaces before markers at point." | |||
| 2932 | idlwave-main-block-indent)) | 2932 | idlwave-main-block-indent)) |
| 2933 | ;; Begin block | 2933 | ;; Begin block |
| 2934 | ((idlwave-look-at idlwave-begin-block-reg t) | 2934 | ((idlwave-look-at idlwave-begin-block-reg t) |
| 2935 | (+ (idlwave-min-current-statement-indent) | 2935 | (+ (idlwave-min-current-statement-indent) |
| 2936 | idlwave-block-indent)) | 2936 | idlwave-block-indent)) |
| 2937 | ;; End Block | 2937 | ;; End Block |
| 2938 | ((idlwave-look-at idlwave-end-block-reg t) | 2938 | ((idlwave-look-at idlwave-end-block-reg t) |
| @@ -2943,7 +2943,7 @@ Inserts spaces before markers at point." | |||
| 2943 | (idlwave-min-current-statement-indent))) | 2943 | (idlwave-min-current-statement-indent))) |
| 2944 | ;; idlwave-end-offset | 2944 | ;; idlwave-end-offset |
| 2945 | ;; idlwave-block-indent)) | 2945 | ;; idlwave-block-indent)) |
| 2946 | 2946 | ||
| 2947 | ;; Default to current indent | 2947 | ;; Default to current indent |
| 2948 | ((idlwave-current-statement-indent)))))) | 2948 | ((idlwave-current-statement-indent)))))) |
| 2949 | ;; adjust the indentation based on the current statement | 2949 | ;; adjust the indentation based on the current statement |
| @@ -2959,7 +2959,7 @@ Inserts spaces before markers at point." | |||
| 2959 | 2959 | ||
| 2960 | (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp) | 2960 | (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp) |
| 2961 | "Calculate the continuation indent inside a paren group. | 2961 | "Calculate the continuation indent inside a paren group. |
| 2962 | Returns a cons-cell with (open . indent), where open is the | 2962 | Returns a cons-cell with (open . indent), where open is the |
| 2963 | location of the open paren" | 2963 | location of the open paren" |
| 2964 | (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg)))) | 2964 | (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg)))) |
| 2965 | ;; Found an innermost open paren. | 2965 | ;; Found an innermost open paren. |
| @@ -3000,24 +3000,24 @@ groupings, are treated separately." | |||
| 3000 | (end-reg (progn (beginning-of-line) (point))) | 3000 | (end-reg (progn (beginning-of-line) (point))) |
| 3001 | (beg-last-statement (save-excursion (idlwave-previous-statement) | 3001 | (beg-last-statement (save-excursion (idlwave-previous-statement) |
| 3002 | (point))) | 3002 | (point))) |
| 3003 | (beg-reg (progn (idlwave-start-of-substatement 'pre) | 3003 | (beg-reg (progn (idlwave-start-of-substatement 'pre) |
| 3004 | (if (eq (line-beginning-position) end-reg) | 3004 | (if (eq (line-beginning-position) end-reg) |
| 3005 | (goto-char beg-last-statement) | 3005 | (goto-char beg-last-statement) |
| 3006 | (point)))) | 3006 | (point)))) |
| 3007 | (basic-indent (+ (idlwave-min-current-statement-indent end-reg) | 3007 | (basic-indent (+ (idlwave-min-current-statement-indent end-reg) |
| 3008 | idlwave-continuation-indent)) | 3008 | idlwave-continuation-indent)) |
| 3009 | fancy-nonparen-indent fancy-paren-indent) | 3009 | fancy-nonparen-indent fancy-paren-indent) |
| 3010 | (cond | 3010 | (cond |
| 3011 | ;; Align then with its matching if, etc. | 3011 | ;; Align then with its matching if, etc. |
| 3012 | ((let ((matchers '(("\\<if\\>" . "[ \t]*then") | 3012 | ((let ((matchers '(("\\<if\\>" . "[ \t]*then") |
| 3013 | ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else") | 3013 | ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else") |
| 3014 | ("\\<\\(for\\|while\\)\\>" . "[ \t]*do") | 3014 | ("\\<\\(for\\|while\\)\\>" . "[ \t]*do") |
| 3015 | ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" . | 3015 | ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" . |
| 3016 | "[ \t]*until") | 3016 | "[ \t]*until") |
| 3017 | ("\\<case\\>" . "[ \t]*of"))) | 3017 | ("\\<case\\>" . "[ \t]*of"))) |
| 3018 | match cont-re) | 3018 | match cont-re) |
| 3019 | (goto-char end-reg) | 3019 | (goto-char end-reg) |
| 3020 | (and | 3020 | (and |
| 3021 | (setq cont-re | 3021 | (setq cont-re |
| 3022 | (catch 'exit | 3022 | (catch 'exit |
| 3023 | (while (setq match (car matchers)) | 3023 | (while (setq match (car matchers)) |
| @@ -3026,7 +3026,7 @@ groupings, are treated separately." | |||
| 3026 | (setq matchers (cdr matchers))))) | 3026 | (setq matchers (cdr matchers))))) |
| 3027 | (idlwave-find-key cont-re -1 'nomark beg-last-statement))) | 3027 | (idlwave-find-key cont-re -1 'nomark beg-last-statement))) |
| 3028 | (if (looking-at "end") ;; that one's special | 3028 | (if (looking-at "end") ;; that one's special |
| 3029 | (- (idlwave-current-indent) | 3029 | (- (idlwave-current-indent) |
| 3030 | (+ idlwave-block-indent idlwave-end-offset)) | 3030 | (+ idlwave-block-indent idlwave-end-offset)) |
| 3031 | (idlwave-current-indent))) | 3031 | (idlwave-current-indent))) |
| 3032 | 3032 | ||
| @@ -3052,7 +3052,7 @@ groupings, are treated separately." | |||
| 3052 | (let* ((end-reg end-reg) | 3052 | (let* ((end-reg end-reg) |
| 3053 | (close-exp (progn | 3053 | (close-exp (progn |
| 3054 | (goto-char end-reg) | 3054 | (goto-char end-reg) |
| 3055 | (skip-chars-forward " \t") | 3055 | (skip-chars-forward " \t") |
| 3056 | (looking-at "\\s)"))) | 3056 | (looking-at "\\s)"))) |
| 3057 | indent-cons) | 3057 | indent-cons) |
| 3058 | (catch 'loop | 3058 | (catch 'loop |
| @@ -3086,12 +3086,12 @@ groupings, are treated separately." | |||
| 3086 | (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$")) | 3086 | (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$")) |
| 3087 | nil | 3087 | nil |
| 3088 | (current-column))) | 3088 | (current-column))) |
| 3089 | 3089 | ||
| 3090 | ;; Continued assignment (with =): | 3090 | ;; Continued assignment (with =): |
| 3091 | ((catch 'assign ; | 3091 | ((catch 'assign ; |
| 3092 | (while (looking-at "[^=\n\r]*\\(=\\)[ \t]*") | 3092 | (while (looking-at "[^=\n\r]*\\(=\\)[ \t]*") |
| 3093 | (goto-char (match-end 0)) | 3093 | (goto-char (match-end 0)) |
| 3094 | (if (null (idlwave-what-function beg-reg)) | 3094 | (if (null (idlwave-what-function beg-reg)) |
| 3095 | (throw 'assign t)))) | 3095 | (throw 'assign t)))) |
| 3096 | (unless (or | 3096 | (unless (or |
| 3097 | (idlwave-in-quote) | 3097 | (idlwave-in-quote) |
| @@ -3153,7 +3153,7 @@ possibility of unbalanced blocks." | |||
| 3153 | (let* ((here (point)) | 3153 | (let* ((here (point)) |
| 3154 | (case-fold-search t) | 3154 | (case-fold-search t) |
| 3155 | (limit (if (>= dir 0) (point-max) (point-min))) | 3155 | (limit (if (>= dir 0) (point-max) (point-min))) |
| 3156 | (block-limit (if (>= dir 0) | 3156 | (block-limit (if (>= dir 0) |
| 3157 | idlwave-begin-block-reg | 3157 | idlwave-begin-block-reg |
| 3158 | idlwave-end-block-reg)) | 3158 | idlwave-end-block-reg)) |
| 3159 | found | 3159 | found |
| @@ -3164,7 +3164,7 @@ possibility of unbalanced blocks." | |||
| 3164 | (idlwave-find-key | 3164 | (idlwave-find-key |
| 3165 | idlwave-begin-unit-reg dir t limit) | 3165 | idlwave-begin-unit-reg dir t limit) |
| 3166 | (end-of-line) | 3166 | (end-of-line) |
| 3167 | (idlwave-find-key | 3167 | (idlwave-find-key |
| 3168 | idlwave-end-unit-reg dir t limit))) | 3168 | idlwave-end-unit-reg dir t limit))) |
| 3169 | limit))) | 3169 | limit))) |
| 3170 | (if (>= dir 0) (end-of-line)) ;Make sure we are in current block | 3170 | (if (>= dir 0) (end-of-line)) ;Make sure we are in current block |
| @@ -3189,7 +3189,7 @@ possibility of unbalanced blocks." | |||
| 3189 | (or (null end-reg) (< (point) end-reg))) | 3189 | (or (null end-reg) (< (point) end-reg))) |
| 3190 | (unless comm-or-empty (setq min (min min (idlwave-current-indent))))) | 3190 | (unless comm-or-empty (setq min (min min (idlwave-current-indent))))) |
| 3191 | (if (or comm-or-empty (and end-reg (>= (point) end-reg))) | 3191 | (if (or comm-or-empty (and end-reg (>= (point) end-reg))) |
| 3192 | min | 3192 | min |
| 3193 | (min min (idlwave-current-indent)))))) | 3193 | (min min (idlwave-current-indent)))))) |
| 3194 | 3194 | ||
| 3195 | (defun idlwave-current-statement-indent (&optional last-line) | 3195 | (defun idlwave-current-statement-indent (&optional last-line) |
| @@ -3216,10 +3216,10 @@ Blank or comment-only lines following regular continuation lines (with | |||
| 3216 | `$') count as continuations too." | 3216 | `$') count as continuations too." |
| 3217 | (let (p) | 3217 | (let (p) |
| 3218 | (save-excursion | 3218 | (save-excursion |
| 3219 | (or | 3219 | (or |
| 3220 | (idlwave-look-at "\\<\\$") | 3220 | (idlwave-look-at "\\<\\$") |
| 3221 | (catch 'loop | 3221 | (catch 'loop |
| 3222 | (while (and (looking-at "^[ \t]*\\(;.*\\)?$") | 3222 | (while (and (looking-at "^[ \t]*\\(;.*\\)?$") |
| 3223 | (eq (forward-line -1) 0)) | 3223 | (eq (forward-line -1) 0)) |
| 3224 | (if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p)))))))) | 3224 | (if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p)))))))) |
| 3225 | 3225 | ||
| @@ -3317,7 +3317,7 @@ ignored." | |||
| 3317 | (beginning-of-line) (point)) | 3317 | (beginning-of-line) (point)) |
| 3318 | (point)))) | 3318 | (point)))) |
| 3319 | "[^;]")) | 3319 | "[^;]")) |
| 3320 | 3320 | ||
| 3321 | ;; Mark the beginning and end of the paragraph | 3321 | ;; Mark the beginning and end of the paragraph |
| 3322 | (goto-char bcl) | 3322 | (goto-char bcl) |
| 3323 | (while (and (looking-at fill-prefix-reg) | 3323 | (while (and (looking-at fill-prefix-reg) |
| @@ -3381,7 +3381,7 @@ ignored." | |||
| 3381 | (insert (make-string diff ?\ )))) | 3381 | (insert (make-string diff ?\ )))) |
| 3382 | (forward-line -1)) | 3382 | (forward-line -1)) |
| 3383 | ) | 3383 | ) |
| 3384 | 3384 | ||
| 3385 | ;; No hang. Instead find minimum indentation of paragraph | 3385 | ;; No hang. Instead find minimum indentation of paragraph |
| 3386 | ;; after first line. | 3386 | ;; after first line. |
| 3387 | ;; For the following while statement, since START is at the | 3387 | ;; For the following while statement, since START is at the |
| @@ -3413,7 +3413,7 @@ ignored." | |||
| 3413 | t) | 3413 | t) |
| 3414 | (current-column)) | 3414 | (current-column)) |
| 3415 | indent)) | 3415 | indent)) |
| 3416 | 3416 | ||
| 3417 | ;; try to keep point at its original place | 3417 | ;; try to keep point at its original place |
| 3418 | (goto-char here) | 3418 | (goto-char here) |
| 3419 | 3419 | ||
| @@ -3462,7 +3462,7 @@ If not found returns nil." | |||
| 3462 | (current-column))))) | 3462 | (current-column))))) |
| 3463 | 3463 | ||
| 3464 | (defun idlwave-auto-fill () | 3464 | (defun idlwave-auto-fill () |
| 3465 | "Called to break lines in auto fill mode. | 3465 | "Called to break lines in auto fill mode. |
| 3466 | Only fills non-comment lines if `idlwave-fill-comment-line-only' is | 3466 | Only fills non-comment lines if `idlwave-fill-comment-line-only' is |
| 3467 | non-nil. Places a continuation character at the end of the line if | 3467 | non-nil. Places a continuation character at the end of the line if |
| 3468 | not in a comment. Splits strings with IDL concatenation operator `+' | 3468 | not in a comment. Splits strings with IDL concatenation operator `+' |
| @@ -3613,7 +3613,7 @@ is non-nil." | |||
| 3613 | (insert (current-time-string)) | 3613 | (insert (current-time-string)) |
| 3614 | (insert ", " (user-full-name)) | 3614 | (insert ", " (user-full-name)) |
| 3615 | (if (boundp 'user-mail-address) | 3615 | (if (boundp 'user-mail-address) |
| 3616 | (insert " <" user-mail-address ">") | 3616 | (insert " <" user-mail-address ">") |
| 3617 | (insert " <" (user-login-name) "@" (system-name) ">")) | 3617 | (insert " <" (user-login-name) "@" (system-name) ">")) |
| 3618 | ;; Remove extra spaces from line | 3618 | ;; Remove extra spaces from line |
| 3619 | (idlwave-fill-paragraph) | 3619 | (idlwave-fill-paragraph) |
| @@ -3639,7 +3639,7 @@ location on mark ring so that the user can return to previous point." | |||
| 3639 | (setq end (match-end 0))) | 3639 | (setq end (match-end 0))) |
| 3640 | (progn | 3640 | (progn |
| 3641 | (goto-char beg) | 3641 | (goto-char beg) |
| 3642 | (if (re-search-forward | 3642 | (if (re-search-forward |
| 3643 | (concat idlwave-doc-modifications-keyword ":") | 3643 | (concat idlwave-doc-modifications-keyword ":") |
| 3644 | end t) | 3644 | end t) |
| 3645 | (end-of-line) | 3645 | (end-of-line) |
| @@ -3737,7 +3737,7 @@ constants - a double quote followed by an octal digit." | |||
| 3737 | (not (idlwave-in-quote)) | 3737 | (not (idlwave-in-quote)) |
| 3738 | (save-excursion | 3738 | (save-excursion |
| 3739 | (forward-char) | 3739 | (forward-char) |
| 3740 | (re-search-backward (concat "\\(" idlwave-idl-keywords | 3740 | (re-search-backward (concat "\\(" idlwave-idl-keywords |
| 3741 | "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t))))) | 3741 | "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t))))) |
| 3742 | 3742 | ||
| 3743 | 3743 | ||
| @@ -3783,7 +3783,7 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3783 | (indent-region beg end nil)) | 3783 | (indent-region beg end nil)) |
| 3784 | (if (stringp prompt) | 3784 | (if (stringp prompt) |
| 3785 | (message prompt))))) | 3785 | (message prompt))))) |
| 3786 | 3786 | ||
| 3787 | (defun idlwave-rw-case (string) | 3787 | (defun idlwave-rw-case (string) |
| 3788 | "Make STRING have the case required by `idlwave-reserved-word-upcase'." | 3788 | "Make STRING have the case required by `idlwave-reserved-word-upcase'." |
| 3789 | (if idlwave-reserved-word-upcase | 3789 | (if idlwave-reserved-word-upcase |
| @@ -3801,7 +3801,7 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3801 | (defun idlwave-case () | 3801 | (defun idlwave-case () |
| 3802 | "Build skeleton IDL case statement." | 3802 | "Build skeleton IDL case statement." |
| 3803 | (interactive) | 3803 | (interactive) |
| 3804 | (idlwave-template | 3804 | (idlwave-template |
| 3805 | (idlwave-rw-case "case") | 3805 | (idlwave-rw-case "case") |
| 3806 | (idlwave-rw-case " of\n\nendcase") | 3806 | (idlwave-rw-case " of\n\nendcase") |
| 3807 | "Selector expression")) | 3807 | "Selector expression")) |
| @@ -3809,7 +3809,7 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3809 | (defun idlwave-switch () | 3809 | (defun idlwave-switch () |
| 3810 | "Build skeleton IDL switch statement." | 3810 | "Build skeleton IDL switch statement." |
| 3811 | (interactive) | 3811 | (interactive) |
| 3812 | (idlwave-template | 3812 | (idlwave-template |
| 3813 | (idlwave-rw-case "switch") | 3813 | (idlwave-rw-case "switch") |
| 3814 | (idlwave-rw-case " of\n\nendswitch") | 3814 | (idlwave-rw-case " of\n\nendswitch") |
| 3815 | "Selector expression")) | 3815 | "Selector expression")) |
| @@ -3817,7 +3817,7 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3817 | (defun idlwave-for () | 3817 | (defun idlwave-for () |
| 3818 | "Build skeleton for loop statment." | 3818 | "Build skeleton for loop statment." |
| 3819 | (interactive) | 3819 | (interactive) |
| 3820 | (idlwave-template | 3820 | (idlwave-template |
| 3821 | (idlwave-rw-case "for") | 3821 | (idlwave-rw-case "for") |
| 3822 | (idlwave-rw-case " do begin\n\nendfor") | 3822 | (idlwave-rw-case " do begin\n\nendfor") |
| 3823 | "Loop expression")) | 3823 | "Loop expression")) |
| @@ -3832,14 +3832,14 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3832 | 3832 | ||
| 3833 | (defun idlwave-procedure () | 3833 | (defun idlwave-procedure () |
| 3834 | (interactive) | 3834 | (interactive) |
| 3835 | (idlwave-template | 3835 | (idlwave-template |
| 3836 | (idlwave-rw-case "pro") | 3836 | (idlwave-rw-case "pro") |
| 3837 | (idlwave-rw-case "\n\nreturn\nend") | 3837 | (idlwave-rw-case "\n\nreturn\nend") |
| 3838 | "Procedure name")) | 3838 | "Procedure name")) |
| 3839 | 3839 | ||
| 3840 | (defun idlwave-function () | 3840 | (defun idlwave-function () |
| 3841 | (interactive) | 3841 | (interactive) |
| 3842 | (idlwave-template | 3842 | (idlwave-template |
| 3843 | (idlwave-rw-case "function") | 3843 | (idlwave-rw-case "function") |
| 3844 | (idlwave-rw-case "\n\nreturn\nend") | 3844 | (idlwave-rw-case "\n\nreturn\nend") |
| 3845 | "Function name")) | 3845 | "Function name")) |
| @@ -3853,7 +3853,7 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3853 | 3853 | ||
| 3854 | (defun idlwave-while () | 3854 | (defun idlwave-while () |
| 3855 | (interactive) | 3855 | (interactive) |
| 3856 | (idlwave-template | 3856 | (idlwave-template |
| 3857 | (idlwave-rw-case "while") | 3857 | (idlwave-rw-case "while") |
| 3858 | (idlwave-rw-case " do begin\n\nendwhile") | 3858 | (idlwave-rw-case " do begin\n\nendwhile") |
| 3859 | "Entry condition")) | 3859 | "Entry condition")) |
| @@ -3932,8 +3932,8 @@ Buffer containing unsaved changes require confirmation before they are killed." | |||
| 3932 | (defun idlwave-count-outlawed-buffers (tag) | 3932 | (defun idlwave-count-outlawed-buffers (tag) |
| 3933 | "How many outlawed buffers have tag TAG?" | 3933 | "How many outlawed buffers have tag TAG?" |
| 3934 | (length (delq nil | 3934 | (length (delq nil |
| 3935 | (mapcar | 3935 | (mapcar |
| 3936 | (lambda (x) (eq (cdr x) tag)) | 3936 | (lambda (x) (eq (cdr x) tag)) |
| 3937 | idlwave-outlawed-buffers)))) | 3937 | idlwave-outlawed-buffers)))) |
| 3938 | 3938 | ||
| 3939 | (defun idlwave-do-kill-autoloaded-buffers (&rest reasons) | 3939 | (defun idlwave-do-kill-autoloaded-buffers (&rest reasons) |
| @@ -3947,9 +3947,9 @@ Buffer containing unsaved changes require confirmation before they are killed." | |||
| 3947 | (memq (cdr entry) reasons)) | 3947 | (memq (cdr entry) reasons)) |
| 3948 | (kill-buffer (car entry)) | 3948 | (kill-buffer (car entry)) |
| 3949 | (incf cnt) | 3949 | (incf cnt) |
| 3950 | (setq idlwave-outlawed-buffers | 3950 | (setq idlwave-outlawed-buffers |
| 3951 | (delq entry idlwave-outlawed-buffers))) | 3951 | (delq entry idlwave-outlawed-buffers))) |
| 3952 | (setq idlwave-outlawed-buffers | 3952 | (setq idlwave-outlawed-buffers |
| 3953 | (delq entry idlwave-outlawed-buffers)))) | 3953 | (delq entry idlwave-outlawed-buffers)))) |
| 3954 | (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s")))) | 3954 | (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s")))) |
| 3955 | 3955 | ||
| @@ -3961,7 +3961,7 @@ Intended for `after-save-hook'." | |||
| 3961 | (entry (assq buf idlwave-outlawed-buffers))) | 3961 | (entry (assq buf idlwave-outlawed-buffers))) |
| 3962 | ;; Revoke license | 3962 | ;; Revoke license |
| 3963 | (if entry | 3963 | (if entry |
| 3964 | (setq idlwave-outlawed-buffers | 3964 | (setq idlwave-outlawed-buffers |
| 3965 | (delq entry idlwave-outlawed-buffers))) | 3965 | (delq entry idlwave-outlawed-buffers))) |
| 3966 | ;; Remove this function from the hook. | 3966 | ;; Remove this function from the hook. |
| 3967 | (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local))) | 3967 | (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local))) |
| @@ -3980,7 +3980,7 @@ Intended for `after-save-hook'." | |||
| 3980 | (defun idlwave-expand-lib-file-name (file) | 3980 | (defun idlwave-expand-lib-file-name (file) |
| 3981 | ;; Find FILE on the scanned lib path and return a buffer visiting it | 3981 | ;; Find FILE on the scanned lib path and return a buffer visiting it |
| 3982 | ;; This is for, e.g., finding source with no user catalog | 3982 | ;; This is for, e.g., finding source with no user catalog |
| 3983 | (cond | 3983 | (cond |
| 3984 | ((null file) nil) | 3984 | ((null file) nil) |
| 3985 | ((file-name-absolute-p file) file) | 3985 | ((file-name-absolute-p file) file) |
| 3986 | (t (idlwave-locate-lib-file file)))) | 3986 | (t (idlwave-locate-lib-file file)))) |
| @@ -3995,7 +3995,7 @@ you specify /." | |||
| 3995 | (interactive) | 3995 | (interactive) |
| 3996 | (let (directory directories cmd append status numdirs dir getsubdirs | 3996 | (let (directory directories cmd append status numdirs dir getsubdirs |
| 3997 | buffer save_buffer files numfiles item errbuf) | 3997 | buffer save_buffer files numfiles item errbuf) |
| 3998 | 3998 | ||
| 3999 | ;; | 3999 | ;; |
| 4000 | ;; Read list of directories | 4000 | ;; Read list of directories |
| 4001 | (setq directory (read-string "Tag Directories: " ".")) | 4001 | (setq directory (read-string "Tag Directories: " ".")) |
| @@ -4047,7 +4047,7 @@ you specify /." | |||
| 4047 | (message "%s" (concat "Tagging " item "...")) | 4047 | (message "%s" (concat "Tagging " item "...")) |
| 4048 | (setq errbuf (get-buffer-create "*idltags-error*")) | 4048 | (setq errbuf (get-buffer-create "*idltags-error*")) |
| 4049 | (setq status (+ status | 4049 | (setq status (+ status |
| 4050 | (if (eq 0 (call-process | 4050 | (if (eq 0 (call-process |
| 4051 | "sh" nil errbuf nil "-c" | 4051 | "sh" nil errbuf nil "-c" |
| 4052 | (concat cmd append item))) | 4052 | (concat cmd append item))) |
| 4053 | 0 | 4053 | 0 |
| @@ -4061,13 +4061,13 @@ you specify /." | |||
| 4061 | (setq numfiles (1+ numfiles)) | 4061 | (setq numfiles (1+ numfiles)) |
| 4062 | (setq item (nth numfiles files)) | 4062 | (setq item (nth numfiles files)) |
| 4063 | ))) | 4063 | ))) |
| 4064 | 4064 | ||
| 4065 | (setq numdirs (1+ numdirs)) | 4065 | (setq numdirs (1+ numdirs)) |
| 4066 | (setq dir (nth numdirs directories))) | 4066 | (setq dir (nth numdirs directories))) |
| 4067 | (progn | 4067 | (progn |
| 4068 | (setq numdirs (1+ numdirs)) | 4068 | (setq numdirs (1+ numdirs)) |
| 4069 | (setq dir (nth numdirs directories))))) | 4069 | (setq dir (nth numdirs directories))))) |
| 4070 | 4070 | ||
| 4071 | (setq errbuf (get-buffer-create "*idltags-error*")) | 4071 | (setq errbuf (get-buffer-create "*idltags-error*")) |
| 4072 | (if (= status 0) | 4072 | (if (= status 0) |
| 4073 | (kill-buffer errbuf)) | 4073 | (kill-buffer errbuf)) |
| @@ -4143,7 +4143,7 @@ blank lines." | |||
| 4143 | ;; Make sure the hash functions are accessible. | 4143 | ;; Make sure the hash functions are accessible. |
| 4144 | (if (or (not (fboundp 'gethash)) | 4144 | (if (or (not (fboundp 'gethash)) |
| 4145 | (not (fboundp 'puthash))) | 4145 | (not (fboundp 'puthash))) |
| 4146 | (progn | 4146 | (progn |
| 4147 | (require 'cl) | 4147 | (require 'cl) |
| 4148 | (or (fboundp 'puthash) | 4148 | (or (fboundp 'puthash) |
| 4149 | (defalias 'puthash 'cl-puthash)))) | 4149 | (defalias 'puthash 'cl-puthash)))) |
| @@ -4162,7 +4162,7 @@ blank lines." | |||
| 4162 | (null (cdr idlwave-sint-routines))) | 4162 | (null (cdr idlwave-sint-routines))) |
| 4163 | (loop for entry in entries | 4163 | (loop for entry in entries |
| 4164 | for var = (car entry) for size = (nth 1 entry) | 4164 | for var = (car entry) for size = (nth 1 entry) |
| 4165 | do (setcdr (symbol-value var) | 4165 | do (setcdr (symbol-value var) |
| 4166 | (make-hash-table ':size size ':test 'equal))) | 4166 | (make-hash-table ':size size ':test 'equal))) |
| 4167 | (setq idlwave-sint-dirs nil | 4167 | (setq idlwave-sint-dirs nil |
| 4168 | idlwave-sint-libnames nil)) | 4168 | idlwave-sint-libnames nil)) |
| @@ -4172,7 +4172,7 @@ blank lines." | |||
| 4172 | (null (car idlwave-sint-routines))) | 4172 | (null (car idlwave-sint-routines))) |
| 4173 | (loop for entry in entries | 4173 | (loop for entry in entries |
| 4174 | for var = (car entry) for size = (nth 1 entry) | 4174 | for var = (car entry) for size = (nth 1 entry) |
| 4175 | do (setcar (symbol-value var) | 4175 | do (setcar (symbol-value var) |
| 4176 | (make-hash-table ':size size ':test 'equal)))))) | 4176 | (make-hash-table ':size size ':test 'equal)))))) |
| 4177 | 4177 | ||
| 4178 | (defun idlwave-sintern-routine-or-method (name &optional class set) | 4178 | (defun idlwave-sintern-routine-or-method (name &optional class set) |
| @@ -4259,11 +4259,11 @@ If DEFAULT-DIR is passed, it is used as the base of the directory" | |||
| 4259 | (setq class (idlwave-sintern-class class set)) | 4259 | (setq class (idlwave-sintern-class class set)) |
| 4260 | (setq name (idlwave-sintern-method name set))) | 4260 | (setq name (idlwave-sintern-method name set))) |
| 4261 | (setq name (idlwave-sintern-routine name set))) | 4261 | (setq name (idlwave-sintern-routine name set))) |
| 4262 | 4262 | ||
| 4263 | ;; The source | 4263 | ;; The source |
| 4264 | (let ((source-type (car source)) | 4264 | (let ((source-type (car source)) |
| 4265 | (source-file (nth 1 source)) | 4265 | (source-file (nth 1 source)) |
| 4266 | (source-dir (if default-dir | 4266 | (source-dir (if default-dir |
| 4267 | (file-name-as-directory default-dir) | 4267 | (file-name-as-directory default-dir) |
| 4268 | (nth 2 source))) | 4268 | (nth 2 source))) |
| 4269 | (source-lib (nth 3 source))) | 4269 | (source-lib (nth 3 source))) |
| @@ -4272,7 +4272,7 @@ If DEFAULT-DIR is passed, it is used as the base of the directory" | |||
| 4272 | (if (stringp source-lib) | 4272 | (if (stringp source-lib) |
| 4273 | (setq source-lib (idlwave-sintern-libname source-lib set))) | 4273 | (setq source-lib (idlwave-sintern-libname source-lib set))) |
| 4274 | (setq source (list source-type source-file source-dir source-lib))) | 4274 | (setq source (list source-type source-file source-dir source-lib))) |
| 4275 | 4275 | ||
| 4276 | ;; The keywords | 4276 | ;; The keywords |
| 4277 | (setq kwds (mapcar (lambda (x) | 4277 | (setq kwds (mapcar (lambda (x) |
| 4278 | (idlwave-sintern-keyword-list x set)) | 4278 | (idlwave-sintern-keyword-list x set)) |
| @@ -4407,15 +4407,15 @@ will re-read the catalog." | |||
| 4407 | (not (stringp idlwave-user-catalog-file)) | 4407 | (not (stringp idlwave-user-catalog-file)) |
| 4408 | (not (file-regular-p idlwave-user-catalog-file))) | 4408 | (not (file-regular-p idlwave-user-catalog-file))) |
| 4409 | (error "No catalog has been produced yet")) | 4409 | (error "No catalog has been produced yet")) |
| 4410 | (let* ((emacs (expand-file-name (invocation-name) (invocation-directory))) | 4410 | (let* ((emacs (concat invocation-directory invocation-name)) |
| 4411 | (args (list "-batch" | 4411 | (args (list "-batch" |
| 4412 | "-l" (expand-file-name "~/.emacs") | 4412 | "-l" (expand-file-name "~/.emacs") |
| 4413 | "-l" "idlwave" | 4413 | "-l" "idlwave" |
| 4414 | "-f" "idlwave-rescan-catalog-directories")) | 4414 | "-f" "idlwave-rescan-catalog-directories")) |
| 4415 | (process (apply 'start-process "idlcat" | 4415 | (process (apply 'start-process "idlcat" |
| 4416 | nil emacs args))) | 4416 | nil emacs args))) |
| 4417 | (setq idlwave-catalog-process process) | 4417 | (setq idlwave-catalog-process process) |
| 4418 | (set-process-sentinel | 4418 | (set-process-sentinel |
| 4419 | process | 4419 | process |
| 4420 | (lambda (pro why) | 4420 | (lambda (pro why) |
| 4421 | (when (string-match "finished" why) | 4421 | (when (string-match "finished" why) |
| @@ -4432,7 +4432,7 @@ will re-read the catalog." | |||
| 4432 | ;; ("ROUTINE" type class | 4432 | ;; ("ROUTINE" type class |
| 4433 | ;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") | | 4433 | ;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") | |
| 4434 | ;; (buffer pro_file dir) | (compiled pro_file dir) | 4434 | ;; (buffer pro_file dir) | (compiled pro_file dir) |
| 4435 | ;; "calling_string" ("HELPFILE" (("KWD1" . link1) ...)) | 4435 | ;; "calling_string" ("HELPFILE" (("KWD1" . link1) ...)) |
| 4436 | ;; ("HELPFILE2" (("KWD2" . link) ...)) ...) | 4436 | ;; ("HELPFILE2" (("KWD2" . link) ...)) ...) |
| 4437 | ;; | 4437 | ;; |
| 4438 | ;; DIR will be supplied dynamically while loading library catalogs, | 4438 | ;; DIR will be supplied dynamically while loading library catalogs, |
| @@ -4491,7 +4491,7 @@ information updated immediately, leave NO-CONCATENATE nil." | |||
| 4491 | ;; The override-idle means, even if the idle timer has done some | 4491 | ;; The override-idle means, even if the idle timer has done some |
| 4492 | ;; preparing work, load and renormalize everything anyway. | 4492 | ;; preparing work, load and renormalize everything anyway. |
| 4493 | (override-idle (or arg idlwave-buffer-case-takes-precedence))) | 4493 | (override-idle (or arg idlwave-buffer-case-takes-precedence))) |
| 4494 | 4494 | ||
| 4495 | (setq idlwave-buffer-routines nil | 4495 | (setq idlwave-buffer-routines nil |
| 4496 | idlwave-compiled-routines nil | 4496 | idlwave-compiled-routines nil |
| 4497 | idlwave-unresolved-routines nil) | 4497 | idlwave-unresolved-routines nil) |
| @@ -4502,7 +4502,7 @@ information updated immediately, leave NO-CONCATENATE nil." | |||
| 4502 | (idlwave-reset-sintern (cond (load t) | 4502 | (idlwave-reset-sintern (cond (load t) |
| 4503 | ((null idlwave-system-routines) t) | 4503 | ((null idlwave-system-routines) t) |
| 4504 | (t 'bufsh)))) | 4504 | (t 'bufsh)))) |
| 4505 | 4505 | ||
| 4506 | (if idlwave-buffer-case-takes-precedence | 4506 | (if idlwave-buffer-case-takes-precedence |
| 4507 | ;; We can safely scan the buffer stuff first | 4507 | ;; We can safely scan the buffer stuff first |
| 4508 | (progn | 4508 | (progn |
| @@ -4517,9 +4517,9 @@ information updated immediately, leave NO-CONCATENATE nil." | |||
| 4517 | (idlwave-shell-is-running))) | 4517 | (idlwave-shell-is-running))) |
| 4518 | (ask-shell (and shell-is-running | 4518 | (ask-shell (and shell-is-running |
| 4519 | idlwave-query-shell-for-routine-info))) | 4519 | idlwave-query-shell-for-routine-info))) |
| 4520 | 4520 | ||
| 4521 | ;; Load the library catalogs again, first re-scanning the path | 4521 | ;; Load the library catalogs again, first re-scanning the path |
| 4522 | (when arg | 4522 | (when arg |
| 4523 | (if shell-is-running | 4523 | (if shell-is-running |
| 4524 | (idlwave-shell-send-command idlwave-shell-path-query | 4524 | (idlwave-shell-send-command idlwave-shell-path-query |
| 4525 | '(progn | 4525 | '(progn |
| @@ -4539,7 +4539,7 @@ information updated immediately, leave NO-CONCATENATE nil." | |||
| 4539 | ;; Therefore, we do a concatenation now, even though | 4539 | ;; Therefore, we do a concatenation now, even though |
| 4540 | ;; the shell might do it again. | 4540 | ;; the shell might do it again. |
| 4541 | (idlwave-concatenate-rinfo-lists nil 'run-hooks)) | 4541 | (idlwave-concatenate-rinfo-lists nil 'run-hooks)) |
| 4542 | 4542 | ||
| 4543 | (when ask-shell | 4543 | (when ask-shell |
| 4544 | ;; Ask the shell about the routines it knows of. | 4544 | ;; Ask the shell about the routines it knows of. |
| 4545 | (message "Querying the shell") | 4545 | (message "Querying the shell") |
| @@ -4576,26 +4576,26 @@ information updated immediately, leave NO-CONCATENATE nil." | |||
| 4576 | ;; which, if necessary, will be re-created from the XML file on | 4576 | ;; which, if necessary, will be re-created from the XML file on |
| 4577 | ;; disk. As a last fallback, load the (likely outdated) idlw-rinfo | 4577 | ;; disk. As a last fallback, load the (likely outdated) idlw-rinfo |
| 4578 | ;; file distributed with older IDLWAVE versions (<6.0) | 4578 | ;; file distributed with older IDLWAVE versions (<6.0) |
| 4579 | (unless (and (load idlwave-xml-system-rinfo-converted-file | 4579 | (unless (and (load idlwave-xml-system-rinfo-converted-file |
| 4580 | 'noerror 'nomessage) | 4580 | 'noerror 'nomessage) |
| 4581 | (idlwave-xml-system-routine-info-up-to-date)) | 4581 | (idlwave-xml-system-routine-info-up-to-date)) |
| 4582 | ;; See if we can create it from XML source | 4582 | ;; See if we can create it from XML source |
| 4583 | (condition-case nil | 4583 | (condition-case nil |
| 4584 | (idlwave-convert-xml-system-routine-info) | 4584 | (idlwave-convert-xml-system-routine-info) |
| 4585 | (error | 4585 | (error |
| 4586 | (unless (load idlwave-xml-system-rinfo-converted-file | 4586 | (unless (load idlwave-xml-system-rinfo-converted-file |
| 4587 | 'noerror 'nomessage) | 4587 | 'noerror 'nomessage) |
| 4588 | (if idlwave-system-routines | 4588 | (if idlwave-system-routines |
| 4589 | (message | 4589 | (message |
| 4590 | "Failed to load converted routine info, using old conversion.") | 4590 | "Failed to load converted routine info, using old conversion.") |
| 4591 | (message | 4591 | (message |
| 4592 | "Failed to convert XML routine info, falling back on idlw-rinfo.") | 4592 | "Failed to convert XML routine info, falling back on idlw-rinfo.") |
| 4593 | (if (not (load "idlw-rinfo" 'noerror 'nomessage)) | 4593 | (if (not (load "idlw-rinfo" 'noerror 'nomessage)) |
| 4594 | (message | 4594 | (message |
| 4595 | "Could not locate any system routine information.")))))))) | 4595 | "Could not locate any system routine information.")))))))) |
| 4596 | 4596 | ||
| 4597 | (defun idlwave-xml-system-routine-info-up-to-date() | 4597 | (defun idlwave-xml-system-routine-info-up-to-date() |
| 4598 | (let* ((dir (file-name-as-directory | 4598 | (let* ((dir (file-name-as-directory |
| 4599 | (expand-file-name "help/online_help" (idlwave-sys-dir)))) | 4599 | (expand-file-name "help/online_help" (idlwave-sys-dir)))) |
| 4600 | (catalog-file (expand-file-name "idl_catalog.xml" dir))) | 4600 | (catalog-file (expand-file-name "idl_catalog.xml" dir))) |
| 4601 | (file-newer-than-file-p ;converted file is newer than catalog | 4601 | (file-newer-than-file-p ;converted file is newer than catalog |
| @@ -4610,15 +4610,15 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4610 | "Alist of system variables and their help files.") | 4610 | "Alist of system variables and their help files.") |
| 4611 | (defvar idlwave-help-special-topic-words nil) | 4611 | (defvar idlwave-help-special-topic-words nil) |
| 4612 | 4612 | ||
| 4613 | 4613 | ||
| 4614 | (defun idlwave-shorten-syntax (syntax name &optional class) | 4614 | (defun idlwave-shorten-syntax (syntax name &optional class) |
| 4615 | ;; From a list of syntax statments, shorten with %s and group with "or" | 4615 | ;; From a list of syntax statments, shorten with %s and group with "or" |
| 4616 | (let ((case-fold-search t)) | 4616 | (let ((case-fold-search t)) |
| 4617 | (mapconcat | 4617 | (mapconcat |
| 4618 | (lambda (x) | 4618 | (lambda (x) |
| 4619 | (while (string-match name x) | 4619 | (while (string-match name x) |
| 4620 | (setq x (replace-match "%s" t t x))) | 4620 | (setq x (replace-match "%s" t t x))) |
| 4621 | (if class | 4621 | (if class |
| 4622 | (while (string-match class x) | 4622 | (while (string-match class x) |
| 4623 | (setq x (replace-match "%s" t t x)))) | 4623 | (setq x (replace-match "%s" t t x)))) |
| 4624 | x) | 4624 | x) |
| @@ -4670,8 +4670,8 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4670 | (put 'set-props 'matched t) | 4670 | (put 'set-props 'matched t) |
| 4671 | set-props) | 4671 | set-props) |
| 4672 | (t nil))) | 4672 | (t nil))) |
| 4673 | (setq methods-entry | 4673 | (setq methods-entry |
| 4674 | (nconc (idlwave-xml-create-rinfo-list pelem class extra-kwds) | 4674 | (nconc (idlwave-xml-create-rinfo-list pelem class extra-kwds) |
| 4675 | methods-entry))) | 4675 | methods-entry))) |
| 4676 | (t))) | 4676 | (t))) |
| 4677 | (setq params (cdr params))) | 4677 | (setq params (cdr params))) |
| @@ -4681,12 +4681,12 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4681 | ; (message "Failed to match GetProperty in class %s" class)) | 4681 | ; (message "Failed to match GetProperty in class %s" class)) |
| 4682 | ;(unless (get 'set-props 'matched) | 4682 | ;(unless (get 'set-props 'matched) |
| 4683 | ; (message "Failed to match SetProperty in class %s" class)) | 4683 | ; (message "Failed to match SetProperty in class %s" class)) |
| 4684 | (setq class-entry | 4684 | (setq class-entry |
| 4685 | (if inherits | 4685 | (if inherits |
| 4686 | (list class (append '(inherits) inherits) (list 'link link)) | 4686 | (list class (append '(inherits) inherits) (list 'link link)) |
| 4687 | (list class (list 'link link)))) | 4687 | (list class (list 'link link)))) |
| 4688 | (cons class-entry methods-entry))) | 4688 | (cons class-entry methods-entry))) |
| 4689 | 4689 | ||
| 4690 | (defun idlwave-xml-create-rinfo-list (xml-entry &optional class extra-kws) | 4690 | (defun idlwave-xml-create-rinfo-list (xml-entry &optional class extra-kws) |
| 4691 | ;; Create correctly structured list elements from ROUTINE or METHOD | 4691 | ;; Create correctly structured list elements from ROUTINE or METHOD |
| 4692 | ;; XML list structures. Return a list of list elements, with more | 4692 | ;; XML list structures. Return a list of list elements, with more |
| @@ -4722,8 +4722,8 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4722 | (setq kwd (cdr (assq 'name props)) | 4722 | (setq kwd (cdr (assq 'name props)) |
| 4723 | klink (cdr (assq 'link props))) | 4723 | klink (cdr (assq 'link props))) |
| 4724 | (if (string-match "^\\[XY\\(Z?\\)\\]" kwd) | 4724 | (if (string-match "^\\[XY\\(Z?\\)\\]" kwd) |
| 4725 | (progn | 4725 | (progn |
| 4726 | (setq pref-list | 4726 | (setq pref-list |
| 4727 | (if (match-string 1 kwd) '("X" "Y" "Z") '("X" "Y")) | 4727 | (if (match-string 1 kwd) '("X" "Y" "Z") '("X" "Y")) |
| 4728 | kwd (substring kwd (match-end 0))) | 4728 | kwd (substring kwd (match-end 0))) |
| 4729 | (loop for x in pref-list do | 4729 | (loop for x in pref-list do |
| @@ -4732,7 +4732,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4732 | 4732 | ||
| 4733 | (t))); Do nothing for the others | 4733 | (t))); Do nothing for the others |
| 4734 | (setq params (cdr params))) | 4734 | (setq params (cdr params))) |
| 4735 | 4735 | ||
| 4736 | ;; Debug | 4736 | ;; Debug |
| 4737 | ; (if (and (null (aref syntax-vec 0)) | 4737 | ; (if (and (null (aref syntax-vec 0)) |
| 4738 | ; (null (aref syntax-vec 1)) | 4738 | ; (null (aref syntax-vec 1)) |
| @@ -4749,16 +4749,16 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4749 | (setq kwds (idlwave-rinfo-group-keywords kwds link)) | 4749 | (setq kwds (idlwave-rinfo-group-keywords kwds link)) |
| 4750 | (loop for idx from 0 to 1 do | 4750 | (loop for idx from 0 to 1 do |
| 4751 | (if (aref syntax-vec idx) | 4751 | (if (aref syntax-vec idx) |
| 4752 | (push (append (list name (if (eq idx 0) 'pro 'fun) | 4752 | (push (append (list name (if (eq idx 0) 'pro 'fun) |
| 4753 | class '(system) | 4753 | class '(system) |
| 4754 | (idlwave-shorten-syntax | 4754 | (idlwave-shorten-syntax |
| 4755 | (aref syntax-vec idx) name class)) | 4755 | (aref syntax-vec idx) name class)) |
| 4756 | kwds) result))) | 4756 | kwds) result))) |
| 4757 | result))) | 4757 | result))) |
| 4758 | 4758 | ||
| 4759 | 4759 | ||
| 4760 | (defun idlwave-rinfo-group-keywords (kwds master-link) | 4760 | (defun idlwave-rinfo-group-keywords (kwds master-link) |
| 4761 | ;; Group keywords by link file, as a list with elements | 4761 | ;; Group keywords by link file, as a list with elements |
| 4762 | ;; (linkfile ( ("KWD1" . link1) ("KWD2" . link2)) | 4762 | ;; (linkfile ( ("KWD1" . link1) ("KWD2" . link2)) |
| 4763 | (let (kwd link anchor linkfiles block master-elt) | 4763 | (let (kwd link anchor linkfiles block master-elt) |
| 4764 | (while kwds | 4764 | (while kwds |
| @@ -4777,7 +4777,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4777 | linkfiles | 4777 | linkfiles |
| 4778 | (cons master-elt (delq master-elt linkfiles))) | 4778 | (cons master-elt (delq master-elt linkfiles))) |
| 4779 | (push (list master-link) linkfiles)))) | 4779 | (push (list master-link) linkfiles)))) |
| 4780 | 4780 | ||
| 4781 | (defun idlwave-convert-xml-clean-statement-aliases (aliases) | 4781 | (defun idlwave-convert-xml-clean-statement-aliases (aliases) |
| 4782 | ;; Clean up the syntax of routines which are actually aliases by | 4782 | ;; Clean up the syntax of routines which are actually aliases by |
| 4783 | ;; removing the "OR" from the statements | 4783 | ;; removing the "OR" from the statements |
| @@ -4790,7 +4790,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4790 | 4790 | ||
| 4791 | (defun idlwave-convert-xml-clean-routine-aliases (aliases) | 4791 | (defun idlwave-convert-xml-clean-routine-aliases (aliases) |
| 4792 | ;; Duplicate and trim original routine aliases from rinfo list | 4792 | ;; Duplicate and trim original routine aliases from rinfo list |
| 4793 | ;; This if for, e.g. OPENR/OPENW/OPENU | 4793 | ;; This if for, e.g. OPENR/OPENW/OPENU |
| 4794 | (let (alias remove-list new parts all-parts) | 4794 | (let (alias remove-list new parts all-parts) |
| 4795 | (loop for x in aliases do | 4795 | (loop for x in aliases do |
| 4796 | (when (setq parts (split-string (cdr x) "/")) | 4796 | (when (setq parts (split-string (cdr x) "/")) |
| @@ -4799,7 +4799,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4799 | (setq new (cons (cdr x) parts)) | 4799 | (setq new (cons (cdr x) parts)) |
| 4800 | (push new all-parts)) | 4800 | (push new all-parts)) |
| 4801 | (setcdr new (delete (car x) (cdr new))))) | 4801 | (setcdr new (delete (car x) (cdr new))))) |
| 4802 | 4802 | ||
| 4803 | ;; Add any missing aliases (separate by slashes) | 4803 | ;; Add any missing aliases (separate by slashes) |
| 4804 | (loop for x in all-parts do | 4804 | (loop for x in all-parts do |
| 4805 | (if (cdr x) | 4805 | (if (cdr x) |
| @@ -4843,7 +4843,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4843 | props (car (cdr pelem))) | 4843 | props (car (cdr pelem))) |
| 4844 | (cond | 4844 | (cond |
| 4845 | ((eq ptype 'FIELD) | 4845 | ((eq ptype 'FIELD) |
| 4846 | (push (cons (cdr (assq 'name props)) | 4846 | (push (cons (cdr (assq 'name props)) |
| 4847 | (cdr | 4847 | (cdr |
| 4848 | (idlwave-split-link-target (cdr (assq 'link props))))) | 4848 | (idlwave-split-link-target (cdr (assq 'link props))))) |
| 4849 | tags)))) | 4849 | tags)))) |
| @@ -4857,10 +4857,10 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4857 | (defun idlwave-save-routine-info () | 4857 | (defun idlwave-save-routine-info () |
| 4858 | (if idlwave-xml-routine-info-file | 4858 | (if idlwave-xml-routine-info-file |
| 4859 | (with-temp-file idlwave-xml-system-rinfo-converted-file | 4859 | (with-temp-file idlwave-xml-system-rinfo-converted-file |
| 4860 | (insert | 4860 | (insert |
| 4861 | (concat ";; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* | 4861 | (concat ";; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
| 4862 | ;; IDLWAVE Routine Information File (IDLWAVE version " idlwave-mode-version ") | 4862 | ;; IDLWAVE Routine Information File (IDLWAVE version " idlwave-mode-version ") |
| 4863 | ;; Automatically generated from source file: | 4863 | ;; Automatically generated from source file: |
| 4864 | ;; " idlwave-xml-routine-info-file " | 4864 | ;; " idlwave-xml-routine-info-file " |
| 4865 | ;; on " (current-time-string) " | 4865 | ;; on " (current-time-string) " |
| 4866 | ;; Do not edit.")) | 4866 | ;; Do not edit.")) |
| @@ -4886,11 +4886,11 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.") | |||
| 4886 | "Convert XML supplied IDL routine info into internal form. | 4886 | "Convert XML supplied IDL routine info into internal form. |
| 4887 | Cache to disk for quick recovery." | 4887 | Cache to disk for quick recovery." |
| 4888 | (interactive) | 4888 | (interactive) |
| 4889 | (let* ((dir (file-name-as-directory | 4889 | (let* ((dir (file-name-as-directory |
| 4890 | (expand-file-name "help/online_help" (idlwave-sys-dir)))) | 4890 | (expand-file-name "help/online_help" (idlwave-sys-dir)))) |
| 4891 | (catalog-file (expand-file-name "idl_catalog.xml" dir)) | 4891 | (catalog-file (expand-file-name "idl_catalog.xml" dir)) |
| 4892 | (elem-cnt 0) | 4892 | (elem-cnt 0) |
| 4893 | props rinfo msg-cnt elem type nelem class-result alias | 4893 | props rinfo msg-cnt elem type nelem class-result alias |
| 4894 | routines routine-aliases statement-aliases sysvar-aliases | 4894 | routines routine-aliases statement-aliases sysvar-aliases |
| 4895 | buf version-string) | 4895 | buf version-string) |
| 4896 | (if (not (file-exists-p catalog-file)) | 4896 | (if (not (file-exists-p catalog-file)) |
| @@ -4898,7 +4898,7 @@ Cache to disk for quick recovery." | |||
| 4898 | (if (not (file-readable-p catalog-file)) | 4898 | (if (not (file-readable-p catalog-file)) |
| 4899 | (error "Cannot read XML routine info file: %s" catalog-file))) | 4899 | (error "Cannot read XML routine info file: %s" catalog-file))) |
| 4900 | (require 'xml) | 4900 | (require 'xml) |
| 4901 | (message "Reading XML routine info...") | 4901 | (message "Reading XML routine info...") |
| 4902 | (unwind-protect | 4902 | (unwind-protect |
| 4903 | (progn | 4903 | (progn |
| 4904 | ;; avoid warnings about read-only files | 4904 | ;; avoid warnings about read-only files |
| @@ -4909,13 +4909,13 @@ Cache to disk for quick recovery." | |||
| 4909 | (setq rinfo (assq 'CATALOG rinfo)) | 4909 | (setq rinfo (assq 'CATALOG rinfo)) |
| 4910 | (unless rinfo (error "Failed to parse XML routine info")) | 4910 | (unless rinfo (error "Failed to parse XML routine info")) |
| 4911 | ;;(setq rinfo (car rinfo)) ; Skip the catalog stuff. | 4911 | ;;(setq rinfo (car rinfo)) ; Skip the catalog stuff. |
| 4912 | 4912 | ||
| 4913 | (setq version-string (cdr (assq 'version (nth 1 rinfo))) | 4913 | (setq version-string (cdr (assq 'version (nth 1 rinfo))) |
| 4914 | rinfo (cddr rinfo)) | 4914 | rinfo (cddr rinfo)) |
| 4915 | 4915 | ||
| 4916 | (setq nelem (length rinfo) | 4916 | (setq nelem (length rinfo) |
| 4917 | msg-cnt (/ nelem 20)) | 4917 | msg-cnt (/ nelem 20)) |
| 4918 | 4918 | ||
| 4919 | (setq idlwave-xml-routine-info-file nil) | 4919 | (setq idlwave-xml-routine-info-file nil) |
| 4920 | (message "Converting XML routine info...") | 4920 | (message "Converting XML routine info...") |
| 4921 | (setq idlwave-system-routines nil | 4921 | (setq idlwave-system-routines nil |
| @@ -4932,12 +4932,12 @@ Cache to disk for quick recovery." | |||
| 4932 | (setq type (car elem) | 4932 | (setq type (car elem) |
| 4933 | props (car (cdr elem))) | 4933 | props (car (cdr elem))) |
| 4934 | (if (= (mod elem-cnt msg-cnt) 0) | 4934 | (if (= (mod elem-cnt msg-cnt) 0) |
| 4935 | (message "Converting XML routine info...%2d%%" | 4935 | (message "Converting XML routine info...%2d%%" |
| 4936 | (/ (* elem-cnt 100) nelem))) | 4936 | (/ (* elem-cnt 100) nelem))) |
| 4937 | (cond | 4937 | (cond |
| 4938 | ((eq type 'ROUTINE) | 4938 | ((eq type 'ROUTINE) |
| 4939 | (if (setq alias (assq 'alias_to props)) | 4939 | (if (setq alias (assq 'alias_to props)) |
| 4940 | (push (cons (cdr (assq 'name props)) (cdr alias)) | 4940 | (push (cons (cdr (assq 'name props)) (cdr alias)) |
| 4941 | routine-aliases) | 4941 | routine-aliases) |
| 4942 | (setq routines (idlwave-xml-create-rinfo-list elem)) | 4942 | (setq routines (idlwave-xml-create-rinfo-list elem)) |
| 4943 | (if (listp (cdr routines)) | 4943 | (if (listp (cdr routines)) |
| @@ -4945,7 +4945,7 @@ Cache to disk for quick recovery." | |||
| 4945 | (nconc idlwave-system-routines routines)) | 4945 | (nconc idlwave-system-routines routines)) |
| 4946 | ;; a cons cell is an executive commands | 4946 | ;; a cons cell is an executive commands |
| 4947 | (push routines idlwave-executive-commands-alist)))) | 4947 | (push routines idlwave-executive-commands-alist)))) |
| 4948 | 4948 | ||
| 4949 | ((eq type 'CLASS) | 4949 | ((eq type 'CLASS) |
| 4950 | (setq class-result (idlwave-xml-create-class-method-lists elem)) | 4950 | (setq class-result (idlwave-xml-create-class-method-lists elem)) |
| 4951 | (push (car class-result) idlwave-system-class-info) | 4951 | (push (car class-result) idlwave-system-class-info) |
| @@ -4963,10 +4963,10 @@ Cache to disk for quick recovery." | |||
| 4963 | 4963 | ||
| 4964 | ((eq type 'SYSVAR) | 4964 | ((eq type 'SYSVAR) |
| 4965 | (if (setq alias (cdr (assq 'alias_to props))) | 4965 | (if (setq alias (cdr (assq 'alias_to props))) |
| 4966 | (push (cons (substring (cdr (assq 'name props)) 1) | 4966 | (push (cons (substring (cdr (assq 'name props)) 1) |
| 4967 | (substring alias 1)) | 4967 | (substring alias 1)) |
| 4968 | sysvar-aliases) | 4968 | sysvar-aliases) |
| 4969 | (push (idlwave-xml-create-sysvar-alist elem) | 4969 | (push (idlwave-xml-create-sysvar-alist elem) |
| 4970 | idlwave-system-variables-alist))) | 4970 | idlwave-system-variables-alist))) |
| 4971 | (t)))) | 4971 | (t)))) |
| 4972 | (idlwave-convert-xml-clean-routine-aliases routine-aliases) | 4972 | (idlwave-convert-xml-clean-routine-aliases routine-aliases) |
| @@ -4976,12 +4976,12 @@ Cache to disk for quick recovery." | |||
| 4976 | (setq idlwave-xml-routine-info-file catalog-file) | 4976 | (setq idlwave-xml-routine-info-file catalog-file) |
| 4977 | (idlwave-save-routine-info) | 4977 | (idlwave-save-routine-info) |
| 4978 | (message "Converting XML routine info...done"))) | 4978 | (message "Converting XML routine info...done"))) |
| 4979 | 4979 | ||
| 4980 | 4980 | ||
| 4981 | ;; ("ROUTINE" type class | 4981 | ;; ("ROUTINE" type class |
| 4982 | ;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") | | 4982 | ;; (system) | (lib pro_file dir "LIBNAME") | (user pro_file dir "USERLIB") | |
| 4983 | ;; (buffer pro_file dir) | (compiled pro_file dir) | 4983 | ;; (buffer pro_file dir) | (compiled pro_file dir) |
| 4984 | ;; "calling_string" ("HELPFILE" (("KWD1" . link1) ...)) | 4984 | ;; "calling_string" ("HELPFILE" (("KWD1" . link1) ...)) |
| 4985 | ;; ("HELPFILE2" (("KWD2" . link) ...)) ...) | 4985 | ;; ("HELPFILE2" (("KWD2" . link) ...)) ...) |
| 4986 | 4986 | ||
| 4987 | 4987 | ||
| @@ -4996,7 +4996,7 @@ Cache to disk for quick recovery." | |||
| 4996 | (message "Loading system routine info in idle time...done") | 4996 | (message "Loading system routine info in idle time...done") |
| 4997 | (aset arr 0 t) | 4997 | (aset arr 0 t) |
| 4998 | (throw 'exit t)) | 4998 | (throw 'exit t)) |
| 4999 | 4999 | ||
| 5000 | (when (not (aref arr 1)) | 5000 | (when (not (aref arr 1)) |
| 5001 | (message "Normalizing idlwave-system-routines in idle time...") | 5001 | (message "Normalizing idlwave-system-routines in idle time...") |
| 5002 | (idlwave-reset-sintern t) | 5002 | (idlwave-reset-sintern t) |
| @@ -5021,7 +5021,7 @@ Cache to disk for quick recovery." | |||
| 5021 | (progn | 5021 | (progn |
| 5022 | (setq idlwave-library-routines nil) | 5022 | (setq idlwave-library-routines nil) |
| 5023 | (ding) | 5023 | (ding) |
| 5024 | (message "Outdated user catalog: %s... recreate" | 5024 | (message "Outdated user catalog: %s... recreate" |
| 5025 | idlwave-user-catalog-file)) | 5025 | idlwave-user-catalog-file)) |
| 5026 | (message "Loading user catalog in idle time...done"))) | 5026 | (message "Loading user catalog in idle time...done"))) |
| 5027 | (aset arr 2 t) | 5027 | (aset arr 2 t) |
| @@ -5030,16 +5030,16 @@ Cache to disk for quick recovery." | |||
| 5030 | (when (not (aref arr 3)) | 5030 | (when (not (aref arr 3)) |
| 5031 | (when idlwave-user-catalog-routines | 5031 | (when idlwave-user-catalog-routines |
| 5032 | (message "Normalizing user catalog routines in idle time...") | 5032 | (message "Normalizing user catalog routines in idle time...") |
| 5033 | (setq idlwave-user-catalog-routines | 5033 | (setq idlwave-user-catalog-routines |
| 5034 | (idlwave-sintern-rinfo-list | 5034 | (idlwave-sintern-rinfo-list |
| 5035 | idlwave-user-catalog-routines 'sys)) | 5035 | idlwave-user-catalog-routines 'sys)) |
| 5036 | (message | 5036 | (message |
| 5037 | "Normalizing user catalog routines in idle time...done")) | 5037 | "Normalizing user catalog routines in idle time...done")) |
| 5038 | (aset arr 3 t) | 5038 | (aset arr 3 t) |
| 5039 | (throw 'exit t)) | 5039 | (throw 'exit t)) |
| 5040 | 5040 | ||
| 5041 | (when (not (aref arr 4)) | 5041 | (when (not (aref arr 4)) |
| 5042 | (idlwave-scan-library-catalogs | 5042 | (idlwave-scan-library-catalogs |
| 5043 | "Loading and normalizing library catalogs in idle time...") | 5043 | "Loading and normalizing library catalogs in idle time...") |
| 5044 | (aset arr 4 t) | 5044 | (aset arr 4 t) |
| 5045 | (throw 'exit t)) | 5045 | (throw 'exit t)) |
| @@ -5047,7 +5047,7 @@ Cache to disk for quick recovery." | |||
| 5047 | (message "Finishing initialization in idle time...") | 5047 | (message "Finishing initialization in idle time...") |
| 5048 | (idlwave-routines) | 5048 | (idlwave-routines) |
| 5049 | (message "Finishing initialization in idle time...done") | 5049 | (message "Finishing initialization in idle time...done") |
| 5050 | (aset arr 5 t) | 5050 | (aset arr 5 t) |
| 5051 | (throw 'exit nil))) | 5051 | (throw 'exit nil))) |
| 5052 | ;; restart the timer | 5052 | ;; restart the timer |
| 5053 | (if (sit-for 1) | 5053 | (if (sit-for 1) |
| @@ -5082,17 +5082,17 @@ Cache to disk for quick recovery." | |||
| 5082 | (when (or force (not (aref idlwave-load-rinfo-steps-done 2))) | 5082 | (when (or force (not (aref idlwave-load-rinfo-steps-done 2))) |
| 5083 | (load-file idlwave-user-catalog-file)) | 5083 | (load-file idlwave-user-catalog-file)) |
| 5084 | (error nil)) | 5084 | (error nil)) |
| 5085 | (when (and | 5085 | (when (and |
| 5086 | (boundp 'idlwave-library-routines) | 5086 | (boundp 'idlwave-library-routines) |
| 5087 | idlwave-library-routines) | 5087 | idlwave-library-routines) |
| 5088 | (setq idlwave-library-routines nil) | 5088 | (setq idlwave-library-routines nil) |
| 5089 | (error "Outdated user catalog: %s... recreate" | 5089 | (error "Outdated user catalog: %s... recreate" |
| 5090 | idlwave-user-catalog-file)) | 5090 | idlwave-user-catalog-file)) |
| 5091 | (setq idlwave-true-path-alist nil) | 5091 | (setq idlwave-true-path-alist nil) |
| 5092 | (when (or force (not (aref idlwave-load-rinfo-steps-done 3))) | 5092 | (when (or force (not (aref idlwave-load-rinfo-steps-done 3))) |
| 5093 | (message "Normalizing user catalog routines...") | 5093 | (message "Normalizing user catalog routines...") |
| 5094 | (setq idlwave-user-catalog-routines | 5094 | (setq idlwave-user-catalog-routines |
| 5095 | (idlwave-sintern-rinfo-list | 5095 | (idlwave-sintern-rinfo-list |
| 5096 | idlwave-user-catalog-routines 'sys)) | 5096 | idlwave-user-catalog-routines 'sys)) |
| 5097 | (message "Normalizing user catalog routines...done"))) | 5097 | (message "Normalizing user catalog routines...done"))) |
| 5098 | 5098 | ||
| @@ -5105,11 +5105,11 @@ Cache to disk for quick recovery." | |||
| 5105 | 5105 | ||
| 5106 | (defun idlwave-update-buffer-routine-info () | 5106 | (defun idlwave-update-buffer-routine-info () |
| 5107 | (let (res) | 5107 | (let (res) |
| 5108 | (cond | 5108 | (cond |
| 5109 | ((eq idlwave-scan-all-buffers-for-routine-info t) | 5109 | ((eq idlwave-scan-all-buffers-for-routine-info t) |
| 5110 | ;; Scan all buffers, current buffer last | 5110 | ;; Scan all buffers, current buffer last |
| 5111 | (message "Scanning all buffers...") | 5111 | (message "Scanning all buffers...") |
| 5112 | (setq res (idlwave-get-routine-info-from-buffers | 5112 | (setq res (idlwave-get-routine-info-from-buffers |
| 5113 | (reverse (buffer-list))))) | 5113 | (reverse (buffer-list))))) |
| 5114 | ((null idlwave-scan-all-buffers-for-routine-info) | 5114 | ((null idlwave-scan-all-buffers-for-routine-info) |
| 5115 | ;; Don't scan any buffers | 5115 | ;; Don't scan any buffers |
| @@ -5122,12 +5122,12 @@ Cache to disk for quick recovery." | |||
| 5122 | (setq res (idlwave-get-routine-info-from-buffers | 5122 | (setq res (idlwave-get-routine-info-from-buffers |
| 5123 | (list (current-buffer)))))))) | 5123 | (list (current-buffer)))))))) |
| 5124 | ;; Put the result into the correct variable | 5124 | ;; Put the result into the correct variable |
| 5125 | (setq idlwave-buffer-routines | 5125 | (setq idlwave-buffer-routines |
| 5126 | (idlwave-sintern-rinfo-list res 'set)))) | 5126 | (idlwave-sintern-rinfo-list res 'set)))) |
| 5127 | 5127 | ||
| 5128 | (defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook) | 5128 | (defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook) |
| 5129 | "Put the different sources for routine information together." | 5129 | "Put the different sources for routine information together." |
| 5130 | ;; The sequence here is important because earlier definitions shadow | 5130 | ;; The sequence here is important because earlier definitions shadow |
| 5131 | ;; later ones. We assume that if things in the buffers are newer | 5131 | ;; later ones. We assume that if things in the buffers are newer |
| 5132 | ;; then in the shell of the system, they are meant to be different. | 5132 | ;; then in the shell of the system, they are meant to be different. |
| 5133 | (setcdr idlwave-last-system-routine-info-cons-cell | 5133 | (setcdr idlwave-last-system-routine-info-cons-cell |
| @@ -5139,7 +5139,7 @@ Cache to disk for quick recovery." | |||
| 5139 | 5139 | ||
| 5140 | ;; Give a message with information about the number of routines we have. | 5140 | ;; Give a message with information about the number of routines we have. |
| 5141 | (unless quiet | 5141 | (unless quiet |
| 5142 | (message | 5142 | (message |
| 5143 | "Routines Found: buffer(%d) compiled(%d) library(%d) user(%d) system(%d)" | 5143 | "Routines Found: buffer(%d) compiled(%d) library(%d) user(%d) system(%d)" |
| 5144 | (length idlwave-buffer-routines) | 5144 | (length idlwave-buffer-routines) |
| 5145 | (length idlwave-compiled-routines) | 5145 | (length idlwave-compiled-routines) |
| @@ -5157,7 +5157,7 @@ Cache to disk for quick recovery." | |||
| 5157 | (when (and (setq class (nth 2 x)) | 5157 | (when (and (setq class (nth 2 x)) |
| 5158 | (not (assq class idlwave-class-alist))) | 5158 | (not (assq class idlwave-class-alist))) |
| 5159 | (push (list class) idlwave-class-alist))) | 5159 | (push (list class) idlwave-class-alist))) |
| 5160 | idlwave-class-alist))) | 5160 | idlwave-class-alist))) |
| 5161 | 5161 | ||
| 5162 | ;; Three functions for the hooks | 5162 | ;; Three functions for the hooks |
| 5163 | (defun idlwave-save-buffer-update () | 5163 | (defun idlwave-save-buffer-update () |
| @@ -5190,7 +5190,7 @@ Cache to disk for quick recovery." | |||
| 5190 | 5190 | ||
| 5191 | (defun idlwave-replace-buffer-routine-info (file new) | 5191 | (defun idlwave-replace-buffer-routine-info (file new) |
| 5192 | "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW." | 5192 | "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW." |
| 5193 | (let ((list idlwave-buffer-routines) | 5193 | (let ((list idlwave-buffer-routines) |
| 5194 | found) | 5194 | found) |
| 5195 | (while list | 5195 | (while list |
| 5196 | ;; The following test uses eq to make sure it works correctly | 5196 | ;; The following test uses eq to make sure it works correctly |
| @@ -5201,7 +5201,7 @@ Cache to disk for quick recovery." | |||
| 5201 | (setcar list nil) | 5201 | (setcar list nil) |
| 5202 | (setq found t)) | 5202 | (setq found t)) |
| 5203 | (if found | 5203 | (if found |
| 5204 | ;; End of that section reached. Jump. | 5204 | ;; End of that section reached. Jump. |
| 5205 | (setq list nil))) | 5205 | (setq list nil))) |
| 5206 | (setq list (cdr list))) | 5206 | (setq list (cdr list))) |
| 5207 | (setq idlwave-buffer-routines | 5207 | (setq idlwave-buffer-routines |
| @@ -5233,11 +5233,11 @@ Cache to disk for quick recovery." | |||
| 5233 | (save-restriction | 5233 | (save-restriction |
| 5234 | (widen) | 5234 | (widen) |
| 5235 | (goto-char (point-min)) | 5235 | (goto-char (point-min)) |
| 5236 | (while (re-search-forward | 5236 | (while (re-search-forward |
| 5237 | "^[ \t]*\\(pro\\|function\\)[ \t]" nil t) | 5237 | "^[ \t]*\\(pro\\|function\\)[ \t]" nil t) |
| 5238 | (setq string (buffer-substring-no-properties | 5238 | (setq string (buffer-substring-no-properties |
| 5239 | (match-beginning 0) | 5239 | (match-beginning 0) |
| 5240 | (progn | 5240 | (progn |
| 5241 | (idlwave-end-of-statement) | 5241 | (idlwave-end-of-statement) |
| 5242 | (point)))) | 5242 | (point)))) |
| 5243 | (setq entry (idlwave-parse-definition string)) | 5243 | (setq entry (idlwave-parse-definition string)) |
| @@ -5275,7 +5275,7 @@ Cache to disk for quick recovery." | |||
| 5275 | (push (match-string 1 string) args))) | 5275 | (push (match-string 1 string) args))) |
| 5276 | ;; Normalize and sort. | 5276 | ;; Normalize and sort. |
| 5277 | (setq args (nreverse args)) | 5277 | (setq args (nreverse args)) |
| 5278 | (setq keywords (sort keywords (lambda (a b) | 5278 | (setq keywords (sort keywords (lambda (a b) |
| 5279 | (string< (downcase a) (downcase b))))) | 5279 | (string< (downcase a) (downcase b))))) |
| 5280 | ;; Make and return the entry | 5280 | ;; Make and return the entry |
| 5281 | ;; We don't know which argument are optional, so this information | 5281 | ;; We don't know which argument are optional, so this information |
| @@ -5285,7 +5285,7 @@ Cache to disk for quick recovery." | |||
| 5285 | class | 5285 | class |
| 5286 | (cond ((not (boundp 'idlwave-scanning-lib)) | 5286 | (cond ((not (boundp 'idlwave-scanning-lib)) |
| 5287 | (list 'buffer (buffer-file-name))) | 5287 | (list 'buffer (buffer-file-name))) |
| 5288 | ; ((string= (downcase | 5288 | ; ((string= (downcase |
| 5289 | ; (file-name-sans-extension | 5289 | ; (file-name-sans-extension |
| 5290 | ; (file-name-nondirectory (buffer-file-name)))) | 5290 | ; (file-name-nondirectory (buffer-file-name)))) |
| 5291 | ; (downcase name)) | 5291 | ; (downcase name)) |
| @@ -5293,7 +5293,7 @@ Cache to disk for quick recovery." | |||
| 5293 | ; (t (cons 'lib (file-name-nondirectory (buffer-file-name)))) | 5293 | ; (t (cons 'lib (file-name-nondirectory (buffer-file-name)))) |
| 5294 | (t (list 'user (file-name-nondirectory (buffer-file-name)) | 5294 | (t (list 'user (file-name-nondirectory (buffer-file-name)) |
| 5295 | idlwave-scanning-lib-dir "UserLib"))) | 5295 | idlwave-scanning-lib-dir "UserLib"))) |
| 5296 | (concat | 5296 | (concat |
| 5297 | (if (string= type "function") "Result = " "") | 5297 | (if (string= type "function") "Result = " "") |
| 5298 | (if class "Obj ->[%s::]" "") | 5298 | (if class "Obj ->[%s::]" "") |
| 5299 | "%s" | 5299 | "%s" |
| @@ -5339,10 +5339,10 @@ time - so no widget will pop up." | |||
| 5339 | (> (length idlwave-user-catalog-file) 0) | 5339 | (> (length idlwave-user-catalog-file) 0) |
| 5340 | (file-accessible-directory-p | 5340 | (file-accessible-directory-p |
| 5341 | (file-name-directory idlwave-user-catalog-file)) | 5341 | (file-name-directory idlwave-user-catalog-file)) |
| 5342 | (not (string= "" (file-name-nondirectory | 5342 | (not (string= "" (file-name-nondirectory |
| 5343 | idlwave-user-catalog-file)))) | 5343 | idlwave-user-catalog-file)))) |
| 5344 | (error "`idlwave-user-catalog-file' does not point to a file in an accessible directory")) | 5344 | (error "`idlwave-user-catalog-file' does not point to a file in an accessible directory")) |
| 5345 | 5345 | ||
| 5346 | (cond | 5346 | (cond |
| 5347 | ;; Rescan the known directories | 5347 | ;; Rescan the known directories |
| 5348 | ((and arg idlwave-path-alist | 5348 | ((and arg idlwave-path-alist |
| @@ -5352,13 +5352,13 @@ time - so no widget will pop up." | |||
| 5352 | ;; Expand the directories from library-path and run the widget | 5352 | ;; Expand the directories from library-path and run the widget |
| 5353 | (idlwave-library-path | 5353 | (idlwave-library-path |
| 5354 | (idlwave-display-user-catalog-widget | 5354 | (idlwave-display-user-catalog-widget |
| 5355 | (if idlwave-true-path-alist | 5355 | (if idlwave-true-path-alist |
| 5356 | ;; Propagate any flags on the existing path-alist | 5356 | ;; Propagate any flags on the existing path-alist |
| 5357 | (mapcar (lambda (x) | 5357 | (mapcar (lambda (x) |
| 5358 | (let ((path-entry (assoc (file-truename x) | 5358 | (let ((path-entry (assoc (file-truename x) |
| 5359 | idlwave-true-path-alist))) | 5359 | idlwave-true-path-alist))) |
| 5360 | (if path-entry | 5360 | (if path-entry |
| 5361 | (cons x (cdr path-entry)) | 5361 | (cons x (cdr path-entry)) |
| 5362 | (list x)))) | 5362 | (list x)))) |
| 5363 | (idlwave-expand-path idlwave-library-path)) | 5363 | (idlwave-expand-path idlwave-library-path)) |
| 5364 | (mapcar 'list (idlwave-expand-path idlwave-library-path))))) | 5364 | (mapcar 'list (idlwave-expand-path idlwave-library-path))))) |
| @@ -5383,7 +5383,7 @@ time - so no widget will pop up." | |||
| 5383 | (idlwave-scan-library-catalogs "Locating library catalogs..." 'no-load) | 5383 | (idlwave-scan-library-catalogs "Locating library catalogs..." 'no-load) |
| 5384 | (idlwave-display-user-catalog-widget idlwave-path-alist))) | 5384 | (idlwave-display-user-catalog-widget idlwave-path-alist))) |
| 5385 | 5385 | ||
| 5386 | (defconst idlwave-user-catalog-widget-help-string | 5386 | (defconst idlwave-user-catalog-widget-help-string |
| 5387 | "This is the front-end to the creation of the IDLWAVE user catalog. | 5387 | "This is the front-end to the creation of the IDLWAVE user catalog. |
| 5388 | Please select the directories on IDL's search path from which you | 5388 | Please select the directories on IDL's search path from which you |
| 5389 | would like to extract routine information, to be stored in the file: | 5389 | would like to extract routine information, to be stored in the file: |
| @@ -5418,7 +5418,7 @@ directories and save the routine info. | |||
| 5418 | (make-local-variable 'idlwave-widget) | 5418 | (make-local-variable 'idlwave-widget) |
| 5419 | (widget-insert (format idlwave-user-catalog-widget-help-string | 5419 | (widget-insert (format idlwave-user-catalog-widget-help-string |
| 5420 | idlwave-user-catalog-file)) | 5420 | idlwave-user-catalog-file)) |
| 5421 | 5421 | ||
| 5422 | (widget-create 'push-button | 5422 | (widget-create 'push-button |
| 5423 | :notify 'idlwave-widget-scan-user-lib-files | 5423 | :notify 'idlwave-widget-scan-user-lib-files |
| 5424 | "Scan & Save") | 5424 | "Scan & Save") |
| @@ -5428,7 +5428,7 @@ directories and save the routine info. | |||
| 5428 | "Delete File") | 5428 | "Delete File") |
| 5429 | (widget-insert " ") | 5429 | (widget-insert " ") |
| 5430 | (widget-create 'push-button | 5430 | (widget-create 'push-button |
| 5431 | :notify | 5431 | :notify |
| 5432 | '(lambda (&rest ignore) | 5432 | '(lambda (&rest ignore) |
| 5433 | (let ((path-list (widget-get idlwave-widget :path-dirs))) | 5433 | (let ((path-list (widget-get idlwave-widget :path-dirs))) |
| 5434 | (mapcar (lambda (x) | 5434 | (mapcar (lambda (x) |
| @@ -5439,7 +5439,7 @@ directories and save the routine info. | |||
| 5439 | "Select All Non-Lib") | 5439 | "Select All Non-Lib") |
| 5440 | (widget-insert " ") | 5440 | (widget-insert " ") |
| 5441 | (widget-create 'push-button | 5441 | (widget-create 'push-button |
| 5442 | :notify | 5442 | :notify |
| 5443 | '(lambda (&rest ignore) | 5443 | '(lambda (&rest ignore) |
| 5444 | (let ((path-list (widget-get idlwave-widget :path-dirs))) | 5444 | (let ((path-list (widget-get idlwave-widget :path-dirs))) |
| 5445 | (mapcar (lambda (x) | 5445 | (mapcar (lambda (x) |
| @@ -5455,18 +5455,18 @@ directories and save the routine info. | |||
| 5455 | (widget-insert "\n\n") | 5455 | (widget-insert "\n\n") |
| 5456 | 5456 | ||
| 5457 | (widget-insert "Select Directories: \n") | 5457 | (widget-insert "Select Directories: \n") |
| 5458 | 5458 | ||
| 5459 | (setq idlwave-widget | 5459 | (setq idlwave-widget |
| 5460 | (apply 'widget-create | 5460 | (apply 'widget-create |
| 5461 | 'checklist | 5461 | 'checklist |
| 5462 | :value (delq nil (mapcar (lambda (x) | 5462 | :value (delq nil (mapcar (lambda (x) |
| 5463 | (if (memq 'user (cdr x)) | 5463 | (if (memq 'user (cdr x)) |
| 5464 | (car x))) | 5464 | (car x))) |
| 5465 | dirs-list)) | 5465 | dirs-list)) |
| 5466 | :greedy t | 5466 | :greedy t |
| 5467 | :tag "List of directories" | 5467 | :tag "List of directories" |
| 5468 | (mapcar (lambda (x) | 5468 | (mapcar (lambda (x) |
| 5469 | (list 'item | 5469 | (list 'item |
| 5470 | (if (memq 'lib (cdr x)) | 5470 | (if (memq 'lib (cdr x)) |
| 5471 | (concat "[LIB] " (car x) ) | 5471 | (concat "[LIB] " (car x) ) |
| 5472 | (car x)))) dirs-list))) | 5472 | (car x)))) dirs-list))) |
| @@ -5476,7 +5476,7 @@ directories and save the routine info. | |||
| 5476 | (widget-setup) | 5476 | (widget-setup) |
| 5477 | (goto-char (point-min)) | 5477 | (goto-char (point-min)) |
| 5478 | (delete-other-windows)) | 5478 | (delete-other-windows)) |
| 5479 | 5479 | ||
| 5480 | (defun idlwave-delete-user-catalog-file (&rest ignore) | 5480 | (defun idlwave-delete-user-catalog-file (&rest ignore) |
| 5481 | (if (yes-or-no-p | 5481 | (if (yes-or-no-p |
| 5482 | (format "Delete file %s " idlwave-user-catalog-file)) | 5482 | (format "Delete file %s " idlwave-user-catalog-file)) |
| @@ -5492,7 +5492,7 @@ directories and save the routine info. | |||
| 5492 | (this-path-alist path-alist) | 5492 | (this-path-alist path-alist) |
| 5493 | dir-entry) | 5493 | dir-entry) |
| 5494 | (while (setq dir-entry (pop this-path-alist)) | 5494 | (while (setq dir-entry (pop this-path-alist)) |
| 5495 | (if (member | 5495 | (if (member |
| 5496 | (if (memq 'lib (cdr dir-entry)) | 5496 | (if (memq 'lib (cdr dir-entry)) |
| 5497 | (concat "[LIB] " (car dir-entry)) | 5497 | (concat "[LIB] " (car dir-entry)) |
| 5498 | (car dir-entry)) | 5498 | (car dir-entry)) |
| @@ -5589,7 +5589,7 @@ directories and save the routine info. | |||
| 5589 | ;; Define the variable which knows the value of "!DIR" | 5589 | ;; Define the variable which knows the value of "!DIR" |
| 5590 | (insert (format "\n(setq idlwave-system-directory \"%s\")\n" | 5590 | (insert (format "\n(setq idlwave-system-directory \"%s\")\n" |
| 5591 | idlwave-system-directory)) | 5591 | idlwave-system-directory)) |
| 5592 | 5592 | ||
| 5593 | ;; Define the variable which contains a list of all scanned directories | 5593 | ;; Define the variable which contains a list of all scanned directories |
| 5594 | (insert "\n(setq idlwave-path-alist\n '(") | 5594 | (insert "\n(setq idlwave-path-alist\n '(") |
| 5595 | (let ((standard-output (current-buffer))) | 5595 | (let ((standard-output (current-buffer))) |
| @@ -5629,7 +5629,7 @@ directories and save the routine info. | |||
| 5629 | (when (file-directory-p dir) | 5629 | (when (file-directory-p dir) |
| 5630 | (setq files (nreverse (directory-files dir t "[^.]"))) | 5630 | (setq files (nreverse (directory-files dir t "[^.]"))) |
| 5631 | (while (setq file (pop files)) | 5631 | (while (setq file (pop files)) |
| 5632 | (if (file-directory-p file) | 5632 | (if (file-directory-p file) |
| 5633 | (push (file-name-as-directory file) path))) | 5633 | (push (file-name-as-directory file) path))) |
| 5634 | (push dir path1))) | 5634 | (push dir path1))) |
| 5635 | path1)) | 5635 | path1)) |
| @@ -5641,7 +5641,7 @@ directories and save the routine info. | |||
| 5641 | 5641 | ||
| 5642 | 5642 | ||
| 5643 | (defun idlwave-scan-library-catalogs (&optional message-base no-load) | 5643 | (defun idlwave-scan-library-catalogs (&optional message-base no-load) |
| 5644 | "Scan for library catalog files (.idlwave_catalog) and ingest. | 5644 | "Scan for library catalog files (.idlwave_catalog) and ingest. |
| 5645 | 5645 | ||
| 5646 | All directories on `idlwave-path-alist' (or `idlwave-library-path' | 5646 | All directories on `idlwave-path-alist' (or `idlwave-library-path' |
| 5647 | instead, if present) are searched. Print MESSAGE-BASE along with the | 5647 | instead, if present) are searched. Print MESSAGE-BASE along with the |
| @@ -5649,7 +5649,7 @@ libraries being loaded, if passed, and skip loading/normalizing if | |||
| 5649 | NO-LOAD is non-nil. The variable `idlwave-use-library-catalogs' can | 5649 | NO-LOAD is non-nil. The variable `idlwave-use-library-catalogs' can |
| 5650 | be set to nil to disable library catalog scanning." | 5650 | be set to nil to disable library catalog scanning." |
| 5651 | (when idlwave-use-library-catalogs | 5651 | (when idlwave-use-library-catalogs |
| 5652 | (let ((dirs | 5652 | (let ((dirs |
| 5653 | (if idlwave-library-path | 5653 | (if idlwave-library-path |
| 5654 | (idlwave-expand-path idlwave-library-path) | 5654 | (idlwave-expand-path idlwave-library-path) |
| 5655 | (mapcar 'car idlwave-path-alist))) | 5655 | (mapcar 'car idlwave-path-alist))) |
| @@ -5658,7 +5658,7 @@ be set to nil to disable library catalog scanning." | |||
| 5658 | (if message-base (message message-base)) | 5658 | (if message-base (message message-base)) |
| 5659 | (while (setq dir (pop dirs)) | 5659 | (while (setq dir (pop dirs)) |
| 5660 | (catch 'continue | 5660 | (catch 'continue |
| 5661 | (when (file-readable-p | 5661 | (when (file-readable-p |
| 5662 | (setq catalog (expand-file-name ".idlwave_catalog" dir))) | 5662 | (setq catalog (expand-file-name ".idlwave_catalog" dir))) |
| 5663 | (unless no-load | 5663 | (unless no-load |
| 5664 | (setq idlwave-library-catalog-routines nil) | 5664 | (setq idlwave-library-catalog-routines nil) |
| @@ -5666,20 +5666,20 @@ be set to nil to disable library catalog scanning." | |||
| 5666 | (condition-case nil | 5666 | (condition-case nil |
| 5667 | (load catalog t t t) | 5667 | (load catalog t t t) |
| 5668 | (error (throw 'continue t))) | 5668 | (error (throw 'continue t))) |
| 5669 | (when (and | 5669 | (when (and |
| 5670 | message-base | 5670 | message-base |
| 5671 | (not (string= idlwave-library-catalog-libname | 5671 | (not (string= idlwave-library-catalog-libname |
| 5672 | old-libname))) | 5672 | old-libname))) |
| 5673 | (message "%s" (concat message-base | 5673 | (message "%s" (concat message-base |
| 5674 | idlwave-library-catalog-libname)) | 5674 | idlwave-library-catalog-libname)) |
| 5675 | (setq old-libname idlwave-library-catalog-libname)) | 5675 | (setq old-libname idlwave-library-catalog-libname)) |
| 5676 | (when idlwave-library-catalog-routines | 5676 | (when idlwave-library-catalog-routines |
| 5677 | (setq all-routines | 5677 | (setq all-routines |
| 5678 | (append | 5678 | (append |
| 5679 | (idlwave-sintern-rinfo-list | 5679 | (idlwave-sintern-rinfo-list |
| 5680 | idlwave-library-catalog-routines 'sys dir) | 5680 | idlwave-library-catalog-routines 'sys dir) |
| 5681 | all-routines)))) | 5681 | all-routines)))) |
| 5682 | 5682 | ||
| 5683 | ;; Add a 'lib flag if on path-alist | 5683 | ;; Add a 'lib flag if on path-alist |
| 5684 | (when (and idlwave-path-alist | 5684 | (when (and idlwave-path-alist |
| 5685 | (setq dir-entry (assoc dir idlwave-path-alist))) | 5685 | (setq dir-entry (assoc dir idlwave-path-alist))) |
| @@ -5690,7 +5690,7 @@ be set to nil to disable library catalog scanning." | |||
| 5690 | ;;----- Communicating with the Shell ------------------- | 5690 | ;;----- Communicating with the Shell ------------------- |
| 5691 | 5691 | ||
| 5692 | ;; First, here is the idl program which can be used to query IDL for | 5692 | ;; First, here is the idl program which can be used to query IDL for |
| 5693 | ;; defined routines. | 5693 | ;; defined routines. |
| 5694 | (defconst idlwave-routine-info.pro | 5694 | (defconst idlwave-routine-info.pro |
| 5695 | " | 5695 | " |
| 5696 | ;; START OF IDLWAVE SUPPORT ROUTINES | 5696 | ;; START OF IDLWAVE SUPPORT ROUTINES |
| @@ -5708,10 +5708,10 @@ end | |||
| 5708 | pro idlwave_print_info_entry,name,func=func,separator=sep | 5708 | pro idlwave_print_info_entry,name,func=func,separator=sep |
| 5709 | ;; See if it's an object method | 5709 | ;; See if it's an object method |
| 5710 | if name eq '' then return | 5710 | if name eq '' then return |
| 5711 | func = keyword_set(func) | 5711 | func = keyword_set(func) |
| 5712 | methsep = strpos(name,'::') | 5712 | methsep = strpos(name,'::') |
| 5713 | meth = methsep ne -1 | 5713 | meth = methsep ne -1 |
| 5714 | 5714 | ||
| 5715 | ;; Get routine info | 5715 | ;; Get routine info |
| 5716 | pars = routine_info(name,/parameters,functions=func) | 5716 | pars = routine_info(name,/parameters,functions=func) |
| 5717 | source = routine_info(name,/source,functions=func) | 5717 | source = routine_info(name,/source,functions=func) |
| @@ -5719,12 +5719,12 @@ pro idlwave_print_info_entry,name,func=func,separator=sep | |||
| 5719 | nkw = pars.num_kw_args | 5719 | nkw = pars.num_kw_args |
| 5720 | if nargs gt 0 then args = pars.args | 5720 | if nargs gt 0 then args = pars.args |
| 5721 | if nkw gt 0 then kwargs = pars.kw_args | 5721 | if nkw gt 0 then kwargs = pars.kw_args |
| 5722 | 5722 | ||
| 5723 | ;; Trim the class, and make the name | 5723 | ;; Trim the class, and make the name |
| 5724 | if meth then begin | 5724 | if meth then begin |
| 5725 | class = strmid(name,0,methsep) | 5725 | class = strmid(name,0,methsep) |
| 5726 | name = strmid(name,methsep+2,strlen(name)-1) | 5726 | name = strmid(name,methsep+2,strlen(name)-1) |
| 5727 | if nargs gt 0 then begin | 5727 | if nargs gt 0 then begin |
| 5728 | ;; remove the self argument | 5728 | ;; remove the self argument |
| 5729 | wh = where(args ne 'SELF',nargs) | 5729 | wh = where(args ne 'SELF',nargs) |
| 5730 | if nargs gt 0 then args = args[wh] | 5730 | if nargs gt 0 then args = args[wh] |
| @@ -5733,7 +5733,7 @@ pro idlwave_print_info_entry,name,func=func,separator=sep | |||
| 5733 | ;; No class, just a normal routine. | 5733 | ;; No class, just a normal routine. |
| 5734 | class = \"\" | 5734 | class = \"\" |
| 5735 | endelse | 5735 | endelse |
| 5736 | 5736 | ||
| 5737 | ;; Calling sequence | 5737 | ;; Calling sequence |
| 5738 | cs = \"\" | 5738 | cs = \"\" |
| 5739 | if func then cs = 'Result = ' | 5739 | if func then cs = 'Result = ' |
| @@ -5754,9 +5754,9 @@ pro idlwave_print_info_entry,name,func=func,separator=sep | |||
| 5754 | kwstring = kwstring + ' ' + kwargs[j] | 5754 | kwstring = kwstring + ' ' + kwargs[j] |
| 5755 | endfor | 5755 | endfor |
| 5756 | endif | 5756 | endif |
| 5757 | 5757 | ||
| 5758 | ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func] | 5758 | ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func] |
| 5759 | 5759 | ||
| 5760 | print,ret + ': ' + name + sep + class + sep + source[0].path $ | 5760 | print,ret + ': ' + name + sep + class + sep + source[0].path $ |
| 5761 | + sep + cs + sep + kwstring | 5761 | + sep + cs + sep + kwstring |
| 5762 | end | 5762 | end |
| @@ -5768,19 +5768,19 @@ pro idlwave_routine_info,file | |||
| 5768 | all = routine_info() | 5768 | all = routine_info() |
| 5769 | fileQ=n_elements(file) ne 0 | 5769 | fileQ=n_elements(file) ne 0 |
| 5770 | if fileQ then file=strtrim(file,2) | 5770 | if fileQ then file=strtrim(file,2) |
| 5771 | for i=0L,n_elements(all)-1L do begin | 5771 | for i=0L,n_elements(all)-1L do begin |
| 5772 | if fileQ then begin | 5772 | if fileQ then begin |
| 5773 | if (routine_info(all[i],/SOURCE)).path eq file then $ | 5773 | if (routine_info(all[i],/SOURCE)).path eq file then $ |
| 5774 | idlwave_print_info_entry,all[i],separator=sep | 5774 | idlwave_print_info_entry,all[i],separator=sep |
| 5775 | endif else idlwave_print_info_entry,all[i],separator=sep | 5775 | endif else idlwave_print_info_entry,all[i],separator=sep |
| 5776 | endfor | 5776 | endfor |
| 5777 | all = routine_info(/functions) | 5777 | all = routine_info(/functions) |
| 5778 | for i=0L,n_elements(all)-1L do begin | 5778 | for i=0L,n_elements(all)-1L do begin |
| 5779 | if fileQ then begin | 5779 | if fileQ then begin |
| 5780 | if (routine_info(all[i],/FUNCTIONS,/SOURCE)).path eq file then $ | 5780 | if (routine_info(all[i],/FUNCTIONS,/SOURCE)).path eq file then $ |
| 5781 | idlwave_print_info_entry,all[i],separator=sep,/FUNC | 5781 | idlwave_print_info_entry,all[i],separator=sep,/FUNC |
| 5782 | endif else idlwave_print_info_entry,all[i],separator=sep,/FUNC | 5782 | endif else idlwave_print_info_entry,all[i],separator=sep,/FUNC |
| 5783 | endfor | 5783 | endfor |
| 5784 | print,'>>>END OF IDLWAVE ROUTINE INFO' | 5784 | print,'>>>END OF IDLWAVE ROUTINE INFO' |
| 5785 | end | 5785 | end |
| 5786 | 5786 | ||
| @@ -5806,7 +5806,7 @@ pro idlwave_get_class_tags, class | |||
| 5806 | if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single) | 5806 | if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single) |
| 5807 | end | 5807 | end |
| 5808 | ;; END OF IDLWAVE SUPPORT ROUTINES | 5808 | ;; END OF IDLWAVE SUPPORT ROUTINES |
| 5809 | " | 5809 | " |
| 5810 | "The idl programs to get info from the shell.") | 5810 | "The idl programs to get info from the shell.") |
| 5811 | 5811 | ||
| 5812 | (defvar idlwave-idlwave_routine_info-compiled nil | 5812 | (defvar idlwave-idlwave_routine_info-compiled nil |
| @@ -5824,11 +5824,11 @@ end | |||
| 5824 | (erase-buffer) | 5824 | (erase-buffer) |
| 5825 | (insert idlwave-routine-info.pro) | 5825 | (insert idlwave-routine-info.pro) |
| 5826 | (save-buffer 0)) | 5826 | (save-buffer 0)) |
| 5827 | (idlwave-shell-send-command | 5827 | (idlwave-shell-send-command |
| 5828 | (concat ".run \"" idlwave-shell-temp-pro-file "\"") | 5828 | (concat ".run \"" idlwave-shell-temp-pro-file "\"") |
| 5829 | nil 'hide wait) | 5829 | nil 'hide wait) |
| 5830 | (idlwave-shell-send-command | 5830 | (idlwave-shell-send-command |
| 5831 | (format "save,'idlwave_print_safe','idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES" | 5831 | (format "save,'idlwave_print_safe','idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES" |
| 5832 | (idlwave-shell-temp-file 'rinfo)) | 5832 | (idlwave-shell-temp-file 'rinfo)) |
| 5833 | nil 'hide) | 5833 | nil 'hide) |
| 5834 | (setq idlwave-idlwave_routine_info-compiled t)) | 5834 | (setq idlwave-idlwave_routine_info-compiled t)) |
| @@ -5929,7 +5929,7 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 5929 | (completion-regexp-list | 5929 | (completion-regexp-list |
| 5930 | (if (equal arg '(16)) | 5930 | (if (equal arg '(16)) |
| 5931 | (list (read-string (concat "Completion Regexp: ")))))) | 5931 | (list (read-string (concat "Completion Regexp: ")))))) |
| 5932 | 5932 | ||
| 5933 | (if (and module (string-match "::" module)) | 5933 | (if (and module (string-match "::" module)) |
| 5934 | (setq class (substring module 0 (match-beginning 0)) | 5934 | (setq class (substring module 0 (match-beginning 0)) |
| 5935 | module (substring module (match-end 0)))) | 5935 | module (substring module (match-end 0)))) |
| @@ -5950,7 +5950,7 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 5950 | ;; Check for any special completion functions | 5950 | ;; Check for any special completion functions |
| 5951 | ((and idlwave-complete-special | 5951 | ((and idlwave-complete-special |
| 5952 | (idlwave-call-special idlwave-complete-special))) | 5952 | (idlwave-call-special idlwave-complete-special))) |
| 5953 | 5953 | ||
| 5954 | ((null what) | 5954 | ((null what) |
| 5955 | (error "Nothing to complete here")) | 5955 | (error "Nothing to complete here")) |
| 5956 | 5956 | ||
| @@ -5967,7 +5967,7 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 5967 | (idlwave-all-class-inherits class-selector))) | 5967 | (idlwave-all-class-inherits class-selector))) |
| 5968 | (isa (concat "procedure" (if class-selector "-method" ""))) | 5968 | (isa (concat "procedure" (if class-selector "-method" ""))) |
| 5969 | (type-selector 'pro)) | 5969 | (type-selector 'pro)) |
| 5970 | (setq idlwave-completion-help-info | 5970 | (setq idlwave-completion-help-info |
| 5971 | (list 'routine nil type-selector class-selector nil super-classes)) | 5971 | (list 'routine nil type-selector class-selector nil super-classes)) |
| 5972 | (idlwave-complete-in-buffer | 5972 | (idlwave-complete-in-buffer |
| 5973 | 'procedure (if class-selector 'method 'routine) | 5973 | 'procedure (if class-selector 'method 'routine) |
| @@ -5975,8 +5975,8 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 5975 | (format "Select a %s name%s" | 5975 | (format "Select a %s name%s" |
| 5976 | isa | 5976 | isa |
| 5977 | (if class-selector | 5977 | (if class-selector |
| 5978 | (format " (class is %s)" | 5978 | (format " (class is %s)" |
| 5979 | (if (eq class-selector t) | 5979 | (if (eq class-selector t) |
| 5980 | "unknown" class-selector)) | 5980 | "unknown" class-selector)) |
| 5981 | "")) | 5981 | "")) |
| 5982 | isa | 5982 | isa |
| @@ -5990,7 +5990,7 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 5990 | (idlwave-all-class-inherits class-selector))) | 5990 | (idlwave-all-class-inherits class-selector))) |
| 5991 | (isa (concat "function" (if class-selector "-method" ""))) | 5991 | (isa (concat "function" (if class-selector "-method" ""))) |
| 5992 | (type-selector 'fun)) | 5992 | (type-selector 'fun)) |
| 5993 | (setq idlwave-completion-help-info | 5993 | (setq idlwave-completion-help-info |
| 5994 | (list 'routine nil type-selector class-selector nil super-classes)) | 5994 | (list 'routine nil type-selector class-selector nil super-classes)) |
| 5995 | (idlwave-complete-in-buffer | 5995 | (idlwave-complete-in-buffer |
| 5996 | 'function (if class-selector 'method 'routine) | 5996 | 'function (if class-selector 'method 'routine) |
| @@ -5998,7 +5998,7 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 5998 | (format "Select a %s name%s" | 5998 | (format "Select a %s name%s" |
| 5999 | isa | 5999 | isa |
| 6000 | (if class-selector | 6000 | (if class-selector |
| 6001 | (format " (class is %s)" | 6001 | (format " (class is %s)" |
| 6002 | (if (eq class-selector t) | 6002 | (if (eq class-selector t) |
| 6003 | "unknown" class-selector)) | 6003 | "unknown" class-selector)) |
| 6004 | "")) | 6004 | "")) |
| @@ -6026,18 +6026,18 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 6026 | (unless (or entry (eq class t)) | 6026 | (unless (or entry (eq class t)) |
| 6027 | (error "Nothing known about procedure %s" | 6027 | (error "Nothing known about procedure %s" |
| 6028 | (idlwave-make-full-name class name))) | 6028 | (idlwave-make-full-name class name))) |
| 6029 | (setq list (idlwave-fix-keywords name 'pro class list | 6029 | (setq list (idlwave-fix-keywords name 'pro class list |
| 6030 | super-classes system)) | 6030 | super-classes system)) |
| 6031 | (unless list (error "No keywords available for procedure %s" | 6031 | (unless list (error "No keywords available for procedure %s" |
| 6032 | (idlwave-make-full-name class name))) | 6032 | (idlwave-make-full-name class name))) |
| 6033 | (setq idlwave-completion-help-info | 6033 | (setq idlwave-completion-help-info |
| 6034 | (list 'keyword name type-selector class-selector entry super-classes)) | 6034 | (list 'keyword name type-selector class-selector entry super-classes)) |
| 6035 | (idlwave-complete-in-buffer | 6035 | (idlwave-complete-in-buffer |
| 6036 | 'keyword 'keyword list nil | 6036 | 'keyword 'keyword list nil |
| 6037 | (format "Select keyword for procedure %s%s" | 6037 | (format "Select keyword for procedure %s%s" |
| 6038 | (idlwave-make-full-name class name) | 6038 | (idlwave-make-full-name class name) |
| 6039 | (if (or (member '("_EXTRA") list) | 6039 | (if (or (member '("_EXTRA") list) |
| 6040 | (member '("_REF_EXTRA") list)) | 6040 | (member '("_REF_EXTRA") list)) |
| 6041 | " (note _EXTRA)" "")) | 6041 | " (note _EXTRA)" "")) |
| 6042 | isa | 6042 | isa |
| 6043 | 'idlwave-attach-keyword-classes))) | 6043 | 'idlwave-attach-keyword-classes))) |
| @@ -6060,7 +6060,7 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 6060 | (unless (or entry (eq class t)) | 6060 | (unless (or entry (eq class t)) |
| 6061 | (error "Nothing known about function %s" | 6061 | (error "Nothing known about function %s" |
| 6062 | (idlwave-make-full-name class name))) | 6062 | (idlwave-make-full-name class name))) |
| 6063 | (setq list (idlwave-fix-keywords name 'fun class list | 6063 | (setq list (idlwave-fix-keywords name 'fun class list |
| 6064 | super-classes system)) | 6064 | super-classes system)) |
| 6065 | ;; OBJ_NEW: Messages mention the proper Init method | 6065 | ;; OBJ_NEW: Messages mention the proper Init method |
| 6066 | (setq msg-name (if (and (null class) | 6066 | (setq msg-name (if (and (null class) |
| @@ -6070,13 +6070,13 @@ When we force a method or a method keyword, CLASS can specify the class." | |||
| 6070 | (idlwave-make-full-name class name))) | 6070 | (idlwave-make-full-name class name))) |
| 6071 | (unless list (error "No keywords available for function %s" | 6071 | (unless list (error "No keywords available for function %s" |
| 6072 | msg-name)) | 6072 | msg-name)) |
| 6073 | (setq idlwave-completion-help-info | 6073 | (setq idlwave-completion-help-info |
| 6074 | (list 'keyword name type-selector class-selector nil super-classes)) | 6074 | (list 'keyword name type-selector class-selector nil super-classes)) |
| 6075 | (idlwave-complete-in-buffer | 6075 | (idlwave-complete-in-buffer |
| 6076 | 'keyword 'keyword list nil | 6076 | 'keyword 'keyword list nil |
| 6077 | (format "Select keyword for function %s%s" msg-name | 6077 | (format "Select keyword for function %s%s" msg-name |
| 6078 | (if (or (member '("_EXTRA") list) | 6078 | (if (or (member '("_EXTRA") list) |
| 6079 | (member '("_REF_EXTRA") list)) | 6079 | (member '("_REF_EXTRA") list)) |
| 6080 | " (note _EXTRA)" "")) | 6080 | " (note _EXTRA)" "")) |
| 6081 | isa | 6081 | isa |
| 6082 | 'idlwave-attach-keyword-classes))) | 6082 | 'idlwave-attach-keyword-classes))) |
| @@ -6114,10 +6114,10 @@ other completions will be tried.") | |||
| 6114 | ("class"))) | 6114 | ("class"))) |
| 6115 | (module (idlwave-sintern-routine-or-method module class)) | 6115 | (module (idlwave-sintern-routine-or-method module class)) |
| 6116 | (class (idlwave-sintern-class class)) | 6116 | (class (idlwave-sintern-class class)) |
| 6117 | (what (cond | 6117 | (what (cond |
| 6118 | ((equal what 0) | 6118 | ((equal what 0) |
| 6119 | (setq what | 6119 | (setq what |
| 6120 | (intern (completing-read | 6120 | (intern (completing-read |
| 6121 | "Complete what? " what-list nil t)))) | 6121 | "Complete what? " what-list nil t)))) |
| 6122 | ((integerp what) | 6122 | ((integerp what) |
| 6123 | (setq what (intern (car (nth (1- what) what-list))))) | 6123 | (setq what (intern (car (nth (1- what) what-list))))) |
| @@ -6139,7 +6139,7 @@ other completions will be tried.") | |||
| 6139 | (super-classes nil) | 6139 | (super-classes nil) |
| 6140 | (type-selector 'pro) | 6140 | (type-selector 'pro) |
| 6141 | (pro (or module | 6141 | (pro (or module |
| 6142 | (idlwave-completing-read | 6142 | (idlwave-completing-read |
| 6143 | "Procedure: " (idlwave-routines) 'idlwave-selector)))) | 6143 | "Procedure: " (idlwave-routines) 'idlwave-selector)))) |
| 6144 | (setq pro (idlwave-sintern-routine pro)) | 6144 | (setq pro (idlwave-sintern-routine pro)) |
| 6145 | (list nil-list nil-list 'procedure-keyword | 6145 | (list nil-list nil-list 'procedure-keyword |
| @@ -6153,7 +6153,7 @@ other completions will be tried.") | |||
| 6153 | (super-classes nil) | 6153 | (super-classes nil) |
| 6154 | (type-selector 'fun) | 6154 | (type-selector 'fun) |
| 6155 | (func (or module | 6155 | (func (or module |
| 6156 | (idlwave-completing-read | 6156 | (idlwave-completing-read |
| 6157 | "Function: " (idlwave-routines) 'idlwave-selector)))) | 6157 | "Function: " (idlwave-routines) 'idlwave-selector)))) |
| 6158 | (setq func (idlwave-sintern-routine func)) | 6158 | (setq func (idlwave-sintern-routine func)) |
| 6159 | (list nil-list nil-list 'function-keyword | 6159 | (list nil-list nil-list 'function-keyword |
| @@ -6193,7 +6193,7 @@ other completions will be tried.") | |||
| 6193 | 6193 | ||
| 6194 | ((eq what 'class) | 6194 | ((eq what 'class) |
| 6195 | (list nil-list nil-list 'class nil-list nil)) | 6195 | (list nil-list nil-list 'class nil-list nil)) |
| 6196 | 6196 | ||
| 6197 | (t (error "Invalid value for WHAT"))))) | 6197 | (t (error "Invalid value for WHAT"))))) |
| 6198 | 6198 | ||
| 6199 | (defun idlwave-completing-read (&rest args) | 6199 | (defun idlwave-completing-read (&rest args) |
| @@ -6216,7 +6216,7 @@ other completions will be tried.") | |||
| 6216 | (stringp idlwave-shell-default-directory) | 6216 | (stringp idlwave-shell-default-directory) |
| 6217 | (file-directory-p idlwave-shell-default-directory)) | 6217 | (file-directory-p idlwave-shell-default-directory)) |
| 6218 | idlwave-shell-default-directory | 6218 | idlwave-shell-default-directory |
| 6219 | default-directory))) | 6219 | default-directory))) |
| 6220 | (comint-dynamic-complete-filename))) | 6220 | (comint-dynamic-complete-filename))) |
| 6221 | 6221 | ||
| 6222 | (defun idlwave-make-full-name (class name) | 6222 | (defun idlwave-make-full-name (class name) |
| @@ -6225,7 +6225,7 @@ other completions will be tried.") | |||
| 6225 | 6225 | ||
| 6226 | (defun idlwave-rinfo-assoc (name type class list) | 6226 | (defun idlwave-rinfo-assoc (name type class list) |
| 6227 | "Like `idlwave-rinfo-assq', but sintern strings first." | 6227 | "Like `idlwave-rinfo-assq', but sintern strings first." |
| 6228 | (idlwave-rinfo-assq | 6228 | (idlwave-rinfo-assq |
| 6229 | (idlwave-sintern-routine-or-method name class) | 6229 | (idlwave-sintern-routine-or-method name class) |
| 6230 | type (idlwave-sintern-class class) list)) | 6230 | type (idlwave-sintern-class class) list)) |
| 6231 | 6231 | ||
| @@ -6249,7 +6249,7 @@ other completions will be tried.") | |||
| 6249 | (setq classes nil))) | 6249 | (setq classes nil))) |
| 6250 | rtn)) | 6250 | rtn)) |
| 6251 | 6251 | ||
| 6252 | (defun idlwave-best-rinfo-assq (name type class list &optional with-file | 6252 | (defun idlwave-best-rinfo-assq (name type class list &optional with-file |
| 6253 | keep-system) | 6253 | keep-system) |
| 6254 | "Like `idlwave-rinfo-assq', but get all twins and sort, then return first. | 6254 | "Like `idlwave-rinfo-assq', but get all twins and sort, then return first. |
| 6255 | If WITH-FILE is passed, find the best rinfo entry with a file | 6255 | If WITH-FILE is passed, find the best rinfo entry with a file |
| @@ -6274,7 +6274,7 @@ syslib files." | |||
| 6274 | twins))))) | 6274 | twins))))) |
| 6275 | (car twins))) | 6275 | (car twins))) |
| 6276 | 6276 | ||
| 6277 | (defun idlwave-best-rinfo-assoc (name type class list &optional with-file | 6277 | (defun idlwave-best-rinfo-assoc (name type class list &optional with-file |
| 6278 | keep-system) | 6278 | keep-system) |
| 6279 | "Like `idlwave-best-rinfo-assq', but sintern strings first." | 6279 | "Like `idlwave-best-rinfo-assq', but sintern strings first." |
| 6280 | (idlwave-best-rinfo-assq | 6280 | (idlwave-best-rinfo-assq |
| @@ -6365,7 +6365,7 @@ INFO is as returned by idlwave-what-function or -procedure." | |||
| 6365 | Must accept two arguments: `apos' and `info'") | 6365 | Must accept two arguments: `apos' and `info'") |
| 6366 | 6366 | ||
| 6367 | (defun idlwave-determine-class (info type) | 6367 | (defun idlwave-determine-class (info type) |
| 6368 | ;; Determine the class of a routine call. | 6368 | ;; Determine the class of a routine call. |
| 6369 | ;; INFO is the `cw-list' structure as returned by idlwave-where. | 6369 | ;; INFO is the `cw-list' structure as returned by idlwave-where. |
| 6370 | ;; The second element in this structure is the class. When nil, we | 6370 | ;; The second element in this structure is the class. When nil, we |
| 6371 | ;; return nil. When t, try to get the class from text properties at | 6371 | ;; return nil. When t, try to get the class from text properties at |
| @@ -6385,7 +6385,7 @@ Must accept two arguments: `apos' and `info'") | |||
| 6385 | (dassoc (cdr dassoc)) | 6385 | (dassoc (cdr dassoc)) |
| 6386 | (t t))) | 6386 | (t t))) |
| 6387 | (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->"))) | 6387 | (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->"))) |
| 6388 | (is-self | 6388 | (is-self |
| 6389 | (and arrow | 6389 | (and arrow |
| 6390 | (save-excursion (goto-char apos) | 6390 | (save-excursion (goto-char apos) |
| 6391 | (forward-word -1) | 6391 | (forward-word -1) |
| @@ -6406,19 +6406,19 @@ Must accept two arguments: `apos' and `info'") | |||
| 6406 | (setq class (or (nth 2 (idlwave-current-routine)) class))) | 6406 | (setq class (or (nth 2 (idlwave-current-routine)) class))) |
| 6407 | 6407 | ||
| 6408 | ;; Before prompting, try any special class determination routines | 6408 | ;; Before prompting, try any special class determination routines |
| 6409 | (when (and (eq t class) | 6409 | (when (and (eq t class) |
| 6410 | idlwave-determine-class-special | 6410 | idlwave-determine-class-special |
| 6411 | (not force-query)) | 6411 | (not force-query)) |
| 6412 | (setq special-class | 6412 | (setq special-class |
| 6413 | (idlwave-call-special idlwave-determine-class-special apos)) | 6413 | (idlwave-call-special idlwave-determine-class-special apos)) |
| 6414 | (if special-class | 6414 | (if special-class |
| 6415 | (setq class (idlwave-sintern-class special-class) | 6415 | (setq class (idlwave-sintern-class special-class) |
| 6416 | store idlwave-store-inquired-class))) | 6416 | store idlwave-store-inquired-class))) |
| 6417 | 6417 | ||
| 6418 | ;; Prompt for a class, if we need to | 6418 | ;; Prompt for a class, if we need to |
| 6419 | (when (and (eq class t) | 6419 | (when (and (eq class t) |
| 6420 | (or force-query query)) | 6420 | (or force-query query)) |
| 6421 | (setq class-alist | 6421 | (setq class-alist |
| 6422 | (mapcar 'list (idlwave-all-method-classes (car info) type))) | 6422 | (mapcar 'list (idlwave-all-method-classes (car info) type))) |
| 6423 | (setq class | 6423 | (setq class |
| 6424 | (idlwave-sintern-class | 6424 | (idlwave-sintern-class |
| @@ -6427,9 +6427,9 @@ Must accept two arguments: `apos' and `info'") | |||
| 6427 | (error "No classes available with method %s" (car info))) | 6427 | (error "No classes available with method %s" (car info))) |
| 6428 | ((and (= (length class-alist) 1) (not force-query)) | 6428 | ((and (= (length class-alist) 1) (not force-query)) |
| 6429 | (car (car class-alist))) | 6429 | (car (car class-alist))) |
| 6430 | (t | 6430 | (t |
| 6431 | (setq store idlwave-store-inquired-class) | 6431 | (setq store idlwave-store-inquired-class) |
| 6432 | (idlwave-completing-read | 6432 | (idlwave-completing-read |
| 6433 | (format "Class%s: " (if (stringp (car info)) | 6433 | (format "Class%s: " (if (stringp (car info)) |
| 6434 | (format " for %s method %s" | 6434 | (format " for %s method %s" |
| 6435 | type (car info)) | 6435 | type (car info)) |
| @@ -6441,9 +6441,9 @@ Must accept two arguments: `apos' and `info'") | |||
| 6441 | ;; We have a real class here | 6441 | ;; We have a real class here |
| 6442 | (when (and store arrow) | 6442 | (when (and store arrow) |
| 6443 | (condition-case () | 6443 | (condition-case () |
| 6444 | (add-text-properties | 6444 | (add-text-properties |
| 6445 | apos (+ apos 2) | 6445 | apos (+ apos 2) |
| 6446 | `(idlwave-class ,class face ,idlwave-class-arrow-face | 6446 | `(idlwave-class ,class face ,idlwave-class-arrow-face |
| 6447 | rear-nonsticky t)) | 6447 | rear-nonsticky t)) |
| 6448 | (error nil))) | 6448 | (error nil))) |
| 6449 | (setf (nth 2 info) class)) | 6449 | (setf (nth 2 info) class)) |
| @@ -6471,14 +6471,14 @@ Must accept two arguments: `apos' and `info'") | |||
| 6471 | 6471 | ||
| 6472 | 6472 | ||
| 6473 | (defun idlwave-where () | 6473 | (defun idlwave-where () |
| 6474 | "Find out where we are. | 6474 | "Find out where we are. |
| 6475 | The return value is a list with the following stuff: | 6475 | The return value is a list with the following stuff: |
| 6476 | \(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR) | 6476 | \(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR) |
| 6477 | 6477 | ||
| 6478 | PRO-LIST (PRO POINT CLASS ARROW) | 6478 | PRO-LIST (PRO POINT CLASS ARROW) |
| 6479 | FUNC-LIST (FUNC POINT CLASS ARROW) | 6479 | FUNC-LIST (FUNC POINT CLASS ARROW) |
| 6480 | COMPLETE-WHAT a symbol indicating what kind of completion makes sense here | 6480 | COMPLETE-WHAT a symbol indicating what kind of completion makes sense here |
| 6481 | CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can | 6481 | CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can |
| 6482 | be completed here. | 6482 | be completed here. |
| 6483 | LAST-CHAR last relevant character before point (non-white non-comment, | 6483 | LAST-CHAR last relevant character before point (non-white non-comment, |
| 6484 | not part of current identifier or leading slash). | 6484 | not part of current identifier or leading slash). |
| @@ -6490,7 +6490,7 @@ POINT: Where is this | |||
| 6490 | CLASS: What class has the routine (nil=no, t=is method, but class unknown) | 6490 | CLASS: What class has the routine (nil=no, t=is method, but class unknown) |
| 6491 | ARROW: Location of the arrow" | 6491 | ARROW: Location of the arrow" |
| 6492 | (idlwave-routines) | 6492 | (idlwave-routines) |
| 6493 | (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) | 6493 | (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) |
| 6494 | (bos (save-excursion (idlwave-start-of-substatement 'pre) (point))) | 6494 | (bos (save-excursion (idlwave-start-of-substatement 'pre) (point))) |
| 6495 | (func-entry (idlwave-what-function bos)) | 6495 | (func-entry (idlwave-what-function bos)) |
| 6496 | (func (car func-entry)) | 6496 | (func (car func-entry)) |
| @@ -6512,8 +6512,8 @@ ARROW: Location of the arrow" | |||
| 6512 | ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'" | 6512 | ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'" |
| 6513 | match-string) | 6513 | match-string) |
| 6514 | (setq cw 'class)) | 6514 | (setq cw 'class)) |
| 6515 | ((string-match | 6515 | ((string-match |
| 6516 | "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" | 6516 | "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" |
| 6517 | (if (> pro-point 0) | 6517 | (if (> pro-point 0) |
| 6518 | (buffer-substring pro-point (point)) | 6518 | (buffer-substring pro-point (point)) |
| 6519 | match-string)) | 6519 | match-string)) |
| @@ -6524,11 +6524,11 @@ ARROW: Location of the arrow" | |||
| 6524 | nil) | 6524 | nil) |
| 6525 | ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'" | 6525 | ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'" |
| 6526 | match-string) | 6526 | match-string) |
| 6527 | (setq cw 'class)) | 6527 | (setq cw 'class)) |
| 6528 | ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'" | 6528 | ((string-match "\\<inherits\\s-+\\([a-zA-Z0-9$_]*\\)?\\'" |
| 6529 | match-string) | 6529 | match-string) |
| 6530 | (setq cw 'class)) | 6530 | (setq cw 'class)) |
| 6531 | ((and func | 6531 | ((and func |
| 6532 | (> func-point pro-point) | 6532 | (> func-point pro-point) |
| 6533 | (= func-level 1) | 6533 | (= func-level 1) |
| 6534 | (memq last-char '(?\( ?,))) | 6534 | (memq last-char '(?\( ?,))) |
| @@ -6574,7 +6574,7 @@ ARROW: Location of the arrow" | |||
| 6574 | ;; searches to this point. | 6574 | ;; searches to this point. |
| 6575 | 6575 | ||
| 6576 | (catch 'exit | 6576 | (catch 'exit |
| 6577 | (let (pos | 6577 | (let (pos |
| 6578 | func-point | 6578 | func-point |
| 6579 | (cnt 0) | 6579 | (cnt 0) |
| 6580 | func arrow-start class) | 6580 | func arrow-start class) |
| @@ -6589,18 +6589,18 @@ ARROW: Location of the arrow" | |||
| 6589 | (setq pos (point)) | 6589 | (setq pos (point)) |
| 6590 | (incf cnt) | 6590 | (incf cnt) |
| 6591 | (when (and (= (following-char) ?\() | 6591 | (when (and (= (following-char) ?\() |
| 6592 | (re-search-backward | 6592 | (re-search-backward |
| 6593 | "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\=" | 6593 | "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\=" |
| 6594 | bound t)) | 6594 | bound t)) |
| 6595 | (setq func (match-string 2) | 6595 | (setq func (match-string 2) |
| 6596 | func-point (goto-char (match-beginning 2)) | 6596 | func-point (goto-char (match-beginning 2)) |
| 6597 | pos func-point) | 6597 | pos func-point) |
| 6598 | (if (re-search-backward | 6598 | (if (re-search-backward |
| 6599 | "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t) | 6599 | "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t) |
| 6600 | (setq arrow-start (copy-marker (match-beginning 0)) | 6600 | (setq arrow-start (copy-marker (match-beginning 0)) |
| 6601 | class (or (match-string 2) t))) | 6601 | class (or (match-string 2) t))) |
| 6602 | (throw | 6602 | (throw |
| 6603 | 'exit | 6603 | 'exit |
| 6604 | (list | 6604 | (list |
| 6605 | (idlwave-sintern-routine-or-method func class) | 6605 | (idlwave-sintern-routine-or-method func class) |
| 6606 | (idlwave-sintern-class class) | 6606 | (idlwave-sintern-class class) |
| @@ -6616,18 +6616,18 @@ ARROW: Location of the arrow" | |||
| 6616 | ;; searches to this point. | 6616 | ;; searches to this point. |
| 6617 | (let ((pos (point)) pro-point | 6617 | (let ((pos (point)) pro-point |
| 6618 | pro class arrow-start string) | 6618 | pro class arrow-start string) |
| 6619 | (save-excursion | 6619 | (save-excursion |
| 6620 | ;;(idlwave-beginning-of-statement) | 6620 | ;;(idlwave-beginning-of-statement) |
| 6621 | (idlwave-start-of-substatement 'pre) | 6621 | (idlwave-start-of-substatement 'pre) |
| 6622 | (setq string (buffer-substring (point) pos)) | 6622 | (setq string (buffer-substring (point) pos)) |
| 6623 | (if (string-match | 6623 | (if (string-match |
| 6624 | "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string) | 6624 | "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string) |
| 6625 | (setq pro (match-string 1 string) | 6625 | (setq pro (match-string 1 string) |
| 6626 | pro-point (+ (point) (match-beginning 1))) | 6626 | pro-point (+ (point) (match-beginning 1))) |
| 6627 | (if (and (idlwave-skip-object) | 6627 | (if (and (idlwave-skip-object) |
| 6628 | (setq string (buffer-substring (point) pos)) | 6628 | (setq string (buffer-substring (point) pos)) |
| 6629 | (string-match | 6629 | (string-match |
| 6630 | "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)" | 6630 | "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)" |
| 6631 | string)) | 6631 | string)) |
| 6632 | (setq pro (if (match-beginning 4) | 6632 | (setq pro (if (match-beginning 4) |
| 6633 | (match-string 4 string)) | 6633 | (match-string 4 string)) |
| @@ -6671,7 +6671,7 @@ ARROW: Location of the arrow" | |||
| 6671 | (throw 'exit nil)))) | 6671 | (throw 'exit nil)))) |
| 6672 | (goto-char pos) | 6672 | (goto-char pos) |
| 6673 | nil))) | 6673 | nil))) |
| 6674 | 6674 | ||
| 6675 | (defun idlwave-last-valid-char () | 6675 | (defun idlwave-last-valid-char () |
| 6676 | "Return the last character before point which is not white or a comment | 6676 | "Return the last character before point which is not white or a comment |
| 6677 | and also not part of the current identifier. Since we do this in | 6677 | and also not part of the current identifier. Since we do this in |
| @@ -6761,23 +6761,23 @@ accumulate information on matching completions." | |||
| 6761 | ((or (eq completion t) | 6761 | ((or (eq completion t) |
| 6762 | (and (= 1 (length (setq all-completions | 6762 | (and (= 1 (length (setq all-completions |
| 6763 | (idlwave-uniquify | 6763 | (idlwave-uniquify |
| 6764 | (all-completions part list | 6764 | (all-completions part list |
| 6765 | (or special-selector | 6765 | (or special-selector |
| 6766 | selector)))))) | 6766 | selector)))))) |
| 6767 | (equal dpart dcompletion))) | 6767 | (equal dpart dcompletion))) |
| 6768 | ;; This is already complete | 6768 | ;; This is already complete |
| 6769 | (idlwave-after-successful-completion type slash beg) | 6769 | (idlwave-after-successful-completion type slash beg) |
| 6770 | (message "%s is already the complete %s" part isa) | 6770 | (message "%s is already the complete %s" part isa) |
| 6771 | nil) | 6771 | nil) |
| 6772 | (t | 6772 | (t |
| 6773 | ;; We cannot add something - offer a list. | 6773 | ;; We cannot add something - offer a list. |
| 6774 | (message "Making completion list...") | 6774 | (message "Making completion list...") |
| 6775 | 6775 | ||
| 6776 | (unless idlwave-completion-help-links ; already set somewhere? | 6776 | (unless idlwave-completion-help-links ; already set somewhere? |
| 6777 | (mapcar (lambda (x) ; Pass link prop through to highlight-linked | 6777 | (mapcar (lambda (x) ; Pass link prop through to highlight-linked |
| 6778 | (let ((link (get-text-property 0 'link (car x)))) | 6778 | (let ((link (get-text-property 0 'link (car x)))) |
| 6779 | (if link | 6779 | (if link |
| 6780 | (push (cons (car x) link) | 6780 | (push (cons (car x) link) |
| 6781 | idlwave-completion-help-links)))) | 6781 | idlwave-completion-help-links)))) |
| 6782 | list)) | 6782 | list)) |
| 6783 | (let* ((list all-completions) | 6783 | (let* ((list all-completions) |
| @@ -6787,7 +6787,7 @@ accumulate information on matching completions." | |||
| 6787 | ; (completion-fixup-function ; Emacs | 6787 | ; (completion-fixup-function ; Emacs |
| 6788 | ; (lambda () (and (eq (preceding-char) ?>) | 6788 | ; (lambda () (and (eq (preceding-char) ?>) |
| 6789 | ; (re-search-backward " <" beg t))))) | 6789 | ; (re-search-backward " <" beg t))))) |
| 6790 | 6790 | ||
| 6791 | (setq list (sort list (lambda (a b) | 6791 | (setq list (sort list (lambda (a b) |
| 6792 | (string< (downcase a) (downcase b))))) | 6792 | (string< (downcase a) (downcase b))))) |
| 6793 | (if prepare-display-function | 6793 | (if prepare-display-function |
| @@ -6797,7 +6797,7 @@ accumulate information on matching completions." | |||
| 6797 | idlwave-complete-empty-string-as-lower-case) | 6797 | idlwave-complete-empty-string-as-lower-case) |
| 6798 | (not idlwave-completion-force-default-case)) | 6798 | (not idlwave-completion-force-default-case)) |
| 6799 | (setq list (mapcar (lambda (x) | 6799 | (setq list (mapcar (lambda (x) |
| 6800 | (if (listp x) | 6800 | (if (listp x) |
| 6801 | (setcar x (downcase (car x))) | 6801 | (setcar x (downcase (car x))) |
| 6802 | (setq x (downcase x))) | 6802 | (setq x (downcase x))) |
| 6803 | x) | 6803 | x) |
| @@ -6817,19 +6817,19 @@ accumulate information on matching completions." | |||
| 6817 | (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\=" | 6817 | (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\=" |
| 6818 | (- (point) 15) t) | 6818 | (- (point) 15) t) |
| 6819 | (goto-char (point-min)) | 6819 | (goto-char (point-min)) |
| 6820 | (re-search-forward | 6820 | (re-search-forward |
| 6821 | "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t)))) | 6821 | "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t)))) |
| 6822 | ;; Yank the full class specification | 6822 | ;; Yank the full class specification |
| 6823 | (insert (match-string 2)) | 6823 | (insert (match-string 2)) |
| 6824 | ;; Do the completion, using list gathered from `idlwave-routines' | 6824 | ;; Do the completion, using list gathered from `idlwave-routines' |
| 6825 | (idlwave-complete-in-buffer | 6825 | (idlwave-complete-in-buffer |
| 6826 | 'class 'class (idlwave-class-alist) nil | 6826 | 'class 'class (idlwave-class-alist) nil |
| 6827 | "Select a class" "class" | 6827 | "Select a class" "class" |
| 6828 | '(lambda (list) ;; Push it to help-links if system help available | 6828 | '(lambda (list) ;; Push it to help-links if system help available |
| 6829 | (mapcar (lambda (x) | 6829 | (mapcar (lambda (x) |
| 6830 | (let* ((entry (idlwave-class-info x)) | 6830 | (let* ((entry (idlwave-class-info x)) |
| 6831 | (link (nth 1 (assq 'link entry)))) | 6831 | (link (nth 1 (assq 'link entry)))) |
| 6832 | (if link (push (cons x link) | 6832 | (if link (push (cons x link) |
| 6833 | idlwave-completion-help-links)) | 6833 | idlwave-completion-help-links)) |
| 6834 | x)) | 6834 | x)) |
| 6835 | list))))) | 6835 | list))))) |
| @@ -6841,7 +6841,7 @@ accumulate information on matching completions." | |||
| 6841 | ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'. | 6841 | ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'. |
| 6842 | (if (or (null show-classes) ; don't want to see classes | 6842 | (if (or (null show-classes) ; don't want to see classes |
| 6843 | (null class-selector) ; not a method call | 6843 | (null class-selector) ; not a method call |
| 6844 | (and | 6844 | (and |
| 6845 | (stringp class-selector) ; the class is already known | 6845 | (stringp class-selector) ; the class is already known |
| 6846 | (not super-classes))) ; no possibilities for inheritance | 6846 | (not super-classes))) ; no possibilities for inheritance |
| 6847 | ;; In these cases, we do not have to do anything | 6847 | ;; In these cases, we do not have to do anything |
| @@ -6856,13 +6856,13 @@ accumulate information on matching completions." | |||
| 6856 | (max (abs show-classes)) | 6856 | (max (abs show-classes)) |
| 6857 | (lmax (if do-dots (apply 'max (mapcar 'length list)))) | 6857 | (lmax (if do-dots (apply 'max (mapcar 'length list)))) |
| 6858 | classes nclasses class-info space) | 6858 | classes nclasses class-info space) |
| 6859 | (mapcar | 6859 | (mapcar |
| 6860 | (lambda (x) | 6860 | (lambda (x) |
| 6861 | ;; get the classes | 6861 | ;; get the classes |
| 6862 | (if (eq type 'class-tag) | 6862 | (if (eq type 'class-tag) |
| 6863 | ;; Just one class for tags | 6863 | ;; Just one class for tags |
| 6864 | (setq classes | 6864 | (setq classes |
| 6865 | (list | 6865 | (list |
| 6866 | (idlwave-class-or-superclass-with-tag class-selector x))) | 6866 | (idlwave-class-or-superclass-with-tag class-selector x))) |
| 6867 | ;; Multiple classes for method or method-keyword | 6867 | ;; Multiple classes for method or method-keyword |
| 6868 | (setq classes | 6868 | (setq classes |
| @@ -6871,7 +6871,7 @@ accumulate information on matching completions." | |||
| 6871 | method-selector x type-selector) | 6871 | method-selector x type-selector) |
| 6872 | (idlwave-all-method-classes x type-selector))) | 6872 | (idlwave-all-method-classes x type-selector))) |
| 6873 | (if inherit | 6873 | (if inherit |
| 6874 | (setq classes | 6874 | (setq classes |
| 6875 | (delq nil | 6875 | (delq nil |
| 6876 | (mapcar (lambda (x) (if (memq x inherit) x nil)) | 6876 | (mapcar (lambda (x) (if (memq x inherit) x nil)) |
| 6877 | classes))))) | 6877 | classes))))) |
| @@ -6908,7 +6908,7 @@ accumulate information on matching completions." | |||
| 6908 | (defun idlwave-attach-class-tag-classes (list) | 6908 | (defun idlwave-attach-class-tag-classes (list) |
| 6909 | ;; Call idlwave-attach-classes with class structure tags | 6909 | ;; Call idlwave-attach-classes with class structure tags |
| 6910 | (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes)) | 6910 | (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes)) |
| 6911 | 6911 | ||
| 6912 | 6912 | ||
| 6913 | ;;---------------------------------------------------------------------- | 6913 | ;;---------------------------------------------------------------------- |
| 6914 | ;;---------------------------------------------------------------------- | 6914 | ;;---------------------------------------------------------------------- |
| @@ -6929,7 +6929,7 @@ sort the list before displaying" | |||
| 6929 | ((= 1 (length list)) | 6929 | ((= 1 (length list)) |
| 6930 | (setq rtn (car list))) | 6930 | (setq rtn (car list))) |
| 6931 | ((featurep 'xemacs) | 6931 | ((featurep 'xemacs) |
| 6932 | (if sort (setq list (sort list (lambda (a b) | 6932 | (if sort (setq list (sort list (lambda (a b) |
| 6933 | (string< (upcase a) (upcase b)))))) | 6933 | (string< (upcase a) (upcase b)))))) |
| 6934 | (setq menu | 6934 | (setq menu |
| 6935 | (append (list title) | 6935 | (append (list title) |
| @@ -6940,7 +6940,7 @@ sort the list before displaying" | |||
| 6940 | (setq resp (get-popup-menu-response menu)) | 6940 | (setq resp (get-popup-menu-response menu)) |
| 6941 | (funcall (event-function resp) (event-object resp))) | 6941 | (funcall (event-function resp) (event-object resp))) |
| 6942 | (t | 6942 | (t |
| 6943 | (if sort (setq list (sort list (lambda (a b) | 6943 | (if sort (setq list (sort list (lambda (a b) |
| 6944 | (string< (upcase a) (upcase b)))))) | 6944 | (string< (upcase a) (upcase b)))))) |
| 6945 | (setq menu (cons title | 6945 | (setq menu (cons title |
| 6946 | (list | 6946 | (list |
| @@ -7031,7 +7031,7 @@ sort the list before displaying" | |||
| 7031 | (setq idlwave-before-completion-wconf (current-window-configuration))) | 7031 | (setq idlwave-before-completion-wconf (current-window-configuration))) |
| 7032 | 7032 | ||
| 7033 | (if (featurep 'xemacs) | 7033 | (if (featurep 'xemacs) |
| 7034 | (idlwave-display-completion-list-xemacs | 7034 | (idlwave-display-completion-list-xemacs |
| 7035 | list) | 7035 | list) |
| 7036 | (idlwave-display-completion-list-emacs list)) | 7036 | (idlwave-display-completion-list-emacs list)) |
| 7037 | 7037 | ||
| @@ -7112,7 +7112,7 @@ If these don't exist, a letter in the string is automatically selected." | |||
| 7112 | (mapcar (lambda(x) | 7112 | (mapcar (lambda(x) |
| 7113 | (princ (nth 1 x)) | 7113 | (princ (nth 1 x)) |
| 7114 | (princ "\n")) | 7114 | (princ "\n")) |
| 7115 | keys-alist)) | 7115 | keys-alist)) |
| 7116 | (setq char (read-char))) | 7116 | (setq char (read-char))) |
| 7117 | (setq char (read-char))) | 7117 | (setq char (read-char))) |
| 7118 | (message nil) | 7118 | (message nil) |
| @@ -7232,7 +7232,7 @@ If these don't exist, a letter in the string is automatically selected." | |||
| 7232 | (defun idlwave-make-modified-completion-map-emacs (old-map) | 7232 | (defun idlwave-make-modified-completion-map-emacs (old-map) |
| 7233 | "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." | 7233 | "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." |
| 7234 | (let ((new-map (copy-keymap old-map))) | 7234 | (let ((new-map (copy-keymap old-map))) |
| 7235 | (substitute-key-definition | 7235 | (substitute-key-definition |
| 7236 | 'choose-completion 'idlwave-choose-completion new-map) | 7236 | 'choose-completion 'idlwave-choose-completion new-map) |
| 7237 | (substitute-key-definition | 7237 | (substitute-key-definition |
| 7238 | 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map) | 7238 | 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map) |
| @@ -7258,8 +7258,8 @@ If these don't exist, a letter in the string is automatically selected." | |||
| 7258 | ;; | 7258 | ;; |
| 7259 | ;; - Go again over the documentation how to write a completion | 7259 | ;; - Go again over the documentation how to write a completion |
| 7260 | ;; plugin. It is in self.el, but currently still very bad. | 7260 | ;; plugin. It is in self.el, but currently still very bad. |
| 7261 | ;; This could be in a separate file in the distribution, or | 7261 | ;; This could be in a separate file in the distribution, or |
| 7262 | ;; in an appendix for the manual. | 7262 | ;; in an appendix for the manual. |
| 7263 | 7263 | ||
| 7264 | (defvar idlwave-struct-skip | 7264 | (defvar idlwave-struct-skip |
| 7265 | "[ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*\\)?[ \t]*" | 7265 | "[ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*\\)?[ \t]*" |
| @@ -7298,7 +7298,7 @@ Point is expected just before the opening `{' of the struct definition." | |||
| 7298 | (beg (car borders)) | 7298 | (beg (car borders)) |
| 7299 | (end (cdr borders)) | 7299 | (end (cdr borders)) |
| 7300 | (case-fold-search t)) | 7300 | (case-fold-search t)) |
| 7301 | (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") | 7301 | (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") |
| 7302 | end t))) | 7302 | end t))) |
| 7303 | 7303 | ||
| 7304 | (defun idlwave-struct-inherits () | 7304 | (defun idlwave-struct-inherits () |
| @@ -7313,7 +7313,7 @@ Point is expected just before the opening `{' of the struct definition." | |||
| 7313 | (goto-char beg) | 7313 | (goto-char beg) |
| 7314 | (save-restriction | 7314 | (save-restriction |
| 7315 | (narrow-to-region beg end) | 7315 | (narrow-to-region beg end) |
| 7316 | (while (re-search-forward | 7316 | (while (re-search-forward |
| 7317 | (concat "[{,]" ;leading comma/brace | 7317 | (concat "[{,]" ;leading comma/brace |
| 7318 | idlwave-struct-skip ; 4 groups | 7318 | idlwave-struct-skip ; 4 groups |
| 7319 | "inherits" ; The INHERITS tag | 7319 | "inherits" ; The INHERITS tag |
| @@ -7363,9 +7363,9 @@ backward." | |||
| 7363 | (concat "\\<" (regexp-quote (downcase var)) "\\>" ws) | 7363 | (concat "\\<" (regexp-quote (downcase var)) "\\>" ws) |
| 7364 | "\\(\\)") | 7364 | "\\(\\)") |
| 7365 | "=" ws "\\({\\)" | 7365 | "=" ws "\\({\\)" |
| 7366 | (if name | 7366 | (if name |
| 7367 | (if (stringp name) | 7367 | (if (stringp name) |
| 7368 | (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]") | 7368 | (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]") |
| 7369 | ;; Just a generic name | 7369 | ;; Just a generic name |
| 7370 | (concat ws "\\<\\([a-zA-Z_0-9$]+\\)" ws ",")) | 7370 | (concat ws "\\<\\([a-zA-Z_0-9$]+\\)" ws ",")) |
| 7371 | "")))) | 7371 | "")))) |
| @@ -7376,7 +7376,7 @@ backward." | |||
| 7376 | (goto-char (match-beginning 3)) | 7376 | (goto-char (match-beginning 3)) |
| 7377 | (match-string-no-properties 5))))) | 7377 | (match-string-no-properties 5))))) |
| 7378 | 7378 | ||
| 7379 | (defvar idlwave-class-info nil) | 7379 | (defvar idlwave-class-info nil) |
| 7380 | (defvar idlwave-class-reset nil) ; to reset buffer-local classes | 7380 | (defvar idlwave-class-reset nil) ; to reset buffer-local classes |
| 7381 | 7381 | ||
| 7382 | (add-hook 'idlwave-update-rinfo-hook | 7382 | (add-hook 'idlwave-update-rinfo-hook |
| @@ -7388,13 +7388,13 @@ backward." | |||
| 7388 | (let (list entry) | 7388 | (let (list entry) |
| 7389 | (if idlwave-class-info | 7389 | (if idlwave-class-info |
| 7390 | (if idlwave-class-reset | 7390 | (if idlwave-class-reset |
| 7391 | (setq | 7391 | (setq |
| 7392 | idlwave-class-reset nil | 7392 | idlwave-class-reset nil |
| 7393 | idlwave-class-info ; Remove any visited in a buffer | 7393 | idlwave-class-info ; Remove any visited in a buffer |
| 7394 | (delq nil (mapcar | 7394 | (delq nil (mapcar |
| 7395 | (lambda (x) | 7395 | (lambda (x) |
| 7396 | (let ((filebuf | 7396 | (let ((filebuf |
| 7397 | (idlwave-class-file-or-buffer | 7397 | (idlwave-class-file-or-buffer |
| 7398 | (or (cdr (assq 'found-in x)) (car x))))) | 7398 | (or (cdr (assq 'found-in x)) (car x))))) |
| 7399 | (if (cdr filebuf) | 7399 | (if (cdr filebuf) |
| 7400 | nil | 7400 | nil |
| @@ -7432,7 +7432,7 @@ class/struct definition" | |||
| 7432 | (progn | 7432 | (progn |
| 7433 | ;; For everything there | 7433 | ;; For everything there |
| 7434 | (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point))) | 7434 | (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point))) |
| 7435 | (while (setq name | 7435 | (while (setq name |
| 7436 | (idlwave-find-structure-definition nil t end-lim)) | 7436 | (idlwave-find-structure-definition nil t end-lim)) |
| 7437 | (funcall all-hook name))) | 7437 | (funcall all-hook name))) |
| 7438 | (idlwave-find-structure-definition nil (or alt-class class)))))) | 7438 | (idlwave-find-structure-definition nil (or alt-class class)))))) |
| @@ -7470,11 +7470,11 @@ class/struct definition" | |||
| 7470 | (insert-file-contents file)) | 7470 | (insert-file-contents file)) |
| 7471 | (save-excursion | 7471 | (save-excursion |
| 7472 | (goto-char 1) | 7472 | (goto-char 1) |
| 7473 | (idlwave-find-class-definition class | 7473 | (idlwave-find-class-definition class |
| 7474 | ;; Scan all of the structures found there | 7474 | ;; Scan all of the structures found there |
| 7475 | (lambda (name) | 7475 | (lambda (name) |
| 7476 | (let* ((this-class (idlwave-sintern-class name)) | 7476 | (let* ((this-class (idlwave-sintern-class name)) |
| 7477 | (entry | 7477 | (entry |
| 7478 | (list this-class | 7478 | (list this-class |
| 7479 | (cons 'tags (idlwave-struct-tags)) | 7479 | (cons 'tags (idlwave-struct-tags)) |
| 7480 | (cons 'inherits (idlwave-struct-inherits))))) | 7480 | (cons 'inherits (idlwave-struct-inherits))))) |
| @@ -7499,7 +7499,7 @@ class/struct definition" | |||
| 7499 | (condition-case err | 7499 | (condition-case err |
| 7500 | (apply 'append (mapcar 'idlwave-class-tags | 7500 | (apply 'append (mapcar 'idlwave-class-tags |
| 7501 | (cons class (idlwave-all-class-inherits class)))) | 7501 | (cons class (idlwave-all-class-inherits class)))) |
| 7502 | (error | 7502 | (error |
| 7503 | (idlwave-class-tag-reset) | 7503 | (idlwave-class-tag-reset) |
| 7504 | (error "%s" (error-message-string err))))) | 7504 | (error "%s" (error-message-string err))))) |
| 7505 | 7505 | ||
| @@ -7536,24 +7536,24 @@ The list is cached in `idlwave-class-info' for faster access." | |||
| 7536 | all-inherits)))))) | 7536 | all-inherits)))))) |
| 7537 | 7537 | ||
| 7538 | (defun idlwave-entry-keywords (entry &optional record-link) | 7538 | (defun idlwave-entry-keywords (entry &optional record-link) |
| 7539 | "Return the flat entry keywords alist from routine-info entry. | 7539 | "Return the flat entry keywords alist from routine-info entry. |
| 7540 | If RECORD-LINK is non-nil, the keyword text is copied and a text | 7540 | If RECORD-LINK is non-nil, the keyword text is copied and a text |
| 7541 | property indicating the link is added." | 7541 | property indicating the link is added." |
| 7542 | (let (kwds) | 7542 | (let (kwds) |
| 7543 | (mapcar | 7543 | (mapcar |
| 7544 | (lambda (key-list) | 7544 | (lambda (key-list) |
| 7545 | (let ((file (car key-list))) | 7545 | (let ((file (car key-list))) |
| 7546 | (mapcar (lambda (key-cons) | 7546 | (mapcar (lambda (key-cons) |
| 7547 | (let ((key (car key-cons)) | 7547 | (let ((key (car key-cons)) |
| 7548 | (link (cdr key-cons))) | 7548 | (link (cdr key-cons))) |
| 7549 | (when (and record-link file) | 7549 | (when (and record-link file) |
| 7550 | (setq key (copy-sequence key)) | 7550 | (setq key (copy-sequence key)) |
| 7551 | (put-text-property | 7551 | (put-text-property |
| 7552 | 0 (length key) | 7552 | 0 (length key) |
| 7553 | 'link | 7553 | 'link |
| 7554 | (concat | 7554 | (concat |
| 7555 | file | 7555 | file |
| 7556 | (if link | 7556 | (if link |
| 7557 | (concat idlwave-html-link-sep | 7557 | (concat idlwave-html-link-sep |
| 7558 | (number-to-string link)))) | 7558 | (number-to-string link)))) |
| 7559 | key)) | 7559 | key)) |
| @@ -7566,13 +7566,13 @@ property indicating the link is added." | |||
| 7566 | "Find keyword KEYWORD in entry ENTRY, and return (with link) if set" | 7566 | "Find keyword KEYWORD in entry ENTRY, and return (with link) if set" |
| 7567 | (catch 'exit | 7567 | (catch 'exit |
| 7568 | (mapc | 7568 | (mapc |
| 7569 | (lambda (key-list) | 7569 | (lambda (key-list) |
| 7570 | (let ((file (car key-list)) | 7570 | (let ((file (car key-list)) |
| 7571 | (kwd (assoc keyword (cdr key-list)))) | 7571 | (kwd (assoc keyword (cdr key-list)))) |
| 7572 | (when kwd | 7572 | (when kwd |
| 7573 | (setq kwd (cons (car kwd) | 7573 | (setq kwd (cons (car kwd) |
| 7574 | (if (and file (cdr kwd)) | 7574 | (if (and file (cdr kwd)) |
| 7575 | (concat file | 7575 | (concat file |
| 7576 | idlwave-html-link-sep | 7576 | idlwave-html-link-sep |
| 7577 | (number-to-string (cdr kwd))) | 7577 | (number-to-string (cdr kwd))) |
| 7578 | (cdr kwd)))) | 7578 | (cdr kwd)))) |
| @@ -7610,14 +7610,14 @@ property indicating the link is added." | |||
| 7610 | ;; Check if we need to update the "current" class | 7610 | ;; Check if we need to update the "current" class |
| 7611 | (if (not (equal class-selector idlwave-current-tags-class)) | 7611 | (if (not (equal class-selector idlwave-current-tags-class)) |
| 7612 | (idlwave-prepare-class-tag-completion class-selector)) | 7612 | (idlwave-prepare-class-tag-completion class-selector)) |
| 7613 | (setq idlwave-completion-help-info | 7613 | (setq idlwave-completion-help-info |
| 7614 | (list 'idlwave-complete-class-structure-tag-help | 7614 | (list 'idlwave-complete-class-structure-tag-help |
| 7615 | (idlwave-sintern-routine | 7615 | (idlwave-sintern-routine |
| 7616 | (concat class-selector "__define")) | 7616 | (concat class-selector "__define")) |
| 7617 | nil)) | 7617 | nil)) |
| 7618 | (let ((idlwave-cpl-bold idlwave-current-native-class-tags)) | 7618 | (let ((idlwave-cpl-bold idlwave-current-native-class-tags)) |
| 7619 | (idlwave-complete-in-buffer | 7619 | (idlwave-complete-in-buffer |
| 7620 | 'class-tag 'class-tag | 7620 | 'class-tag 'class-tag |
| 7621 | idlwave-current-class-tags nil | 7621 | idlwave-current-class-tags nil |
| 7622 | (format "Select a tag of class %s" class-selector) | 7622 | (format "Select a tag of class %s" class-selector) |
| 7623 | "class tag" | 7623 | "class tag" |
| @@ -7663,7 +7663,7 @@ property indicating the link is added." | |||
| 7663 | (skip-chars-backward "[a-zA-Z0-9_$]") | 7663 | (skip-chars-backward "[a-zA-Z0-9_$]") |
| 7664 | (equal (char-before) ?!)) | 7664 | (equal (char-before) ?!)) |
| 7665 | (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help)) | 7665 | (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help)) |
| 7666 | (idlwave-complete-in-buffer 'sysvar 'sysvar | 7666 | (idlwave-complete-in-buffer 'sysvar 'sysvar |
| 7667 | idlwave-system-variables-alist nil | 7667 | idlwave-system-variables-alist nil |
| 7668 | "Select a system variable" | 7668 | "Select a system variable" |
| 7669 | "system variable") | 7669 | "system variable") |
| @@ -7682,7 +7682,7 @@ property indicating the link is added." | |||
| 7682 | (or tags (error "System variable !%s is not a structure" var)) | 7682 | (or tags (error "System variable !%s is not a structure" var)) |
| 7683 | (setq idlwave-completion-help-info | 7683 | (setq idlwave-completion-help-info |
| 7684 | (list 'idlwave-complete-sysvar-tag-help var)) | 7684 | (list 'idlwave-complete-sysvar-tag-help var)) |
| 7685 | (idlwave-complete-in-buffer 'sysvartag 'sysvartag | 7685 | (idlwave-complete-in-buffer 'sysvartag 'sysvartag |
| 7686 | tags nil | 7686 | tags nil |
| 7687 | "Select a system variable tag" | 7687 | "Select a system variable tag" |
| 7688 | "system variable tag") | 7688 | "system variable tag") |
| @@ -7711,8 +7711,8 @@ property indicating the link is added." | |||
| 7711 | ((eq mode 'test) ; we can at least link the main | 7711 | ((eq mode 'test) ; we can at least link the main |
| 7712 | (and (stringp word) entry main)) | 7712 | (and (stringp word) entry main)) |
| 7713 | ((eq mode 'set) | 7713 | ((eq mode 'set) |
| 7714 | (if entry | 7714 | (if entry |
| 7715 | (setq link | 7715 | (setq link |
| 7716 | (if (setq target (cdr (assoc word tags))) | 7716 | (if (setq target (cdr (assoc word tags))) |
| 7717 | (idlwave-substitute-link-target main target) | 7717 | (idlwave-substitute-link-target main target) |
| 7718 | main)))) ;; setting dynamic!!! | 7718 | main)))) ;; setting dynamic!!! |
| @@ -7736,7 +7736,7 @@ property indicating the link is added." | |||
| 7736 | 7736 | ||
| 7737 | ;; Fake help in the source buffer for class structure tags. | 7737 | ;; Fake help in the source buffer for class structure tags. |
| 7738 | ;; KWD AND NAME ARE GLOBAL-VARIABLES HERE. | 7738 | ;; KWD AND NAME ARE GLOBAL-VARIABLES HERE. |
| 7739 | (defvar name) | 7739 | (defvar name) |
| 7740 | (defvar kwd) | 7740 | (defvar kwd) |
| 7741 | (defvar idlwave-help-do-class-struct-tag nil) | 7741 | (defvar idlwave-help-do-class-struct-tag nil) |
| 7742 | (defun idlwave-complete-class-structure-tag-help (mode word) | 7742 | (defun idlwave-complete-class-structure-tag-help (mode word) |
| @@ -7745,11 +7745,11 @@ property indicating the link is added." | |||
| 7745 | nil) | 7745 | nil) |
| 7746 | ((eq mode 'set) | 7746 | ((eq mode 'set) |
| 7747 | (let (class-with found-in) | 7747 | (let (class-with found-in) |
| 7748 | (when (setq class-with | 7748 | (when (setq class-with |
| 7749 | (idlwave-class-or-superclass-with-tag | 7749 | (idlwave-class-or-superclass-with-tag |
| 7750 | idlwave-current-tags-class | 7750 | idlwave-current-tags-class |
| 7751 | word)) | 7751 | word)) |
| 7752 | (if (assq (idlwave-sintern-class class-with) | 7752 | (if (assq (idlwave-sintern-class class-with) |
| 7753 | idlwave-system-class-info) | 7753 | idlwave-system-class-info) |
| 7754 | (error "No help available for system class tags")) | 7754 | (error "No help available for system class tags")) |
| 7755 | (if (setq found-in (idlwave-class-found-in class-with)) | 7755 | (if (setq found-in (idlwave-class-found-in class-with)) |
| @@ -7762,7 +7762,7 @@ property indicating the link is added." | |||
| 7762 | (defun idlwave-class-or-superclass-with-tag (class tag) | 7762 | (defun idlwave-class-or-superclass-with-tag (class tag) |
| 7763 | "Find and return the CLASS or one of its superclass with the | 7763 | "Find and return the CLASS or one of its superclass with the |
| 7764 | associated TAG, if any." | 7764 | associated TAG, if any." |
| 7765 | (let ((sclasses (cons class (cdr (assq 'all-inherits | 7765 | (let ((sclasses (cons class (cdr (assq 'all-inherits |
| 7766 | (idlwave-class-info class))))) | 7766 | (idlwave-class-info class))))) |
| 7767 | cl) | 7767 | cl) |
| 7768 | (catch 'exit | 7768 | (catch 'exit |
| @@ -7771,7 +7771,7 @@ associated TAG, if any." | |||
| 7771 | (let ((tags (idlwave-class-tags cl))) | 7771 | (let ((tags (idlwave-class-tags cl))) |
| 7772 | (while tags | 7772 | (while tags |
| 7773 | (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t)) | 7773 | (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t)) |
| 7774 | (throw 'exit cl)) | 7774 | (throw 'exit cl)) |
| 7775 | (setq tags (cdr tags)))))))) | 7775 | (setq tags (cdr tags)))))))) |
| 7776 | 7776 | ||
| 7777 | 7777 | ||
| @@ -7794,8 +7794,8 @@ associated TAG, if any." | |||
| 7794 | (setcar entry (idlwave-sintern-sysvar (car entry) 'set)) | 7794 | (setcar entry (idlwave-sintern-sysvar (car entry) 'set)) |
| 7795 | (setq tags (assq 'tags entry)) | 7795 | (setq tags (assq 'tags entry)) |
| 7796 | (if tags | 7796 | (if tags |
| 7797 | (setcdr tags | 7797 | (setcdr tags |
| 7798 | (mapcar (lambda (x) | 7798 | (mapcar (lambda (x) |
| 7799 | (cons (idlwave-sintern-sysvartag (car x) 'set) | 7799 | (cons (idlwave-sintern-sysvartag (car x) 'set) |
| 7800 | (cdr x))) | 7800 | (cdr x))) |
| 7801 | (cdr tags))))))) | 7801 | (cdr tags))))))) |
| @@ -7812,19 +7812,19 @@ associated TAG, if any." | |||
| 7812 | text start) | 7812 | text start) |
| 7813 | (setq start (match-end 0) | 7813 | (setq start (match-end 0) |
| 7814 | var (match-string 1 text) | 7814 | var (match-string 1 text) |
| 7815 | tags (if (match-end 3) | 7815 | tags (if (match-end 3) |
| 7816 | (idlwave-split-string (match-string 3 text)))) | 7816 | (idlwave-split-string (match-string 3 text)))) |
| 7817 | ;; Maintain old links, if present | 7817 | ;; Maintain old links, if present |
| 7818 | (setq old-entry (assq (idlwave-sintern-sysvar var) old)) | 7818 | (setq old-entry (assq (idlwave-sintern-sysvar var) old)) |
| 7819 | (setq link (assq 'link old-entry)) | 7819 | (setq link (assq 'link old-entry)) |
| 7820 | (setq idlwave-system-variables-alist | 7820 | (setq idlwave-system-variables-alist |
| 7821 | (cons (list var | 7821 | (cons (list var |
| 7822 | (cons | 7822 | (cons |
| 7823 | 'tags | 7823 | 'tags |
| 7824 | (mapcar (lambda (x) | 7824 | (mapcar (lambda (x) |
| 7825 | (cons x | 7825 | (cons x |
| 7826 | (cdr (assq | 7826 | (cdr (assq |
| 7827 | (idlwave-sintern-sysvartag x) | 7827 | (idlwave-sintern-sysvartag x) |
| 7828 | (cdr (assq 'tags old-entry)))))) | 7828 | (cdr (assq 'tags old-entry)))))) |
| 7829 | tags)) link) | 7829 | tags)) link) |
| 7830 | idlwave-system-variables-alist))) | 7830 | idlwave-system-variables-alist))) |
| @@ -7846,9 +7846,9 @@ associated TAG, if any." | |||
| 7846 | 7846 | ||
| 7847 | (defun idlwave-uniquify (list) | 7847 | (defun idlwave-uniquify (list) |
| 7848 | (let ((ht (make-hash-table :size (length list) :test 'equal))) | 7848 | (let ((ht (make-hash-table :size (length list) :test 'equal))) |
| 7849 | (delq nil | 7849 | (delq nil |
| 7850 | (mapcar (lambda (x) | 7850 | (mapcar (lambda (x) |
| 7851 | (unless (gethash x ht) | 7851 | (unless (gethash x ht) |
| 7852 | (puthash x t ht) | 7852 | (puthash x t ht) |
| 7853 | x)) | 7853 | x)) |
| 7854 | list)))) | 7854 | list)))) |
| @@ -7876,11 +7876,11 @@ Restore the pre-completion window configuration if possible." | |||
| 7876 | nil))) | 7876 | nil))) |
| 7877 | 7877 | ||
| 7878 | ;; Restore the pre-completion window configuration if this is safe. | 7878 | ;; Restore the pre-completion window configuration if this is safe. |
| 7879 | 7879 | ||
| 7880 | (if (or (eq verify 'force) ; force | 7880 | (if (or (eq verify 'force) ; force |
| 7881 | (and | 7881 | (and |
| 7882 | (get-buffer-window "*Completions*") ; visible | 7882 | (get-buffer-window "*Completions*") ; visible |
| 7883 | (idlwave-local-value 'idlwave-completion-p | 7883 | (idlwave-local-value 'idlwave-completion-p |
| 7884 | "*Completions*") ; cib-buffer | 7884 | "*Completions*") ; cib-buffer |
| 7885 | (eq (marker-buffer idlwave-completion-mark) | 7885 | (eq (marker-buffer idlwave-completion-mark) |
| 7886 | (current-buffer)) ; buffer OK | 7886 | (current-buffer)) ; buffer OK |
| @@ -7978,7 +7978,7 @@ With ARG, enforce query for the class of object methods." | |||
| 7978 | (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)" | 7978 | (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)" |
| 7979 | resolve) | 7979 | resolve) |
| 7980 | (setq type (match-string 1 resolve) | 7980 | (setq type (match-string 1 resolve) |
| 7981 | class (if (match-beginning 2) | 7981 | class (if (match-beginning 2) |
| 7982 | (match-string 3 resolve) | 7982 | (match-string 3 resolve) |
| 7983 | nil) | 7983 | nil) |
| 7984 | name (match-string 4 resolve))) | 7984 | name (match-string 4 resolve))) |
| @@ -7987,15 +7987,15 @@ With ARG, enforce query for the class of object methods." | |||
| 7987 | 7987 | ||
| 7988 | (cond | 7988 | (cond |
| 7989 | ((null class) | 7989 | ((null class) |
| 7990 | (idlwave-shell-send-command | 7990 | (idlwave-shell-send-command |
| 7991 | (format "resolve_routine,'%s'%s" (downcase name) kwd) | 7991 | (format "resolve_routine,'%s'%s" (downcase name) kwd) |
| 7992 | 'idlwave-update-routine-info | 7992 | 'idlwave-update-routine-info |
| 7993 | nil t)) | 7993 | nil t)) |
| 7994 | (t | 7994 | (t |
| 7995 | (idlwave-shell-send-command | 7995 | (idlwave-shell-send-command |
| 7996 | (format "resolve_routine,'%s__define'%s" (downcase class) kwd) | 7996 | (format "resolve_routine,'%s__define'%s" (downcase class) kwd) |
| 7997 | (list 'idlwave-shell-send-command | 7997 | (list 'idlwave-shell-send-command |
| 7998 | (format "resolve_routine,'%s__%s'%s" | 7998 | (format "resolve_routine,'%s__%s'%s" |
| 7999 | (downcase class) (downcase name) kwd) | 7999 | (downcase class) (downcase name) kwd) |
| 8000 | '(idlwave-update-routine-info) | 8000 | '(idlwave-update-routine-info) |
| 8001 | nil t)))))) | 8001 | nil t)))))) |
| @@ -8016,19 +8016,19 @@ force class query for object methods." | |||
| 8016 | (this-buffer (equal arg '(4))) | 8016 | (this-buffer (equal arg '(4))) |
| 8017 | (module (idlwave-fix-module-if-obj_new (idlwave-what-module))) | 8017 | (module (idlwave-fix-module-if-obj_new (idlwave-what-module))) |
| 8018 | (default (if module | 8018 | (default (if module |
| 8019 | (concat (idlwave-make-full-name | 8019 | (concat (idlwave-make-full-name |
| 8020 | (nth 2 module) (car module)) | 8020 | (nth 2 module) (car module)) |
| 8021 | (if (eq (nth 1 module) 'pro) "<p>" "<f>")) | 8021 | (if (eq (nth 1 module) 'pro) "<p>" "<f>")) |
| 8022 | "none")) | 8022 | "none")) |
| 8023 | (list | 8023 | (list |
| 8024 | (idlwave-uniquify | 8024 | (idlwave-uniquify |
| 8025 | (delq nil | 8025 | (delq nil |
| 8026 | (mapcar (lambda (x) | 8026 | (mapcar (lambda (x) |
| 8027 | (if (eq 'system (car-safe (nth 3 x))) | 8027 | (if (eq 'system (car-safe (nth 3 x))) |
| 8028 | ;; Take out system routines with no source. | 8028 | ;; Take out system routines with no source. |
| 8029 | nil | 8029 | nil |
| 8030 | (list | 8030 | (list |
| 8031 | (concat (idlwave-make-full-name | 8031 | (concat (idlwave-make-full-name |
| 8032 | (nth 2 x) (car x)) | 8032 | (nth 2 x) (car x)) |
| 8033 | (if (eq (nth 1 x) 'pro) "<p>" "<f>"))))) | 8033 | (if (eq (nth 1 x) 'pro) "<p>" "<f>"))))) |
| 8034 | (if this-buffer | 8034 | (if this-buffer |
| @@ -8057,10 +8057,10 @@ force class query for object methods." | |||
| 8057 | (t t))) | 8057 | (t t))) |
| 8058 | (idlwave-do-find-module name type class nil this-buffer))) | 8058 | (idlwave-do-find-module name type class nil this-buffer))) |
| 8059 | 8059 | ||
| 8060 | (defun idlwave-do-find-module (name type class | 8060 | (defun idlwave-do-find-module (name type class |
| 8061 | &optional force-source this-buffer) | 8061 | &optional force-source this-buffer) |
| 8062 | (let ((name1 (idlwave-make-full-name class name)) | 8062 | (let ((name1 (idlwave-make-full-name class name)) |
| 8063 | source buf1 entry | 8063 | source buf1 entry |
| 8064 | (buf (current-buffer)) | 8064 | (buf (current-buffer)) |
| 8065 | (pos (point)) | 8065 | (pos (point)) |
| 8066 | file name2) | 8066 | file name2) |
| @@ -8070,11 +8070,11 @@ force class query for object methods." | |||
| 8070 | name2 (if (nth 2 entry) | 8070 | name2 (if (nth 2 entry) |
| 8071 | (idlwave-make-full-name (nth 2 entry) name) | 8071 | (idlwave-make-full-name (nth 2 entry) name) |
| 8072 | name1)) | 8072 | name1)) |
| 8073 | (if source | 8073 | (if source |
| 8074 | (setq file (idlwave-routine-source-file source))) | 8074 | (setq file (idlwave-routine-source-file source))) |
| 8075 | (unless file ; Try to find it on the path. | 8075 | (unless file ; Try to find it on the path. |
| 8076 | (setq file | 8076 | (setq file |
| 8077 | (idlwave-expand-lib-file-name | 8077 | (idlwave-expand-lib-file-name |
| 8078 | (if class | 8078 | (if class |
| 8079 | (format "%s__define.pro" (downcase class)) | 8079 | (format "%s__define.pro" (downcase class)) |
| 8080 | (format "%s.pro" (downcase name)))))) | 8080 | (format "%s.pro" (downcase name)))))) |
| @@ -8082,14 +8082,14 @@ force class query for object methods." | |||
| 8082 | ((or (null name) (equal name "")) | 8082 | ((or (null name) (equal name "")) |
| 8083 | (error "Abort")) | 8083 | (error "Abort")) |
| 8084 | ((eq (car source) 'system) | 8084 | ((eq (car source) 'system) |
| 8085 | (error "Source code for system routine %s is not available" | 8085 | (error "Source code for system routine %s is not available" |
| 8086 | name2)) | 8086 | name2)) |
| 8087 | ((or (not file) (not (file-regular-p file))) | 8087 | ((or (not file) (not (file-regular-p file))) |
| 8088 | (error "Source code for routine %s is not available" | 8088 | (error "Source code for routine %s is not available" |
| 8089 | name2)) | 8089 | name2)) |
| 8090 | (t | 8090 | (t |
| 8091 | (when (not this-buffer) | 8091 | (when (not this-buffer) |
| 8092 | (setq buf1 | 8092 | (setq buf1 |
| 8093 | (idlwave-find-file-noselect file 'find)) | 8093 | (idlwave-find-file-noselect file 'find)) |
| 8094 | (pop-to-buffer buf1 t)) | 8094 | (pop-to-buffer buf1 t)) |
| 8095 | (goto-char (point-max)) | 8095 | (goto-char (point-max)) |
| @@ -8099,7 +8099,7 @@ force class query for object methods." | |||
| 8099 | (cond ((eq type 'fun) "function") | 8099 | (cond ((eq type 'fun) "function") |
| 8100 | ((eq type 'pro) "pro") | 8100 | ((eq type 'pro) "pro") |
| 8101 | (t "\\(pro\\|function\\)")) | 8101 | (t "\\(pro\\|function\\)")) |
| 8102 | "\\>[ \t]+" | 8102 | "\\>[ \t]+" |
| 8103 | (regexp-quote (downcase name2)) | 8103 | (regexp-quote (downcase name2)) |
| 8104 | "[^a-zA-Z0-9_$]") | 8104 | "[^a-zA-Z0-9_$]") |
| 8105 | nil t) | 8105 | nil t) |
| @@ -8136,17 +8136,17 @@ Used by `idlwave-routine-info' and `idlwave-find-module'." | |||
| 8136 | (cond | 8136 | (cond |
| 8137 | ((and (eq cw 'procedure) | 8137 | ((and (eq cw 'procedure) |
| 8138 | (not (equal this-word ""))) | 8138 | (not (equal this-word ""))) |
| 8139 | (setq this-word (idlwave-sintern-routine-or-method | 8139 | (setq this-word (idlwave-sintern-routine-or-method |
| 8140 | this-word (nth 2 (nth 3 where)))) | 8140 | this-word (nth 2 (nth 3 where)))) |
| 8141 | (list this-word 'pro | 8141 | (list this-word 'pro |
| 8142 | (idlwave-determine-class | 8142 | (idlwave-determine-class |
| 8143 | (cons this-word (cdr (nth 3 where))) | 8143 | (cons this-word (cdr (nth 3 where))) |
| 8144 | 'pro))) | 8144 | 'pro))) |
| 8145 | ((and (eq cw 'function) | 8145 | ((and (eq cw 'function) |
| 8146 | (not (equal this-word "")) | 8146 | (not (equal this-word "")) |
| 8147 | (or (eq next-char ?\() ; exclude arrays, vars. | 8147 | (or (eq next-char ?\() ; exclude arrays, vars. |
| 8148 | (looking-at "[a-zA-Z0-9_]*[ \t]*("))) | 8148 | (looking-at "[a-zA-Z0-9_]*[ \t]*("))) |
| 8149 | (setq this-word (idlwave-sintern-routine-or-method | 8149 | (setq this-word (idlwave-sintern-routine-or-method |
| 8150 | this-word (nth 2 (nth 3 where)))) | 8150 | this-word (nth 2 (nth 3 where)))) |
| 8151 | (list this-word 'fun | 8151 | (list this-word 'fun |
| 8152 | (idlwave-determine-class | 8152 | (idlwave-determine-class |
| @@ -8183,7 +8183,7 @@ Used by `idlwave-routine-info' and `idlwave-find-module'." | |||
| 8183 | class))) | 8183 | class))) |
| 8184 | 8184 | ||
| 8185 | (defun idlwave-fix-module-if-obj_new (module) | 8185 | (defun idlwave-fix-module-if-obj_new (module) |
| 8186 | "Check if MODULE points to obj_new. | 8186 | "Check if MODULE points to obj_new. |
| 8187 | If yes, and if the cursor is in the keyword region, change to the | 8187 | If yes, and if the cursor is in the keyword region, change to the |
| 8188 | appropriate Init method." | 8188 | appropriate Init method." |
| 8189 | (let* ((name (car module)) | 8189 | (let* ((name (car module)) |
| @@ -8204,7 +8204,7 @@ appropriate Init method." | |||
| 8204 | (idlwave-sintern-class class))))) | 8204 | (idlwave-sintern-class class))))) |
| 8205 | module)) | 8205 | module)) |
| 8206 | 8206 | ||
| 8207 | (defun idlwave-fix-keywords (name type class keywords | 8207 | (defun idlwave-fix-keywords (name type class keywords |
| 8208 | &optional super-classes system) | 8208 | &optional super-classes system) |
| 8209 | "Update a list of keywords. | 8209 | "Update a list of keywords. |
| 8210 | Translate OBJ_NEW, adding all super-class keywords, or all keywords | 8210 | Translate OBJ_NEW, adding all super-class keywords, or all keywords |
| @@ -8225,34 +8225,34 @@ demand _EXTRA in the keyword list." | |||
| 8225 | string) | 8225 | string) |
| 8226 | (setq class (idlwave-sintern-class (match-string 1 string))) | 8226 | (setq class (idlwave-sintern-class (match-string 1 string))) |
| 8227 | (setq idlwave-current-obj_new-class class) | 8227 | (setq idlwave-current-obj_new-class class) |
| 8228 | (setq keywords | 8228 | (setq keywords |
| 8229 | (append keywords | 8229 | (append keywords |
| 8230 | (idlwave-entry-keywords | 8230 | (idlwave-entry-keywords |
| 8231 | (idlwave-rinfo-assq | 8231 | (idlwave-rinfo-assq |
| 8232 | (idlwave-sintern-method "INIT") | 8232 | (idlwave-sintern-method "INIT") |
| 8233 | 'fun | 8233 | 'fun |
| 8234 | class | 8234 | class |
| 8235 | (idlwave-routines)) 'do-link)))))) | 8235 | (idlwave-routines)) 'do-link)))))) |
| 8236 | 8236 | ||
| 8237 | ;; If the class is `t', combine all keywords of all methods NAME | 8237 | ;; If the class is `t', combine all keywords of all methods NAME |
| 8238 | (when (eq class t) | 8238 | (when (eq class t) |
| 8239 | (mapc (lambda (entry) | 8239 | (mapc (lambda (entry) |
| 8240 | (and | 8240 | (and |
| 8241 | (nth 2 entry) ; non-nil class | 8241 | (nth 2 entry) ; non-nil class |
| 8242 | (eq (nth 1 entry) type) ; correct type | 8242 | (eq (nth 1 entry) type) ; correct type |
| 8243 | (setq keywords | 8243 | (setq keywords |
| 8244 | (append keywords | 8244 | (append keywords |
| 8245 | (idlwave-entry-keywords entry 'do-link))))) | 8245 | (idlwave-entry-keywords entry 'do-link))))) |
| 8246 | (idlwave-all-assq name (idlwave-routines))) | 8246 | (idlwave-all-assq name (idlwave-routines))) |
| 8247 | (setq keywords (idlwave-uniquify keywords))) | 8247 | (setq keywords (idlwave-uniquify keywords))) |
| 8248 | 8248 | ||
| 8249 | ;; If we have inheritance, add all keywords from superclasses, if | 8249 | ;; If we have inheritance, add all keywords from superclasses, if |
| 8250 | ;; the user indicated that method in `idlwave-keyword-class-inheritance' | 8250 | ;; the user indicated that method in `idlwave-keyword-class-inheritance' |
| 8251 | (when (and | 8251 | (when (and |
| 8252 | super-classes | 8252 | super-classes |
| 8253 | idlwave-keyword-class-inheritance | 8253 | idlwave-keyword-class-inheritance |
| 8254 | (stringp class) | 8254 | (stringp class) |
| 8255 | (or | 8255 | (or |
| 8256 | system | 8256 | system |
| 8257 | (assq (idlwave-sintern-keyword "_extra") keywords) | 8257 | (assq (idlwave-sintern-keyword "_extra") keywords) |
| 8258 | (assq (idlwave-sintern-keyword "_ref_extra") keywords)) | 8258 | (assq (idlwave-sintern-keyword "_ref_extra") keywords)) |
| @@ -8270,7 +8270,7 @@ demand _EXTRA in the keyword list." | |||
| 8270 | (mapcar (lambda (k) (add-to-list 'keywords k)) | 8270 | (mapcar (lambda (k) (add-to-list 'keywords k)) |
| 8271 | (idlwave-entry-keywords entry 'do-link)))) | 8271 | (idlwave-entry-keywords entry 'do-link)))) |
| 8272 | (setq keywords (idlwave-uniquify keywords))) | 8272 | (setq keywords (idlwave-uniquify keywords))) |
| 8273 | 8273 | ||
| 8274 | ;; Return the final list | 8274 | ;; Return the final list |
| 8275 | keywords)) | 8275 | keywords)) |
| 8276 | 8276 | ||
| @@ -8295,14 +8295,14 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8295 | (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist))) | 8295 | (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist))) |
| 8296 | (completion-ignore-case t) | 8296 | (completion-ignore-case t) |
| 8297 | candidates) | 8297 | candidates) |
| 8298 | (cond ((assq kwd kwd-alist) | 8298 | (cond ((assq kwd kwd-alist) |
| 8299 | kwd) | 8299 | kwd) |
| 8300 | ((setq candidates (all-completions kwd kwd-alist)) | 8300 | ((setq candidates (all-completions kwd kwd-alist)) |
| 8301 | (if (= (length candidates) 1) | 8301 | (if (= (length candidates) 1) |
| 8302 | (car candidates) | 8302 | (car candidates) |
| 8303 | candidates)) | 8303 | candidates)) |
| 8304 | ((and entry extra) | 8304 | ((and entry extra) |
| 8305 | ;; Inheritance may cause this keyword to be correct | 8305 | ;; Inheritance may cause this keyword to be correct |
| 8306 | keyword) | 8306 | keyword) |
| 8307 | (entry | 8307 | (entry |
| 8308 | ;; We do know the function, which does not have the keyword. | 8308 | ;; We do know the function, which does not have the keyword. |
| @@ -8314,13 +8314,13 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8314 | 8314 | ||
| 8315 | (defvar idlwave-rinfo-mouse-map (make-sparse-keymap)) | 8315 | (defvar idlwave-rinfo-mouse-map (make-sparse-keymap)) |
| 8316 | (defvar idlwave-rinfo-map (make-sparse-keymap)) | 8316 | (defvar idlwave-rinfo-map (make-sparse-keymap)) |
| 8317 | (define-key idlwave-rinfo-mouse-map | 8317 | (define-key idlwave-rinfo-mouse-map |
| 8318 | (if (featurep 'xemacs) [button2] [mouse-2]) | 8318 | (if (featurep 'xemacs) [button2] [mouse-2]) |
| 8319 | 'idlwave-mouse-active-rinfo) | 8319 | 'idlwave-mouse-active-rinfo) |
| 8320 | (define-key idlwave-rinfo-mouse-map | 8320 | (define-key idlwave-rinfo-mouse-map |
| 8321 | (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)]) | 8321 | (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)]) |
| 8322 | 'idlwave-mouse-active-rinfo-shift) | 8322 | 'idlwave-mouse-active-rinfo-shift) |
| 8323 | (define-key idlwave-rinfo-mouse-map | 8323 | (define-key idlwave-rinfo-mouse-map |
| 8324 | (if (featurep 'xemacs) [button3] [mouse-3]) | 8324 | (if (featurep 'xemacs) [button3] [mouse-3]) |
| 8325 | 'idlwave-mouse-active-rinfo-right) | 8325 | 'idlwave-mouse-active-rinfo-right) |
| 8326 | (define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space) | 8326 | (define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space) |
| @@ -8346,7 +8346,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8346 | (let* ((initial-class (or initial-class class)) | 8346 | (let* ((initial-class (or initial-class class)) |
| 8347 | (entry (or (idlwave-best-rinfo-assq name type class | 8347 | (entry (or (idlwave-best-rinfo-assq name type class |
| 8348 | (idlwave-routines)) | 8348 | (idlwave-routines)) |
| 8349 | (idlwave-rinfo-assq name type class | 8349 | (idlwave-rinfo-assq name type class |
| 8350 | idlwave-unresolved-routines))) | 8350 | idlwave-unresolved-routines))) |
| 8351 | (name (or (car entry) name)) | 8351 | (name (or (car entry) name)) |
| 8352 | (class (or (nth 2 entry) class)) | 8352 | (class (or (nth 2 entry) class)) |
| @@ -8371,7 +8371,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8371 | (km-prop (if (featurep 'xemacs) 'keymap 'local-map)) | 8371 | (km-prop (if (featurep 'xemacs) 'keymap 'local-map)) |
| 8372 | (face 'idlwave-help-link) | 8372 | (face 'idlwave-help-link) |
| 8373 | beg props win cnt total) | 8373 | beg props win cnt total) |
| 8374 | ;; Fix keywords, but don't add chained super-classes, since these | 8374 | ;; Fix keywords, but don't add chained super-classes, since these |
| 8375 | ;; are shown separately for that super-class | 8375 | ;; are shown separately for that super-class |
| 8376 | (setq keywords (idlwave-fix-keywords name type class keywords)) | 8376 | (setq keywords (idlwave-fix-keywords name type class keywords)) |
| 8377 | (cond | 8377 | (cond |
| @@ -8413,7 +8413,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8413 | km-prop idlwave-rinfo-mouse-map | 8413 | km-prop idlwave-rinfo-mouse-map |
| 8414 | 'help-echo help-echo-use | 8414 | 'help-echo help-echo-use |
| 8415 | 'data (cons 'usage data))) | 8415 | 'data (cons 'usage data))) |
| 8416 | (if html-file (setq props (append (list 'face face 'link html-file) | 8416 | (if html-file (setq props (append (list 'face face 'link html-file) |
| 8417 | props))) | 8417 | props))) |
| 8418 | (insert "Usage: ") | 8418 | (insert "Usage: ") |
| 8419 | (setq beg (point)) | 8419 | (setq beg (point)) |
| @@ -8422,14 +8422,14 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8422 | (format calling-seq name name name name)) | 8422 | (format calling-seq name name name name)) |
| 8423 | "\n") | 8423 | "\n") |
| 8424 | (add-text-properties beg (point) props) | 8424 | (add-text-properties beg (point) props) |
| 8425 | 8425 | ||
| 8426 | (insert "Keywords:") | 8426 | (insert "Keywords:") |
| 8427 | (if (null keywords) | 8427 | (if (null keywords) |
| 8428 | (insert " No keywords accepted.") | 8428 | (insert " No keywords accepted.") |
| 8429 | (setq col 9) | 8429 | (setq col 9) |
| 8430 | (mapcar | 8430 | (mapcar |
| 8431 | (lambda (x) | 8431 | (lambda (x) |
| 8432 | (if (>= (+ col 1 (length (car x))) | 8432 | (if (>= (+ col 1 (length (car x))) |
| 8433 | (window-width)) | 8433 | (window-width)) |
| 8434 | (progn | 8434 | (progn |
| 8435 | (insert "\n ") | 8435 | (insert "\n ") |
| @@ -8447,7 +8447,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8447 | (add-text-properties beg (point) props) | 8447 | (add-text-properties beg (point) props) |
| 8448 | (setq col (+ col 1 (length (car x))))) | 8448 | (setq col (+ col 1 (length (car x))))) |
| 8449 | keywords)) | 8449 | keywords)) |
| 8450 | 8450 | ||
| 8451 | (setq cnt 1 total (length all)) | 8451 | (setq cnt 1 total (length all)) |
| 8452 | ;; Here entry is (key file (list of type-conses)) | 8452 | ;; Here entry is (key file (list of type-conses)) |
| 8453 | (while (setq entry (pop all)) | 8453 | (while (setq entry (pop all)) |
| @@ -8460,7 +8460,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8460 | (cdr (car (nth 2 entry)))) | 8460 | (cdr (car (nth 2 entry)))) |
| 8461 | 'data (cons 'source data))) | 8461 | 'data (cons 'source data))) |
| 8462 | (idlwave-insert-source-location | 8462 | (idlwave-insert-source-location |
| 8463 | (format "\n%-8s %s" | 8463 | (format "\n%-8s %s" |
| 8464 | (if (equal cnt 1) | 8464 | (if (equal cnt 1) |
| 8465 | (if (> total 1) "Sources:" "Source:") | 8465 | (if (> total 1) "Sources:" "Source:") |
| 8466 | "") | 8466 | "") |
| @@ -8469,7 +8469,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8469 | (incf cnt) | 8469 | (incf cnt) |
| 8470 | (when (and all (> cnt idlwave-rinfo-max-source-lines)) | 8470 | (when (and all (> cnt idlwave-rinfo-max-source-lines)) |
| 8471 | ;; No more source lines, please | 8471 | ;; No more source lines, please |
| 8472 | (insert (format | 8472 | (insert (format |
| 8473 | "\n Source information truncated to %d entries." | 8473 | "\n Source information truncated to %d entries." |
| 8474 | idlwave-rinfo-max-source-lines)) | 8474 | idlwave-rinfo-max-source-lines)) |
| 8475 | (setq all nil))) | 8475 | (setq all nil))) |
| @@ -8483,7 +8483,7 @@ If we do not know about MODULE, just return KEYWORD literally." | |||
| 8483 | (unwind-protect | 8483 | (unwind-protect |
| 8484 | (progn | 8484 | (progn |
| 8485 | (select-window win) | 8485 | (select-window win) |
| 8486 | (enlarge-window (- (/ (frame-height) 2) | 8486 | (enlarge-window (- (/ (frame-height) 2) |
| 8487 | (window-height))) | 8487 | (window-height))) |
| 8488 | (shrink-window-if-larger-than-buffer)) | 8488 | (shrink-window-if-larger-than-buffer)) |
| 8489 | (select-window ww))))))))) | 8489 | (select-window ww))))))))) |
| @@ -8520,9 +8520,9 @@ it." | |||
| 8520 | ((and (not file) shell-flag) | 8520 | ((and (not file) shell-flag) |
| 8521 | (insert "Unresolved")) | 8521 | (insert "Unresolved")) |
| 8522 | 8522 | ||
| 8523 | ((null file) | 8523 | ((null file) |
| 8524 | (insert "ERROR")) | 8524 | (insert "ERROR")) |
| 8525 | 8525 | ||
| 8526 | ((idlwave-syslib-p file) | 8526 | ((idlwave-syslib-p file) |
| 8527 | (if (string-match "obsolete" (file-name-directory file)) | 8527 | (if (string-match "obsolete" (file-name-directory file)) |
| 8528 | (insert "Obsolete ") | 8528 | (insert "Obsolete ") |
| @@ -8536,7 +8536,7 @@ it." | |||
| 8536 | ;; Old special syntax: a matching regexp | 8536 | ;; Old special syntax: a matching regexp |
| 8537 | ((setq special (idlwave-special-lib-test file)) | 8537 | ((setq special (idlwave-special-lib-test file)) |
| 8538 | (insert (format "%-10s" special))) | 8538 | (insert (format "%-10s" special))) |
| 8539 | 8539 | ||
| 8540 | ;; Catch-all with file | 8540 | ;; Catch-all with file |
| 8541 | ((idlwave-lib-p file) (insert "Library ")) | 8541 | ((idlwave-lib-p file) (insert "Library ")) |
| 8542 | 8542 | ||
| @@ -8551,7 +8551,7 @@ it." | |||
| 8551 | (if shell-flag "S" "-") | 8551 | (if shell-flag "S" "-") |
| 8552 | (if buffer-flag "B" "-") | 8552 | (if buffer-flag "B" "-") |
| 8553 | "] "))) | 8553 | "] "))) |
| 8554 | (when (> ndupl 1) | 8554 | (when (> ndupl 1) |
| 8555 | (setq beg (point)) | 8555 | (setq beg (point)) |
| 8556 | (insert (format "(%dx) " ndupl)) | 8556 | (insert (format "(%dx) " ndupl)) |
| 8557 | (add-text-properties beg (point) (list 'face 'bold))) | 8557 | (add-text-properties beg (point) (list 'face 'bold))) |
| @@ -8575,7 +8575,7 @@ Return the name of the special lib if there is a match." | |||
| 8575 | alist nil))) | 8575 | alist nil))) |
| 8576 | rtn) | 8576 | rtn) |
| 8577 | (t nil)))) | 8577 | (t nil)))) |
| 8578 | 8578 | ||
| 8579 | (defun idlwave-mouse-active-rinfo-right (ev) | 8579 | (defun idlwave-mouse-active-rinfo-right (ev) |
| 8580 | (interactive "e") | 8580 | (interactive "e") |
| 8581 | (idlwave-mouse-active-rinfo ev 'right)) | 8581 | (idlwave-mouse-active-rinfo ev 'right)) |
| @@ -8594,7 +8594,7 @@ Optional args RIGHT and SHIFT indicate, if mouse-3 was used, and if SHIFT | |||
| 8594 | was pressed." | 8594 | was pressed." |
| 8595 | (interactive "e") | 8595 | (interactive "e") |
| 8596 | (if ev (mouse-set-point ev)) | 8596 | (if ev (mouse-set-point ev)) |
| 8597 | (let (data id name type class buf bufwin source link keyword | 8597 | (let (data id name type class buf bufwin source link keyword |
| 8598 | word initial-class) | 8598 | word initial-class) |
| 8599 | (setq data (get-text-property (point) 'data) | 8599 | (setq data (get-text-property (point) 'data) |
| 8600 | source (get-text-property (point) 'source) | 8600 | source (get-text-property (point) 'source) |
| @@ -8609,9 +8609,9 @@ was pressed." | |||
| 8609 | 8609 | ||
| 8610 | (cond ((eq id 'class) ; Switch class being displayed | 8610 | (cond ((eq id 'class) ; Switch class being displayed |
| 8611 | (if (window-live-p bufwin) (select-window bufwin)) | 8611 | (if (window-live-p bufwin) (select-window bufwin)) |
| 8612 | (idlwave-display-calling-sequence | 8612 | (idlwave-display-calling-sequence |
| 8613 | (idlwave-sintern-method name) | 8613 | (idlwave-sintern-method name) |
| 8614 | type (idlwave-sintern-class word) | 8614 | type (idlwave-sintern-class word) |
| 8615 | initial-class)) | 8615 | initial-class)) |
| 8616 | ((eq id 'usage) ; Online help on this routine | 8616 | ((eq id 'usage) ; Online help on this routine |
| 8617 | (idlwave-online-help link name type class)) | 8617 | (idlwave-online-help link name type class)) |
| @@ -8652,9 +8652,9 @@ was pressed." | |||
| 8652 | (setq bwin (get-buffer-window buffer))) | 8652 | (setq bwin (get-buffer-window buffer))) |
| 8653 | (if (eq (preceding-char) ?/) | 8653 | (if (eq (preceding-char) ?/) |
| 8654 | (insert keyword) | 8654 | (insert keyword) |
| 8655 | (unless (save-excursion | 8655 | (unless (save-excursion |
| 8656 | (re-search-backward | 8656 | (re-search-backward |
| 8657 | "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" | 8657 | "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" |
| 8658 | (min (- (point) 100) (point-min)) t)) | 8658 | (min (- (point) 100) (point-min)) t)) |
| 8659 | (insert ", ")) | 8659 | (insert ", ")) |
| 8660 | (if shift (insert "/")) | 8660 | (if shift (insert "/")) |
| @@ -8706,7 +8706,7 @@ the load path in order to find a definition. The output of this | |||
| 8706 | command can be used to detect possible name clashes during this process." | 8706 | command can be used to detect possible name clashes during this process." |
| 8707 | (idlwave-routines) ; Make sure everything is loaded. | 8707 | (idlwave-routines) ; Make sure everything is loaded. |
| 8708 | (unless (or idlwave-user-catalog-routines idlwave-library-catalog-routines) | 8708 | (unless (or idlwave-user-catalog-routines idlwave-library-catalog-routines) |
| 8709 | (or (y-or-n-p | 8709 | (or (y-or-n-p |
| 8710 | "You don't have any user or library catalogs. Continue anyway? ") | 8710 | "You don't have any user or library catalogs. Continue anyway? ") |
| 8711 | (error "Abort"))) | 8711 | (error "Abort"))) |
| 8712 | (let* ((routines (append idlwave-system-routines | 8712 | (let* ((routines (append idlwave-system-routines |
| @@ -8719,7 +8719,7 @@ command can be used to detect possible name clashes during this process." | |||
| 8719 | (keymap (make-sparse-keymap)) | 8719 | (keymap (make-sparse-keymap)) |
| 8720 | (props (list 'mouse-face 'highlight | 8720 | (props (list 'mouse-face 'highlight |
| 8721 | km-prop keymap | 8721 | km-prop keymap |
| 8722 | 'help-echo "Mouse2: Find source")) | 8722 | 'help-echo "Mouse2: Find source")) |
| 8723 | (nroutines (length (or special-routines routines))) | 8723 | (nroutines (length (or special-routines routines))) |
| 8724 | (step (/ nroutines 100)) | 8724 | (step (/ nroutines 100)) |
| 8725 | (n 0) | 8725 | (n 0) |
| @@ -8742,13 +8742,13 @@ command can be used to detect possible name clashes during this process." | |||
| 8742 | (message "Sorting routines...done") | 8742 | (message "Sorting routines...done") |
| 8743 | 8743 | ||
| 8744 | (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)]) | 8744 | (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)]) |
| 8745 | (lambda (ev) | 8745 | (lambda (ev) |
| 8746 | (interactive "e") | 8746 | (interactive "e") |
| 8747 | (mouse-set-point ev) | 8747 | (mouse-set-point ev) |
| 8748 | (apply 'idlwave-do-find-module | 8748 | (apply 'idlwave-do-find-module |
| 8749 | (get-text-property (point) 'find-args)))) | 8749 | (get-text-property (point) 'find-args)))) |
| 8750 | (define-key keymap [(return)] | 8750 | (define-key keymap [(return)] |
| 8751 | (lambda () | 8751 | (lambda () |
| 8752 | (interactive) | 8752 | (interactive) |
| 8753 | (apply 'idlwave-do-find-module | 8753 | (apply 'idlwave-do-find-module |
| 8754 | (get-text-property (point) 'find-args)))) | 8754 | (get-text-property (point) 'find-args)))) |
| @@ -8774,13 +8774,13 @@ command can be used to detect possible name clashes during this process." | |||
| 8774 | (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1)) | 8774 | (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1)) |
| 8775 | (incf cnt) | 8775 | (incf cnt) |
| 8776 | (insert (format "\n%s%s" | 8776 | (insert (format "\n%s%s" |
| 8777 | (idlwave-make-full-name (nth 2 routine) | 8777 | (idlwave-make-full-name (nth 2 routine) |
| 8778 | (car routine)) | 8778 | (car routine)) |
| 8779 | (if (eq (nth 1 routine) 'fun) "()" ""))) | 8779 | (if (eq (nth 1 routine) 'fun) "()" ""))) |
| 8780 | (while (setq twin (pop dtwins)) | 8780 | (while (setq twin (pop dtwins)) |
| 8781 | (setq props1 (append (list 'find-args | 8781 | (setq props1 (append (list 'find-args |
| 8782 | (list (nth 0 routine) | 8782 | (list (nth 0 routine) |
| 8783 | (nth 1 routine) | 8783 | (nth 1 routine) |
| 8784 | (nth 2 routine))) | 8784 | (nth 2 routine))) |
| 8785 | props)) | 8785 | props)) |
| 8786 | (idlwave-insert-source-location "\n - " twin props1)))) | 8786 | (idlwave-insert-source-location "\n - " twin props1)))) |
| @@ -8803,7 +8803,7 @@ command can be used to detect possible name clashes during this process." | |||
| 8803 | (or (not (stringp sfile)) | 8803 | (or (not (stringp sfile)) |
| 8804 | (not (string-match "\\S-" sfile)))) | 8804 | (not (string-match "\\S-" sfile)))) |
| 8805 | (setq stype 'unresolved)) | 8805 | (setq stype 'unresolved)) |
| 8806 | (princ (format " %-10s %s\n" | 8806 | (princ (format " %-10s %s\n" |
| 8807 | stype | 8807 | stype |
| 8808 | (if sfile sfile "No source code available"))))) | 8808 | (if sfile sfile "No source code available"))))) |
| 8809 | 8809 | ||
| @@ -8822,20 +8822,20 @@ ENTRY will also be returned, as the first item of this list." | |||
| 8822 | (eq type (nth 1 candidate)) | 8822 | (eq type (nth 1 candidate)) |
| 8823 | (eq class (nth 2 candidate))) | 8823 | (eq class (nth 2 candidate))) |
| 8824 | (push candidate twins))) | 8824 | (push candidate twins))) |
| 8825 | (if (setq candidate (idlwave-rinfo-assq name type class | 8825 | (if (setq candidate (idlwave-rinfo-assq name type class |
| 8826 | idlwave-unresolved-routines)) | 8826 | idlwave-unresolved-routines)) |
| 8827 | (push candidate twins)) | 8827 | (push candidate twins)) |
| 8828 | (cons entry (nreverse twins)))) | 8828 | (cons entry (nreverse twins)))) |
| 8829 | 8829 | ||
| 8830 | (defun idlwave-study-twins (entries) | 8830 | (defun idlwave-study-twins (entries) |
| 8831 | "Return dangerous twins of first entry in ENTRIES. | 8831 | "Return dangerous twins of first entry in ENTRIES. |
| 8832 | Dangerous twins are routines with same name, but in different files on | 8832 | Dangerous twins are routines with same name, but in different files on |
| 8833 | the load path. If a file is in the system library and has an entry in | 8833 | the load path. If a file is in the system library and has an entry in |
| 8834 | the `idlwave-system-routines' list, we omit the latter as | 8834 | the `idlwave-system-routines' list, we omit the latter as |
| 8835 | non-dangerous because many IDL routines are implemented as library | 8835 | non-dangerous because many IDL routines are implemented as library |
| 8836 | routines, and may have been scanned." | 8836 | routines, and may have been scanned." |
| 8837 | (let* ((entry (car entries)) | 8837 | (let* ((entry (car entries)) |
| 8838 | (name (car entry)) ; | 8838 | (name (car entry)) ; |
| 8839 | (type (nth 1 entry)) ; Must be bound for | 8839 | (type (nth 1 entry)) ; Must be bound for |
| 8840 | (class (nth 2 entry)) ; idlwave-routine-twin-compare | 8840 | (class (nth 2 entry)) ; idlwave-routine-twin-compare |
| 8841 | (cnt 0) | 8841 | (cnt 0) |
| @@ -8853,23 +8853,23 @@ routines, and may have been scanned." | |||
| 8853 | (t 'unresolved))) | 8853 | (t 'unresolved))) |
| 8854 | 8854 | ||
| 8855 | ;; Check for an entry in the system library | 8855 | ;; Check for an entry in the system library |
| 8856 | (if (and file | 8856 | (if (and file |
| 8857 | (not syslibp) | 8857 | (not syslibp) |
| 8858 | (idlwave-syslib-p file)) | 8858 | (idlwave-syslib-p file)) |
| 8859 | (setq syslibp t)) | 8859 | (setq syslibp t)) |
| 8860 | 8860 | ||
| 8861 | ;; If there's more than one matching entry for the same file, just | 8861 | ;; If there's more than one matching entry for the same file, just |
| 8862 | ;; append the type-cons to the type list. | 8862 | ;; append the type-cons to the type list. |
| 8863 | (if (setq entry (assoc key alist)) | 8863 | (if (setq entry (assoc key alist)) |
| 8864 | (push type-cons (nth 2 entry)) | 8864 | (push type-cons (nth 2 entry)) |
| 8865 | (push (list key file (list type-cons)) alist))) | 8865 | (push (list key file (list type-cons)) alist))) |
| 8866 | 8866 | ||
| 8867 | (setq alist (nreverse alist)) | 8867 | (setq alist (nreverse alist)) |
| 8868 | 8868 | ||
| 8869 | (when syslibp | 8869 | (when syslibp |
| 8870 | ;; File is in system *library* - remove any 'system entry | 8870 | ;; File is in system *library* - remove any 'system entry |
| 8871 | (setq alist (delq (assq 'system alist) alist))) | 8871 | (setq alist (delq (assq 'system alist) alist))) |
| 8872 | 8872 | ||
| 8873 | ;; If 'system remains and we've scanned the syslib, it's a builtin | 8873 | ;; If 'system remains and we've scanned the syslib, it's a builtin |
| 8874 | ;; (rather than a !DIR/lib/.pro file bundled as source). | 8874 | ;; (rather than a !DIR/lib/.pro file bundled as source). |
| 8875 | (when (and (idlwave-syslib-scanned-p) | 8875 | (when (and (idlwave-syslib-scanned-p) |
| @@ -8905,7 +8905,7 @@ compares twins on the basis of their file names and path locations." | |||
| 8905 | ((not (eq type (nth 1 b))) | 8905 | ((not (eq type (nth 1 b))) |
| 8906 | ;; Type decides | 8906 | ;; Type decides |
| 8907 | (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0))) | 8907 | (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0))) |
| 8908 | (t | 8908 | (t |
| 8909 | ;; A and B are twins - so the decision is more complicated. | 8909 | ;; A and B are twins - so the decision is more complicated. |
| 8910 | ;; Call twin-compare with the proper arguments. | 8910 | ;; Call twin-compare with the proper arguments. |
| 8911 | (idlwave-routine-entry-compare-twins a b))))) | 8911 | (idlwave-routine-entry-compare-twins a b))))) |
| @@ -8957,7 +8957,7 @@ This expects NAME TYPE CLASS to be bound to the right values." | |||
| 8957 | (tpath-alist (idlwave-true-path-alist)) | 8957 | (tpath-alist (idlwave-true-path-alist)) |
| 8958 | (apathp (and (stringp akey) | 8958 | (apathp (and (stringp akey) |
| 8959 | (assoc (file-name-directory akey) tpath-alist))) | 8959 | (assoc (file-name-directory akey) tpath-alist))) |
| 8960 | (bpathp (and (stringp bkey) | 8960 | (bpathp (and (stringp bkey) |
| 8961 | (assoc (file-name-directory bkey) tpath-alist))) | 8961 | (assoc (file-name-directory bkey) tpath-alist))) |
| 8962 | ;; How early on search path? High number means early since we | 8962 | ;; How early on search path? High number means early since we |
| 8963 | ;; measure the tail of the path list | 8963 | ;; measure the tail of the path list |
| @@ -8993,7 +8993,7 @@ This expects NAME TYPE CLASS to be bound to the right values." | |||
| 8993 | (t nil)))) ; Default | 8993 | (t nil)))) ; Default |
| 8994 | 8994 | ||
| 8995 | (defun idlwave-routine-source-file (source) | 8995 | (defun idlwave-routine-source-file (source) |
| 8996 | (if (nth 2 source) | 8996 | (if (nth 2 source) |
| 8997 | (expand-file-name (nth 1 source) (nth 2 source)) | 8997 | (expand-file-name (nth 1 source) (nth 2 source)) |
| 8998 | (nth 1 source))) | 8998 | (nth 1 source))) |
| 8999 | 8999 | ||
| @@ -9083,7 +9083,7 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9083 | (forward-sexp 2) | 9083 | (forward-sexp 2) |
| 9084 | (forward-sexp -1) | 9084 | (forward-sexp -1) |
| 9085 | (let ((begin (point))) | 9085 | (let ((begin (point))) |
| 9086 | (re-search-forward | 9086 | (re-search-forward |
| 9087 | "[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?") | 9087 | "[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?") |
| 9088 | (if (fboundp 'buffer-substring-no-properties) | 9088 | (if (fboundp 'buffer-substring-no-properties) |
| 9089 | (buffer-substring-no-properties begin (point)) | 9089 | (buffer-substring-no-properties begin (point)) |
| @@ -9123,7 +9123,7 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9123 | (start-process "idldeclient" nil | 9123 | (start-process "idldeclient" nil |
| 9124 | idlwave-shell-explicit-file-name "-c" "-e" | 9124 | idlwave-shell-explicit-file-name "-c" "-e" |
| 9125 | (buffer-file-name))) | 9125 | (buffer-file-name))) |
| 9126 | 9126 | ||
| 9127 | (defvar idlwave-help-use-assistant) | 9127 | (defvar idlwave-help-use-assistant) |
| 9128 | (defun idlwave-launch-idlhelp () | 9128 | (defun idlwave-launch-idlhelp () |
| 9129 | "Start the IDLhelp application." | 9129 | "Start the IDLhelp application." |
| @@ -9131,7 +9131,7 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9131 | (if idlwave-help-use-assistant | 9131 | (if idlwave-help-use-assistant |
| 9132 | (idlwave-help-assistant-raise) | 9132 | (idlwave-help-assistant-raise) |
| 9133 | (start-process "idlhelp" nil idlwave-help-application))) | 9133 | (start-process "idlhelp" nil idlwave-help-application))) |
| 9134 | 9134 | ||
| 9135 | ;; Menus - using easymenu.el | 9135 | ;; Menus - using easymenu.el |
| 9136 | (defvar idlwave-mode-menu-def | 9136 | (defvar idlwave-mode-menu-def |
| 9137 | `("IDLWAVE" | 9137 | `("IDLWAVE" |
| @@ -9150,7 +9150,7 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9150 | ["Block" idlwave-mark-block t] | 9150 | ["Block" idlwave-mark-block t] |
| 9151 | ["Header" idlwave-mark-doclib t]) | 9151 | ["Header" idlwave-mark-doclib t]) |
| 9152 | ("Format" | 9152 | ("Format" |
| 9153 | ["Indent Entire Statement" idlwave-indent-statement | 9153 | ["Indent Entire Statement" idlwave-indent-statement |
| 9154 | :active t :keys "C-u \\[indent-for-tab-command]" ] | 9154 | :active t :keys "C-u \\[indent-for-tab-command]" ] |
| 9155 | ["Indent Subprogram" idlwave-indent-subprogram t] | 9155 | ["Indent Subprogram" idlwave-indent-subprogram t] |
| 9156 | ["(Un)Comment Region" idlwave-toggle-comment-region t] | 9156 | ["(Un)Comment Region" idlwave-toggle-comment-region t] |
| @@ -9220,7 +9220,7 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9220 | ("Customize" | 9220 | ("Customize" |
| 9221 | ["Browse IDLWAVE Group" idlwave-customize t] | 9221 | ["Browse IDLWAVE Group" idlwave-customize t] |
| 9222 | "--" | 9222 | "--" |
| 9223 | ["Build Full Customize Menu" idlwave-create-customize-menu | 9223 | ["Build Full Customize Menu" idlwave-create-customize-menu |
| 9224 | (fboundp 'customize-menu-create)]) | 9224 | (fboundp 'customize-menu-create)]) |
| 9225 | ("Documentation" | 9225 | ("Documentation" |
| 9226 | ["Describe Mode" describe-mode t] | 9226 | ["Describe Mode" describe-mode t] |
| @@ -9237,22 +9237,22 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9237 | '("Debug" | 9237 | '("Debug" |
| 9238 | ["Start IDL shell" idlwave-shell t] | 9238 | ["Start IDL shell" idlwave-shell t] |
| 9239 | ["Save and .RUN buffer" idlwave-shell-save-and-run | 9239 | ["Save and .RUN buffer" idlwave-shell-save-and-run |
| 9240 | (and (boundp 'idlwave-shell-automatic-start) | 9240 | (and (boundp 'idlwave-shell-automatic-start) |
| 9241 | idlwave-shell-automatic-start)])) | 9241 | idlwave-shell-automatic-start)])) |
| 9242 | 9242 | ||
| 9243 | (if (or (featurep 'easymenu) (load "easymenu" t)) | 9243 | (if (or (featurep 'easymenu) (load "easymenu" t)) |
| 9244 | (progn | 9244 | (progn |
| 9245 | (easy-menu-define idlwave-mode-menu idlwave-mode-map | 9245 | (easy-menu-define idlwave-mode-menu idlwave-mode-map |
| 9246 | "IDL and WAVE CL editing menu" | 9246 | "IDL and WAVE CL editing menu" |
| 9247 | idlwave-mode-menu-def) | 9247 | idlwave-mode-menu-def) |
| 9248 | (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map | 9248 | (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map |
| 9249 | "IDL and WAVE CL editing menu" | 9249 | "IDL and WAVE CL editing menu" |
| 9250 | idlwave-mode-debug-menu-def))) | 9250 | idlwave-mode-debug-menu-def))) |
| 9251 | 9251 | ||
| 9252 | (defun idlwave-customize () | 9252 | (defun idlwave-customize () |
| 9253 | "Call the customize function with idlwave as argument." | 9253 | "Call the customize function with idlwave as argument." |
| 9254 | (interactive) | 9254 | (interactive) |
| 9255 | ;; Try to load the code for the shell, so that we can customize it | 9255 | ;; Try to load the code for the shell, so that we can customize it |
| 9256 | ;; as well. | 9256 | ;; as well. |
| 9257 | (or (featurep 'idlw-shell) | 9257 | (or (featurep 'idlw-shell) |
| 9258 | (load "idlw-shell" t)) | 9258 | (load "idlw-shell" t)) |
| @@ -9263,11 +9263,11 @@ Assumes that point is at the beginning of the unit as found by | |||
| 9263 | (interactive) | 9263 | (interactive) |
| 9264 | (if (fboundp 'customize-menu-create) | 9264 | (if (fboundp 'customize-menu-create) |
| 9265 | (progn | 9265 | (progn |
| 9266 | ;; Try to load the code for the shell, so that we can customize it | 9266 | ;; Try to load the code for the shell, so that we can customize it |
| 9267 | ;; as well. | 9267 | ;; as well. |
| 9268 | (or (featurep 'idlw-shell) | 9268 | (or (featurep 'idlw-shell) |
| 9269 | (load "idlw-shell" t)) | 9269 | (load "idlw-shell" t)) |
| 9270 | (easy-menu-change | 9270 | (easy-menu-change |
| 9271 | '("IDLWAVE") "Customize" | 9271 | '("IDLWAVE") "Customize" |
| 9272 | `(["Browse IDLWAVE group" idlwave-customize t] | 9272 | `(["Browse IDLWAVE group" idlwave-customize t] |
| 9273 | "--" | 9273 | "--" |
| @@ -9315,7 +9315,7 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." | |||
| 9315 | (let ((table (symbol-value 'idlwave-mode-abbrev-table)) | 9315 | (let ((table (symbol-value 'idlwave-mode-abbrev-table)) |
| 9316 | abbrevs | 9316 | abbrevs |
| 9317 | str rpl func fmt (len-str 0) (len-rpl 0)) | 9317 | str rpl func fmt (len-str 0) (len-rpl 0)) |
| 9318 | (mapatoms | 9318 | (mapatoms |
| 9319 | (lambda (sym) | 9319 | (lambda (sym) |
| 9320 | (if (symbol-value sym) | 9320 | (if (symbol-value sym) |
| 9321 | (progn | 9321 | (progn |
| @@ -9341,7 +9341,7 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." | |||
| 9341 | (with-output-to-temp-buffer "*Help*" | 9341 | (with-output-to-temp-buffer "*Help*" |
| 9342 | (if arg | 9342 | (if arg |
| 9343 | (progn | 9343 | (progn |
| 9344 | (princ "Abbreviations and Actions in IDLWAVE-Mode\n") | 9344 | (princ "Abbreviations and Actions in IDLWAVE-Mode\n") |
| 9345 | (princ "=========================================\n\n") | 9345 | (princ "=========================================\n\n") |
| 9346 | (princ (format fmt "KEY" "REPLACE" "HOOK")) | 9346 | (princ (format fmt "KEY" "REPLACE" "HOOK")) |
| 9347 | (princ (format fmt "---" "-------" "----"))) | 9347 | (princ (format fmt "---" "-------" "----"))) |
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 109455e9e61..c7341a9f871 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el | |||
| @@ -836,8 +836,8 @@ Makefile mode can be configured by modifying the following variables: | |||
| 836 | nil nil | 836 | nil nil |
| 837 | ((?$ . ".")) | 837 | ((?$ . ".")) |
| 838 | backward-paragraph | 838 | backward-paragraph |
| 839 | (font-lock-syntactic-keywords . makefile-font-lock-syntactic-keywords) | 839 | (font-lock-syntactic-keywords |
| 840 | (font-lock-support-mode))) ; JIT breaks on long series of continuation lines. | 840 | . makefile-font-lock-syntactic-keywords))) |
| 841 | 841 | ||
| 842 | ;; Add-log. | 842 | ;; Add-log. |
| 843 | (make-local-variable 'add-log-current-defun-function) | 843 | (make-local-variable 'add-log-current-defun-function) |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 14b47475eb1..c29a259c3a6 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -41,27 +41,27 @@ | |||
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | (defcustom prolog-program-name | 43 | (defcustom prolog-program-name |
| 44 | (let ((names '("prolog" "gprolog"))) | 44 | (let ((names '("prolog" "gprolog" "swipl"))) |
| 45 | (while (and names | 45 | (while (and names |
| 46 | (not (executable-find (car names)))) | 46 | (not (executable-find (car names)))) |
| 47 | (setq names (cdr names))) | 47 | (setq names (cdr names))) |
| 48 | (or (car names) "prolog")) | 48 | (or (car names) "prolog")) |
| 49 | "*Program name for invoking an inferior Prolog with `run-prolog'." | 49 | "Program name for invoking an inferior Prolog with `run-prolog'." |
| 50 | :type 'string | 50 | :type 'string |
| 51 | :group 'prolog) | 51 | :group 'prolog) |
| 52 | 52 | ||
| 53 | (defcustom prolog-consult-string "reconsult(user).\n" | 53 | (defcustom prolog-consult-string "reconsult(user).\n" |
| 54 | "*(Re)Consult mode (for C-Prolog and Quintus Prolog). " | 54 | "(Re)Consult mode (for C-Prolog and Quintus Prolog). " |
| 55 | :type 'string | 55 | :type 'string |
| 56 | :group 'prolog) | 56 | :group 'prolog) |
| 57 | 57 | ||
| 58 | (defcustom prolog-compile-string "compile(user).\n" | 58 | (defcustom prolog-compile-string "compile(user).\n" |
| 59 | "*Compile mode (for Quintus Prolog)." | 59 | "Compile mode (for Quintus Prolog)." |
| 60 | :type 'string | 60 | :type 'string |
| 61 | :group 'prolog) | 61 | :group 'prolog) |
| 62 | 62 | ||
| 63 | (defcustom prolog-eof-string "end_of_file.\n" | 63 | (defcustom prolog-eof-string "end_of_file.\n" |
| 64 | "*String that represents end of file for Prolog. | 64 | "String that represents end of file for Prolog. |
| 65 | When nil, send actual operating system end of file." | 65 | When nil, send actual operating system end of file." |
| 66 | :type 'string | 66 | :type 'string |
| 67 | :group 'prolog) | 67 | :group 'prolog) |
| @@ -121,7 +121,21 @@ When nil, send actual operating system end of file." | |||
| 121 | (defvar prolog-mode-map | 121 | (defvar prolog-mode-map |
| 122 | (let ((map (make-sparse-keymap))) | 122 | (let ((map (make-sparse-keymap))) |
| 123 | (define-key map "\e\C-x" 'prolog-consult-region) | 123 | (define-key map "\e\C-x" 'prolog-consult-region) |
| 124 | (define-key map "\C-c\C-l" 'inferior-prolog-load-file) | ||
| 125 | (define-key map "\C-c\C-z" 'switch-to-prolog) | ||
| 124 | map)) | 126 | map)) |
| 127 | |||
| 128 | (easy-menu-define prolog-mode-menu prolog-mode-map "Menu for Prolog mode." | ||
| 129 | ;; Mostly copied from scheme-mode's menu. | ||
| 130 | ;; Not tremendously useful, but it's a start. | ||
| 131 | '("Prolog" | ||
| 132 | ["Indent line" indent-according-to-mode t] | ||
| 133 | ["Indent region" indent-region t] | ||
| 134 | ["Comment region" comment-region t] | ||
| 135 | ["Uncomment region" uncomment-region t] | ||
| 136 | "--" | ||
| 137 | ["Run interactive Prolog session" run-prolog t] | ||
| 138 | )) | ||
| 125 | 139 | ||
| 126 | ;;;###autoload | 140 | ;;;###autoload |
| 127 | (defun prolog-mode () | 141 | (defun prolog-mode () |
| @@ -138,29 +152,24 @@ if that value is non-nil." | |||
| 138 | (setq major-mode 'prolog-mode) | 152 | (setq major-mode 'prolog-mode) |
| 139 | (setq mode-name "Prolog") | 153 | (setq mode-name "Prolog") |
| 140 | (prolog-mode-variables) | 154 | (prolog-mode-variables) |
| 155 | (set (make-local-variable 'comment-add) 1) | ||
| 141 | ;; font lock | 156 | ;; font lock |
| 142 | (setq font-lock-defaults '(prolog-font-lock-keywords | 157 | (setq font-lock-defaults '(prolog-font-lock-keywords |
| 143 | nil nil nil | 158 | nil nil nil |
| 144 | beginning-of-line)) | 159 | beginning-of-line)) |
| 145 | (run-mode-hooks 'prolog-mode-hook)) | 160 | (run-mode-hooks 'prolog-mode-hook)) |
| 146 | 161 | ||
| 147 | (defun prolog-indent-line (&optional whole-exp) | 162 | (defun prolog-indent-line () |
| 148 | "Indent current line as Prolog code. | 163 | "Indent current line as Prolog code. |
| 149 | With argument, indent any additional lines of the same clause | 164 | With argument, indent any additional lines of the same clause |
| 150 | rigidly along with this one (not yet)." | 165 | rigidly along with this one (not yet)." |
| 151 | (interactive "p") | 166 | (interactive "p") |
| 152 | (let ((indent (prolog-indent-level)) | 167 | (let ((indent (prolog-indent-level)) |
| 153 | (pos (- (point-max) (point))) beg) | 168 | (pos (- (point-max) (point)))) |
| 154 | (beginning-of-line) | 169 | (beginning-of-line) |
| 155 | (setq beg (point)) | 170 | (indent-line-to indent) |
| 156 | (skip-chars-forward " \t") | ||
| 157 | (if (zerop (- indent (current-column))) | ||
| 158 | nil | ||
| 159 | (delete-region beg (point)) | ||
| 160 | (indent-to indent)) | ||
| 161 | (if (> (- (point-max) pos) (point)) | 171 | (if (> (- (point-max) pos) (point)) |
| 162 | (goto-char (- (point-max) pos))) | 172 | (goto-char (- (point-max) pos))))) |
| 163 | )) | ||
| 164 | 173 | ||
| 165 | (defun prolog-indent-level () | 174 | (defun prolog-indent-level () |
| 166 | "Compute Prolog indentation level." | 175 | "Compute Prolog indentation level." |
| @@ -224,6 +233,8 @@ rigidly along with this one (not yet)." | |||
| 224 | (let ((map (make-sparse-keymap))) | 233 | (let ((map (make-sparse-keymap))) |
| 225 | ;; This map will inherit from `comint-mode-map' when entering | 234 | ;; This map will inherit from `comint-mode-map' when entering |
| 226 | ;; inferior-prolog-mode. | 235 | ;; inferior-prolog-mode. |
| 236 | (define-key map [remap self-insert-command] | ||
| 237 | 'inferior-prolog-self-insert-command) | ||
| 227 | map)) | 238 | map)) |
| 228 | 239 | ||
| 229 | (defvar inferior-prolog-mode-syntax-table prolog-mode-syntax-table) | 240 | (defvar inferior-prolog-mode-syntax-table prolog-mode-syntax-table) |
| @@ -256,36 +267,129 @@ Return not at end copies rest of line to end and sends it. | |||
| 256 | (setq comint-prompt-regexp "^| [ ?][- ] *") | 267 | (setq comint-prompt-regexp "^| [ ?][- ] *") |
| 257 | (prolog-mode-variables)) | 268 | (prolog-mode-variables)) |
| 258 | 269 | ||
| 270 | (defvar inferior-prolog-buffer nil) | ||
| 271 | |||
| 272 | (defun inferior-prolog-run (&optional name) | ||
| 273 | (with-current-buffer (make-comint "prolog" (or name prolog-program-name)) | ||
| 274 | (inferior-prolog-mode) | ||
| 275 | (setq-default inferior-prolog-buffer (current-buffer)) | ||
| 276 | (make-local-variable 'inferior-prolog-buffer) | ||
| 277 | (when (and name (not (equal name prolog-program-name))) | ||
| 278 | (set (make-local-variable 'prolog-program-name) name)) | ||
| 279 | (set (make-local-variable 'inferior-prolog-flavor) | ||
| 280 | ;; Force re-detection. | ||
| 281 | (let* ((proc (get-buffer-process (current-buffer))) | ||
| 282 | (pmark (and proc (marker-position (process-mark proc))))) | ||
| 283 | (cond | ||
| 284 | ((null pmark) (1- (point-min))) | ||
| 285 | ;; The use of insert-before-markers in comint.el together with | ||
| 286 | ;; the potential use of comint-truncate-buffer in the output | ||
| 287 | ;; filter, means that it's difficult to reliably keep track of | ||
| 288 | ;; the buffer position where the process's output started. | ||
| 289 | ;; If possible we use a marker at "start - 1", so that | ||
| 290 | ;; insert-before-marker at `start' won't shift it. And if not, | ||
| 291 | ;; we fall back on using a plain integer. | ||
| 292 | ((> pmark (point-min)) (copy-marker (1- pmark))) | ||
| 293 | (t (1- pmark))))) | ||
| 294 | (add-hook 'comint-output-filter-functions | ||
| 295 | 'inferior-prolog-guess-flavor nil t))) | ||
| 296 | |||
| 297 | (defun inferior-prolog-process (&optional dontstart) | ||
| 298 | (or (and (buffer-live-p inferior-prolog-buffer) | ||
| 299 | (get-buffer-process inferior-prolog-buffer)) | ||
| 300 | (unless dontstart | ||
| 301 | (inferior-prolog-run) | ||
| 302 | ;; Try again. | ||
| 303 | (inferior-prolog-process)))) | ||
| 304 | |||
| 305 | (defvar inferior-prolog-flavor 'unknown | ||
| 306 | "Either a symbol or a buffer position offset by one. | ||
| 307 | If a buffer position, the flavor has not been determined yet and | ||
| 308 | it is expected that the process's output has been or will | ||
| 309 | be inserted at that position plus one.") | ||
| 310 | |||
| 311 | (defun inferior-prolog-guess-flavor (&optional ignored) | ||
| 312 | (save-excursion | ||
| 313 | (goto-char (1+ inferior-prolog-flavor)) | ||
| 314 | (setq inferior-prolog-flavor | ||
| 315 | (cond | ||
| 316 | ((looking-at "GNU Prolog") 'gnu) | ||
| 317 | ((looking-at "Welcome to SWI-Prolog") 'swi) | ||
| 318 | ((looking-at ".*\n") 'unknown) ;There's at least one line. | ||
| 319 | (t inferior-prolog-flavor)))) | ||
| 320 | (when (symbolp inferior-prolog-flavor) | ||
| 321 | (remove-hook 'comint-output-filter-functions | ||
| 322 | 'inferior-prolog-guess-flavor t) | ||
| 323 | (if (eq inferior-prolog-flavor 'gnu) | ||
| 324 | (set (make-local-variable 'comint-process-echoes) t)))) | ||
| 325 | |||
| 259 | ;;;###autoload | 326 | ;;;###autoload |
| 260 | (defun run-prolog () | 327 | (defalias 'run-prolog 'switch-to-prolog) |
| 261 | "Run an inferior Prolog process, input and output via buffer *prolog*." | 328 | ;;;###autoload |
| 329 | (defun switch-to-prolog (&optional name) | ||
| 330 | "Run an inferior Prolog process, input and output via buffer *prolog*. | ||
| 331 | With prefix argument \\[universal-prefix], prompt for the program to use." | ||
| 332 | (interactive | ||
| 333 | (list (when current-prefix-arg | ||
| 334 | (let ((proc (inferior-prolog-process 'dontstart))) | ||
| 335 | (if proc | ||
| 336 | (if (yes-or-no-p "Kill current process before starting new one? ") | ||
| 337 | (kill-process proc) | ||
| 338 | (error "Abort"))) | ||
| 339 | (read-string "Run Prolog: " prolog-program-name))))) | ||
| 340 | (unless (inferior-prolog-process 'dontstart) | ||
| 341 | (inferior-prolog-run name)) | ||
| 342 | (pop-to-buffer inferior-prolog-buffer)) | ||
| 343 | |||
| 344 | (defun inferior-prolog-self-insert-command () | ||
| 345 | "Insert the char in the buffer or pass it directly to the process." | ||
| 262 | (interactive) | 346 | (interactive) |
| 263 | (require 'comint) | 347 | (let* ((proc (get-buffer-process (current-buffer))) |
| 264 | (pop-to-buffer (make-comint "prolog" prolog-program-name)) | 348 | (pmark (and proc (marker-position (process-mark proc))))) |
| 265 | (inferior-prolog-mode)) | 349 | (if (and (eq inferior-prolog-flavor 'gnu) |
| 350 | pmark | ||
| 351 | (null current-prefix-arg) | ||
| 352 | (eobp) | ||
| 353 | (eq (point) pmark) | ||
| 354 | (save-excursion | ||
| 355 | (goto-char (- pmark 3)) | ||
| 356 | (looking-at " \\? "))) | ||
| 357 | (comint-send-string proc (string last-command-char)) | ||
| 358 | (call-interactively 'self-insert-command)))) | ||
| 266 | 359 | ||
| 267 | (defun prolog-consult-region (compile beg end) | 360 | (defun prolog-consult-region (compile beg end) |
| 268 | "Send the region to the Prolog process made by \"M-x run-prolog\". | 361 | "Send the region to the Prolog process made by \"M-x run-prolog\". |
| 269 | If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." | 362 | If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." |
| 270 | (interactive "P\nr") | 363 | (interactive "P\nr") |
| 271 | (save-excursion | 364 | (let ((proc (inferior-prolog-process))) |
| 272 | (if compile | 365 | (comint-send-string proc |
| 273 | (process-send-string "prolog" prolog-compile-string) | 366 | (if compile prolog-compile-string |
| 274 | (process-send-string "prolog" prolog-consult-string)) | 367 | prolog-consult-string)) |
| 275 | (process-send-region "prolog" beg end) | 368 | (comint-send-region proc beg end) |
| 276 | (process-send-string "prolog" "\n") ;May be unnecessary | 369 | (comint-send-string proc "\n") ;May be unnecessary |
| 277 | (if prolog-eof-string | 370 | (if prolog-eof-string |
| 278 | (process-send-string "prolog" prolog-eof-string) | 371 | (comint-send-string proc prolog-eof-string) |
| 279 | (process-send-eof "prolog")))) ;Send eof to prolog process. | 372 | (with-current-buffer (process-buffer proc) |
| 373 | (comint-send-eof))))) ;Send eof to prolog process. | ||
| 280 | 374 | ||
| 281 | (defun prolog-consult-region-and-go (compile beg end) | 375 | (defun prolog-consult-region-and-go (compile beg end) |
| 282 | "Send the region to the inferior Prolog, and switch to *prolog* buffer. | 376 | "Send the region to the inferior Prolog, and switch to *prolog* buffer. |
| 283 | If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." | 377 | If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." |
| 284 | (interactive "P\nr") | 378 | (interactive "P\nr") |
| 285 | (prolog-consult-region compile beg end) | 379 | (prolog-consult-region compile beg end) |
| 286 | (switch-to-buffer "*prolog*")) | 380 | (pop-to-buffer inferior-prolog-buffer)) |
| 381 | |||
| 382 | (defun inferior-prolog-load-file () | ||
| 383 | "Pass the current buffer's file to the inferior prolog process." | ||
| 384 | (interactive) | ||
| 385 | (save-buffer) | ||
| 386 | (let ((file buffer-file-name) | ||
| 387 | (proc (inferior-prolog-process))) | ||
| 388 | (with-current-buffer (process-buffer proc) | ||
| 389 | (comint-send-string proc (concat "['" (file-relative-name file) "'].\n")) | ||
| 390 | (pop-to-buffer (current-buffer))))) | ||
| 287 | 391 | ||
| 288 | (provide 'prolog) | 392 | (provide 'prolog) |
| 289 | 393 | ||
| 290 | ;;; arch-tag: f3ec6748-1272-4ab6-8826-c50cb1607636 | 394 | ;; arch-tag: f3ec6748-1272-4ab6-8826-c50cb1607636 |
| 291 | ;;; prolog.el ends here | 395 | ;;; prolog.el ends here |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c38a6e82f83..0387c05134e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -67,7 +67,8 @@ | |||
| 67 | (eval-when-compile | 67 | (eval-when-compile |
| 68 | (require 'cl) | 68 | (require 'cl) |
| 69 | (require 'compile) | 69 | (require 'compile) |
| 70 | (require 'comint)) | 70 | (require 'comint) |
| 71 | (require 'hippie-exp)) | ||
| 71 | 72 | ||
| 72 | (autoload 'comint-mode "comint") | 73 | (autoload 'comint-mode "comint") |
| 73 | 74 | ||
| @@ -95,7 +96,9 @@ | |||
| 95 | "import" "in" "is" "lambda" "not" "or" "pass" "print" | 96 | "import" "in" "is" "lambda" "not" "or" "pass" "print" |
| 96 | "raise" "return" "try" "while" "yield" | 97 | "raise" "return" "try" "while" "yield" |
| 97 | ;; Future keywords | 98 | ;; Future keywords |
| 98 | "as" "None") | 99 | "as" "None" |
| 100 | ;; Not real keywords, but close enough to be fontified as such | ||
| 101 | "self" "True" "False") | ||
| 99 | symbol-end) | 102 | symbol-end) |
| 100 | ;; Definitions | 103 | ;; Definitions |
| 101 | (,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_)))) | 104 | (,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_)))) |
| @@ -1286,7 +1289,7 @@ Don't save anything for STR matching `inferior-python-filter-regexp'." | |||
| 1286 | ;; Maybe we could be more selective here. | 1289 | ;; Maybe we could be more selective here. |
| 1287 | (if (zerop (length res)) | 1290 | (if (zerop (length res)) |
| 1288 | (not (bolp)) | 1291 | (not (bolp)) |
| 1289 | (string-match res ".\\'")))) | 1292 | (string-match ".\\'" res)))) |
| 1290 | ;; The need for this seems to be system-dependent: | 1293 | ;; The need for this seems to be system-dependent: |
| 1291 | ;; What is this all about, exactly? --Stef | 1294 | ;; What is this all about, exactly? --Stef |
| 1292 | ;; (if (and (eq ?. (aref s 0))) | 1295 | ;; (if (and (eq ?. (aref s 0))) |
| @@ -1330,30 +1333,30 @@ buffer for a list of commands.)" | |||
| 1330 | ;; (not a name) in Python buffers from which `run-python' &c is | 1333 | ;; (not a name) in Python buffers from which `run-python' &c is |
| 1331 | ;; invoked. Would support multiple processes better. | 1334 | ;; invoked. Would support multiple processes better. |
| 1332 | (when (or new (not (comint-check-proc python-buffer))) | 1335 | (when (or new (not (comint-check-proc python-buffer))) |
| 1333 | (save-current-buffer | 1336 | (with-current-buffer |
| 1334 | (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) | 1337 | (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) |
| 1335 | (path (getenv "PYTHONPATH")) | 1338 | (path (getenv "PYTHONPATH")) |
| 1336 | (process-environment ; to import emacs.py | 1339 | (process-environment ; to import emacs.py |
| 1337 | (cons (concat "PYTHONPATH=" data-directory | 1340 | (cons (concat "PYTHONPATH=" data-directory |
| 1338 | (if path (concat ":" path))) | 1341 | (if path (concat ":" path))) |
| 1339 | process-environment))) | 1342 | process-environment))) |
| 1340 | (set-buffer (apply 'make-comint-in-buffer "Python" | 1343 | (apply 'make-comint-in-buffer "Python" |
| 1341 | (generate-new-buffer "*Python*") | 1344 | (if new (generate-new-buffer "*Python*") "*Python*") |
| 1342 | (car cmdlist) nil (cdr cmdlist))) | 1345 | (car cmdlist) nil (cdr cmdlist))) |
| 1343 | (setq-default python-buffer (current-buffer)) | 1346 | (setq-default python-buffer (current-buffer)) |
| 1344 | (setq python-buffer (current-buffer))) | 1347 | (setq python-buffer (current-buffer)) |
| 1345 | (accept-process-output (get-buffer-process python-buffer) 5) | 1348 | (accept-process-output (get-buffer-process python-buffer) 5) |
| 1346 | (inferior-python-mode))) | 1349 | (inferior-python-mode) |
| 1350 | ;; Load function definitions we need. | ||
| 1351 | ;; Before the preoutput function was used, this was done via -c in | ||
| 1352 | ;; cmdlist, but that loses the banner and doesn't run the startup | ||
| 1353 | ;; file. The code might be inline here, but there's enough that it | ||
| 1354 | ;; seems worth putting in a separate file, and it's probably cleaner | ||
| 1355 | ;; to put it in a module. | ||
| 1356 | ;; Ensure we're at a prompt before doing anything else. | ||
| 1357 | (python-send-receive "import emacs; print '_emacs_out ()'"))) | ||
| 1347 | (if (derived-mode-p 'python-mode) | 1358 | (if (derived-mode-p 'python-mode) |
| 1348 | (setq python-buffer (default-value 'python-buffer))) ; buffer-local | 1359 | (setq python-buffer (default-value 'python-buffer))) ; buffer-local |
| 1349 | ;; Load function definitions we need. | ||
| 1350 | ;; Before the preoutput function was used, this was done via -c in | ||
| 1351 | ;; cmdlist, but that loses the banner and doesn't run the startup | ||
| 1352 | ;; file. The code might be inline here, but there's enough that it | ||
| 1353 | ;; seems worth putting in a separate file, and it's probably cleaner | ||
| 1354 | ;; to put it in a module. | ||
| 1355 | ;; Ensure we're at a prompt before doing anything else. | ||
| 1356 | (python-send-receive "import emacs; print '_emacs_out ()'") | ||
| 1357 | ;; Without this, help output goes into the inferior python buffer if | 1360 | ;; Without this, help output goes into the inferior python buffer if |
| 1358 | ;; the process isn't already running. | 1361 | ;; the process isn't already running. |
| 1359 | (sit-for 1 t) ;Should we use accept-process-output instead? --Stef | 1362 | (sit-for 1 t) ;Should we use accept-process-output instead? --Stef |
| @@ -1369,15 +1372,20 @@ buffer for a list of commands.)" | |||
| 1369 | (defun python-send-command (command) | 1372 | (defun python-send-command (command) |
| 1370 | "Like `python-send-string' but resets `compilation-shell-minor-mode'. | 1373 | "Like `python-send-string' but resets `compilation-shell-minor-mode'. |
| 1371 | COMMAND should be a single statement." | 1374 | COMMAND should be a single statement." |
| 1372 | (assert (not (string-match "\n" command))) | 1375 | ;; (assert (not (string-match "\n" command))) |
| 1373 | (let ((end (marker-position (process-mark (python-proc))))) | 1376 | ;; (let ((end (marker-position (process-mark (python-proc))))) |
| 1374 | (with-current-buffer python-buffer (goto-char (point-max))) | 1377 | (with-current-buffer python-buffer (goto-char (point-max))) |
| 1375 | (compilation-forget-errors) | 1378 | (compilation-forget-errors) |
| 1376 | ;; Must wait until this has completed before re-setting variables below. | 1379 | (python-send-string command) |
| 1377 | (python-send-receive (concat command "; print '_emacs_out ()'")) | ||
| 1378 | (with-current-buffer python-buffer | 1380 | (with-current-buffer python-buffer |
| 1379 | (set-marker compilation-parsing-end end) | 1381 | (setq compilation-last-buffer (current-buffer))) |
| 1380 | (setq compilation-last-buffer (current-buffer))))) | 1382 | ;; No idea what this is for but it breaks the call to |
| 1383 | ;; compilation-fake-loc in python-send-region. -- Stef | ||
| 1384 | ;; Must wait until this has completed before re-setting variables below. | ||
| 1385 | ;; (python-send-receive "print '_emacs_out ()'") | ||
| 1386 | ;; (with-current-buffer python-buffer | ||
| 1387 | ;; (set-marker compilation-parsing-end end)) | ||
| 1388 | ) ;;) | ||
| 1381 | 1389 | ||
| 1382 | (defun python-send-region (start end) | 1390 | (defun python-send-region (start end) |
| 1383 | "Send the region to the inferior Python process." | 1391 | "Send the region to the inferior Python process." |
| @@ -1419,11 +1427,13 @@ COMMAND should be a single statement." | |||
| 1419 | "Evaluate STRING in inferior Python process." | 1427 | "Evaluate STRING in inferior Python process." |
| 1420 | (interactive "sPython command: ") | 1428 | (interactive "sPython command: ") |
| 1421 | (comint-send-string (python-proc) string) | 1429 | (comint-send-string (python-proc) string) |
| 1422 | (comint-send-string (python-proc) | 1430 | (unless (string-match "\n\\'" string) |
| 1423 | ;; If the string is single-line or if it ends with \n, | 1431 | ;; Make sure the text is properly LF-terminated. |
| 1424 | ;; only add a single \n, otherwise add 2, so as to | 1432 | (comint-send-string (python-proc) "\n")) |
| 1425 | ;; make sure we terminate the multiline instruction. | 1433 | (when (string-match "\n[ \t].*\n?\\'" string) |
| 1426 | (if (string-match "\n.+\\'" string) "\n\n" "\n"))) | 1434 | ;; If the string contains a final indented line, add a second newline so |
| 1435 | ;; as to make sure we terminate the multiline instruction. | ||
| 1436 | (comint-send-string (python-proc) "\n"))) | ||
| 1427 | 1437 | ||
| 1428 | (defun python-send-buffer () | 1438 | (defun python-send-buffer () |
| 1429 | "Send the current buffer to the inferior Python process." | 1439 | "Send the current buffer to the inferior Python process." |
| @@ -1594,24 +1604,26 @@ Only works when point is in a function name, not its arg list, for | |||
| 1594 | instance. Assumes an inferior Python is running." | 1604 | instance. Assumes an inferior Python is running." |
| 1595 | (let ((symbol (with-syntax-table python-dotty-syntax-table | 1605 | (let ((symbol (with-syntax-table python-dotty-syntax-table |
| 1596 | (current-word)))) | 1606 | (current-word)))) |
| 1597 | ;; First try the symbol we're on. | 1607 | ;; This is run from timers, so inhibit-quit tends to be set. |
| 1598 | (or (and symbol | 1608 | (with-local-quit |
| 1599 | (python-send-receive (format "emacs.eargs(%S, %s)" | 1609 | ;; First try the symbol we're on. |
| 1600 | symbol python-imports))) | 1610 | (or (and symbol |
| 1601 | ;; Try moving to symbol before enclosing parens. | 1611 | (python-send-receive (format "emacs.eargs(%S, %s)" |
| 1602 | (let ((s (syntax-ppss))) | 1612 | symbol python-imports))) |
| 1603 | (unless (zerop (car s)) | 1613 | ;; Try moving to symbol before enclosing parens. |
| 1604 | (when (eq ?\( (char-after (nth 1 s))) | 1614 | (let ((s (syntax-ppss))) |
| 1605 | (save-excursion | 1615 | (unless (zerop (car s)) |
| 1606 | (goto-char (nth 1 s)) | 1616 | (when (eq ?\( (char-after (nth 1 s))) |
| 1607 | (skip-syntax-backward "-") | 1617 | (save-excursion |
| 1608 | (let ((point (point))) | 1618 | (goto-char (nth 1 s)) |
| 1609 | (skip-chars-backward "a-zA-Z._") | 1619 | (skip-syntax-backward "-") |
| 1610 | (if (< (point) point) | 1620 | (let ((point (point))) |
| 1611 | (python-send-receive | 1621 | (skip-chars-backward "a-zA-Z._") |
| 1612 | (format "emacs.eargs(%S, %s)" | 1622 | (if (< (point) point) |
| 1613 | (buffer-substring-no-properties (point) point) | 1623 | (python-send-receive |
| 1614 | python-imports))))))))))) | 1624 | (format "emacs.eargs(%S, %s)" |
| 1625 | (buffer-substring-no-properties (point) point) | ||
| 1626 | python-imports)))))))))))) | ||
| 1615 | 1627 | ||
| 1616 | ;;;; Info-look functionality. | 1628 | ;;;; Info-look functionality. |
| 1617 | 1629 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f828c36917b..83b4bdea759 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -2460,46 +2460,45 @@ we go to the end of the previous line and do not check for continuations." | |||
| 2460 | ;; | 2460 | ;; |
| 2461 | (if (bolp) | 2461 | (if (bolp) |
| 2462 | nil | 2462 | nil |
| 2463 | (let (c min-point | 2463 | (let ((start (point)) |
| 2464 | (start (point))) | 2464 | (min-point (if (sh-this-is-a-continuation) |
| 2465 | (save-restriction | 2465 | (sh-prev-line nil) |
| 2466 | (narrow-to-region | 2466 | (line-beginning-position)))) |
| 2467 | (if (sh-this-is-a-continuation) | 2467 | (skip-chars-backward " \t;" min-point) |
| 2468 | (setq min-point (sh-prev-line nil)) | 2468 | (if (looking-at "\\s-*;;") |
| 2469 | (save-excursion | 2469 | ;; (message "Found ;; !") |
| 2470 | (beginning-of-line) | 2470 | ";;" |
| 2471 | (setq min-point (point)))) | 2471 | (skip-chars-backward "^)}];\"'`({[" min-point) |
| 2472 | (point)) | 2472 | (let ((c (if (> (point) min-point) (char-before)))) |
| 2473 | (skip-chars-backward " \t;") | 2473 | (sh-debug "stopping at %d c is %s start=%d min-point=%d" |
| 2474 | (unless (looking-at "\\s-*;;") | 2474 | (point) c start min-point) |
| 2475 | (skip-chars-backward "^)}];\"'`({[") | 2475 | (if (not (memq c '(?\n nil ?\;))) |
| 2476 | (setq c (char-before)))) | 2476 | ;; c -- return a string |
| 2477 | (sh-debug "stopping at %d c is %s start=%d min-point=%d" | 2477 | (char-to-string c) |
| 2478 | (point) c start min-point) | 2478 | ;; Return the leading keyword of the "command" we supposedly |
| 2479 | (if (< (point) min-point) | 2479 | ;; skipped over. Maybe we skipped too far (e.g. past a `do' or |
| 2480 | (error "point %d < min-point %d" (point) min-point)) | 2480 | ;; `then' that precedes the actual command), so check whether |
| 2481 | (cond | 2481 | ;; we're looking at such a keyword and if so, move back forward. |
| 2482 | ((looking-at "\\s-*;;") | 2482 | (let ((boundary (point)) |
| 2483 | ;; (message "Found ;; !") | 2483 | kwd next) |
| 2484 | ";;") | 2484 | (while |
| 2485 | ((or (eq c ?\n) | 2485 | (progn |
| 2486 | (eq c nil) | 2486 | ;; Skip forward over white space newline and \ at eol. |
| 2487 | (eq c ?\;)) | 2487 | (skip-chars-forward " \t\n\\\\" start) |
| 2488 | (save-excursion | 2488 | (if (>= (point) start) |
| 2489 | ;; skip forward over white space newline and \ at eol | 2489 | (progn |
| 2490 | (skip-chars-forward " \t\n\\\\") | 2490 | (sh-debug "point: %d >= start: %d" (point) start) |
| 2491 | (sh-debug "Now at %d start=%d" (point) start) | 2491 | nil) |
| 2492 | (if (>= (point) start) | 2492 | (if next (setq boundary next)) |
| 2493 | (progn | 2493 | (sh-debug "Now at %d start=%d" (point) start) |
| 2494 | (sh-debug "point: %d >= start: %d" (point) start) | 2494 | (setq kwd (sh-get-word)) |
| 2495 | nil) | 2495 | (if (member kwd (sh-feature sh-leading-keywords)) |
| 2496 | (sh-get-word)) | 2496 | (progn |
| 2497 | )) | 2497 | (setq next (point)) |
| 2498 | (t | 2498 | t) |
| 2499 | ;; c -- return a string | 2499 | nil)))) |
| 2500 | (char-to-string c) | 2500 | (goto-char boundary) |
| 2501 | )) | 2501 | kwd))))))) |
| 2502 | ))) | ||
| 2503 | 2502 | ||
| 2504 | 2503 | ||
| 2505 | (defun sh-this-is-a-continuation () | 2504 | (defun sh-this-is-a-continuation () |
| @@ -2518,7 +2517,7 @@ If AND-MOVE is non-nil then move to end of word." | |||
| 2518 | (goto-char where)) | 2517 | (goto-char where)) |
| 2519 | (prog1 | 2518 | (prog1 |
| 2520 | (buffer-substring (point) | 2519 | (buffer-substring (point) |
| 2521 | (progn (skip-chars-forward "^ \t\n;&")(point))) | 2520 | (progn (skip-chars-forward "^ \t\n;&|()")(point))) |
| 2522 | (unless and-move | 2521 | (unless and-move |
| 2523 | (goto-char start))))) | 2522 | (goto-char start))))) |
| 2524 | 2523 | ||
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 5307e1bf97c..32f2b881890 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | ;; Keywords: wp, print, PostScript | 12 | ;; Keywords: wp, print, PostScript |
| 13 | ;; Time-stamp: <2005/06/27 00:57:22 vinicius> | 13 | ;; Time-stamp: <2005/06/27 00:57:22 vinicius> |
| 14 | ;; Version: 6.6.7 | 14 | ;; Version: 6.6.7 |
| 15 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ | 15 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| 16 | 16 | ||
| 17 | (defconst ps-print-version "6.6.7" | 17 | (defconst ps-print-version "6.6.7" |
| 18 | "ps-print.el, v 6.6.7 <2005/06/27 vinicius> | 18 | "ps-print.el, v 6.6.7 <2005/06/27 vinicius> |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index a2bc18e9de1..cfaf87852d4 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -238,7 +238,7 @@ may have changed\) back to `save-place-alist'." | |||
| 238 | ;; load it if it exists: | 238 | ;; load it if it exists: |
| 239 | (if (file-readable-p file) | 239 | (if (file-readable-p file) |
| 240 | (save-excursion | 240 | (save-excursion |
| 241 | (message "Loading places from %s..." save-place-file) | 241 | (message "Loading places from %s..." file) |
| 242 | ;; don't want to use find-file because we have been | 242 | ;; don't want to use find-file because we have been |
| 243 | ;; adding hooks to it. | 243 | ;; adding hooks to it. |
| 244 | (set-buffer (get-buffer-create " *Saved Places*")) | 244 | (set-buffer (get-buffer-create " *Saved Places*")) |
diff --git a/lisp/select.el b/lisp/select.el index 01d1af6edf1..cbdeaf12fe3 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -223,8 +223,11 @@ Cut buffers are considered obsolete; you should use selections instead." | |||
| 223 | (setq str (encode-coding-string str coding)))) | 223 | (setq str (encode-coding-string str coding)))) |
| 224 | 224 | ||
| 225 | ((eq type 'UTF8_STRING) | 225 | ((eq type 'UTF8_STRING) |
| 226 | (setq str (encode-coding-string str 'utf-8))) | 226 | (let ((charsets (find-charset-string str))) |
| 227 | 227 | (if (or (memq 'eight-bit-control charsets) | |
| 228 | (memq 'eight-bit-graphic charsets)) | ||
| 229 | (setq type 'STRING) | ||
| 230 | (setq str (encode-coding-string str 'utf-8))))) | ||
| 228 | (t | 231 | (t |
| 229 | (error "Unknow selection type: %S" type)) | 232 | (error "Unknow selection type: %S" type)) |
| 230 | ))) | 233 | ))) |
diff --git a/lisp/server.el b/lisp/server.el index c40b36fa752..73d36ca4b18 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -792,7 +792,7 @@ The following commands are accepted by the client: | |||
| 792 | ;; This looks scary because `fancy-splash-screens' | 792 | ;; This looks scary because `fancy-splash-screens' |
| 793 | ;; will call `recursive-edit' from a process filter. | 793 | ;; will call `recursive-edit' from a process filter. |
| 794 | ;; However, that should be safe to do now. | 794 | ;; However, that should be safe to do now. |
| 795 | (display-splash-screen) | 795 | (display-splash-screen t) |
| 796 | ;; `recursive-edit' will throw an error if Emacs is | 796 | ;; `recursive-edit' will throw an error if Emacs is |
| 797 | ;; already doing a recursive edit elsewhere. Catch it | 797 | ;; already doing a recursive edit elsewhere. Catch it |
| 798 | ;; here so that we can finish normally. | 798 | ;; here so that we can finish normally. |
diff --git a/lisp/ses.el b/lisp/ses.el index fc594167187..85f6f8db378 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -237,13 +237,6 @@ Each function is called with ARG=1." | |||
| 237 | ses-initial-file-trailer) | 237 | ses-initial-file-trailer) |
| 238 | "The initial contents of an empty spreadsheet.") | 238 | "The initial contents of an empty spreadsheet.") |
| 239 | 239 | ||
| 240 | (defconst ses-paramlines-plist | ||
| 241 | '(ses--col-widths 2 ses--col-printers 3 ses--default-printer 4 | ||
| 242 | ses--header-row 5 ses--file-format 8 ses--numrows 9 | ||
| 243 | ses--numcols 10) | ||
| 244 | "Offsets from last cell line to various parameter lines in the data area | ||
| 245 | of a spreadsheet.") | ||
| 246 | |||
| 247 | (defconst ses-box-prop '(:box (:line-width 2 :style released-button)) | 240 | (defconst ses-box-prop '(:box (:line-width 2 :style released-button)) |
| 248 | "Display properties to create a raised box for cells in the header line.") | 241 | "Display properties to create a raised box for cells in the header line.") |
| 249 | 242 | ||
| @@ -255,13 +248,19 @@ functions. None of these standard-printer functions is suitable for use as a | |||
| 255 | column printer or a global-default printer because they invoke the column or | 248 | column printer or a global-default printer because they invoke the column or |
| 256 | default printer and then modify its output.") | 249 | default printer and then modify its output.") |
| 257 | 250 | ||
| 251 | |||
| 252 | ;;---------------------------------------------------------------------------- | ||
| 253 | ;; Local variables and constants | ||
| 254 | ;;---------------------------------------------------------------------------- | ||
| 255 | |||
| 258 | (eval-and-compile | 256 | (eval-and-compile |
| 259 | (defconst ses-localvars | 257 | (defconst ses-localvars |
| 260 | '(ses--blank-line ses--cells ses--col-printers ses--col-widths ses--curcell | 258 | '(ses--blank-line ses--cells ses--col-printers ses--col-widths ses--curcell |
| 261 | ses--curcell-overlay ses--default-printer ses--deferred-narrow | 259 | ses--curcell-overlay ses--default-printer ses--deferred-narrow |
| 262 | ses--deferred-recalc ses--deferred-write ses--file-format | 260 | ses--deferred-recalc ses--deferred-write ses--file-format |
| 263 | ses--header-hscroll ses--header-row ses--header-string ses--linewidth | 261 | ses--header-hscroll ses--header-row ses--header-string ses--linewidth |
| 264 | ses--numcols ses--numrows ses--symbolic-formulas | 262 | ses--numcols ses--numrows ses--symbolic-formulas ses--data-marker |
| 263 | ses--params-marker | ||
| 265 | ;;Global variables that we override | 264 | ;;Global variables that we override |
| 266 | mode-line-process next-line-add-newlines transient-mark-mode) | 265 | mode-line-process next-line-add-newlines transient-mark-mode) |
| 267 | "Buffer-local variables used by SES.")) | 266 | "Buffer-local variables used by SES.")) |
| @@ -272,6 +271,13 @@ default printer and then modify its output.") | |||
| 272 | (make-local-variable x) | 271 | (make-local-variable x) |
| 273 | (set x nil))) | 272 | (set x nil))) |
| 274 | 273 | ||
| 274 | (defconst ses-paramlines-plist | ||
| 275 | '(ses--col-widths -5 ses--col-printers -4 ses--default-printer -3 | ||
| 276 | ses--header-row -2 ses--file-format 1 ses--numrows 2 | ||
| 277 | ses--numcols 3) | ||
| 278 | "Offsets from 'Global parameters' line to various parameter lines in the | ||
| 279 | data area of a spreadsheet.") | ||
| 280 | |||
| 275 | 281 | ||
| 276 | ;; | 282 | ;; |
| 277 | ;; "Side-effect variables". They are set in one function, altered in | 283 | ;; "Side-effect variables". They are set in one function, altered in |
| @@ -408,6 +414,7 @@ for safety. This is a macro to prevent propagate-on-load viruses." | |||
| 408 | "Execute BODY repeatedly, with the variables `row' and `col' set to each | 414 | "Execute BODY repeatedly, with the variables `row' and `col' set to each |
| 409 | cell in the range specified by CURCELL. The range is available in the | 415 | cell in the range specified by CURCELL. The range is available in the |
| 410 | variables `minrow', `maxrow', `mincol', and `maxcol'." | 416 | variables `minrow', `maxrow', `mincol', and `maxcol'." |
| 417 | (declare (indent defun) (debug (form body))) | ||
| 411 | (let ((cur (make-symbol "cur")) | 418 | (let ((cur (make-symbol "cur")) |
| 412 | (min (make-symbol "min")) | 419 | (min (make-symbol "min")) |
| 413 | (max (make-symbol "max")) | 420 | (max (make-symbol "max")) |
| @@ -429,9 +436,6 @@ variables `minrow', `maxrow', `mincol', and `maxcol'." | |||
| 429 | (setq col (+ ,c mincol)) | 436 | (setq col (+ ,c mincol)) |
| 430 | ,@body)))))) | 437 | ,@body)))))) |
| 431 | 438 | ||
| 432 | (put 'ses-dorange 'lisp-indent-function 'defun) | ||
| 433 | (def-edebug-spec ses-dorange (form body)) | ||
| 434 | |||
| 435 | ;;Support for coverage testing. | 439 | ;;Support for coverage testing. |
| 436 | (defmacro 1value (form) | 440 | (defmacro 1value (form) |
| 437 | "For code-coverage testing, indicate that FORM is expected to always have | 441 | "For code-coverage testing, indicate that FORM is expected to always have |
| @@ -650,7 +654,7 @@ the old and FORCE is nil." | |||
| 650 | (defun ses-update-cells (list &optional force) | 654 | (defun ses-update-cells (list &optional force) |
| 651 | "Recalculate cells in LIST, checking for dependency loops. Prints | 655 | "Recalculate cells in LIST, checking for dependency loops. Prints |
| 652 | progress messages every second. Dependent cells are not recalculated | 656 | progress messages every second. Dependent cells are not recalculated |
| 653 | if the cell's value is unchanged if FORCE is nil." | 657 | if the cell's value is unchanged and FORCE is nil." |
| 654 | (let ((ses--deferred-recalc list) | 658 | (let ((ses--deferred-recalc list) |
| 655 | (nextlist list) | 659 | (nextlist list) |
| 656 | (pos (point)) | 660 | (pos (point)) |
| @@ -709,7 +713,7 @@ if the cell's value is unchanged if FORCE is nil." | |||
| 709 | 713 | ||
| 710 | (defun ses-in-print-area () | 714 | (defun ses-in-print-area () |
| 711 | "Returns t if point is in print area of spreadsheet." | 715 | "Returns t if point is in print area of spreadsheet." |
| 712 | (eq (get-text-property (point) 'keymap) 'ses-mode-print-map)) | 716 | (<= (point) ses--data-marker)) |
| 713 | 717 | ||
| 714 | ;;We turn off point-motion-hooks and explicitly position the cursor, in case | 718 | ;;We turn off point-motion-hooks and explicitly position the cursor, in case |
| 715 | ;;the intangible properties have gotten screwed up (e.g., when | 719 | ;;the intangible properties have gotten screwed up (e.g., when |
| @@ -953,14 +957,16 @@ is one of the symbols ses--col-widths, ses--col-printers, | |||
| 953 | ses--default-printer, ses--numrows, or ses--numcols." | 957 | ses--default-printer, ses--numrows, or ses--numcols." |
| 954 | (ses-widen) | 958 | (ses-widen) |
| 955 | (let ((inhibit-point-motion-hooks t)) ;In case intangible attrs are wrong | 959 | (let ((inhibit-point-motion-hooks t)) ;In case intangible attrs are wrong |
| 956 | (goto-char (point-min)) | ||
| 957 | (if col | 960 | (if col |
| 958 | ;;It's a cell | 961 | ;;It's a cell |
| 959 | (forward-line (+ ses--numrows 2 (* def (1+ ses--numcols)) col)) | 962 | (progn |
| 960 | ;;Convert def-symbol to offset | 963 | (goto-char ses--data-marker) |
| 961 | (setq def (plist-get ses-paramlines-plist def)) | 964 | (forward-line (+ 1 (* def (1+ ses--numcols)) col))) |
| 962 | (or def (signal 'args-out-of-range nil)) | 965 | ;;Convert def-symbol to offset |
| 963 | (forward-line (+ (* ses--numrows (+ ses--numcols 2)) def))))) | 966 | (setq def (plist-get ses-paramlines-plist def)) |
| 967 | (or def (signal 'args-out-of-range nil)) | ||
| 968 | (goto-char ses--params-marker) | ||
| 969 | (forward-line def)))) | ||
| 964 | 970 | ||
| 965 | (defun ses-set-parameter (def value &optional elem) | 971 | (defun ses-set-parameter (def value &optional elem) |
| 966 | "Set parameter DEF to VALUE (with undo) and write the value to the data area. | 972 | "Set parameter DEF to VALUE (with undo) and write the value to the data area. |
| @@ -1070,6 +1076,23 @@ or t to get a wrong-type-argument error when the first reference is found." | |||
| 1070 | )))) | 1076 | )))) |
| 1071 | result-so-far) | 1077 | result-so-far) |
| 1072 | 1078 | ||
| 1079 | (defsubst ses-relocate-symbol (sym rowcol startrow startcol rowincr colincr) | ||
| 1080 | "Relocate one symbol SYM, whichs corresponds to ROWCOL (a cons of ROW and | ||
| 1081 | COL). Cells starting at (STARTROW,STARTCOL) are being shifted | ||
| 1082 | by (ROWINCR,COLINCR)." | ||
| 1083 | (let ((row (car rowcol)) | ||
| 1084 | (col (cdr rowcol))) | ||
| 1085 | (if (or (< row startrow) (< col startcol)) | ||
| 1086 | sym | ||
| 1087 | (setq row (+ row rowincr) | ||
| 1088 | col (+ col colincr)) | ||
| 1089 | (if (and (>= row startrow) (>= col startcol) | ||
| 1090 | (< row ses--numrows) (< col ses--numcols)) | ||
| 1091 | ;;Relocate this variable | ||
| 1092 | (ses-create-cell-symbol row col) | ||
| 1093 | ;;Delete reference to a deleted cell | ||
| 1094 | nil)))) | ||
| 1095 | |||
| 1073 | (defun ses-relocate-formula (formula startrow startcol rowincr colincr) | 1096 | (defun ses-relocate-formula (formula startrow startcol rowincr colincr) |
| 1074 | "Produce a copy of FORMULA where all symbols that refer to cells in row | 1097 | "Produce a copy of FORMULA where all symbols that refer to cells in row |
| 1075 | STARTROW or above and col STARTCOL or above are altered by adding ROWINCR | 1098 | STARTROW or above and col STARTCOL or above are altered by adding ROWINCR |
| @@ -1114,23 +1137,6 @@ Sets `ses-relocate-return' to 'delete if cell-references were removed." | |||
| 1114 | result)))) | 1137 | result)))) |
| 1115 | (nreverse result)))) | 1138 | (nreverse result)))) |
| 1116 | 1139 | ||
| 1117 | (defun ses-relocate-symbol (sym rowcol startrow startcol rowincr colincr) | ||
| 1118 | "Relocate one symbol SYM, whichs corresponds to ROWCOL (a cons of ROW and | ||
| 1119 | COL). Cells starting at (STARTROW,STARTCOL) are being shifted | ||
| 1120 | by (ROWINCR,COLINCR)." | ||
| 1121 | (let ((row (car rowcol)) | ||
| 1122 | (col (cdr rowcol))) | ||
| 1123 | (if (or (< row startrow) (< col startcol)) | ||
| 1124 | sym | ||
| 1125 | (setq row (+ row rowincr) | ||
| 1126 | col (+ col colincr)) | ||
| 1127 | (if (and (>= row startrow) (>= col startcol) | ||
| 1128 | (< row ses--numrows) (< col ses--numcols)) | ||
| 1129 | ;;Relocate this variable | ||
| 1130 | (ses-create-cell-symbol row col) | ||
| 1131 | ;;Delete reference to a deleted cell | ||
| 1132 | nil)))) | ||
| 1133 | |||
| 1134 | (defun ses-relocate-range (range startrow startcol rowincr colincr) | 1140 | (defun ses-relocate-range (range startrow startcol rowincr colincr) |
| 1135 | "Relocate one RANGE, of the form '(ses-range min max). Cells starting | 1141 | "Relocate one RANGE, of the form '(ses-range min max). Cells starting |
| 1136 | at (STARTROW,STARTCOL) are being shifted by (ROWINCR,COLINCR). Result is the | 1142 | at (STARTROW,STARTCOL) are being shifted by (ROWINCR,COLINCR). Result is the |
| @@ -1337,6 +1343,7 @@ execute cell formulas or print functions." | |||
| 1337 | (goto-char (point-max)) | 1343 | (goto-char (point-max)) |
| 1338 | (search-backward ";; Local Variables:\n" nil t) | 1344 | (search-backward ";; Local Variables:\n" nil t) |
| 1339 | (backward-list 1) | 1345 | (backward-list 1) |
| 1346 | (setq ses--params-marker (point-marker)) | ||
| 1340 | (let ((params (condition-case nil (read (current-buffer)) (error nil)))) | 1347 | (let ((params (condition-case nil (read (current-buffer)) (error nil)))) |
| 1341 | (or (and (= (safe-length params) 3) | 1348 | (or (and (= (safe-length params) 3) |
| 1342 | (numberp (car params)) | 1349 | (numberp (car params)) |
| @@ -1366,7 +1373,9 @@ execute cell formulas or print functions." | |||
| 1366 | (forward-line ses--numrows) | 1373 | (forward-line ses--numrows) |
| 1367 | (or (looking-at ses-print-data-boundary) | 1374 | (or (looking-at ses-print-data-boundary) |
| 1368 | (error "Missing marker between print and data areas")) | 1375 | (error "Missing marker between print and data areas")) |
| 1369 | (forward-char (length ses-print-data-boundary)) | 1376 | (forward-char 1) |
| 1377 | (setq ses--data-marker (point-marker)) | ||
| 1378 | (forward-char (1- (length ses-print-data-boundary))) | ||
| 1370 | ;;Initialize printer and symbol lists | 1379 | ;;Initialize printer and symbol lists |
| 1371 | (mapc 'ses-printer-record ses-standard-printer-functions) | 1380 | (mapc 'ses-printer-record ses-standard-printer-functions) |
| 1372 | (setq ses--symbolic-formulas nil) | 1381 | (setq ses--symbolic-formulas nil) |
| @@ -1573,10 +1582,7 @@ narrows the buffer now." | |||
| 1573 | ;;We're not allowed to narrow the buffer until after-find-file has | 1582 | ;;We're not allowed to narrow the buffer until after-find-file has |
| 1574 | ;;read the local variables at the end of the file. Now it's safe to | 1583 | ;;read the local variables at the end of the file. Now it's safe to |
| 1575 | ;;do the narrowing. | 1584 | ;;do the narrowing. |
| 1576 | (save-excursion | 1585 | (narrow-to-region (point-min) ses--data-marker) |
| 1577 | (goto-char (point-min)) | ||
| 1578 | (forward-line ses--numrows) | ||
| 1579 | (narrow-to-region (point-min) (point))) | ||
| 1580 | (setq ses--deferred-narrow nil)) | 1586 | (setq ses--deferred-narrow nil)) |
| 1581 | ;;Update the modeline | 1587 | ;;Update the modeline |
| 1582 | (let ((oldcell ses--curcell)) | 1588 | (let ((oldcell ses--curcell)) |
| @@ -1803,11 +1809,17 @@ cells." | |||
| 1803 | (dotimes (row ses--numrows) | 1809 | (dotimes (row ses--numrows) |
| 1804 | (insert ses--blank-line)) | 1810 | (insert ses--blank-line)) |
| 1805 | (insert ses-print-data-boundary) | 1811 | (insert ses-print-data-boundary) |
| 1812 | (backward-char (1- (length ses-print-data-boundary))) | ||
| 1813 | (setq ses--data-marker (point-marker)) | ||
| 1814 | (forward-char (1- (length ses-print-data-boundary))) | ||
| 1806 | ;;Placeholders for cell data | 1815 | ;;Placeholders for cell data |
| 1807 | (insert (make-string (* ses--numrows (1+ ses--numcols)) ?\n)) | 1816 | (insert (make-string (* ses--numrows (1+ ses--numcols)) ?\n)) |
| 1808 | ;;Placeholders for col-widths, col-printers, default-printer, header-row | 1817 | ;;Placeholders for col-widths, col-printers, default-printer, header-row |
| 1809 | (insert "\n\n\n\n") | 1818 | (insert "\n\n\n\n") |
| 1810 | (insert ses-initial-global-parameters)) | 1819 | (insert ses-initial-global-parameters) |
| 1820 | (backward-char (1- (length ses-initial-global-parameters))) | ||
| 1821 | (setq ses--params-marker (point-marker)) | ||
| 1822 | (forward-char (1- (length ses-initial-global-parameters)))) | ||
| 1811 | (ses-set-parameter 'ses--col-widths ses--col-widths) | 1823 | (ses-set-parameter 'ses--col-widths ses--col-widths) |
| 1812 | (ses-set-parameter 'ses--col-printers ses--col-printers) | 1824 | (ses-set-parameter 'ses--col-printers ses--col-printers) |
| 1813 | (ses-set-parameter 'ses--default-printer ses--default-printer) | 1825 | (ses-set-parameter 'ses--default-printer ses--default-printer) |
| @@ -2880,7 +2892,8 @@ TEST is evaluated." | |||
| 2880 | (cons 'list result))) | 2892 | (cons 'list result))) |
| 2881 | 2893 | ||
| 2882 | ;;All standard formulas are safe | 2894 | ;;All standard formulas are safe |
| 2883 | (dolist (x '(ses-range ses-delete-blanks ses+ ses-average ses-select)) | 2895 | (dolist (x '(ses-cell-value ses-range ses-delete-blanks ses+ ses-average |
| 2896 | ses-select)) | ||
| 2884 | (put x 'side-effect-free t)) | 2897 | (put x 'side-effect-free t)) |
| 2885 | 2898 | ||
| 2886 | 2899 | ||
diff --git a/lisp/shell.el b/lisp/shell.el index 6a145ae1569..2adfc79618a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -272,6 +272,8 @@ This is effective only if directory tracking is enabled." | |||
| 272 | :type '(choice (const :tag "None" nil) file) | 272 | :type '(choice (const :tag "None" nil) file) |
| 273 | :group 'shell) | 273 | :group 'shell) |
| 274 | 274 | ||
| 275 | ;; Note: There are no explicit references to the variable `explicit-csh-args'. | ||
| 276 | ;; It is used implicitly by M-x shell when the shell is `csh'. | ||
| 275 | (defcustom explicit-csh-args | 277 | (defcustom explicit-csh-args |
| 276 | (if (eq system-type 'hpux) | 278 | (if (eq system-type 'hpux) |
| 277 | ;; -T persuades HP's csh not to think it is smarter | 279 | ;; -T persuades HP's csh not to think it is smarter |
| @@ -283,12 +285,15 @@ Value is a list of strings, which may be nil." | |||
| 283 | :type '(repeat (string :tag "Argument")) | 285 | :type '(repeat (string :tag "Argument")) |
| 284 | :group 'shell) | 286 | :group 'shell) |
| 285 | 287 | ||
| 288 | ;; Note: There are no explicit references to the variable `explicit-bash-args'. | ||
| 289 | ;; It is used implicitly by M-x shell when the interactive shell is `bash'. | ||
| 286 | (defcustom explicit-bash-args | 290 | (defcustom explicit-bash-args |
| 287 | ;; Tell bash not to use readline, except for bash 1.x which doesn't grook --noediting. | ||
| 288 | ;; Bash 1.x has -nolineediting, but process-send-eof cannot terminate bash if we use it. | ||
| 289 | (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name) | 291 | (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name) |
| 290 | (getenv "ESHELL") shell-file-name)) | 292 | (getenv "ESHELL") shell-file-name)) |
| 291 | (name (file-name-nondirectory prog))) | 293 | (name (file-name-nondirectory prog))) |
| 294 | ;; Tell bash not to use readline, except for bash 1.x which | ||
| 295 | ;; doesn't grook --noediting. Bash 1.x has -nolineediting, but | ||
| 296 | ;; process-send-eof cannot terminate bash if we use it. | ||
| 292 | (if (and (not purify-flag) | 297 | (if (and (not purify-flag) |
| 293 | (equal name "bash") | 298 | (equal name "bash") |
| 294 | (file-executable-p prog) | 299 | (file-executable-p prog) |
| @@ -483,7 +488,9 @@ This function can be put on `comint-output-filter-functions'. | |||
| 483 | The argument STRING is ignored." | 488 | The argument STRING is ignored." |
| 484 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) | 489 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) |
| 485 | (save-excursion | 490 | (save-excursion |
| 486 | (goto-char (or comint-last-output-start (point-min))) | 491 | (goto-char (or (and (markerp comint-last-output-start) |
| 492 | (marker-position comint-last-output-start)) | ||
| 493 | (point-min))) | ||
| 487 | (while (re-search-forward "[\C-a\C-b]" pmark t) | 494 | (while (re-search-forward "[\C-a\C-b]" pmark t) |
| 488 | (replace-match ""))))) | 495 | (replace-match ""))))) |
| 489 | 496 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index f07006b5cc8..0dff1c73795 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -116,29 +116,29 @@ If no other buffer exists, the buffer `*scratch*' is returned." | |||
| 116 | :group 'next-error | 116 | :group 'next-error |
| 117 | :version "22.1") | 117 | :version "22.1") |
| 118 | 118 | ||
| 119 | (defcustom next-error-highlight 0.1 | 119 | (defcustom next-error-highlight 0.5 |
| 120 | "*Highlighting of locations in selected source buffers. | 120 | "*Highlighting of locations in selected source buffers. |
| 121 | If number, highlight the locus in `next-error' face for given time in seconds. | 121 | If number, highlight the locus in `next-error' face for given time in seconds. |
| 122 | If t, use persistent overlays fontified in `next-error' face. | 122 | If t, highlight the locus indefinitely until some other locus replaces it. |
| 123 | If nil, don't highlight the locus in the source buffer. | 123 | If nil, don't highlight the locus in the source buffer. |
| 124 | If `fringe-arrow', indicate the locus by the fringe arrow." | 124 | If `fringe-arrow', indicate the locus by the fringe arrow." |
| 125 | :type '(choice (number :tag "Delay") | 125 | :type '(choice (number :tag "Highlight for specified time") |
| 126 | (const :tag "Persistent overlay" t) | 126 | (const :tag "Semipermanent highlighting" t) |
| 127 | (const :tag "No highlighting" nil) | 127 | (const :tag "No highlighting" nil) |
| 128 | (const :tag "Fringe arrow" 'fringe-arrow)) | 128 | (const :tag "Fringe arrow" fringe-arrow)) |
| 129 | :group 'next-error | 129 | :group 'next-error |
| 130 | :version "22.1") | 130 | :version "22.1") |
| 131 | 131 | ||
| 132 | (defcustom next-error-highlight-no-select 0.1 | 132 | (defcustom next-error-highlight-no-select 0.5 |
| 133 | "*Highlighting of locations in non-selected source buffers. | 133 | "*Highlighting of locations in `next-error-no-select'. |
| 134 | If number, highlight the locus in `next-error' face for given time in seconds. | 134 | If number, highlight the locus in `next-error' face for given time in seconds. |
| 135 | If t, use persistent overlays fontified in `next-error' face. | 135 | If t, highlight the locus indefinitely until some other locus replaces it. |
| 136 | If nil, don't highlight the locus in the source buffer. | 136 | If nil, don't highlight the locus in the source buffer. |
| 137 | If `fringe-arrow', indicate the locus by the fringe arrow." | 137 | If `fringe-arrow', indicate the locus by the fringe arrow." |
| 138 | :type '(choice (number :tag "Delay") | 138 | :type '(choice (number :tag "Highlight for specified time") |
| 139 | (const :tag "Persistent overlay" t) | 139 | (const :tag "Semipermanent highlighting" t) |
| 140 | (const :tag "No highlighting" nil) | 140 | (const :tag "No highlighting" nil) |
| 141 | (const :tag "Fringe arrow" 'fringe-arrow)) | 141 | (const :tag "Fringe arrow" fringe-arrow)) |
| 142 | :group 'next-error | 142 | :group 'next-error |
| 143 | :version "22.1") | 143 | :version "22.1") |
| 144 | 144 | ||
| @@ -1489,8 +1489,7 @@ Call `undo-start' to get ready to undo recent changes, | |||
| 1489 | then call `undo-more' one or more times to undo them." | 1489 | then call `undo-more' one or more times to undo them." |
| 1490 | (or (listp pending-undo-list) | 1490 | (or (listp pending-undo-list) |
| 1491 | (error (concat "No further undo information" | 1491 | (error (concat "No further undo information" |
| 1492 | (and transient-mark-mode mark-active | 1492 | (and undo-in-region " for region")))) |
| 1493 | " for region")))) | ||
| 1494 | (let ((undo-in-progress t)) | 1493 | (let ((undo-in-progress t)) |
| 1495 | (setq pending-undo-list (primitive-undo n pending-undo-list)) | 1494 | (setq pending-undo-list (primitive-undo n pending-undo-list)) |
| 1496 | (if (null pending-undo-list) | 1495 | (if (null pending-undo-list) |
| @@ -1637,12 +1636,12 @@ is not *inside* the region START...END." | |||
| 1637 | ((null (car undo-elt)) | 1636 | ((null (car undo-elt)) |
| 1638 | ;; (nil PROPERTY VALUE BEG . END) | 1637 | ;; (nil PROPERTY VALUE BEG . END) |
| 1639 | (let ((tail (nthcdr 3 undo-elt))) | 1638 | (let ((tail (nthcdr 3 undo-elt))) |
| 1640 | (not (or (< (car tail) end) | 1639 | (and (< (car tail) end) |
| 1641 | (> (cdr tail) start))))) | 1640 | (> (cdr tail) start)))) |
| 1642 | ((integerp (car undo-elt)) | 1641 | ((integerp (car undo-elt)) |
| 1643 | ;; (BEGIN . END) | 1642 | ;; (BEGIN . END) |
| 1644 | (not (or (< (car undo-elt) end) | 1643 | (and (< (car undo-elt) end) |
| 1645 | (> (cdr undo-elt) start)))))) | 1644 | (> (cdr undo-elt) start))))) |
| 1646 | 1645 | ||
| 1647 | ;; Return the first affected buffer position and the delta for an undo element | 1646 | ;; Return the first affected buffer position and the delta for an undo element |
| 1648 | ;; delta is defined as the change in subsequent buffer positions if we *did* | 1647 | ;; delta is defined as the change in subsequent buffer positions if we *did* |
| @@ -1664,7 +1663,7 @@ is not *inside* the region START...END." | |||
| 1664 | Normally, Emacs discards the undo info for the current command if | 1663 | Normally, Emacs discards the undo info for the current command if |
| 1665 | it exceeds `undo-outer-limit'. But if you set this option | 1664 | it exceeds `undo-outer-limit'. But if you set this option |
| 1666 | non-nil, it asks in the echo area whether to discard the info. | 1665 | non-nil, it asks in the echo area whether to discard the info. |
| 1667 | If you answer no, there a slight risk that Emacs might crash, so | 1666 | If you answer no, there is a slight risk that Emacs might crash, so |
| 1668 | only do it if you really want to undo the command. | 1667 | only do it if you really want to undo the command. |
| 1669 | 1668 | ||
| 1670 | This option is mainly intended for debugging. You have to be | 1669 | This option is mainly intended for debugging. You have to be |
| @@ -2546,6 +2545,8 @@ text. See `insert-for-yank'." | |||
| 2546 | ;; Pass point first, then mark, because the order matters | 2545 | ;; Pass point first, then mark, because the order matters |
| 2547 | ;; when calling kill-append. | 2546 | ;; when calling kill-append. |
| 2548 | (interactive (list (point) (mark))) | 2547 | (interactive (list (point) (mark))) |
| 2548 | (unless (and beg end) | ||
| 2549 | (error "The mark is not set now, so there is no region")) | ||
| 2549 | (condition-case nil | 2550 | (condition-case nil |
| 2550 | (let ((string (filter-buffer-substring beg end t))) | 2551 | (let ((string (filter-buffer-substring beg end t))) |
| 2551 | (when string ;STRING is nil if BEG = END | 2552 | (when string ;STRING is nil if BEG = END |
| @@ -2649,7 +2650,7 @@ The argument is used for internal purposes; do not supply one." | |||
| 2649 | ;; This is actually used in subr.el but defcustom does not work there. | 2650 | ;; This is actually used in subr.el but defcustom does not work there. |
| 2650 | (defcustom yank-excluded-properties | 2651 | (defcustom yank-excluded-properties |
| 2651 | '(read-only invisible intangible field mouse-face help-echo local-map keymap | 2652 | '(read-only invisible intangible field mouse-face help-echo local-map keymap |
| 2652 | yank-handler follow-link) | 2653 | yank-handler follow-link fontified) |
| 2653 | "*Text properties to discard when yanking. | 2654 | "*Text properties to discard when yanking. |
| 2654 | The value should be a list of text properties to discard or t, | 2655 | The value should be a list of text properties to discard or t, |
| 2655 | which means to discard all text properties." | 2656 | which means to discard all text properties." |
| @@ -3467,6 +3468,63 @@ Outline mode sets this." | |||
| 3467 | (or (memq prop buffer-invisibility-spec) | 3468 | (or (memq prop buffer-invisibility-spec) |
| 3468 | (assq prop buffer-invisibility-spec))))) | 3469 | (assq prop buffer-invisibility-spec))))) |
| 3469 | 3470 | ||
| 3471 | ;; Returns non-nil if partial move was done. | ||
| 3472 | (defun line-move-partial (arg noerror to-end) | ||
| 3473 | (if (< arg 0) | ||
| 3474 | ;; Move backward (up). | ||
| 3475 | ;; If already vscrolled, reduce vscroll | ||
| 3476 | (let ((vs (window-vscroll nil t))) | ||
| 3477 | (when (> vs (frame-char-height)) | ||
| 3478 | (set-window-vscroll nil (- vs (frame-char-height)) t))) | ||
| 3479 | |||
| 3480 | ;; Move forward (down). | ||
| 3481 | (let* ((lh (window-line-height -1)) | ||
| 3482 | (vpos (nth 1 lh)) | ||
| 3483 | (ypos (nth 2 lh)) | ||
| 3484 | (rbot (nth 3 lh)) | ||
| 3485 | ppos py vs) | ||
| 3486 | (when (or (null lh) | ||
| 3487 | (>= rbot (frame-char-height)) | ||
| 3488 | (<= ypos (- (frame-char-height)))) | ||
| 3489 | (unless lh | ||
| 3490 | (let ((wend (pos-visible-in-window-p t nil t))) | ||
| 3491 | (setq rbot (nth 3 wend) | ||
| 3492 | vpos (nth 5 wend)))) | ||
| 3493 | (cond | ||
| 3494 | ;; If last line of window is fully visible, move forward. | ||
| 3495 | ((or (null rbot) (= rbot 0)) | ||
| 3496 | nil) | ||
| 3497 | ;; If cursor is not in the bottom scroll margin, move forward. | ||
| 3498 | ((and (> vpos 0) | ||
| 3499 | (< (setq py | ||
| 3500 | (or (nth 1 (window-line-height)) | ||
| 3501 | (let ((ppos (posn-at-point))) | ||
| 3502 | (cdr (or (posn-actual-col-row ppos) | ||
| 3503 | (posn-col-row ppos)))))) | ||
| 3504 | (min (- (window-text-height) scroll-margin 1) (1- vpos)))) | ||
| 3505 | nil) | ||
| 3506 | ;; When already vscrolled, we vscroll some more if we can, | ||
| 3507 | ;; or clear vscroll and move forward at end of tall image. | ||
| 3508 | ((> (setq vs (window-vscroll nil t)) 0) | ||
| 3509 | (when (> rbot 0) | ||
| 3510 | (set-window-vscroll nil (+ vs (min rbot (frame-char-height))) t))) | ||
| 3511 | ;; If cursor just entered the bottom scroll margin, move forward, | ||
| 3512 | ;; but also vscroll one line so redisplay wont recenter. | ||
| 3513 | ((and (> vpos 0) | ||
| 3514 | (= py (min (- (window-text-height) scroll-margin 1) | ||
| 3515 | (1- vpos)))) | ||
| 3516 | (set-window-vscroll nil (frame-char-height) t) | ||
| 3517 | (line-move-1 arg noerror to-end) | ||
| 3518 | t) | ||
| 3519 | ;; If there are lines above the last line, scroll-up one line. | ||
| 3520 | ((> vpos 0) | ||
| 3521 | (scroll-up 1) | ||
| 3522 | t) | ||
| 3523 | ;; Finally, start vscroll. | ||
| 3524 | (t | ||
| 3525 | (set-window-vscroll nil (frame-char-height) t))))))) | ||
| 3526 | |||
| 3527 | |||
| 3470 | ;; This is like line-move-1 except that it also performs | 3528 | ;; This is like line-move-1 except that it also performs |
| 3471 | ;; vertical scrolling of tall images if appropriate. | 3529 | ;; vertical scrolling of tall images if appropriate. |
| 3472 | ;; That is not really a clean thing to do, since it mixes | 3530 | ;; That is not really a clean thing to do, since it mixes |
| @@ -3474,37 +3532,14 @@ Outline mode sets this." | |||
| 3474 | ;; a cleaner solution to the problem of making C-n do something | 3532 | ;; a cleaner solution to the problem of making C-n do something |
| 3475 | ;; useful given a tall image. | 3533 | ;; useful given a tall image. |
| 3476 | (defun line-move (arg &optional noerror to-end try-vscroll) | 3534 | (defun line-move (arg &optional noerror to-end try-vscroll) |
| 3477 | (if (and auto-window-vscroll try-vscroll | 3535 | (unless (and auto-window-vscroll try-vscroll |
| 3478 | ;; But don't vscroll in a keyboard macro. | 3536 | ;; Only vscroll for single line moves |
| 3479 | (not defining-kbd-macro) | 3537 | (= (abs arg) 1) |
| 3480 | (not executing-kbd-macro)) | 3538 | ;; But don't vscroll in a keyboard macro. |
| 3481 | (let ((forward (> arg 0)) | 3539 | (not defining-kbd-macro) |
| 3482 | (part (nth 2 (pos-visible-in-window-p (point) nil t)))) | 3540 | (not executing-kbd-macro) |
| 3483 | (if (and (consp part) | 3541 | (line-move-partial arg noerror to-end)) |
| 3484 | (> (if forward (cdr part) (car part)) 0)) | 3542 | (set-window-vscroll nil 0 t) |
| 3485 | (set-window-vscroll nil | ||
| 3486 | (if forward | ||
| 3487 | (+ (window-vscroll nil t) | ||
| 3488 | (min (cdr part) | ||
| 3489 | (* (frame-char-height) arg))) | ||
| 3490 | (max 0 | ||
| 3491 | (- (window-vscroll nil t) | ||
| 3492 | (min (car part) | ||
| 3493 | (* (frame-char-height) (- arg)))))) | ||
| 3494 | t) | ||
| 3495 | (set-window-vscroll nil 0) | ||
| 3496 | (when (line-move-1 arg noerror to-end) | ||
| 3497 | (when (not forward) | ||
| 3498 | ;; Update display before calling pos-visible-in-window-p, | ||
| 3499 | ;; because it depends on window-start being up-to-date. | ||
| 3500 | (sit-for 0) | ||
| 3501 | ;; If the current line is partly hidden at the bottom, | ||
| 3502 | ;; scroll it partially up so as to unhide the bottom. | ||
| 3503 | (if (and (setq part (nth 2 (pos-visible-in-window-p | ||
| 3504 | (line-beginning-position) nil t))) | ||
| 3505 | (> (cdr part) 0)) | ||
| 3506 | (set-window-vscroll nil (cdr part) t))) | ||
| 3507 | t))) | ||
| 3508 | (line-move-1 arg noerror to-end))) | 3543 | (line-move-1 arg noerror to-end))) |
| 3509 | 3544 | ||
| 3510 | ;; This is the guts of next-line and previous-line. | 3545 | ;; This is the guts of next-line and previous-line. |
| @@ -3515,7 +3550,7 @@ Outline mode sets this." | |||
| 3515 | ;; for intermediate positions. | 3550 | ;; for intermediate positions. |
| 3516 | (let ((inhibit-point-motion-hooks t) | 3551 | (let ((inhibit-point-motion-hooks t) |
| 3517 | (opoint (point)) | 3552 | (opoint (point)) |
| 3518 | (forward (> arg 0))) | 3553 | (orig-arg arg)) |
| 3519 | (unwind-protect | 3554 | (unwind-protect |
| 3520 | (progn | 3555 | (progn |
| 3521 | (if (not (memq last-command '(next-line previous-line))) | 3556 | (if (not (memq last-command '(next-line previous-line))) |
| @@ -3548,14 +3583,18 @@ Outline mode sets this." | |||
| 3548 | 'end-of-buffer) | 3583 | 'end-of-buffer) |
| 3549 | nil))) | 3584 | nil))) |
| 3550 | ;; Move by arg lines, but ignore invisible ones. | 3585 | ;; Move by arg lines, but ignore invisible ones. |
| 3551 | (let (done) | 3586 | (let (done line-end) |
| 3552 | (while (and (> arg 0) (not done)) | 3587 | (while (and (> arg 0) (not done)) |
| 3553 | ;; If the following character is currently invisible, | 3588 | ;; If the following character is currently invisible, |
| 3554 | ;; skip all characters with that same `invisible' property value. | 3589 | ;; skip all characters with that same `invisible' property value. |
| 3555 | (while (and (not (eobp)) (line-move-invisible-p (point))) | 3590 | (while (and (not (eobp)) (line-move-invisible-p (point))) |
| 3556 | (goto-char (next-char-property-change (point)))) | 3591 | (goto-char (next-char-property-change (point)))) |
| 3557 | ;; Now move a line. | 3592 | ;; Move a line. |
| 3558 | (end-of-line) | 3593 | ;; We don't use `end-of-line', since we want to escape |
| 3594 | ;; from field boundaries ocurring exactly at point. | ||
| 3595 | (let ((inhibit-field-text-motion t)) | ||
| 3596 | (setq line-end (line-end-position))) | ||
| 3597 | (goto-char (constrain-to-field line-end (point) t t)) | ||
| 3559 | ;; If there's no invisibility here, move over the newline. | 3598 | ;; If there's no invisibility here, move over the newline. |
| 3560 | (cond | 3599 | (cond |
| 3561 | ((eobp) | 3600 | ((eobp) |
| @@ -3613,7 +3652,7 @@ Outline mode sets this." | |||
| 3613 | (beginning-of-line)) | 3652 | (beginning-of-line)) |
| 3614 | (t | 3653 | (t |
| 3615 | (line-move-finish (or goal-column temporary-goal-column) | 3654 | (line-move-finish (or goal-column temporary-goal-column) |
| 3616 | opoint forward)))))) | 3655 | opoint (> orig-arg 0))))))) |
| 3617 | 3656 | ||
| 3618 | (defun line-move-finish (column opoint forward) | 3657 | (defun line-move-finish (column opoint forward) |
| 3619 | (let ((repeat t)) | 3658 | (let ((repeat t)) |
| @@ -3622,6 +3661,7 @@ Outline mode sets this." | |||
| 3622 | (setq repeat nil) | 3661 | (setq repeat nil) |
| 3623 | 3662 | ||
| 3624 | (let (new | 3663 | (let (new |
| 3664 | (old (point)) | ||
| 3625 | (line-beg (save-excursion (beginning-of-line) (point))) | 3665 | (line-beg (save-excursion (beginning-of-line) (point))) |
| 3626 | (line-end | 3666 | (line-end |
| 3627 | ;; Compute the end of the line | 3667 | ;; Compute the end of the line |
| @@ -3636,6 +3676,17 @@ Outline mode sets this." | |||
| 3636 | 3676 | ||
| 3637 | ;; Move to the desired column. | 3677 | ;; Move to the desired column. |
| 3638 | (line-move-to-column column) | 3678 | (line-move-to-column column) |
| 3679 | |||
| 3680 | ;; Corner case: suppose we start out in a field boundary in | ||
| 3681 | ;; the middle of a continued line. When we get to | ||
| 3682 | ;; line-move-finish, point is at the start of a new *screen* | ||
| 3683 | ;; line but the same text line; then line-move-to-column would | ||
| 3684 | ;; move us backwards. Test using C-n with point on the "x" in | ||
| 3685 | ;; (insert "a" (propertize "x" 'field t) (make-string 89 ?y)) | ||
| 3686 | (and forward | ||
| 3687 | (< (point) old) | ||
| 3688 | (goto-char old)) | ||
| 3689 | |||
| 3639 | (setq new (point)) | 3690 | (setq new (point)) |
| 3640 | 3691 | ||
| 3641 | ;; Process intangibility within a line. | 3692 | ;; Process intangibility within a line. |
| @@ -3675,8 +3726,15 @@ Outline mode sets this." | |||
| 3675 | (goto-char opoint) | 3726 | (goto-char opoint) |
| 3676 | (let ((inhibit-point-motion-hooks nil)) | 3727 | (let ((inhibit-point-motion-hooks nil)) |
| 3677 | (goto-char | 3728 | (goto-char |
| 3678 | (constrain-to-field new opoint nil t | 3729 | ;; Ignore field boundaries if the initial and final |
| 3679 | 'inhibit-line-move-field-capture))) | 3730 | ;; positions have the same `field' property, even if the |
| 3731 | ;; fields are non-contiguous. This seems to be "nicer" | ||
| 3732 | ;; behavior in many situations. | ||
| 3733 | (if (eq (get-char-property new 'field) | ||
| 3734 | (get-char-property opoint 'field)) | ||
| 3735 | new | ||
| 3736 | (constrain-to-field new opoint t t | ||
| 3737 | 'inhibit-line-move-field-capture)))) | ||
| 3680 | 3738 | ||
| 3681 | ;; If all this moved us to a different line, | 3739 | ;; If all this moved us to a different line, |
| 3682 | ;; retry everything within that new line. | 3740 | ;; retry everything within that new line. |
| @@ -3691,10 +3749,7 @@ because what we really need is for `move-to-column' | |||
| 3691 | and `current-column' to be able to ignore invisible text." | 3749 | and `current-column' to be able to ignore invisible text." |
| 3692 | (if (zerop col) | 3750 | (if (zerop col) |
| 3693 | (beginning-of-line) | 3751 | (beginning-of-line) |
| 3694 | (let ((opoint (point))) | 3752 | (move-to-column col)) |
| 3695 | (move-to-column col) | ||
| 3696 | ;; move-to-column doesn't respect field boundaries. | ||
| 3697 | (goto-char (constrain-to-field (point) opoint)))) | ||
| 3698 | 3753 | ||
| 3699 | (when (and line-move-ignore-invisible | 3754 | (when (and line-move-ignore-invisible |
| 3700 | (not (bolp)) (line-move-invisible-p (1- (point)))) | 3755 | (not (bolp)) (line-move-invisible-p (1- (point)))) |
| @@ -4330,21 +4385,21 @@ in the mode line. | |||
| 4330 | Line numbers do not appear for very large buffers and buffers | 4385 | Line numbers do not appear for very large buffers and buffers |
| 4331 | with very long lines; see variables `line-number-display-limit' | 4386 | with very long lines; see variables `line-number-display-limit' |
| 4332 | and `line-number-display-limit-width'." | 4387 | and `line-number-display-limit-width'." |
| 4333 | :init-value t :global t :group 'editing-basics) | 4388 | :init-value t :global t :group 'mode-line) |
| 4334 | 4389 | ||
| 4335 | (define-minor-mode column-number-mode | 4390 | (define-minor-mode column-number-mode |
| 4336 | "Toggle Column Number mode. | 4391 | "Toggle Column Number mode. |
| 4337 | With arg, turn Column Number mode on iff arg is positive. | 4392 | With arg, turn Column Number mode on iff arg is positive. |
| 4338 | When Column Number mode is enabled, the column number appears | 4393 | When Column Number mode is enabled, the column number appears |
| 4339 | in the mode line." | 4394 | in the mode line." |
| 4340 | :global t :group 'editing-basics) | 4395 | :global t :group 'mode-line) |
| 4341 | 4396 | ||
| 4342 | (define-minor-mode size-indication-mode | 4397 | (define-minor-mode size-indication-mode |
| 4343 | "Toggle Size Indication mode. | 4398 | "Toggle Size Indication mode. |
| 4344 | With arg, turn Size Indication mode on iff arg is positive. When | 4399 | With arg, turn Size Indication mode on iff arg is positive. When |
| 4345 | Size Indication mode is enabled, the size of the accessible part | 4400 | Size Indication mode is enabled, the size of the accessible part |
| 4346 | of the buffer appears in the mode line." | 4401 | of the buffer appears in the mode line." |
| 4347 | :global t :group 'editing-basics) | 4402 | :global t :group 'mode-line) |
| 4348 | 4403 | ||
| 4349 | (defgroup paren-blinking nil | 4404 | (defgroup paren-blinking nil |
| 4350 | "Blinking matching of parens and expressions." | 4405 | "Blinking matching of parens and expressions." |
| @@ -4974,6 +5029,12 @@ value of `completion-common-substring'. See also `display-completion-list'.") | |||
| 4974 | 5029 | ||
| 4975 | ;; Variables and faces used in `completion-setup-function'. | 5030 | ;; Variables and faces used in `completion-setup-function'. |
| 4976 | 5031 | ||
| 5032 | (defcustom completion-show-help t | ||
| 5033 | "Non-nil means show help message in *Completions* buffer." | ||
| 5034 | :type 'boolean | ||
| 5035 | :version "22.1" | ||
| 5036 | :group 'completion) | ||
| 5037 | |||
| 4977 | (defface completions-first-difference | 5038 | (defface completions-first-difference |
| 4978 | '((t (:inherit bold))) | 5039 | '((t (:inherit bold))) |
| 4979 | "Face put on the first uncommon character in completions in *Completions* buffer." | 5040 | "Face put on the first uncommon character in completions in *Completions* buffer." |
| @@ -5060,14 +5121,15 @@ of the minibuffer before point is always the common substring.)") | |||
| 5060 | (if (get-char-property element-common-end 'mouse-face) | 5121 | (if (get-char-property element-common-end 'mouse-face) |
| 5061 | (put-text-property element-common-end (1+ element-common-end) | 5122 | (put-text-property element-common-end (1+ element-common-end) |
| 5062 | 'font-lock-face 'completions-first-difference)))))) | 5123 | 'font-lock-face 'completions-first-difference)))))) |
| 5063 | ;; Insert help string. | 5124 | ;; Maybe insert help string. |
| 5064 | (goto-char (point-min)) | 5125 | (when completion-show-help |
| 5065 | (if (display-mouse-p) | 5126 | (goto-char (point-min)) |
| 5066 | (insert (substitute-command-keys | 5127 | (if (display-mouse-p) |
| 5067 | "Click \\[mouse-choose-completion] on a completion to select it.\n"))) | 5128 | (insert (substitute-command-keys |
| 5068 | (insert (substitute-command-keys | 5129 | "Click \\[mouse-choose-completion] on a completion to select it.\n"))) |
| 5069 | "In this buffer, type \\[choose-completion] to \ | 5130 | (insert (substitute-command-keys |
| 5070 | select the completion near point.\n\n"))))) | 5131 | "In this buffer, type \\[choose-completion] to \ |
| 5132 | select the completion near point.\n\n")))))) | ||
| 5071 | 5133 | ||
| 5072 | (add-hook 'completion-setup-hook 'completion-setup-function) | 5134 | (add-hook 'completion-setup-hook 'completion-setup-function) |
| 5073 | 5135 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index b96503603c2..59bcabf4a9e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -784,6 +784,7 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 784 | (custom-reevaluate-setting 'mouse-wheel-up-event) | 784 | (custom-reevaluate-setting 'mouse-wheel-up-event) |
| 785 | (custom-reevaluate-setting 'file-name-shadow-mode) | 785 | (custom-reevaluate-setting 'file-name-shadow-mode) |
| 786 | (custom-reevaluate-setting 'send-mail-function) | 786 | (custom-reevaluate-setting 'send-mail-function) |
| 787 | (custom-reevaluate-setting 'focus-follows-mouse) | ||
| 787 | 788 | ||
| 788 | (normal-erase-is-backspace-setup-frame) | 789 | (normal-erase-is-backspace-setup-frame) |
| 789 | 790 | ||
| @@ -1097,10 +1098,7 @@ regardless of the value of this variable." | |||
| 1097 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1098 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 1098 | 1099 | ||
| 1099 | (defvar fancy-splash-text | 1100 | (defvar fancy-splash-text |
| 1100 | '((:face variable-pitch | 1101 | '((:face (variable-pitch :weight bold) |
| 1101 | "You can do basic editing with the menu bar and scroll bar \ | ||
| 1102 | using the mouse.\n\n" | ||
| 1103 | :face (variable-pitch :weight bold) | ||
| 1104 | "Important Help menu items:\n" | 1102 | "Important Help menu items:\n" |
| 1105 | :face variable-pitch | 1103 | :face variable-pitch |
| 1106 | (lambda () | 1104 | (lambda () |
| @@ -1124,8 +1122,8 @@ using the mouse.\n\n" | |||
| 1124 | "\n"))) | 1122 | "\n"))) |
| 1125 | :face variable-pitch "\ | 1123 | :face variable-pitch "\ |
| 1126 | Emacs FAQ\tFrequently asked questions and answers | 1124 | Emacs FAQ\tFrequently asked questions and answers |
| 1127 | Read the Emacs Manual\tView the Emacs manual using Info | 1125 | View Emacs Manual\tView the Emacs manual using Info |
| 1128 | \(Non)Warranty\tGNU Emacs comes with " | 1126 | Absence of Warranty\tGNU Emacs comes with " |
| 1129 | :face (variable-pitch :slant oblique) | 1127 | :face (variable-pitch :slant oblique) |
| 1130 | "ABSOLUTELY NO WARRANTY\n" | 1128 | "ABSOLUTELY NO WARRANTY\n" |
| 1131 | :face variable-pitch | 1129 | :face variable-pitch |
| @@ -1133,18 +1131,16 @@ Read the Emacs Manual\tView the Emacs manual using Info | |||
| 1133 | Copying Conditions\tConditions for redistributing and changing Emacs | 1131 | Copying Conditions\tConditions for redistributing and changing Emacs |
| 1134 | Getting New Versions\tHow to obtain the latest version of Emacs | 1132 | Getting New Versions\tHow to obtain the latest version of Emacs |
| 1135 | More Manuals / Ordering Manuals Buying printed manuals from the FSF\n") | 1133 | More Manuals / Ordering Manuals Buying printed manuals from the FSF\n") |
| 1136 | (:face variable-pitch | 1134 | (:face (variable-pitch :weight bold) |
| 1137 | "You can do basic editing with the menu bar and scroll bar \ | 1135 | "Useful File menu items:\n" |
| 1138 | using the mouse.\n\n" | 1136 | :face variable-pitch "\ |
| 1139 | :face (variable-pitch :weight bold) | 1137 | Exit Emacs\t\t(Or type Control-x followed by Control-c) |
| 1140 | "Useful File menu items:\n" | ||
| 1141 | :face variable-pitch "\ | ||
| 1142 | Exit Emacs\t(Or type Control-x followed by Control-c) | ||
| 1143 | Recover Crashed Session\tRecover files you were editing before a crash | 1138 | Recover Crashed Session\tRecover files you were editing before a crash |
| 1144 | 1139 | ||
| 1145 | 1140 | ||
| 1146 | 1141 | ||
| 1147 | 1142 | ||
| 1143 | |||
| 1148 | " | 1144 | " |
| 1149 | )) | 1145 | )) |
| 1150 | "A list of texts to show in the middle part of splash screens. | 1146 | "A list of texts to show in the middle part of splash screens. |
| @@ -1249,6 +1245,10 @@ where FACE is a valid face specification, as it can be used with | |||
| 1249 | "GNU Emacs is one component of the GNU/Linux operating system." | 1245 | "GNU Emacs is one component of the GNU/Linux operating system." |
| 1250 | "GNU Emacs is one component of the GNU operating system.")) | 1246 | "GNU Emacs is one component of the GNU operating system.")) |
| 1251 | (insert "\n") | 1247 | (insert "\n") |
| 1248 | (fancy-splash-insert | ||
| 1249 | :face 'variable-pitch | ||
| 1250 | "You can do basic editing with the menu bar and scroll bar \ | ||
| 1251 | using the mouse.\n\n") | ||
| 1252 | (if fancy-splash-outer-buffer | 1252 | (if fancy-splash-outer-buffer |
| 1253 | (fancy-splash-insert | 1253 | (fancy-splash-insert |
| 1254 | :face 'variable-pitch | 1254 | :face 'variable-pitch |
| @@ -1285,7 +1285,7 @@ where FACE is a valid face specification, as it can be used with | |||
| 1285 | t) | 1285 | t) |
| 1286 | (fancy-splash-insert :face '(variable-pitch :foreground "red") | 1286 | (fancy-splash-insert :face '(variable-pitch :foreground "red") |
| 1287 | "\n\nIf an Emacs session crashed recently, " | 1287 | "\n\nIf an Emacs session crashed recently, " |
| 1288 | "type M-x recover-session RET\nto recover" | 1288 | "type Meta-x recover-session RET\nto recover" |
| 1289 | " the files you were editing.")))) | 1289 | " the files you were editing.")))) |
| 1290 | 1290 | ||
| 1291 | (defun fancy-splash-screens-1 (buffer) | 1291 | (defun fancy-splash-screens-1 (buffer) |
| @@ -1340,7 +1340,6 @@ mouse." | |||
| 1340 | 1340 | ||
| 1341 | (defun fancy-splash-screens (&optional hide-on-input) | 1341 | (defun fancy-splash-screens (&optional hide-on-input) |
| 1342 | "Display fancy splash screens when Emacs starts." | 1342 | "Display fancy splash screens when Emacs starts." |
| 1343 | (setq fancy-splash-help-echo (startup-echo-area-message)) | ||
| 1344 | (if hide-on-input | 1343 | (if hide-on-input |
| 1345 | (let ((old-hourglass display-hourglass) | 1344 | (let ((old-hourglass display-hourglass) |
| 1346 | (fancy-splash-outer-buffer (current-buffer)) | 1345 | (fancy-splash-outer-buffer (current-buffer)) |
| @@ -1352,11 +1351,11 @@ mouse." | |||
| 1352 | (save-selected-window | 1351 | (save-selected-window |
| 1353 | (select-frame frame) | 1352 | (select-frame frame) |
| 1354 | (switch-to-buffer "GNU Emacs") | 1353 | (switch-to-buffer "GNU Emacs") |
| 1355 | (setq tab-width 20) | ||
| 1356 | (setq splash-buffer (current-buffer)) | 1354 | (setq splash-buffer (current-buffer)) |
| 1357 | (catch 'stop-splashing | 1355 | (catch 'stop-splashing |
| 1358 | (unwind-protect | 1356 | (unwind-protect |
| 1359 | (let* ((map (make-sparse-keymap)) | 1357 | (let* ((map (make-sparse-keymap)) |
| 1358 | (cursor-type nil) | ||
| 1360 | (overriding-local-map map) | 1359 | (overriding-local-map map) |
| 1361 | ;; Catch if our frame is deleted; the delete-frame | 1360 | ;; Catch if our frame is deleted; the delete-frame |
| 1362 | ;; event is unreliable and is handled by | 1361 | ;; event is unreliable and is handled by |
| @@ -1367,8 +1366,7 @@ mouse." | |||
| 1367 | (define-key map [mouse-movement] 'ignore) | 1366 | (define-key map [mouse-movement] 'ignore) |
| 1368 | (define-key map [mode-line t] 'ignore) | 1367 | (define-key map [mode-line t] 'ignore) |
| 1369 | (define-key map [select-window] 'ignore) | 1368 | (define-key map [select-window] 'ignore) |
| 1370 | (setq cursor-type nil | 1369 | (setq display-hourglass nil |
| 1371 | display-hourglass nil | ||
| 1372 | minor-mode-map-alist nil | 1370 | minor-mode-map-alist nil |
| 1373 | emulation-mode-map-alists nil | 1371 | emulation-mode-map-alists nil |
| 1374 | buffer-undo-list t | 1372 | buffer-undo-list t |
| @@ -1379,6 +1377,7 @@ mouse." | |||
| 1379 | timer (run-with-timer 0 fancy-splash-delay | 1377 | timer (run-with-timer 0 fancy-splash-delay |
| 1380 | #'fancy-splash-screens-1 | 1378 | #'fancy-splash-screens-1 |
| 1381 | splash-buffer)) | 1379 | splash-buffer)) |
| 1380 | (message "%s" (startup-echo-area-message)) | ||
| 1382 | (recursive-edit)) | 1381 | (recursive-edit)) |
| 1383 | (cancel-timer timer) | 1382 | (cancel-timer timer) |
| 1384 | (setq display-hourglass old-hourglass | 1383 | (setq display-hourglass old-hourglass |
| @@ -1388,11 +1387,12 @@ mouse." | |||
| 1388 | (when (frame-live-p frame) | 1387 | (when (frame-live-p frame) |
| 1389 | (select-frame frame) | 1388 | (select-frame frame) |
| 1390 | (switch-to-buffer fancy-splash-outer-buffer)))))) | 1389 | (switch-to-buffer fancy-splash-outer-buffer)))))) |
| 1391 | ;; If hide-on-input is non-nil, don't hide the buffer on input. | 1390 | ;; If hide-on-input is nil, don't hide the buffer on input. |
| 1392 | (if (or (window-minibuffer-p) | 1391 | (if (or (window-minibuffer-p) |
| 1393 | (window-dedicated-p (selected-window))) | 1392 | (window-dedicated-p (selected-window))) |
| 1394 | (pop-to-buffer (current-buffer)) | 1393 | (pop-to-buffer (current-buffer)) |
| 1395 | (switch-to-buffer "GNU Emacs")) | 1394 | (switch-to-buffer "*About GNU Emacs*")) |
| 1395 | (setq buffer-read-only nil) | ||
| 1396 | (erase-buffer) | 1396 | (erase-buffer) |
| 1397 | (if pure-space-overflow | 1397 | (if pure-space-overflow |
| 1398 | (insert "\ | 1398 | (insert "\ |
| @@ -1401,9 +1401,16 @@ Warning Warning!!! Pure space overflow !!!Warning Warning | |||
| 1401 | (let (fancy-splash-outer-buffer) | 1401 | (let (fancy-splash-outer-buffer) |
| 1402 | (fancy-splash-head) | 1402 | (fancy-splash-head) |
| 1403 | (dolist (text fancy-splash-text) | 1403 | (dolist (text fancy-splash-text) |
| 1404 | (apply #'fancy-splash-insert text)) | 1404 | (apply #'fancy-splash-insert text) |
| 1405 | (insert "\n")) | ||
| 1406 | (skip-chars-backward "\n") | ||
| 1407 | (delete-region (point) (point-max)) | ||
| 1408 | (insert "\n") | ||
| 1405 | (fancy-splash-tail) | 1409 | (fancy-splash-tail) |
| 1406 | (set-buffer-modified-p nil) | 1410 | (set-buffer-modified-p nil) |
| 1411 | (setq buffer-read-only t) | ||
| 1412 | (if (and view-read-only (not view-mode)) | ||
| 1413 | (view-mode-enter nil 'kill-buffer)) | ||
| 1407 | (goto-char (point-min))))) | 1414 | (goto-char (point-min))))) |
| 1408 | 1415 | ||
| 1409 | 1416 | ||
| @@ -1441,6 +1448,7 @@ we put it on this frame." | |||
| 1441 | (let ((prev-buffer (current-buffer))) | 1448 | (let ((prev-buffer (current-buffer))) |
| 1442 | (unwind-protect | 1449 | (unwind-protect |
| 1443 | (with-current-buffer (get-buffer-create "GNU Emacs") | 1450 | (with-current-buffer (get-buffer-create "GNU Emacs") |
| 1451 | (setq buffer-read-only nil) | ||
| 1444 | (erase-buffer) | 1452 | (erase-buffer) |
| 1445 | (set (make-local-variable 'tab-width) 8) | 1453 | (set (make-local-variable 'tab-width) 8) |
| 1446 | (if hide-on-input | 1454 | (if hide-on-input |
| @@ -1575,26 +1583,32 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1575 | auto-save-list-file-prefix))) | 1583 | auto-save-list-file-prefix))) |
| 1576 | t) | 1584 | t) |
| 1577 | (insert "\n\nIf an Emacs session crashed recently, " | 1585 | (insert "\n\nIf an Emacs session crashed recently, " |
| 1578 | "type M-x recover-session RET\nto recover" | 1586 | "type Meta-x recover-session RET\nto recover" |
| 1579 | " the files you were editing.")) | 1587 | " the files you were editing.")) |
| 1580 | 1588 | ||
| 1581 | ;; Display the input that we set up in the buffer. | 1589 | ;; Display the input that we set up in the buffer. |
| 1582 | (set-buffer-modified-p nil) | 1590 | (set-buffer-modified-p nil) |
| 1591 | (setq buffer-read-only t) | ||
| 1592 | (if (and view-read-only (not view-mode)) | ||
| 1593 | (view-mode-enter nil 'kill-buffer)) | ||
| 1583 | (goto-char (point-min)) | 1594 | (goto-char (point-min)) |
| 1584 | (if (or (window-minibuffer-p) | 1595 | (if hide-on-input |
| 1585 | (window-dedicated-p (selected-window))) | 1596 | (if (or (window-minibuffer-p) |
| 1586 | ;; If hide-on-input is nil, creating a new frame will | 1597 | (window-dedicated-p (selected-window))) |
| 1587 | ;; generate enough events that the subsequent `sit-for' | 1598 | ;; If hide-on-input is nil, creating a new frame will |
| 1588 | ;; will immediately return anyway. | 1599 | ;; generate enough events that the subsequent `sit-for' |
| 1589 | (pop-to-buffer (current-buffer)) | 1600 | ;; will immediately return anyway. |
| 1590 | (if hide-on-input | 1601 | nil ;; (pop-to-buffer (current-buffer)) |
| 1591 | (save-window-excursion | 1602 | (save-window-excursion |
| 1592 | (switch-to-buffer (current-buffer)) | 1603 | (switch-to-buffer (current-buffer)) |
| 1593 | (sit-for 120)) | 1604 | (sit-for 120)) |
| 1594 | (switch-to-buffer (current-buffer))))) | 1605 | (condition-case nil |
| 1606 | (switch-to-buffer (current-buffer)))))) | ||
| 1595 | ;; Unwind ... ensure splash buffer is killed | 1607 | ;; Unwind ... ensure splash buffer is killed |
| 1596 | (if hide-on-input | 1608 | (if hide-on-input |
| 1597 | (kill-buffer "GNU Emacs"))))) | 1609 | (kill-buffer "GNU Emacs") |
| 1610 | (switch-to-buffer "GNU Emacs") | ||
| 1611 | (rename-buffer "*About GNU Emacs*" t))))) | ||
| 1598 | 1612 | ||
| 1599 | 1613 | ||
| 1600 | (defun startup-echo-area-message () | 1614 | (defun startup-echo-area-message () |
| @@ -1651,8 +1665,9 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1651 | (defun display-splash-screen (&optional hide-on-input) | 1665 | (defun display-splash-screen (&optional hide-on-input) |
| 1652 | "Display splash screen according to display. | 1666 | "Display splash screen according to display. |
| 1653 | Fancy splash screens are used on graphic displays, | 1667 | Fancy splash screens are used on graphic displays, |
| 1654 | normal otherwise." | 1668 | normal otherwise. |
| 1655 | (interactive) | 1669 | With a prefix argument, any user input hides the splash screen." |
| 1670 | (interactive "P") | ||
| 1656 | ;; Prevent recursive calls from server-process-filter. | 1671 | ;; Prevent recursive calls from server-process-filter. |
| 1657 | (if (not (get-buffer "GNU Emacs")) | 1672 | (if (not (get-buffer "GNU Emacs")) |
| 1658 | (if (use-fancy-splash-screens-p) | 1673 | (if (use-fancy-splash-screens-p) |
diff --git a/lisp/strokes.el b/lisp/strokes.el index bcf7656347e..8d2b021ce61 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el | |||
| @@ -142,6 +142,8 @@ | |||
| 142 | ;; the user to enter strokes which "remove the pencil from the paper" | 142 | ;; the user to enter strokes which "remove the pencil from the paper" |
| 143 | ;; so to speak, so one character can have multiple strokes. | 143 | ;; so to speak, so one character can have multiple strokes. |
| 144 | 144 | ||
| 145 | ;; NOTE (Oct 7, 2006): The URLs below seem to be invalid!!! | ||
| 146 | |||
| 145 | ;; You can read more about strokes at: | 147 | ;; You can read more about strokes at: |
| 146 | 148 | ||
| 147 | ;; http://www.mit.edu/people/cadet/strokes-help.html | 149 | ;; http://www.mit.edu/people/cadet/strokes-help.html |
| @@ -211,7 +213,6 @@ static char * stroke_xpm[] = { | |||
| 211 | (defgroup strokes nil | 213 | (defgroup strokes nil |
| 212 | "Control Emacs through mouse strokes." | 214 | "Control Emacs through mouse strokes." |
| 213 | :link '(emacs-commentary-link "strokes") | 215 | :link '(emacs-commentary-link "strokes") |
| 214 | :link '(url-link "http://www.mit.edu/people/cadet/strokes-help.html") | ||
| 215 | :group 'mouse) | 216 | :group 'mouse) |
| 216 | 217 | ||
| 217 | (defcustom strokes-modeline-string " Strokes" | 218 | (defcustom strokes-modeline-string " Strokes" |
diff --git a/lisp/subr.el b/lisp/subr.el index 6d35171bf04..ad3e732c6c6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1085,9 +1085,10 @@ the hook's buffer-local value rather than its default value." | |||
| 1085 | (kill-local-variable hook) | 1085 | (kill-local-variable hook) |
| 1086 | (set hook hook-value)))))) | 1086 | (set hook hook-value)))))) |
| 1087 | 1087 | ||
| 1088 | (defun add-to-list (list-var element &optional append) | 1088 | (defun add-to-list (list-var element &optional append compare-fn) |
| 1089 | "Add ELEMENT to the value of LIST-VAR if it isn't there yet. | 1089 | "Add ELEMENT to the value of LIST-VAR if it isn't there yet. |
| 1090 | The test for presence of ELEMENT is done with `equal'. | 1090 | The test for presence of ELEMENT is done with `equal', |
| 1091 | or with COMPARE-FN if that's non-nil. | ||
| 1091 | If ELEMENT is added, it is added at the beginning of the list, | 1092 | If ELEMENT is added, it is added at the beginning of the list, |
| 1092 | unless the optional argument APPEND is non-nil, in which case | 1093 | unless the optional argument APPEND is non-nil, in which case |
| 1093 | ELEMENT is added at the end. | 1094 | ELEMENT is added at the end. |
| @@ -1099,7 +1100,13 @@ until a certain package is loaded, you should put the call to `add-to-list' | |||
| 1099 | into a hook function that will be run only after loading the package. | 1100 | into a hook function that will be run only after loading the package. |
| 1100 | `eval-after-load' provides one way to do this. In some cases | 1101 | `eval-after-load' provides one way to do this. In some cases |
| 1101 | other hooks, such as major mode hooks, can do the job." | 1102 | other hooks, such as major mode hooks, can do the job." |
| 1102 | (if (member element (symbol-value list-var)) | 1103 | (if (if compare-fn |
| 1104 | (let (present) | ||
| 1105 | (dolist (elt (symbol-value list-var)) | ||
| 1106 | (if (funcall compare-fn element elt) | ||
| 1107 | (setq present t))) | ||
| 1108 | present) | ||
| 1109 | (member element (symbol-value list-var))) | ||
| 1103 | (symbol-value list-var) | 1110 | (symbol-value list-var) |
| 1104 | (set list-var | 1111 | (set list-var |
| 1105 | (if append | 1112 | (if append |
| @@ -1733,13 +1740,20 @@ floating point support. | |||
| 1733 | (when (or obsolete (numberp nodisp)) | 1740 | (when (or obsolete (numberp nodisp)) |
| 1734 | (setq seconds (+ seconds (* 1e-3 nodisp))) | 1741 | (setq seconds (+ seconds (* 1e-3 nodisp))) |
| 1735 | (setq nodisp obsolete)) | 1742 | (setq nodisp obsolete)) |
| 1736 | (if noninteractive | 1743 | (cond |
| 1737 | (progn (sleep-for seconds) t) | 1744 | (noninteractive |
| 1738 | (unless nodisp (redisplay)) | 1745 | (sleep-for seconds) |
| 1739 | (or (<= seconds 0) | 1746 | t) |
| 1740 | (let ((read (read-event nil nil seconds))) | 1747 | ((input-pending-p) |
| 1741 | (or (null read) | 1748 | nil) |
| 1742 | (progn (push read unread-command-events) nil)))))) | 1749 | ((<= seconds 0) |
| 1750 | (or nodisp (redisplay))) | ||
| 1751 | (t | ||
| 1752 | (or nodisp (redisplay)) | ||
| 1753 | (let ((read (read-event nil nil seconds))) | ||
| 1754 | (or (null read) | ||
| 1755 | (progn (push read unread-command-events) | ||
| 1756 | nil)))))) | ||
| 1743 | 1757 | ||
| 1744 | ;;; Atomic change groups. | 1758 | ;;; Atomic change groups. |
| 1745 | 1759 | ||
| @@ -2039,7 +2053,8 @@ a system-dependent default device name is used." | |||
| 2039 | 2053 | ||
| 2040 | (defun shell-quote-argument (argument) | 2054 | (defun shell-quote-argument (argument) |
| 2041 | "Quote an argument for passing as argument to an inferior shell." | 2055 | "Quote an argument for passing as argument to an inferior shell." |
| 2042 | (if (eq system-type 'ms-dos) | 2056 | (if (or (eq system-type 'ms-dos) |
| 2057 | (and (eq system-type 'windows-nt) (w32-shell-dos-semantics))) | ||
| 2043 | ;; Quote using double quotes, but escape any existing quotes in | 2058 | ;; Quote using double quotes, but escape any existing quotes in |
| 2044 | ;; the argument with backslashes. | 2059 | ;; the argument with backslashes. |
| 2045 | (let ((result "") | 2060 | (let ((result "") |
| @@ -2053,19 +2068,17 @@ a system-dependent default device name is used." | |||
| 2053 | "\\" (substring argument end (1+ end))) | 2068 | "\\" (substring argument end (1+ end))) |
| 2054 | start (1+ end)))) | 2069 | start (1+ end)))) |
| 2055 | (concat "\"" result (substring argument start) "\"")) | 2070 | (concat "\"" result (substring argument start) "\"")) |
| 2056 | (if (eq system-type 'windows-nt) | 2071 | (if (equal argument "") |
| 2057 | (concat "\"" argument "\"") | 2072 | "''" |
| 2058 | (if (equal argument "") | 2073 | ;; Quote everything except POSIX filename characters. |
| 2059 | "''" | 2074 | ;; This should be safe enough even for really weird shells. |
| 2060 | ;; Quote everything except POSIX filename characters. | 2075 | (let ((result "") (start 0) end) |
| 2061 | ;; This should be safe enough even for really weird shells. | 2076 | (while (string-match "[^-0-9a-zA-Z_./]" argument start) |
| 2062 | (let ((result "") (start 0) end) | 2077 | (setq end (match-beginning 0) |
| 2063 | (while (string-match "[^-0-9a-zA-Z_./]" argument start) | 2078 | result (concat result (substring argument start end) |
| 2064 | (setq end (match-beginning 0) | 2079 | "\\" (substring argument end (1+ end))) |
| 2065 | result (concat result (substring argument start end) | 2080 | start (1+ end))) |
| 2066 | "\\" (substring argument end (1+ end))) | 2081 | (concat result (substring argument start)))))) |
| 2067 | start (1+ end))) | ||
| 2068 | (concat result (substring argument start))))))) | ||
| 2069 | 2082 | ||
| 2070 | (defun string-or-null-p (object) | 2083 | (defun string-or-null-p (object) |
| 2071 | "Return t if OBJECT is a string or nil. | 2084 | "Return t if OBJECT is a string or nil. |
| @@ -2154,11 +2167,32 @@ If UNDO is present and non-nil, it is a function that will be called | |||
| 2154 | (let* ((handler (and (stringp string) | 2167 | (let* ((handler (and (stringp string) |
| 2155 | (get-text-property 0 'yank-handler string))) | 2168 | (get-text-property 0 'yank-handler string))) |
| 2156 | (param (or (nth 1 handler) string)) | 2169 | (param (or (nth 1 handler) string)) |
| 2157 | (opoint (point))) | 2170 | (opoint (point)) |
| 2171 | end) | ||
| 2172 | |||
| 2158 | (setq yank-undo-function t) | 2173 | (setq yank-undo-function t) |
| 2159 | (if (nth 0 handler) ;; FUNCTION | 2174 | (if (nth 0 handler) ;; FUNCTION |
| 2160 | (funcall (car handler) param) | 2175 | (funcall (car handler) param) |
| 2161 | (insert param)) | 2176 | (insert param)) |
| 2177 | (setq end (point)) | ||
| 2178 | |||
| 2179 | ;; What should we do with `font-lock-face' properties? | ||
| 2180 | (if font-lock-defaults | ||
| 2181 | ;; No, just wipe them. | ||
| 2182 | (remove-list-of-text-properties opoint end '(font-lock-face)) | ||
| 2183 | ;; Convert them to `face'. | ||
| 2184 | (save-excursion | ||
| 2185 | (goto-char opoint) | ||
| 2186 | (while (< (point) end) | ||
| 2187 | (let ((face (get-text-property (point) 'font-lock-face)) | ||
| 2188 | run-end) | ||
| 2189 | (setq run-end | ||
| 2190 | (next-single-property-change (point) 'font-lock-face nil end)) | ||
| 2191 | (when face | ||
| 2192 | (remove-text-properties (point) run-end '(font-lock-face nil)) | ||
| 2193 | (put-text-property (point) run-end 'face face)) | ||
| 2194 | (goto-char run-end))))) | ||
| 2195 | |||
| 2162 | (unless (nth 2 handler) ;; NOEXCLUDE | 2196 | (unless (nth 2 handler) ;; NOEXCLUDE |
| 2163 | (remove-yank-excluded-properties opoint (point))) | 2197 | (remove-yank-excluded-properties opoint (point))) |
| 2164 | (if (eq yank-undo-function t) ;; not set by FUNCTION | 2198 | (if (eq yank-undo-function t) ;; not set by FUNCTION |
| @@ -2201,7 +2235,9 @@ BUFFER is the buffer (or buffer name) to associate with the process. | |||
| 2201 | BUFFER may be also nil, meaning that this process is not associated | 2235 | BUFFER may be also nil, meaning that this process is not associated |
| 2202 | with any buffer | 2236 | with any buffer |
| 2203 | COMMAND is the name of a shell command. | 2237 | COMMAND is the name of a shell command. |
| 2204 | Remaining arguments are the arguments for the command. | 2238 | Remaining arguments are the arguments for the command; they are all |
| 2239 | spliced together with blanks separating between each two of them, before | ||
| 2240 | passing the command to the shell. | ||
| 2205 | Wildcards and redirection are handled as usual in the shell. | 2241 | Wildcards and redirection are handled as usual in the shell. |
| 2206 | 2242 | ||
| 2207 | \(fn NAME BUFFER COMMAND &rest COMMAND-ARGS)" | 2243 | \(fn NAME BUFFER COMMAND &rest COMMAND-ARGS)" |
| @@ -2404,8 +2440,8 @@ If BODY finishes, `while-no-input' returns whatever value BODY produced." | |||
| 2404 | `(with-local-quit | 2440 | `(with-local-quit |
| 2405 | (catch ',catch-sym | 2441 | (catch ',catch-sym |
| 2406 | (let ((throw-on-input ',catch-sym)) | 2442 | (let ((throw-on-input ',catch-sym)) |
| 2407 | (or (not (sit-for 0 0 t)) | 2443 | (or (input-pending-p) |
| 2408 | ,@body)))))) | 2444 | ,@body)))))) |
| 2409 | 2445 | ||
| 2410 | (defmacro combine-after-change-calls (&rest body) | 2446 | (defmacro combine-after-change-calls (&rest body) |
| 2411 | "Execute BODY, but don't call the after-change functions till the end. | 2447 | "Execute BODY, but don't call the after-change functions till the end. |
| @@ -3109,8 +3145,8 @@ Usually the separator is \".\", but it can be any other string.") | |||
| 3109 | 3145 | ||
| 3110 | (defvar version-regexp-alist | 3146 | (defvar version-regexp-alist |
| 3111 | '(("^[-_+ ]?a\\(lpha\\)?$" . -3) | 3147 | '(("^[-_+ ]?a\\(lpha\\)?$" . -3) |
| 3112 | ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases | 3148 | ("^[-_+]$" . -3) ; treat "1.2.3-20050920" and "1.2-3" as alpha releases |
| 3113 | ("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release | 3149 | ("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release |
| 3114 | ("^[-_+ ]?b\\(eta\\)?$" . -2) | 3150 | ("^[-_+ ]?b\\(eta\\)?$" . -2) |
| 3115 | ("^[-_+ ]?\\(pre\\|rc\\)$" . -1)) | 3151 | ("^[-_+ ]?\\(pre\\|rc\\)$" . -1)) |
| 3116 | "*Specify association between non-numeric version part and a priority. | 3152 | "*Specify association between non-numeric version part and a priority. |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 9e3393b04a1..3e86c2a8ead 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1287,14 +1287,19 @@ correspoinding TextEncodingBase value." | |||
| 1287 | (find-coding-systems-string string))) | 1287 | (find-coding-systems-string string))) |
| 1288 | (setq coding-system | 1288 | (setq coding-system |
| 1289 | (coding-system-change-eol-conversion coding-system 'mac)) | 1289 | (coding-system-change-eol-conversion coding-system 'mac)) |
| 1290 | (when (and (eq system-type 'darwin) | 1290 | (let ((str string)) |
| 1291 | (eq coding-system 'japanese-shift-jis-mac)) | 1291 | (when (and (eq system-type 'darwin) |
| 1292 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) | 1292 | (eq coding-system 'japanese-shift-jis-mac)) |
| 1293 | (setq string (subst-char-in-string ?\\ ?\x80 string)) | 1293 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) |
| 1294 | (subst-char-in-string ?\(J\(B ?\x5c string t)) | 1294 | (setq str (subst-char-in-string ?\\ ?\x80 str)) |
| 1295 | (setq data (mac-code-convert-string | 1295 | (subst-char-in-string ?\(J\(B ?\x5c str t) |
| 1296 | (encode-coding-string string coding-system) | 1296 | ;; ASCII-only? |
| 1297 | (or encoding coding-system) nil))) | 1297 | (if (string-match "\\`[\x00-\x7f]*\\'" str) |
| 1298 | (setq str nil))) | ||
| 1299 | (and str | ||
| 1300 | (setq data (mac-code-convert-string | ||
| 1301 | (encode-coding-string str coding-system) | ||
| 1302 | (or encoding coding-system) nil))))) | ||
| 1298 | (or data (encode-coding-string string (if (eq (byteorder) ?B) | 1303 | (or data (encode-coding-string string (if (eq (byteorder) ?B) |
| 1299 | 'utf-16be-mac | 1304 | 'utf-16be-mac |
| 1300 | 'utf-16le-mac))))) | 1305 | 'utf-16le-mac))))) |
| @@ -1528,19 +1533,20 @@ in `selection-converter-alist', which see." | |||
| 1528 | 1533 | ||
| 1529 | ;;; Event IDs | 1534 | ;;; Event IDs |
| 1530 | ;; kCoreEventClass | 1535 | ;; kCoreEventClass |
| 1531 | (put 'open-application 'mac-apple-event-id "oapp") ; kAEOpenApplication | 1536 | (put 'open-application 'mac-apple-event-id "oapp") ; kAEOpenApplication |
| 1532 | (put 'reopen-application 'mac-apple-event-id "rapp") ; kAEReopenApplication | 1537 | (put 'reopen-application 'mac-apple-event-id "rapp") ; kAEReopenApplication |
| 1533 | (put 'open-documents 'mac-apple-event-id "odoc") ; kAEOpenDocuments | 1538 | (put 'open-documents 'mac-apple-event-id "odoc") ; kAEOpenDocuments |
| 1534 | (put 'print-documents 'mac-apple-event-id "pdoc") ; kAEPrintDocuments | 1539 | (put 'print-documents 'mac-apple-event-id "pdoc") ; kAEPrintDocuments |
| 1535 | (put 'open-contents 'mac-apple-event-id "ocon") ; kAEOpenContents | 1540 | (put 'open-contents 'mac-apple-event-id "ocon") ; kAEOpenContents |
| 1536 | (put 'quit-application 'mac-apple-event-id "quit") ; kAEQuitApplication | 1541 | (put 'quit-application 'mac-apple-event-id "quit") ; kAEQuitApplication |
| 1537 | (put 'application-died 'mac-apple-event-id "obit") ; kAEApplicationDied | 1542 | (put 'application-died 'mac-apple-event-id "obit") ; kAEApplicationDied |
| 1538 | (put 'show-preferences 'mac-apple-event-id "pref") ; kAEShowPreferences | 1543 | (put 'show-preferences 'mac-apple-event-id "pref") ; kAEShowPreferences |
| 1539 | (put 'autosave-now 'mac-apple-event-id "asav") ; kAEAutosaveNow | 1544 | (put 'autosave-now 'mac-apple-event-id "asav") ; kAEAutosaveNow |
| 1540 | ;; kAEInternetEventClass | 1545 | ;; kAEInternetEventClass |
| 1541 | (put 'get-url 'mac-apple-event-id "GURL") ; kAEGetURL | 1546 | (put 'get-url 'mac-apple-event-id "GURL") ; kAEGetURL |
| 1542 | ;; Converted HI command events | 1547 | ;; Converted HI command events |
| 1543 | (put 'about 'mac-apple-event-id "abou") ; kHICommandAbout | 1548 | (put 'about 'mac-apple-event-id "abou") ; kHICommandAbout |
| 1549 | (put 'show-hide-font-panel 'mac-apple-event-id "shfp") ; kHICommandShowHideFontPanel | ||
| 1544 | 1550 | ||
| 1545 | (defmacro mac-event-spec (event) | 1551 | (defmacro mac-event-spec (event) |
| 1546 | `(nth 1 ,event)) | 1552 | `(nth 1 ,event)) |
| @@ -1796,6 +1802,8 @@ With numeric ARG, display the font panel if and only if ARG is positive." | |||
| 1796 | 'mac-handle-font-panel-closed) | 1802 | 'mac-handle-font-panel-closed) |
| 1797 | ;; kEventClassFont/kEventFontSelection | 1803 | ;; kEventClassFont/kEventFontSelection |
| 1798 | (define-key mac-apple-event-map [font selection] 'mac-handle-font-selection) | 1804 | (define-key mac-apple-event-map [font selection] 'mac-handle-font-selection) |
| 1805 | (define-key mac-apple-event-map [hi-command show-hide-font-panel] | ||
| 1806 | 'mac-font-panel-mode) | ||
| 1799 | 1807 | ||
| 1800 | (define-key-after menu-bar-showhide-menu [mac-font-panel-mode] | 1808 | (define-key-after menu-bar-showhide-menu [mac-font-panel-mode] |
| 1801 | (menu-bar-make-mm-toggle mac-font-panel-mode | 1809 | (menu-bar-make-mm-toggle mac-font-panel-mode |
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index fe774a4125f..967d9918b59 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -2393,6 +2393,12 @@ order until succeed.") | |||
| 2393 | (kill-new clipboard-text)) | 2393 | (kill-new clipboard-text)) |
| 2394 | (yank))) | 2394 | (yank))) |
| 2395 | 2395 | ||
| 2396 | (defun x-menu-bar-open (&optional frame) | ||
| 2397 | "Open the menu bar if `menu-bar-mode' is on. otherwise call `tmm-menubar'." | ||
| 2398 | (interactive "i") | ||
| 2399 | (if menu-bar-mode (menu-bar-open frame) | ||
| 2400 | (tmm-menubar))) | ||
| 2401 | |||
| 2396 | 2402 | ||
| 2397 | ;;; Window system initialization. | 2403 | ;;; Window system initialization. |
| 2398 | 2404 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 2e498a8de86..e574c34543f 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -162,17 +162,20 @@ | |||
| 162 | ;; These keys are available in xterm starting from version 216 | 162 | ;; These keys are available in xterm starting from version 216 |
| 163 | ;; if the modifyOtherKeys resource is set to 1. | 163 | ;; if the modifyOtherKeys resource is set to 1. |
| 164 | 164 | ||
| 165 | (define-key xterm-function-map "\e[27;5;9~" [C-tab]) | ||
| 166 | (define-key xterm-function-map "\e[27;5;13~" [C-return]) | ||
| 165 | (define-key xterm-function-map "\e[27;5;39~" [?\C-\']) | 167 | (define-key xterm-function-map "\e[27;5;39~" [?\C-\']) |
| 168 | (define-key xterm-function-map "\e[27;5;44~" [?\C-,]) | ||
| 166 | (define-key xterm-function-map "\e[27;5;45~" [?\C--]) | 169 | (define-key xterm-function-map "\e[27;5;45~" [?\C--]) |
| 167 | 170 | (define-key xterm-function-map "\e[27;5;46~" [?\C-.]) | |
| 171 | (define-key xterm-function-map "\e[27;5;47~" [?\C-/]) | ||
| 168 | (define-key xterm-function-map "\e[27;5;48~" [?\C-0]) | 172 | (define-key xterm-function-map "\e[27;5;48~" [?\C-0]) |
| 169 | (define-key xterm-function-map "\e[27;5;49~" [?\C-1]) | 173 | (define-key xterm-function-map "\e[27;5;49~" [?\C-1]) |
| 170 | ;; Not all C-DIGIT keys have a distinct binding. | 174 | ;; Not all C-DIGIT keys have a distinct binding. |
| 171 | (define-key xterm-function-map "\e[27;5;57~" [?\C-9]) | 175 | (define-key xterm-function-map "\e[27;5;57~" [?\C-9]) |
| 172 | 176 | (define-key xterm-function-map "\e[27;5;59~" [(C-\;)]) | |
| 173 | (define-key xterm-function-map "\e[27;5;59~" [?\C-\;]) | ||
| 174 | (define-key xterm-function-map "\e[27;5;61~" [?\C-=]) | 177 | (define-key xterm-function-map "\e[27;5;61~" [?\C-=]) |
| 175 | 178 | (define-key xterm-function-map "\e[27;5;92~" [?\C-\\]) | |
| 176 | 179 | ||
| 177 | (define-key xterm-function-map "\e[27;6;33~" [?\C-!]) | 180 | (define-key xterm-function-map "\e[27;6;33~" [?\C-!]) |
| 178 | (define-key xterm-function-map "\e[27;6;34~" [?\C-\"]) | 181 | (define-key xterm-function-map "\e[27;6;34~" [?\C-\"]) |
| @@ -184,26 +187,93 @@ | |||
| 184 | (define-key xterm-function-map "\e[27;6;41~" [?\C-)]) | 187 | (define-key xterm-function-map "\e[27;6;41~" [?\C-)]) |
| 185 | (define-key xterm-function-map "\e[27;6;42~" [?\C-*]) | 188 | (define-key xterm-function-map "\e[27;6;42~" [?\C-*]) |
| 186 | (define-key xterm-function-map "\e[27;6;43~" [?\C-+]) | 189 | (define-key xterm-function-map "\e[27;6;43~" [?\C-+]) |
| 187 | |||
| 188 | (define-key xterm-function-map "\e[27;6;58~" [?\C-:]) | 190 | (define-key xterm-function-map "\e[27;6;58~" [?\C-:]) |
| 189 | (define-key xterm-function-map "\e[27;6;60~" [?\C-<]) | 191 | (define-key xterm-function-map "\e[27;6;60~" [?\C-<]) |
| 190 | (define-key xterm-function-map "\e[27;6;62~" [?\C->]) | 192 | (define-key xterm-function-map "\e[27;6;62~" [?\C->]) |
| 191 | (define-key xterm-function-map "\e[27;6;63~" [(C-\?)]) | 193 | (define-key xterm-function-map "\e[27;6;63~" [(C-\?)]) |
| 192 | 194 | ||
| 193 | (define-key xterm-function-map "\e[27;5;9~" [C-tab]) | 195 | ;; These are the strings emitted for various C-M- combinations |
| 194 | (define-key xterm-function-map "\e[27;5;13~" [C-return]) | 196 | ;; for keyboards that the Meta and Alt modifiers are on the same |
| 195 | (define-key xterm-function-map "\e[27;5;44~" [?\C-,]) | 197 | ;; key (usually labeled "Alt"). |
| 196 | (define-key xterm-function-map "\e[27;5;46~" [?\C-.]) | 198 | (define-key xterm-function-map "\e[27;13;9~" [(C-M-tab)]) |
| 197 | (define-key xterm-function-map "\e[27;5;47~" [?\C-/]) | 199 | (define-key xterm-function-map "\e[27;13;13~" [(C-M-return)]) |
| 198 | (define-key xterm-function-map "\e[27;5;92~" [?\C-\\]) | ||
| 199 | |||
| 200 | (define-key xterm-function-map "\e[27;2;9~" [S-tab]) | ||
| 201 | (define-key xterm-function-map "\e[27;2;13~" [S-return]) | ||
| 202 | |||
| 203 | (define-key xterm-function-map "\e[27;6;9~" [(C-S-tab)]) | ||
| 204 | 200 | ||
| 201 | (define-key xterm-function-map "\e[27;13;39~" [?\C-\M-\']) | ||
| 202 | (define-key xterm-function-map "\e[27;13;44~" [?\C-\M-,]) | ||
| 203 | (define-key xterm-function-map "\e[27;13;45~" [?\C-\M--]) | ||
| 205 | (define-key xterm-function-map "\e[27;13;46~" [?\C-\M-.]) | 204 | (define-key xterm-function-map "\e[27;13;46~" [?\C-\M-.]) |
| 206 | 205 | (define-key xterm-function-map "\e[27;13;47~" [?\C-\M-/]) | |
| 206 | (define-key xterm-function-map "\e[27;13;48~" [?\C-\M-0]) | ||
| 207 | (define-key xterm-function-map "\e[27;13;49~" [?\C-\M-1]) | ||
| 208 | (define-key xterm-function-map "\e[27;13;50~" [?\C-\M-2]) | ||
| 209 | (define-key xterm-function-map "\e[27;13;51~" [?\C-\M-3]) | ||
| 210 | (define-key xterm-function-map "\e[27;13;52~" [?\C-\M-4]) | ||
| 211 | (define-key xterm-function-map "\e[27;13;53~" [?\C-\M-5]) | ||
| 212 | (define-key xterm-function-map "\e[27;13;54~" [?\C-\M-6]) | ||
| 213 | (define-key xterm-function-map "\e[27;13;55~" [?\C-\M-7]) | ||
| 214 | (define-key xterm-function-map "\e[27;13;56~" [?\C-\M-8]) | ||
| 215 | (define-key xterm-function-map "\e[27;13;57~" [?\C-\M-9]) | ||
| 216 | (define-key xterm-function-map "\e[27;13;59~" [?\C-\M-\;]) | ||
| 217 | (define-key xterm-function-map "\e[27;13;61~" [?\C-\M-=]) | ||
| 218 | (define-key xterm-function-map "\e[27;13;92~" [?\C-\M-\\]) | ||
| 219 | |||
| 220 | (define-key xterm-function-map "\e[27;14;33~" [?\C-\M-!]) | ||
| 221 | (define-key xterm-function-map "\e[27;14;34~" [?\C-\M-\"]) | ||
| 222 | (define-key xterm-function-map "\e[27;14;35~" [?\C-\M-#]) | ||
| 223 | (define-key xterm-function-map "\e[27;14;36~" [?\C-\M-$]) | ||
| 224 | (define-key xterm-function-map "\e[27;14;37~" [?\C-\M-%]) | ||
| 225 | (define-key xterm-function-map "\e[27;14;38~" [(C-M-&)]) | ||
| 226 | (define-key xterm-function-map "\e[27;14;40~" [?\C-\M-(]) | ||
| 227 | (define-key xterm-function-map "\e[27;14;41~" [?\C-\M-)]) | ||
| 228 | (define-key xterm-function-map "\e[27;14;42~" [?\C-\M-*]) | ||
| 229 | (define-key xterm-function-map "\e[27;14;43~" [?\C-\M-+]) | ||
| 230 | (define-key xterm-function-map "\e[27;14;58~" [?\C-\M-:]) | ||
| 231 | (define-key xterm-function-map "\e[27;14;60~" [?\C-\M-<]) | ||
| 232 | (define-key xterm-function-map "\e[27;14;62~" [?\C-\M->]) | ||
| 233 | (define-key xterm-function-map "\e[27;14;63~" [(C-M-\?)]) | ||
| 234 | |||
| 235 | (define-key xterm-function-map "\e[27;7;9~" [(C-M-tab)]) | ||
| 236 | (define-key xterm-function-map "\e[27;7;13~" [(C-M-return)]) | ||
| 237 | |||
| 238 | (define-key xterm-function-map "\e[27;7;39~" [?\C-\M-\']) | ||
| 239 | (define-key xterm-function-map "\e[27;7;44~" [?\C-\M-,]) | ||
| 240 | (define-key xterm-function-map "\e[27;7;45~" [?\C-\M--]) | ||
| 241 | (define-key xterm-function-map "\e[27;7;46~" [?\C-\M-.]) | ||
| 242 | (define-key xterm-function-map "\e[27;7;47~" [?\C-\M-/]) | ||
| 243 | (define-key xterm-function-map "\e[27;7;48~" [?\C-\M-0]) | ||
| 244 | (define-key xterm-function-map "\e[27;7;49~" [?\C-\M-1]) | ||
| 245 | (define-key xterm-function-map "\e[27;7;50~" [?\C-\M-2]) | ||
| 246 | (define-key xterm-function-map "\e[27;7;51~" [?\C-\M-3]) | ||
| 247 | (define-key xterm-function-map "\e[27;7;52~" [?\C-\M-4]) | ||
| 248 | (define-key xterm-function-map "\e[27;7;53~" [?\C-\M-5]) | ||
| 249 | (define-key xterm-function-map "\e[27;7;54~" [?\C-\M-6]) | ||
| 250 | (define-key xterm-function-map "\e[27;7;55~" [?\C-\M-7]) | ||
| 251 | (define-key xterm-function-map "\e[27;7;56~" [?\C-\M-8]) | ||
| 252 | (define-key xterm-function-map "\e[27;7;57~" [?\C-\M-9]) | ||
| 253 | (define-key xterm-function-map "\e[27;7;59~" [?\C-\M-\;]) | ||
| 254 | (define-key xterm-function-map "\e[27;7;61~" [?\C-\M-=]) | ||
| 255 | (define-key xterm-function-map "\e[27;7;92~" [?\C-\M-\\]) | ||
| 256 | |||
| 257 | (define-key xterm-function-map "\e[27;8;33~" [?\C-\M-!]) | ||
| 258 | (define-key xterm-function-map "\e[27;8;34~" [?\C-\M-\"]) | ||
| 259 | (define-key xterm-function-map "\e[27;8;35~" [?\C-\M-#]) | ||
| 260 | (define-key xterm-function-map "\e[27;8;36~" [?\C-\M-$]) | ||
| 261 | (define-key xterm-function-map "\e[27;8;37~" [?\C-\M-%]) | ||
| 262 | (define-key xterm-function-map "\e[27;8;38~" [(C-M-&)]) | ||
| 263 | (define-key xterm-function-map "\e[27;8;40~" [?\C-\M-(]) | ||
| 264 | (define-key xterm-function-map "\e[27;8;41~" [?\C-\M-)]) | ||
| 265 | (define-key xterm-function-map "\e[27;8;42~" [?\C-\M-*]) | ||
| 266 | (define-key xterm-function-map "\e[27;8;43~" [?\C-\M-+]) | ||
| 267 | (define-key xterm-function-map "\e[27;8;58~" [?\C-\M-:]) | ||
| 268 | (define-key xterm-function-map "\e[27;8;60~" [?\C-\M-<]) | ||
| 269 | (define-key xterm-function-map "\e[27;8;62~" [?\C-\M->]) | ||
| 270 | (define-key xterm-function-map "\e[27;8;63~" [(C-M-\?)]) | ||
| 271 | |||
| 272 | (define-key xterm-function-map "\e[27;2;9~" [S-tab]) | ||
| 273 | (define-key xterm-function-map "\e[27;2;13~" [S-return]) | ||
| 274 | |||
| 275 | (define-key xterm-function-map "\e[27;6;9~" [(C-S-tab)]) | ||
| 276 | (define-key xterm-function-map "\e[27;6;13~" [(C-S-return)]) | ||
| 207 | 277 | ||
| 208 | ;; Other versions of xterm might emit these. | 278 | ;; Other versions of xterm might emit these. |
| 209 | (define-key xterm-function-map "\e[A" [up]) | 279 | (define-key xterm-function-map "\e[A" [up]) |
diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index e762f87f328..f7a725242ed 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el | |||
| @@ -75,8 +75,8 @@ not align (only setting space according to `conf-assignment-space')." | |||
| 75 | (define-key map "\C-c\C-u" 'conf-unix-mode) | 75 | (define-key map "\C-c\C-u" 'conf-unix-mode) |
| 76 | (define-key map "\C-c\C-w" 'conf-windows-mode) | 76 | (define-key map "\C-c\C-w" 'conf-windows-mode) |
| 77 | (define-key map "\C-c\C-j" 'conf-javaprop-mode) | 77 | (define-key map "\C-c\C-j" 'conf-javaprop-mode) |
| 78 | (define-key map "\C-c\C-s" 'conf-space-mode) | 78 | (define-key map "\C-c\C-s" 'conf-space-keywords) |
| 79 | (define-key map "\C-c " 'conf-space-mode) | 79 | (define-key map "\C-c " 'conf-space-keywords) |
| 80 | (define-key map "\C-c\C-c" 'conf-colon-mode) | 80 | (define-key map "\C-c\C-c" 'conf-colon-mode) |
| 81 | (define-key map "\C-c:" 'conf-colon-mode) | 81 | (define-key map "\C-c:" 'conf-colon-mode) |
| 82 | (define-key map "\C-c\C-x" 'conf-xdefaults-mode) | 82 | (define-key map "\C-c\C-x" 'conf-xdefaults-mode) |
| @@ -168,7 +168,7 @@ not align (only setting space according to `conf-assignment-space')." | |||
| 168 | ("/resmgr\\.conf" . "class\\|add\\|allow\\|deny") | 168 | ("/resmgr\\.conf" . "class\\|add\\|allow\\|deny") |
| 169 | ("/dictionary\\.lst\\'" . "DICT\\|HYPH\\|THES") | 169 | ("/dictionary\\.lst\\'" . "DICT\\|HYPH\\|THES") |
| 170 | ("/tuxracer/options" . "set")) | 170 | ("/tuxracer/options" . "set")) |
| 171 | "File name based settings for `conf-space-keywords'.") | 171 | "File-name-based settings for the variable `conf-space-keywords'.") |
| 172 | 172 | ||
| 173 | (defvar conf-space-keywords nil | 173 | (defvar conf-space-keywords nil |
| 174 | "Regexps for functions that may come before a space assignment. | 174 | "Regexps for functions that may come before a space assignment. |
| @@ -188,7 +188,7 @@ This variable is best set in the file local variables, or through | |||
| 188 | '(1 'font-lock-keyword-face) | 188 | '(1 'font-lock-keyword-face) |
| 189 | '(2 'font-lock-variable-name-face)) | 189 | '(2 'font-lock-variable-name-face)) |
| 190 | '("^[ \t]*\\([^\000- ]+\\)" 1 'font-lock-variable-name-face))) | 190 | '("^[ \t]*\\([^\000- ]+\\)" 1 'font-lock-variable-name-face))) |
| 191 | "Keywords to hilight in Conf Space mode.") | 191 | "Keywords to highlight in Conf Space mode.") |
| 192 | 192 | ||
| 193 | (defvar conf-colon-font-lock-keywords | 193 | (defvar conf-colon-font-lock-keywords |
| 194 | `(;; [section] (do this first because it may look like a parameter) | 194 | `(;; [section] (do this first because it may look like a parameter) |
| @@ -446,10 +446,11 @@ x.2.y.1.z.2.zz =" | |||
| 446 | (define-derived-mode conf-space-mode conf-unix-mode "Conf[Space]" | 446 | (define-derived-mode conf-space-mode conf-unix-mode "Conf[Space]" |
| 447 | "Conf Mode starter for space separated conf files. | 447 | "Conf Mode starter for space separated conf files. |
| 448 | \"Assignments\" are with ` '. Keywords before the parameters are | 448 | \"Assignments\" are with ` '. Keywords before the parameters are |
| 449 | recognized according to `conf-space-keywords'. Interactively | 449 | recognized according to the variable `conf-space-keywords-alist'. |
| 450 | with a prefix ARG of `0' no keywords will be recognized. With | 450 | Alternatively, you can specify a value for the file local variable |
| 451 | any other prefix arg you will be prompted for a regexp to match | 451 | `conf-space-keywords'. |
| 452 | the keywords. | 452 | Use the function `conf-space-keywords' if you want to specify keywords |
| 453 | in an interactive fashion instead. | ||
| 453 | 454 | ||
| 454 | For details see `conf-mode'. Example: | 455 | For details see `conf-mode'. Example: |
| 455 | 456 | ||
| @@ -465,34 +466,61 @@ class desktop | |||
| 465 | add /dev/audio desktop | 466 | add /dev/audio desktop |
| 466 | add /dev/mixer desktop" | 467 | add /dev/mixer desktop" |
| 467 | (conf-mode-initialize "#" 'conf-space-font-lock-keywords) | 468 | (conf-mode-initialize "#" 'conf-space-font-lock-keywords) |
| 468 | (set (make-local-variable 'conf-assignment-sign) | 469 | (make-local-variable 'conf-assignment-sign) |
| 469 | nil) | 470 | (setq conf-assignment-sign nil) |
| 470 | ;; This doesn't seem right, but the next two depend on conf-space-keywords | 471 | (make-local-variable 'conf-space-keywords) |
| 471 | ;; being set, while after-change-major-mode-hook might set up imenu, needing | 472 | (cond (buffer-file-name |
| 472 | ;; the following result: | 473 | ;; We set conf-space-keywords directly, but a value which is |
| 473 | (hack-local-variables-prop-line) | 474 | ;; in the local variables list or interactively specified |
| 474 | (hack-local-variables) | 475 | ;; (see the function conf-space-keywords) takes precedence. |
| 475 | (cond (current-prefix-arg | 476 | (setq conf-space-keywords |
| 476 | (set (make-local-variable 'conf-space-keywords) | 477 | (assoc-default buffer-file-name conf-space-keywords-alist |
| 477 | (if (> (prefix-numeric-value current-prefix-arg) 0) | 478 | 'string-match)))) |
| 478 | (read-string "Regexp to match keywords: ")))) | 479 | (conf-space-mode-internal) |
| 479 | (conf-space-keywords) | 480 | ;; In case the local variables list specifies conf-space-keywords, |
| 480 | (buffer-file-name | 481 | ;; recompute other things from that afterward. |
| 481 | (set (make-local-variable 'conf-space-keywords) | 482 | (add-hook 'hack-local-variables-hook 'conf-space-mode-internal nil t)) |
| 482 | (assoc-default buffer-file-name conf-space-keywords-alist | 483 | |
| 483 | 'string-match)))) | 484 | ;;;###autoload |
| 484 | (set (make-local-variable 'conf-assignment-regexp) | 485 | (defun conf-space-keywords (keywords) |
| 485 | (if conf-space-keywords | 486 | "Enter Conf Space mode using regexp KEYWORDS to match the keywords. |
| 486 | (concat "\\(?:" conf-space-keywords "\\)[ \t]+.+?\\([ \t]+\\|$\\)") | 487 | See `conf-space-mode'." |
| 487 | ".+?\\([ \t]+\\|$\\)")) | 488 | (interactive "sConf Space keyword regexp: ") |
| 489 | (delay-mode-hooks | ||
| 490 | (conf-space-mode)) | ||
| 491 | (if (string-equal keywords "") | ||
| 492 | (setq keywords nil)) | ||
| 493 | (setq conf-space-keywords keywords) | ||
| 494 | (conf-space-mode-internal) | ||
| 495 | (run-mode-hooks)) | ||
| 496 | |||
| 497 | (defun conf-space-mode-internal () | ||
| 498 | (make-local-variable 'conf-assignment-regexp) | ||
| 499 | (setq conf-assignment-regexp | ||
| 500 | (if conf-space-keywords | ||
| 501 | (concat "\\(?:" conf-space-keywords "\\)[ \t]+.+?\\([ \t]+\\|$\\)") | ||
| 502 | ".+?\\([ \t]+\\|$\\)")) | ||
| 503 | ;; If Font Lock is already enabled, reenable it with new | ||
| 504 | ;; conf-assignment-regexp. | ||
| 505 | (when (and font-lock-mode | ||
| 506 | (boundp 'font-lock-keywords)) ;see `normal-mode' | ||
| 507 | (font-lock-add-keywords nil nil) | ||
| 508 | (font-lock-mode 1)) | ||
| 509 | ;; Copy so that we don't destroy shared structure. | ||
| 510 | (setq imenu-generic-expression (copy-sequence imenu-generic-expression)) | ||
| 511 | ;; Get rid of any existing Parameters element. | ||
| 512 | (setq imenu-generic-expression | ||
| 513 | (delq (assoc "Parameters" imenu-generic-expression) | ||
| 514 | imenu-generic-expression)) | ||
| 515 | ;; Add a new one based on conf-space-keywords. | ||
| 488 | (setq imenu-generic-expression | 516 | (setq imenu-generic-expression |
| 489 | `(,@(cdr imenu-generic-expression) | 517 | (cons `("Parameters" |
| 490 | ("Parameters" | 518 | ,(if conf-space-keywords |
| 491 | ,(if conf-space-keywords | 519 | (concat "^[ \t]*\\(?:" conf-space-keywords |
| 492 | (concat "^[ \t]*\\(?:" conf-space-keywords | 520 | "\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)") |
| 493 | "\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)") | 521 | "^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)") |
| 494 | "^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)") | 522 | 1) |
| 495 | 1)))) | 523 | imenu-generic-expression))) |
| 496 | 524 | ||
| 497 | ;;;###autoload | 525 | ;;;###autoload |
| 498 | (define-derived-mode conf-colon-mode conf-unix-mode "Conf[Colon]" | 526 | (define-derived-mode conf-colon-mode conf-unix-mode "Conf[Colon]" |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 95f73b56952..514350119fe 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -89,7 +89,8 @@ reinserts the fill prefix in each resulting line." | |||
| 89 | (defcustom adaptive-fill-regexp | 89 | (defcustom adaptive-fill-regexp |
| 90 | ;; Added `!' for doxygen comments starting with `//!' or `/*!'. | 90 | ;; Added `!' for doxygen comments starting with `//!' or `/*!'. |
| 91 | ;; Added `%' for TeX comments. | 91 | ;; Added `%' for TeX comments. |
| 92 | (purecopy "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") | 92 | ;; RMS: deleted the code to match `1.' and `(1)'. |
| 93 | "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\)*" | ||
| 93 | "*Regexp to match text at start of line that constitutes indentation. | 94 | "*Regexp to match text at start of line that constitutes indentation. |
| 94 | If Adaptive Fill mode is enabled, a prefix matching this pattern | 95 | If Adaptive Fill mode is enabled, a prefix matching this pattern |
| 95 | on the first and second lines of a paragraph is used as the | 96 | on the first and second lines of a paragraph is used as the |
| @@ -292,7 +293,9 @@ act as a paragraph-separator." | |||
| 292 | 293 | ||
| 293 | (defun fill-single-word-nobreak-p () | 294 | (defun fill-single-word-nobreak-p () |
| 294 | "Don't break a line after the first or before the last word of a sentence." | 295 | "Don't break a line after the first or before the last word of a sentence." |
| 295 | (or (looking-at (concat "[ \t]*\\sw+" "\\(?:" (sentence-end) "\\)")) | 296 | ;; Actually, allow breaking before the last word of a sentence, so long as |
| 297 | ;; it's not the last word of the paragraph. | ||
| 298 | (or (looking-at (concat "[ \t]*\\sw+" "\\(?:" (sentence-end) "\\)[ \t]*$")) | ||
| 296 | (save-excursion | 299 | (save-excursion |
| 297 | (skip-chars-backward " \t") | 300 | (skip-chars-backward " \t") |
| 298 | (and (/= (skip-syntax-backward "w") 0) | 301 | (and (/= (skip-syntax-backward "w") 0) |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 23f4756f4a7..ebee4691e8c 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -992,7 +992,7 @@ Mostly we check word delimiters." | |||
| 992 | (flyspell-accept-buffer-local-defs) | 992 | (flyspell-accept-buffer-local-defs) |
| 993 | (let* ((cursor-location (point)) | 993 | (let* ((cursor-location (point)) |
| 994 | (flyspell-word (flyspell-get-word following)) | 994 | (flyspell-word (flyspell-get-word following)) |
| 995 | start end poss word) | 995 | start end poss word ispell-filter) |
| 996 | (if (or (eq flyspell-word nil) | 996 | (if (or (eq flyspell-word nil) |
| 997 | (and (fboundp flyspell-generic-check-word-predicate) | 997 | (and (fboundp flyspell-generic-check-word-predicate) |
| 998 | (not (funcall flyspell-generic-check-word-predicate)))) | 998 | (not (funcall flyspell-generic-check-word-predicate)))) |
| @@ -1050,7 +1050,12 @@ Mostly we check word delimiters." | |||
| 1050 | (not (string= "" (car ispell-filter)))))) | 1050 | (not (string= "" (car ispell-filter)))))) |
| 1051 | ;; (ispell-send-string "!\n") | 1051 | ;; (ispell-send-string "!\n") |
| 1052 | ;; back to terse mode. | 1052 | ;; back to terse mode. |
| 1053 | ;; Remove leading empty element | ||
| 1053 | (setq ispell-filter (cdr ispell-filter)) | 1054 | (setq ispell-filter (cdr ispell-filter)) |
| 1055 | ;; ispell process should return something after word is sent. | ||
| 1056 | ;; Tag word as valid (i.e., skip) otherwise | ||
| 1057 | (or ispell-filter | ||
| 1058 | (setq ispell-filter '(*))) | ||
| 1054 | (if (consp ispell-filter) | 1059 | (if (consp ispell-filter) |
| 1055 | (setq poss (ispell-parse-output (car ispell-filter)))) | 1060 | (setq poss (ispell-parse-output (car ispell-filter)))) |
| 1056 | (let ((res (cond ((eq poss t) | 1061 | (let ((res (cond ((eq poss t) |
| @@ -1455,6 +1460,22 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1455 | (while (re-search-forward regexp nil t) | 1460 | (while (re-search-forward regexp nil t) |
| 1456 | (delete-region (match-beginning 0) (match-end 0))))))))) | 1461 | (delete-region (match-beginning 0) (match-end 0))))))))) |
| 1457 | 1462 | ||
| 1463 | ;;* --------------------------------------------------------------- | ||
| 1464 | ;;* flyspell-check-region-doublons | ||
| 1465 | ;;* --------------------------------------------------------------- | ||
| 1466 | (defun flyspell-check-region-doublons (beg end) | ||
| 1467 | "Check for adjacent duplicated words (doublons) in the given region." | ||
| 1468 | (save-excursion | ||
| 1469 | (goto-char beg) | ||
| 1470 | (flyspell-word) ; Make sure current word is checked | ||
| 1471 | (backward-word 1) | ||
| 1472 | (while (and (< (point) end) | ||
| 1473 | (re-search-forward "\\b\\([^ \n\t]+\\)[ \n\t]+\\1\\b" | ||
| 1474 | end 'move)) | ||
| 1475 | (flyspell-word) | ||
| 1476 | (backward-word 1)) | ||
| 1477 | (flyspell-word))) | ||
| 1478 | |||
| 1458 | ;;*---------------------------------------------------------------------*/ | 1479 | ;;*---------------------------------------------------------------------*/ |
| 1459 | ;;* flyspell-large-region ... */ | 1480 | ;;* flyspell-large-region ... */ |
| 1460 | ;;*---------------------------------------------------------------------*/ | 1481 | ;;*---------------------------------------------------------------------*/ |
| @@ -1499,7 +1520,8 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1499 | (progn | 1520 | (progn |
| 1500 | (flyspell-process-localwords buffer) | 1521 | (flyspell-process-localwords buffer) |
| 1501 | (with-current-buffer curbuf | 1522 | (with-current-buffer curbuf |
| 1502 | (flyspell-delete-region-overlays beg end)) | 1523 | (flyspell-delete-region-overlays beg end) |
| 1524 | (flyspell-check-region-doublons beg end)) | ||
| 1503 | (flyspell-external-point-words)) | 1525 | (flyspell-external-point-words)) |
| 1504 | (error "Can't check region..."))))) | 1526 | (error "Can't check region..."))))) |
| 1505 | 1527 | ||
| @@ -1830,7 +1852,7 @@ This command proposes various successive corrections for the current word." | |||
| 1830 | (let ((start (car (cdr word))) | 1852 | (let ((start (car (cdr word))) |
| 1831 | (end (car (cdr (cdr word)))) | 1853 | (end (car (cdr (cdr word)))) |
| 1832 | (word (car word)) | 1854 | (word (car word)) |
| 1833 | poss) | 1855 | poss ispell-filter) |
| 1834 | (setq flyspell-auto-correct-word word) | 1856 | (setq flyspell-auto-correct-word word) |
| 1835 | ;; now check spelling of word. | 1857 | ;; now check spelling of word. |
| 1836 | (ispell-send-string "%\n") ;put in verbose mode | 1858 | (ispell-send-string "%\n") ;put in verbose mode |
| @@ -1839,7 +1861,12 @@ This command proposes various successive corrections for the current word." | |||
| 1839 | (while (progn | 1861 | (while (progn |
| 1840 | (accept-process-output ispell-process) | 1862 | (accept-process-output ispell-process) |
| 1841 | (not (string= "" (car ispell-filter))))) | 1863 | (not (string= "" (car ispell-filter))))) |
| 1864 | ;; Remove leading empty element | ||
| 1842 | (setq ispell-filter (cdr ispell-filter)) | 1865 | (setq ispell-filter (cdr ispell-filter)) |
| 1866 | ;; ispell process should return something after word is sent. | ||
| 1867 | ;; Tag word as valid (i.e., skip) otherwise | ||
| 1868 | (or ispell-filter | ||
| 1869 | (setq ispell-filter '(*))) | ||
| 1843 | (if (consp ispell-filter) | 1870 | (if (consp ispell-filter) |
| 1844 | (setq poss (ispell-parse-output (car ispell-filter)))) | 1871 | (setq poss (ispell-parse-output (car ispell-filter)))) |
| 1845 | (cond | 1872 | (cond |
| @@ -1980,7 +2007,7 @@ The word checked is the word at the mouse position." | |||
| 1980 | (let ((start (car (cdr word))) | 2007 | (let ((start (car (cdr word))) |
| 1981 | (end (car (cdr (cdr word)))) | 2008 | (end (car (cdr (cdr word)))) |
| 1982 | (word (car word)) | 2009 | (word (car word)) |
| 1983 | poss) | 2010 | poss ispell-filter) |
| 1984 | ;; now check spelling of word. | 2011 | ;; now check spelling of word. |
| 1985 | (ispell-send-string "%\n") ;put in verbose mode | 2012 | (ispell-send-string "%\n") ;put in verbose mode |
| 1986 | (ispell-send-string (concat "^" word "\n")) | 2013 | (ispell-send-string (concat "^" word "\n")) |
| @@ -1988,7 +2015,12 @@ The word checked is the word at the mouse position." | |||
| 1988 | (while (progn | 2015 | (while (progn |
| 1989 | (accept-process-output ispell-process) | 2016 | (accept-process-output ispell-process) |
| 1990 | (not (string= "" (car ispell-filter))))) | 2017 | (not (string= "" (car ispell-filter))))) |
| 2018 | ;; Remove leading empty element | ||
| 1991 | (setq ispell-filter (cdr ispell-filter)) | 2019 | (setq ispell-filter (cdr ispell-filter)) |
| 2020 | ;; ispell process should return something after word is sent. | ||
| 2021 | ;; Tag word as valid (i.e., skip) otherwise | ||
| 2022 | (or ispell-filter | ||
| 2023 | (setq ispell-filter '(*))) | ||
| 1992 | (if (consp ispell-filter) | 2024 | (if (consp ispell-filter) |
| 1993 | (setq poss (ispell-parse-output (car ispell-filter)))) | 2025 | (setq poss (ispell-parse-output (car ispell-filter)))) |
| 1994 | (cond | 2026 | (cond |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index a0eb147d9c8..2a42a91f7e7 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2613,8 +2613,9 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2613 | (cond ((equal dict "") | 2613 | (cond ((equal dict "") |
| 2614 | (ispell-internal-change-dictionary) | 2614 | (ispell-internal-change-dictionary) |
| 2615 | (message "Using %s dictionary" | 2615 | (message "Using %s dictionary" |
| 2616 | (or ispell-local-dictionary ispell-dictionary "default"))) | 2616 | (or (and (not arg) ispell-local-dictionary) |
| 2617 | ((equal dict (or ispell-local-dictionary | 2617 | ispell-dictionary "default"))) |
| 2618 | ((equal dict (or (and (not arg) ispell-local-dictionary) | ||
| 2618 | ispell-dictionary "default")) | 2619 | ispell-dictionary "default")) |
| 2619 | ;; Specified dictionary is the default already. Could reload | 2620 | ;; Specified dictionary is the default already. Could reload |
| 2620 | ;; the dictionaries if needed. | 2621 | ;; the dictionaries if needed. |
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index ecbcd86d043..caca6a6ae7d 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -2690,7 +2690,7 @@ Also put tags into group 4 if tags are present.") | |||
| 2690 | (make-variable-buffer-local 'org-keyword-time-regexp) | 2690 | (make-variable-buffer-local 'org-keyword-time-regexp) |
| 2691 | 2691 | ||
| 2692 | (defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t | 2692 | (defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t |
| 2693 | mouse-map t) | 2693 | rear-nonsticky t mouse-map t) |
| 2694 | "Properties to remove when a string without properties is wanted.") | 2694 | "Properties to remove when a string without properties is wanted.") |
| 2695 | 2695 | ||
| 2696 | (defsubst org-match-string-no-properties (num &optional string) | 2696 | (defsubst org-match-string-no-properties (num &optional string) |
| @@ -3140,6 +3140,7 @@ that will be added to PLIST. Returns the string that was modified." | |||
| 3140 | (progn | 3140 | (progn |
| 3141 | (add-text-properties (match-beginning 0) (match-end 0) | 3141 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3142 | (list 'mouse-face 'highlight | 3142 | (list 'mouse-face 'highlight |
| 3143 | 'rear-nonsticky t | ||
| 3143 | 'keymap org-mouse-map | 3144 | 'keymap org-mouse-map |
| 3144 | )) | 3145 | )) |
| 3145 | t))) | 3146 | t))) |
| @@ -3150,6 +3151,7 @@ that will be added to PLIST. Returns the string that was modified." | |||
| 3150 | (progn | 3151 | (progn |
| 3151 | (add-text-properties (match-beginning 0) (match-end 0) | 3152 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3152 | (list 'mouse-face 'highlight | 3153 | (list 'mouse-face 'highlight |
| 3154 | 'rear-nonsticky t | ||
| 3153 | 'keymap org-mouse-map | 3155 | 'keymap org-mouse-map |
| 3154 | )) | 3156 | )) |
| 3155 | t))) | 3157 | t))) |
| @@ -3188,6 +3190,7 @@ that will be added to PLIST. Returns the string that was modified." | |||
| 3188 | (progn | 3190 | (progn |
| 3189 | (add-text-properties (match-beginning 0) (match-end 0) | 3191 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3190 | (list 'mouse-face 'highlight | 3192 | (list 'mouse-face 'highlight |
| 3193 | 'rear-nonsticky t | ||
| 3191 | 'keymap org-mouse-map)) | 3194 | 'keymap org-mouse-map)) |
| 3192 | t))) | 3195 | t))) |
| 3193 | 3196 | ||
| @@ -3206,6 +3209,7 @@ that will be added to PLIST. Returns the string that was modified." | |||
| 3206 | (progn | 3209 | (progn |
| 3207 | (add-text-properties (match-beginning 0) (match-end 0) | 3210 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3208 | (list 'mouse-face 'highlight | 3211 | (list 'mouse-face 'highlight |
| 3212 | 'rear-nonsticky t | ||
| 3209 | 'keymap org-mouse-map | 3213 | 'keymap org-mouse-map |
| 3210 | 'help-echo "Radio target link" | 3214 | 'help-echo "Radio target link" |
| 3211 | 'org-linked-text t)) | 3215 | 'org-linked-text t)) |
| @@ -3271,6 +3275,7 @@ between words." | |||
| 3271 | (progn | 3275 | (progn |
| 3272 | (add-text-properties (match-beginning 0) (match-end 0) | 3276 | (add-text-properties (match-beginning 0) (match-end 0) |
| 3273 | (list 'mouse-face 'highlight | 3277 | (list 'mouse-face 'highlight |
| 3278 | 'rear-nonsticky t | ||
| 3274 | 'keymap org-mouse-map)) | 3279 | 'keymap org-mouse-map)) |
| 3275 | t))) | 3280 | t))) |
| 3276 | 3281 | ||
| @@ -3279,6 +3284,7 @@ between words." | |||
| 3279 | (progn | 3284 | (progn |
| 3280 | (add-text-properties (match-beginning 1) (match-end 1) | 3285 | (add-text-properties (match-beginning 1) (match-end 1) |
| 3281 | (list 'mouse-face 'highlight | 3286 | (list 'mouse-face 'highlight |
| 3287 | 'rear-nonsticky t | ||
| 3282 | 'keymap org-mouse-map)) | 3288 | 'keymap org-mouse-map)) |
| 3283 | t))) | 3289 | t))) |
| 3284 | 3290 | ||
| @@ -3380,6 +3386,7 @@ between words." | |||
| 3380 | deactivate-mark buffer-file-name buffer-file-truename) | 3386 | deactivate-mark buffer-file-name buffer-file-truename) |
| 3381 | (remove-text-properties beg end | 3387 | (remove-text-properties beg end |
| 3382 | '(mouse-face nil keymap nil org-linked-text nil | 3388 | '(mouse-face nil keymap nil org-linked-text nil |
| 3389 | rear-nonsticky nil | ||
| 3383 | invisible nil intangible nil)))) | 3390 | invisible nil intangible nil)))) |
| 3384 | ;;; Visibility cycling | 3391 | ;;; Visibility cycling |
| 3385 | 3392 | ||
| @@ -4569,7 +4576,7 @@ this heading. " | |||
| 4569 | ;; Make the subtree visible | 4576 | ;; Make the subtree visible |
| 4570 | (show-subtree) | 4577 | (show-subtree) |
| 4571 | (org-end-of-subtree t) | 4578 | (org-end-of-subtree t) |
| 4572 | (skip-chars-backward " \t\r\n]") | 4579 | (skip-chars-backward " \t\r\n") |
| 4573 | (and (looking-at "[ \t\r\n]*") | 4580 | (and (looking-at "[ \t\r\n]*") |
| 4574 | (replace-match "\n\n"))) | 4581 | (replace-match "\n\n"))) |
| 4575 | ;; No specific heading, just go to end of file. | 4582 | ;; No specific heading, just go to end of file. |
| @@ -6204,15 +6211,15 @@ the returned times will be formatted strings." | |||
| 6204 | (while (setq p (next-single-property-change (point) :org-clock-minutes)) | 6211 | (while (setq p (next-single-property-change (point) :org-clock-minutes)) |
| 6205 | (goto-char p) | 6212 | (goto-char p) |
| 6206 | (when (setq time (get-text-property p :org-clock-minutes)) | 6213 | (when (setq time (get-text-property p :org-clock-minutes)) |
| 6207 | (beginning-of-line 1) | 6214 | (save-excursion |
| 6208 | (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") | 6215 | (beginning-of-line 1) |
| 6209 | (setq level (- (match-end 1) (match-beginning 1))) | 6216 | (when (and (looking-at "\\(\\*+\\)[ \t]+\\(.*?\\)\\([ \t]+:[0-9a-zA-Z_@:]+:\\)?[ \t]*$") |
| 6210 | (<= level maxlevel)) | 6217 | (setq level (- (match-end 1) (match-beginning 1))) |
| 6211 | (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") | 6218 | (<= level maxlevel)) |
| 6212 | hdl (match-string 2) | 6219 | (setq hlc (if emph (or (cdr (assoc level hlchars)) "") "") |
| 6213 | h (/ time 60) | 6220 | hdl (match-string 2) |
| 6214 | m (- time (* 60 h))) | 6221 | h (/ time 60) |
| 6215 | (save-excursion | 6222 | m (- time (* 60 h))) |
| 6216 | (goto-char ins) | 6223 | (goto-char ins) |
| 6217 | (if (= level 1) (insert-before-markers "|-\n")) | 6224 | (if (= level 1) (insert-before-markers "|-\n")) |
| 6218 | (insert-before-markers | 6225 | (insert-before-markers |
| @@ -8660,7 +8667,7 @@ are included in the output." | |||
| 8660 | (push txt rtn)) | 8667 | (push txt rtn)) |
| 8661 | ;; if we are to skip sublevels, jump to end of subtree | 8668 | ;; if we are to skip sublevels, jump to end of subtree |
| 8662 | (point) | 8669 | (point) |
| 8663 | (or org-tags-match-list-sublevels (org-end-of-subtree)))))) | 8670 | (or org-tags-match-list-sublevels (org-end-of-subtree t)))))) |
| 8664 | (when (and (eq action 'sparse-tree) | 8671 | (when (and (eq action 'sparse-tree) |
| 8665 | (not org-sparse-tree-open-archived-trees)) | 8672 | (not org-sparse-tree-open-archived-trees)) |
| 8666 | (org-hide-archived-subtrees (point-min) (point-max))) | 8673 | (org-hide-archived-subtrees (point-min) (point-max))) |
| @@ -9816,7 +9823,7 @@ on the system \"/user@host:\"." | |||
| 9816 | ((fboundp 'tramp-handle-file-remote-p) | 9823 | ((fboundp 'tramp-handle-file-remote-p) |
| 9817 | (tramp-handle-file-remote-p file)) | 9824 | (tramp-handle-file-remote-p file)) |
| 9818 | ((and (boundp 'ange-ftp-name-format) | 9825 | ((and (boundp 'ange-ftp-name-format) |
| 9819 | (string-match ange-ftp-name-format file)) | 9826 | (string-match (car ange-ftp-name-format) file)) |
| 9820 | t) | 9827 | t) |
| 9821 | (t nil))) | 9828 | (t nil))) |
| 9822 | 9829 | ||
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index e1ae98a59df..b878c288735 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el | |||
| @@ -38,7 +38,8 @@ The TAGS file is also immediately visited with `visit-tags-table'." | |||
| 38 | (reftex-access-scan-info current-prefix-arg) | 38 | (reftex-access-scan-info current-prefix-arg) |
| 39 | (let* ((master (reftex-TeX-master-file)) | 39 | (let* ((master (reftex-TeX-master-file)) |
| 40 | (files (reftex-all-document-files)) | 40 | (files (reftex-all-document-files)) |
| 41 | (cmd (format "etags %s" (mapconcat 'identity files " ")))) | 41 | (cmd (format "etags %s" (mapconcat 'shell-quote-argument |
| 42 | files " ")))) | ||
| 42 | (save-excursion | 43 | (save-excursion |
| 43 | (set-buffer (reftex-get-file-buffer-force master)) | 44 | (set-buffer (reftex-get-file-buffer-force master)) |
| 44 | (message "Running etags to create TAGS file...") | 45 | (message "Running etags to create TAGS file...") |
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index f4334fbbd70..0f8a948e363 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -232,7 +232,7 @@ distribution. Mixed-case symbols are convenience aliases.") | |||
| 232 | "LaTeX label and citation support." | 232 | "LaTeX label and citation support." |
| 233 | :tag "RefTeX" | 233 | :tag "RefTeX" |
| 234 | :link '(url-link :tag "Home Page" | 234 | :link '(url-link :tag "Home Page" |
| 235 | "http://zon.astro.uva.nl/~dominik/Tools/") | 235 | "http://staff.science.uva.nl/~dominik/Tools/reftex/") |
| 236 | :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el") | 236 | :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el") |
| 237 | :link '(custom-manual "(reftex)Top") | 237 | :link '(custom-manual "(reftex)Top") |
| 238 | :prefix "reftex-" | 238 | :prefix "reftex-" |
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index b8ab100c19d..958ef179b26 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el | |||
| @@ -340,9 +340,9 @@ The appearance of the screen can be customized by the variables | |||
| 340 | ;;;###autoload | 340 | ;;;###autoload |
| 341 | (defun 2C-two-columns (&optional buffer) | 341 | (defun 2C-two-columns (&optional buffer) |
| 342 | "Split current window vertically for two-column editing. | 342 | "Split current window vertically for two-column editing. |
| 343 | When called the first time, associates a buffer with the current | 343 | \\<global-map>When called the first time, associates a buffer with the current |
| 344 | buffer in two-column minor mode (see \\[describe-mode] ). | 344 | buffer in two-column minor mode (use \\[describe-mode] once in the mode, |
| 345 | Runs `2C-other-buffer-hook' in the new buffer. | 345 | for details.). It runs `2C-other-buffer-hook' in the new buffer. |
| 346 | When called again, restores the screen layout with the current buffer | 346 | 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") |
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index c0aa80ef1ae..e2618bca8fd 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el | |||
| @@ -240,7 +240,7 @@ This may contain whitespace (including newlines) .") | |||
| 240 | (let ((strip (thing-at-point-looking-at | 240 | (let ((strip (thing-at-point-looking-at |
| 241 | thing-at-point-markedup-url-regexp))) ;; (url "") short | 241 | thing-at-point-markedup-url-regexp))) ;; (url "") short |
| 242 | (if (or strip | 242 | (if (or strip |
| 243 | ` (thing-at-point-looking-at thing-at-point-url-regexp) | 243 | (thing-at-point-looking-at thing-at-point-url-regexp) |
| 244 | ;; Access scheme omitted? | 244 | ;; Access scheme omitted? |
| 245 | ;; (setq short (thing-at-point-looking-at | 245 | ;; (setq short (thing-at-point-looking-at |
| 246 | ;; thing-at-point-short-url-regexp)) | 246 | ;; thing-at-point-short-url-regexp)) |
diff --git a/lisp/time.el b/lisp/time.el index 115681c1b58..74812bf9f94 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | (defgroup display-time nil | 32 | (defgroup display-time nil |
| 33 | "Display time and load in mode line of Emacs." | 33 | "Display time and load in mode line of Emacs." |
| 34 | :group 'modeline | 34 | :group 'mode-line |
| 35 | :group 'mail) | 35 | :group 'mail) |
| 36 | 36 | ||
| 37 | 37 | ||
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index e4b54f9fc92..2aa14af8983 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,49 @@ | |||
| 1 | 2006-10-12 Magnus Henoch <mange@freemail.hu> | ||
| 2 | |||
| 3 | * url-http.el (url-http-find-free-connection): Handle | ||
| 4 | url-open-stream returning nil. | ||
| 5 | |||
| 6 | 2006-10-11 Magnus Henoch <mange@freemail.hu> | ||
| 7 | |||
| 8 | * url-https.el: Remove (clashes with url-http on 8+3 systems). | ||
| 9 | |||
| 10 | * url-http.el: Move contents of url-https.el here. Add autoloads. | ||
| 11 | |||
| 12 | 2006-10-09 Magnus Henoch <mange@freemail.hu> | ||
| 13 | |||
| 14 | * url-parse.el (url-generic-parse-url): Handle URLs with empty | ||
| 15 | path component and non-empty query component. Untangle path, | ||
| 16 | query and fragment parsing code. Add references to RFC 3986 in | ||
| 17 | comments. | ||
| 18 | (url-recreate-url-attributes): Start query string with "?", not ";". | ||
| 19 | |||
| 20 | 2006-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 21 | |||
| 22 | * url-dav.el (url-dav-file-attributes): Simplify. | ||
| 23 | |||
| 24 | * url-http.el (url-http-head-file-attributes): Add device "info". | ||
| 25 | |||
| 26 | 2006-09-18 Michael Olson <mwolson@gnu.org> | ||
| 27 | |||
| 28 | * url-methods.el (url-scheme-register-proxy): Handle case where | ||
| 29 | getenv returns an empty string for http_proxy. This prevents an | ||
| 30 | error when calling `format' later on. | ||
| 31 | |||
| 32 | 2006-08-31 Diane Murray <disumu@x3y2z1.net> | ||
| 33 | |||
| 34 | * url-parse.el (url-recreate-url-attributes): New function, code | ||
| 35 | simply moved from `url-recreate-url'. | ||
| 36 | (url-recreate-url): Use it. | ||
| 37 | Put the `url-target' at the end of the URL after the attributes. | ||
| 38 | |||
| 39 | * url-http.el (url-http-create-request): | ||
| 40 | Use `url-recreate-url-attributes' when setting real-fname. | ||
| 41 | |||
| 42 | 2006-08-29 Diane Murray <disumu@x3y2z1.net> | ||
| 43 | |||
| 44 | * url-cookie.el (url-cookie-write-file): Really don't use versioned | ||
| 45 | backups. | ||
| 46 | |||
| 1 | 2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca> | 47 | 2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 48 | ||
| 3 | * url-handlers.el (url-file-local-copy): Tell url-copy-file that the | 49 | * url-handlers.el (url-file-local-copy): Tell url-copy-file that the |
| @@ -393,32 +439,19 @@ | |||
| 393 | 439 | ||
| 394 | 2004-10-10 Lars Hansen <larsh@math.ku.dk> | 440 | 2004-10-10 Lars Hansen <larsh@math.ku.dk> |
| 395 | 441 | ||
| 396 | * url-auth.el: Update header and footer. | 442 | * url-auth.el: |
| 397 | 443 | * url-cache.el: | |
| 398 | * url-cache.el: Update header and footer. | 444 | * url-cid.el: |
| 399 | 445 | * url-dired.el: | |
| 400 | * url-cid.el: Update header and footer. | 446 | * url-expand.el: |
| 401 | 447 | * url-ftp.el: | |
| 402 | * url-dired.el: Update header and footer. | 448 | * url-gw.el: |
| 403 | 449 | * url-imap.el: | |
| 404 | * url-expand.el: Update header and footer. | 450 | * url-irc.el: |
| 405 | 451 | * url-misc.el: | |
| 406 | * url-ftp.el: Update header and footer. | 452 | * url-news.el: |
| 407 | 453 | * url-ns.el: | |
| 408 | * url-gw.el: Update header and footer. | 454 | * url-privacy.el: |
| 409 | |||
| 410 | * url-imap.el: Update header and footer. | ||
| 411 | |||
| 412 | * url-irc.el: Update header and footer. | ||
| 413 | |||
| 414 | * url-misc.el: Update header and footer. | ||
| 415 | |||
| 416 | * url-news.el: Update header and footer. | ||
| 417 | |||
| 418 | * url-ns.el: Update header and footer. | ||
| 419 | |||
| 420 | * url-privacy.el: Update header and footer. | ||
| 421 | |||
| 422 | * url-proxy.el: Update header and footer. | 455 | * url-proxy.el: Update header and footer. |
| 423 | 456 | ||
| 424 | * url-vars.el: Update header. | 457 | * url-vars.el: Update header. |
| @@ -463,42 +496,24 @@ | |||
| 463 | 496 | ||
| 464 | 2004-10-10 Lars Hansen <larsh@math.ku.dk> | 497 | 2004-10-10 Lars Hansen <larsh@math.ku.dk> |
| 465 | 498 | ||
| 466 | * url-auth.el: Fix copyright notice. | 499 | * url-auth.el: |
| 467 | 500 | * url-cache.el: | |
| 468 | * url-cache.el: Fix copyright notice. | 501 | * url-cookie.el: |
| 469 | 502 | * url-dired.el: | |
| 470 | * url-cookie.el: Fix copyright notice. | 503 | * url-file.el: |
| 471 | 504 | * url-ftp.el: | |
| 472 | * url-dired.el: Fix copyright notice. | 505 | * url-handlers.el: |
| 473 | 506 | * url-history.el: | |
| 474 | * url-file.el: Fix copyright notice. | 507 | * url-irc.el: |
| 475 | 508 | * url-mailto.el: | |
| 476 | * url-ftp.el: Fix copyright notice. | 509 | * url-methods.el: |
| 477 | 510 | * url-misc.el: | |
| 478 | * url-handlers.el: Fix copyright notice. | 511 | * url-news.el: |
| 479 | 512 | * url-nfs.el: | |
| 480 | * url-history.el: Fix copyright notice. | 513 | * url-parse.el: |
| 481 | 514 | * url-privacy.el: | |
| 482 | * url-irc.el: Fix copyright notice. | 515 | * url-vars.el: |
| 483 | 516 | * url.el: | |
| 484 | * url-mailto.el: Fix copyright notice. | ||
| 485 | |||
| 486 | * url-methods.el: Fix copyright notice. | ||
| 487 | |||
| 488 | * url-misc.el: Fix copyright notice. | ||
| 489 | |||
| 490 | * url-news.el: Fix copyright notice. | ||
| 491 | |||
| 492 | * url-nfs.el: Fix copyright notice. | ||
| 493 | |||
| 494 | * url-parse.el: Fix copyright notice. | ||
| 495 | |||
| 496 | * url-privacy.el: Fix copyright notice. | ||
| 497 | |||
| 498 | * url-vars.el: Fix copyright notice. | ||
| 499 | |||
| 500 | * url.el: Fix copyright notice. | ||
| 501 | |||
| 502 | * url-util.el: Fix copyright notice. | 517 | * url-util.el: Fix copyright notice. |
| 503 | 518 | ||
| 504 | 2004-10-06 Stefan Monnier <monnier@iro.umontreal.ca> | 519 | 2004-10-06 Stefan Monnier <monnier@iro.umontreal.ca> |
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e74d4989117..f3902619c89 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el | |||
| @@ -168,11 +168,11 @@ telling Microsoft that." | |||
| 168 | (insert ")\n(setq url-cookie-secure-storage\n '") | 168 | (insert ")\n(setq url-cookie-secure-storage\n '") |
| 169 | (pp url-cookie-secure-storage (current-buffer)) | 169 | (pp url-cookie-secure-storage (current-buffer)) |
| 170 | (insert ")\n") | 170 | (insert ")\n") |
| 171 | (insert ";; Local Variables:\n" | 171 | (insert "\n;; Local Variables:\n" |
| 172 | ";; version-control: never\n" | 172 | ";; version-control: never\n" |
| 173 | ";; no-byte-compile: t\n" | 173 | ";; no-byte-compile: t\n" |
| 174 | ";; End:\n") | 174 | ";; End:\n") |
| 175 | (set (make-local-variable 'version-control) t) | 175 | (set (make-local-variable 'version-control) 'never) |
| 176 | (write-file fname) | 176 | (write-file fname) |
| 177 | (setq url-cookies-changed-since-last-save nil) | 177 | (setq url-cookies-changed-since-last-save nil) |
| 178 | (kill-buffer (current-buffer)))))) | 178 | (kill-buffer (current-buffer)))))) |
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 449d8a510b5..546d744558d 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el | |||
| @@ -621,59 +621,56 @@ Returns t iff the lock was successfully released." | |||
| 621 | (autoload 'url-http-head-file-attributes "url-http") | 621 | (autoload 'url-http-head-file-attributes "url-http") |
| 622 | 622 | ||
| 623 | (defun url-dav-file-attributes (url &optional id-format) | 623 | (defun url-dav-file-attributes (url &optional id-format) |
| 624 | (let ((properties (cdar (url-dav-get-properties url))) | 624 | (let ((properties (cdar (url-dav-get-properties url)))) |
| 625 | (attributes nil)) | ||
| 626 | (if (and properties | 625 | (if (and properties |
| 627 | (url-dav-http-success-p (plist-get properties 'DAV:status))) | 626 | (url-dav-http-success-p (plist-get properties 'DAV:status))) |
| 628 | ;; We got a good DAV response back.. | 627 | ;; We got a good DAV response back.. |
| 629 | (setq attributes | 628 | (list |
| 630 | (list | 629 | ;; t for directory, string for symbolic link, or nil |
| 631 | ;; t for directory, string for symbolic link, or nil | 630 | ;; Need to support DAV Bindings to figure out the |
| 632 | ;; Need to support DAV Bindings to figure out the | 631 | ;; symbolic link issues. |
| 633 | ;; symbolic link issues. | 632 | (if (memq 'DAV:collection (plist-get properties 'DAV:resourcetype)) t nil) |
| 634 | (if (memq 'DAV:collection (plist-get properties 'DAV:resourcetype)) t nil) | ||
| 635 | 633 | ||
| 636 | ;; Number of links to file... Needs DAV Bindings. | 634 | ;; Number of links to file... Needs DAV Bindings. |
| 637 | 1 | 635 | 1 |
| 638 | 636 | ||
| 639 | ;; File uid - no way to figure out? | 637 | ;; File uid - no way to figure out? |
| 640 | 0 | 638 | 0 |
| 641 | 639 | ||
| 642 | ;; File gid - no way to figure out? | 640 | ;; File gid - no way to figure out? |
| 643 | 0 | 641 | 0 |
| 644 | 642 | ||
| 645 | ;; Last access time - ??? | 643 | ;; Last access time - ??? |
| 646 | nil | 644 | nil |
| 647 | 645 | ||
| 648 | ;; Last modification time | 646 | ;; Last modification time |
| 649 | (plist-get properties 'DAV:getlastmodified) | 647 | (plist-get properties 'DAV:getlastmodified) |
| 650 | 648 | ||
| 651 | ;; Last status change time... just reuse last-modified | 649 | ;; Last status change time... just reuse last-modified |
| 652 | ;; for now. | 650 | ;; for now. |
| 653 | (plist-get properties 'DAV:getlastmodified) | 651 | (plist-get properties 'DAV:getlastmodified) |
| 654 | 652 | ||
| 655 | ;; size in bytes | 653 | ;; size in bytes |
| 656 | (or (plist-get properties 'DAV:getcontentlength) 0) | 654 | (or (plist-get properties 'DAV:getcontentlength) 0) |
| 657 | 655 | ||
| 658 | ;; file modes as a string like `ls -l' | 656 | ;; file modes as a string like `ls -l' |
| 659 | ;; | 657 | ;; |
| 660 | ;; Should be able to build this up from the | 658 | ;; Should be able to build this up from the |
| 661 | ;; DAV:supportedlock attribute pretty easily. Getting | 659 | ;; DAV:supportedlock attribute pretty easily. Getting |
| 662 | ;; the group info could be impossible though. | 660 | ;; the group info could be impossible though. |
| 663 | (url-dav-file-attributes-mode-string properties) | 661 | (url-dav-file-attributes-mode-string properties) |
| 664 | 662 | ||
| 665 | ;; t iff file's gid would change if it were deleted & | 663 | ;; t iff file's gid would change if it were deleted & |
| 666 | ;; recreated. No way for us to know that thru DAV. | 664 | ;; recreated. No way for us to know that thru DAV. |
| 667 | nil | 665 | nil |
| 668 | 666 | ||
| 669 | ;; inode number - meaningless | 667 | ;; inode number - meaningless |
| 670 | nil | 668 | nil |
| 671 | 669 | ||
| 672 | ;; device number - meaningless | 670 | ;; device number - meaningless |
| 673 | nil)) | 671 | nil) |
| 674 | ;; Fall back to just the normal http way of doing things. | 672 | ;; Fall back to just the normal http way of doing things. |
| 675 | (setq attributes (url-http-head-file-attributes url id-format))) | 673 | (url-http-head-file-attributes url id-format)))) |
| 676 | attributes)) | ||
| 677 | 674 | ||
| 678 | (defun url-dav-save-resource (url obj &optional content-type lock-token) | 675 | (defun url-dav-save-resource (url obj &optional content-type lock-token) |
| 679 | "Save OBJ as URL using WebDAV. | 676 | "Save OBJ as URL using WebDAV. |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index ae3a4b3e070..bf8069ded7e 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -123,8 +123,10 @@ request.") | |||
| 123 | ;; like authentication. But we use another buffer afterwards. | 123 | ;; like authentication. But we use another buffer afterwards. |
| 124 | (unwind-protect | 124 | (unwind-protect |
| 125 | (let ((proc (url-open-stream host buf host port))) | 125 | (let ((proc (url-open-stream host buf host port))) |
| 126 | ;; Drop the temp buffer link before killing the buffer. | 126 | ;; url-open-stream might return nil. |
| 127 | (set-process-buffer proc nil) | 127 | (when (processp proc) |
| 128 | ;; Drop the temp buffer link before killing the buffer. | ||
| 129 | (set-process-buffer proc nil)) | ||
| 128 | proc) | 130 | proc) |
| 129 | (kill-buffer buf))))))) | 131 | (kill-buffer buf))))))) |
| 130 | 132 | ||
| @@ -160,7 +162,8 @@ request.") | |||
| 160 | (let ((url-basic-auth-storage | 162 | (let ((url-basic-auth-storage |
| 161 | 'url-http-proxy-basic-auth-storage)) | 163 | 'url-http-proxy-basic-auth-storage)) |
| 162 | (url-get-authentication url nil 'any nil)))) | 164 | (url-get-authentication url nil 'any nil)))) |
| 163 | (real-fname (url-filename (or proxy-obj url))) | 165 | (real-fname (concat (url-filename (or proxy-obj url)) |
| 166 | (url-recreate-url-attributes (or proxy-obj url)))) | ||
| 164 | (host (url-host (or proxy-obj url))) | 167 | (host (url-host (or proxy-obj url))) |
| 165 | (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) | 168 | (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) |
| 166 | nil | 169 | nil |
| @@ -1150,19 +1153,19 @@ CBARGS as the arguments." | |||
| 1150 | (defalias 'url-http-file-readable-p 'url-http-file-exists-p) | 1153 | (defalias 'url-http-file-readable-p 'url-http-file-exists-p) |
| 1151 | 1154 | ||
| 1152 | (defun url-http-head-file-attributes (url &optional id-format) | 1155 | (defun url-http-head-file-attributes (url &optional id-format) |
| 1153 | (let ((buffer (url-http-head url)) | 1156 | (let ((buffer (url-http-head url))) |
| 1154 | (attributes nil)) | ||
| 1155 | (when buffer | 1157 | (when buffer |
| 1156 | (setq attributes (make-list 11 nil)) | 1158 | (prog1 |
| 1157 | (setf (nth 1 attributes) 1) ; Number of links to file | 1159 | (list |
| 1158 | (setf (nth 2 attributes) 0) ; file uid | 1160 | nil ;dir / link / normal file |
| 1159 | (setf (nth 3 attributes) 0) ; file gid | 1161 | 1 ;number of links to file. |
| 1160 | (setf (nth 7 attributes) ; file size | 1162 | 0 0 ;uid ; gid |
| 1161 | (url-http-symbol-value-in-buffer 'url-http-content-length | 1163 | nil nil nil ;atime ; mtime ; ctime |
| 1162 | buffer -1)) | 1164 | (url-http-symbol-value-in-buffer 'url-http-content-length |
| 1163 | (setf (nth 8 attributes) (eval-when-compile (make-string 10 ?-))) | 1165 | buffer -1) |
| 1164 | (kill-buffer buffer)) | 1166 | (eval-when-compile (make-string 10 ?-)) |
| 1165 | attributes)) | 1167 | nil nil nil) ;whether gid would change ; inode ; device. |
| 1168 | (kill-buffer buffer))))) | ||
| 1166 | 1169 | ||
| 1167 | ;;;###autoload | 1170 | ;;;###autoload |
| 1168 | (defun url-http-file-attributes (url &optional id-format) | 1171 | (defun url-http-file-attributes (url &optional id-format) |
| @@ -1244,6 +1247,35 @@ p3p | |||
| 1244 | (if buffer (kill-buffer buffer)) | 1247 | (if buffer (kill-buffer buffer)) |
| 1245 | options)) | 1248 | options)) |
| 1246 | 1249 | ||
| 1250 | ;; HTTPS. This used to be in url-https.el, but that file collides | ||
| 1251 | ;; with url-http.el on systems with 8-character file names. | ||
| 1252 | (require 'tls) | ||
| 1253 | |||
| 1254 | ;;;###autoload | ||
| 1255 | (defconst url-https-default-port 443 "Default HTTPS port.") | ||
| 1256 | ;;;###autoload | ||
| 1257 | (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | ||
| 1258 | ;;;###autoload | ||
| 1259 | (defalias 'url-https-expand-file-name 'url-http-expand-file-name) | ||
| 1260 | |||
| 1261 | (defmacro url-https-create-secure-wrapper (method args) | ||
| 1262 | `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args | ||
| 1263 | ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) | ||
| 1264 | (let ((url-gateway-method (condition-case () | ||
| 1265 | (require 'ssl) | ||
| 1266 | (error 'tls)))) | ||
| 1267 | (,(intern (format (if method "url-http-%s" "url-http") method)) | ||
| 1268 | ,@(remove '&rest (remove '&optional args)))))) | ||
| 1269 | |||
| 1270 | ;;;###autoload (autoload 'url-https "url-http") | ||
| 1271 | (url-https-create-secure-wrapper nil (url callback cbargs)) | ||
| 1272 | ;;;###autoload (autoload 'url-https-file-exists-p "url-http") | ||
| 1273 | (url-https-create-secure-wrapper file-exists-p (url)) | ||
| 1274 | ;;;###autoload (autoload 'url-https-file-readable-p "url-http") | ||
| 1275 | (url-https-create-secure-wrapper file-readable-p (url)) | ||
| 1276 | ;;;###autoload (autoload 'url-https-file-attributes "url-http") | ||
| 1277 | (url-https-create-secure-wrapper file-attributes (url &optional id-format)) | ||
| 1278 | |||
| 1247 | (provide 'url-http) | 1279 | (provide 'url-http) |
| 1248 | 1280 | ||
| 1249 | ;; arch-tag: ba7c59ae-c0f4-4a31-9617-d85f221732ee | 1281 | ;; arch-tag: ba7c59ae-c0f4-4a31-9617-d85f221732ee |
diff --git a/lisp/url/url-https.el b/lisp/url/url-https.el deleted file mode 100644 index a7440a76535..00000000000 --- a/lisp/url/url-https.el +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | ;;; url-https.el --- HTTP over SSL/TLS routines | ||
| 2 | |||
| 3 | ;; Copyright (C) 1999, 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Keywords: comm, data, processes | ||
| 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 2, 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 | ;;; Code: | ||
| 27 | |||
| 28 | (require 'url-gw) | ||
| 29 | (require 'url-util) | ||
| 30 | (require 'url-parse) | ||
| 31 | (require 'url-cookie) | ||
| 32 | (require 'url-http) | ||
| 33 | (require 'tls) | ||
| 34 | |||
| 35 | (defconst url-https-default-port 443 "Default HTTPS port.") | ||
| 36 | (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | ||
| 37 | (defalias 'url-https-expand-file-name 'url-http-expand-file-name) | ||
| 38 | |||
| 39 | (defmacro url-https-create-secure-wrapper (method args) | ||
| 40 | `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args | ||
| 41 | ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) | ||
| 42 | (let ((url-gateway-method (condition-case () | ||
| 43 | (require 'ssl) | ||
| 44 | (error 'tls)))) | ||
| 45 | (,(intern (format (if method "url-http-%s" "url-http") method)) | ||
| 46 | ,@(remove '&rest (remove '&optional args)))))) | ||
| 47 | |||
| 48 | (url-https-create-secure-wrapper nil (url callback cbargs)) | ||
| 49 | (url-https-create-secure-wrapper file-exists-p (url)) | ||
| 50 | (url-https-create-secure-wrapper file-readable-p (url)) | ||
| 51 | (url-https-create-secure-wrapper file-attributes (url &optional id-format)) | ||
| 52 | |||
| 53 | (provide 'url-https) | ||
| 54 | |||
| 55 | ;; arch-tag: c3645ac5-c248-4d12-ad41-7c4b6f7b6d19 | ||
| 56 | ;;; url-https.el ends here | ||
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index 6854d62af03..55166ee46f4 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el | |||
| @@ -75,6 +75,11 @@ | |||
| 75 | (cur-proxy (assoc scheme url-proxy-services)) | 75 | (cur-proxy (assoc scheme url-proxy-services)) |
| 76 | (urlobj nil)) | 76 | (urlobj nil)) |
| 77 | 77 | ||
| 78 | ;; If env-proxy is an empty string, treat it as if it were nil | ||
| 79 | (when (and (stringp env-proxy) | ||
| 80 | (string= env-proxy "")) | ||
| 81 | (setq env-proxy nil)) | ||
| 82 | |||
| 78 | ;; Store any proxying information - this will not overwrite an old | 83 | ;; Store any proxying information - this will not overwrite an old |
| 79 | ;; entry, so that people can still set this information in their | 84 | ;; entry, so that people can still set this information in their |
| 80 | ;; .emacs file | 85 | ;; .emacs file |
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index f84bf1a7ba2..2e4fc8a9f27 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el | |||
| @@ -100,28 +100,36 @@ | |||
| 100 | (not (equal (url-port urlobj) | 100 | (not (equal (url-port urlobj) |
| 101 | (url-scheme-get-property (url-type urlobj) 'default-port)))) | 101 | (url-scheme-get-property (url-type urlobj) 'default-port)))) |
| 102 | (format ":%d" (url-port urlobj))) | 102 | (format ":%d" (url-port urlobj))) |
| 103 | (or (url-filename urlobj) "/") | 103 | (or (url-filename urlobj) "/") |
| 104 | (url-recreate-url-attributes urlobj) | ||
| 104 | (if (url-target urlobj) | 105 | (if (url-target urlobj) |
| 105 | (concat "#" (url-target urlobj))) | 106 | (concat "#" (url-target urlobj))))) |
| 106 | (if (url-attributes urlobj) | 107 | |
| 107 | (concat ";" | 108 | (defun url-recreate-url-attributes (urlobj) |
| 108 | (mapconcat | 109 | "Recreate the attributes of an URL string from the parsed URLOBJ." |
| 109 | (function | 110 | (when (url-attributes urlobj) |
| 110 | (lambda (x) | 111 | (concat "?" |
| 111 | (if (cdr x) | 112 | (mapconcat (lambda (x) |
| 112 | (concat (car x) "=" (cdr x)) | 113 | (if (cdr x) |
| 113 | (car x)))) (url-attributes urlobj) ";"))))) | 114 | (concat (car x) "=" (cdr x)) |
| 115 | (car x))) | ||
| 116 | (url-attributes urlobj) ";")))) | ||
| 114 | 117 | ||
| 115 | ;;;###autoload | 118 | ;;;###autoload |
| 116 | (defun url-generic-parse-url (url) | 119 | (defun url-generic-parse-url (url) |
| 117 | "Return a vector of the parts of URL. | 120 | "Return a vector of the parts of URL. |
| 118 | Format is: | 121 | Format is: |
| 119 | \[TYPE USER PASSWORD HOST PORT FILE TARGET ATTRIBUTES FULL\]" | 122 | \[TYPE USER PASSWORD HOST PORT FILE TARGET ATTRIBUTES FULL\]" |
| 123 | ;; See RFC 3986. | ||
| 120 | (cond | 124 | (cond |
| 121 | ((null url) | 125 | ((null url) |
| 122 | (make-vector 9 nil)) | 126 | (make-vector 9 nil)) |
| 123 | ((or (not (string-match url-nonrelative-link url)) | 127 | ((or (not (string-match url-nonrelative-link url)) |
| 124 | (= ?/ (string-to-char url))) | 128 | (= ?/ (string-to-char url))) |
| 129 | ;; This isn't correct, as a relative URL can be a fragment link | ||
| 130 | ;; (e.g. "#foo") and many other things (see section 4.2). | ||
| 131 | ;; However, let's not fix something that isn't broken, especially | ||
| 132 | ;; when close to a release. | ||
| 125 | (let ((retval (make-vector 9 nil))) | 133 | (let ((retval (make-vector 9 nil))) |
| 126 | (url-set-filename retval url) | 134 | (url-set-filename retval url) |
| 127 | (url-set-full retval nil) | 135 | (url-set-full retval nil) |
| @@ -145,6 +153,8 @@ Format is: | |||
| 145 | (insert url) | 153 | (insert url) |
| 146 | (goto-char (point-min)) | 154 | (goto-char (point-min)) |
| 147 | (setq save-pos (point)) | 155 | (setq save-pos (point)) |
| 156 | |||
| 157 | ;; 3.1. Scheme | ||
| 148 | (if (not (looking-at "//")) | 158 | (if (not (looking-at "//")) |
| 149 | (progn | 159 | (progn |
| 150 | (skip-chars-forward "a-zA-Z+.\\-") | 160 | (skip-chars-forward "a-zA-Z+.\\-") |
| @@ -153,13 +163,13 @@ Format is: | |||
| 153 | (skip-chars-forward ":") | 163 | (skip-chars-forward ":") |
| 154 | (setq save-pos (point)))) | 164 | (setq save-pos (point)))) |
| 155 | 165 | ||
| 156 | ;; We are doing a fully specified URL, with hostname and all | 166 | ;; 3.2. Authority |
| 157 | (if (looking-at "//") | 167 | (if (looking-at "//") |
| 158 | (progn | 168 | (progn |
| 159 | (setq full t) | 169 | (setq full t) |
| 160 | (forward-char 2) | 170 | (forward-char 2) |
| 161 | (setq save-pos (point)) | 171 | (setq save-pos (point)) |
| 162 | (skip-chars-forward "^/") | 172 | (skip-chars-forward "^/\\?#") |
| 163 | (setq host (buffer-substring save-pos (point))) | 173 | (setq host (buffer-substring save-pos (point))) |
| 164 | (if (string-match "^\\([^@]+\\)@" host) | 174 | (if (string-match "^\\([^@]+\\)@" host) |
| 165 | (setq user (match-string 1 host) | 175 | (setq user (match-string 1 host) |
| @@ -167,6 +177,7 @@ Format is: | |||
| 167 | (if (and user (string-match "\\([^:]+\\):\\(.*\\)" user)) | 177 | (if (and user (string-match "\\([^:]+\\):\\(.*\\)" user)) |
| 168 | (setq pass (match-string 2 user) | 178 | (setq pass (match-string 2 user) |
| 169 | user (match-string 1 user))) | 179 | user (match-string 1 user))) |
| 180 | ;; This gives wrong results for IPv6 literal addresses. | ||
| 170 | (if (string-match ":\\([0-9+]+\\)" host) | 181 | (if (string-match ":\\([0-9+]+\\)" host) |
| 171 | (setq port (string-to-number (match-string 1 host)) | 182 | (setq port (string-to-number (match-string 1 host)) |
| 172 | host (substring host 0 (match-beginning 0)))) | 183 | host (substring host 0 (match-beginning 0)))) |
| @@ -178,29 +189,26 @@ Format is: | |||
| 178 | (if (not port) | 189 | (if (not port) |
| 179 | (setq port (url-scheme-get-property prot 'default-port))) | 190 | (setq port (url-scheme-get-property prot 'default-port))) |
| 180 | 191 | ||
| 181 | ;; Gross hack to preserve ';' in data URLs | 192 | ;; 3.3. Path |
| 182 | |||
| 183 | (setq save-pos (point)) | 193 | (setq save-pos (point)) |
| 194 | (skip-chars-forward "^#?") | ||
| 195 | (setq file (buffer-substring save-pos (point))) | ||
| 184 | 196 | ||
| 185 | (if (string= "data" prot) | 197 | ;; 3.4. Query |
| 186 | (goto-char (point-max)) | 198 | (when (looking-at "\\?") |
| 187 | ;; Now check for references | 199 | (forward-char 1) |
| 200 | (setq save-pos (point)) | ||
| 188 | (skip-chars-forward "^#") | 201 | (skip-chars-forward "^#") |
| 189 | (if (eobp) | 202 | ;; RFC 3986 specifies no general way of parsing the query |
| 190 | nil | 203 | ;; string, but `url-parse-args' seems universal enough. |
| 191 | (delete-region | 204 | (setq attr (url-parse-args (buffer-substring save-pos (point)) t) |
| 192 | (point) | 205 | attr (nreverse attr))) |
| 193 | (progn | 206 | |
| 194 | (skip-chars-forward "#") | 207 | ;; 3.5. Fragment |
| 195 | (setq refs (buffer-substring (point) (point-max))) | 208 | (when (looking-at "#") |
| 196 | (point-max)))) | 209 | (forward-char 1) |
| 197 | (goto-char save-pos) | 210 | (setq refs (buffer-substring (point) (point-max)))) |
| 198 | (skip-chars-forward "^;") | ||
| 199 | (if (not (eobp)) | ||
| 200 | (setq attr (url-parse-args (buffer-substring (point) (point-max)) t) | ||
| 201 | attr (nreverse attr)))) | ||
| 202 | 211 | ||
| 203 | (setq file (buffer-substring save-pos (point))) | ||
| 204 | (if (and host (string-match "%[0-9][0-9]" host)) | 212 | (if (and host (string-match "%[0-9][0-9]" host)) |
| 205 | (setq host (url-unhex-string host))) | 213 | (setq host (url-unhex-string host))) |
| 206 | (vector prot user pass host port file refs attr full)))))) | 214 | (vector prot user pass host port file refs attr full)))))) |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 13425391647..8b9973acab1 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -52,11 +52,13 @@ BACKEND, use `vc-handled-backends'.") | |||
| 52 | (defvar vc-header-alist ()) | 52 | (defvar vc-header-alist ()) |
| 53 | (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header) | 53 | (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header) |
| 54 | 54 | ||
| 55 | (defvar vc-ignore-dir-regexp "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'" | 55 | (defcustom vc-ignore-dir-regexp "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'" |
| 56 | "Regexp matching directory names that are not under VC's control. | 56 | "Regexp matching directory names that are not under VC's control. |
| 57 | The default regexp prevents fruitless and time-consuming attempts | 57 | The default regexp prevents fruitless and time-consuming attempts |
| 58 | to determine the VC status in directories in which filenames are | 58 | to determine the VC status in directories in which filenames are |
| 59 | interpreted as hostnames.") | 59 | interpreted as hostnames." |
| 60 | :type 'regexp | ||
| 61 | :group 'vc) | ||
| 60 | 62 | ||
| 61 | (defcustom vc-handled-backends '(RCS CVS SVN SCCS Arch MCVS) | 63 | (defcustom vc-handled-backends '(RCS CVS SVN SCCS Arch MCVS) |
| 62 | ;; Arch and MCVS come last because they are per-tree rather than per-dir. | 64 | ;; Arch and MCVS come last because they are per-tree rather than per-dir. |
| @@ -308,6 +310,9 @@ non-nil if FILE exists and its contents were successfully inserted." | |||
| 308 | "Find the root of a checked out project. | 310 | "Find the root of a checked out project. |
| 309 | The function walks up the directory tree from FILE looking for WITNESS. | 311 | The function walks up the directory tree from FILE looking for WITNESS. |
| 310 | If WITNESS if not found, return nil, otherwise return the root." | 312 | If WITNESS if not found, return nil, otherwise return the root." |
| 313 | ;; Represent /home/luser/foo as ~/foo so that we don't try to look for | ||
| 314 | ;; witnesses in /home or in /. | ||
| 315 | (setq file (abbreviate-file-name file)) | ||
| 311 | (let ((root nil)) | 316 | (let ((root nil)) |
| 312 | (while (not (or root | 317 | (while (not (or root |
| 313 | (equal file (setq file (file-name-directory file))) | 318 | (equal file (setq file (file-name-directory file))) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index fc64dd5f361..af41424ca75 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -912,6 +912,10 @@ Recommended as a parent keymap for modes using widgets.") | |||
| 912 | ;; backward-compatibility alias | 912 | ;; backward-compatibility alias |
| 913 | (put 'widget-button-pressed-face 'face-alias 'widget-button-pressed) | 913 | (put 'widget-button-pressed-face 'face-alias 'widget-button-pressed) |
| 914 | 914 | ||
| 915 | (defvar widget-button-click-moves-point nil | ||
| 916 | "If non-nil, `widget-button-click' moves point to a button after invoking it. | ||
| 917 | If nil, point returns to its original position after invoking a button.") | ||
| 918 | |||
| 915 | (defun widget-button-click (event) | 919 | (defun widget-button-click (event) |
| 916 | "Invoke the button that the mouse is pointing at." | 920 | "Invoke the button that the mouse is pointing at." |
| 917 | (interactive "e") | 921 | (interactive "e") |
| @@ -922,7 +926,8 @@ Recommended as a parent keymap for modes using widgets.") | |||
| 922 | (start (event-start event)) | 926 | (start (event-start event)) |
| 923 | (button (get-char-property | 927 | (button (get-char-property |
| 924 | pos 'button (and (windowp (posn-window start)) | 928 | pos 'button (and (windowp (posn-window start)) |
| 925 | (window-buffer (posn-window start)))))) | 929 | (window-buffer (posn-window start))))) |
| 930 | newpoint) | ||
| 926 | (when (or (null button) | 931 | (when (or (null button) |
| 927 | (catch 'button-press-cancelled | 932 | (catch 'button-press-cancelled |
| 928 | ;; Mouse click on a widget button. Do the following | 933 | ;; Mouse click on a widget button. Do the following |
| @@ -959,24 +964,30 @@ Recommended as a parent keymap for modes using widgets.") | |||
| 959 | (push event unread-command-events) | 964 | (push event unread-command-events) |
| 960 | (setq event oevent) | 965 | (setq event oevent) |
| 961 | (throw 'button-press-cancelled t)) | 966 | (throw 'button-press-cancelled t)) |
| 962 | (setq pos (widget-event-point event)) | 967 | (unless (or (integerp event) |
| 963 | (if (and pos | 968 | (memq (car event) '(switch-frame select-window)) |
| 964 | (eq (get-char-property pos 'button) | 969 | (eq (car event) 'scroll-bar-movement)) |
| 965 | button)) | 970 | (setq pos (widget-event-point event)) |
| 966 | (when face | 971 | (if (and pos |
| 967 | (overlay-put overlay 'face pressed-face) | 972 | (eq (get-char-property pos 'button) |
| 968 | (overlay-put overlay 'mouse-face pressed-face)) | 973 | button)) |
| 969 | (overlay-put overlay 'face face) | 974 | (when face |
| 970 | (overlay-put overlay 'mouse-face mouse-face))))) | 975 | (overlay-put overlay 'face pressed-face) |
| 976 | (overlay-put overlay 'mouse-face pressed-face)) | ||
| 977 | (overlay-put overlay 'face face) | ||
| 978 | (overlay-put overlay 'mouse-face mouse-face)))))) | ||
| 971 | 979 | ||
| 972 | ;; When mouse is released over the button, run | 980 | ;; When mouse is released over the button, run |
| 973 | ;; its action function. | 981 | ;; its action function. |
| 974 | (when (and pos | 982 | (when (and pos (eq (get-char-property pos 'button) button)) |
| 975 | (eq (get-char-property pos 'button) button)) | 983 | (goto-char pos) |
| 976 | (widget-apply-action button event))) | 984 | (widget-apply-action button event) |
| 985 | (if widget-button-click-moves-point | ||
| 986 | (setq newpoint (point))))) | ||
| 977 | (overlay-put overlay 'face face) | 987 | (overlay-put overlay 'face face) |
| 978 | (overlay-put overlay 'mouse-face mouse-face)))) | 988 | (overlay-put overlay 'mouse-face mouse-face)))) |
| 979 | 989 | ||
| 990 | (if newpoint (goto-char newpoint)) | ||
| 980 | ;; This loses if the widget action switches windows. -- cyd | 991 | ;; This loses if the widget action switches windows. -- cyd |
| 981 | ;; (unless (pos-visible-in-window-p (widget-event-point event)) | 992 | ;; (unless (pos-visible-in-window-p (widget-event-point event)) |
| 982 | ;; (mouse-set-point event) | 993 | ;; (mouse-set-point event) |
| @@ -1862,7 +1873,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1862 | "History of field minibuffer edits.") | 1873 | "History of field minibuffer edits.") |
| 1863 | 1874 | ||
| 1864 | (defun widget-field-prompt-internal (widget prompt initial history) | 1875 | (defun widget-field-prompt-internal (widget prompt initial history) |
| 1865 | "Read string for WIDGET promptinhg with PROMPT. | 1876 | "Read string for WIDGET prompting with PROMPT. |
| 1866 | INITIAL is the initial input and HISTORY is a symbol containing | 1877 | INITIAL is the initial input and HISTORY is a symbol containing |
| 1867 | the earlier input." | 1878 | the earlier input." |
| 1868 | (read-string prompt initial history)) | 1879 | (read-string prompt initial history)) |
| @@ -2853,7 +2864,7 @@ The first group should be the link itself." | |||
| 2853 | 2864 | ||
| 2854 | (defcustom widget-documentation-link-p 'intern-soft | 2865 | (defcustom widget-documentation-link-p 'intern-soft |
| 2855 | "Predicate used to test if a string is useful as a link. | 2866 | "Predicate used to test if a string is useful as a link. |
| 2856 | The value should be a function. The function will be called one | 2867 | The value should be a function. The function will be called with one |
| 2857 | argument, a string, and should return non-nil if there should be a | 2868 | argument, a string, and should return non-nil if there should be a |
| 2858 | link for that string." | 2869 | link for that string." |
| 2859 | :type 'function | 2870 | :type 'function |
diff --git a/lisp/window.el b/lisp/window.el index 7810ba4c5be..0c50bc63a08 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -777,21 +777,134 @@ and the buffer that is killed or buried is the one in that window." | |||
| 777 | ;; Maybe get rid of the window. | 777 | ;; Maybe get rid of the window. |
| 778 | (and window (not window-handled) (not window-solitary) | 778 | (and window (not window-handled) (not window-solitary) |
| 779 | (delete-window window)))) | 779 | (delete-window window)))) |
| 780 | |||
| 781 | (defvar mouse-autoselect-window-timer nil | ||
| 782 | "Timer used by delayed window autoselection.") | ||
| 783 | |||
| 784 | (defvar mouse-autoselect-window-position nil | ||
| 785 | "Last mouse position recorded by delayed window autoselection.") | ||
| 786 | |||
| 787 | (defvar mouse-autoselect-window-window nil | ||
| 788 | "Last window recorded by delayed window autoselection.") | ||
| 789 | |||
| 790 | (defvar mouse-autoselect-window-now nil | ||
| 791 | "When non-nil don't delay autoselection in `handle-select-window'.") | ||
| 792 | |||
| 793 | (defun mouse-autoselect-window-cancel (&optional force) | ||
| 794 | "Cancel delayed window autoselection. | ||
| 795 | Optional argument FORCE means cancel unconditionally." | ||
| 796 | (unless (and (not force) | ||
| 797 | ;; Don't cancel while the user drags a scroll bar. | ||
| 798 | (eq this-command 'scroll-bar-toolkit-scroll) | ||
| 799 | (memq (nth 4 (event-end last-input-event)) | ||
| 800 | '(handle end-scroll))) | ||
| 801 | (setq mouse-autoselect-window-now nil) | ||
| 802 | (when (timerp mouse-autoselect-window-timer) | ||
| 803 | (cancel-timer mouse-autoselect-window-timer)) | ||
| 804 | (remove-hook 'pre-command-hook 'mouse-autoselect-window-cancel))) | ||
| 805 | |||
| 806 | (defun mouse-autoselect-window-start (window) | ||
| 807 | "Start delayed window autoselection. | ||
| 808 | Called when Emacs detects that the mouse has moved to the non-selected | ||
| 809 | window WINDOW and the variable `mouse-autoselect-window' has a numeric, | ||
| 810 | non-zero value. The return value is non-nil iff delayed autoselection | ||
| 811 | started successfully. Delayed window autoselection is canceled when the | ||
| 812 | mouse position has stabilized or a command is executed." | ||
| 813 | ;; Cancel any active window autoselection. | ||
| 814 | (mouse-autoselect-window-cancel t) | ||
| 815 | ;; Record current mouse position in `mouse-autoselect-window-position' and | ||
| 816 | ;; WINDOW in `mouse-autoselect-window-window'. | ||
| 817 | (setq mouse-autoselect-window-position (mouse-position)) | ||
| 818 | (setq mouse-autoselect-window-window window) | ||
| 819 | ;; Install timer which runs `mouse-autoselect-window-select' every | ||
| 820 | ;; `mouse-autoselect-window' seconds. | ||
| 821 | (setq mouse-autoselect-window-timer | ||
| 822 | (run-at-time | ||
| 823 | (abs mouse-autoselect-window) (abs mouse-autoselect-window) | ||
| 824 | 'mouse-autoselect-window-select)) | ||
| 825 | ;; Executing a command cancels window autoselection. | ||
| 826 | (add-hook 'pre-command-hook 'mouse-autoselect-window-cancel)) | ||
| 827 | |||
| 828 | (defun mouse-autoselect-window-select () | ||
| 829 | "Select window with delayed window autoselection. | ||
| 830 | If the mouse position has stabilized in a non-selected window, select | ||
| 831 | that window. The minibuffer window is selected iff the minibuffer is | ||
| 832 | active. This function is run by `mouse-autoselect-window-timer'." | ||
| 833 | (condition-case nil | ||
| 834 | (let* ((mouse-position (mouse-position)) | ||
| 835 | (window (window-at (cadr mouse-position) (cddr mouse-position) | ||
| 836 | (car mouse-position)))) | ||
| 837 | (cond | ||
| 838 | ((and window (not (eq window (selected-window))) | ||
| 839 | (or (not (numberp mouse-autoselect-window)) | ||
| 840 | (and (> mouse-autoselect-window 0) | ||
| 841 | ;; If `mouse-autoselect-window' is positive, select | ||
| 842 | ;; window if the window is the same as before. | ||
| 843 | (eq window mouse-autoselect-window-window)) | ||
| 844 | ;; Otherwise select window iff the mouse is at the same | ||
| 845 | ;; position as before. Observe that the first test after | ||
| 846 | ;; `mouse-autoselect-window-start' usually fails since the | ||
| 847 | ;; value of `mouse-autoselect-window-position' recorded there | ||
| 848 | ;; is the position where the mouse has entered the new window | ||
| 849 | ;; and not necessarily where the mouse has stopped moving. | ||
| 850 | (equal mouse-position mouse-autoselect-window-position)) | ||
| 851 | ;; The minibuffer is a candidate window iff it's active. | ||
| 852 | (or (not (window-minibuffer-p window)) | ||
| 853 | (eq window (active-minibuffer-window)))) | ||
| 854 | ;; Mouse position has stabilized in non-selected window: Cancel window | ||
| 855 | ;; autoselection and try to select that window. | ||
| 856 | (mouse-autoselect-window-cancel t) | ||
| 857 | ;; Select window where mouse appears unless the selected window is the | ||
| 858 | ;; minibuffer. Use `unread-command-events' in order to execute pre- | ||
| 859 | ;; and post-command hooks and trigger idle timers. To avoid delaying | ||
| 860 | ;; autoselection again, temporarily set `mouse-autoselect-window-now' | ||
| 861 | ;; to t. | ||
| 862 | (unless (window-minibuffer-p (selected-window)) | ||
| 863 | (setq mouse-autoselect-window-now t) | ||
| 864 | (setq unread-command-events | ||
| 865 | (cons (list 'select-window (list window)) | ||
| 866 | unread-command-events)))) | ||
| 867 | ((or (and window (eq window (selected-window))) | ||
| 868 | (not (numberp mouse-autoselect-window)) | ||
| 869 | (equal mouse-position mouse-autoselect-window-position)) | ||
| 870 | ;; Mouse position has either stabilized in the selected window or at | ||
| 871 | ;; `mouse-autoselect-window-position': Cancel window autoselection. | ||
| 872 | (mouse-autoselect-window-cancel t)) | ||
| 873 | (t | ||
| 874 | ;; Mouse position has not stabilized yet, record new mouse position in | ||
| 875 | ;; `mouse-autoselect-window-position' and any window at that position | ||
| 876 | ;; in `mouse-autoselect-window-window'. | ||
| 877 | (setq mouse-autoselect-window-position mouse-position) | ||
| 878 | (setq mouse-autoselect-window-window window)))) | ||
| 879 | (error nil))) | ||
| 780 | 880 | ||
| 781 | (defun handle-select-window (event) | 881 | (defun handle-select-window (event) |
| 782 | "Handle select-window events." | 882 | "Handle select-window events." |
| 783 | (interactive "e") | 883 | (interactive "e") |
| 784 | (let ((window (posn-window (event-start event)))) | 884 | (let ((window (posn-window (event-start event)))) |
| 785 | (if (and (window-live-p window) | 885 | (when (and (window-live-p window) |
| 786 | ;; Don't switch if we're currently in the minibuffer. | 886 | ;; Don't switch if we're currently in the minibuffer. |
| 787 | ;; This tries to work around problems where the minibuffer gets | 887 | ;; This tries to work around problems where the minibuffer gets |
| 788 | ;; unselected unexpectedly, and where you then have to move | 888 | ;; unselected unexpectedly, and where you then have to move |
| 789 | ;; your mouse all the way down to the minibuffer to select it. | 889 | ;; your mouse all the way down to the minibuffer to select it. |
| 790 | (not (window-minibuffer-p (selected-window))) | 890 | (not (window-minibuffer-p (selected-window))) |
| 791 | ;; Don't switch to a minibuffer window unless it's active. | 891 | ;; Don't switch to a minibuffer window unless it's active. |
| 792 | (or (not (window-minibuffer-p window)) | 892 | (or (not (window-minibuffer-p window)) |
| 793 | (minibuffer-window-active-p window))) | 893 | (minibuffer-window-active-p window))) |
| 794 | (select-window window)))) | 894 | (unless (and (numberp mouse-autoselect-window) |
| 895 | (not (zerop mouse-autoselect-window)) | ||
| 896 | (not mouse-autoselect-window-now) | ||
| 897 | ;; When `mouse-autoselect-window' has a numeric, non-zero | ||
| 898 | ;; value, delay window autoselection by that value. | ||
| 899 | ;; `mouse-autoselect-window-start' returns non-nil iff it | ||
| 900 | ;; successfully installed a timer for this purpose. | ||
| 901 | (mouse-autoselect-window-start window)) | ||
| 902 | ;; Re-enable delayed window autoselection. | ||
| 903 | (setq mouse-autoselect-window-now nil) | ||
| 904 | (when mouse-autoselect-window | ||
| 905 | ;; Run `mouse-leave-buffer-hook' when autoselecting window. | ||
| 906 | (run-hooks 'mouse-leave-buffer-hook)) | ||
| 907 | (select-window window))))) | ||
| 795 | 908 | ||
| 796 | (define-key ctl-x-map "2" 'split-window-vertically) | 909 | (define-key ctl-x-map "2" 'split-window-vertically) |
| 797 | (define-key ctl-x-map "3" 'split-window-horizontally) | 910 | (define-key ctl-x-map "3" 'split-window-horizontally) |
diff --git a/lisp/woman.el b/lisp/woman.el index 2392d0bfa4c..13fa3147487 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -438,6 +438,7 @@ | |||
| 438 | 438 | ||
| 439 | (eval-when-compile ; to avoid compiler warnings | 439 | (eval-when-compile ; to avoid compiler warnings |
| 440 | (require 'dired) | 440 | (require 'dired) |
| 441 | (require 'cl) | ||
| 441 | (require 'apropos)) | 442 | (require 'apropos)) |
| 442 | 443 | ||
| 443 | (defun woman-mapcan (fn x) | 444 | (defun woman-mapcan (fn x) |
| @@ -1196,7 +1197,7 @@ It is saved to the file named by the variable `woman-cache-filename'." | |||
| 1196 | (kill-buffer standard-output) | 1197 | (kill-buffer standard-output) |
| 1197 | )))) | 1198 | )))) |
| 1198 | 1199 | ||
| 1199 | (defvar woman-topic-history nil "Topic read history.") | 1200 | (defvaralias 'woman-topic-history 'Man-topic-history) |
| 1200 | (defvar woman-file-history nil "File-name read history.") | 1201 | (defvar woman-file-history nil "File-name read history.") |
| 1201 | 1202 | ||
| 1202 | (defun woman-file-name (topic &optional re-cache) | 1203 | (defun woman-file-name (topic &optional re-cache) |
| @@ -1750,7 +1751,18 @@ Leave point at end of new text. Return length of inserted text." | |||
| 1750 | (define-key woman-mode-map [M-mouse-2] 'woman-follow-word) | 1751 | (define-key woman-mode-map [M-mouse-2] 'woman-follow-word) |
| 1751 | 1752 | ||
| 1752 | ;; We don't need to call `man' when we are in `woman-mode'. | 1753 | ;; We don't need to call `man' when we are in `woman-mode'. |
| 1753 | (define-key woman-mode-map [remap man] 'woman)) | 1754 | (define-key woman-mode-map [remap man] 'woman) |
| 1755 | (define-key woman-mode-map [remap man-follow] 'woman-follow)) | ||
| 1756 | |||
| 1757 | (defun woman-follow (topic) | ||
| 1758 | "Get a Un*x manual page of the item under point and put it in a buffer." | ||
| 1759 | (interactive (list (Man-default-man-entry))) | ||
| 1760 | (if (or (not topic) | ||
| 1761 | (string= topic "")) | ||
| 1762 | (error "No item under point") | ||
| 1763 | (woman (if (string-match Man-reference-regexp topic) | ||
| 1764 | (substring topic 0 (match-end 1)) | ||
| 1765 | topic)))) | ||
| 1754 | 1766 | ||
| 1755 | (defun woman-follow-word (event) | 1767 | (defun woman-follow-word (event) |
| 1756 | "Run WoMan with word under mouse as topic. | 1768 | "Run WoMan with word under mouse as topic. |
| @@ -2456,6 +2468,7 @@ Start at FROM and re-scan new text as appropriate." | |||
| 2456 | (woman0-search-regex | 2468 | (woman0-search-regex |
| 2457 | (concat woman0-search-regex-start woman0-search-regex-end)) | 2469 | (concat woman0-search-regex-start woman0-search-regex-end)) |
| 2458 | woman0-rename-alist) | 2470 | woman0-rename-alist) |
| 2471 | (set-marker-insertion-type woman0-if-to t) | ||
| 2459 | (while (re-search-forward woman0-search-regex nil t) | 2472 | (while (re-search-forward woman0-search-regex nil t) |
| 2460 | (setq request (match-string 1)) | 2473 | (setq request (match-string 1)) |
| 2461 | (cond ((string= request "ig") (woman0-ig)) | 2474 | (cond ((string= request "ig") (woman0-ig)) |
| @@ -2529,7 +2542,7 @@ REQUEST is the invoking directive without the leading dot." | |||
| 2529 | ;; String delimiter can be any non-numeric character, | 2542 | ;; String delimiter can be any non-numeric character, |
| 2530 | ;; including a special character escape: | 2543 | ;; including a special character escape: |
| 2531 | (looking-at "\\(\\\\(..\\|[^0-9]\\)\\(.*\\)\\1\\(.*\\)\\1\\'")) | 2544 | (looking-at "\\(\\\\(..\\|[^0-9]\\)\\(.*\\)\\1\\(.*\\)\\1\\'")) |
| 2532 | (let ((end1 (copy-marker (match-end 2)))) ; end of first string | 2545 | (let ((end1 (copy-marker (match-end 2) t))) ; End of first string. |
| 2533 | ;; Delete 2nd and 3rd delimiters to avoid processing them: | 2546 | ;; Delete 2nd and 3rd delimiters to avoid processing them: |
| 2534 | (delete-region (match-end 3) woman0-if-to) | 2547 | (delete-region (match-end 3) woman0-if-to) |
| 2535 | (delete-region (match-end 2) (match-beginning 3)) | 2548 | (delete-region (match-end 2) (match-beginning 3)) |
| @@ -2644,10 +2657,9 @@ If DELETE is non-nil then delete from point." | |||
| 2644 | (error "File `%s' not found" name)) | 2657 | (error "File `%s' not found" name)) |
| 2645 | (beginning-of-line) | 2658 | (beginning-of-line) |
| 2646 | (woman-delete-line 1) | 2659 | (woman-delete-line 1) |
| 2647 | (let ((from (point)) | 2660 | (let* ((from (point)) |
| 2648 | (to (make-marker)) | 2661 | (length (woman-insert-file-contents filename 0)) |
| 2649 | (length (woman-insert-file-contents filename 0))) | 2662 | (to (copy-marker (+ from length) t))) |
| 2650 | (set-marker to (+ from length)) | ||
| 2651 | (woman-pre-process-region from to) | 2663 | (woman-pre-process-region from to) |
| 2652 | (set-marker to nil) | 2664 | (set-marker to nil) |
| 2653 | (goto-char from) | 2665 | (goto-char from) |
| @@ -3431,9 +3443,7 @@ Also bound locally in `woman2-roff-buffer'.") | |||
| 3431 | (defsubst woman2-process-escapes-to-eol (&optional numeric) | 3443 | (defsubst woman2-process-escapes-to-eol (&optional numeric) |
| 3432 | "Process remaining escape sequences up to eol. | 3444 | "Process remaining escape sequences up to eol. |
| 3433 | Handle numeric arguments specially if optional argument NUMERIC is non-nil." | 3445 | Handle numeric arguments specially if optional argument NUMERIC is non-nil." |
| 3434 | (woman2-process-escapes | 3446 | (woman2-process-escapes (copy-marker (line-end-position) t) numeric)) |
| 3435 | (save-excursion (end-of-line) (point-marker)) | ||
| 3436 | numeric)) | ||
| 3437 | 3447 | ||
| 3438 | (defun woman2-nr (to) | 3448 | (defun woman2-nr (to) |
| 3439 | ".nr R +/-N M -- Assign +/-N (wrt to previous value, if any) to register R. | 3449 | ".nr R +/-N M -- Assign +/-N (wrt to previous value, if any) to register R. |
| @@ -3634,6 +3644,7 @@ expression in parentheses. Leaves point after the value." | |||
| 3634 | (woman-registers woman-registers) | 3644 | (woman-registers woman-registers) |
| 3635 | fn request translations | 3645 | fn request translations |
| 3636 | tab-stop-list) | 3646 | tab-stop-list) |
| 3647 | (set-marker-insertion-type to t) | ||
| 3637 | ;; ?roff does not squeeze multiple spaces, but does fill, so... | 3648 | ;; ?roff does not squeeze multiple spaces, but does fill, so... |
| 3638 | (fset 'canonically-space-region 'ignore) | 3649 | (fset 'canonically-space-region 'ignore) |
| 3639 | ;; Try to avoid spaces inheriting underlines from preceding text! | 3650 | ;; Try to avoid spaces inheriting underlines from preceding text! |
| @@ -3676,7 +3687,8 @@ expression in parentheses. Leaves point after the value." | |||
| 3676 | ;; Call the appropriate function: | 3687 | ;; Call the appropriate function: |
| 3677 | (funcall fn to))) | 3688 | (funcall fn to))) |
| 3678 | (if (not (eobp)) ; This should not happen, but ... | 3689 | (if (not (eobp)) ; This should not happen, but ... |
| 3679 | (woman2-format-paragraphs (point-max-marker) woman-left-margin)) | 3690 | (woman2-format-paragraphs (copy-marker (point-max) t) |
| 3691 | woman-left-margin)) | ||
| 3680 | (fset 'canonically-space-region canonically-space-region) | 3692 | (fset 'canonically-space-region canonically-space-region) |
| 3681 | (fset 'set-text-properties set-text-properties) | 3693 | (fset 'set-text-properties set-text-properties) |
| 3682 | (fset 'insert-and-inherit insert-and-inherit) | 3694 | (fset 'insert-and-inherit insert-and-inherit) |
| @@ -3888,6 +3900,7 @@ Leave 1 blank line. Format paragraphs upto TO." | |||
| 3888 | (defun woman2-process-escapes (to &optional numeric) | 3900 | (defun woman2-process-escapes (to &optional numeric) |
| 3889 | "Process remaining escape sequences up to marker TO, preserving point. | 3901 | "Process remaining escape sequences up to marker TO, preserving point. |
| 3890 | Optional argument NUMERIC, if non-nil, means the argument is numeric." | 3902 | Optional argument NUMERIC, if non-nil, means the argument is numeric." |
| 3903 | (assert (and (markerp to) (marker-insertion-type to))) | ||
| 3891 | ;; The first two cases below could be merged (maybe)! | 3904 | ;; The first two cases below could be merged (maybe)! |
| 3892 | (let ((from (point))) | 3905 | (let ((from (point))) |
| 3893 | ;; Discard zero width filler character used to hide leading dots | 3906 | ;; Discard zero width filler character used to hide leading dots |
| @@ -3957,15 +3970,13 @@ Optional argument NUMERIC, if non-nil, means the argument is numeric." | |||
| 3957 | (delete-char -1) | 3970 | (delete-char -1) |
| 3958 | (delete-char 1) | 3971 | (delete-char 1) |
| 3959 | (looking-at "\\(.\\)\\(.*\\)\\1") | 3972 | (looking-at "\\(.\\)\\(.*\\)\\1") |
| 3960 | (let ((to (make-marker)) from N c) | 3973 | (forward-char 1) |
| 3961 | (set-marker to (match-end 2)) | 3974 | (let* ((to (match-end 2)) |
| 3962 | (delete-char 1) | 3975 | (from (match-beginning 0)) |
| 3963 | (setq from (point) | 3976 | (N (woman-parse-numeric-arg)) |
| 3964 | N (woman-parse-numeric-arg)) | 3977 | (c (if (< (point) to) (following-char) ?_))) |
| 3965 | (setq c (if (< (point) to) (following-char) ?_)) | ||
| 3966 | (delete-region from to) | 3978 | (delete-region from to) |
| 3967 | (delete-char 1) | 3979 | (delete-char 1) |
| 3968 | (set-marker to nil) | ||
| 3969 | (insert (make-string N c)) | 3980 | (insert (make-string N c)) |
| 3970 | )) | 3981 | )) |
| 3971 | 3982 | ||