diff options
| author | Alan Mackenzie | 2012-01-18 11:50:27 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2012-01-18 11:50:27 +0000 |
| commit | e8afb1265f8067d360f03c514603223cde92ffeb (patch) | |
| tree | 94797628f6e0a13874730f266fe5de3a0ee90ac9 /lisp | |
| parent | 44b0225ed09cfbc6cee7ed53c630988c342df806 (diff) | |
| parent | 3fcca64dce0c0e9f6c6fc55f19ce47fe9e861352 (diff) | |
| download | emacs-e8afb1265f8067d360f03c514603223cde92ffeb.tar.gz emacs-e8afb1265f8067d360f03c514603223cde92ffeb.zip | |
Merge from trunk.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 107 | ||||
| -rw-r--r-- | lisp/dired.el | 46 | ||||
| -rw-r--r-- | lisp/files.el | 9 | ||||
| -rw-r--r-- | lisp/isearch.el | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 4 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 16 | ||||
| -rw-r--r-- | lisp/window.el | 64 |
7 files changed, 172 insertions, 76 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e40d43ee8b9..6ada090d071 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2012-01-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * files.el (auto-mode-alist, inhibit-first-line-modes-regexps) | ||
| 4 | (set-auto-mode): Doc fixes. | ||
| 5 | |||
| 6 | 2012-01-17 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * isearch.el (search-nonincremental-instead): Fix doc typo. | ||
| 9 | |||
| 10 | * dired.el (dired-insert-directory): Handle newlines in directory name. | ||
| 11 | (dired-build-subdir-alist): Unescape newlines in directory name. | ||
| 12 | |||
| 13 | 2012-01-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 14 | |||
| 15 | * net/tramp.el (tramp-local-end-of-line): New defcustom. | ||
| 16 | (tramp-action-login, tramp-action-yesno, tramp-action-yn) | ||
| 17 | (tramp-action-terminal): Use it. (Bug#10530) | ||
| 18 | |||
| 19 | 2012-01-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 20 | |||
| 21 | * minibuffer.el (completion--replace): Strip properties (bug#10062). | ||
| 22 | |||
| 23 | 2012-01-16 Martin Rudalics <rudalics@gmx.at> | ||
| 24 | |||
| 25 | * window.el (window-state-ignored-parameters): Remove variable. | ||
| 26 | (window--state-get-1): Rename argument MARKERS to IGNORE. | ||
| 27 | Handle persistent window parameters. Make copy of clone-of | ||
| 28 | parameter only if requested. (Bug#10348) | ||
| 29 | (window--state-put-2): Install a window parameter only if it has | ||
| 30 | a non-nil value or an existing parameter shall be overwritten. | ||
| 31 | |||
| 1 | 2012-01-15 Michael Albinus <michael.albinus@gmx.de> | 32 | 2012-01-15 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 33 | ||
| 3 | * net/tramp-sh.el (tramp-remote-path): Set tramp-autoload cookie. | 34 | * net/tramp-sh.el (tramp-remote-path): Set tramp-autoload cookie. |
| @@ -21,6 +52,17 @@ | |||
| 21 | 52 | ||
| 22 | * dired.el (dired-get-filename): Fix 'verbatim case of previous change. | 53 | * dired.el (dired-get-filename): Fix 'verbatim case of previous change. |
| 23 | 54 | ||
| 55 | 2012-01-13 Alan Mackenzie <acm@muc.de> | ||
| 56 | |||
| 57 | Fix filling for when filladapt mode is enabled. | ||
| 58 | |||
| 59 | * progmodes/cc-cmds.el (c-fill-paragraph): In the invocation of | ||
| 60 | c-mask-paragraph, pass in `fill-paragraph' rather than | ||
| 61 | `fill-region-as-paragraph'. (This is a reversion of a previous | ||
| 62 | change.) | ||
| 63 | * progmodes/cc-mode.el (c-basic-common-init): Make | ||
| 64 | fill-paragraph-handle-comment buffer local and set it to nil. | ||
| 65 | |||
| 24 | 2012-01-13 Glenn Morris <rgm@gnu.org> | 66 | 2012-01-13 Glenn Morris <rgm@gnu.org> |
| 25 | 67 | ||
| 26 | * dired.el (dired-switches-escape-p): New function. | 68 | * dired.el (dired-switches-escape-p): New function. |
| @@ -38,7 +80,7 @@ | |||
| 38 | 80 | ||
| 39 | Fix Emacs bug #10463 - put `widen's around the critical spots. | 81 | Fix Emacs bug #10463 - put `widen's around the critical spots. |
| 40 | 82 | ||
| 41 | * progmodes/cc-engine.el (c-in-literal, c-literal-limits): put a | 83 | * progmodes/cc-engine.el (c-in-literal, c-literal-limits): Put a |
| 42 | widen around each invocation of c-state-pp-to-literal. Remove an | 84 | widen around each invocation of c-state-pp-to-literal. Remove an |
| 43 | unused let variable. | 85 | unused let variable. |
| 44 | 86 | ||
| @@ -49,8 +91,8 @@ | |||
| 49 | 91 | ||
| 50 | 2012-01-10 Chong Yidong <cyd@gnu.org> | 92 | 2012-01-10 Chong Yidong <cyd@gnu.org> |
| 51 | 93 | ||
| 52 | * net/network-stream.el (network-stream-open-starttls): Avoid | 94 | * net/network-stream.el (network-stream-open-starttls): |
| 53 | emitting a confusing error message when the server gives a bad | 95 | Avoid emitting a confusing error message when the server gives a bad |
| 54 | response to the capability command. | 96 | response to the capability command. |
| 55 | 97 | ||
| 56 | 2012-01-10 Glenn Morris <rgm@gnu.org> | 98 | 2012-01-10 Glenn Morris <rgm@gnu.org> |
| @@ -143,8 +185,8 @@ | |||
| 143 | 185 | ||
| 144 | * custom.el (enable-theme): Don't set custom-safe-themes. | 186 | * custom.el (enable-theme): Don't set custom-safe-themes. |
| 145 | 187 | ||
| 146 | * cus-theme.el (custom-theme-merge-theme): Ignore | 188 | * cus-theme.el (custom-theme-merge-theme): |
| 147 | custom-enabled-themes and custom-safe-themes. | 189 | Ignore custom-enabled-themes and custom-safe-themes. |
| 148 | 190 | ||
| 149 | 2012-01-05 Michael R. Mauger <mmaug@yahoo.com> | 191 | 2012-01-05 Michael R. Mauger <mmaug@yahoo.com> |
| 150 | 192 | ||
| @@ -167,8 +209,8 @@ | |||
| 167 | 209 | ||
| 168 | 2012-01-03 Chong Yidong <cyd@gnu.org> | 210 | 2012-01-03 Chong Yidong <cyd@gnu.org> |
| 169 | 211 | ||
| 170 | * shell.el (shell-dynamic-complete-functions): Put | 212 | * shell.el (shell-dynamic-complete-functions): |
| 171 | pcomplete-completions-at-point, so as to try | 213 | Put pcomplete-completions-at-point, so as to try |
| 172 | comint-filename-completion first (Bug#10417). | 214 | comint-filename-completion first (Bug#10417). |
| 173 | 215 | ||
| 174 | 2012-01-02 Richard Stallman <rms@gnu.org> | 216 | 2012-01-02 Richard Stallman <rms@gnu.org> |
| @@ -193,8 +235,8 @@ | |||
| 193 | 235 | ||
| 194 | 2012-01-01 Eli Zaretskii <eliz@gnu.org> | 236 | 2012-01-01 Eli Zaretskii <eliz@gnu.org> |
| 195 | 237 | ||
| 196 | * term/w32-win.el (dynamic-library-alist) <gnutls>: Load | 238 | * term/w32-win.el (dynamic-library-alist) <gnutls>: |
| 197 | libgnutls-28.dll, from GnuTLS version 3.x, in preference to | 239 | Load libgnutls-28.dll, from GnuTLS version 3.x, in preference to |
| 198 | libgnutls-26.dll. | 240 | libgnutls-26.dll. |
| 199 | 241 | ||
| 200 | 2011-12-31 Andreas Schwab <schwab@linux-m68k.org> | 242 | 2011-12-31 Andreas Schwab <schwab@linux-m68k.org> |
| @@ -246,11 +288,10 @@ | |||
| 246 | 2011-12-24 Alan Mackenzie <acm@muc.de> | 288 | 2011-12-24 Alan Mackenzie <acm@muc.de> |
| 247 | 289 | ||
| 248 | Introduce a mechanism to widen the region used in context font | 290 | Introduce a mechanism to widen the region used in context font |
| 249 | locking. Use this to protect declarations from losing their | 291 | locking. Use this to protect declarations from losing their contexts. |
| 250 | contexts. | ||
| 251 | 292 | ||
| 252 | * progmodes/cc-langs.el (c-before-font-lock-functions): Replace | 293 | * progmodes/cc-langs.el (c-before-font-lock-functions): |
| 253 | c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming). | 294 | Replace c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming). |
| 254 | (c-before-context-fontification-functions): New defvar, a list of | 295 | (c-before-context-fontification-functions): New defvar, a list of |
| 255 | functions to be run just before context (etc.) font locking. | 296 | functions to be run just before context (etc.) font locking. |
| 256 | 297 | ||
| @@ -402,22 +443,19 @@ | |||
| 402 | 443 | ||
| 403 | * progmodes/cc-langs (c-label-kwds): Let AWK take the same | 444 | * progmodes/cc-langs (c-label-kwds): Let AWK take the same |
| 404 | expression as the rest. | 445 | expression as the rest. |
| 405 | (c-nonlabel-token-key): Allow string literals for AWK. Refactor | 446 | (c-nonlabel-token-key): Allow string literals for AWK. |
| 406 | for the other modes. | 447 | Refactor for the other modes. |
| 407 | 448 | ||
| 408 | Large brace-block initialisation makes CC Mode slow: Fix. | 449 | Large brace-block initialisation makes CC Mode slow: Fix. |
| 409 | Tidy up and accelerate c-in-literal, etc. by using the | 450 | Tidy up and accelerate c-in-literal, etc. by using the c-parse-state |
| 410 | c-parse-state | ||
| 411 | routines. Limit backward searching in c-font-lock-enclosing.decl. | 451 | routines. Limit backward searching in c-font-lock-enclosing.decl. |
| 412 | 452 | ||
| 413 | * progmodes/cc-engine.el (c-state-pp-to-literal): Return the | 453 | * progmodes/cc-engine.el (c-state-pp-to-literal): Return the |
| 414 | pp-state and literal type in addition to the limits. | 454 | pp-state and literal type in addition to the limits. |
| 415 | (c-state-safe-place): New defun, extracted from | 455 | (c-state-safe-place): New defun, extracted from c-state-literal-at. |
| 416 | c-state-literal-at. | ||
| 417 | (c-state-literal-at): Use the above new defun. | 456 | (c-state-literal-at): Use the above new defun. |
| 418 | (c-slow-in-literal, c-fast-in-literal): Removed. | 457 | (c-slow-in-literal, c-fast-in-literal): Remove. |
| 419 | (c-in-literal, c-literal-limits): Amended to use | 458 | (c-in-literal, c-literal-limits): Amend to use c-state-pp-to-literal. |
| 420 | c-state-pp-to-literal. | ||
| 421 | 459 | ||
| 422 | * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Check for | 460 | * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Check for |
| 423 | being in a literal. Add a limit for backward searching. | 461 | being in a literal. Add a limit for backward searching. |
| @@ -491,8 +529,8 @@ | |||
| 491 | 2011-12-10 Eli Zaretskii <eliz@gnu.org> | 529 | 2011-12-10 Eli Zaretskii <eliz@gnu.org> |
| 492 | 530 | ||
| 493 | * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the | 531 | * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the |
| 494 | `from' or `to' address before taking its substring. Fixes | 532 | `from' or `to' address before taking its substring. |
| 495 | incorrect display in Rmail summary buffer whereby an RFC2047 | 533 | Fixes incorrect display in Rmail summary buffer whereby an RFC2047 |
| 496 | encoded name is chopped in the middle of the encoded string, and | 534 | encoded name is chopped in the middle of the encoded string, and |
| 497 | thus displayed encoded. | 535 | thus displayed encoded. |
| 498 | 536 | ||
| @@ -711,8 +749,8 @@ | |||
| 711 | (verilog-uvm-statement-re): Support UVM indentation and | 749 | (verilog-uvm-statement-re): Support UVM indentation and |
| 712 | highlighting, with old OVM keywords only. | 750 | highlighting, with old OVM keywords only. |
| 713 | (verilog-auto-tieoff, verilog-auto-tieoff-declaration): | 751 | (verilog-auto-tieoff, verilog-auto-tieoff-declaration): |
| 714 | Support AUTOTIEOFF creating non-wire data types. Suggested by Jonathan | 752 | Support AUTOTIEOFF creating non-wire data types. |
| 715 | Greenlaw. | 753 | Suggested by Jonathan Greenlaw. |
| 716 | (verilog-auto-insert-lisp, verilog-delete-to-paren) | 754 | (verilog-auto-insert-lisp, verilog-delete-to-paren) |
| 717 | (verilog-forward-sexp-cmt, verilog-forward-sexp-ign-cmt) | 755 | (verilog-forward-sexp-cmt, verilog-forward-sexp-ign-cmt) |
| 718 | (verilog-inject-sense, verilog-read-inst-pins) | 756 | (verilog-inject-sense, verilog-read-inst-pins) |
| @@ -798,11 +836,11 @@ | |||
| 798 | Andrew Drake. | 836 | Andrew Drake. |
| 799 | (verilog-auto-star-safe, verilog-delete-auto-star-implicit) | 837 | (verilog-auto-star-safe, verilog-delete-auto-star-implicit) |
| 800 | (verilog-inst-comment-re): Fix not deleting Interfaced comment | 838 | (verilog-inst-comment-re): Fix not deleting Interfaced comment |
| 801 | when expanding .* in interfaces, bug320. Reported by Pierre-David | 839 | when expanding .* in interfaces, bug320. |
| 802 | Pfister. | 840 | Reported by Pierre-David Pfister. |
| 803 | (verilog-read-module-name): Fix import statements between module | 841 | (verilog-read-module-name): Fix import statements between module |
| 804 | name and open parenthesis, bug317. Reported by Pierre-David | 842 | name and open parenthesis, bug317. |
| 805 | Pfister. | 843 | Reported by Pierre-David Pfister. |
| 806 | (verilog-simplify-range-expression): Fix simplification of | 844 | (verilog-simplify-range-expression): Fix simplification of |
| 807 | multiplications inside AUTOWIRE connections, bug303. | 845 | multiplications inside AUTOWIRE connections, bug303. |
| 808 | (verilog-auto-inst-port): Support parameter expansion in | 846 | (verilog-auto-inst-port): Support parameter expansion in |
| @@ -1056,8 +1094,7 @@ | |||
| 1056 | 1094 | ||
| 1057 | 2011-11-19 Andreas Schwab <schwab@linux-m68k.org> | 1095 | 2011-11-19 Andreas Schwab <schwab@linux-m68k.org> |
| 1058 | 1096 | ||
| 1059 | * progmodes/sh-script.el (sh-assignment-regexp): Add entry for | 1097 | * progmodes/sh-script.el (sh-assignment-regexp): Add entry for bash. |
| 1060 | bash. | ||
| 1061 | 1098 | ||
| 1062 | 2011-11-19 Juri Linkov <juri@jurta.org> | 1099 | 2011-11-19 Juri Linkov <juri@jurta.org> |
| 1063 | 1100 | ||
| @@ -1182,8 +1219,7 @@ | |||
| 1182 | 1219 | ||
| 1183 | * window.el (window-resize, delete-window, split-window): | 1220 | * window.el (window-resize, delete-window, split-window): |
| 1184 | Replace window-splits by window-combination-resize. | 1221 | Replace window-splits by window-combination-resize. |
| 1185 | * cus-start.el (window-splits): Replace by | 1222 | * cus-start.el (window-splits): Replace by window-combination-resize. |
| 1186 | window-combination-resize. | ||
| 1187 | 1223 | ||
| 1188 | 2011-11-17 Glenn Morris <rgm@gnu.org> | 1224 | 2011-11-17 Glenn Morris <rgm@gnu.org> |
| 1189 | 1225 | ||
| @@ -1248,8 +1284,7 @@ | |||
| 1248 | * window.el (split-window, window-state-get-1) | 1284 | * window.el (split-window, window-state-get-1) |
| 1249 | (window-state-put-1, window-state-put-2): Rename occurrences of | 1285 | (window-state-put-1, window-state-put-2): Rename occurrences of |
| 1250 | window-nest to window-combination-limit. | 1286 | window-nest to window-combination-limit. |
| 1251 | * cus-start.el (window-nest): Rename to | 1287 | * cus-start.el (window-nest): Rename to window-combination-limit. |
| 1252 | window-combination-limit. | ||
| 1253 | 1288 | ||
| 1254 | 2011-11-16 Chong Yidong <cyd@gnu.org> | 1289 | 2011-11-16 Chong Yidong <cyd@gnu.org> |
| 1255 | 1290 | ||
diff --git a/lisp/dired.el b/lisp/dired.el index f1a778ad05a..57f67ca7c8c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1172,7 +1172,22 @@ see `dired-use-ls-dired' for more details.") | |||
| 1172 | "\\015" | 1172 | "\\015" |
| 1173 | (text-properties-at (match-beginning 0))) | 1173 | (text-properties-at (match-beginning 0))) |
| 1174 | nil t)) | 1174 | nil t)) |
| 1175 | (set-marker end nil))) | 1175 | (set-marker end nil)) |
| 1176 | ;; Replace any newlines in DIR with literal "\n"s, for the sake | ||
| 1177 | ;; of the header line. To disambiguate a literal "\n" in the | ||
| 1178 | ;; actual dirname, we also replace "\" with "\\". | ||
| 1179 | ;; Personally, I think this should always be done, irrespective | ||
| 1180 | ;; of the value of dired-actual-switches, because: | ||
| 1181 | ;; i) Dired simply does not work with an unescaped newline in | ||
| 1182 | ;; the directory name used in the header (bug=10469#28), and | ||
| 1183 | ;; ii) "\" is always replaced with "\\" in the listing, so doing | ||
| 1184 | ;; it in the header as well makes things consistent. | ||
| 1185 | ;; But at present it is only done if "-b" is in ls-switches, | ||
| 1186 | ;; because newlines in dirnames are uncommon, and people may | ||
| 1187 | ;; have gotten used to seeing unescaped "\" in the headers. | ||
| 1188 | ;; Note: adjust dired-build-subdir-alist if you change this. | ||
| 1189 | (setq dir (replace-regexp-in-string "\\\\" "\\\\" dir nil t) | ||
| 1190 | dir (replace-regexp-in-string "\n" "\\n" dir nil t))) | ||
| 1176 | (dired-insert-set-properties opoint (point)) | 1191 | (dired-insert-set-properties opoint (point)) |
| 1177 | ;; If we used --dired and it worked, the lines are already indented. | 1192 | ;; If we used --dired and it worked, the lines are already indented. |
| 1178 | ;; Otherwise, indent them. | 1193 | ;; Otherwise, indent them. |
| @@ -2541,12 +2556,31 @@ instead of `dired-actual-switches'." | |||
| 2541 | (delete-region (point) (match-end 1)) | 2556 | (delete-region (point) (match-end 1)) |
| 2542 | (insert new-dir-name)) | 2557 | (insert new-dir-name)) |
| 2543 | (setq count (1+ count)) | 2558 | (setq count (1+ count)) |
| 2559 | ;; Undo any escaping of newlines and \ by dired-insert-directory. | ||
| 2560 | ;; Convert "n" preceded by odd number of \ to newline, and \\ to \. | ||
| 2561 | (when (and (dired-switches-escape-p switches) | ||
| 2562 | (string-match-p "\\\\" new-dir-name)) | ||
| 2563 | (let (temp res) | ||
| 2564 | (mapc (lambda (char) | ||
| 2565 | (cond ((equal char ?\\) | ||
| 2566 | (if temp | ||
| 2567 | (setq res (concat res "\\") | ||
| 2568 | temp nil) | ||
| 2569 | (setq temp "\\"))) | ||
| 2570 | ((and temp (equal char ?n)) | ||
| 2571 | (setq res (concat res "\n") | ||
| 2572 | temp nil)) | ||
| 2573 | (t | ||
| 2574 | (setq res (concat res temp (char-to-string char)) | ||
| 2575 | temp nil)))) | ||
| 2576 | new-dir-name) | ||
| 2577 | (setq new-dir-name res))) | ||
| 2544 | (dired-alist-add-1 new-dir-name | 2578 | (dired-alist-add-1 new-dir-name |
| 2545 | ;; Place a sub directory boundary between lines. | 2579 | ;; Place a sub directory boundary between lines. |
| 2546 | (save-excursion | 2580 | (save-excursion |
| 2547 | (goto-char (match-beginning 0)) | 2581 | (goto-char (match-beginning 0)) |
| 2548 | (beginning-of-line) | 2582 | (beginning-of-line) |
| 2549 | (point-marker))))) | 2583 | (point-marker))))) |
| 2550 | (if (and (> count 1) (called-interactively-p 'interactive)) | 2584 | (if (and (> count 1) (called-interactively-p 'interactive)) |
| 2551 | (message "Buffer includes %d directories" count))) | 2585 | (message "Buffer includes %d directories" count))) |
| 2552 | ;; We don't need to sort it because it is in buffer order per | 2586 | ;; We don't need to sort it because it is in buffer order per |
diff --git a/lisp/files.el b/lisp/files.el index f15c523400d..6056a70d4a1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2405,9 +2405,6 @@ If the element has the form (REGEXP FUNCTION NON-NIL), then after | |||
| 2405 | calling FUNCTION (if it's not nil), we delete the suffix that matched | 2405 | calling FUNCTION (if it's not nil), we delete the suffix that matched |
| 2406 | REGEXP and search the list again for another match. | 2406 | REGEXP and search the list again for another match. |
| 2407 | 2407 | ||
| 2408 | If the file name matches `inhibit-first-line-modes-regexps', | ||
| 2409 | then `auto-mode-alist' is not processed. | ||
| 2410 | |||
| 2411 | The extensions whose FUNCTION is `archive-mode' should also | 2408 | The extensions whose FUNCTION is `archive-mode' should also |
| 2412 | appear in `auto-coding-alist' with `no-conversion' coding system. | 2409 | appear in `auto-coding-alist' with `no-conversion' coding system. |
| 2413 | 2410 | ||
| @@ -2481,7 +2478,8 @@ See also `auto-mode-alist'.") | |||
| 2481 | (defvar inhibit-first-line-modes-regexps | 2478 | (defvar inhibit-first-line-modes-regexps |
| 2482 | (mapcar 'purecopy '("\\.tar\\'" "\\.tgz\\'" "\\.tiff?\\'" | 2479 | (mapcar 'purecopy '("\\.tar\\'" "\\.tgz\\'" "\\.tiff?\\'" |
| 2483 | "\\.gif\\'" "\\.png\\'" "\\.jpe?g\\'")) | 2480 | "\\.gif\\'" "\\.png\\'" "\\.jpe?g\\'")) |
| 2484 | "List of regexps; if one matches a file name, don't look for `-*-'.") | 2481 | "List of regexps; if one matches a file name, don't look for `-*-'. |
| 2482 | See also `inhibit-first-line-modes-suffixes'.") | ||
| 2485 | 2483 | ||
| 2486 | (defvar inhibit-first-line-modes-suffixes nil | 2484 | (defvar inhibit-first-line-modes-suffixes nil |
| 2487 | "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. | 2485 | "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'. |
| @@ -2550,7 +2548,8 @@ Also applies to `magic-fallback-mode-alist'.") | |||
| 2550 | (defun set-auto-mode (&optional keep-mode-if-same) | 2548 | (defun set-auto-mode (&optional keep-mode-if-same) |
| 2551 | "Select major mode appropriate for current buffer. | 2549 | "Select major mode appropriate for current buffer. |
| 2552 | 2550 | ||
| 2553 | To find the right major mode, this function checks for a -*- mode tag, | 2551 | To find the right major mode, this function checks for a -*- mode tag |
| 2552 | \(unless `inhibit-first-line-modes-regexps' says not to), | ||
| 2554 | checks for a `mode:' entry in the Local Variables section of the file, | 2553 | checks for a `mode:' entry in the Local Variables section of the file, |
| 2555 | checks if it uses an interpreter listed in `interpreter-mode-alist', | 2554 | checks if it uses an interpreter listed in `interpreter-mode-alist', |
| 2556 | matches the buffer beginning against `magic-mode-alist', | 2555 | matches the buffer beginning against `magic-mode-alist', |
diff --git a/lisp/isearch.el b/lisp/isearch.el index a6cc69be9a6..ce759116860 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -102,7 +102,7 @@ in Isearch mode is always downcased." | |||
| 102 | :group 'isearch) | 102 | :group 'isearch) |
| 103 | 103 | ||
| 104 | (defcustom search-nonincremental-instead t | 104 | (defcustom search-nonincremental-instead t |
| 105 | "If non-nil, do a nonincremental search instead if exiting immediately. | 105 | "If non-nil, do a nonincremental search instead of exiting immediately. |
| 106 | Actually, `isearch-edit-string' is called to let you enter the search | 106 | Actually, `isearch-edit-string' is called to let you enter the search |
| 107 | string, and RET terminates editing and does a nonincremental search." | 107 | string, and RET terminates editing and does a nonincremental search." |
| 108 | :type 'boolean | 108 | :type 'boolean |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 756010160d2..3d9b30bcbb3 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -571,6 +571,10 @@ in the last `cdr'." | |||
| 571 | (defun completion--replace (beg end newtext) | 571 | (defun completion--replace (beg end newtext) |
| 572 | "Replace the buffer text between BEG and END with NEWTEXT. | 572 | "Replace the buffer text between BEG and END with NEWTEXT. |
| 573 | Moves point to the end of the new text." | 573 | Moves point to the end of the new text." |
| 574 | ;; The properties on `newtext' include things like | ||
| 575 | ;; completions-first-difference, which we don't want to include | ||
| 576 | ;; upon insertion. | ||
| 577 | (set-text-properties 0 (length newtext) nil newtext) | ||
| 574 | ;; Maybe this should be in subr.el. | 578 | ;; Maybe this should be in subr.el. |
| 575 | ;; You'd think this is trivial to do, but details matter if you want | 579 | ;; You'd think this is trivial to do, but details matter if you want |
| 576 | ;; to keep markers "at the right place" and be robust in the face of | 580 | ;; to keep markers "at the right place" and be robust in the face of |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index afb7ab4312b..98295c6617a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -460,6 +460,12 @@ usually suffice.") | |||
| 460 | "Regexp which matches `tramp-echo-mark' as it gets echoed by | 460 | "Regexp which matches `tramp-echo-mark' as it gets echoed by |
| 461 | the remote shell.") | 461 | the remote shell.") |
| 462 | 462 | ||
| 463 | (defcustom tramp-local-end-of-line | ||
| 464 | (if (memq system-type '(windows-nt)) "\r\n" "\n") | ||
| 465 | "*String used for end of line in local processes." | ||
| 466 | :group 'tramp | ||
| 467 | :type 'string) | ||
| 468 | |||
| 463 | (defcustom tramp-rsh-end-of-line "\n" | 469 | (defcustom tramp-rsh-end-of-line "\n" |
| 464 | "*String used for end of line in rsh connections. | 470 | "*String used for end of line in rsh connections. |
| 465 | I don't think this ever needs to be changed, so please tell me about it | 471 | I don't think this ever needs to be changed, so please tell me about it |
| @@ -1902,7 +1908,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 1902 | ;; operations shall return at least a default value | 1908 | ;; operations shall return at least a default value |
| 1903 | ;; in order to give the user a chance to correct the | 1909 | ;; in order to give the user a chance to correct the |
| 1904 | ;; file name in the minibuffer. | 1910 | ;; file name in the minibuffer. |
| 1905 | ;; We cannot use 'debug as error handler. In order | 1911 | ;; We cannot use `debug' as error handler. In order |
| 1906 | ;; to get a full backtrace, one could apply | 1912 | ;; to get a full backtrace, one could apply |
| 1907 | ;; (setq debug-on-error t debug-on-signal t) | 1913 | ;; (setq debug-on-error t debug-on-signal t) |
| 1908 | (error | 1914 | (error |
| @@ -3116,7 +3122,7 @@ beginning of local filename are not substituted." | |||
| 3116 | (tramp-message vec 3 "Sending login name `%s'" tramp-current-user) | 3122 | (tramp-message vec 3 "Sending login name `%s'" tramp-current-user) |
| 3117 | (with-current-buffer (tramp-get-connection-buffer vec) | 3123 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3118 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3124 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3119 | (tramp-send-string vec tramp-current-user)) | 3125 | (tramp-send-string vec (concat tramp-current-user tramp-local-end-of-line))) |
| 3120 | 3126 | ||
| 3121 | (defun tramp-action-password (proc vec) | 3127 | (defun tramp-action-password (proc vec) |
| 3122 | "Query the user for a password." | 3128 | "Query the user for a password." |
| @@ -3148,7 +3154,7 @@ See also `tramp-action-yn'." | |||
| 3148 | (throw 'tramp-action 'permission-denied)) | 3154 | (throw 'tramp-action 'permission-denied)) |
| 3149 | (with-current-buffer (tramp-get-connection-buffer vec) | 3155 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3150 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3156 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3151 | (tramp-send-string vec "yes")))) | 3157 | (tramp-send-string vec (concat "yes" tramp-local-end-of-line))))) |
| 3152 | 3158 | ||
| 3153 | (defun tramp-action-yn (proc vec) | 3159 | (defun tramp-action-yn (proc vec) |
| 3154 | "Ask the user for confirmation using `y-or-n-p'. | 3160 | "Ask the user for confirmation using `y-or-n-p'. |
| @@ -3162,7 +3168,7 @@ See also `tramp-action-yesno'." | |||
| 3162 | (throw 'tramp-action 'permission-denied)) | 3168 | (throw 'tramp-action 'permission-denied)) |
| 3163 | (with-current-buffer (tramp-get-connection-buffer vec) | 3169 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3164 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3170 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3165 | (tramp-send-string vec "y")))) | 3171 | (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) |
| 3166 | 3172 | ||
| 3167 | (defun tramp-action-terminal (proc vec) | 3173 | (defun tramp-action-terminal (proc vec) |
| 3168 | "Tell the remote host which terminal type to use. | 3174 | "Tell the remote host which terminal type to use. |
| @@ -3170,7 +3176,7 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3170 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) | 3176 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) |
| 3171 | (with-current-buffer (tramp-get-connection-buffer vec) | 3177 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3172 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3178 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3173 | (tramp-send-string vec tramp-terminal-type)) | 3179 | (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) |
| 3174 | 3180 | ||
| 3175 | (defun tramp-action-process-alive (proc vec) | 3181 | (defun tramp-action-process-alive (proc vec) |
| 3176 | "Check, whether a process has finished." | 3182 | "Check, whether a process has finished." |
diff --git a/lisp/window.el b/lisp/window.el index 8eb0ac3575b..54e5ec9c74c 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -3568,10 +3568,7 @@ specific buffers." | |||
| 3568 | )) | 3568 | )) |
| 3569 | 3569 | ||
| 3570 | ;;; Window states, how to get them and how to put them in a window. | 3570 | ;;; Window states, how to get them and how to put them in a window. |
| 3571 | (defvar window-state-ignored-parameters '(quit-restore) | 3571 | (defun window--state-get-1 (window &optional ignore) |
| 3572 | "List of window parameters ignored by `window-state-get'.") | ||
| 3573 | |||
| 3574 | (defun window--state-get-1 (window &optional markers) | ||
| 3575 | "Helper function for `window-state-get'." | 3572 | "Helper function for `window-state-get'." |
| 3576 | (let* ((type | 3573 | (let* ((type |
| 3577 | (cond | 3574 | (cond |
| @@ -3589,12 +3586,27 @@ specific buffers." | |||
| 3589 | (normal-width . ,(window-normal-size window t)) | 3586 | (normal-width . ,(window-normal-size window t)) |
| 3590 | (combination-limit . ,(window-combination-limit window)) | 3587 | (combination-limit . ,(window-combination-limit window)) |
| 3591 | ,@(let (list) | 3588 | ,@(let (list) |
| 3592 | (dolist (parameter (window-parameters window)) | 3589 | ;; Make copies of persistent window parameters whose cdr |
| 3593 | (unless (memq (car parameter) | 3590 | ;; is either t or, when IGNORE is non-nil, is either nil |
| 3594 | window-state-ignored-parameters) | 3591 | ;; or `state'. |
| 3595 | (setq list (cons parameter list)))) | 3592 | (dolist (pers window-persistent-parameters) |
| 3596 | (unless (window-parameter window 'clone-of) | 3593 | (when (and (consp pers) |
| 3597 | ;; Make a clone-of parameter. | 3594 | (or (eq (cdr pers) t) |
| 3595 | (and (memq (cdr pers) '(state nil)) | ||
| 3596 | (not ignore)))) | ||
| 3597 | (let ((par (assq (car pers) (window-parameters window)))) | ||
| 3598 | (setq list (cons (cons (car pers) (when par (cdr par))) | ||
| 3599 | list))))) | ||
| 3600 | ;; Save `clone-of' parameter unless IGNORE or | ||
| 3601 | ;; `window-persistent-parameters' prevail. | ||
| 3602 | (when (and (not (assq 'clone-of (window-parameters window))) | ||
| 3603 | (let ((clone-of | ||
| 3604 | (assq 'clone-of | ||
| 3605 | window-persistent-parameters))) | ||
| 3606 | (when clone-of | ||
| 3607 | (if ignore | ||
| 3608 | (eq (cdr clone-of) t) | ||
| 3609 | (memq (cdr clone-of) '(state nil)))))) | ||
| 3598 | (setq list (cons (cons 'clone-of window) list))) | 3610 | (setq list (cons (cons 'clone-of window) list))) |
| 3599 | (when list | 3611 | (when list |
| 3600 | `((parameters . ,list)))) | 3612 | `((parameters . ,list)))) |
| @@ -3616,30 +3628,31 @@ specific buffers." | |||
| 3616 | (scroll-bars . ,(window-scroll-bars window)) | 3628 | (scroll-bars . ,(window-scroll-bars window)) |
| 3617 | (vscroll . ,(window-vscroll window)) | 3629 | (vscroll . ,(window-vscroll window)) |
| 3618 | (dedicated . ,(window-dedicated-p window)) | 3630 | (dedicated . ,(window-dedicated-p window)) |
| 3619 | (point . ,(if markers (copy-marker point) point)) | 3631 | (point . ,(if ignore point (copy-marker point))) |
| 3620 | (start . ,(if markers (copy-marker start) start)) | 3632 | (start . ,(if ignore start (copy-marker start))) |
| 3621 | ,@(when mark | 3633 | ,@(when mark |
| 3622 | `((mark . ,(if markers | 3634 | `((mark . ,(if ignore |
| 3623 | (copy-marker mark) mark))))))))))) | 3635 | mark (copy-marker mark)))))))))))) |
| 3624 | (tail | 3636 | (tail |
| 3625 | (when (memq type '(vc hc)) | 3637 | (when (memq type '(vc hc)) |
| 3626 | (let (list) | 3638 | (let (list) |
| 3627 | (setq window (window-child window)) | 3639 | (setq window (window-child window)) |
| 3628 | (while window | 3640 | (while window |
| 3629 | (setq list (cons (window--state-get-1 window markers) list)) | 3641 | (setq list (cons (window--state-get-1 window ignore) list)) |
| 3630 | (setq window (window-right window))) | 3642 | (setq window (window-right window))) |
| 3631 | (nreverse list))))) | 3643 | (nreverse list))))) |
| 3632 | (append head tail))) | 3644 | (append head tail))) |
| 3633 | 3645 | ||
| 3634 | (defun window-state-get (&optional window markers) | 3646 | (defun window-state-get (&optional window ignore) |
| 3635 | "Return state of WINDOW as a Lisp object. | 3647 | "Return state of WINDOW as a Lisp object. |
| 3636 | WINDOW can be any window and defaults to the root window of the | 3648 | WINDOW can be any window and defaults to the root window of the |
| 3637 | selected frame. | 3649 | selected frame. |
| 3638 | 3650 | ||
| 3639 | Optional argument MARKERS non-nil means use markers for sampling | 3651 | Optional argument IGNORE non-nil means do not use markers for |
| 3640 | positions like `window-point' or `window-start'. MARKERS should | 3652 | sampling positions like `window-point' or `window-start' and do |
| 3641 | be non-nil only if the value is used for putting the state back | 3653 | not record parameters unless `window-persistent-parameters' |
| 3642 | in the same session (note that markers slow down processing). | 3654 | requests it. IGNORE should be non-nil when the return value |
| 3655 | shall be written to a file and read back in another session. | ||
| 3643 | 3656 | ||
| 3644 | The return value can be used as argument for `window-state-put' | 3657 | The return value can be used as argument for `window-state-put' |
| 3645 | to put the state recorded here into an arbitrary window. The | 3658 | to put the state recorded here into an arbitrary window. The |
| @@ -3665,7 +3678,7 @@ value can be also stored on disk and read back in a new session." | |||
| 3665 | ;; These are probably not needed. | 3678 | ;; These are probably not needed. |
| 3666 | ,@(when (window-size-fixed-p window) `((fixed-height . t))) | 3679 | ,@(when (window-size-fixed-p window) `((fixed-height . t))) |
| 3667 | ,@(when (window-size-fixed-p window t) `((fixed-width . t)))) | 3680 | ,@(when (window-size-fixed-p window t) `((fixed-width . t)))) |
| 3668 | (window--state-get-1 window markers))) | 3681 | (window--state-get-1 window ignore))) |
| 3669 | 3682 | ||
| 3670 | (defvar window-state-put-list nil | 3683 | (defvar window-state-put-list nil |
| 3671 | "Helper variable for `window-state-put'.") | 3684 | "Helper variable for `window-state-put'.") |
| @@ -3744,10 +3757,15 @@ value can be also stored on disk and read back in a new session." | |||
| 3744 | (state (cdr (assq 'buffer item)))) | 3757 | (state (cdr (assq 'buffer item)))) |
| 3745 | (when combination-limit | 3758 | (when combination-limit |
| 3746 | (set-window-combination-limit window combination-limit)) | 3759 | (set-window-combination-limit window combination-limit)) |
| 3747 | ;; Process parameters. | 3760 | ;; Assign saved window parameters. If a parameter's value is nil, |
| 3761 | ;; don't assign it unless the new window has it set already (which | ||
| 3762 | ;; shouldn't happen unless some `window-configuration-change-hook' | ||
| 3763 | ;; function installed it). | ||
| 3748 | (when parameters | 3764 | (when parameters |
| 3749 | (dolist (parameter parameters) | 3765 | (dolist (parameter parameters) |
| 3750 | (set-window-parameter window (car parameter) (cdr parameter)))) | 3766 | (when (or (cdr parameter) |
| 3767 | (window-parameter window (car parameter))) | ||
| 3768 | (set-window-parameter window (car parameter) (cdr parameter))))) | ||
| 3751 | ;; Process buffer related state. | 3769 | ;; Process buffer related state. |
| 3752 | (when state | 3770 | (when state |
| 3753 | ;; We don't want to raise an error here so we create a buffer if | 3771 | ;; We don't want to raise an error here so we create a buffer if |