diff options
| author | Eli Zaretskii | 2010-02-05 09:28:04 -0500 |
|---|---|---|
| committer | Eli Zaretskii | 2010-02-05 09:28:04 -0500 |
| commit | 565cbcc3282217eea840141a424c692f68093f8e (patch) | |
| tree | 90fc13dd8ee31a854247e835a66d4f61a21a24ee | |
| parent | cc2d79728f517ab4b437539826a331181102c60d (diff) | |
| parent | d9320986e56f1a3761ad8da0f77794fa9c99ef46 (diff) | |
| download | emacs-565cbcc3282217eea840141a424c692f68093f8e.tar.gz emacs-565cbcc3282217eea840141a424c692f68093f8e.zip | |
Merge from mainline.
44 files changed, 865 insertions, 299 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-01-31 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * .bzrignore: Add TAGS-LISP. | ||
| 4 | |||
| 1 | 2010-01-23 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) | 5 | 2010-01-23 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) |
| 2 | 6 | ||
| 3 | * configure.in: Check for utmp.h availability (FreeBSD 9.x lacks | 7 | * configure.in: Check for utmp.h availability (FreeBSD 9.x lacks |
diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker index c8c66681e0f..3870113489e 100644 --- a/admin/notes/bugtracker +++ b/admin/notes/bugtracker | |||
| @@ -403,6 +403,17 @@ http://debbugs.gnu.org/db/ix/full.html | |||
| 403 | maintainers (ie, bug-gnu-emacs). These have some changed headers | 403 | maintainers (ie, bug-gnu-emacs). These have some changed headers |
| 404 | (Resent-*, Subject, etc). | 404 | (Resent-*, Subject, etc). |
| 405 | 405 | ||
| 406 | ** What do the pkgreport.cgi sort options mean? | ||
| 407 | |||
| 408 | "normal" = by open/closed status, then severity, then tag, then bug number | ||
| 409 | |||
| 410 | "oldview" = as above, but without the tag part | ||
| 411 | |||
| 412 | "age" = as normal, but sort in decreasing order of last modification | ||
| 413 | time, rather than by increasing bug number | ||
| 414 | |||
| 415 | "raw" = ? | ||
| 416 | |||
| 406 | ** ChangeLog issues | 417 | ** ChangeLog issues |
| 407 | 418 | ||
| 408 | *** When you fix a bug, it can be helpful to put the bug number in the | 419 | *** When you fix a bug, it can be helpful to put the bug number in the |
| @@ -527,6 +538,15 @@ recipient: emacs-bug-tracker AT debbugs\.gnu\.org | |||
| 527 | The latter is because that is the address that debbugs actually sends to. | 538 | The latter is because that is the address that debbugs actually sends to. |
| 528 | An /etc/aliases entry redirects it to the real emacs-bug-tracker address. | 539 | An /etc/aliases entry redirects it to the real emacs-bug-tracker address. |
| 529 | 540 | ||
| 541 | ** Recovering from moderation mistakes | ||
| 542 | |||
| 543 | All discarded messages are stored in /var/lib/mailman/spam. | ||
| 544 | If a non-spam message accidentally gets discarded, just do: | ||
| 545 | |||
| 546 | cat /var/lib/mailman/spam/not-really-spam.msg | /usr/lib/debbugs/receive | ||
| 547 | ... check it works ... | ||
| 548 | mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/ | ||
| 549 | |||
| 530 | ** Administrivia | 550 | ** Administrivia |
| 531 | 551 | ||
| 532 | The debbugs-submit list should have the administrivia option off, | 552 | The debbugs-submit list should have the administrivia option off, |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 39ffa2c2acc..a039e632d5a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * display.texi (Useless Whitespace, Text Display): | ||
| 4 | * custom.texi (Init Examples): Avoid obsolete special default variables | ||
| 5 | like default-major-mode. | ||
| 6 | |||
| 1 | 2010-01-24 Mark A. Hershberger <mah@everybody.org> | 7 | 2010-01-24 Mark A. Hershberger <mah@everybody.org> |
| 2 | 8 | ||
| 3 | * programs.texi (Other C Commands): Replace reference to obsolete | 9 | * programs.texi (Other C Commands): Replace reference to obsolete |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index a7e74388a39..a4914531192 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -2275,7 +2275,7 @@ Various Emacs packages that need your own email address use the value of | |||
| 2275 | Make Text mode the default mode for new buffers. | 2275 | Make Text mode the default mode for new buffers. |
| 2276 | 2276 | ||
| 2277 | @example | 2277 | @example |
| 2278 | (setq default-major-mode 'text-mode) | 2278 | (setq-default major-mode 'text-mode) |
| 2279 | @end example | 2279 | @end example |
| 2280 | 2280 | ||
| 2281 | Note that @code{text-mode} is used because it is the command for | 2281 | Note that @code{text-mode} is used because it is the command for |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index c7afe5445a6..a5d064e578a 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -877,7 +877,6 @@ portion (@pxref{Narrowing}), type @kbd{M-x delete-trailing-whitespace | |||
| 877 | @key{RET}}. This command does not remove newline characters. | 877 | @key{RET}}. This command does not remove newline characters. |
| 878 | 878 | ||
| 879 | @vindex indicate-empty-lines | 879 | @vindex indicate-empty-lines |
| 880 | @vindex default-indicate-empty-lines | ||
| 881 | @cindex unused lines | 880 | @cindex unused lines |
| 882 | @cindex fringes, and unused line indication | 881 | @cindex fringes, and unused line indication |
| 883 | Emacs can indicate unused lines at the end of the window with a | 882 | Emacs can indicate unused lines at the end of the window with a |
| @@ -887,11 +886,11 @@ lines at the end of the buffer then stand out because they do not have | |||
| 887 | this image in the fringe. | 886 | this image in the fringe. |
| 888 | 887 | ||
| 889 | To enable this feature, set the buffer-local variable | 888 | To enable this feature, set the buffer-local variable |
| 890 | @code{indicate-empty-lines} to a non-@code{nil} value. The default | 889 | @code{indicate-empty-lines} to a non-@code{nil} value. You can enable |
| 891 | value of this variable is controlled by the variable | 890 | or disable this feature for all new buffers by setting the default |
| 892 | @code{default-indicate-empty-lines}; by setting that variable, you | 891 | value of this variable, e.g.@: @code{(setq-default |
| 893 | can enable or disable this feature for all new buffers. (This feature | 892 | indicate-empty-lines t)};. (This feature currently doesn't work on |
| 894 | currently doesn't work on text-only terminals.) | 893 | text-only terminals.) |
| 895 | 894 | ||
| 896 | @node Selective Display | 895 | @node Selective Display |
| 897 | @section Selective Display | 896 | @section Selective Display |
| @@ -1083,17 +1082,15 @@ buffers are displayed with their graphics, as are non-@acronym{ASCII} multibyte | |||
| 1083 | printing characters (octal codes above 0400). | 1082 | printing characters (octal codes above 0400). |
| 1084 | 1083 | ||
| 1085 | @vindex tab-width | 1084 | @vindex tab-width |
| 1086 | @vindex default-tab-width | ||
| 1087 | Some @acronym{ASCII} control characters are displayed in special | 1085 | Some @acronym{ASCII} control characters are displayed in special |
| 1088 | ways. The newline character (octal code 012) is displayed by starting | 1086 | ways. The newline character (octal code 012) is displayed by starting |
| 1089 | a new line. The tab character (octal code 011) is displayed by moving | 1087 | a new line. The tab character (octal code 011) is displayed by moving |
| 1090 | to the next tab stop column (normally every 8 columns). The number of | 1088 | to the next tab stop column (normally every 8 columns). The number of |
| 1091 | spaces per tab is controlled by the variable @code{tab-width}, which | 1089 | spaces per tab is controlled by the variable @code{tab-width}, which |
| 1092 | must have an integer value between 1 and 1000, inclusive, and is made | 1090 | must have an integer value between 1 and 1000, inclusive, and is made |
| 1093 | local by changing it. Note that how the tab character in the buffer | 1091 | buffer-local by changing it. Note that how the tab character in the buffer |
| 1094 | is displayed has nothing to do with the definition of @key{TAB} as a | 1092 | is displayed has nothing to do with the definition of @key{TAB} as a |
| 1095 | command. The variable @code{default-tab-width} controls the default | 1093 | command. |
| 1096 | value of this variable for buffers where you have not set it locally. | ||
| 1097 | 1094 | ||
| 1098 | Other @acronym{ASCII} control characters are normally displayed as a caret | 1095 | Other @acronym{ASCII} control characters are normally displayed as a caret |
| 1099 | (@samp{^}) followed by the non-control version of the character; thus, | 1096 | (@samp{^}) followed by the non-control version of the character; thus, |
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 38332c4a1d9..c22d7523fa0 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp-intro.texi (Text and Auto-fill, Mode Line): | ||
| 4 | Avoid obsolete special default variables like default-major-mode. | ||
| 5 | |||
| 1 | 2009-12-09 David Robinow <drobinow@gmail.com> (tiny change) | 6 | 2009-12-09 David Robinow <drobinow@gmail.com> (tiny change) |
| 2 | 7 | ||
| 3 | * makefile.w32-in: Use parenthesis for macros for nmake | 8 | * makefile.w32-in: Use parenthesis for macros for nmake |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 4504a99f267..5efbb81ee1b 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -17346,10 +17346,10 @@ Auto Fill mode. | |||
| 17346 | @smallexample | 17346 | @smallexample |
| 17347 | @group | 17347 | @group |
| 17348 | ;;; Text mode and Auto Fill mode | 17348 | ;;; Text mode and Auto Fill mode |
| 17349 | ; The next two lines put Emacs into Text mode | 17349 | ;; The next two lines put Emacs into Text mode |
| 17350 | ; and Auto Fill mode, and are for writers who | 17350 | ;; and Auto Fill mode, and are for writers who |
| 17351 | ; want to start writing prose rather than code. | 17351 | ;; want to start writing prose rather than code. |
| 17352 | (setq default-major-mode 'text-mode) | 17352 | (setq-default major-mode 'text-mode) |
| 17353 | (add-hook 'text-mode-hook 'turn-on-auto-fill) | 17353 | (add-hook 'text-mode-hook 'turn-on-auto-fill) |
| 17354 | @end group | 17354 | @end group |
| 17355 | @end smallexample | 17355 | @end smallexample |
| @@ -18257,7 +18257,7 @@ xmodmap -e "keysym Alt_L = Meta_L Alt_L" | |||
| 18257 | @need 1700 | 18257 | @need 1700 |
| 18258 | @node Mode Line, , Miscellaneous, Emacs Initialization | 18258 | @node Mode Line, , Miscellaneous, Emacs Initialization |
| 18259 | @section A Modified Mode Line | 18259 | @section A Modified Mode Line |
| 18260 | @vindex default-mode-line-format | 18260 | @vindex mode-line-format |
| 18261 | @cindex Mode line format | 18261 | @cindex Mode line format |
| 18262 | 18262 | ||
| 18263 | Finally, a feature I really like: a modified mode line. | 18263 | Finally, a feature I really like: a modified mode line. |
| @@ -18282,7 +18282,7 @@ My @file{.emacs} file has a section that looks like this: | |||
| 18282 | @group | 18282 | @group |
| 18283 | ;; Set a Mode Line that tells me which machine, which directory, | 18283 | ;; Set a Mode Line that tells me which machine, which directory, |
| 18284 | ;; and which line I am on, plus the other customary information. | 18284 | ;; and which line I am on, plus the other customary information. |
| 18285 | (setq default-mode-line-format | 18285 | (setq-default mode-line-format |
| 18286 | (quote | 18286 | (quote |
| 18287 | (#("-" 0 1 | 18287 | (#("-" 0 1 |
| 18288 | (help-echo | 18288 | (help-echo |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 58c801f5cae..f155c9575fa 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * display.texi (Line Height): Avoid obsolete special default variables | ||
| 4 | like default-major-mode. | ||
| 5 | |||
| 1 | 2010-01-28 Alan Mackenzie <acm@muc.de> | 6 | 2010-01-28 Alan Mackenzie <acm@muc.de> |
| 2 | 7 | ||
| 3 | * display.texi (Auto Faces): Say fontification-functions is called | 8 | * display.texi (Auto Faces): Say fontification-functions is called |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 5f2e4f874a8..91a71c54a6d 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1768,7 +1768,6 @@ height consists of the contents' height plus the line spacing. | |||
| 1768 | There are several ways to specify the line spacing for different | 1768 | There are several ways to specify the line spacing for different |
| 1769 | parts of Emacs text. | 1769 | parts of Emacs text. |
| 1770 | 1770 | ||
| 1771 | @vindex default-line-spacing | ||
| 1772 | On graphical terminals, you can specify the line spacing for all | 1771 | On graphical terminals, you can specify the line spacing for all |
| 1773 | lines in a frame, using the @code{line-spacing} frame parameter | 1772 | lines in a frame, using the @code{line-spacing} frame parameter |
| 1774 | (@pxref{Layout Parameters}). However, if the default value of | 1773 | (@pxref{Layout Parameters}). However, if the default value of |
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 8b70d16f998..8b70d16f998 100755..100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi | |||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4d38251f37e..9013caf2026 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,149 @@ | |||
| 1 | 2010-02-05 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/ange-ftp.el (ange-ftp-insert-directory): | ||
| 4 | * net/tramp-imap.el (tramp-imap-handle-insert-directory): | ||
| 5 | * net/tramp-smb.el (tramp-smb-handle-insert-directory): | ||
| 6 | Handle also directories. (Bug#5478) | ||
| 7 | |||
| 8 | 2010-02-05 Glenn Morris <rgm@gnu.org> | ||
| 9 | |||
| 10 | * progmodes/f90.el (f90-font-lock-keywords-2): Fix `enum'. | ||
| 11 | |||
| 12 | 2010-02-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 13 | |||
| 14 | * startup.el (command-line-1): Convert options beginning with a | ||
| 15 | single dash as well (Bug#5519). | ||
| 16 | |||
| 17 | 2010-02-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 18 | |||
| 19 | Make `initials' completion work for /hh -> /home/horn again (bug#5524). | ||
| 20 | * minibuffer.el (completion-initials-expand): Only check the presence | ||
| 21 | of delims *within* the boundaries, since otherwise the / delim is | ||
| 22 | always found for files. | ||
| 23 | |||
| 24 | Fix up various corner case problems. | ||
| 25 | * doc-view.el (doc-view-last-page-number): New function. | ||
| 26 | (doc-view-mode, doc-view-last-page, doc-view-goto-page): Use it. | ||
| 27 | (doc-view-goto-page): Avoid inf-loops when the conversion fails. | ||
| 28 | (doc-view-kill-proc): Avoid inf-loop in freak cases. | ||
| 29 | (doc-view-reconvert-doc): Use the new recursive delete-directory. | ||
| 30 | (doc-view-convert-current-doc): Don't create the resolution.el file | ||
| 31 | here any more. | ||
| 32 | (doc-view-pdf/ps->png): Do it here instead. | ||
| 33 | (doc-view-already-converted-p): Check that resolution.el is present. | ||
| 34 | (doc-view-pdf->png): Don't rely on doc-view-pdf/ps->png for the few | ||
| 35 | windows that are not yet showing images. | ||
| 36 | |||
| 37 | 2010-02-04 Alan Mackenzie <acm@muc.de> | ||
| 38 | |||
| 39 | Change strategy for marking < and > as template delimiters: mark | ||
| 40 | them strictly in matching pairs. | ||
| 41 | |||
| 42 | * cc-mode.el (c-before-change): | ||
| 43 | Use c-get-state-before-change-functions. | ||
| 44 | (c-common-init): Adapt to use | ||
| 45 | c-get-state-before-change-functions (note plural). | ||
| 46 | |||
| 47 | * cc-langs.el (c-no-parens-syntax-table): New syntax table, used | ||
| 48 | for searching syntactically for matching <s and >s. | ||
| 49 | (c-get-state-before-change-functions): New language variable (note | ||
| 50 | the plural) which supersedes c-get-state-before-change-function. | ||
| 51 | |||
| 52 | * cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props) | ||
| 53 | (c-clear-<>-pair-props, c-clear-<-pair-props-if-match-after) | ||
| 54 | (c-clear->-pair-props-if-match-before) | ||
| 55 | (c-before-change-check-<>-operators): New functions. | ||
| 56 | (c-after-change-check-<>-operators): Use macro | ||
| 57 | c-unmark-<->-as-paren. | ||
| 58 | |||
| 59 | * cc-defs.el (c-search-backward-char-property): New macro. | ||
| 60 | |||
| 61 | * cc-cmds.el (c-electric-lt-gt): Do not set text properties on < | ||
| 62 | and > any more. (These will be handled by font locking.) | ||
| 63 | |||
| 64 | 2010-02-04 Michael Albinus <michael.albinus@gmx.de> | ||
| 65 | |||
| 66 | * dired.el (dired-revert): If DIRED-DIRECTORY is a cons cell, call | ||
| 67 | `dired-uncache' for every elemnt which is an absolute file name. | ||
| 68 | |||
| 69 | * net/tramp.el (tramp-handle-dired-uncache): When DIR is not a | ||
| 70 | directory, handle its directory component. | ||
| 71 | (tramp-handle-file-remote-p): Let-bind `tramp-verbose' to 3; this | ||
| 72 | function is called permanently and creates noise, otherwise. | ||
| 73 | |||
| 74 | * net/tramp-imap.el (tramp-imap-handle-insert-directory): | ||
| 75 | * net/tramp-smb.el (tramp-smb-handle-insert-directory): | ||
| 76 | Handle the case, FILENAME is not in `default-directory'. (Bug#5478) | ||
| 77 | |||
| 78 | 2010-02-04 David Burger <dburger@google.com> (tiny change) | ||
| 79 | |||
| 80 | * macros.el (apply-macro-to-region-lines): | ||
| 81 | Minor simplification. (Bug#5485) | ||
| 82 | |||
| 83 | 2010-02-04 Glenn Morris <rgm@gnu.org> | ||
| 84 | |||
| 85 | * mail/rmail.el (rmail-show-message-1): Handle malformed | ||
| 86 | quoted-printable text. (Bug#5441) | ||
| 87 | |||
| 88 | * mail/mail-utils.el (mail-unquote-printable-region): Doc fix. | ||
| 89 | |||
| 90 | * simple.el (visual-line-mode): Capitalize lighter. | ||
| 91 | |||
| 92 | 2010-02-03 John Wiegley <jwiegley@gmail.com> | ||
| 93 | |||
| 94 | * iswitchb.el (iswitchb-completions): Add bookmark files to the | ||
| 95 | list of files considered for "virtual buffer" completions. | ||
| 96 | |||
| 97 | 2010-02-03 Michael Albinus <michael.albinus@gmx.de> | ||
| 98 | |||
| 99 | * net/ange-ftp.el (ange-ftp-insert-directory): Parse directory | ||
| 100 | also in case of (and (not full) (not wildcard)). This is needed, | ||
| 101 | when dired is called with a list of files, which are not in | ||
| 102 | `default-directory'. (Bug#5478) | ||
| 103 | |||
| 104 | 2010-02-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 105 | |||
| 106 | * vc-hooks.el (vc-path): Make it an obsolete var, rather than function. | ||
| 107 | |||
| 108 | 2010-02-02 Juri Linkov <juri@jurta.org> | ||
| 109 | |||
| 110 | * textmodes/ispell.el (ispell-message-text-end): Remove final newline | ||
| 111 | from unidiff to allow function-line after @@. | ||
| 112 | |||
| 113 | 2010-02-02 Juri Linkov <juri@jurta.org> | ||
| 114 | |||
| 115 | * ediff-util.el (ediff-file-checked-in-p): Replace '(nil CVS) by | ||
| 116 | '(RCS SCCS) with inverted condition. | ||
| 117 | |||
| 118 | 2010-02-02 Michael Albinus <michael.albinus@gmx.de> | ||
| 119 | |||
| 120 | * net/ange-ftp.el (ange-ftp-skip-msgs): Ignore all ""^500 .*AUTH" | ||
| 121 | messages. | ||
| 122 | |||
| 123 | 2010-02-01 Juri Linkov <juri@jurta.org> | ||
| 124 | |||
| 125 | * arc-mode.el (archive-zip-extract): Use `member-ignore-case' to | ||
| 126 | compare with "pkunzip" and "pkzip" instead of only "pkzip". | ||
| 127 | In the `archive-extract-by-stdout' branch use `shell-quote-argument' | ||
| 128 | only when (car archive-zip-extract) is "unzip". (Bug#5475) | ||
| 129 | |||
| 130 | 2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 131 | |||
| 132 | * doc-view.el (doc-view-new-window-function): Be a bit more defensive. | ||
| 133 | (doc-view-revert-buffer): New command. | ||
| 134 | (doc-view-mode-map): Use it. | ||
| 135 | |||
| 136 | 2010-02-01 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 137 | |||
| 138 | * vc-bzr.el (vc-bzr-dir-extra-headers): Add a header when a | ||
| 139 | pending merge is detected. | ||
| 140 | |||
| 141 | 2010-01-31 Juri Linkov <juri@jurta.org> | ||
| 142 | |||
| 143 | * progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the | ||
| 144 | beginning of interactive spec like all other grep commands do. | ||
| 145 | Put "all" in front of "gz". (Bug#5260) | ||
| 146 | |||
| 1 | 2010-01-29 Dan Nicolaescu <dann@ics.uci.edu> | 147 | 2010-01-29 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 148 | ||
| 3 | * vc-bzr.el (vc-bzr-after-dir-status): Match another renaming indicator. | 149 | * vc-bzr.el (vc-bzr-after-dir-status): Match another renaming indicator. |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 4a0576fdded..ee32d893654 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -1782,12 +1782,16 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1782 | (apply 'vector (nreverse files)))) | 1782 | (apply 'vector (nreverse files)))) |
| 1783 | 1783 | ||
| 1784 | (defun archive-zip-extract (archive name) | 1784 | (defun archive-zip-extract (archive name) |
| 1785 | (if (equal (car archive-zip-extract) "pkzip") | 1785 | (if (member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip")) |
| 1786 | (archive-*-extract archive name archive-zip-extract) | 1786 | (archive-*-extract archive name archive-zip-extract) |
| 1787 | ;; unzip expands wildcards in NAME, so we need to quote it. | 1787 | (archive-extract-by-stdout |
| 1788 | ;; FIXME: Does pkzip need similar treatment? | 1788 | archive |
| 1789 | (archive-extract-by-stdout archive (shell-quote-argument name) | 1789 | ;; unzip expands wildcards in NAME, so we need to quote it. |
| 1790 | archive-zip-extract))) | 1790 | ;; FIXME: Does pkunzip need similar treatment? |
| 1791 | (if (equal (car archive-zip-extract) "unzip") | ||
| 1792 | (shell-quote-argument name) | ||
| 1793 | name) | ||
| 1794 | archive-zip-extract))) | ||
| 1791 | 1795 | ||
| 1792 | (defun archive-zip-write-file-member (archive descr) | 1796 | (defun archive-zip-write-file-member (archive descr) |
| 1793 | (archive-*-write-file-member | 1797 | (archive-*-write-file-member |
diff --git a/lisp/dired.el b/lisp/dired.el index 1fc90c308b1..c3d1435401e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1144,8 +1144,12 @@ Preserves old cursor, marks/flags, hidden-p." | |||
| 1144 | (setq mark-alist;; only after dired-remember-hidden since this unhides: | 1144 | (setq mark-alist;; only after dired-remember-hidden since this unhides: |
| 1145 | (dired-remember-marks (point-min) (point-max))) | 1145 | (dired-remember-marks (point-min) (point-max))) |
| 1146 | ;; treat top level dir extra (it may contain wildcards) | 1146 | ;; treat top level dir extra (it may contain wildcards) |
| 1147 | (dired-uncache | 1147 | (if (not (consp dired-directory)) |
| 1148 | (if (consp dired-directory) (car dired-directory) dired-directory)) | 1148 | (dired-uncache dired-directory) |
| 1149 | (dired-uncache (car dired-directory)) | ||
| 1150 | (dolist (dir (cdr dired-directory)) | ||
| 1151 | (if (file-name-absolute-p dir) | ||
| 1152 | (dired-uncache dir)))) | ||
| 1149 | ;; Run dired-after-readin-hook just once, below. | 1153 | ;; Run dired-after-readin-hook just once, below. |
| 1150 | (let ((dired-after-readin-hook nil)) | 1154 | (let ((dired-after-readin-hook nil)) |
| 1151 | (dired-readin) | 1155 | (dired-readin) |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 6ebec982c0c..5b84fc3e0d1 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -235,8 +235,15 @@ of the page moves to the previous page." | |||
| 235 | 235 | ||
| 236 | (defun doc-view-new-window-function (winprops) | 236 | (defun doc-view-new-window-function (winprops) |
| 237 | (let ((ol (image-mode-window-get 'overlay winprops))) | 237 | (let ((ol (image-mode-window-get 'overlay winprops))) |
| 238 | (when (and ol (not (overlay-buffer ol))) | ||
| 239 | ;; I've seen `ol' be a dead overlay. I do not yet know how this | ||
| 240 | ;; happened, so maybe the bug is elsewhere, but in the mean time, | ||
| 241 | ;; this seems like a safe approach. | ||
| 242 | (setq ol nil)) | ||
| 238 | (if ol | 243 | (if ol |
| 239 | (setq ol (copy-overlay ol)) | 244 | (progn |
| 245 | (assert (eq (overlay-buffer ol) (current-buffer))) | ||
| 246 | (setq ol (copy-overlay ol))) | ||
| 240 | (assert (not (get-char-property (point-min) 'display))) | 247 | (assert (not (get-char-property (point-min) 'display))) |
| 241 | (setq ol (make-overlay (point-min) (point-max) nil t)) | 248 | (setq ol (make-overlay (point-min) (point-max) nil t)) |
| 242 | (overlay-put ol 'doc-view t)) | 249 | (overlay-put ol 'doc-view t)) |
| @@ -323,12 +330,21 @@ Can be `dvi', `pdf', or `ps'.") | |||
| 323 | (define-key map (kbd "C-c C-c") 'doc-view-toggle-display) | 330 | (define-key map (kbd "C-c C-c") 'doc-view-toggle-display) |
| 324 | ;; Open a new buffer with doc's text contents | 331 | ;; Open a new buffer with doc's text contents |
| 325 | (define-key map (kbd "C-c C-t") 'doc-view-open-text) | 332 | (define-key map (kbd "C-c C-t") 'doc-view-open-text) |
| 326 | ;; Reconvert the current document | 333 | ;; Reconvert the current document. Don't just use revert-buffer |
| 327 | (define-key map (kbd "g") 'revert-buffer) | 334 | ;; because that resets the scale factor, the page number, ... |
| 328 | (define-key map (kbd "r") 'revert-buffer) | 335 | (define-key map (kbd "g") 'doc-view-revert-buffer) |
| 336 | (define-key map (kbd "r") 'doc-view-revert-buffer) | ||
| 329 | map) | 337 | map) |
| 330 | "Keymap used by `doc-view-mode' when displaying a doc as a set of images.") | 338 | "Keymap used by `doc-view-mode' when displaying a doc as a set of images.") |
| 331 | 339 | ||
| 340 | (defun doc-view-revert-buffer (&optional ignore-auto noconfirm) | ||
| 341 | "Like `revert-buffer', but preserves the buffer's current modes." | ||
| 342 | ;; FIXME: this should probably be moved to files.el and used for | ||
| 343 | ;; most/all "g" bindings to revert-buffer. | ||
| 344 | (interactive (list (not current-prefix-arg))) | ||
| 345 | (revert-buffer ignore-auto noconfirm 'preserve-modes)) | ||
| 346 | |||
| 347 | |||
| 332 | (easy-menu-define doc-view-menu doc-view-mode-map | 348 | (easy-menu-define doc-view-menu doc-view-mode-map |
| 333 | "Menu for Doc View mode." | 349 | "Menu for Doc View mode." |
| 334 | '("DocView" | 350 | '("DocView" |
| @@ -367,10 +383,13 @@ Can be `dvi', `pdf', or `ps'.") | |||
| 367 | (defmacro doc-view-current-image () `(image-mode-window-get 'image)) | 383 | (defmacro doc-view-current-image () `(image-mode-window-get 'image)) |
| 368 | (defmacro doc-view-current-slice () `(image-mode-window-get 'slice)) | 384 | (defmacro doc-view-current-slice () `(image-mode-window-get 'slice)) |
| 369 | 385 | ||
| 386 | (defun doc-view-last-page-number () | ||
| 387 | (length doc-view-current-files)) | ||
| 388 | |||
| 370 | (defun doc-view-goto-page (page) | 389 | (defun doc-view-goto-page (page) |
| 371 | "View the page given by PAGE." | 390 | "View the page given by PAGE." |
| 372 | (interactive "nPage: ") | 391 | (interactive "nPage: ") |
| 373 | (let ((len (length doc-view-current-files)) | 392 | (let ((len (doc-view-last-page-number)) |
| 374 | (hscroll (window-hscroll))) | 393 | (hscroll (window-hscroll))) |
| 375 | (if (< page 1) | 394 | (if (< page 1) |
| 376 | (setq page 1) | 395 | (setq page 1) |
| @@ -410,12 +429,15 @@ Can be `dvi', `pdf', or `ps'.") | |||
| 410 | ;; The PNG file hasn't been generated yet. | 429 | ;; The PNG file hasn't been generated yet. |
| 411 | (doc-view-pdf->png-1 doc-view-buffer-file-name file page | 430 | (doc-view-pdf->png-1 doc-view-buffer-file-name file page |
| 412 | (lexical-let ((page page) | 431 | (lexical-let ((page page) |
| 413 | (win (selected-window))) | 432 | (win (selected-window)) |
| 433 | (file file)) | ||
| 414 | (lambda () | 434 | (lambda () |
| 415 | (and (eq (current-buffer) (window-buffer win)) | 435 | (and (eq (current-buffer) (window-buffer win)) |
| 416 | ;; If we changed page in the mean | 436 | ;; If we changed page in the mean |
| 417 | ;; time, don't mess things up. | 437 | ;; time, don't mess things up. |
| 418 | (eq (doc-view-current-page win) page) | 438 | (eq (doc-view-current-page win) page) |
| 439 | ;; Make sure we don't infloop. | ||
| 440 | (file-readable-p file) | ||
| 419 | (with-selected-window win | 441 | (with-selected-window win |
| 420 | (doc-view-goto-page page)))))))) | 442 | (doc-view-goto-page page)))))))) |
| 421 | (overlay-put (doc-view-current-overlay) | 443 | (overlay-put (doc-view-current-overlay) |
| @@ -439,7 +461,7 @@ Can be `dvi', `pdf', or `ps'.") | |||
| 439 | (defun doc-view-last-page () | 461 | (defun doc-view-last-page () |
| 440 | "View the last page." | 462 | "View the last page." |
| 441 | (interactive) | 463 | (interactive) |
| 442 | (doc-view-goto-page (length doc-view-current-files))) | 464 | (doc-view-goto-page (doc-view-last-page-number))) |
| 443 | 465 | ||
| 444 | (defun doc-view-scroll-up-or-next-page (&optional arg) | 466 | (defun doc-view-scroll-up-or-next-page (&optional arg) |
| 445 | "Scroll page up ARG lines if possible, else goto next page. | 467 | "Scroll page up ARG lines if possible, else goto next page. |
| @@ -512,7 +534,7 @@ at the top edge of the page moves to the previous page." | |||
| 512 | (defun doc-view-kill-proc () | 534 | (defun doc-view-kill-proc () |
| 513 | "Kill the current converter process(es)." | 535 | "Kill the current converter process(es)." |
| 514 | (interactive) | 536 | (interactive) |
| 515 | (while doc-view-current-converter-processes | 537 | (while (consp doc-view-current-converter-processes) |
| 516 | (ignore-errors ;; Maybe it's dead already? | 538 | (ignore-errors ;; Maybe it's dead already? |
| 517 | (kill-process (pop doc-view-current-converter-processes)))) | 539 | (kill-process (pop doc-view-current-converter-processes)))) |
| 518 | (when doc-view-current-timer | 540 | (when doc-view-current-timer |
| @@ -622,7 +644,7 @@ Should be invoked when the cached images aren't up-to-date." | |||
| 622 | (doc-view-kill-proc) | 644 | (doc-view-kill-proc) |
| 623 | ;; Clear the old cached files | 645 | ;; Clear the old cached files |
| 624 | (when (file-exists-p (doc-view-current-cache-dir)) | 646 | (when (file-exists-p (doc-view-current-cache-dir)) |
| 625 | (dired-delete-file (doc-view-current-cache-dir) 'always)) | 647 | (delete-directory (doc-view-current-cache-dir) 'recursive)) |
| 626 | (doc-view-initiate-display)) | 648 | (doc-view-initiate-display)) |
| 627 | 649 | ||
| 628 | (defun doc-view-sentinel (proc event) | 650 | (defun doc-view-sentinel (proc event) |
| @@ -678,11 +700,18 @@ Should be invoked when the cached images aren't up-to-date." | |||
| 678 | (list (format "-r%d" (round doc-view-resolution)) | 700 | (list (format "-r%d" (round doc-view-resolution)) |
| 679 | (concat "-sOutputFile=" png) | 701 | (concat "-sOutputFile=" png) |
| 680 | pdf-ps)) | 702 | pdf-ps)) |
| 681 | (lambda () | 703 | (lexical-let ((resolution doc-view-resolution)) |
| 682 | (when doc-view-current-timer | 704 | (lambda () |
| 683 | (cancel-timer doc-view-current-timer) | 705 | ;; Only create the resolution file when it's all done, so it also |
| 684 | (setq doc-view-current-timer nil)) | 706 | ;; serves as a witness that the conversion is complete. |
| 685 | (doc-view-display (current-buffer) 'force))) | 707 | (write-region (prin1-to-string resolution) nil |
| 708 | (expand-file-name "resolution.el" | ||
| 709 | (doc-view-current-cache-dir)) | ||
| 710 | nil 'silently) | ||
| 711 | (when doc-view-current-timer | ||
| 712 | (cancel-timer doc-view-current-timer) | ||
| 713 | (setq doc-view-current-timer nil)) | ||
| 714 | (doc-view-display (current-buffer) 'force)))) | ||
| 686 | ;; Update the displayed pages as soon as they're done generating. | 715 | ;; Update the displayed pages as soon as they're done generating. |
| 687 | (when doc-view-conversion-refresh-interval | 716 | (when doc-view-conversion-refresh-interval |
| 688 | (setq doc-view-current-timer | 717 | (setq doc-view-current-timer |
| @@ -724,6 +753,13 @@ Start by converting PAGES, and then the rest." | |||
| 724 | (doc-view-pdf->png pdf png rest) | 753 | (doc-view-pdf->png pdf png rest) |
| 725 | ;; Yippie, the important pages are done, update the display. | 754 | ;; Yippie, the important pages are done, update the display. |
| 726 | (clear-image-cache) | 755 | (clear-image-cache) |
| 756 | ;; For the windows that have a message (like "Welcome to | ||
| 757 | ;; DocView") display property, clearing the image cache is | ||
| 758 | ;; not sufficient. | ||
| 759 | (dolist (win (get-buffer-window-list (current-buffer) nil 'visible)) | ||
| 760 | (with-selected-window win | ||
| 761 | (when (stringp (get-char-property (point-min) 'display)) | ||
| 762 | (doc-view-goto-page (doc-view-current-page))))) | ||
| 727 | ;; Convert the rest of the pages. | 763 | ;; Convert the rest of the pages. |
| 728 | (doc-view-pdf/ps->png pdf png))))))) | 764 | (doc-view-pdf/ps->png pdf png))))))) |
| 729 | 765 | ||
| @@ -790,18 +826,8 @@ Those files are saved in the directory given by the function | |||
| 790 | ;; resets during the redisplay). | 826 | ;; resets during the redisplay). |
| 791 | (setq doc-view-pending-cache-flush t) | 827 | (setq doc-view-pending-cache-flush t) |
| 792 | (let ((png-file (expand-file-name "page-%d.png" | 828 | (let ((png-file (expand-file-name "page-%d.png" |
| 793 | (doc-view-current-cache-dir))) | ||
| 794 | (res-file (expand-file-name "resolution.el" | ||
| 795 | (doc-view-current-cache-dir)))) | 829 | (doc-view-current-cache-dir)))) |
| 796 | (make-directory (doc-view-current-cache-dir) t) | 830 | (make-directory (doc-view-current-cache-dir) t) |
| 797 | ;; Save the used resolution so that it can be restored when | ||
| 798 | ;; reading the cached files. | ||
| 799 | (let ((res doc-view-resolution)) | ||
| 800 | (with-temp-buffer | ||
| 801 | (princ res (current-buffer)) | ||
| 802 | ;; Don't use write-file, so as to avoid prompts for `require-newline', | ||
| 803 | ;; or for pre-existing buffers with the same name, ... | ||
| 804 | (write-region nil nil res-file nil 'silently))) | ||
| 805 | (case doc-view-doc-type | 831 | (case doc-view-doc-type |
| 806 | (dvi | 832 | (dvi |
| 807 | ;; DVI files have to be converted to PDF before Ghostscript can process | 833 | ;; DVI files have to be converted to PDF before Ghostscript can process |
| @@ -811,10 +837,10 @@ Those files are saved in the directory given by the function | |||
| 811 | (png-file png-file)) | 837 | (png-file png-file)) |
| 812 | (doc-view-dvi->pdf doc-view-buffer-file-name pdf | 838 | (doc-view-dvi->pdf doc-view-buffer-file-name pdf |
| 813 | (lambda () (doc-view-pdf/ps->png pdf png-file))))) | 839 | (lambda () (doc-view-pdf/ps->png pdf png-file))))) |
| 814 | 840 | ||
| 815 | (let ((pages (doc-view-active-pages))) | 841 | (let ((pages (doc-view-active-pages))) |
| 816 | ;; Convert PDF to PNG images starting with the active pages. | 842 | ;; Convert PDF to PNG images starting with the active pages. |
| 817 | (doc-view-pdf->png doc-view-buffer-file-name png-file pages))) | 843 | (doc-view-pdf->png doc-view-buffer-file-name png-file pages))) |
| 818 | (t | 844 | (t |
| 819 | ;; Convert to PNG images. | 845 | ;; Convert to PNG images. |
| 820 | (doc-view-pdf/ps->png doc-view-buffer-file-name png-file))))) | 846 | (doc-view-pdf/ps->png doc-view-buffer-file-name png-file))))) |
| @@ -1113,7 +1139,13 @@ If BACKWARD is non-nil, jump to the previous match." | |||
| 1113 | (defun doc-view-already-converted-p () | 1139 | (defun doc-view-already-converted-p () |
| 1114 | "Return non-nil if the current doc was already converted." | 1140 | "Return non-nil if the current doc was already converted." |
| 1115 | (and (file-exists-p (doc-view-current-cache-dir)) | 1141 | (and (file-exists-p (doc-view-current-cache-dir)) |
| 1116 | (> (length (directory-files (doc-view-current-cache-dir) nil "\\.png$")) 0))) | 1142 | ;; Check that the resolution info is there, otherwise it means |
| 1143 | ;; the conversion is incomplete. | ||
| 1144 | (file-readable-p (expand-file-name "resolution.el" | ||
| 1145 | (doc-view-current-cache-dir))) | ||
| 1146 | (> (length (directory-files (doc-view-current-cache-dir) | ||
| 1147 | nil "\\.png\\'")) | ||
| 1148 | 0))) | ||
| 1117 | 1149 | ||
| 1118 | (defun doc-view-initiate-display () | 1150 | (defun doc-view-initiate-display () |
| 1119 | ;; Switch to image display if possible | 1151 | ;; Switch to image display if possible |
| @@ -1125,14 +1157,14 @@ If BACKWARD is non-nil, jump to the previous match." | |||
| 1125 | (progn | 1157 | (progn |
| 1126 | (message "DocView: using cached files!") | 1158 | (message "DocView: using cached files!") |
| 1127 | ;; Load the saved resolution | 1159 | ;; Load the saved resolution |
| 1128 | (let ((res-file (expand-file-name "resolution.el" | 1160 | (let* ((res-file (expand-file-name "resolution.el" |
| 1129 | (doc-view-current-cache-dir))) | 1161 | (doc-view-current-cache-dir))) |
| 1130 | (res doc-view-resolution)) | 1162 | (res |
| 1131 | (with-temp-buffer | 1163 | (with-temp-buffer |
| 1132 | (when (file-exists-p res-file) | 1164 | (when (file-readable-p res-file) |
| 1133 | (insert-file-contents res-file) | 1165 | (insert-file-contents res-file) |
| 1134 | (setq res (read (current-buffer))))) | 1166 | (read (current-buffer)))))) |
| 1135 | (when (numberp res) | 1167 | (when (numberp res) |
| 1136 | (set (make-local-variable 'doc-view-resolution) res))) | 1168 | (set (make-local-variable 'doc-view-resolution) res))) |
| 1137 | (doc-view-display (current-buffer) 'force)) | 1169 | (doc-view-display (current-buffer) 'force)) |
| 1138 | (doc-view-convert-current-doc)) | 1170 | (doc-view-convert-current-doc)) |
| @@ -1266,7 +1298,7 @@ toggle between displaying the document or editing it as text. | |||
| 1266 | 1298 | ||
| 1267 | (set (make-local-variable 'mode-line-position) | 1299 | (set (make-local-variable 'mode-line-position) |
| 1268 | '(" P" (:eval (number-to-string (doc-view-current-page))) | 1300 | '(" P" (:eval (number-to-string (doc-view-current-page))) |
| 1269 | "/" (:eval (number-to-string (length doc-view-current-files))))) | 1301 | "/" (:eval (number-to-string (doc-view-last-page-number))))) |
| 1270 | ;; Don't scroll unless the user specifically asked for it. | 1302 | ;; Don't scroll unless the user specifically asked for it. |
| 1271 | (set (make-local-variable 'auto-hscroll-mode) nil) | 1303 | (set (make-local-variable 'auto-hscroll-mode) nil) |
| 1272 | (set (make-local-variable 'mwheel-scroll-up-function) | 1304 | (set (make-local-variable 'mwheel-scroll-up-function) |
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 03f5c9fe2a3..77284a19f50 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el | |||
| @@ -1126,8 +1126,8 @@ of the current buffer." | |||
| 1126 | 1126 | ||
| 1127 | (defun ediff-file-checked-in-p (file) | 1127 | (defun ediff-file-checked-in-p (file) |
| 1128 | (and (featurep 'vc-hooks) | 1128 | (and (featurep 'vc-hooks) |
| 1129 | ;; CVS files are considered not checked in | 1129 | ;; Only RCS and SCCS files are considered checked in |
| 1130 | (not (memq (vc-backend file) '(nil CVS))) | 1130 | (memq (vc-backend file) '(RCS SCCS)) |
| 1131 | (if (fboundp 'vc-state) | 1131 | (if (fboundp 'vc-state) |
| 1132 | (and | 1132 | (and |
| 1133 | (not (memq (vc-state file) '(edited needs-merge))) | 1133 | (not (memq (vc-state file) '(edited needs-merge))) |
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index ea4b00dc90d..ee06db6f78f 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el | |||
| @@ -1274,7 +1274,7 @@ Modified from `icomplete-completions'." | |||
| 1274 | ;; consult the list of past visited files, to see if we can find | 1274 | ;; consult the list of past visited files, to see if we can find |
| 1275 | ;; the file which the user might thought was still open. | 1275 | ;; the file which the user might thought was still open. |
| 1276 | (when (and iswitchb-use-virtual-buffers (null comps) | 1276 | (when (and iswitchb-use-virtual-buffers (null comps) |
| 1277 | recentf-list) | 1277 | (or recentf-list bookmark-alist)) |
| 1278 | (setq iswitchb-virtual-buffers nil) | 1278 | (setq iswitchb-virtual-buffers nil) |
| 1279 | (let ((head recentf-list) name) | 1279 | (let ((head recentf-list) name) |
| 1280 | (while head | 1280 | (while head |
| @@ -1289,15 +1289,30 @@ Modified from `icomplete-completions'." | |||
| 1289 | (setq iswitchb-virtual-buffers | 1289 | (setq iswitchb-virtual-buffers |
| 1290 | (cons (cons name (car head)) | 1290 | (cons (cons name (car head)) |
| 1291 | iswitchb-virtual-buffers))) | 1291 | iswitchb-virtual-buffers))) |
| 1292 | (setq head (cdr head))) | 1292 | (setq head (cdr head)))) |
| 1293 | (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) | 1293 | (let ((head bookmark-alist) name path) |
| 1294 | comps (mapcar 'car iswitchb-virtual-buffers)) | 1294 | (while head |
| 1295 | (if (and (setq path (cdr (assq 'filename (cdar head)))) | ||
| 1296 | (setq name (file-name-nondirectory path)) | ||
| 1297 | (string-match (if iswitchb-regexp | ||
| 1298 | iswitchb-text | ||
| 1299 | (regexp-quote iswitchb-text)) name) | ||
| 1300 | (null (get-file-buffer path)) | ||
| 1301 | (not (assoc name iswitchb-virtual-buffers)) | ||
| 1302 | (not (iswitchb-ignore-buffername-p name)) | ||
| 1303 | (file-exists-p path)) | ||
| 1304 | (setq iswitchb-virtual-buffers | ||
| 1305 | (cons (cons name path) | ||
| 1306 | iswitchb-virtual-buffers))) | ||
| 1307 | (setq head (cdr head)))) | ||
| 1308 | (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) | ||
| 1309 | comps (mapcar 'car iswitchb-virtual-buffers)) | ||
| 1295 | (let ((comp comps)) | 1310 | (let ((comp comps)) |
| 1296 | (while comp | 1311 | (while comp |
| 1297 | (put-text-property 0 (length (car comp)) | 1312 | (put-text-property 0 (length (car comp)) |
| 1298 | 'face 'iswitchb-virtual-matches | 1313 | 'face 'iswitchb-virtual-matches |
| 1299 | (car comp)) | 1314 | (car comp)) |
| 1300 | (setq comp (cdr comp)))))) | 1315 | (setq comp (cdr comp))))) |
| 1301 | 1316 | ||
| 1302 | (cond ((null comps) (format " %sNo match%s" | 1317 | (cond ((null comps) (format " %sNo match%s" |
| 1303 | open-bracket-determined | 1318 | open-bracket-determined |
diff --git a/lisp/macros.el b/lisp/macros.el index ef167bd6906..4188a432fe5 100644 --- a/lisp/macros.el +++ b/lisp/macros.el | |||
| @@ -273,7 +273,7 @@ and then select the region of un-tablified names and use | |||
| 273 | (set-marker next-line-marker (point))) | 273 | (set-marker next-line-marker (point))) |
| 274 | (save-excursion | 274 | (save-excursion |
| 275 | (let ((mark-active nil)) | 275 | (let ((mark-active nil)) |
| 276 | (execute-kbd-macro (or macro last-kbd-macro))))) | 276 | (execute-kbd-macro macro)))) |
| 277 | (set-marker end-marker nil) | 277 | (set-marker end-marker nil) |
| 278 | (set-marker next-line-marker nil)))) | 278 | (set-marker next-line-marker nil)))) |
| 279 | 279 | ||
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 5fad3554ae5..1c527f22113 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el | |||
| @@ -123,13 +123,16 @@ we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=." | |||
| 123 | (setq i (match-end 0))) | 123 | (setq i (match-end 0))) |
| 124 | (apply 'concat (nreverse (cons (substring string i) strings)))))) | 124 | (apply 'concat (nreverse (cons (substring string i) strings)))))) |
| 125 | 125 | ||
| 126 | ;; FIXME Gnus for some reason has `quoted-printable-decode-region' in qp.el. | ||
| 126 | ;;;###autoload | 127 | ;;;###autoload |
| 127 | (defun mail-unquote-printable-region (beg end &optional wrapper noerror | 128 | (defun mail-unquote-printable-region (beg end &optional wrapper noerror |
| 128 | unibyte) | 129 | unibyte) |
| 129 | "Undo the \"quoted printable\" encoding in buffer from BEG to END. | 130 | "Undo the \"quoted printable\" encoding in buffer from BEG to END. |
| 130 | If the optional argument WRAPPER is non-nil, | 131 | If the optional argument WRAPPER is non-nil, |
| 131 | we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. | 132 | we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. |
| 132 | If NOERROR is non-nil, return t if successful. | 133 | On encountering malformed quoted-printable text, exits with an error, |
| 134 | unless NOERROR is non-nil, in which case it continues, and returns nil | ||
| 135 | when finished. Returns non-nil on successful completion. | ||
| 133 | If UNIBYTE is non-nil, insert converted characters as unibyte. | 136 | If UNIBYTE is non-nil, insert converted characters as unibyte. |
| 134 | That is useful if you are going to character code decoding afterward, | 137 | That is useful if you are going to character code decoding afterward, |
| 135 | as Rmail does." | 138 | as Rmail does." |
| @@ -246,6 +249,10 @@ Return a modified address list." | |||
| 246 | "Prune addresses from DESTINATIONS, a list of recipient addresses. | 249 | "Prune addresses from DESTINATIONS, a list of recipient addresses. |
| 247 | All addresses matching `rmail-dont-reply-to-names' are removed from | 250 | All addresses matching `rmail-dont-reply-to-names' are removed from |
| 248 | the comma-separated list. The pruned list is returned." | 251 | the comma-separated list. The pruned list is returned." |
| 252 | ;; FIXME this (setting a user option the first time a command is used) | ||
| 253 | ;; is somewhat strange. Normally one would never set the option, | ||
| 254 | ;; but instead fall back to the default so long as it was nil. | ||
| 255 | ;; Or just set the default directly in the defcustom. | ||
| 249 | (if (null rmail-dont-reply-to-names) | 256 | (if (null rmail-dont-reply-to-names) |
| 250 | (setq rmail-dont-reply-to-names | 257 | (setq rmail-dont-reply-to-names |
| 251 | (concat (if rmail-default-dont-reply-to-names | 258 | (concat (if rmail-default-dont-reply-to-names |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 1dbfceb315b..a737b99c29e 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -2727,8 +2727,10 @@ The current mail message becomes the message displayed." | |||
| 2727 | (insert-buffer-substring mbox-buf body-start end) | 2727 | (insert-buffer-substring mbox-buf body-start end) |
| 2728 | (cond | 2728 | (cond |
| 2729 | ((string= character-coding "quoted-printable") | 2729 | ((string= character-coding "quoted-printable") |
| 2730 | (mail-unquote-printable-region (point-min) (point-max) | 2730 | ;; See bug#5441. |
| 2731 | nil nil 'unibyte)) | 2731 | (or (mail-unquote-printable-region (point-min) (point-max) |
| 2732 | nil t 'unibyte) | ||
| 2733 | (message "Malformed MIME quoted-printable message"))) | ||
| 2732 | ((and (string= character-coding "base64") is-text-message) | 2734 | ((and (string= character-coding "base64") is-text-message) |
| 2733 | (base64-decode-region (point-min) (point-max))) | 2735 | (base64-decode-region (point-min) (point-max))) |
| 2734 | ((eq character-coding 'uuencode) | 2736 | ((eq character-coding 'uuencode) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index df2ff51a31a..d905b9df870 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -2063,9 +2063,12 @@ filter out additional entries (because TABLE migth not obey PRED)." | |||
| 2063 | ;; Complete /ums to /usr/monnier/src or lch to list-command-history. | 2063 | ;; Complete /ums to /usr/monnier/src or lch to list-command-history. |
| 2064 | 2064 | ||
| 2065 | (defun completion-initials-expand (str table pred) | 2065 | (defun completion-initials-expand (str table pred) |
| 2066 | (unless (or (zerop (length str)) | 2066 | (let ((bounds (completion-boundaries str table pred ""))) |
| 2067 | (string-match completion-pcm--delim-wild-regex str)) | 2067 | (unless (or (zerop (length str)) |
| 2068 | (let ((bounds (completion-boundaries str table pred ""))) | 2068 | ;; Only check within the boundaries, since the |
| 2069 | ;; boundary char (e.g. /) might be in delim-regexp. | ||
| 2070 | (string-match completion-pcm--delim-wild-regex str | ||
| 2071 | (car bounds))) | ||
| 2069 | (if (zerop (car bounds)) | 2072 | (if (zerop (car bounds)) |
| 2070 | (mapconcat 'string str "-") | 2073 | (mapconcat 'string str "-") |
| 2071 | ;; If there's a boundary, it's trickier. The main use-case | 2074 | ;; If there's a boundary, it's trickier. The main use-case |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 98a3f557595..97a334a50ff 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -720,7 +720,7 @@ parenthesized expressions in REGEXP for the components (in that order)." | |||
| 720 | "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|" | 720 | "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|" |
| 721 | "^Data connection \\|" | 721 | "^Data connection \\|" |
| 722 | "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|" | 722 | "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|" |
| 723 | "^500 .*AUTH \\(KERBEROS\\|GSSAPI\\)\\|^KERBEROS\\|" | 723 | "^500 .*AUTH\\|^KERBEROS\\|" |
| 724 | "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd | 724 | "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd |
| 725 | "^534 Kerberos Authentication not enabled\\|" | 725 | "^534 Kerberos Authentication not enabled\\|" |
| 726 | "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT") | 726 | "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT") |
| @@ -4533,9 +4533,10 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4533 | (when (string-match "-?d\\'" switches) | 4533 | (when (string-match "-?d\\'" switches) |
| 4534 | ;; Remove "d" which dired added to `switches'. | 4534 | ;; Remove "d" which dired added to `switches'. |
| 4535 | (setq switches (substring switches 0 (match-beginning 0)))) | 4535 | (setq switches (substring switches 0 (match-beginning 0)))) |
| 4536 | (setq file (directory-file-name file)) | ||
| 4536 | (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") | 4537 | (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") |
| 4537 | switches nil)) | 4538 | switches 'parse)) |
| 4538 | (filename (file-name-nondirectory (directory-file-name file))) | 4539 | (filename (file-name-nondirectory file)) |
| 4539 | (case-fold-search nil)) | 4540 | (case-fold-search nil)) |
| 4540 | ;; FIXME: This presumes a particular output format, which is | 4541 | ;; FIXME: This presumes a particular output format, which is |
| 4541 | ;; basically Unix. | 4542 | ;; basically Unix. |
diff --git a/lisp/net/tramp-imap.el b/lisp/net/tramp-imap.el index 6f20d527713..d36569b5c23 100644 --- a/lisp/net/tramp-imap.el +++ b/lisp/net/tramp-imap.el | |||
| @@ -395,9 +395,10 @@ SIZE MODE WEIRD INODE DEVICE)." | |||
| 395 | (filename switches &optional wildcard full-directory-p) | 395 | (filename switches &optional wildcard full-directory-p) |
| 396 | "Like `insert-directory' for Tramp files." | 396 | "Like `insert-directory' for Tramp files." |
| 397 | (setq filename (expand-file-name filename)) | 397 | (setq filename (expand-file-name filename)) |
| 398 | (when full-directory-p | 398 | (if full-directory-p |
| 399 | ;; Called from `dired-add-entry'. | 399 | ;; Called from `dired-add-entry'. |
| 400 | (setq filename (file-name-as-directory filename))) | 400 | (setq filename (file-name-as-directory filename)) |
| 401 | (setq filename (directory-file-name filename))) | ||
| 401 | (with-parsed-tramp-file-name filename nil | 402 | (with-parsed-tramp-file-name filename nil |
| 402 | (save-match-data | 403 | (save-match-data |
| 403 | (let ((base (file-name-nondirectory localname)) | 404 | (let ((base (file-name-nondirectory localname)) |
| @@ -472,14 +473,19 @@ SIZE MODE WEIRD INODE DEVICE)." | |||
| 472 | (nth 6 x)))) ; date | 473 | (nth 6 x)))) ; date |
| 473 | ;; For the file name, we set the `dired-filename' | 474 | ;; For the file name, we set the `dired-filename' |
| 474 | ;; property. This allows to handle file names with | 475 | ;; property. This allows to handle file names with |
| 475 | ;; leading or trailing spaces as well. | 476 | ;; leading or trailing spaces as well. The inserted name |
| 477 | ;; could be from somewhere else, so we use the relative | ||
| 478 | ;; file name of `default-directory'. | ||
| 476 | (let ((pos (point))) | 479 | (let ((pos (point))) |
| 477 | (insert (format "%s" (nth 0 x))) ; file name | 480 | (insert |
| 478 | (put-text-property pos (point) 'dired-filename t)) | 481 | (format |
| 479 | (insert "\n") | 482 | "%s\n" |
| 483 | (file-relative-name | ||
| 484 | (expand-file-name (nth 0 x) (file-name-directory filename))))) | ||
| 485 | (put-text-property pos (1- (point)) 'dired-filename t)) | ||
| 480 | (forward-line) | 486 | (forward-line) |
| 481 | (beginning-of-line))) | 487 | (beginning-of-line))) |
| 482 | entries))))) | 488 | entries))))) |
| 483 | 489 | ||
| 484 | (defun tramp-imap-handle-insert-file-contents | 490 | (defun tramp-imap-handle-insert-file-contents |
| 485 | (filename &optional visit beg end replace) | 491 | (filename &optional visit beg end replace) |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index e9051f0a435..0803a186042 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -651,9 +651,10 @@ PRESERVE-UID-GID is completely ignored." | |||
| 651 | (filename switches &optional wildcard full-directory-p) | 651 | (filename switches &optional wildcard full-directory-p) |
| 652 | "Like `insert-directory' for Tramp files." | 652 | "Like `insert-directory' for Tramp files." |
| 653 | (setq filename (expand-file-name filename)) | 653 | (setq filename (expand-file-name filename)) |
| 654 | (when full-directory-p | 654 | (if full-directory-p |
| 655 | ;; Called from `dired-add-entry'. | 655 | ;; Called from `dired-add-entry'. |
| 656 | (setq filename (file-name-as-directory filename))) | 656 | (setq filename (file-name-as-directory filename)) |
| 657 | (setq filename (directory-file-name filename))) | ||
| 657 | (with-parsed-tramp-file-name filename nil | 658 | (with-parsed-tramp-file-name filename nil |
| 658 | (save-match-data | 659 | (save-match-data |
| 659 | (let ((base (file-name-nondirectory filename)) | 660 | (let ((base (file-name-nondirectory filename)) |
| @@ -715,8 +716,7 @@ PRESERVE-UID-GID is completely ignored." | |||
| 715 | (let ((attr | 716 | (let ((attr |
| 716 | (when (tramp-smb-get-stat-capability v) | 717 | (when (tramp-smb-get-stat-capability v) |
| 717 | (ignore-errors | 718 | (ignore-errors |
| 718 | (file-attributes | 719 | (file-attributes filename 'string))))) |
| 719 | (expand-file-name (nth 0 x)) 'string))))) | ||
| 720 | (insert | 720 | (insert |
| 721 | (format | 721 | (format |
| 722 | "%10s %3d %-8s %-8s %8s %s " | 722 | "%10s %3d %-8s %-8s %8s %s " |
| @@ -732,9 +732,16 @@ PRESERVE-UID-GID is completely ignored." | |||
| 732 | "%b %e %R" | 732 | "%b %e %R" |
| 733 | "%b %e %Y") | 733 | "%b %e %Y") |
| 734 | (nth 3 x)))) ; date | 734 | (nth 3 x)))) ; date |
| 735 | ;; We mark the filename. | 735 | ;; We mark the file name. The inserted name could be |
| 736 | ;; from somewhere else, so we use the relative file | ||
| 737 | ;; name of `default-directory'. | ||
| 736 | (let ((start (point))) | 738 | (let ((start (point))) |
| 737 | (insert (format "%s\n" (nth 0 x))) ; file name | 739 | (insert |
| 740 | (format | ||
| 741 | "%s\n" | ||
| 742 | (file-relative-name | ||
| 743 | (expand-file-name | ||
| 744 | (nth 0 x) (file-name-directory filename))))) | ||
| 738 | (put-text-property start (1- (point)) 'dired-filename t)) | 745 | (put-text-property start (1- (point)) 'dired-filename t)) |
| 739 | (forward-line) | 746 | (forward-line) |
| 740 | (beginning-of-line)))) | 747 | (beginning-of-line)))) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 28a30155a66..a573a75afe2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4035,9 +4035,11 @@ This is like `dired-recursive-delete-directory' for Tramp files." | |||
| 4035 | (concat file ".z")) | 4035 | (concat file ".z")) |
| 4036 | (t nil))))))))) | 4036 | (t nil))))))))) |
| 4037 | 4037 | ||
| 4038 | (defun tramp-handle-dired-uncache (dir) | 4038 | (defun tramp-handle-dired-uncache (dir &optional dir-p) |
| 4039 | "Like `dired-uncache' for Tramp files." | 4039 | "Like `dired-uncache' for Tramp files." |
| 4040 | (with-parsed-tramp-file-name dir nil | 4040 | ;; DIR-P is valid for XEmacs only. |
| 4041 | (with-parsed-tramp-file-name | ||
| 4042 | (if (or dir-p (file-directory-p dir)) dir (file-name-directory dir)) nil | ||
| 4041 | (tramp-flush-file-property v localname))) | 4043 | (tramp-flush-file-property v localname))) |
| 4042 | 4044 | ||
| 4043 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm | 4045 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm |
| @@ -4663,20 +4665,21 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." | |||
| 4663 | 4665 | ||
| 4664 | (defun tramp-handle-file-remote-p (filename &optional identification connected) | 4666 | (defun tramp-handle-file-remote-p (filename &optional identification connected) |
| 4665 | "Like `file-remote-p' for Tramp files." | 4667 | "Like `file-remote-p' for Tramp files." |
| 4666 | (when (tramp-tramp-file-p filename) | 4668 | (let ((tramp-verbose 3)) |
| 4667 | (let* ((v (tramp-dissect-file-name filename)) | 4669 | (when (tramp-tramp-file-p filename) |
| 4668 | (p (tramp-get-connection-process v)) | 4670 | (let* ((v (tramp-dissect-file-name filename)) |
| 4669 | (c (and p (processp p) (memq (process-status p) '(run open))))) | 4671 | (p (tramp-get-connection-process v)) |
| 4670 | ;; We expand the file name only, if there is already a connection. | 4672 | (c (and p (processp p) (memq (process-status p) '(run open))))) |
| 4671 | (with-parsed-tramp-file-name | 4673 | ;; We expand the file name only, if there is already a connection. |
| 4672 | (if c (expand-file-name filename) filename) nil | 4674 | (with-parsed-tramp-file-name |
| 4673 | (and (or (not connected) c) | 4675 | (if c (expand-file-name filename) filename) nil |
| 4674 | (cond | 4676 | (and (or (not connected) c) |
| 4675 | ((eq identification 'method) method) | 4677 | (cond |
| 4676 | ((eq identification 'user) user) | 4678 | ((eq identification 'method) method) |
| 4677 | ((eq identification 'host) host) | 4679 | ((eq identification 'user) user) |
| 4678 | ((eq identification 'localname) localname) | 4680 | ((eq identification 'host) host) |
| 4679 | (t (tramp-make-tramp-file-name method user host "")))))))) | 4681 | ((eq identification 'localname) localname) |
| 4682 | (t (tramp-make-tramp-file-name method user host ""))))))))) | ||
| 4680 | 4683 | ||
| 4681 | (defun tramp-find-file-name-coding-system-alist (filename tmpname) | 4684 | (defun tramp-find-file-name-coding-system-alist (filename tmpname) |
| 4682 | "Like `find-operation-coding-system' for Tramp filenames. | 4685 | "Like `find-operation-coding-system' for Tramp filenames. |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 4eade6edf58..56fc8032541 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -1086,104 +1086,76 @@ numeric argument is supplied, or the point is inside a literal." | |||
| 1086 | 1086 | ||
| 1087 | (interactive "*P") | 1087 | (interactive "*P") |
| 1088 | (let ((c-echo-syntactic-information-p nil) | 1088 | (let ((c-echo-syntactic-information-p nil) |
| 1089 | final-pos close-paren-inserted) | 1089 | final-pos close-paren-inserted found-delim) |
| 1090 | 1090 | ||
| 1091 | (self-insert-command (prefix-numeric-value arg)) | 1091 | (self-insert-command (prefix-numeric-value arg)) |
| 1092 | (setq final-pos (point)) | 1092 | (setq final-pos (point)) |
| 1093 | 1093 | ||
| 1094 | (c-save-buffer-state (c-parse-and-markup-<>-arglists | 1094 | ;;;; 2010-01-31: There used to be code here to put a syntax-table text |
| 1095 | c-restricted-<>-arglists | 1095 | ;;;; property on the new < or > and its mate (if any) when they are template |
| 1096 | <-pos) | 1096 | ;;;; parens. This is now done in an after-change function. |
| 1097 | 1097 | ||
| 1098 | (when c-recognize-<>-arglists | 1098 | ;; Indent the line if appropriate. |
| 1099 | (if (eq last-command-event ?<) | 1099 | (when (and c-electric-flag c-syntactic-indentation c-recognize-<>-arglists) |
| 1100 | (when (and (progn | 1100 | (setq found-delim |
| 1101 | (backward-char) | 1101 | (if (eq last-command-event ?<) |
| 1102 | (= (point) | 1102 | ;; If a <, basically see if it's got "template" before it ..... |
| 1103 | (progn | 1103 | (or (and (progn |
| 1104 | (c-beginning-of-current-token) | 1104 | (backward-char) |
| 1105 | (point)))) | 1105 | (= (point) |
| 1106 | (progn (c-beginning-of-current-token) (point)))) | ||
| 1107 | (progn | ||
| 1108 | (c-backward-token-2) | ||
| 1109 | (looking-at c-opt-<>-sexp-key))) | ||
| 1110 | ;; ..... or is a C++ << operator. | ||
| 1111 | (and (c-major-mode-is 'c++-mode) | ||
| 1112 | (progn | ||
| 1113 | (goto-char (1- final-pos)) | ||
| 1114 | (c-beginning-of-current-token) | ||
| 1115 | (looking-at "<<")) | ||
| 1116 | (>= (match-end 0) final-pos))) | ||
| 1117 | |||
| 1118 | ;; It's a >. Either a C++ >> operator. ...... | ||
| 1119 | (or (and (c-major-mode-is 'c++-mode) | ||
| 1106 | (progn | 1120 | (progn |
| 1107 | (c-backward-token-2) | 1121 | (goto-char (1- final-pos)) |
| 1108 | (looking-at c-opt-<>-sexp-key))) | 1122 | (c-beginning-of-current-token) |
| 1109 | (c-mark-<-as-paren (1- final-pos))) | 1123 | (looking-at ">>")) |
| 1110 | 1124 | (>= (match-end 0) final-pos)) | |
| 1111 | ;; It's a ">". Check if there's an earlier "<" which either has | 1125 | ;; ...., or search back for a < which isn't already marked as an |
| 1112 | ;; open paren syntax already or that can be recognized as an arglist | 1126 | ;; opening template delimiter. |
| 1113 | ;; together with this ">". Note that this won't work in cases like | 1127 | (save-restriction |
| 1114 | ;; "template <x, a < b, y>" but they ought to be rare. | 1128 | (widen) |
| 1115 | 1129 | ;; Narrow to avoid `c-forward-<>-arglist' below searching past | |
| 1116 | (save-restriction | 1130 | ;; our position. |
| 1117 | ;; Narrow to avoid that `c-forward-<>-arglist' below searches past | 1131 | (narrow-to-region (point-min) final-pos) |
| 1118 | ;; our position. | 1132 | (goto-char final-pos) |
| 1119 | (narrow-to-region (point-min) final-pos) | 1133 | (while |
| 1120 | 1134 | (and | |
| 1121 | (while (and | 1135 | (progn |
| 1122 | (progn | 1136 | (c-syntactic-skip-backward "^<;}" nil t) |
| 1123 | (goto-char final-pos) | 1137 | (eq (char-before) ?<)) |
| 1124 | (c-syntactic-skip-backward "^<;}" nil t) | 1138 | (progn |
| 1125 | (eq (char-before) ?<)) | 1139 | (backward-char) |
| 1126 | (progn | 1140 | (looking-at "\\s\(")))) |
| 1127 | (backward-char) | 1141 | (and (eq (char-after) ?<) |
| 1128 | ;; If the "<" already got open paren syntax we know we | 1142 | (not (looking-at "\\s\(")) |
| 1129 | ;; have the matching closer. Handle it and exit the | 1143 | (progn (c-backward-syntactic-ws) |
| 1130 | ;; loop. | 1144 | (c-simple-skip-symbol-backward)) |
| 1131 | (if (looking-at "\\s\(") | 1145 | (or (looking-at c-opt-<>-sexp-key) |
| 1132 | (progn | 1146 | (not (looking-at c-keywords-regexp))))))))) |
| 1133 | (c-mark->-as-paren (1- final-pos)) | ||
| 1134 | (setq close-paren-inserted t) | ||
| 1135 | nil) | ||
| 1136 | t)) | ||
| 1137 | 1147 | ||
| 1138 | (progn | ||
| 1139 | (setq <-pos (point)) | ||
| 1140 | (c-backward-syntactic-ws) | ||
| 1141 | (c-simple-skip-symbol-backward)) | ||
| 1142 | (or (looking-at c-opt-<>-sexp-key) | ||
| 1143 | (not (looking-at c-keywords-regexp))) | ||
| 1144 | |||
| 1145 | (let ((c-parse-and-markup-<>-arglists t) | ||
| 1146 | c-restricted-<>-arglists | ||
| 1147 | (containing-sexp | ||
| 1148 | (c-most-enclosing-brace (c-parse-state)))) | ||
| 1149 | (when (and containing-sexp | ||
| 1150 | (progn (goto-char containing-sexp) | ||
| 1151 | (eq (char-after) ?\()) | ||
| 1152 | (not (eq (get-text-property (point) 'c-type) | ||
| 1153 | 'c-decl-arg-start))) | ||
| 1154 | (setq c-restricted-<>-arglists t)) | ||
| 1155 | (goto-char <-pos) | ||
| 1156 | (c-forward-<>-arglist nil)) | ||
| 1157 | |||
| 1158 | ;; Loop here if the "<" we found above belongs to a nested | ||
| 1159 | ;; angle bracket sexp. When we start over we'll find the | ||
| 1160 | ;; previous or surrounding sexp. | ||
| 1161 | (if (< (point) final-pos) | ||
| 1162 | t | ||
| 1163 | (setq close-paren-inserted t) | ||
| 1164 | nil))))))) | ||
| 1165 | (goto-char final-pos) | 1148 | (goto-char final-pos) |
| 1166 | 1149 | (when found-delim | |
| 1167 | ;; Indent the line if appropriate. | 1150 | (indent-according-to-mode) |
| 1168 | (when (and c-electric-flag c-syntactic-indentation) | 1151 | (when (and (eq (char-before) ?>) |
| 1169 | (backward-char) | 1152 | (not executing-kbd-macro) |
| 1170 | (when (prog1 (or (looking-at "\\s\(\\|\\s\)") | 1153 | blink-paren-function) |
| 1171 | (and (c-major-mode-is 'c++-mode) | 1154 | ;; Note: Most paren blink functions, such as the standard |
| 1172 | (progn | 1155 | ;; `blink-matching-open', currently doesn't handle paren chars |
| 1173 | (c-beginning-of-current-token) | 1156 | ;; marked with text properties very well. Maybe we should avoid |
| 1174 | (looking-at "<<\\|>>")) | 1157 | ;; this call for the time being? |
| 1175 | (= (match-end 0) final-pos))) | 1158 | (funcall blink-paren-function))))) |
| 1176 | (goto-char final-pos)) | ||
| 1177 | (indent-according-to-mode))) | ||
| 1178 | |||
| 1179 | (when (and close-paren-inserted | ||
| 1180 | (not executing-kbd-macro) | ||
| 1181 | blink-paren-function) | ||
| 1182 | ;; Note: Most paren blink functions, such as the standard | ||
| 1183 | ;; `blink-matching-open', currently doesn't handle paren chars | ||
| 1184 | ;; marked with text properties very well. Maybe we should avoid | ||
| 1185 | ;; this call for the time being? | ||
| 1186 | (funcall blink-paren-function)))) | ||
| 1187 | 1159 | ||
| 1188 | (defun c-electric-paren (arg) | 1160 | (defun c-electric-paren (arg) |
| 1189 | "Insert a parenthesis. | 1161 | "Insert a parenthesis. |
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index bb91dee6ce8..7eb0016ff43 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -1029,6 +1029,44 @@ MODE is either a mode symbol or a list of mode symbols." | |||
| 1029 | ;; Emacs. | 1029 | ;; Emacs. |
| 1030 | `(remove-text-properties ,from ,to '(,property nil)))) | 1030 | `(remove-text-properties ,from ,to '(,property nil)))) |
| 1031 | 1031 | ||
| 1032 | (defmacro c-search-forward-char-property (property value &optional limit) | ||
| 1033 | "Search forward for a text-property PROPERTY having value VALUE. | ||
| 1034 | LIMIT bounds the search. The comparison is done with `equal'. | ||
| 1035 | |||
| 1036 | Leave point just after the character, and set the match data on | ||
| 1037 | this character, and return point. If VALUE isn't found, Return | ||
| 1038 | nil; point is then left undefined." | ||
| 1039 | `(let ((place (point))) | ||
| 1040 | (while | ||
| 1041 | (and | ||
| 1042 | (< place ,(or limit '(point-max))) | ||
| 1043 | (not (equal (get-text-property place ,property) ,value))) | ||
| 1044 | (setq place (next-single-property-change | ||
| 1045 | place ,property nil ,(or limit '(point-max))))) | ||
| 1046 | (when (< place ,(or limit '(point-max))) | ||
| 1047 | (goto-char place) | ||
| 1048 | (search-forward-regexp ".") ; to set the match-data. | ||
| 1049 | (point)))) | ||
| 1050 | |||
| 1051 | (defmacro c-search-backward-char-property (property value &optional limit) | ||
| 1052 | "Search backward for a text-property PROPERTY having value VALUE. | ||
| 1053 | LIMIT bounds the search. The comparison is done with `equal'. | ||
| 1054 | |||
| 1055 | Leave point just before the character, set the match data on this | ||
| 1056 | character, and return point. If VALUE isn't found, Return nil; | ||
| 1057 | point is then left undefined." | ||
| 1058 | `(let ((place (point))) | ||
| 1059 | (while | ||
| 1060 | (and | ||
| 1061 | (> place ,(or limit '(point-min))) | ||
| 1062 | (not (equal (get-text-property (1- place) ,property) ,value))) | ||
| 1063 | (setq place (previous-single-property-change | ||
| 1064 | place ,property nil ,(or limit '(point-min))))) | ||
| 1065 | (when (> place ,(or limit '(point-max))) | ||
| 1066 | (goto-char place) | ||
| 1067 | (search-backward-regexp ".") ; to set the match-data. | ||
| 1068 | (point)))) | ||
| 1069 | |||
| 1032 | (defun c-clear-char-property-with-value-function (from to property value) | 1070 | (defun c-clear-char-property-with-value-function (from to property value) |
| 1033 | "Remove all text-properties PROPERTY from the region (FROM, TO) | 1071 | "Remove all text-properties PROPERTY from the region (FROM, TO) |
| 1034 | which have the value VALUE, as tested by `equal'. These | 1072 | which have the value VALUE, as tested by `equal'. These |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 9d0af1d53ce..3b7f6e4ea0a 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -4880,7 +4880,168 @@ comment at the start of cc-engine.el for more info." | |||
| 4880 | ))) | 4880 | ))) |
| 4881 | 4881 | ||
| 4882 | 4882 | ||
| 4883 | ;; Handling of small scale constructs like types and names. | 4883 | ;; Setting and removing syntax properties on < and > in languages (C++ |
| 4884 | ;; and Java) where they can be template/generic delimiters as well as | ||
| 4885 | ;; their normal meaning of "less/greater than". | ||
| 4886 | |||
| 4887 | ;; Normally, < and > have syntax 'punctuation'. When they are found to | ||
| 4888 | ;; be delimiters, they are marked as such with the category properties | ||
| 4889 | ;; c-<-as-paren-syntax, c->-as-paren-syntax respectively. | ||
| 4890 | |||
| 4891 | ;; STRATEGY: | ||
| 4892 | ;; | ||
| 4893 | ;; It is impossible to determine with certainty whether a <..> pair in | ||
| 4894 | ;; C++ is two comparison operators or is template delimiters, unless | ||
| 4895 | ;; one duplicates a lot of a C++ compiler. For example, the following | ||
| 4896 | ;; code fragment: | ||
| 4897 | ;; | ||
| 4898 | ;; foo (a < b, c > d) ; | ||
| 4899 | ;; | ||
| 4900 | ;; could be a function call with two integer parameters (each a | ||
| 4901 | ;; relational expression), or it could be a constructor for class foo | ||
| 4902 | ;; taking one parameter d of templated type "a < b, c >". They are | ||
| 4903 | ;; somewhat easier to distinguish in Java. | ||
| 4904 | ;; | ||
| 4905 | ;; The strategy now (2010-01) adopted is to mark and unmark < and | ||
| 4906 | ;; > IN MATCHING PAIRS ONLY. [Previously, they were marked | ||
| 4907 | ;; individually when their context so indicated. This gave rise to | ||
| 4908 | ;; intractible problems when one of a matching pair was deleted, or | ||
| 4909 | ;; pulled into a literal.] | ||
| 4910 | ;; | ||
| 4911 | ;; At each buffer change, the syntax-table properties are removed in a | ||
| 4912 | ;; before-change function and reapplied, when needed, in an | ||
| 4913 | ;; after-change function. It is far more important that the | ||
| 4914 | ;; properties get removed when they they are spurious than that they | ||
| 4915 | ;; be present when wanted. | ||
| 4916 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 4917 | (defun c-clear-<-pair-props (&optional pos) | ||
| 4918 | ;; POS (default point) is at a < character. If it is marked with | ||
| 4919 | ;; open paren syntax-table text property, remove the property, | ||
| 4920 | ;; together with the close paren property on the matching > (if | ||
| 4921 | ;; any). | ||
| 4922 | (save-excursion | ||
| 4923 | (if pos | ||
| 4924 | (goto-char pos) | ||
| 4925 | (setq pos (point))) | ||
| 4926 | (when (equal (c-get-char-property (point) 'syntax-table) | ||
| 4927 | c-<-as-paren-syntax) | ||
| 4928 | (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. | ||
| 4929 | (c-go-list-forward)) | ||
| 4930 | (when (equal (c-get-char-property (1- (point)) 'syntax-table) | ||
| 4931 | c->-as-paren-syntax) ; should always be true. | ||
| 4932 | (c-clear-char-property (1- (point)) 'syntax-table)) | ||
| 4933 | (c-clear-char-property pos 'syntax-table)))) | ||
| 4934 | |||
| 4935 | (defun c-clear->-pair-props (&optional pos) | ||
| 4936 | ;; POS (default point) is at a > character. If it is marked with | ||
| 4937 | ;; close paren syntax-table property, remove the property, together | ||
| 4938 | ;; with the open paren property on the matching < (if any). | ||
| 4939 | (save-excursion | ||
| 4940 | (if pos | ||
| 4941 | (goto-char pos) | ||
| 4942 | (setq pos (point))) | ||
| 4943 | (when (equal (c-get-char-property (point) 'syntax-table) | ||
| 4944 | c->-as-paren-syntax) | ||
| 4945 | (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. | ||
| 4946 | (c-go-up-list-backward)) | ||
| 4947 | (when (equal (c-get-char-property (point) 'syntax-table) | ||
| 4948 | c-<-as-paren-syntax) ; should always be true. | ||
| 4949 | (c-clear-char-property (point) 'syntax-table)) | ||
| 4950 | (c-clear-char-property pos 'syntax-table)))) | ||
| 4951 | |||
| 4952 | (defun c-clear-<>-pair-props (&optional pos) | ||
| 4953 | ;; POS (default point) is at a < or > character. If it has an | ||
| 4954 | ;; open/close paren syntax-table property, remove this property both | ||
| 4955 | ;; from the current character and its partner (which will also be | ||
| 4956 | ;; thusly marked). | ||
| 4957 | (cond | ||
| 4958 | ((eq (char-after) ?\<) | ||
| 4959 | (c-clear-<-pair-props pos)) | ||
| 4960 | ((eq (char-after) ?\>) | ||
| 4961 | (c-clear->-pair-props pos)) | ||
| 4962 | (t (c-benign-error | ||
| 4963 | "c-clear-<>-pair-props called from wrong position")))) | ||
| 4964 | |||
| 4965 | (defun c-clear-<-pair-props-if-match-after (lim &optional pos) | ||
| 4966 | ;; POS (default point) is at a < character. If it is both marked | ||
| 4967 | ;; with open/close paren syntax-table property, and has a matching > | ||
| 4968 | ;; (also marked) which is after LIM, remove the property both from | ||
| 4969 | ;; the current > and its partner. | ||
| 4970 | (save-excursion | ||
| 4971 | (if pos | ||
| 4972 | (goto-char pos) | ||
| 4973 | (setq pos (point))) | ||
| 4974 | (when (equal (c-get-char-property (point) 'syntax-table) | ||
| 4975 | c-<-as-paren-syntax) | ||
| 4976 | (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. | ||
| 4977 | (c-go-list-forward)) | ||
| 4978 | (when (and (>= (point) lim) | ||
| 4979 | (equal (c-get-char-property (1- (point)) 'syntax-table) | ||
| 4980 | c->-as-paren-syntax)) ; should always be true. | ||
| 4981 | (c-unmark-<->-as-paren (1- (point))) | ||
| 4982 | (c-unmark-<->-as-paren pos))))) | ||
| 4983 | |||
| 4984 | (defun c-clear->-pair-props-if-match-before (lim &optional pos) | ||
| 4985 | ;; POS (default point) is at a > character. If it is both marked | ||
| 4986 | ;; with open/close paren syntax-table property, and has a matching < | ||
| 4987 | ;; (also marked) which is before LIM, remove the property both from | ||
| 4988 | ;; the current < and its partner. | ||
| 4989 | (save-excursion | ||
| 4990 | (if pos | ||
| 4991 | (goto-char pos) | ||
| 4992 | (setq pos (point))) | ||
| 4993 | (when (equal (c-get-char-property (point) 'syntax-table) | ||
| 4994 | c->-as-paren-syntax) | ||
| 4995 | (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. | ||
| 4996 | (c-go-up-list-backward)) | ||
| 4997 | (when (and (<= (point) lim) | ||
| 4998 | (equal (c-get-char-property (point) 'syntax-table) | ||
| 4999 | c-<-as-paren-syntax)) ; should always be true. | ||
| 5000 | (c-unmark-<->-as-paren (point)) | ||
| 5001 | (c-unmark-<->-as-paren pos))))) | ||
| 5002 | |||
| 5003 | (defun c-before-change-check-<>-operators (beg end) | ||
| 5004 | ;; Unmark certain pairs of "< .... >" which are currently marked as | ||
| 5005 | ;; template/generic delimiters. (This marking is via syntax-table | ||
| 5006 | ;; text properties). | ||
| 5007 | ;; | ||
| 5008 | ;; These pairs are those which are in the current "statement" (i.e., | ||
| 5009 | ;; the region between the {, }, or ; before BEG and the one after | ||
| 5010 | ;; END), and which enclose any part of the interval (BEG END). | ||
| 5011 | ;; | ||
| 5012 | ;; Note that in C++ (?and Java), template/generic parens cannot | ||
| 5013 | ;; enclose a brace or semicolon, so we use these as bounds on the | ||
| 5014 | ;; region we must work on. | ||
| 5015 | ;; | ||
| 5016 | ;; This function is called from before-change-functions (via | ||
| 5017 | ;; c-get-state-before-change-functions). Thus the buffer is widened, | ||
| 5018 | ;; and point is undefined, both at entry and exit. | ||
| 5019 | ;; | ||
| 5020 | ;; FIXME!!! This routine ignores the possibility of macros entirely. | ||
| 5021 | ;; 2010-01-29. | ||
| 5022 | (save-excursion | ||
| 5023 | (let ((beg-lit-limits (progn (goto-char beg) (c-literal-limits))) | ||
| 5024 | (end-lit-limits (progn (goto-char end) (c-literal-limits)))) | ||
| 5025 | ;; Locate the barrier before the changed region | ||
| 5026 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) | ||
| 5027 | (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) | ||
| 5028 | |||
| 5029 | ;; Remove the syntax-table properties from each pertinent <...> pair. | ||
| 5030 | ;; Firsly, the ones with the < before beg and > after beg. | ||
| 5031 | (while (c-search-forward-char-property 'category 'c-<-as-paren-syntax beg) | ||
| 5032 | (c-clear-<-pair-props-if-match-after beg (1- (point)))) | ||
| 5033 | |||
| 5034 | ;; Locate the barrier after END. | ||
| 5035 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) | ||
| 5036 | (c-syntactic-re-search-forward "[;{}]" | ||
| 5037 | (min (+ end 2048) (point-max)) 'end) | ||
| 5038 | |||
| 5039 | ;; Remove syntax-table properties from the remaining pertinent <...> | ||
| 5040 | ;; pairs, those with a > after end and < before end. | ||
| 5041 | (while (c-search-backward-char-property 'category 'c->-as-paren-syntax end) | ||
| 5042 | (c-clear->-pair-props-if-match-before end))))) | ||
| 5043 | |||
| 5044 | |||
| 4884 | 5045 | ||
| 4885 | (defun c-after-change-check-<>-operators (beg end) | 5046 | (defun c-after-change-check-<>-operators (beg end) |
| 4886 | ;; This is called from `after-change-functions' when | 5047 | ;; This is called from `after-change-functions' when |
| @@ -4902,7 +5063,7 @@ comment at the start of cc-engine.el for more info." | |||
| 4902 | (< beg (setq beg (match-end 0)))) | 5063 | (< beg (setq beg (match-end 0)))) |
| 4903 | (while (progn (skip-chars-forward "^<>" beg) | 5064 | (while (progn (skip-chars-forward "^<>" beg) |
| 4904 | (< (point) beg)) | 5065 | (< (point) beg)) |
| 4905 | (c-clear-char-property (point) 'syntax-table) | 5066 | (c-clear-<>-pair-props) |
| 4906 | (forward-char)))) | 5067 | (forward-char)))) |
| 4907 | 5068 | ||
| 4908 | (when (< beg end) | 5069 | (when (< beg end) |
| @@ -4917,9 +5078,13 @@ comment at the start of cc-engine.el for more info." | |||
| 4917 | (< end (setq end (match-end 0)))) | 5078 | (< end (setq end (match-end 0)))) |
| 4918 | (while (progn (skip-chars-forward "^<>" end) | 5079 | (while (progn (skip-chars-forward "^<>" end) |
| 4919 | (< (point) end)) | 5080 | (< (point) end)) |
| 4920 | (c-clear-char-property (point) 'syntax-table) | 5081 | (c-clear-<>-pair-props) |
| 4921 | (forward-char))))))) | 5082 | (forward-char))))))) |
| 4922 | 5083 | ||
| 5084 | |||
| 5085 | |||
| 5086 | ;; Handling of small scale constructs like types and names. | ||
| 5087 | |||
| 4923 | ;; Dynamically bound variable that instructs `c-forward-type' to also | 5088 | ;; Dynamically bound variable that instructs `c-forward-type' to also |
| 4924 | ;; treat possible types (i.e. those that it normally returns 'maybe or | 5089 | ;; treat possible types (i.e. those that it normally returns 'maybe or |
| 4925 | ;; 'found for) as actual types (and always return 'found for them). | 5090 | ;; 'found for) as actual types (and always return 'found for them). |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index e4c61b32a25..d3669f259de 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -391,6 +391,27 @@ The syntax tables aren't stored directly since they're quite large." | |||
| 391 | (and (c-lang-const c++-make-template-syntax-table) | 391 | (and (c-lang-const c++-make-template-syntax-table) |
| 392 | (funcall (c-lang-const c++-make-template-syntax-table)))) | 392 | (funcall (c-lang-const c++-make-template-syntax-table)))) |
| 393 | 393 | ||
| 394 | (c-lang-defconst c-no-parens-syntax-table | ||
| 395 | ;; A variant of the standard syntax table which is used to find matching | ||
| 396 | ;; "<"s and ">"s which have been marked as parens using syntax table | ||
| 397 | ;; properties. The other paren characters (e.g. "{", ")" "]") are given a | ||
| 398 | ;; non-paren syntax here. so that the list commands will work on "< ... >" | ||
| 399 | ;; even when there's unbalanced other parens inside them. | ||
| 400 | ;; | ||
| 401 | ;; This variable is nil for languages which don't have template stuff. | ||
| 402 | t `(lambda () | ||
| 403 | (if (c-lang-const c-recognize-<>-arglists) | ||
| 404 | (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table)))) | ||
| 405 | (modify-syntax-entry ?\( "." table) | ||
| 406 | (modify-syntax-entry ?\) "." table) | ||
| 407 | (modify-syntax-entry ?\[ "." table) | ||
| 408 | (modify-syntax-entry ?\] "." table) | ||
| 409 | (modify-syntax-entry ?\{ "." table) | ||
| 410 | (modify-syntax-entry ?\} "." table) | ||
| 411 | table)))) | ||
| 412 | (c-lang-defvar c-no-parens-syntax-table | ||
| 413 | (funcall (c-lang-const c-no-parens-syntax-table))) | ||
| 414 | |||
| 394 | (c-lang-defconst c-identifier-syntax-modifications | 415 | (c-lang-defconst c-identifier-syntax-modifications |
| 395 | "A list that describes the modifications that should be done to the | 416 | "A list that describes the modifications that should be done to the |
| 396 | mode syntax table to get a syntax table that matches all identifiers | 417 | mode syntax table to get a syntax table that matches all identifiers |
| @@ -423,26 +444,36 @@ the new syntax, as accepted by `modify-syntax-entry'." | |||
| 423 | classifies symbol constituents like '_' and '$' as word constituents, | 444 | classifies symbol constituents like '_' and '$' as word constituents, |
| 424 | so that all identifiers are recognized as words.") | 445 | so that all identifiers are recognized as words.") |
| 425 | 446 | ||
| 426 | (c-lang-defconst c-get-state-before-change-function | 447 | (c-lang-defconst c-get-state-before-change-functions |
| 427 | "If non-nil, a function called from c-before-change-hook. | 448 | ;; For documentation see the following c-lang-defvar of the same name. |
| 428 | Typically it will record enough state to allow | 449 | ;; The value here may be a list of functions or a single function. |
| 450 | t nil | ||
| 451 | c++ '(c-extend-region-for-CPP c-before-change-check-<>-operators) | ||
| 452 | (c objc) 'c-extend-region-for-CPP | ||
| 453 | ;; java 'c-before-change-check-<>-operators | ||
| 454 | awk 'c-awk-record-region-clear-NL) | ||
| 455 | (c-lang-defvar c-get-state-before-change-functions | ||
| 456 | (let ((fs (c-lang-const c-get-state-before-change-functions))) | ||
| 457 | (if (listp fs) | ||
| 458 | fs | ||
| 459 | (list fs))) | ||
| 460 | "If non-nil, a list of functions called from c-before-change-hook. | ||
| 461 | Typically these will record enough state to allow | ||
| 429 | `c-before-font-lock-function' to extend the region to fontify, | 462 | `c-before-font-lock-function' to extend the region to fontify, |
| 430 | and may do such things as removing text-properties which must be | 463 | and may do such things as removing text-properties which must be |
| 431 | recalculated. | 464 | recalculated. |
| 432 | 465 | ||
| 433 | It takes 2 parameters, the BEG and END supplied to every | 466 | These functions will be run in the order given. Each of them |
| 467 | takes 2 parameters, the BEG and END supplied to every | ||
| 434 | before-change function; on entry, the buffer will have been | 468 | before-change function; on entry, the buffer will have been |
| 435 | widened and match-data will have been saved; point is undefined | 469 | widened and match-data will have been saved; point is undefined |
| 436 | on both entry and exit; the return value is ignored. | 470 | on both entry and exit; the return value is ignored. |
| 437 | 471 | ||
| 438 | When the mode is initialized, this function is called with | 472 | The functions are called even when font locking isn't enabled. |
| 439 | parameters \(point-min) and \(point-max)." | 473 | |
| 440 | t nil | 474 | When the mode is initialized, the functions are called with |
| 441 | (c c++ objc) 'c-extend-region-for-CPP | 475 | parameters \(point-min) and \(point-max).") |
| 442 | awk 'c-awk-record-region-clear-NL) | 476 | |
| 443 | (c-lang-defvar c-get-state-before-change-function | ||
| 444 | (c-lang-const c-get-state-before-change-function)) | ||
| 445 | |||
| 446 | (c-lang-defconst c-before-font-lock-function | 477 | (c-lang-defconst c-before-font-lock-function |
| 447 | "If non-nil, a function called just before font locking. | 478 | "If non-nil, a function called just before font locking. |
| 448 | Typically it will extend the region about to be fontified \(see | 479 | Typically it will extend the region about to be fontified \(see |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 91fc29cdfa8..9cdc0f97b50 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -641,8 +641,10 @@ compatible with old code; callers should always specify it." | |||
| 641 | (save-restriction | 641 | (save-restriction |
| 642 | (widen) | 642 | (widen) |
| 643 | (save-excursion | 643 | (save-excursion |
| 644 | (if c-get-state-before-change-function | 644 | (if c-get-state-before-change-functions |
| 645 | (funcall c-get-state-before-change-function (point-min) (point-max))) | 645 | (mapc (lambda (fn) |
| 646 | (funcall fn beg end)) | ||
| 647 | c-get-state-before-change-functions)) | ||
| 646 | (if c-before-font-lock-function | 648 | (if c-before-font-lock-function |
| 647 | (funcall c-before-font-lock-function (point-min) (point-max) | 649 | (funcall c-before-font-lock-function (point-min) (point-max) |
| 648 | (- (point-max) (point-min)))))) | 650 | (- (point-max) (point-min)))))) |
| @@ -775,7 +777,7 @@ Note that the style variables are always made local to the buffer." | |||
| 775 | 777 | ||
| 776 | (defmacro c-run-mode-hooks (&rest hooks) | 778 | (defmacro c-run-mode-hooks (&rest hooks) |
| 777 | ;; Emacs 21.1 has introduced a system with delayed mode hooks that | 779 | ;; Emacs 21.1 has introduced a system with delayed mode hooks that |
| 778 | ;; require the use of the new function `run-mode-hooks'. | 780 | ;; requires the use of the new function `run-mode-hooks'. |
| 779 | (if (cc-bytecomp-fboundp 'run-mode-hooks) | 781 | (if (cc-bytecomp-fboundp 'run-mode-hooks) |
| 780 | `(run-mode-hooks ,@hooks) | 782 | `(run-mode-hooks ,@hooks) |
| 781 | `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks)))) | 783 | `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks)))) |
| @@ -808,8 +810,8 @@ Note that the style variables are always made local to the buffer." | |||
| 808 | ;; has already been widened, and match-data saved. The return value is | 810 | ;; has already been widened, and match-data saved. The return value is |
| 809 | ;; meaningless. | 811 | ;; meaningless. |
| 810 | ;; | 812 | ;; |
| 811 | ;; This function is the C/C++/ObjC value of | 813 | ;; This function is in the C/C++/ObjC values of |
| 812 | ;; `c-get-state-before-change-function' and is called exclusively as a | 814 | ;; `c-get-state-before-change-functions' and is called exclusively as a |
| 813 | ;; before change function. | 815 | ;; before change function. |
| 814 | (goto-char beg) | 816 | (goto-char beg) |
| 815 | (c-beginning-of-macro) | 817 | (c-beginning-of-macro) |
| @@ -922,8 +924,8 @@ Note that the style variables are always made local to the buffer." | |||
| 922 | ))))) | 924 | ))))) |
| 923 | 925 | ||
| 924 | (defun c-before-change (beg end) | 926 | (defun c-before-change (beg end) |
| 925 | ;; Function to be put on `before-change-function'. Primarily, this calls | 927 | ;; Function to be put on `before-change-functions'. Primarily, this calls |
| 926 | ;; the language dependent `c-get-state-before-change-function'. It is | 928 | ;; the language dependent `c-get-state-before-change-functions'. It is |
| 927 | ;; otherwise used only to remove stale entries from the `c-found-types' | 929 | ;; otherwise used only to remove stale entries from the `c-found-types' |
| 928 | ;; cache, and to record entries which a `c-after-change' function might | 930 | ;; cache, and to record entries which a `c-after-change' function might |
| 929 | ;; confirm as stale. | 931 | ;; confirm as stale. |
| @@ -1001,8 +1003,10 @@ Note that the style variables are always made local to the buffer." | |||
| 1001 | ;; larger than (beg end). | 1003 | ;; larger than (beg end). |
| 1002 | (setq c-new-BEG beg | 1004 | (setq c-new-BEG beg |
| 1003 | c-new-END end) | 1005 | c-new-END end) |
| 1004 | (if c-get-state-before-change-function | 1006 | (if c-get-state-before-change-functions |
| 1005 | (funcall c-get-state-before-change-function beg end)) | 1007 | (mapc (lambda (fn) |
| 1008 | (funcall fn beg end)) | ||
| 1009 | c-get-state-before-change-functions)) | ||
| 1006 | )))) | 1010 | )))) |
| 1007 | 1011 | ||
| 1008 | (defun c-after-change (beg end old-len) | 1012 | (defun c-after-change (beg end old-len) |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 8f95da70464..eda9f4e0155 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -558,9 +558,8 @@ logical\\|double[ \t]*precision\\|\ | |||
| 558 | \\(function\\)\\>[ \t]*\\(\\sw+\\)[ \t]*\\(([^&!\n]*)\\)" | 558 | \\(function\\)\\>[ \t]*\\(\\sw+\\)[ \t]*\\(([^&!\n]*)\\)" |
| 559 | (1 font-lock-type-face t) (4 font-lock-keyword-face t) | 559 | (1 font-lock-type-face t) (4 font-lock-keyword-face t) |
| 560 | (5 font-lock-function-name-face t) (6 'default t)) | 560 | (5 font-lock-function-name-face t) (6 'default t)) |
| 561 | ;; enum (F2003; cf type in -1). | 561 | ;; enum (F2003; must be followed by ", bind(C)"). |
| 562 | '("\\<\\(enum\\)\\>\\([^()\n]*::\\)?[ \t]*\\(\\sw+\\)" | 562 | '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face)) |
| 563 | (1 font-lock-keyword-face) (3 font-lock-function-name-face)) | ||
| 564 | ;; end do, enum (F2003), if, select, where, and forall constructs. | 563 | ;; end do, enum (F2003), if, select, where, and forall constructs. |
| 565 | '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ | 564 | '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ |
| 566 | \\([ \t]+\\(\\sw+\\)\\)?" | 565 | \\([ \t]+\\(\\sw+\\)\\)?" |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 20d53502d3a..b13a75e3844 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -996,26 +996,34 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]." | |||
| 996 | Like `rgrep' but uses `zgrep' for `grep-program', sets the default | 996 | Like `rgrep' but uses `zgrep' for `grep-program', sets the default |
| 997 | file name to `*.gz', and sets `grep-highlight-matches' to `always'." | 997 | file name to `*.gz', and sets `grep-highlight-matches' to `always'." |
| 998 | (interactive | 998 | (interactive |
| 999 | (let ((grep-program "zgrep") | 999 | (progn |
| 1000 | (grep-find-template nil) ; output of `grep-compute-defaults' | 1000 | ;; Compute standard default values. |
| 1001 | (grep-find-command nil) | ||
| 1002 | (grep-host-defaults-alist nil) | ||
| 1003 | (grep-files-aliases '(("*.gz" . "*.gz") ; for `grep-read-files' | ||
| 1004 | ("all" . "* .*")))) | ||
| 1005 | ;; Recompute defaults using let-bound values above. | ||
| 1006 | (grep-compute-defaults) | 1001 | (grep-compute-defaults) |
| 1007 | (cond | 1002 | ;; Compute the default zrgrep command by running `grep-compute-defaults' |
| 1008 | ((and grep-find-command (equal current-prefix-arg '(16))) | 1003 | ;; for grep program "zgrep", but not changing global values. |
| 1009 | (list (read-from-minibuffer "Run: " grep-find-command | 1004 | (let ((grep-program "zgrep") |
| 1010 | nil nil 'grep-find-history))) | 1005 | ;; Don't change global values for variables computed |
| 1011 | ((not grep-find-template) | 1006 | ;; by `grep-compute-defaults'. |
| 1012 | (error "grep.el: No `grep-find-template' available")) | 1007 | (grep-find-template nil) |
| 1013 | (t (let* ((regexp (grep-read-regexp)) | 1008 | (grep-find-command nil) |
| 1014 | (files (grep-read-files regexp)) | 1009 | (grep-host-defaults-alist nil) |
| 1015 | (dir (read-directory-name "Base directory: " | 1010 | ;; Use for `grep-read-files' |
| 1016 | nil default-directory t)) | 1011 | (grep-files-aliases '(("all" . "* .*") |
| 1017 | (confirm (equal current-prefix-arg '(4)))) | 1012 | ("gz" . "*.gz")))) |
| 1018 | (list regexp files dir confirm grep-find-template)))))) | 1013 | ;; Recompute defaults using let-bound values above. |
| 1014 | (grep-compute-defaults) | ||
| 1015 | (cond | ||
| 1016 | ((and grep-find-command (equal current-prefix-arg '(16))) | ||
| 1017 | (list (read-from-minibuffer "Run: " grep-find-command | ||
| 1018 | nil nil 'grep-find-history))) | ||
| 1019 | ((not grep-find-template) | ||
| 1020 | (error "grep.el: No `grep-find-template' available")) | ||
| 1021 | (t (let* ((regexp (grep-read-regexp)) | ||
| 1022 | (files (grep-read-files regexp)) | ||
| 1023 | (dir (read-directory-name "Base directory: " | ||
| 1024 | nil default-directory t)) | ||
| 1025 | (confirm (equal current-prefix-arg '(4)))) | ||
| 1026 | (list regexp files dir confirm grep-find-template))))))) | ||
| 1019 | ;; Set `grep-highlight-matches' to `always' | 1027 | ;; Set `grep-highlight-matches' to `always' |
| 1020 | ;; since `zgrep' puts filters in the grep output. | 1028 | ;; since `zgrep' puts filters in the grep output. |
| 1021 | (let ((grep-highlight-matches 'always)) | 1029 | (let ((grep-highlight-matches 'always)) |
diff --git a/lisp/simple.el b/lisp/simple.el index cce793fd26a..5de308ee229 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4700,7 +4700,7 @@ other purposes." | |||
| 4700 | This also turns on `word-wrap' in the buffer." | 4700 | This also turns on `word-wrap' in the buffer." |
| 4701 | :keymap visual-line-mode-map | 4701 | :keymap visual-line-mode-map |
| 4702 | :group 'visual-line | 4702 | :group 'visual-line |
| 4703 | :lighter " wrap" | 4703 | :lighter " Wrap" |
| 4704 | (if visual-line-mode | 4704 | (if visual-line-mode |
| 4705 | (progn | 4705 | (progn |
| 4706 | (set (make-local-variable 'visual-line--saved-state) nil) | 4706 | (set (make-local-variable 'visual-line--saved-state) nil) |
diff --git a/lisp/startup.el b/lisp/startup.el index 857ad97e448..129eb2e6093 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -2103,7 +2103,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2103 | (when (string-match "\\`\\(--[^=]*\\)=" argi) | 2103 | (when (string-match "\\`\\(--[^=]*\\)=" argi) |
| 2104 | (setq argval (substring argi (match-end 0)) | 2104 | (setq argval (substring argi (match-end 0)) |
| 2105 | argi (match-string 1 argi))) | 2105 | argi (match-string 1 argi))) |
| 2106 | (when (string-match "\\`--." orig-argi) | 2106 | (when (string-match "\\`--?[^-]" orig-argi) |
| 2107 | (setq completion (try-completion argi longopts)) | 2107 | (setq completion (try-completion argi longopts)) |
| 2108 | (if (eq completion t) | 2108 | (if (eq completion t) |
| 2109 | (setq argi (substring argi 1)) | 2109 | (setq argi (substring argi 1)) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index e35148ac038..81b87cd5641 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -3459,7 +3459,7 @@ Don't read buffer-local settings or word lists." | |||
| 3459 | ;; Matches context difference listing | 3459 | ;; Matches context difference listing |
| 3460 | "\\(\\(^cd .*\n\\)?diff -c .*\\)?\n\\*\\*\\* .*\n--- .*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*" | 3460 | "\\(\\(^cd .*\n\\)?diff -c .*\\)?\n\\*\\*\\* .*\n--- .*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*" |
| 3461 | ;; Matches unidiff difference listing | 3461 | ;; Matches unidiff difference listing |
| 3462 | "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@\n" | 3462 | "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@" |
| 3463 | ;; Matches reporter.el bug report | 3463 | ;; Matches reporter.el bug report |
| 3464 | "^current state:\n==============\n" | 3464 | "^current state:\n==============\n" |
| 3465 | ;; Matches commonly used "cut" boundaries | 3465 | ;; Matches commonly used "cut" boundaries |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 5f01d297971..1b0206ce70c 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -794,6 +794,12 @@ stream. Standard error output is discarded." | |||
| 794 | (buffer-string))) | 794 | (buffer-string))) |
| 795 | (shelve (vc-bzr-shelve-list)) | 795 | (shelve (vc-bzr-shelve-list)) |
| 796 | (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves") | 796 | (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves") |
| 797 | (root-dir (vc-bzr-root dir)) | ||
| 798 | (pending-merge | ||
| 799 | (file-exists-p | ||
| 800 | (expand-file-name ".bzr/checkout/merge-hashes" root-dir))) | ||
| 801 | (pending-merge-help-echo | ||
| 802 | (format "A merge has been performed.\nA commit from the top-level directory (%s)\nis required before being able to check in anything else" root-dir)) | ||
| 797 | (light-checkout | 803 | (light-checkout |
| 798 | (when (string-match ".+light checkout root: \\(.+\\)$" str) | 804 | (when (string-match ".+light checkout root: \\(.+\\)$" str) |
| 799 | (match-string 1 str))) | 805 | (match-string 1 str))) |
| @@ -819,24 +825,32 @@ stream. Standard error output is discarded." | |||
| 819 | (propertize "Checkout of branch : " 'face 'font-lock-type-face) | 825 | (propertize "Checkout of branch : " 'face 'font-lock-type-face) |
| 820 | (propertize light-checkout-branch 'face 'font-lock-variable-name-face) | 826 | (propertize light-checkout-branch 'face 'font-lock-variable-name-face) |
| 821 | "\n")) | 827 | "\n")) |
| 822 | (if shelve | 828 | (when pending-merge |
| 823 | (concat | 829 | (concat |
| 824 | (propertize "Shelves :\n" 'face 'font-lock-type-face | 830 | (propertize "Warning : " 'face 'font-lock-warning-face |
| 825 | 'help-echo shelve-help-echo) | 831 | 'help-echo pending-merge-help-echo) |
| 826 | (mapconcat | 832 | (propertize "Pending merges, commit recommended before any other action" |
| 827 | (lambda (x) | 833 | 'help-echo pending-merge-help-echo |
| 828 | (propertize x | 834 | 'face 'font-lock-warning-face) |
| 829 | 'face 'font-lock-variable-name-face | 835 | "\n")) |
| 830 | 'mouse-face 'highlight | 836 | (if shelve |
| 831 | 'help-echo "mouse-3: Show shelve menu\nP: Apply and remove shelf (pop)\nC-k: Delete shelf" | 837 | (concat |
| 832 | 'keymap vc-bzr-shelve-map)) | 838 | (propertize "Shelves :\n" 'face 'font-lock-type-face |
| 833 | shelve "\n")) | 839 | 'help-echo shelve-help-echo) |
| 834 | (concat | 840 | (mapconcat |
| 835 | (propertize "Shelves : " 'face 'font-lock-type-face | 841 | (lambda (x) |
| 836 | 'help-echo shelve-help-echo) | 842 | (propertize x |
| 837 | (propertize "No shelved changes" | 843 | 'face 'font-lock-variable-name-face |
| 838 | 'help-echo shelve-help-echo | 844 | 'mouse-face 'highlight |
| 839 | 'face 'font-lock-variable-name-face)))))) | 845 | 'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf (pop)\nS: Snapshot to a shelf\nC-k: Delete shelf" |
| 846 | 'keymap vc-bzr-shelve-map)) | ||
| 847 | shelve "\n")) | ||
| 848 | (concat | ||
| 849 | (propertize "Shelves : " 'face 'font-lock-type-face | ||
| 850 | 'help-echo shelve-help-echo) | ||
| 851 | (propertize "No shelved changes" | ||
| 852 | 'help-echo shelve-help-echo | ||
| 853 | 'face 'font-lock-variable-name-face)))))) | ||
| 840 | 854 | ||
| 841 | (defun vc-bzr-shelve (name) | 855 | (defun vc-bzr-shelve (name) |
| 842 | "Create a shelve." | 856 | "Create a shelve." |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index b46561428ee..01c1dc822df 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -89,7 +89,7 @@ An empty list disables VC altogether." | |||
| 89 | :type '(repeat directory) | 89 | :type '(repeat directory) |
| 90 | :group 'vc) | 90 | :group 'vc) |
| 91 | 91 | ||
| 92 | (make-obsolete 'vc-path "should not be necessary anymore." "23.2") | 92 | (make-obsolete-variable 'vc-path "should not be necessary anymore." "23.2") |
| 93 | 93 | ||
| 94 | (defcustom vc-make-backup-files nil | 94 | (defcustom vc-make-backup-files nil |
| 95 | "If non-nil, backups of registered files are made as with other files. | 95 | "If non-nil, backups of registered files are made as with other files. |
diff --git a/lwlib/README b/lwlib/README index 97fdeac3d4b..25c72eba83f 100644 --- a/lwlib/README +++ b/lwlib/README | |||
| @@ -4,6 +4,4 @@ library was written by Lucid, Inc and released under the terms of the | |||
| 4 | GPL version 1 (or later). It is not considered part of GNU Emacs. | 4 | GPL version 1 (or later). It is not considered part of GNU Emacs. |
| 5 | 5 | ||
| 6 | This version of the library differs from the original as described in | 6 | This version of the library differs from the original as described in |
| 7 | the ChangeLog file. For example, the file "lwlib-int.h" was renamed | 7 | the ChangeLog file. |
| 8 | from "lwlib-internal.h" in order to fit in 14 characters, and the | ||
| 9 | makefile adjusted to fit in with Emacs's configure script. | ||
diff --git a/nt/inc/grp.h b/nt/inc/grp.h index d4988f62a7a..d4988f62a7a 100755..100644 --- a/nt/inc/grp.h +++ b/nt/inc/grp.h | |||
diff --git a/src/ChangeLog b/src/ChangeLog index 795b6059a6f..f1f4aa24b35 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | 2010-02-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * charset.c (load_charset_map_from_file): Allocate large | ||
| 4 | charset_map_entries structure on the heap rather than the stack. | ||
| 5 | (Bug#5526). | ||
| 6 | |||
| 7 | 2010-01-31 Kenichi Handa <handa@m17n.org> | ||
| 8 | |||
| 9 | * font.c (font_parse_xlfd): If FONT is a font-entity and pixel | ||
| 10 | size in NAME is invalid, return -1 (Bug#5396). | ||
| 11 | |||
| 12 | 2010-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 13 | |||
| 14 | * nsterm.m (ns_defined_color): Block input. Suggested by Mike | ||
| 15 | <deactivated@gmail.com> (Bug#3605). | ||
| 16 | |||
| 17 | 2010-01-31 David De La Harpe Golden <david@harpegolden.net> | ||
| 18 | |||
| 19 | * fileio.c (Frename_file): Correctly rename symlinks to | ||
| 20 | directories (Bug#5496). | ||
| 21 | |||
| 22 | 2010-01-31 Filipe Cabecinhas <filcab@gmail.com> (tiny change) | ||
| 23 | |||
| 24 | * nsterm.m (ns_ring_bell): Handle visible bell like X. | ||
| 25 | |||
| 1 | 2010-01-30 Andreas Schwab <schwab@linux-m68k.org> | 26 | 2010-01-30 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 27 | ||
| 3 | * character.h (CHAR_PRINTABLE_P): Reparenthesize to avoid warning. | 28 | * character.h (CHAR_PRINTABLE_P): Reparenthesize to avoid warning. |
diff --git a/src/charset.c b/src/charset.c index 0f6bb4f0906..9e8ff1d59c9 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -526,7 +526,7 @@ load_charset_map_from_file (charset, mapfile, control_flag) | |||
| 526 | error ("Failure in loading charset map: %S", SDATA (mapfile)); | 526 | error ("Failure in loading charset map: %S", SDATA (mapfile)); |
| 527 | 527 | ||
| 528 | head = entries = ((struct charset_map_entries *) | 528 | head = entries = ((struct charset_map_entries *) |
| 529 | alloca (sizeof (struct charset_map_entries))); | 529 | xmalloc (sizeof (struct charset_map_entries))); |
| 530 | n_entries = 0; | 530 | n_entries = 0; |
| 531 | eof = 0; | 531 | eof = 0; |
| 532 | while (1) | 532 | while (1) |
| @@ -563,6 +563,7 @@ load_charset_map_from_file (charset, mapfile, control_flag) | |||
| 563 | close (fd); | 563 | close (fd); |
| 564 | 564 | ||
| 565 | load_charset_map (charset, head, n_entries, control_flag); | 565 | load_charset_map (charset, head, n_entries, control_flag); |
| 566 | xfree (head); | ||
| 566 | } | 567 | } |
| 567 | 568 | ||
| 568 | static void | 569 | static void |
diff --git a/src/config.in b/src/config.in index fca6ac89dff..b321c586a4a 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -741,6 +741,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 741 | /* Define to 1 if you have the <utime.h> header file. */ | 741 | /* Define to 1 if you have the <utime.h> header file. */ |
| 742 | #undef HAVE_UTIME_H | 742 | #undef HAVE_UTIME_H |
| 743 | 743 | ||
| 744 | /* Define to 1 if you have the <utmp.h> header file. */ | ||
| 745 | #undef HAVE_UTMP_H | ||
| 746 | |||
| 744 | /* Define to 1 if you have the `vfork' function. */ | 747 | /* Define to 1 if you have the `vfork' function. */ |
| 745 | #undef HAVE_VFORK | 748 | #undef HAVE_VFORK |
| 746 | 749 | ||
diff --git a/src/fileio.c b/src/fileio.c index 72f695acb68..50f8cb14bfb 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2300,7 +2300,12 @@ This is what happens in interactive use with M-x. */) | |||
| 2300 | 2300 | ||
| 2301 | count = SPECPDL_INDEX (); | 2301 | count = SPECPDL_INDEX (); |
| 2302 | specbind (Qdelete_by_moving_to_trash, Qnil); | 2302 | specbind (Qdelete_by_moving_to_trash, Qnil); |
| 2303 | if (!NILP (Ffile_directory_p (file))) | 2303 | |
| 2304 | if (!NILP (Ffile_directory_p (file)) | ||
| 2305 | #ifdef S_IFLNK | ||
| 2306 | && NILP (symlink_target) | ||
| 2307 | #endif | ||
| 2308 | ) | ||
| 2304 | call2 (Qdelete_directory, file, Qt); | 2309 | call2 (Qdelete_directory, file, Qt); |
| 2305 | else | 2310 | else |
| 2306 | Fdelete_file (file); | 2311 | Fdelete_file (file); |
diff --git a/src/font.c b/src/font.c index 557f1fbcddc..5f1d59afe22 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -1122,6 +1122,8 @@ font_parse_xlfd (name, font) | |||
| 1122 | val = INTERN_FIELD (XLFD_PIXEL_INDEX); | 1122 | val = INTERN_FIELD (XLFD_PIXEL_INDEX); |
| 1123 | if (INTEGERP (val)) | 1123 | if (INTEGERP (val)) |
| 1124 | ASET (font, FONT_SIZE_INDEX, val); | 1124 | ASET (font, FONT_SIZE_INDEX, val); |
| 1125 | else if (FONT_ENTITY_P (font)) | ||
| 1126 | return -1; | ||
| 1125 | else | 1127 | else |
| 1126 | { | 1128 | { |
| 1127 | double point_size = -1; | 1129 | double point_size = -1; |
diff --git a/src/nsterm.m b/src/nsterm.m index a102267920c..8f3233f9fde 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -808,23 +808,58 @@ ns_ring_bell () | |||
| 808 | view = FRAME_NS_VIEW (frame); | 808 | view = FRAME_NS_VIEW (frame); |
| 809 | if (view != nil) | 809 | if (view != nil) |
| 810 | { | 810 | { |
| 811 | NSRect r, surr; | 811 | /* Get the bounds of our NSView */ |
| 812 | NSPoint dim = NSMakePoint (128, 128); | 812 | NSRect viewBounds = [view bounds]; |
| 813 | 813 | ||
| 814 | r = [view bounds]; | 814 | /* Height of each line to flash. */ |
| 815 | r.origin.x += (r.size.width - dim.x) / 2; | 815 | int flash_height = FRAME_LINE_HEIGHT (frame); |
| 816 | r.origin.y += (r.size.height - dim.y) / 2; | 816 | int width = FRAME_PIXEL_WIDTH (frame) |
| 817 | r.size.width = dim.x; | 817 | - NS_SCROLL_BAR_WIDTH (frame); |
| 818 | r.size.height = dim.y; | 818 | |
| 819 | surr = NSInsetRect (r, -2, -2); | 819 | /* Get the GraphicsContext */ |
| 820 | ns_focus (frame, &surr, 1); | 820 | CGContextRef ctxt = [[NSGraphicsContext currentContext] graphicsPort]; |
| 821 | [[view window] cacheImageInRect: [view convertRect: surr toView:nil]]; | 821 | CGRect lowerLine, upperLine; |
| 822 | [ns_lookup_indexed_color (NS_FACE_FOREGROUND | 822 | lowerLine = |
| 823 | (FRAME_DEFAULT_FACE (frame)), frame) set]; | 823 | CGRectMake(viewBounds.origin.x, viewBounds.origin.y, |
| 824 | NSRectFill (r); | 824 | width + NS_SCROLL_BAR_WIDTH(frame), |
| 825 | flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)); | ||
| 826 | upperLine = | ||
| 827 | CGRectMake(viewBounds.origin.x, | ||
| 828 | viewBounds.origin.y + viewBounds.size.height | ||
| 829 | - (flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)), | ||
| 830 | width, | ||
| 831 | flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)); | ||
| 832 | |||
| 833 | /* Invert the colors using a difference blend. */ | ||
| 834 | CGContextSetBlendMode(ctxt, kCGBlendModeDifference); | ||
| 835 | CGContextSetGrayFillColor(ctxt, 1, 1); | ||
| 836 | |||
| 837 | /* If window is tall, flash top and bottom line. */ | ||
| 838 | if (viewBounds.size.height > 3 * FRAME_LINE_HEIGHT (frame)) | ||
| 839 | { | ||
| 840 | CGContextFillRect(ctxt, upperLine); | ||
| 841 | CGContextFillRect(ctxt, lowerLine); | ||
| 842 | } | ||
| 843 | else | ||
| 844 | /* If it is short, flash it all. */ | ||
| 845 | CGContextFillRect(ctxt, NSRectToCGRect([view bounds])); | ||
| 846 | |||
| 847 | /* Bounce Dock icon. Maybe we can allow some configuration here. */ | ||
| 848 | [NSApp requestUserAttention: NSInformationalRequest]; | ||
| 849 | |||
| 825 | [[view window] flushWindow]; | 850 | [[view window] flushWindow]; |
| 826 | ns_timeout (150000); | 851 | ns_timeout (150000); |
| 827 | [[view window] restoreCachedImage]; | 852 | |
| 853 | /* If window is tall, flash top and bottom line. */ | ||
| 854 | if (viewBounds.size.height > 3 * FRAME_LINE_HEIGHT (frame)) | ||
| 855 | { | ||
| 856 | CGContextFillRect(ctxt, upperLine); | ||
| 857 | CGContextFillRect(ctxt, lowerLine); | ||
| 858 | } | ||
| 859 | else | ||
| 860 | /* If it is short, flash it all. */ | ||
| 861 | CGContextFillRect(ctxt, NSRectToCGRect([view bounds])); | ||
| 862 | |||
| 828 | [[view window] flushWindow]; | 863 | [[view window] flushWindow]; |
| 829 | ns_unfocus (frame); | 864 | ns_unfocus (frame); |
| 830 | } | 865 | } |
| @@ -1517,19 +1552,19 @@ ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc, | |||
| 1517 | Return 0 if not found | 1552 | Return 0 if not found |
| 1518 | -------------------------------------------------------------------------- */ | 1553 | -------------------------------------------------------------------------- */ |
| 1519 | { | 1554 | { |
| 1520 | NSColor *temp; | 1555 | NSColor *col; |
| 1521 | int notFound = ns_get_color (name, &temp); | ||
| 1522 | |||
| 1523 | NSTRACE (ns_defined_color); | 1556 | NSTRACE (ns_defined_color); |
| 1524 | 1557 | ||
| 1525 | if (notFound) | 1558 | BLOCK_INPUT; |
| 1526 | return 0; | 1559 | if (ns_get_color (name, &col) != 0) /* Color not found */ |
| 1527 | 1560 | { | |
| 1561 | UNBLOCK_INPUT; | ||
| 1562 | return 0; | ||
| 1563 | } | ||
| 1528 | if (makeIndex && alloc) | 1564 | if (makeIndex && alloc) |
| 1529 | color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */ | 1565 | color_def->pixel = ns_index_color (col, f); |
| 1530 | 1566 | ns_query_color (col, color_def, !makeIndex); | |
| 1531 | ns_query_color (temp, color_def, !makeIndex); | 1567 | UNBLOCK_INPUT; |
| 1532 | |||
| 1533 | return 1; | 1568 | return 1; |
| 1534 | } | 1569 | } |
| 1535 | 1570 | ||