diff options
| author | Miles Bader | 2007-07-18 22:15:15 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-07-18 22:15:15 +0000 |
| commit | 4dacf5c59890f619e2285e6afae1061c763d87fa (patch) | |
| tree | eee51e638782332d75082c4f420708c35ffdd451 | |
| parent | 4bb99e3a15f1e7e13103df4908814294dc974463 (diff) | |
| parent | 6e3aa3f58ef253559ce6416d6aa02885cd944ff1 (diff) | |
| download | emacs-4dacf5c59890f619e2285e6afae1061c763d87fa.tar.gz emacs-4dacf5c59890f619e2285e6afae1061c763d87fa.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 814-815)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-232
45 files changed, 869 insertions, 443 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index 3b459fc952b..67f19614763 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-07-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * NEWS: `file-remote-p' has a new optional parameter IDENTIFICATION. | ||
| 4 | |||
| 1 | 2007-07-15 Karl Fogel <kfogel@red-bean.com> | 5 | 2007-07-15 Karl Fogel <kfogel@red-bean.com> |
| 2 | 6 | ||
| 3 | * NEWS: Revert 2007-07-13T23:20:21Z!kfogel@red-bean.com, which | 7 | * NEWS: Revert 2007-07-13T23:20:21Z!kfogel@red-bean.com, which |
| @@ -150,7 +150,7 @@ supported on other platforms, but not on Windows due to using the winsock | |||
| 150 | 150 | ||
| 151 | * Lisp Changes in Emacs 23.1 | 151 | * Lisp Changes in Emacs 23.1 |
| 152 | 152 | ||
| 153 | +++ | 153 | +++ |
| 154 | ** In `condition-case', a handler can specify "let the debugger run first". | 154 | ** In `condition-case', a handler can specify "let the debugger run first". |
| 155 | 155 | ||
| 156 | You do this by writing `debug' in the list of conditions to be handled, | 156 | You do this by writing `debug' in the list of conditions to be handled, |
| @@ -180,9 +180,10 @@ but obeys file handlers. The file handler is chosen based on | |||
| 180 | `default-directory'. | 180 | `default-directory'. |
| 181 | 181 | ||
| 182 | +++ | 182 | +++ |
| 183 | ** `file-remote-p' has a new optional parameter CONNECTED. | 183 | ** `file-remote-p' has new optional parameters IDENTIFICATION and CONNECTED. |
| 184 | With this paramter passed non-nil, it is checked whether a remote | 184 | IDENTIFICATION specifies which part of the remote identifier has to be |
| 185 | connection has been established already. | 185 | returned. With CONNECTED passed non-nil, it is checked whether a |
| 186 | remote connection has been established already. | ||
| 186 | 187 | ||
| 187 | ** The two new functions `looking-at-p' and `string-match-p' can do | 188 | ** The two new functions `looking-at-p' and `string-match-p' can do |
| 188 | the same matching as `looking-at' and `string-match' without changing | 189 | the same matching as `looking-at' and `string-match' without changing |
| @@ -14,6 +14,9 @@ to the FSF. | |||
| 14 | 14 | ||
| 15 | * Small but important fixes needed in existing features: | 15 | * Small but important fixes needed in existing features: |
| 16 | 16 | ||
| 17 | ** "Options -> Save Options" should save the font set via "Set Font/Fontset" | ||
| 18 | I.e. mouse-set-font should use customize-face. | ||
| 19 | |||
| 17 | ** Compute the list of active keymaps *after* reading the first event. | 20 | ** Compute the list of active keymaps *after* reading the first event. |
| 18 | 21 | ||
| 19 | ** Avoid using "iff" in doc strings. | 22 | ** Avoid using "iff" in doc strings. |
diff --git a/leim/ChangeLog b/leim/ChangeLog index f4bfce06bb3..330321725f2 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * makefile.w32-in (extraclean): Don't delete *~. | ||
| 4 | |||
| 1 | 2007-06-02 Chong Yidong <cyd@stupidchicken.com> | 5 | 2007-06-02 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * Version 22.1 released. | 7 | * Version 22.1 released. |
diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 08022d38cf2..6f6508feceb 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in | |||
| @@ -215,5 +215,7 @@ distclean: clean | |||
| 215 | maintainer-clean: distclean | 215 | maintainer-clean: distclean |
| 216 | - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) | 216 | - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) |
| 217 | 217 | ||
| 218 | # We used to delete *~ here, but that might inadvertently remove | ||
| 219 | # precious files if it happens to match their short 8+3 aliases. | ||
| 218 | extraclean: maintainer-clean | 220 | extraclean: maintainer-clean |
| 219 | - $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) | 221 | - $(FOREACH) *.el~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 597d203ba41..693d28e9ac9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2007-07-17 Francesco Potort,Al(B <pot@gnu.org> | ||
| 2 | |||
| 3 | * etags.c (C_entries): Reset the fvdef machine when out of function. | ||
| 4 | (PRINT_UNDOCUMENTED_OPTIONS_HELP): #define as FALSE if undefined. | ||
| 5 | (print_help): Use it in if() rather than #if. | ||
| 6 | (print_help): Conditionally print help about --no-line-directive. | ||
| 7 | |||
| 8 | 2007-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 9 | |||
| 10 | * makefile.w32-in (clean): Don't delete *~. | ||
| 11 | |||
| 1 | 2007-06-07 Glenn Morris <rgm@gnu.org> | 12 | 2007-06-07 Glenn Morris <rgm@gnu.org> |
| 2 | 13 | ||
| 3 | * etags.c (print_version): Add `emacs_copyright' string, for | 14 | * etags.c (print_version): Add `emacs_copyright' string, for |
diff --git a/lib-src/etags.c b/lib-src/etags.c index f3534e02d7c..fded69c50b0 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -80,7 +80,7 @@ University of California, as described above. */ | |||
| 80 | * configuration file containing regexp definitions for etags. | 80 | * configuration file containing regexp definitions for etags. |
| 81 | */ | 81 | */ |
| 82 | 82 | ||
| 83 | char pot_etags_version[] = "@(#) pot revision number is 17.31"; | 83 | char pot_etags_version[] = "@(#) pot revision number is 17.34"; |
| 84 | 84 | ||
| 85 | #define TRUE 1 | 85 | #define TRUE 1 |
| 86 | #define FALSE 0 | 86 | #define FALSE 0 |
| @@ -882,7 +882,7 @@ etags --help --lang=ada."); | |||
| 882 | # define EMACS_NAME "standalone" | 882 | # define EMACS_NAME "standalone" |
| 883 | #endif | 883 | #endif |
| 884 | #ifndef VERSION | 884 | #ifndef VERSION |
| 885 | # define VERSION "17.31" | 885 | # define VERSION "17.34" |
| 886 | #endif | 886 | #endif |
| 887 | static void | 887 | static void |
| 888 | print_version () | 888 | print_version () |
| @@ -897,6 +897,10 @@ print_version () | |||
| 897 | exit (EXIT_SUCCESS); | 897 | exit (EXIT_SUCCESS); |
| 898 | } | 898 | } |
| 899 | 899 | ||
| 900 | #ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP | ||
| 901 | # define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE | ||
| 902 | #endif | ||
| 903 | |||
| 900 | static void | 904 | static void |
| 901 | print_help (argbuffer) | 905 | print_help (argbuffer) |
| 902 | argument *argbuffer; | 906 | argument *argbuffer; |
| @@ -979,6 +983,11 @@ Relative ones are stored relative to the output file's directory.\n"); | |||
| 979 | puts ("--no-globals\n\ | 983 | puts ("--no-globals\n\ |
| 980 | Do not create tag entries for global variables in some\n\ | 984 | Do not create tag entries for global variables in some\n\ |
| 981 | languages. This makes the tags file smaller."); | 985 | languages. This makes the tags file smaller."); |
| 986 | |||
| 987 | if (PRINT_UNDOCUMENTED_OPTIONS_HELP) | ||
| 988 | puts ("--no-line-directive\n\ | ||
| 989 | Ignore #line preprocessor directives in C and derived languages."); | ||
| 990 | |||
| 982 | if (CTAGS) | 991 | if (CTAGS) |
| 983 | puts ("--members\n\ | 992 | puts ("--members\n\ |
| 984 | Create tag entries for members of structures in some languages."); | 993 | Create tag entries for members of structures in some languages."); |
| @@ -999,13 +1008,17 @@ Relative ones are stored relative to the output file's directory.\n"); | |||
| 999 | MODS are optional one-letter modifiers: `i' means to ignore case,\n\ | 1008 | MODS are optional one-letter modifiers: `i' means to ignore case,\n\ |
| 1000 | `m' means to allow multi-line matches, `s' implies `m' and\n\ | 1009 | `m' means to allow multi-line matches, `s' implies `m' and\n\ |
| 1001 | causes dot to match any character, including newline."); | 1010 | causes dot to match any character, including newline."); |
| 1011 | |||
| 1002 | puts ("-R, --no-regex\n\ | 1012 | puts ("-R, --no-regex\n\ |
| 1003 | Don't create tags from regexps for the following files."); | 1013 | Don't create tags from regexps for the following files."); |
| 1014 | |||
| 1004 | puts ("-I, --ignore-indentation\n\ | 1015 | puts ("-I, --ignore-indentation\n\ |
| 1005 | In C and C++ do not assume that a closing brace in the first\n\ | 1016 | In C and C++ do not assume that a closing brace in the first\n\ |
| 1006 | column is the final brace of a function or structure definition."); | 1017 | column is the final brace of a function or structure definition."); |
| 1018 | |||
| 1007 | puts ("-o FILE, --output=FILE\n\ | 1019 | puts ("-o FILE, --output=FILE\n\ |
| 1008 | Write the tags to FILE."); | 1020 | Write the tags to FILE."); |
| 1021 | |||
| 1009 | puts ("--parse-stdin=NAME\n\ | 1022 | puts ("--parse-stdin=NAME\n\ |
| 1010 | Read from standard input and record tags as belonging to file NAME."); | 1023 | Read from standard input and record tags as belonging to file NAME."); |
| 1011 | 1024 | ||
| @@ -1033,13 +1046,16 @@ Relative ones are stored relative to the output file's directory.\n"); | |||
| 1033 | Print on the standard output an index of items intended for\n\ | 1046 | Print on the standard output an index of items intended for\n\ |
| 1034 | human consumption, similar to the output of vgrind. The index\n\ | 1047 | human consumption, similar to the output of vgrind. The index\n\ |
| 1035 | is sorted, and gives the page number of each item."); | 1048 | is sorted, and gives the page number of each item."); |
| 1036 | # if PRINT_UNDOCUMENTED_OPTIONS_HELP | 1049 | |
| 1037 | puts ("-w, --no-duplicates\n\ | 1050 | if (PRINT_UNDOCUMENTED_OPTIONS_HELP) |
| 1051 | puts ("-w, --no-duplicates\n\ | ||
| 1038 | Do not create duplicate tag entries, for compatibility with\n\ | 1052 | Do not create duplicate tag entries, for compatibility with\n\ |
| 1039 | traditional ctags."); | 1053 | traditional ctags."); |
| 1040 | puts ("-w, --no-warn\n\ | 1054 | |
| 1055 | if (PRINT_UNDOCUMENTED_OPTIONS_HELP) | ||
| 1056 | puts ("-w, --no-warn\n\ | ||
| 1041 | Suppress warning messages about duplicate tag entries."); | 1057 | Suppress warning messages about duplicate tag entries."); |
| 1042 | # endif /* PRINT_UNDOCUMENTED_OPTIONS_HELP */ | 1058 | |
| 1043 | puts ("-x, --cxref\n\ | 1059 | puts ("-x, --cxref\n\ |
| 1044 | Like --vgrind, but in the style of cxref, rather than vgrind.\n\ | 1060 | Like --vgrind, but in the style of cxref, rather than vgrind.\n\ |
| 1045 | The output uses line numbers instead of page numbers, but\n\ | 1061 | The output uses line numbers instead of page numbers, but\n\ |
| @@ -3982,10 +3998,16 @@ C_entries (c_ext, inf) | |||
| 3982 | bracelev = 0; /* reset brace level if first column */ | 3998 | bracelev = 0; /* reset brace level if first column */ |
| 3983 | parlev = 0; /* also reset paren level, just in case... */ | 3999 | parlev = 0; /* also reset paren level, just in case... */ |
| 3984 | } | 4000 | } |
| 3985 | else if (bracelev > 0) | ||
| 3986 | bracelev--; | ||
| 3987 | else | 4001 | else |
| 3988 | token.valid = FALSE; /* something gone amiss, token unreliable */ | 4002 | { |
| 4003 | if (--bracelev < 0) | ||
| 4004 | { | ||
| 4005 | bracelev = 0; | ||
| 4006 | token.valid = FALSE; /* something gone amiss, token unreliable */ | ||
| 4007 | } | ||
| 4008 | if (bracelev == 0 && fvdef == vignore) | ||
| 4009 | fvdef = fvnone; /* end of function */ | ||
| 4010 | } | ||
| 3989 | popclass_above (bracelev); | 4011 | popclass_above (bracelev); |
| 3990 | structdef = snone; | 4012 | structdef = snone; |
| 3991 | /* Only if typdef == tinbody is typdefbracelev significant. */ | 4013 | /* Only if typdef == tinbody is typdefbracelev significant. */ |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index c0f8b8c99de..46266d198b3 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -314,8 +314,10 @@ install: $(INSTALL_FILES) | |||
| 314 | # | 314 | # |
| 315 | # Maintenance | 315 | # Maintenance |
| 316 | # | 316 | # |
| 317 | # We used to delete *~ here, but that might inadvertently remove | ||
| 318 | # precious files if it happens to match their short 8+3 aliases. | ||
| 317 | clean: | 319 | clean: |
| 318 | - $(DEL) *~ DOC* $(COMPILER_TEMP_FILES) | 320 | - $(DEL) DOC* $(COMPILER_TEMP_FILES) |
| 319 | - $(DEL) ctags.c | 321 | - $(DEL) ctags.c |
| 320 | - $(DEL) getopt.h | 322 | - $(DEL) getopt.h |
| 321 | - $(DEL_TREE) $(OBJDIR) | 323 | - $(DEL_TREE) $(OBJDIR) |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a568afe055..be77e72e924 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,120 @@ | |||
| 1 | 2007-07-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * files.el (file-remote-p): Introduce optional parameter | ||
| 4 | IDENTIFICATION. | ||
| 5 | |||
| 6 | * recentf.el (recentf-keep-default-predicate): Adapt call of | ||
| 7 | `file-remote-p'. | ||
| 8 | |||
| 9 | * progmodes/grep.el (grep-probe): Use `process-file'. | ||
| 10 | (grep-compute-defaults): Handle variables host specific. | ||
| 11 | |||
| 12 | * net/ange-ftp.el: (ange-ftp-file-remote-p): Handle optional | ||
| 13 | parameter IDENTIFICATION. | ||
| 14 | |||
| 15 | * net/tramp.el (tramp-handle-file-remote-p): Handle optional | ||
| 16 | parameter IDENTIFICATION. | ||
| 17 | (tramp-handle-set-file-times): New defun. Replaces `tramp-touch'. | ||
| 18 | (tramp-file-name-handler-alist, tramp-file-name-for-operation): | ||
| 19 | Add entry for `set-file-times'. | ||
| 20 | (tramp-do-copy-or-rename-file-via-buffer) | ||
| 21 | (tramp-do-copy-or-rename-file-out-of-band): Use `set-file-times'. | ||
| 22 | (tramp-handle-unhandled-file-name-directory): Rewrite. | ||
| 23 | (tramp-convert-file-attributes): Add error handling when inode is | ||
| 24 | extraordinary big. | ||
| 25 | (tramp-get-inode): Change parameter from FILE to VEC. | ||
| 26 | (tramp-handle-start-file-process ): Use (current-buffer) if BUFFER | ||
| 27 | is NIL. This is according to the specification. Goto (point-max) | ||
| 28 | when ready. | ||
| 29 | (tramp-handle-shell-command): Rewrite completely, using | ||
| 30 | `process-file' and `start-file-process'. | ||
| 31 | (tramp-methods, tramp-find-shell) | ||
| 32 | (tramp-open-connection-setup-interactive-shell) | ||
| 33 | (tramp-maybe-open-connection): Guard against $PROMPT_COMMAND shell | ||
| 34 | var. Reported by Steve Youngs <steve@sxemacs.org>. | ||
| 35 | |||
| 36 | * net/tramp-fish.el (tramp-fish-file-name-handler-alist): Add | ||
| 37 | entry for `set-file-times'. Rename `start-process' into | ||
| 38 | `start-file-process'. Remove `call-process' entry. | ||
| 39 | (tramp-fish-handle-set-file-times): New defun. | ||
| 40 | (tramp-fish-handle-executable-find): Use `process-file'. | ||
| 41 | (tramp-fish-handle-process-file): New defun. Replaces | ||
| 42 | `tramp-fish-handle-call-process'. | ||
| 43 | (tramp-fish-do-copy-or-rename-file-directly): Use | ||
| 44 | `set-file-times'. | ||
| 45 | (tramp-fish-get-file-entries): Change `tramp-get-inode' parameter. | ||
| 46 | |||
| 47 | * net/tramp-smb.el (tramp-smb-handle-file-attributes): Change | ||
| 48 | `tramp-get-inode' parameter. | ||
| 49 | |||
| 50 | 2007-07-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 51 | |||
| 52 | * vc-bzr.el (vc-bzr-version, vc-bzr-at-least-version) | ||
| 53 | (vc-bzr-post-command-function): Remove. Version 0.8 is already old | ||
| 54 | nowadays, and by the time Emacs-23 comes out, nobody will even remember | ||
| 55 | it has ever existed. | ||
| 56 | |||
| 57 | 2007-07-17 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 58 | |||
| 59 | * vc.el: Undo previous change. | ||
| 60 | |||
| 61 | 2007-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 62 | |||
| 63 | * makefile.w32-in (clean): Don't delete *~. | ||
| 64 | |||
| 65 | 2007-07-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 66 | |||
| 67 | * textmodes/tex-mode.el (tex-verbatim-environments): | ||
| 68 | Add safe-local-variable property. | ||
| 69 | (tex-font-lock-syntactic-keywords): Lookup tex-verbatim-environments | ||
| 70 | when starting font-lock rather than when loading tex-mode.el. | ||
| 71 | |||
| 72 | * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Skip over the | ||
| 73 | whole $( rather than just the $. Rename from sh-quoted-subshell. | ||
| 74 | (sh-font-lock-syntactic-keywords): Adjust call accordingly. | ||
| 75 | |||
| 76 | 2007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org> | ||
| 77 | |||
| 78 | * bookmark.el (bookmark-maybe-sort-alist): Don't modify | ||
| 79 | bookmark-alist. Instead, if not sorting, simply return it. | ||
| 80 | (bookmark-bmenu-list): Call bookmark-maybe-sort-alist | ||
| 81 | for its return value, not for its side effect. | ||
| 82 | |||
| 83 | * emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the | ||
| 84 | case of alignment under a constant symbol, find and consider | ||
| 85 | the sexp actually at indentation to be the "last sexp". | ||
| 86 | |||
| 87 | 2007-07-16 Drew Adams <drew.adams@oracle.com> | ||
| 88 | |||
| 89 | * mouse.el (mouse-yank-secondary): Better error message if no | ||
| 90 | secondary selection. | ||
| 91 | |||
| 92 | 2007-07-16 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 93 | |||
| 94 | * vc-hooks.el (vc-handled-backends): Move BZR later in the list. | ||
| 95 | |||
| 96 | * term/xterm.el (xterm-turn-on-modify-other-keys) | ||
| 97 | (xterm-turn-off-modify-other-keys): New functions. | ||
| 98 | (terminal-init-xterm): Enable the modifyOtherKeys feature if the | ||
| 99 | terminal supports it. | ||
| 100 | |||
| 101 | 2007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org> | ||
| 102 | |||
| 103 | * bookmark.el (bookmark-show-all-annotations): | ||
| 104 | Make sure each inserted annotation ends with newline. | ||
| 105 | |||
| 106 | 2007-07-15 Juri Linkov <juri@jurta.org> | ||
| 107 | |||
| 108 | * delsel.el (delete-selection-pre-hook): | ||
| 109 | * emulation/cua-base.el (cua-paste): Before a yank command, | ||
| 110 | check also whether last-command is one of mouse-save-then-kill, | ||
| 111 | mouse-secondary-save-then-kill, mouse-set-region, mouse-drag-region. | ||
| 112 | |||
| 113 | 2007-07-15 Michael Albinus <michael.albinus@gmx.de> | ||
| 114 | |||
| 115 | * recentf.el (recentf-keep-default-predicate): New defun. | ||
| 116 | (recentf-keep): Use it as initial value. | ||
| 117 | |||
| 1 | 2007-07-15 Karl Fogel <kfogel@red-bean.com> | 118 | 2007-07-15 Karl Fogel <kfogel@red-bean.com> |
| 2 | 119 | ||
| 3 | * bookmark.el: Revert 2007-07-13T18:16:17Z!kfogel@red-bean.com, | 120 | * bookmark.el: Revert 2007-07-13T18:16:17Z!kfogel@red-bean.com, |
| @@ -6,8 +123,7 @@ | |||
| 6 | 123 | ||
| 7 | 2007-07-15 Jeff Miller <jmiller@cablespeed.com> (tiny change) | 124 | 2007-07-15 Jeff Miller <jmiller@cablespeed.com> (tiny change) |
| 8 | 125 | ||
| 9 | * calendar/cal-bahai.el (calendar-goto-bahai-date): Add autoload | 126 | * calendar/calendar.el (calendar-goto-bahai-date): Autoload it. |
| 10 | cookie. | ||
| 11 | 127 | ||
| 12 | 2007-07-15 Jason Rumney <jasonr@gnu.org> | 128 | 2007-07-15 Jason Rumney <jasonr@gnu.org> |
| 13 | 129 | ||
| @@ -36,7 +152,7 @@ | |||
| 36 | * replace.el (match): Use yellow1 instead of yellow. | 152 | * replace.el (match): Use yellow1 instead of yellow. |
| 37 | 153 | ||
| 38 | * progmodes/gdb-ui.el (breakpoint-enabled): Use red1 instead of | 154 | * progmodes/gdb-ui.el (breakpoint-enabled): Use red1 instead of |
| 39 | red. | 155 | red. |
| 40 | 156 | ||
| 41 | * pcvs-info.el (cvs-unknown): Likewise. | 157 | * pcvs-info.el (cvs-unknown): Likewise. |
| 42 | 158 | ||
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 75c4826ae0b..f8440731419 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -1045,10 +1045,10 @@ For example, if this is a Info buffer, return the Info file's name." | |||
| 1045 | ;;Return the bookmark-alist for display. If the bookmark-sort-flag | 1045 | ;;Return the bookmark-alist for display. If the bookmark-sort-flag |
| 1046 | ;;is non-nil, then return a sorted copy of the alist. | 1046 | ;;is non-nil, then return a sorted copy of the alist. |
| 1047 | (if bookmark-sort-flag | 1047 | (if bookmark-sort-flag |
| 1048 | (setq bookmark-alist | 1048 | (sort (copy-alist bookmark-alist) |
| 1049 | (sort (copy-alist bookmark-alist) | 1049 | (function |
| 1050 | (function | 1050 | (lambda (x y) (string-lessp (car x) (car y))))) |
| 1051 | (lambda (x y) (string-lessp (car x) (car y)))))))) | 1051 | bookmark-alist)) |
| 1052 | 1052 | ||
| 1053 | 1053 | ||
| 1054 | (defvar bookmark-after-jump-hook nil | 1054 | (defvar bookmark-after-jump-hook nil |
| @@ -1590,7 +1590,6 @@ deletion, or > if it is flagged for displaying." | |||
| 1590 | (insert "% Bookmark\n- --------\n") | 1590 | (insert "% Bookmark\n- --------\n") |
| 1591 | (add-text-properties (point-min) (point) | 1591 | (add-text-properties (point-min) (point) |
| 1592 | '(font-lock-face bookmark-menu-heading)) | 1592 | '(font-lock-face bookmark-menu-heading)) |
| 1593 | (bookmark-maybe-sort-alist) | ||
| 1594 | (mapcar | 1593 | (mapcar |
| 1595 | (lambda (full-record) | 1594 | (lambda (full-record) |
| 1596 | ;; if a bookmark has an annotation, prepend a "*" | 1595 | ;; if a bookmark has an annotation, prepend a "*" |
| @@ -1613,7 +1612,7 @@ deletion, or > if it is flagged for displaying." | |||
| 1613 | help-echo "mouse-2: go to this bookmark in other window"))) | 1612 | help-echo "mouse-2: go to this bookmark in other window"))) |
| 1614 | (insert "\n") | 1613 | (insert "\n") |
| 1615 | ))) | 1614 | ))) |
| 1616 | bookmark-alist)) | 1615 | (bookmark-maybe-sort-alist))) |
| 1617 | (goto-char (point-min)) | 1616 | (goto-char (point-min)) |
| 1618 | (forward-line 2) | 1617 | (forward-line 2) |
| 1619 | (bookmark-bmenu-mode) | 1618 | (bookmark-bmenu-mode) |
| @@ -1816,7 +1815,8 @@ if an annotation exists." | |||
| 1816 | (if (and ann (not (string-equal ann ""))) | 1815 | (if (and ann (not (string-equal ann ""))) |
| 1817 | ;; insert the annotation, indented by 4 spaces. | 1816 | ;; insert the annotation, indented by 4 spaces. |
| 1818 | (progn | 1817 | (progn |
| 1819 | (save-excursion (insert ann)) | 1818 | (save-excursion (insert ann) (unless (bolp) |
| 1819 | (insert "\n"))) | ||
| 1820 | (while (< (point) (point-max)) | 1820 | (while (< (point) (point-max)) |
| 1821 | (beginning-of-line) ; paranoia | 1821 | (beginning-of-line) ; paranoia |
| 1822 | (insert " ") | 1822 | (insert " ") |
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 7bf90ec5d11..06703e3b73b 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el | |||
| @@ -149,7 +149,6 @@ Defaults to today's date if DATE is not given." | |||
| 149 | (message "Baha'i date: %s" | 149 | (message "Baha'i date: %s" |
| 150 | (calendar-bahai-date-string (calendar-cursor-to-date t)))) | 150 | (calendar-bahai-date-string (calendar-cursor-to-date t)))) |
| 151 | 151 | ||
| 152 | ;;;###autoload | ||
| 153 | (defun calendar-goto-bahai-date (date &optional noecho) | 152 | (defun calendar-goto-bahai-date (date &optional noecho) |
| 154 | "Move cursor to Baha'i date DATE. | 153 | "Move cursor to Baha'i date DATE. |
| 155 | Echo Baha'i date unless NOECHO is t." | 154 | Echo Baha'i date unless NOECHO is t." |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 03f9a95fe37..83ec95c844c 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1821,6 +1821,11 @@ Driven by the variable `calendar-date-display-form'.") | |||
| 1821 | (autoload 'calendar-islamic-date-string "cal-islam" | 1821 | (autoload 'calendar-islamic-date-string "cal-islam" |
| 1822 | "String of Islamic date of Gregorian date.") | 1822 | "String of Islamic date of Gregorian date.") |
| 1823 | 1823 | ||
| 1824 | (autoload 'calendar-goto-bahai-date "cal-bahai" | ||
| 1825 | "Move cursor to Baha'i date DATE. | ||
| 1826 | Echo Baha'i date unless NOECHO is t." | ||
| 1827 | t) | ||
| 1828 | |||
| 1824 | (autoload 'calendar-print-bahai-date "cal-bahai" | 1829 | (autoload 'calendar-print-bahai-date "cal-bahai" |
| 1825 | "Show the Baha'i date equivalents of date." | 1830 | "Show the Baha'i date equivalents of date." |
| 1826 | t) | 1831 | t) |
diff --git a/lisp/delsel.el b/lisp/delsel.el index 7028bad9ad4..09b30d3e874 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el | |||
| @@ -87,12 +87,16 @@ any selection." | |||
| 87 | (cond ((eq type 'kill) | 87 | (cond ((eq type 'kill) |
| 88 | (delete-active-region t)) | 88 | (delete-active-region t)) |
| 89 | ((eq type 'yank) | 89 | ((eq type 'yank) |
| 90 | ;; Before a yank command, | 90 | ;; Before a yank command, make sure we don't yank the |
| 91 | ;; make sure we don't yank the same region | 91 | ;; head of the kill-ring that really comes from the |
| 92 | ;; that we are going to delete. | 92 | ;; currently active region we are going to delete |
| 93 | ;; That would make yank a no-op. | 93 | ;; (when last-command is one that uses copy-region-as-kill |
| 94 | (when (string= (buffer-substring-no-properties (point) (mark)) | 94 | ;; or kill-new). That would make yank a no-op. |
| 95 | (car kill-ring)) | 95 | (when (and (string= (buffer-substring-no-properties (point) (mark)) |
| 96 | (car kill-ring)) | ||
| 97 | (memq last-command | ||
| 98 | '(mouse-set-region mouse-drag-region | ||
| 99 | mouse-save-then-kill mouse-secondary-save-then-kill))) | ||
| 96 | (current-kill 1)) | 100 | (current-kill 1)) |
| 97 | (delete-active-region)) | 101 | (delete-active-region)) |
| 98 | ((eq type 'supersede) | 102 | ((eq type 'supersede) |
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 1589e19cbb2..12514b43534 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el | |||
| @@ -283,7 +283,7 @@ Not documented | |||
| 283 | ;;;;;; do* do loop return-from return block etypecase typecase ecase | 283 | ;;;;;; do* do loop return-from return block etypecase typecase ecase |
| 284 | ;;;;;; case load-time-value eval-when destructuring-bind function* | 284 | ;;;;;; case load-time-value eval-when destructuring-bind function* |
| 285 | ;;;;;; defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" | 285 | ;;;;;; defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" |
| 286 | ;;;;;; "cl-macs.el" "7ccc827d272482ca276937ca18a7895a") | 286 | ;;;;;; "cl-macs.el" "6990af555f962480552cf0867f3d5bab") |
| 287 | ;;; Generated autoloads from cl-macs.el | 287 | ;;; Generated autoloads from cl-macs.el |
| 288 | 288 | ||
| 289 | (autoload (quote cl-compile-time-init) "cl-macs" "\ | 289 | (autoload (quote cl-compile-time-init) "cl-macs" "\ |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 374d3ae2327..3160af5d80d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -932,6 +932,16 @@ is the buffer position of the start of the containing expression." | |||
| 932 | (goto-char indent-point) | 932 | (goto-char indent-point) |
| 933 | (skip-chars-forward " \t") | 933 | (skip-chars-forward " \t") |
| 934 | (looking-at ":")) | 934 | (looking-at ":")) |
| 935 | ;; The last sexp may not be at the indentation | ||
| 936 | ;; where it begins, so find that one, instead. | ||
| 937 | (save-excursion | ||
| 938 | (goto-char calculate-lisp-indent-last-sexp) | ||
| 939 | (while (and (not (looking-back "^[ \t]*")) | ||
| 940 | (or (not containing-sexp) | ||
| 941 | (< (1+ containing-sexp) (point)))) | ||
| 942 | (forward-sexp -1) | ||
| 943 | (backward-prefix-chars)) | ||
| 944 | (setq calculate-lisp-indent-last-sexp (point))) | ||
| 935 | (> calculate-lisp-indent-last-sexp | 945 | (> calculate-lisp-indent-last-sexp |
| 936 | (save-excursion | 946 | (save-excursion |
| 937 | (goto-char (1+ containing-sexp)) | 947 | (goto-char (1+ containing-sexp)) |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 653597fb83b..b9cbf0118b4 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -898,9 +898,6 @@ If global mark is active, copy from register or one character." | |||
| 898 | (t | 898 | (t |
| 899 | ;; Must save register here, since delete may override reg 0. | 899 | ;; Must save register here, since delete may override reg 0. |
| 900 | (if mark-active | 900 | (if mark-active |
| 901 | ;; Before a yank command, make sure we don't yank | ||
| 902 | ;; the same region that we are going to delete. | ||
| 903 | ;; That would make yank a no-op. | ||
| 904 | (if cua--rectangle | 901 | (if cua--rectangle |
| 905 | (progn | 902 | (progn |
| 906 | (goto-char (min (mark) (point))) | 903 | (goto-char (min (mark) (point))) |
| @@ -908,8 +905,16 @@ If global mark is active, copy from register or one character." | |||
| 908 | (setq paste-lines (cua--delete-rectangle)) | 905 | (setq paste-lines (cua--delete-rectangle)) |
| 909 | (if (= paste-lines 1) | 906 | (if (= paste-lines 1) |
| 910 | (setq paste-lines nil))) ;; paste all | 907 | (setq paste-lines nil))) ;; paste all |
| 911 | (if (string= (filter-buffer-substring (point) (mark)) | 908 | ;; Before a yank command, make sure we don't yank the |
| 912 | (car kill-ring)) | 909 | ;; head of the kill-ring that really comes from the |
| 910 | ;; currently active region we are going to delete | ||
| 911 | ;; (when last-command is one that uses copy-region-as-kill | ||
| 912 | ;; or kill-new). That would make yank a no-op. | ||
| 913 | (if (and (string= (filter-buffer-substring (point) (mark)) | ||
| 914 | (car kill-ring)) | ||
| 915 | (memq last-command | ||
| 916 | '(mouse-set-region mouse-drag-region | ||
| 917 | mouse-save-then-kill mouse-secondary-save-then-kill))) | ||
| 913 | (current-kill 1)) | 918 | (current-kill 1)) |
| 914 | (cua-delete-region))) | 919 | (cua-delete-region))) |
| 915 | (cond | 920 | (cond |
diff --git a/lisp/files.el b/lisp/files.el index 849d09b4215..ed76e16b183 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -727,7 +727,7 @@ This is an interface to the function `load'." | |||
| 727 | (cons load-path (get-load-suffixes))))) | 727 | (cons load-path (get-load-suffixes))))) |
| 728 | (load library)) | 728 | (load library)) |
| 729 | 729 | ||
| 730 | (defun file-remote-p (file &optional connected) | 730 | (defun file-remote-p (file &optional identification connected) |
| 731 | "Test whether FILE specifies a location on a remote system. | 731 | "Test whether FILE specifies a location on a remote system. |
| 732 | Return an identification of the system if the location is indeed | 732 | Return an identification of the system if the location is indeed |
| 733 | remote. The identification of the system may comprise a method | 733 | remote. The identification of the system may comprise a method |
| @@ -736,6 +736,11 @@ to access the system and its hostname, amongst other things. | |||
| 736 | For example, the filename \"/user@host:/foo\" specifies a location | 736 | For example, the filename \"/user@host:/foo\" specifies a location |
| 737 | on the system \"/user@host:\". | 737 | on the system \"/user@host:\". |
| 738 | 738 | ||
| 739 | IDENTIFICATION specifies which part of the identification shall | ||
| 740 | be returned as string. IDENTIFICATION can be the symbol | ||
| 741 | `method', `user' or `host'; any other value is handled like nil | ||
| 742 | and means to return the complete identification string. | ||
| 743 | |||
| 739 | If CONNECTED is non-nil, the function returns an identification only | 744 | If CONNECTED is non-nil, the function returns an identification only |
| 740 | if FILE is located on a remote system, and a connection is established | 745 | if FILE is located on a remote system, and a connection is established |
| 741 | to that remote system. | 746 | to that remote system. |
| @@ -743,7 +748,7 @@ to that remote system. | |||
| 743 | `file-remote-p' will never open a connection on its own." | 748 | `file-remote-p' will never open a connection on its own." |
| 744 | (let ((handler (find-file-name-handler file 'file-remote-p))) | 749 | (let ((handler (find-file-name-handler file 'file-remote-p))) |
| 745 | (if handler | 750 | (if handler |
| 746 | (funcall handler 'file-remote-p file connected) | 751 | (funcall handler 'file-remote-p file identification connected) |
| 747 | nil))) | 752 | nil))) |
| 748 | 753 | ||
| 749 | (defun file-local-copy (file) | 754 | (defun file-local-copy (file) |
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index c12b7e52cf7..2833c6b8319 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in | |||
| @@ -444,5 +444,7 @@ install-lisp-CMD: | |||
| 444 | # | 444 | # |
| 445 | # Maintenance | 445 | # Maintenance |
| 446 | # | 446 | # |
| 447 | # We used to delete *~ here, but that might inadvertently remove | ||
| 448 | # precious files if it happens to match their short 8+3 aliases. | ||
| 447 | clean: | 449 | clean: |
| 448 | - $(DEL) *~ | 450 | - $(DEL) *.el~ |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 5577b94d01a..ef46723b54d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1631,7 +1631,10 @@ regardless of where you click." | |||
| 1631 | ;; Give temporary modes such as isearch a chance to turn off. | 1631 | ;; Give temporary modes such as isearch a chance to turn off. |
| 1632 | (run-hooks 'mouse-leave-buffer-hook) | 1632 | (run-hooks 'mouse-leave-buffer-hook) |
| 1633 | (or mouse-yank-at-point (mouse-set-point click)) | 1633 | (or mouse-yank-at-point (mouse-set-point click)) |
| 1634 | (insert (x-get-selection 'SECONDARY))) | 1634 | (let ((secondary (x-get-selection 'SECONDARY))) |
| 1635 | (if secondary | ||
| 1636 | (insert (x-get-selection 'SECONDARY)) | ||
| 1637 | (error "No secondary selection")))) | ||
| 1635 | 1638 | ||
| 1636 | (defun mouse-kill-secondary () | 1639 | (defun mouse-kill-secondary () |
| 1637 | "Kill the text in the secondary selection. | 1640 | "Kill the text in the secondary selection. |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 3fa75102b32..24a30603bb9 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -4132,15 +4132,19 @@ directory, so that Emacs will know its current contents." | |||
| 4132 | (format "Getting %s" fn1)) | 4132 | (format "Getting %s" fn1)) |
| 4133 | tmp1)))) | 4133 | tmp1)))) |
| 4134 | 4134 | ||
| 4135 | (defun ange-ftp-file-remote-p (file &optional connected) | 4135 | (defun ange-ftp-file-remote-p (file &optional identification connected) |
| 4136 | (and (or (not connected) | 4136 | (let* ((parsed (ange-ftp-ftp-name file)) |
| 4137 | (let* ((parsed (ange-ftp-ftp-name file)) | 4137 | (host (nth 0 parsed)) |
| 4138 | (host (nth 0 parsed)) | 4138 | (user (nth 1 parsed))) |
| 4139 | (user (nth 1 parsed)) | 4139 | (and (or (not connected) |
| 4140 | (proc (get-process (ange-ftp-ftp-process-buffer host user)))) | 4140 | (let ((proc (get-process (ange-ftp-ftp-process-buffer host user)))) |
| 4141 | (and proc (processp proc) | 4141 | (and proc (processp proc) |
| 4142 | (memq (process-status proc) '(run open))))) | 4142 | (memq (process-status proc) '(run open))))) |
| 4143 | (ange-ftp-replace-name-component file ""))) | 4143 | (cond |
| 4144 | ((eq identification 'method) (and parsed "ftp")) | ||
| 4145 | ((eq identification 'user) user) | ||
| 4146 | ((eq identification 'host) host) | ||
| 4147 | (t (ange-ftp-replace-name-component file "")))))) | ||
| 4144 | 4148 | ||
| 4145 | (defun ange-ftp-load (file &optional noerror nomessage nosuffix) | 4149 | (defun ange-ftp-load (file &optional noerror nomessage nosuffix) |
| 4146 | (if (ange-ftp-ftp-name file) | 4150 | (if (ange-ftp-ftp-name file) |
diff --git a/lisp/net/tramp-fish.el b/lisp/net/tramp-fish.el index e370c54f902..8c650b550e9 100644 --- a/lisp/net/tramp-fish.el +++ b/lisp/net/tramp-fish.el | |||
| @@ -263,6 +263,7 @@ Used instead of analyzing error codes of commands.") | |||
| 263 | (make-symbolic-link . tramp-fish-handle-make-symbolic-link) | 263 | (make-symbolic-link . tramp-fish-handle-make-symbolic-link) |
| 264 | (rename-file . tramp-fish-handle-rename-file) | 264 | (rename-file . tramp-fish-handle-rename-file) |
| 265 | (set-file-modes . tramp-fish-handle-set-file-modes) | 265 | (set-file-modes . tramp-fish-handle-set-file-modes) |
| 266 | (set-file-times . tramp-fish-handle-set-file-times) | ||
| 266 | (set-visited-file-modtime . ignore) | 267 | (set-visited-file-modtime . ignore) |
| 267 | (shell-command . tramp-handle-shell-command) | 268 | (shell-command . tramp-handle-shell-command) |
| 268 | (substitute-in-file-name . tramp-handle-substitute-in-file-name) | 269 | (substitute-in-file-name . tramp-handle-substitute-in-file-name) |
| @@ -271,9 +272,8 @@ Used instead of analyzing error codes of commands.") | |||
| 271 | (verify-visited-file-modtime . ignore) | 272 | (verify-visited-file-modtime . ignore) |
| 272 | (write-region . tramp-fish-handle-write-region) | 273 | (write-region . tramp-fish-handle-write-region) |
| 273 | (executable-find . tramp-fish-handle-executable-find) | 274 | (executable-find . tramp-fish-handle-executable-find) |
| 274 | (start-process . ignore) | 275 | (start-file-process . ignore) |
| 275 | (call-process . tramp-fish-handle-call-process) | 276 | (process-file . tramp-fish-handle-process-file) |
| 276 | (process-file . tramp-handle-process-file) | ||
| 277 | ) | 277 | ) |
| 278 | "Alist of handler functions for Tramp FISH method. | 278 | "Alist of handler functions for Tramp FISH method. |
| 279 | Operations not mentioned here will be handled by the default Emacs primitives.") | 279 | Operations not mentioned here will be handled by the default Emacs primitives.") |
| @@ -698,6 +698,15 @@ target of the symlink differ." | |||
| 698 | (tramp-error | 698 | (tramp-error |
| 699 | v 'file-error "Error while changing file's mode %s" filename)))) | 699 | v 'file-error "Error while changing file's mode %s" filename)))) |
| 700 | 700 | ||
| 701 | (defun tramp-fish-handle-set-file-times (filename &optional time) | ||
| 702 | "Like `set-file-times' for Tramp files." | ||
| 703 | (with-parsed-tramp-file-name filename nil | ||
| 704 | (let ((time (if (or (null time) (equal time '(0 0))) (current-time) time))) | ||
| 705 | (zerop (process-file | ||
| 706 | "touch" nil nil nil "-t" | ||
| 707 | (format-time-string "%Y%m%d%H%M.%S" time) | ||
| 708 | (tramp-shell-quote-argument localname)))))) | ||
| 709 | |||
| 701 | (defun tramp-fish-handle-write-region | 710 | (defun tramp-fish-handle-write-region |
| 702 | (start end filename &optional append visit lockname confirm) | 711 | (start end filename &optional append visit lockname confirm) |
| 703 | "Like `write-region' for Tramp files." | 712 | "Like `write-region' for Tramp files." |
| @@ -731,14 +740,14 @@ target of the symlink differ." | |||
| 731 | (defun tramp-fish-handle-executable-find (command) | 740 | (defun tramp-fish-handle-executable-find (command) |
| 732 | "Like `executable-find' for Tramp files." | 741 | "Like `executable-find' for Tramp files." |
| 733 | (with-temp-buffer | 742 | (with-temp-buffer |
| 734 | (if (zerop (call-process "which" nil t nil command)) | 743 | (if (zerop (process-file "which" nil t nil command)) |
| 735 | (progn | 744 | (progn |
| 736 | (goto-char (point-min)) | 745 | (goto-char (point-min)) |
| 737 | (buffer-substring (point-min) (tramp-line-end-position)))))) | 746 | (buffer-substring (point-min) (tramp-line-end-position)))))) |
| 738 | 747 | ||
| 739 | (defun tramp-fish-handle-call-process | 748 | (defun tramp-fish-handle-process-file |
| 740 | (program &optional infile destination display &rest args) | 749 | (program &optional infile destination display &rest args) |
| 741 | "Like `call-process' for Tramp files." | 750 | "Like `process-file' for Tramp files." |
| 742 | ;; The implementation is not complete yet. | 751 | ;; The implementation is not complete yet. |
| 743 | (when (and (numberp destination) (zerop destination)) | 752 | (when (and (numberp destination) (zerop destination)) |
| 744 | (error "Implementation does not handle immediate return")) | 753 | (error "Implementation does not handle immediate return")) |
| @@ -926,11 +935,8 @@ KEEP-DATE is non-nil, preserve the time stamp when copying." | |||
| 926 | (tramp-shell-quote-argument v1-localname) | 935 | (tramp-shell-quote-argument v1-localname) |
| 927 | (tramp-shell-quote-argument v2-localname))))) | 936 | (tramp-shell-quote-argument v2-localname))))) |
| 928 | ;; KEEP-DATE handling. | 937 | ;; KEEP-DATE handling. |
| 929 | (when keep-date | 938 | (when (and keep-date (functionp 'set-file-times)) |
| 930 | (let ((modtime (nth 5 (file-attributes filename)))) | 939 | (apply 'set-file-times (list newname (nth 5 (file-attributes filename))))) |
| 931 | (when (and (not (null modtime)) | ||
| 932 | (not (equal modtime '(0 0)))) | ||
| 933 | (tramp-touch newname modtime)))) | ||
| 934 | ;; Set the mode. | 940 | ;; Set the mode. |
| 935 | (set-file-modes newname (file-modes filename))) | 941 | (set-file-modes newname (file-modes filename))) |
| 936 | 942 | ||
| @@ -942,7 +948,8 @@ Result is a list of (LOCALNAME LINK COUNT UID GID ATIME MTIME CTIME | |||
| 942 | SIZE MODE WEIRD INODE DEVICE)." | 948 | SIZE MODE WEIRD INODE DEVICE)." |
| 943 | (block nil | 949 | (block nil |
| 944 | (with-current-buffer (tramp-get-buffer vec) | 950 | (with-current-buffer (tramp-get-buffer vec) |
| 945 | ;; #LIST does not work properly with trailing "/", at least in .fishsrv.pl | 951 | ;; #LIST does not work properly with trailing "/", at least in |
| 952 | ;; .fishsrv.pl. | ||
| 946 | (when (string-match "/$" localname) | 953 | (when (string-match "/$" localname) |
| 947 | (setq localname (concat localname "."))) | 954 | (setq localname (concat localname "."))) |
| 948 | 955 | ||
| @@ -974,7 +981,7 @@ SIZE MODE WEIRD INODE DEVICE)." | |||
| 974 | ;; Add inode and device. | 981 | ;; Add inode and device. |
| 975 | (add-to-list | 982 | (add-to-list |
| 976 | 'res (append item | 983 | 'res (append item |
| 977 | (list (tramp-get-inode (car item)) | 984 | (list (tramp-get-inode vec) |
| 978 | (tramp-get-device vec)))))) | 985 | (tramp-get-device vec)))))) |
| 979 | 986 | ||
| 980 | ;; Read return code | 987 | ;; Read return code |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 981073f7126..c8ea9932f96 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -346,7 +346,7 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server." | |||
| 346 | (assoc (file-name-nondirectory filename) entries))) | 346 | (assoc (file-name-nondirectory filename) entries))) |
| 347 | (uid (if (and id-format (equal id-format 'string)) "nobody" -1)) | 347 | (uid (if (and id-format (equal id-format 'string)) "nobody" -1)) |
| 348 | (gid (if (and id-format (equal id-format 'string)) "nogroup" -1)) | 348 | (gid (if (and id-format (equal id-format 'string)) "nogroup" -1)) |
| 349 | (inode (tramp-get-inode filename)) | 349 | (inode (tramp-get-inode v)) |
| 350 | (device (tramp-get-device v))) | 350 | (device (tramp-get-device v))) |
| 351 | 351 | ||
| 352 | ;; Check result. | 352 | ;; Check result. |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 021d3db6fac..792233925fc 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -571,8 +571,9 @@ files conditionalize this setup based on the TERM environment variable." | |||
| 571 | ("plinkx" | 571 | ("plinkx" |
| 572 | (tramp-login-program "plink") | 572 | (tramp-login-program "plink") |
| 573 | (tramp-login-args (("-load" "%h") ("-t") | 573 | (tramp-login-args (("-load" "%h") ("-t") |
| 574 | (,(format "env 'TERM=%s' 'PS1=$ '" | 574 | (,(format |
| 575 | tramp-terminal-type)) | 575 | "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=$ '" |
| 576 | tramp-terminal-type)) | ||
| 576 | ("/bin/sh"))) | 577 | ("/bin/sh"))) |
| 577 | (tramp-remote-sh "/bin/sh") | 578 | (tramp-remote-sh "/bin/sh") |
| 578 | (tramp-copy-program nil) | 579 | (tramp-copy-program nil) |
| @@ -1772,6 +1773,7 @@ This is used to map a mode number to a permission string.") | |||
| 1772 | (copy-file . tramp-handle-copy-file) | 1773 | (copy-file . tramp-handle-copy-file) |
| 1773 | (rename-file . tramp-handle-rename-file) | 1774 | (rename-file . tramp-handle-rename-file) |
| 1774 | (set-file-modes . tramp-handle-set-file-modes) | 1775 | (set-file-modes . tramp-handle-set-file-modes) |
| 1776 | (set-file-times . tramp-handle-set-file-times) | ||
| 1775 | (make-directory . tramp-handle-make-directory) | 1777 | (make-directory . tramp-handle-make-directory) |
| 1776 | (delete-directory . tramp-handle-delete-directory) | 1778 | (delete-directory . tramp-handle-delete-directory) |
| 1777 | (delete-file . tramp-handle-delete-file) | 1779 | (delete-file . tramp-handle-delete-file) |
| @@ -2493,6 +2495,40 @@ of." | |||
| 2493 | (tramp-error | 2495 | (tramp-error |
| 2494 | v 'file-error "Error while changing file's mode %s" filename)))) | 2496 | v 'file-error "Error while changing file's mode %s" filename)))) |
| 2495 | 2497 | ||
| 2498 | (defun tramp-handle-set-file-times (filename &optional time) | ||
| 2499 | "Like `set-file-times' for Tramp files." | ||
| 2500 | (zerop | ||
| 2501 | (if (file-remote-p filename) | ||
| 2502 | (with-parsed-tramp-file-name filename nil | ||
| 2503 | (let ((time (if (or (null time) (equal time '(0 0))) | ||
| 2504 | (current-time) | ||
| 2505 | time)) | ||
| 2506 | (utc | ||
| 2507 | ;; With GNU Emacs, `format-time-string' has an | ||
| 2508 | ;; optional parameter UNIVERSAL. This is preferred, | ||
| 2509 | ;; because we could handle the case when the remote | ||
| 2510 | ;; host is located in a different time zone as the | ||
| 2511 | ;; local host. | ||
| 2512 | (and (functionp 'subr-arity) | ||
| 2513 | (subrp (symbol-function 'format-time-string)) | ||
| 2514 | (= 3 (cdr (funcall (symbol-function 'subr-arity) | ||
| 2515 | (symbol-function | ||
| 2516 | 'format-time-string))))))) | ||
| 2517 | (tramp-send-command-and-check | ||
| 2518 | v (format "%s touch -t %s %s" | ||
| 2519 | (if utc "TZ=UTC; export TZ;" "") | ||
| 2520 | (if utc | ||
| 2521 | (format-time-string "%Y%m%d%H%M.%S" time t) | ||
| 2522 | (format-time-string "%Y%m%d%H%M.%S" time)) | ||
| 2523 | (tramp-shell-quote-argument localname))))) | ||
| 2524 | ;; We handle also the local part, because in older Emacsen, | ||
| 2525 | ;; without `set-file-times', this function is an alias for this. | ||
| 2526 | ;; We are local, so we don't need the UTC settings. | ||
| 2527 | (call-process | ||
| 2528 | "touch" nil nil nil "-t" | ||
| 2529 | (format-time-string "%Y%m%d%H%M.%S" time) | ||
| 2530 | (tramp-shell-quote-argument filename))))) | ||
| 2531 | |||
| 2496 | ;; Simple functions using the `test' command. | 2532 | ;; Simple functions using the `test' command. |
| 2497 | 2533 | ||
| 2498 | (defun tramp-handle-file-executable-p (filename) | 2534 | (defun tramp-handle-file-executable-p (filename) |
| @@ -2926,10 +2962,8 @@ KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." | |||
| 2926 | (jka-compr-inhibit t)) | 2962 | (jka-compr-inhibit t)) |
| 2927 | (write-region (point-min) (point-max) newname)))) | 2963 | (write-region (point-min) (point-max) newname)))) |
| 2928 | ;; KEEP-DATE handling. | 2964 | ;; KEEP-DATE handling. |
| 2929 | (when keep-date | 2965 | (when (and keep-date (functionp 'set-file-times)) |
| 2930 | (when (and (not (null modtime)) | 2966 | (apply 'set-file-times (list newname modtime))) |
| 2931 | (not (equal modtime '(0 0)))) | ||
| 2932 | (tramp-touch newname modtime))) | ||
| 2933 | ;; Set the mode. | 2967 | ;; Set the mode. |
| 2934 | (set-file-modes newname (file-modes filename)) | 2968 | (set-file-modes newname (file-modes filename)) |
| 2935 | ;; If the operation was `rename', delete the original file. | 2969 | ;; If the operation was `rename', delete the original file. |
| @@ -3078,8 +3112,9 @@ be a local filename. The method used must be an out-of-band method." | |||
| 3078 | (tramp-message v 0 "Transferring %s to %s...done" filename newname) | 3112 | (tramp-message v 0 "Transferring %s to %s...done" filename newname) |
| 3079 | 3113 | ||
| 3080 | ;; Handle KEEP-DATE argument. | 3114 | ;; Handle KEEP-DATE argument. |
| 3081 | (when (and keep-date (not copy-keep-date)) | 3115 | (when (and keep-date (not copy-keep-date) (functionp 'set-file-times)) |
| 3082 | (set-file-times newname (nth 5 (file-attributes filename)))) | 3116 | (apply 'set-file-times |
| 3117 | (list newname (nth 5 (file-attributes filename))))) | ||
| 3083 | 3118 | ||
| 3084 | ;; Set the mode. | 3119 | ;; Set the mode. |
| 3085 | (unless (and keep-date copy-keep-date) | 3120 | (unless (and keep-date copy-keep-date) |
| @@ -3282,8 +3317,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." | |||
| 3282 | ;; CCC is this the right thing to do? | 3317 | ;; CCC is this the right thing to do? |
| 3283 | (defun tramp-handle-unhandled-file-name-directory (filename) | 3318 | (defun tramp-handle-unhandled-file-name-directory (filename) |
| 3284 | "Like `unhandled-file-name-directory' for Tramp files." | 3319 | "Like `unhandled-file-name-directory' for Tramp files." |
| 3285 | (with-parsed-tramp-file-name filename nil | 3320 | (expand-file-name "~/")) |
| 3286 | (expand-file-name (tramp-make-tramp-file-name method user host "~/")))) | ||
| 3287 | 3321 | ||
| 3288 | ;; Canonicalization of file names. | 3322 | ;; Canonicalization of file names. |
| 3289 | 3323 | ||
| @@ -3446,9 +3480,8 @@ beginning of local filename are not substituted." | |||
| 3446 | (tramp-set-connection-property v "process-name" name) | 3480 | (tramp-set-connection-property v "process-name" name) |
| 3447 | (tramp-set-connection-property | 3481 | (tramp-set-connection-property |
| 3448 | v "process-buffer" | 3482 | v "process-buffer" |
| 3449 | (get-buffer-create | 3483 | ;; BUFFER can be nil. |
| 3450 | ;; BUFFER can be nil. | 3484 | (get-buffer-create (or buffer (current-buffer)))) |
| 3451 | (or buffer (generate-new-buffer-name (tramp-buffer-name v))))) | ||
| 3452 | ;; Activate narrowing in order to save BUFFER contents. | 3485 | ;; Activate narrowing in order to save BUFFER contents. |
| 3453 | (with-current-buffer (tramp-get-connection-buffer v) | 3486 | (with-current-buffer (tramp-get-connection-buffer v) |
| 3454 | (narrow-to-region (point-max) (point-max))) | 3487 | (narrow-to-region (point-max) (point-max))) |
| @@ -3466,7 +3499,9 @@ beginning of local filename are not substituted." | |||
| 3466 | ;; Return process. | 3499 | ;; Return process. |
| 3467 | (tramp-get-connection-process v)) | 3500 | (tramp-get-connection-process v)) |
| 3468 | ;; Save exit. | 3501 | ;; Save exit. |
| 3469 | (with-current-buffer (tramp-get-connection-buffer v) (widen)) | 3502 | (with-current-buffer (tramp-get-connection-buffer v) |
| 3503 | (widen) | ||
| 3504 | (goto-char (point-max))) | ||
| 3470 | (tramp-set-connection-property v "process-name" nil) | 3505 | (tramp-set-connection-property v "process-name" nil) |
| 3471 | (tramp-set-connection-property v "process-buffer" nil)))) | 3506 | (tramp-set-connection-property v "process-buffer" nil)))) |
| 3472 | 3507 | ||
| @@ -3575,12 +3610,33 @@ beginning of local filename are not substituted." | |||
| 3575 | (defun tramp-handle-shell-command | 3610 | (defun tramp-handle-shell-command |
| 3576 | (command &optional output-buffer error-buffer) | 3611 | (command &optional output-buffer error-buffer) |
| 3577 | "Like `shell-command' for Tramp files." | 3612 | "Like `shell-command' for Tramp files." |
| 3578 | (with-parsed-tramp-file-name default-directory nil | 3613 | (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) |
| 3579 | (let ((shell-file-name | 3614 | (args (split-string (substring command 0 asynchronous) " ")) |
| 3580 | (tramp-get-connection-property v "remote-shell" "/bin/sh")) | 3615 | (output-buffer |
| 3581 | (shell-command-switch "-c")) | 3616 | (or output-buffer |
| 3582 | (tramp-run-real-handler | 3617 | (if asynchronous |
| 3583 | 'shell-command (list command output-buffer error-buffer))))) | 3618 | "*Async Shell Command*" |
| 3619 | "*Shell Command Output*"))) | ||
| 3620 | (buffer | ||
| 3621 | (if (and (not asynchronous) (bufferp error-buffer)) | ||
| 3622 | (with-parsed-tramp-file-name default-directory nil | ||
| 3623 | (list output-buffer (tramp-make-tramp-temp-file v))) | ||
| 3624 | output-buffer))) | ||
| 3625 | |||
| 3626 | (prog1 | ||
| 3627 | ;; Run the process. We cannot use `process-file' and | ||
| 3628 | ;; `start-file-process', because these functions might not | ||
| 3629 | ;; exist in older Emacsen. | ||
| 3630 | (if (integerp asynchronous) | ||
| 3631 | (apply 'tramp-handle-start-file-process | ||
| 3632 | "*Async Shell*" buffer args) | ||
| 3633 | (apply 'tramp-handle-process-file | ||
| 3634 | (car args) nil buffer nil (cdr args))) | ||
| 3635 | ;; Insert error messages if they were separated. | ||
| 3636 | (when (listp buffer) | ||
| 3637 | (with-current-buffer error-buffer | ||
| 3638 | (insert-file-contents (cadr buffer))) | ||
| 3639 | (delete-file (cadr buffer)))))) | ||
| 3584 | 3640 | ||
| 3585 | ;; File Editing. | 3641 | ;; File Editing. |
| 3586 | 3642 | ||
| @@ -3657,14 +3713,18 @@ beginning of local filename are not substituted." | |||
| 3657 | (run-hooks 'tramp-handle-file-local-copy-hook) | 3713 | (run-hooks 'tramp-handle-file-local-copy-hook) |
| 3658 | tmpfil))) | 3714 | tmpfil))) |
| 3659 | 3715 | ||
| 3660 | (defun tramp-handle-file-remote-p (filename &optional connected) | 3716 | (defun tramp-handle-file-remote-p (file &optional identification connected) |
| 3661 | "Like `file-remote-p' for Tramp files." | 3717 | "Like `file-remote-p' for Tramp files." |
| 3662 | (when (tramp-tramp-file-p filename) | 3718 | (when (tramp-tramp-file-p filename) |
| 3663 | (with-parsed-tramp-file-name filename nil | 3719 | (with-parsed-tramp-file-name filename nil |
| 3664 | (and (or (not connected) | 3720 | (and (or (not connected) |
| 3665 | (let ((p (tramp-get-connection-process v))) | 3721 | (let ((p (tramp-get-connection-process v))) |
| 3666 | (and p (processp p) (memq (process-status p) '(run open))))) | 3722 | (and p (processp p) (memq (process-status p) '(run open))))) |
| 3667 | (tramp-make-tramp-file-name method user host ""))))) | 3723 | (cond |
| 3724 | ((eq identification 'method) method) | ||
| 3725 | ((eq identification 'user) user) | ||
| 3726 | ((eq identification 'host) host) | ||
| 3727 | (t (tramp-make-tramp-file-name method user host ""))))))) | ||
| 3668 | 3728 | ||
| 3669 | (defun tramp-handle-insert-file-contents | 3729 | (defun tramp-handle-insert-file-contents |
| 3670 | (filename &optional visit beg end replace) | 3730 | (filename &optional visit beg end replace) |
| @@ -4025,6 +4085,8 @@ ARGS are the arguments OPERATION has been called with." | |||
| 4025 | 'load 'make-directory 'make-directory-internal | 4085 | 'load 'make-directory 'make-directory-internal |
| 4026 | 'set-file-modes 'substitute-in-file-name | 4086 | 'set-file-modes 'substitute-in-file-name |
| 4027 | 'unhandled-file-name-directory 'vc-registered | 4087 | 'unhandled-file-name-directory 'vc-registered |
| 4088 | ; Emacs 22 only | ||
| 4089 | 'set-file-times | ||
| 4028 | ; XEmacs only | 4090 | ; XEmacs only |
| 4029 | 'abbreviate-file-name 'create-file-buffer | 4091 | 'abbreviate-file-name 'create-file-buffer |
| 4030 | 'dired-file-modtime 'dired-make-compressed-filename | 4092 | 'dired-file-modtime 'dired-make-compressed-filename |
| @@ -4886,40 +4948,6 @@ hosts, or files, disagree." | |||
| 4886 | (tramp-shell-quote-argument v1-localname) | 4948 | (tramp-shell-quote-argument v1-localname) |
| 4887 | (tramp-shell-quote-argument v2-localname)))))) | 4949 | (tramp-shell-quote-argument v2-localname)))))) |
| 4888 | 4950 | ||
| 4889 | (defun tramp-touch (file time) | ||
| 4890 | "Set the last-modified timestamp of the given file. | ||
| 4891 | TIME is an Emacs internal time value as returned by `current-time'." | ||
| 4892 | (let* ((utc | ||
| 4893 | ;; With GNU Emacs, `format-time-string' has an optional | ||
| 4894 | ;; parameter UNIVERSAL. This is preferred. | ||
| 4895 | (and (functionp 'subr-arity) | ||
| 4896 | (subrp (symbol-function 'format-time-string)) | ||
| 4897 | (= 3 (cdr (funcall (symbol-function 'subr-arity) | ||
| 4898 | (symbol-function 'format-time-string)))))) | ||
| 4899 | (touch-time | ||
| 4900 | (if utc | ||
| 4901 | (format-time-string "%Y%m%d%H%M.%S" time t) | ||
| 4902 | (format-time-string "%Y%m%d%H%M.%S" time))) | ||
| 4903 | (default-directory (file-name-directory file))) | ||
| 4904 | |||
| 4905 | (if (eq (tramp-find-foreign-file-name-handler file) | ||
| 4906 | 'tramp-sh-file-name-handler) | ||
| 4907 | (with-parsed-tramp-file-name file nil | ||
| 4908 | (tramp-send-command | ||
| 4909 | v (format "%s touch -t %s %s" | ||
| 4910 | (if utc "TZ=UTC; export TZ;" "") | ||
| 4911 | touch-time | ||
| 4912 | (tramp-shell-quote-argument localname)))) | ||
| 4913 | (with-temp-buffer | ||
| 4914 | (shell-command | ||
| 4915 | (format "%s touch -t %s %s" | ||
| 4916 | (if utc "TZ=UTC; export TZ;" "") | ||
| 4917 | touch-time | ||
| 4918 | (tramp-shell-quote-argument | ||
| 4919 | (if (tramp-tramp-file-p file) | ||
| 4920 | (with-parsed-tramp-file-name file nil localname) file))) | ||
| 4921 | (current-buffer)))))) | ||
| 4922 | |||
| 4923 | (defun tramp-buffer-name (vec) | 4951 | (defun tramp-buffer-name (vec) |
| 4924 | "A name for the connection buffer VEC." | 4952 | "A name for the connection buffer VEC." |
| 4925 | ;; We must use `tramp-file-name-real-host', because for gateway | 4953 | ;; We must use `tramp-file-name-real-host', because for gateway |
| @@ -5179,7 +5207,8 @@ file exists and nonzero exit status otherwise." | |||
| 5179 | (when extra-args (setq shell (concat shell " " extra-args)))) | 5207 | (when extra-args (setq shell (concat shell " " extra-args)))) |
| 5180 | (tramp-message | 5208 | (tramp-message |
| 5181 | vec 5 "Starting remote shell `%s' for tilde expansion..." shell) | 5209 | vec 5 "Starting remote shell `%s' for tilde expansion..." shell) |
| 5182 | (tramp-send-command-internal vec (concat "PS1='$ ' exec " shell)) | 5210 | (tramp-send-command-internal |
| 5211 | vec (concat "PROMPT_COMMAND='' PS1='$ ' exec " shell)) | ||
| 5183 | (tramp-message vec 5 "Setting remote shell prompt...") | 5212 | (tramp-message vec 5 "Setting remote shell prompt...") |
| 5184 | ;; Douglas Gray Stephens <DGrayStephens@slb.com> says that we | 5213 | ;; Douglas Gray Stephens <DGrayStephens@slb.com> says that we |
| 5185 | ;; must use "\n" here, not tramp-rsh-end-of-line. Kai left the | 5214 | ;; must use "\n" here, not tramp-rsh-end-of-line. Kai left the |
| @@ -5187,7 +5216,7 @@ file exists and nonzero exit status otherwise." | |||
| 5187 | ;; as well. | 5216 | ;; as well. |
| 5188 | (tramp-send-command | 5217 | (tramp-send-command |
| 5189 | vec | 5218 | vec |
| 5190 | (format "PS1='%s%s%s'; PS2=''; PS3=''" | 5219 | (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''" |
| 5191 | tramp-rsh-end-of-line | 5220 | tramp-rsh-end-of-line |
| 5192 | tramp-end-of-output | 5221 | tramp-end-of-output |
| 5193 | tramp-rsh-end-of-line)) | 5222 | tramp-rsh-end-of-line)) |
| @@ -5455,10 +5484,11 @@ process to set up. VEC specifies the connection." | |||
| 5455 | ;; makes it work under `rc', too. We also unset the variable $ENV | 5484 | ;; makes it work under `rc', too. We also unset the variable $ENV |
| 5456 | ;; because that is read by some sh implementations (eg, bash when | 5485 | ;; because that is read by some sh implementations (eg, bash when |
| 5457 | ;; called as sh) on startup; this way, we avoid the startup file | 5486 | ;; called as sh) on startup; this way, we avoid the startup file |
| 5458 | ;; clobbering $PS1. | 5487 | ;; clobbering $PS1. $PROMP_COMMAND is another way to set the prompt |
| 5488 | ;; in /bin/bash, it must be discarded as well. | ||
| 5459 | (tramp-send-command-internal | 5489 | (tramp-send-command-internal |
| 5460 | vec | 5490 | vec |
| 5461 | (format "exec env 'ENV=' 'PS1=$ ' %s" | 5491 | (format "exec env 'ENV=' 'PROMPT_COMMAND=' 'PS1=$ ' %s" |
| 5462 | (tramp-get-method-parameter | 5492 | (tramp-get-method-parameter |
| 5463 | (tramp-file-name-method vec) 'tramp-remote-sh))) | 5493 | (tramp-file-name-method vec) 'tramp-remote-sh))) |
| 5464 | (tramp-message vec 5 "Setting up remote shell environment") | 5494 | (tramp-message vec 5 "Setting up remote shell environment") |
| @@ -5512,7 +5542,7 @@ process to set up. VEC specifies the connection." | |||
| 5512 | ;; send "echo are you awake". | 5542 | ;; send "echo are you awake". |
| 5513 | (tramp-send-command | 5543 | (tramp-send-command |
| 5514 | vec | 5544 | vec |
| 5515 | (format "PS1='%s%s%s'; PS2=''; PS3=''" | 5545 | (format "PROMPT_COMMAND=''; PS1='%s%s%s'; PS2=''; PS3=''" |
| 5516 | tramp-rsh-end-of-line | 5546 | tramp-rsh-end-of-line |
| 5517 | tramp-end-of-output | 5547 | tramp-end-of-output |
| 5518 | tramp-rsh-end-of-line)) | 5548 | tramp-rsh-end-of-line)) |
| @@ -5893,6 +5923,7 @@ connection if a previous connection has died for some reason." | |||
| 5893 | (when (and p (processp p)) | 5923 | (when (and p (processp p)) |
| 5894 | (delete-process p)) | 5924 | (delete-process p)) |
| 5895 | (setenv "TERM" tramp-terminal-type) | 5925 | (setenv "TERM" tramp-terminal-type) |
| 5926 | (setenv "PROMPT_COMMAND") | ||
| 5896 | (setenv "PS1" "$ ") | 5927 | (setenv "PS1" "$ ") |
| 5897 | (let* ((target-alist (tramp-compute-multi-hops vec)) | 5928 | (let* ((target-alist (tramp-compute-multi-hops vec)) |
| 5898 | (process-environment (copy-sequence process-environment)) | 5929 | (process-environment (copy-sequence process-environment)) |
| @@ -6243,17 +6274,24 @@ Return ATTR." | |||
| 6243 | ;; Convert inode. | 6274 | ;; Convert inode. |
| 6244 | (unless (listp (nth 10 attr)) | 6275 | (unless (listp (nth 10 attr)) |
| 6245 | (setcar (nthcdr 10 attr) | 6276 | (setcar (nthcdr 10 attr) |
| 6246 | (list (floor (nth 10 attr) 65536) | 6277 | (condition-case nil |
| 6247 | (floor (mod (nth 10 attr) 65536))))) | 6278 | (list (floor (nth 10 attr) 65536) |
| 6279 | (floor (mod (nth 10 attr) 65536))) | ||
| 6280 | ;; Inodes can be incredible huge. We must hide this. | ||
| 6281 | (error (tramp-get-inode vec))))) | ||
| 6248 | ;; Set virtual device number. | 6282 | ;; Set virtual device number. |
| 6249 | (setcar (nthcdr 11 attr) | 6283 | (setcar (nthcdr 11 attr) |
| 6250 | (tramp-get-device vec)) | 6284 | (tramp-get-device vec)) |
| 6251 | attr) | 6285 | attr) |
| 6252 | 6286 | ||
| 6253 | (defun tramp-get-inode (file) | 6287 | (defun tramp-get-inode (vec) |
| 6254 | "Returns the virtual inode number. | 6288 | "Returns the virtual inode number. |
| 6255 | If it doesn't exist, generate a new one." | 6289 | If it doesn't exist, generate a new one." |
| 6256 | (let ((string (directory-file-name file))) | 6290 | (let ((string (tramp-make-tramp-file-name |
| 6291 | (tramp-file-name-method vec) | ||
| 6292 | (tramp-file-name-user vec) | ||
| 6293 | (tramp-file-name-host vec) | ||
| 6294 | ""))) | ||
| 6257 | (unless (assoc string tramp-inodes) | 6295 | (unless (assoc string tramp-inodes) |
| 6258 | (add-to-list 'tramp-inodes | 6296 | (add-to-list 'tramp-inodes |
| 6259 | (list string (length tramp-inodes)))) | 6297 | (list string (length tramp-inodes)))) |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 2c43abfd50c..24d5eababc6 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -371,92 +371,134 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 371 | 371 | ||
| 372 | (defun grep-probe (command args &optional func result) | 372 | (defun grep-probe (command args &optional func result) |
| 373 | (equal (condition-case nil | 373 | (equal (condition-case nil |
| 374 | (apply (or func 'call-process) command args) | 374 | (apply (or func 'process-file) command args) |
| 375 | (error nil)) | 375 | (error nil)) |
| 376 | (or result 0))) | 376 | (or result 0))) |
| 377 | 377 | ||
| 378 | ;;;###autoload | 378 | ;;;###autoload |
| 379 | (defun grep-compute-defaults () | 379 | (defun grep-compute-defaults () |
| 380 | (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) | 380 | (let ((host-id |
| 381 | (setq grep-use-null-device | 381 | (intern (or (file-remote-p default-directory 'host) "localhost")))) |
| 382 | (with-temp-buffer | 382 | ;; There are different defaults on different hosts. They must be |
| 383 | (let ((hello-file (expand-file-name "HELLO" data-directory))) | 383 | ;; computed for every host once, then they are kept in the |
| 384 | (not | 384 | ;; variables' property host-id for reuse. |
| 385 | (and (if grep-command | 385 | (setq grep-command |
| 386 | ;; `grep-command' is already set, so | 386 | (or (get 'grep-command host-id) |
| 387 | ;; use that for testing. | 387 | (eval (car (get 'grep-command 'standard-value)))) |
| 388 | (grep-probe grep-command | 388 | |
| 389 | `(nil t nil "^English" ,hello-file) | 389 | grep-template |
| 390 | #'call-process-shell-command) | 390 | (or (get 'grep-template host-id) |
| 391 | ;; otherwise use `grep-program' | 391 | (eval (car (get 'grep-template 'standard-value)))) |
| 392 | (grep-probe grep-program | 392 | |
| 393 | `(nil t nil "-nH" "^English" ,hello-file))) | 393 | grep-use-null-device |
| 394 | (progn | 394 | (or (get 'grep-use-null-device host-id) |
| 395 | (goto-char (point-min)) | 395 | (eval (car (get 'grep-use-null-device 'standard-value)))) |
| 396 | (looking-at | 396 | |
| 397 | (concat (regexp-quote hello-file) | 397 | grep-find-command |
| 398 | ":[0-9]+:English"))))))))) | 398 | (or (get 'grep-find-command host-id) |
| 399 | (unless (and grep-command grep-find-command | 399 | (eval (car (get 'grep-find-command 'standard-value)))) |
| 400 | grep-template grep-find-template) | 400 | |
| 401 | (let ((grep-options | 401 | grep-find-template |
| 402 | (concat (if grep-use-null-device "-n" "-nH") | 402 | (or (get 'grep-find-template host-id) |
| 403 | (if (grep-probe grep-program | 403 | (eval (car (get 'grep-find-template 'standard-value)))) |
| 404 | `(nil nil nil "-e" "foo" ,null-device) | 404 | |
| 405 | nil 1) | 405 | grep-find-use-xargs |
| 406 | " -e")))) | 406 | (or (get 'grep-find-use-xargs host-id) |
| 407 | (unless grep-command | 407 | (eval (car (get 'grep-find-use-xargs 'standard-value)))) |
| 408 | (setq grep-command | 408 | |
| 409 | (format "%s %s " grep-program grep-options))) | 409 | grep-highlight-matches |
| 410 | (unless grep-template | 410 | (or (get 'grep-highlight-matches host-id) |
| 411 | (setq grep-template | 411 | (eval (car (get 'grep-highlight-matches 'standard-value))))) |
| 412 | (format "%s <C> %s <R> <F>" grep-program grep-options))) | 412 | |
| 413 | (unless grep-find-use-xargs | 413 | (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) |
| 414 | (setq grep-find-use-xargs | 414 | (setq grep-use-null-device |
| 415 | (cond | 415 | (with-temp-buffer |
| 416 | ((and | 416 | (let ((hello-file (expand-file-name "HELLO" data-directory))) |
| 417 | (grep-probe find-program `(nil nil nil ,null-device "-print0")) | 417 | (not |
| 418 | (grep-probe "xargs" `(nil nil nil "-0" "-e" "echo"))) | 418 | (and (if grep-command |
| 419 | 'gnu) | 419 | ;; `grep-command' is already set, so |
| 420 | (t | 420 | ;; use that for testing. |
| 421 | 'exec)))) | 421 | (grep-probe grep-command |
| 422 | (unless grep-find-command | 422 | `(nil t nil "^English" ,hello-file) |
| 423 | (setq grep-find-command | 423 | #'call-process-shell-command) |
| 424 | (cond ((eq grep-find-use-xargs 'gnu) | 424 | ;; otherwise use `grep-program' |
| 425 | (format "%s . -type f -print0 | xargs -0 -e %s" | 425 | (grep-probe grep-program |
| 426 | find-program grep-command)) | 426 | `(nil t nil "-nH" "^English" ,hello-file))) |
| 427 | ((eq grep-find-use-xargs 'exec) | 427 | (progn |
| 428 | (let ((cmd0 (format "%s . -type f -exec %s" | 428 | (goto-char (point-min)) |
| 429 | find-program grep-command))) | 429 | (looking-at |
| 430 | (cons | 430 | (concat (regexp-quote hello-file) |
| 431 | (format "%s {} %s %s" | 431 | ":[0-9]+:English"))))))))) |
| 432 | cmd0 null-device | 432 | (unless (and grep-command grep-find-command |
| 433 | (shell-quote-argument ";")) | 433 | grep-template grep-find-template) |
| 434 | (1+ (length cmd0))))) | 434 | (let ((grep-options |
| 435 | (t | 435 | (concat (if grep-use-null-device "-n" "-nH") |
| 436 | (format "%s . -type f -print | xargs %s" | 436 | (if (grep-probe grep-program |
| 437 | find-program grep-command))))) | 437 | `(nil nil nil "-e" "foo" ,null-device) |
| 438 | (unless grep-find-template | 438 | nil 1) |
| 439 | (setq grep-find-template | 439 | " -e")))) |
| 440 | (let ((gcmd (format "%s <C> %s <R>" | 440 | (unless grep-command |
| 441 | grep-program grep-options))) | 441 | (setq grep-command |
| 442 | (format "%s %s " grep-program grep-options))) | ||
| 443 | (unless grep-template | ||
| 444 | (setq grep-template | ||
| 445 | (format "%s <C> %s <R> <F>" grep-program grep-options))) | ||
| 446 | (unless grep-find-use-xargs | ||
| 447 | (setq grep-find-use-xargs | ||
| 448 | (cond | ||
| 449 | ((and | ||
| 450 | (grep-probe find-program `(nil nil nil ,null-device "-print0")) | ||
| 451 | (grep-probe "xargs" `(nil nil nil "-0" "-e" "echo"))) | ||
| 452 | 'gnu) | ||
| 453 | (t | ||
| 454 | 'exec)))) | ||
| 455 | (unless grep-find-command | ||
| 456 | (setq grep-find-command | ||
| 442 | (cond ((eq grep-find-use-xargs 'gnu) | 457 | (cond ((eq grep-find-use-xargs 'gnu) |
| 443 | (format "%s . <X> -type f <F> -print0 | xargs -0 -e %s" | 458 | (format "%s . -type f -print0 | xargs -0 -e %s" |
| 444 | find-program gcmd)) | 459 | find-program grep-command)) |
| 445 | ((eq grep-find-use-xargs 'exec) | 460 | ((eq grep-find-use-xargs 'exec) |
| 446 | (format "%s . <X> -type f <F> -exec %s {} %s %s" | 461 | (let ((cmd0 (format "%s . -type f -exec %s" |
| 447 | find-program gcmd null-device | 462 | find-program grep-command))) |
| 448 | (shell-quote-argument ";"))) | 463 | (cons |
| 464 | (format "%s {} %s %s" | ||
| 465 | cmd0 null-device | ||
| 466 | (shell-quote-argument ";")) | ||
| 467 | (1+ (length cmd0))))) | ||
| 449 | (t | 468 | (t |
| 450 | (format "%s . <X> -type f <F> -print | xargs %s" | 469 | (format "%s . -type f -print | xargs %s" |
| 451 | find-program gcmd)))))))) | 470 | find-program grep-command))))) |
| 452 | (unless (or (not grep-highlight-matches) (eq grep-highlight-matches t)) | 471 | (unless grep-find-template |
| 453 | (setq grep-highlight-matches | 472 | (setq grep-find-template |
| 454 | (with-temp-buffer | 473 | (let ((gcmd (format "%s <C> %s <R>" |
| 455 | (and (grep-probe grep-program '(nil t nil "--help")) | 474 | grep-program grep-options))) |
| 456 | (progn | 475 | (cond ((eq grep-find-use-xargs 'gnu) |
| 457 | (goto-char (point-min)) | 476 | (format "%s . <X> -type f <F> -print0 | xargs -0 -e %s" |
| 458 | (search-forward "--color" nil t)) | 477 | find-program gcmd)) |
| 459 | t))))) | 478 | ((eq grep-find-use-xargs 'exec) |
| 479 | (format "%s . <X> -type f <F> -exec %s {} %s %s" | ||
| 480 | find-program gcmd null-device | ||
| 481 | (shell-quote-argument ";"))) | ||
| 482 | (t | ||
| 483 | (format "%s . <X> -type f <F> -print | xargs %s" | ||
| 484 | find-program gcmd)))))))) | ||
| 485 | (unless (or (not grep-highlight-matches) (eq grep-highlight-matches t)) | ||
| 486 | (setq grep-highlight-matches | ||
| 487 | (with-temp-buffer | ||
| 488 | (and (grep-probe grep-program '(nil t nil "--help")) | ||
| 489 | (progn | ||
| 490 | (goto-char (point-min)) | ||
| 491 | (search-forward "--color" nil t)) | ||
| 492 | t)))) | ||
| 493 | |||
| 494 | ;; Save defaults for this host. | ||
| 495 | (put 'grep-command host-id grep-command) | ||
| 496 | (put 'grep-template host-id grep-template) | ||
| 497 | (put 'grep-use-null-device host-id grep-use-null-device) | ||
| 498 | (put 'grep-find-command host-id grep-find-command) | ||
| 499 | (put 'grep-find-template host-id grep-find-template) | ||
| 500 | (put 'grep-find-use-xargs host-id grep-find-use-xargs) | ||
| 501 | (put 'grep-highlight-matches host-id grep-highlight-matches))) | ||
| 460 | 502 | ||
| 461 | (defun grep-tag-default () | 503 | (defun grep-tag-default () |
| 462 | (or (and transient-mark-mode mark-active | 504 | (or (and transient-mark-mode mark-active |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f93aa6f1415..811f59ce10a 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -986,7 +986,7 @@ Point is at the beginning of the next line." | |||
| 986 | ;; This looks silly, but it's because `sh-here-doc-re' keeps changing. | 986 | ;; This looks silly, but it's because `sh-here-doc-re' keeps changing. |
| 987 | (re-search-forward sh-here-doc-re limit t)) | 987 | (re-search-forward sh-here-doc-re limit t)) |
| 988 | 988 | ||
| 989 | (defun sh-quoted-subshell (limit) | 989 | (defun sh-font-lock-quoted-subshell (limit) |
| 990 | "Search for a subshell embedded in a string. | 990 | "Search for a subshell embedded in a string. |
| 991 | Find all the unescaped \" characters within said subshell, remembering that | 991 | Find all the unescaped \" characters within said subshell, remembering that |
| 992 | subshells can nest." | 992 | subshells can nest." |
| @@ -1018,6 +1018,7 @@ subshells can nest." | |||
| 1018 | (t (push state states) (setq state 'backquote)))) | 1018 | (t (push state states) (setq state 'backquote)))) |
| 1019 | (?\$ (if (not (eq (char-after (1+ (point))) ?\()) | 1019 | (?\$ (if (not (eq (char-after (1+ (point))) ?\()) |
| 1020 | nil | 1020 | nil |
| 1021 | (forward-char 1) | ||
| 1021 | (case state | 1022 | (case state |
| 1022 | (t (push state states) (setq state 'code))))) | 1023 | (t (push state states) (setq state 'code))))) |
| 1023 | (?\( (case state | 1024 | (?\( (case state |
| @@ -1026,7 +1027,7 @@ subshells can nest." | |||
| 1026 | (?\) (case state | 1027 | (?\) (case state |
| 1027 | (double-quote nil) | 1028 | (double-quote nil) |
| 1028 | (t (setq state (pop states))))) | 1029 | (t (setq state (pop states))))) |
| 1029 | (t (error "Internal error in sh-quoted-subshell"))) | 1030 | (t (error "Internal error in sh-font-lock-quoted-subshell"))) |
| 1030 | (forward-char 1))) | 1031 | (forward-char 1))) |
| 1031 | t)) | 1032 | t)) |
| 1032 | 1033 | ||
| @@ -1111,7 +1112,7 @@ subshells can nest." | |||
| 1111 | (")" 0 (sh-font-lock-paren (match-beginning 0))) | 1112 | (")" 0 (sh-font-lock-paren (match-beginning 0))) |
| 1112 | ;; highlight (possibly nested) subshells inside "" quoted regions correctly. | 1113 | ;; highlight (possibly nested) subshells inside "" quoted regions correctly. |
| 1113 | ;; This should be at the very end because it uses syntax-ppss. | 1114 | ;; This should be at the very end because it uses syntax-ppss. |
| 1114 | (sh-quoted-subshell))) | 1115 | (sh-font-lock-quoted-subshell))) |
| 1115 | 1116 | ||
| 1116 | (defun sh-font-lock-syntactic-face-function (state) | 1117 | (defun sh-font-lock-syntactic-face-function (state) |
| 1117 | (let ((q (nth 3 state))) | 1118 | (let ((q (nth 3 state))) |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index b059d56b9c4..0e7d044a0a6 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -6467,10 +6467,8 @@ If FACE is not a valid face name, use default face." | |||
| 6467 | ;; To make this file smaller, some commands go in a separate file. | 6467 | ;; To make this file smaller, some commands go in a separate file. |
| 6468 | ;; But autoload them here to make the separation invisible. | 6468 | ;; But autoload them here to make the separation invisible. |
| 6469 | 6469 | ||
| 6470 | ;;;### (autoloads (ps-mule-begin-page ps-mule-begin-job ps-mule-encode-header-string | 6470 | ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize |
| 6471 | ;;;;;; ps-mule-initialize ps-mule-plot-composition ps-mule-plot-string | 6471 | ;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "bb18668f99d691db470ec2a32753ba28") |
| 6472 | ;;;;;; ps-mule-set-ascii-font ps-mule-prepare-ascii-font ps-multibyte-buffer) | ||
| 6473 | ;;;;;; "ps-mule" "ps-mule.el" "464a9fb9d59f7561a46bcd5ca87d85db") | ||
| 6474 | ;;; Generated autoloads from ps-mule.el | 6472 | ;;; Generated autoloads from ps-mule.el |
| 6475 | 6473 | ||
| 6476 | (defvar ps-multibyte-buffer nil "\ | 6474 | (defvar ps-multibyte-buffer nil "\ |
| @@ -6518,69 +6516,19 @@ Any other value is treated as nil.") | |||
| 6518 | 6516 | ||
| 6519 | (custom-autoload (quote ps-multibyte-buffer) "ps-mule" t) | 6517 | (custom-autoload (quote ps-multibyte-buffer) "ps-mule" t) |
| 6520 | 6518 | ||
| 6521 | (autoload (quote ps-mule-prepare-ascii-font) "ps-mule" "\ | ||
| 6522 | Setup special ASCII font for STRING. | ||
| 6523 | STRING should contain only ASCII characters. | ||
| 6524 | |||
| 6525 | \(fn STRING)" nil nil) | ||
| 6526 | |||
| 6527 | (autoload (quote ps-mule-set-ascii-font) "ps-mule" "\ | ||
| 6528 | Not documented | ||
| 6529 | |||
| 6530 | \(fn)" nil nil) | ||
| 6531 | |||
| 6532 | (autoload (quote ps-mule-plot-string) "ps-mule" "\ | ||
| 6533 | Generate PostScript code for plotting characters in the region FROM and TO. | ||
| 6534 | |||
| 6535 | It is assumed that all characters in this region belong to the same charset. | ||
| 6536 | |||
| 6537 | Optional argument BG-COLOR specifies background color. | ||
| 6538 | |||
| 6539 | Returns the value: | ||
| 6540 | |||
| 6541 | (ENDPOS . RUN-WIDTH) | ||
| 6542 | |||
| 6543 | Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of | ||
| 6544 | the sequence. | ||
| 6545 | |||
| 6546 | \(fn FROM TO &optional BG-COLOR)" nil nil) | ||
| 6547 | |||
| 6548 | (autoload (quote ps-mule-plot-composition) "ps-mule" "\ | ||
| 6549 | Generate PostScript code for plotting composition in the region FROM and TO. | ||
| 6550 | |||
| 6551 | It is assumed that all characters in this region belong to the same | ||
| 6552 | composition. | ||
| 6553 | |||
| 6554 | Optional argument BG-COLOR specifies background color. | ||
| 6555 | |||
| 6556 | Returns the value: | ||
| 6557 | |||
| 6558 | (ENDPOS . RUN-WIDTH) | ||
| 6559 | |||
| 6560 | Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of | ||
| 6561 | the sequence. | ||
| 6562 | |||
| 6563 | \(fn FROM TO &optional BG-COLOR)" nil nil) | ||
| 6564 | |||
| 6565 | (autoload (quote ps-mule-initialize) "ps-mule" "\ | 6519 | (autoload (quote ps-mule-initialize) "ps-mule" "\ |
| 6566 | Initialize global data for printing multi-byte characters. | 6520 | Initialize global data for printing multi-byte characters. |
| 6567 | 6521 | ||
| 6568 | \(fn)" nil nil) | 6522 | \(fn)" nil nil) |
| 6569 | 6523 | ||
| 6570 | (autoload (quote ps-mule-encode-header-string) "ps-mule" "\ | ||
| 6571 | Generate PostScript code for ploting STRING by font FONTTAG. | ||
| 6572 | FONTTAG should be a string \"/h0\" or \"/h1\". | ||
| 6573 | |||
| 6574 | \(fn STRING FONTTAG)" nil nil) | ||
| 6575 | |||
| 6576 | (autoload (quote ps-mule-begin-job) "ps-mule" "\ | 6524 | (autoload (quote ps-mule-begin-job) "ps-mule" "\ |
| 6577 | Start printing job for multi-byte chars between FROM and TO. | 6525 | Start printing job for multi-byte chars between FROM and TO. |
| 6578 | This checks if all multi-byte characters in the region are printable or not. | 6526 | This checks if all multi-byte characters in the region are printable or not. |
| 6579 | 6527 | ||
| 6580 | \(fn FROM TO)" nil nil) | 6528 | \(fn FROM TO)" nil nil) |
| 6581 | 6529 | ||
| 6582 | (autoload (quote ps-mule-begin-page) "ps-mule" "\ | 6530 | (autoload (quote ps-mule-end-job) "ps-mule" "\ |
| 6583 | Not documented | 6531 | Finish printing job for multi-byte chars. |
| 6584 | 6532 | ||
| 6585 | \(fn)" nil nil) | 6533 | \(fn)" nil nil) |
| 6586 | 6534 | ||
diff --git a/lisp/recentf.el b/lisp/recentf.el index c55f15c69e9..5c7472f96d3 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el | |||
| @@ -89,7 +89,7 @@ file. See also the function `set-file-modes'." | |||
| 89 | :group 'recentf | 89 | :group 'recentf |
| 90 | :type '(choice (const :tag "Don't change" nil) | 90 | :type '(choice (const :tag "Don't change" nil) |
| 91 | integer)) | 91 | integer)) |
| 92 | 92 | ||
| 93 | (defcustom recentf-exclude nil | 93 | (defcustom recentf-exclude nil |
| 94 | "*List of regexps and predicates for filenames excluded from the recent list. | 94 | "*List of regexps and predicates for filenames excluded from the recent list. |
| 95 | When a filename matches any of the regexps or satisfies any of the | 95 | When a filename matches any of the regexps or satisfies any of the |
| @@ -99,19 +99,27 @@ must return non-nil to exclude it." | |||
| 99 | :group 'recentf | 99 | :group 'recentf |
| 100 | :type '(repeat (choice regexp function))) | 100 | :type '(repeat (choice regexp function))) |
| 101 | 101 | ||
| 102 | (defun recentf-keep-default-predicate (file) | ||
| 103 | "Return non-nil if FILE should be kept in the recent list. | ||
| 104 | It handles the case of remote files as well." | ||
| 105 | (cond | ||
| 106 | ((file-remote-p file nil t) (file-readable-p file)) | ||
| 107 | ((file-remote-p file)) | ||
| 108 | ((file-readable-p file)))) | ||
| 109 | |||
| 102 | (defcustom recentf-keep | 110 | (defcustom recentf-keep |
| 103 | '(file-readable-p) | 111 | '(recentf-keep-default-predicate) |
| 104 | "*List of regexps and predicates for filenames kept in the recent list. | 112 | "*List of regexps and predicates for filenames kept in the recent list. |
| 105 | Regexps and predicates are tried in the specified order. | 113 | Regexps and predicates are tried in the specified order. |
| 106 | When nil all filenames are kept in the recent list. | 114 | When nil all filenames are kept in the recent list. |
| 107 | When a filename matches any of the regexps or satisfies any of the | 115 | When a filename matches any of the regexps or satisfies any of the |
| 108 | predicates it is kept in the recent list. | 116 | predicates it is kept in the recent list. |
| 109 | The default is to keep readable files. | 117 | The default is to keep readable files. Remote files are checked |
| 118 | for readability only in case a connection is established to that | ||
| 119 | remote system, otherwise they are kept in the recent list without | ||
| 120 | checking their readability. | ||
| 110 | A predicate is a function that is passed a filename to check and that | 121 | A predicate is a function that is passed a filename to check and that |
| 111 | must return non-nil to keep it. For example, you can add the | 122 | must return non-nil to keep it." |
| 112 | `file-remote-p' predicate in front of this list to keep remote file | ||
| 113 | names in the recent list without checking their readability through a | ||
| 114 | remote access." | ||
| 115 | :group 'recentf | 123 | :group 'recentf |
| 116 | :type '(repeat (choice regexp function))) | 124 | :type '(repeat (choice regexp function))) |
| 117 | 125 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index a7249536f7b..5d26b4abd34 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -400,7 +400,37 @@ | |||
| 400 | ;; Do it! | 400 | ;; Do it! |
| 401 | (xterm-register-default-colors) | 401 | (xterm-register-default-colors) |
| 402 | ;; This recomputes all the default faces given the colors we've just set up. | 402 | ;; This recomputes all the default faces given the colors we've just set up. |
| 403 | (tty-set-up-initial-frame-faces))) | 403 | (tty-set-up-initial-frame-faces) |
| 404 | |||
| 405 | ;; Try to turn on the modifyOtherKeys feature on modern xterms. | ||
| 406 | ;; When it is turned on much more key bindings work: things like | ||
| 407 | ;; C-. C-, etc. | ||
| 408 | ;; To do that we need to find out if the current terminal supports | ||
| 409 | ;; modifyOtherKeys. At this time only xterm does. | ||
| 410 | (let ((coding-system-for-read 'binary) | ||
| 411 | (chr nil) | ||
| 412 | (str nil)) | ||
| 413 | ;; Try to find out the type of terminal by sending a "Secondary | ||
| 414 | ;; Device Attributes (DA)" query. | ||
| 415 | (send-string-to-terminal "\e[>0c") | ||
| 416 | |||
| 417 | ;; The reply should be of the form: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c | ||
| 418 | (when (equal (read-event nil nil 0.1) ?\e) | ||
| 419 | (when (equal (read-event nil nil 0.1) ?\[) | ||
| 420 | (while (not (equal (setq chr (read-event nil nil 0.1)) ?c)) | ||
| 421 | (setq str (concat str (string chr)))) | ||
| 422 | (when (string-match ">0;\\([0-9]+\\);0" str) | ||
| 423 | ;; NUMBER2 is the xterm version number, look for something | ||
| 424 | ;; greater than 216, the version when modifyOtherKeys was | ||
| 425 | ;; introduced. | ||
| 426 | (when (>= (string-to-number | ||
| 427 | (substring str (match-beginning 1) (match-end 1))) 216) | ||
| 428 | ;; Make sure that the modifyOtherKeys state is restored when | ||
| 429 | ;; suspending, resuming and exiting. | ||
| 430 | (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys) | ||
| 431 | (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys) | ||
| 432 | (add-hook 'kill-emacs-hook 'xterm-turn-off-modify-other-keys) | ||
| 433 | (xterm-turn-on-modify-other-keys)))))))) | ||
| 404 | 434 | ||
| 405 | ;; Set up colors, for those versions of xterm that support it. | 435 | ;; Set up colors, for those versions of xterm that support it. |
| 406 | (defvar xterm-standard-colors | 436 | (defvar xterm-standard-colors |
| @@ -518,5 +548,13 @@ versions of xterm." | |||
| 518 | ;; right colors, so clear them. | 548 | ;; right colors, so clear them. |
| 519 | (clear-face-cache))) | 549 | (clear-face-cache))) |
| 520 | 550 | ||
| 551 | (defun xterm-turn-on-modify-other-keys () | ||
| 552 | "Turn on the modifyOtherKeys feature of xterm." | ||
| 553 | (send-string-to-terminal "\e[>4;1m")) | ||
| 554 | |||
| 555 | (defun xterm-turn-off-modify-other-keys () | ||
| 556 | "Turn off the modifyOtherKeys feature of xterm." | ||
| 557 | (send-string-to-terminal "\e[>4m")) | ||
| 558 | |||
| 521 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a | 559 | ;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a |
| 522 | ;;; xterm.el ends here | 560 | ;;; xterm.el ends here |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 034caeee702..eb1429b41e5 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -637,26 +637,31 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 637 | 637 | ||
| 638 | (defvar tex-verbatim-environments | 638 | (defvar tex-verbatim-environments |
| 639 | '("verbatim" "verbatim*")) | 639 | '("verbatim" "verbatim*")) |
| 640 | (put 'tex-verbatim-environments 'safe-local-variable | ||
| 641 | (lambda (x) (require 'cl) (every 'stringp x))) | ||
| 640 | 642 | ||
| 641 | (defvar tex-font-lock-syntactic-keywords | 643 | (defvar tex-font-lock-syntactic-keywords |
| 642 | (let ((verbs (regexp-opt tex-verbatim-environments t))) | 644 | '((eval . `(,(concat "^\\\\begin *{" |
| 643 | `((,(concat "^\\\\begin *{" verbs "}.*\\(\n\\)") 2 "|") | 645 | (regexp-opt tex-verbatim-environments t) |
| 644 | ;; Technically, we'd like to put the "|" property on the \n preceding | 646 | "}.*\\(\n\\)") 2 "|")) |
| 645 | ;; the \end, but this would have 2 disadvantages: | 647 | ;; Technically, we'd like to put the "|" property on the \n preceding |
| 646 | ;; 1 - it's wrong if the verbatim env is empty (the same \n is used to | 648 | ;; the \end, but this would have 2 disadvantages: |
| 647 | ;; start and end the fenced-string). | 649 | ;; 1 - it's wrong if the verbatim env is empty (the same \n is used to |
| 648 | ;; 2 - font-lock considers the preceding \n as being part of the | 650 | ;; start and end the fenced-string). |
| 649 | ;; preceding line, so things gets screwed every time the previous | 651 | ;; 2 - font-lock considers the preceding \n as being part of the |
| 650 | ;; line is re-font-locked on its own. | 652 | ;; preceding line, so things gets screwed every time the previous |
| 651 | ;; There's a hack in tex-font-lock-keywords-1 to remove the verbatim | 653 | ;; line is re-font-locked on its own. |
| 652 | ;; face from the \ but C-M-f still jumps to the wrong spot :-( --Stef | 654 | ;; There's a hack in tex-font-lock-keywords-1 to remove the verbatim |
| 653 | (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) | 655 | ;; face from the \ but C-M-f still jumps to the wrong spot :-( --Stef |
| 654 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") | 656 | (eval . `(,(concat "^\\(\\\\\\)end *{" |
| 655 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") | 657 | (regexp-opt tex-verbatim-environments t) |
| 656 | ("\\\\verb\\**\\([^a-z@*]\\)" | 658 | "}\\(.?\\)") (1 "|") (3 "<"))) |
| 657 | ;; Do it last, because it uses syntax-ppss which needs the | 659 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") |
| 658 | ;; syntax-table properties of previous entries. | 660 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") |
| 659 | 1 (tex-font-lock-verb (match-end 1)))))) | 661 | ("\\\\verb\\**\\([^a-z@*]\\)" |
| 662 | ;; Do it last, because it uses syntax-ppss which needs the | ||
| 663 | ;; syntax-table properties of previous entries. | ||
| 664 | 1 (tex-font-lock-verb (match-end 1))))) | ||
| 660 | 665 | ||
| 661 | (defun tex-font-lock-unfontify-region (beg end) | 666 | (defun tex-font-lock-unfontify-region (beg end) |
| 662 | (font-lock-default-unfontify-region beg end) | 667 | (font-lock-default-unfontify-region beg end) |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 23ce0d9c17a..583816c4cf5 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -88,30 +88,6 @@ | |||
| 88 | (repeat :tag "Argument List" :value ("") string)) | 88 | (repeat :tag "Argument List" :value ("") string)) |
| 89 | :group 'vc-bzr) | 89 | :group 'vc-bzr) |
| 90 | 90 | ||
| 91 | (defvar vc-bzr-version nil | ||
| 92 | "Internal use.") | ||
| 93 | |||
| 94 | ;; Could be used for compatibility checks if bzr changes. | ||
| 95 | (defun vc-bzr-version () | ||
| 96 | "Return a three-numeric element list with components of the bzr version. | ||
| 97 | This is of the form (X Y Z) for revision X.Y.Z. The elements are zero | ||
| 98 | if running `vc-bzr-program' doesn't produce the expected output." | ||
| 99 | (or vc-bzr-version | ||
| 100 | (setq vc-bzr-version | ||
| 101 | (let ((s (shell-command-to-string | ||
| 102 | (concat (shell-quote-argument vc-bzr-program) | ||
| 103 | " --version")))) | ||
| 104 | (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$" s) | ||
| 105 | (list (string-to-number (match-string 1 s)) | ||
| 106 | (string-to-number (match-string 2 s)) | ||
| 107 | (string-to-number (match-string 3 s))) | ||
| 108 | '(0 0 0)))))) | ||
| 109 | |||
| 110 | (defun vc-bzr-at-least-version (vers) | ||
| 111 | "Return t if the bzr command reports being a least version VERS. | ||
| 112 | First argument VERS is a list of the form (X Y Z), as returned by `vc-bzr-version'." | ||
| 113 | (version-list-<= vers (vc-bzr-version))) | ||
| 114 | |||
| 115 | ;; since v0.9, bzr supports removing the progress indicators | 91 | ;; since v0.9, bzr supports removing the progress indicators |
| 116 | ;; by setting environment variable BZR_PROGRESS_BAR to "none". | 92 | ;; by setting environment variable BZR_PROGRESS_BAR to "none". |
| 117 | (defun vc-bzr-command (bzr-command buffer okstatus file &rest args) | 93 | (defun vc-bzr-command (bzr-command buffer okstatus file &rest args) |
| @@ -128,29 +104,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' to the environment." | |||
| 128 | (process-connection-type nil)) | 104 | (process-connection-type nil)) |
| 129 | (apply 'vc-do-command buffer okstatus vc-bzr-program | 105 | (apply 'vc-do-command buffer okstatus vc-bzr-program |
| 130 | file bzr-command (append vc-bzr-program-args args)))) | 106 | file bzr-command (append vc-bzr-program-args args)))) |
| 131 | |||
| 132 | (unless (vc-bzr-at-least-version '(0 9)) | ||
| 133 | ;; For older versions, we fall back to washing the log buffer | ||
| 134 | ;; when all output has been gathered. | ||
| 135 | (defun vc-bzr-post-command-function (command file flags) | ||
| 136 | "`vc-post-command-functions' function to remove progress messages." | ||
| 137 | ;; Note that using this requires that the vc command is run | ||
| 138 | ;; synchronously. Otherwise, the ^Ms in the leading progress | ||
| 139 | ;; message on stdout cause the stream to be interpreted as having | ||
| 140 | ;; DOS line endings, losing the ^Ms, so the search fails. I don't | ||
| 141 | ;; know how this works under Windows. | ||
| 142 | (when (equal command vc-bzr-program) | ||
| 143 | (save-excursion | ||
| 144 | (goto-char (point-min)) | ||
| 145 | (if (looking-at "^\\(\r.*\r\\)[^\r]+$") | ||
| 146 | (replace-match "" nil nil nil 1))) | ||
| 147 | (save-excursion | ||
| 148 | (goto-char (point-min)) | ||
| 149 | ;; This is inserted by bzr 0.11 `log', at least | ||
| 150 | (while (looking-at "read knit.*\n") | ||
| 151 | (replace-match ""))))) | ||
| 152 | 107 | ||
| 153 | (add-hook 'vc-post-command-functions 'vc-bzr-post-command-function)) | ||
| 154 | 108 | ||
| 155 | ;;;###autoload | 109 | ;;;###autoload |
| 156 | (defconst vc-bzr-admin-dirname ".bzr") ; FIXME: "_bzr" on w32? | 110 | (defconst vc-bzr-admin-dirname ".bzr") ; FIXME: "_bzr" on w32? |
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 9fbf4db3160..38ddb35c976 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -62,8 +62,9 @@ interpreted as hostnames." | |||
| 62 | :type 'regexp | 62 | :type 'regexp |
| 63 | :group 'vc) | 63 | :group 'vc) |
| 64 | 64 | ||
| 65 | (defcustom vc-handled-backends '(RCS CVS BZR SVN SCCS HG Arch MCVS) | 65 | (defcustom vc-handled-backends '(RCS CVS SVN SCCS BZR HG Arch MCVS) |
| 66 | ;; Arch and MCVS come last because they are per-tree rather than per-dir. | 66 | ;; BZR, HG, Arch and MCVS come last because they are per-tree rather |
| 67 | ;; than per-dir. | ||
| 67 | "List of version control backends for which VC will be used. | 68 | "List of version control backends for which VC will be used. |
| 68 | Entries in this list will be tried in order to determine whether a | 69 | Entries in this list will be tried in order to determine whether a |
| 69 | file is under that sort of version control. | 70 | file is under that sort of version control. |
| @@ -71,7 +72,7 @@ Removing an entry from the list prevents VC from being activated | |||
| 71 | when visiting a file managed by that backend. | 72 | when visiting a file managed by that backend. |
| 72 | An empty list disables VC altogether." | 73 | An empty list disables VC altogether." |
| 73 | :type '(repeat symbol) | 74 | :type '(repeat symbol) |
| 74 | :version "21.1" | 75 | :version "23.1" |
| 75 | :group 'vc) | 76 | :group 'vc) |
| 76 | 77 | ||
| 77 | (defcustom vc-path | 78 | (defcustom vc-path |
diff --git a/lisp/vc.el b/lisp/vc.el index 04efe7fc2f0..a147f7e4dd0 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -224,7 +224,7 @@ | |||
| 224 | ;; The implementation should pass the value of vc-checkout-switches | 224 | ;; The implementation should pass the value of vc-checkout-switches |
| 225 | ;; to the backend command. | 225 | ;; to the backend command. |
| 226 | ;; | 226 | ;; |
| 227 | ;; - checkout (file &optional editable rev) | 227 | ;; * checkout (file &optional editable rev) |
| 228 | ;; | 228 | ;; |
| 229 | ;; Check out revision REV of FILE into the working area. If EDITABLE | 229 | ;; Check out revision REV of FILE into the working area. If EDITABLE |
| 230 | ;; is non-nil, FILE should be writable by the user and if locking is | 230 | ;; is non-nil, FILE should be writable by the user and if locking is |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 5102e723566..5dc45b43b33 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-07-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * files.texi (Magic File Names): Introduce optional parameter | ||
| 4 | IDENTIFICATION for `file-remote-p'. | ||
| 5 | |||
| 1 | 2007-07-14 Richard Stallman <rms@gnu.org> | 6 | 2007-07-14 Richard Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * control.texi (Handling Errors): Document `debug' in handler list. | 8 | * control.texi (Handling Errors): Document `debug' in handler list. |
diff --git a/lispref/files.texi b/lispref/files.texi index 343a6bc5e39..bfcbe476f95 100644 --- a/lispref/files.texi +++ b/lispref/files.texi | |||
| @@ -2768,7 +2768,7 @@ nothing and returns @code{nil}. Otherwise it returns the file name | |||
| 2768 | of the local copy file. | 2768 | of the local copy file. |
| 2769 | @end defun | 2769 | @end defun |
| 2770 | 2770 | ||
| 2771 | @defun file-remote-p filename &optional connected | 2771 | @defun file-remote-p filename &optional identification connected |
| 2772 | This function tests whether @var{filename} is a remote file. If | 2772 | This function tests whether @var{filename} is a remote file. If |
| 2773 | @var{filename} is local (not remote), the return value is @code{nil}. | 2773 | @var{filename} is local (not remote), the return value is @code{nil}. |
| 2774 | If @var{filename} is indeed remote, the return value is a string that | 2774 | If @var{filename} is indeed remote, the return value is a string that |
| @@ -2786,6 +2786,13 @@ example, that it is possible to start a remote process accessing both | |||
| 2786 | files at the same time. Implementors of file handlers need to ensure | 2786 | files at the same time. Implementors of file handlers need to ensure |
| 2787 | this principle is valid. | 2787 | this principle is valid. |
| 2788 | 2788 | ||
| 2789 | @var{identification} specifies which part of the identifier shall be | ||
| 2790 | returned as string. @var{identification} can be the symbol | ||
| 2791 | @code{method}, @code{user} or @code{host}; any other value is handled | ||
| 2792 | like @code{nil} and means to return the complete identifier string. | ||
| 2793 | In the example above, the remote @code{user} identifier string would | ||
| 2794 | be @code{root}. | ||
| 2795 | |||
| 2789 | If @var{connected} is non-@code{nil}, this function returns @code{nil} | 2796 | If @var{connected} is non-@code{nil}, this function returns @code{nil} |
| 2790 | even if @var{filename} is remote, if Emacs has no network connection | 2797 | even if @var{filename} is remote, if Emacs has no network connection |
| 2791 | to its host. This is useful when you want to avoid the delay of | 2798 | to its host. This is useful when you want to avoid the delay of |
diff --git a/man/ChangeLog b/man/ChangeLog index ad39b9fce15..827cff5a57f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2007-07-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * tramp.texi: Move @setfilename ../info/tramp up, outside the header | ||
| 4 | section. Reported by <poti@potis.org>. | ||
| 5 | (Remote processes): Arguments of the program to be debugged are taken | ||
| 6 | literally. | ||
| 7 | (Frequently Asked Questions): Simplify recentf example. | ||
| 8 | |||
| 9 | 2007-07-14 Karl Berry <karl@gnu.org> | ||
| 10 | |||
| 11 | * info.texi (@copying): New Back-Cover Text. | ||
| 12 | |||
| 13 | * info.texi (Quitting Info): Move to proper place in source. | ||
| 14 | (Reported by Benno Schulenberg.) | ||
| 15 | |||
| 1 | 2007-07-13 Eli Zaretskii <eliz@gnu.org> | 16 | 2007-07-13 Eli Zaretskii <eliz@gnu.org> |
| 2 | 17 | ||
| 3 | * Makefile.in (../info/emacs-mime): Use --enable-encoding. | 18 | * Makefile.in (../info/emacs-mime): Use --enable-encoding. |
diff --git a/man/info.texi b/man/info.texi index 1781ca0b3ea..285ef09554e 100644 --- a/man/info.texi +++ b/man/info.texi | |||
| @@ -26,9 +26,10 @@ Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the | |||
| 26 | license is included in the section entitled ``GNU Free Documentation | 26 | license is included in the section entitled ``GNU Free Documentation |
| 27 | License'' in the Emacs manual. | 27 | License'' in the Emacs manual. |
| 28 | 28 | ||
| 29 | (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify | 29 | (a) The FSF's Back-Cover Text is: ``You have freedom to copy and |
| 30 | this GNU Manual, like GNU software. Copies published by the Free | 30 | modify this GNU Manual, like GNU software. Buying copies from GNU |
| 31 | Software Foundation raise funds for GNU development.'' | 31 | Press supports the FSF in developing GNU and promoting software |
| 32 | freedom.'' | ||
| 32 | 33 | ||
| 33 | This document is part of a collection distributed under the GNU Free | 34 | This document is part of a collection distributed under the GNU Free |
| 34 | Documentation License. If you want to distribute this document | 35 | Documentation License. If you want to distribute this document |
| @@ -900,6 +901,39 @@ is @code{Info-top-node}. | |||
| 900 | @c If a menu appears at the end of this node, remove it. | 901 | @c If a menu appears at the end of this node, remove it. |
| 901 | @c It is an accident of the menu updating command. | 902 | @c It is an accident of the menu updating command. |
| 902 | 903 | ||
| 904 | @node Help-Q, , Help-Int, Getting Started | ||
| 905 | @comment node-name, next, previous, up | ||
| 906 | @section Quitting Info | ||
| 907 | |||
| 908 | @kindex q @r{(Info mode)} | ||
| 909 | @findex Info-exit | ||
| 910 | @cindex quitting Info mode | ||
| 911 | To get out of Info, back to what you were doing before, type @kbd{q} | ||
| 912 | for @dfn{Quit}. This runs @code{Info-exit} in Emacs. | ||
| 913 | |||
| 914 | This is the end of the basic course on using Info. You have learned | ||
| 915 | how to move in an Info document, and how to follow menus and cross | ||
| 916 | references. This makes you ready for reading manuals top to bottom, | ||
| 917 | as new users should do when they learn a new package. | ||
| 918 | |||
| 919 | Another set of Info commands is useful when you need to find | ||
| 920 | something quickly in a manual---that is, when you need to use a manual | ||
| 921 | as a reference rather than as a tutorial. We urge you to learn | ||
| 922 | these search commands as well. If you want to do that now, follow this | ||
| 923 | cross reference to @ref{Advanced}. | ||
| 924 | |||
| 925 | Yet another set of commands are meant for experienced users; you can | ||
| 926 | find them by looking in the Directory node for documentation on Info. | ||
| 927 | Finding them will be a good exercise in using Info in the usual | ||
| 928 | manner. | ||
| 929 | |||
| 930 | @format | ||
| 931 | >> Type @kbd{d} to go to the Info directory node; then type | ||
| 932 | @kbd{mInfo} and Return, to get to the node about Info and | ||
| 933 | see what other help is available. | ||
| 934 | @end format | ||
| 935 | |||
| 936 | |||
| 903 | @node Advanced | 937 | @node Advanced |
| 904 | @chapter Advanced Info Commands | 938 | @chapter Advanced Info Commands |
| 905 | 939 | ||
| @@ -926,6 +960,7 @@ an actual @samp{?} character, the simplest way is to insert it using | |||
| 926 | * Emacs Info Variables:: Variables modifying the behavior of Emacs Info. | 960 | * Emacs Info Variables:: Variables modifying the behavior of Emacs Info. |
| 927 | @end menu | 961 | @end menu |
| 928 | 962 | ||
| 963 | |||
| 929 | @node Search Text, Search Index, , Advanced | 964 | @node Search Text, Search Index, , Advanced |
| 930 | @comment node-name, next, previous, up | 965 | @comment node-name, next, previous, up |
| 931 | @section How to search Info documents | 966 | @section How to search Info documents |
| @@ -1390,39 +1425,6 @@ cannot expect this node to have a @samp{Next}, @samp{Previous} or | |||
| 1390 | >> Type @kbd{l} to return to the node where the cross reference was. | 1425 | >> Type @kbd{l} to return to the node where the cross reference was. |
| 1391 | @end format | 1426 | @end format |
| 1392 | 1427 | ||
| 1393 | @node Help-Q, , Help-Int, Getting Started | ||
| 1394 | @comment node-name, next, previous, up | ||
| 1395 | @section Quitting Info | ||
| 1396 | |||
| 1397 | @kindex q @r{(Info mode)} | ||
| 1398 | @findex Info-exit | ||
| 1399 | @cindex quitting Info mode | ||
| 1400 | To get out of Info, back to what you were doing before, type @kbd{q} | ||
| 1401 | for @dfn{Quit}. This runs @code{Info-exit} in Emacs. | ||
| 1402 | |||
| 1403 | This is the end of the basic course on using Info. You have learned | ||
| 1404 | how to move in an Info document, and how to follow menus and cross | ||
| 1405 | references. This makes you ready for reading manuals top to bottom, | ||
| 1406 | as new users should do when they learn a new package. | ||
| 1407 | |||
| 1408 | Another set of Info commands is useful when you need to find | ||
| 1409 | something quickly in a manual---that is, when you need to use a manual | ||
| 1410 | as a reference rather than as a tutorial. We urge you to learn | ||
| 1411 | these search commands as well. If you want to do that now, follow this | ||
| 1412 | cross reference to @ref{Advanced}. | ||
| 1413 | |||
| 1414 | Yet another set of commands are meant for experienced users; you can | ||
| 1415 | find them by looking in the Directory node for documentation on Info. | ||
| 1416 | Finding them will be a good exercise in using Info in the usual | ||
| 1417 | manner. | ||
| 1418 | |||
| 1419 | @format | ||
| 1420 | >> Type @kbd{d} to go to the Info directory node; then type | ||
| 1421 | @kbd{mInfo} and Return, to get to the node about Info and | ||
| 1422 | see what other help is available. | ||
| 1423 | @end format | ||
| 1424 | |||
| 1425 | |||
| 1426 | @node Tags, Checking, Cross-refs, Expert Info | 1428 | @node Tags, Checking, Cross-refs, Expert Info |
| 1427 | @comment node-name, next, previous, up | 1429 | @comment node-name, next, previous, up |
| 1428 | @section Tags Tables for Info Files | 1430 | @section Tags Tables for Info Files |
diff --git a/man/tramp.texi b/man/tramp.texi index 950b4055912..eac0a31e0e2 100644 --- a/man/tramp.texi +++ b/man/tramp.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | \input texinfo @c -*-texinfo-*- | 1 | \input texinfo @c -*-texinfo-*- |
| 2 | @c %**start of header | ||
| 3 | @setfilename ../info/tramp | 2 | @setfilename ../info/tramp |
| 3 | @c %**start of header | ||
| 4 | @settitle TRAMP User Manual | 4 | @settitle TRAMP User Manual |
| 5 | @setchapternewpage odd | 5 | @setchapternewpage odd |
| 6 | @c %**end of header | 6 | @c %**end of header |
| @@ -2306,7 +2306,7 @@ uid=0(root) gid=0(root) groups=0(root) | |||
| 2306 | @end example | 2306 | @end example |
| 2307 | 2307 | ||
| 2308 | 2308 | ||
| 2309 | @anchor{Running a debugger on a remote host} | 2309 | @anchor{Running a debugger on a remote host} |
| 2310 | @subsection Running a debugger on a remote host | 2310 | @subsection Running a debugger on a remote host |
| 2311 | @cindex gud | 2311 | @cindex gud |
| 2312 | @cindex gdb | 2312 | @cindex gdb |
| @@ -2337,7 +2337,12 @@ Given you are in a buffer that belongs to the remote directory | |||
| 2337 | @end example | 2337 | @end example |
| 2338 | 2338 | ||
| 2339 | It is not possible to use just the absolute local part of a remote | 2339 | It is not possible to use just the absolute local part of a remote |
| 2340 | file name, like @kbd{perl -d /home/user/myprog.pl}, though. | 2340 | file name as program to debug, like @kbd{perl -d |
| 2341 | /home/user/myprog.pl}, though. | ||
| 2342 | |||
| 2343 | Arguments of the program to be debugged are taken literally. That | ||
| 2344 | means file names as arguments must be given as ordinary relative or | ||
| 2345 | absolute file names, without any remote specification. | ||
| 2341 | 2346 | ||
| 2342 | 2347 | ||
| 2343 | @node Bug Reports | 2348 | @node Bug Reports |
| @@ -2838,8 +2843,6 @@ their readability through a remote access: | |||
| 2838 | 2843 | ||
| 2839 | @lisp | 2844 | @lisp |
| 2840 | @ifset emacs | 2845 | @ifset emacs |
| 2841 | (require 'recentf) | ||
| 2842 | (add-to-list 'recentf-keep 'file-remote-p) | ||
| 2843 | (recentf-mode 1) | 2846 | (recentf-mode 1) |
| 2844 | @end ifset | 2847 | @end ifset |
| 2845 | @ifset xemacs | 2848 | @ifset xemacs |
diff --git a/nt/ChangeLog b/nt/ChangeLog index df2344dc3af..82157be6ade 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2007-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * makefile.w32-in (bootstrap, bootstrap-nmake, bootstrap-gmake): | ||
| 4 | Depend on cmdproxy. | ||
| 5 | (cleanall): Don't delete *~. | ||
| 6 | |||
| 7 | 2007-07-15 Jason Rumney <jasonr@gnu.org> | ||
| 8 | |||
| 9 | * inc/sys/socket.h (uint16_t): Define if C99 does not appear to | ||
| 10 | be fully supported. | ||
| 11 | |||
| 1 | 2007-07-14 Jason Rumney <jasonr@gnu.org> | 12 | 2007-07-14 Jason Rumney <jasonr@gnu.org> |
| 2 | 13 | ||
| 3 | * inc/sys/socket.h: Include winsock2.h and ws2tcpip.h instead | 14 | * inc/sys/socket.h: Include winsock2.h and ws2tcpip.h instead |
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index 2e52c74691e..a9825ee197d 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h | |||
| @@ -53,6 +53,11 @@ Boston, MA 02110-1301, USA. */ | |||
| 53 | 53 | ||
| 54 | #include <winsock2.h> | 54 | #include <winsock2.h> |
| 55 | #include <ws2tcpip.h> | 55 | #include <ws2tcpip.h> |
| 56 | /* process.c uses uint16_t (from C99) for IPv6, but | ||
| 57 | apparently it is not defined in some versions of mingw and msvc. */ | ||
| 58 | #ifndef UINT16_C | ||
| 59 | typedef unsigned short uint16_t; | ||
| 60 | #endif | ||
| 56 | 61 | ||
| 57 | /* redefine select to reference our version */ | 62 | /* redefine select to reference our version */ |
| 58 | #ifdef MUST_REDEF_SELECT | 63 | #ifdef MUST_REDEF_SELECT |
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in index f579855522e..69d53b357ae 100644 --- a/nt/makefile.w32-in +++ b/nt/makefile.w32-in | |||
| @@ -138,10 +138,12 @@ maybe-bootstrap-SH: doit | |||
| 138 | exit -1; \ | 138 | exit -1; \ |
| 139 | fi | 139 | fi |
| 140 | 140 | ||
| 141 | bootstrap: addsection bootstrap-$(MAKETYPE) | 141 | # Bootstrap depends on cmdproxy because some Lisp functions |
| 142 | # loaded during bootstrap may need to run shell commands. | ||
| 143 | bootstrap: addsection cmdproxy bootstrap-$(MAKETYPE) | ||
| 142 | $(MAKE) $(MFLAGS) $(XMFLAGS) all | 144 | $(MAKE) $(MFLAGS) $(XMFLAGS) all |
| 143 | 145 | ||
| 144 | bootstrap-nmake: addsection | 146 | bootstrap-nmake: addsection cmdproxy |
| 145 | cd ..\lisp | 147 | cd ..\lisp |
| 146 | $(MAKE) $(MFLAGS) bootstrap-clean | 148 | $(MAKE) $(MFLAGS) bootstrap-clean |
| 147 | cd ..\src | 149 | cd ..\src |
| @@ -151,18 +153,20 @@ bootstrap-nmake: addsection | |||
| 151 | cd ..\src | 153 | cd ..\src |
| 152 | $(MAKE) $(MFLAGS) bootstrap | 154 | $(MAKE) $(MFLAGS) bootstrap |
| 153 | $(MAKE) $(MFLAGS) bootstrap-clean | 155 | $(MAKE) $(MFLAGS) bootstrap-clean |
| 156 | $(CP) $(BLD)/cmdproxy.exe ../bin | ||
| 154 | cd ..\lisp | 157 | cd ..\lisp |
| 155 | $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap | 158 | $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap |
| 156 | cd ..\lib-src | 159 | cd ..\lib-src |
| 157 | $(MAKE) $(MFLAGS) DOC | 160 | $(MAKE) $(MFLAGS) DOC |
| 158 | cd ..\nt | 161 | cd ..\nt |
| 159 | 162 | ||
| 160 | bootstrap-gmake: addsection | 163 | bootstrap-gmake: addsection cmdproxy |
| 161 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean | 164 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean |
| 162 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean | 165 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean |
| 163 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean | 166 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean |
| 164 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap | 167 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap |
| 165 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean | 168 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean |
| 169 | $(CP) $(BLD)/cmdproxy.exe ../bin | ||
| 166 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap | 170 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap |
| 167 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC | 171 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC |
| 168 | 172 | ||
| @@ -248,7 +252,7 @@ info-gmake: | |||
| 248 | # Maintenance | 252 | # Maintenance |
| 249 | # | 253 | # |
| 250 | clean: clean-other-dirs-$(MAKETYPE) | 254 | clean: clean-other-dirs-$(MAKETYPE) |
| 251 | - $(DEL) *~ $(COMPILER_TEMP_FILES) | 255 | - $(DEL) $(COMPILER_TEMP_FILES) |
| 252 | - $(DEL_TREE) $(OBJDIR) | 256 | - $(DEL_TREE) $(OBJDIR) |
| 253 | - $(DEL) stamp_BLD | 257 | - $(DEL) stamp_BLD |
| 254 | - $(DEL) ../etc/DOC ../etc/DOC-X | 258 | - $(DEL) ../etc/DOC ../etc/DOC-X |
| @@ -287,6 +291,8 @@ cleanall-other-dirs-gmake: | |||
| 287 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall | 291 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall |
| 288 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall | 292 | $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall |
| 289 | 293 | ||
| 294 | # We used to delete *~ here, but that might inadvertently remove | ||
| 295 | # precious files if it happens to match their short 8+3 aliases. | ||
| 290 | cleanall: clean cleanall-other-dirs-$(MAKETYPE) | 296 | cleanall: clean cleanall-other-dirs-$(MAKETYPE) |
| 291 | - $(DEL_TREE) obj | 297 | - $(DEL_TREE) obj |
| 292 | - $(DEL_TREE) obj-spd | 298 | - $(DEL_TREE) obj-spd |
diff --git a/src/ChangeLog b/src/ChangeLog index 76c8c8ef163..af29937753c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,46 @@ | |||
| 1 | 2007-07-17 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * window.c (Fdisplay_buffer): If largest or LRU window is the | ||
| 4 | only window, split it even if it is not eligible for splitting. | ||
| 5 | This restores the original behavior broken by the 2007-07-15 | ||
| 6 | change. | ||
| 7 | |||
| 8 | 2007-07-17 Glenn Morris <rgm@gnu.org> | ||
| 9 | |||
| 10 | * abbrev.c (abbrev_check_chars): New function. | ||
| 11 | (Fdefine_global_abbrev, Fdefine_mode_abbrev): Call | ||
| 12 | abbrev_check_chars to check abbrev characters are word | ||
| 13 | constituents. Doc fix. | ||
| 14 | |||
| 15 | 2007-07-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 16 | |||
| 17 | * process.c (Fstart_process, Fmake_network_process) | ||
| 18 | (read_process_output): Fix up last changes. | ||
| 19 | |||
| 20 | 2007-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 21 | |||
| 22 | * makefile.w32-in (clean): Don't delete *~. | ||
| 23 | |||
| 24 | 2007-07-16 Andreas Schwab <schwab@suse.de> | ||
| 25 | |||
| 26 | * window.c (Fdisplay_buffer): Use NILP. | ||
| 27 | (Fset_window_scroll_bars): Likewise. | ||
| 28 | |||
| 29 | 2007-07-15 Martin Rudalics <rudalics@gmx.at> | ||
| 30 | |||
| 31 | * window.c (window_min_size_2): New function. | ||
| 32 | (window_min_size_1, size_window, Fdisplay_buffer) | ||
| 33 | (Fsplit_window, adjust_window_trailing_edge): Use it to avoid | ||
| 34 | windows without mode- or header-lines when window-min-height is | ||
| 35 | too small. | ||
| 36 | (size_window): Reset nodelete_p after testing it, following an | ||
| 37 | earlier note by Kim F. Storm. | ||
| 38 | (display_buffer): Do not set split_height_threshold to twice the | ||
| 39 | value of window_min_height to avoid changing the value of a | ||
| 40 | customizable variable. Rather explicitly check whether the | ||
| 41 | height of the window that shall be splitted is at least as large | ||
| 42 | as split_height_threshold. | ||
| 43 | |||
| 1 | 2007-07-14 Jason Rumney <jasonr@gnu.org> | 44 | 2007-07-14 Jason Rumney <jasonr@gnu.org> |
| 2 | 45 | ||
| 3 | * process.c [WINDOWSNT]: Don't undefine AF_INET6. | 46 | * process.c [WINDOWSNT]: Don't undefine AF_INET6. |
diff --git a/src/abbrev.c b/src/abbrev.c index cb8e334591c..dd075364507 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -172,12 +172,79 @@ overwrite a non-system abbreviation of the same name. */) | |||
| 172 | return name; | 172 | return name; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | /* Check if the characters in ABBREV have word syntax in either the | ||
| 176 | * current (if global == 0) or standard syntax table. */ | ||
| 177 | static void | ||
| 178 | abbrev_check_chars (abbrev, global) | ||
| 179 | Lisp_Object abbrev; | ||
| 180 | int global; | ||
| 181 | { | ||
| 182 | int i, i_byte, len, nbad = 0; | ||
| 183 | int j, found, nuniq = 0; | ||
| 184 | char *badchars, *baduniq; | ||
| 185 | |||
| 186 | CHECK_STRING (abbrev); | ||
| 187 | len = SCHARS (abbrev); | ||
| 188 | |||
| 189 | badchars = (char *) alloca (len + 1); | ||
| 190 | |||
| 191 | for (i = 0, i_byte = 0; i < len; ) | ||
| 192 | { | ||
| 193 | int c; | ||
| 194 | |||
| 195 | FETCH_STRING_CHAR_ADVANCE (c, abbrev, i, i_byte); | ||
| 196 | |||
| 197 | if (global) | ||
| 198 | { | ||
| 199 | /* Copied from SYNTAX in syntax.h, except using FOLLOW_PARENT. */ | ||
| 200 | Lisp_Object syntax_temp | ||
| 201 | = SYNTAX_ENTRY_FOLLOW_PARENT (Vstandard_syntax_table, c); | ||
| 202 | if ( (CONSP (syntax_temp) | ||
| 203 | ? (enum syntaxcode) (XINT (XCAR (syntax_temp)) & 0xff) | ||
| 204 | : Swhitespace) != Sword ) badchars[nbad++] = c; | ||
| 205 | } | ||
| 206 | else if (SYNTAX (c) != Sword) | ||
| 207 | badchars[nbad++] = c; | ||
| 208 | } | ||
| 209 | |||
| 210 | if (nbad == 0) return; | ||
| 211 | |||
| 212 | baduniq = (char *) alloca (nbad + 1); | ||
| 213 | |||
| 214 | for (i = 0; i < nbad; i++) | ||
| 215 | { | ||
| 216 | found = 0; | ||
| 217 | |||
| 218 | for (j = 0; j < nuniq; j++) | ||
| 219 | { | ||
| 220 | if (badchars[i] == baduniq[j]) | ||
| 221 | { | ||
| 222 | found = 1; | ||
| 223 | break; | ||
| 224 | } | ||
| 225 | } | ||
| 226 | |||
| 227 | if (found) continue ; | ||
| 228 | |||
| 229 | baduniq[nuniq++] = badchars[i]; | ||
| 230 | } | ||
| 231 | |||
| 232 | baduniq[nuniq] = '\0'; | ||
| 233 | |||
| 234 | error ("Some abbrev characters (%s) are not word constituents %s", | ||
| 235 | baduniq, global ? "in the standard syntax" : "in this mode" ); | ||
| 236 | } | ||
| 237 | |||
| 175 | DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, 2, | 238 | DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, 2, |
| 176 | "sDefine global abbrev: \nsExpansion for %s: ", | 239 | "sDefine global abbrev: \nsExpansion for %s: ", |
| 177 | doc: /* Define ABBREV as a global abbreviation for EXPANSION. */) | 240 | doc: /* Define ABBREV as a global abbreviation for EXPANSION. |
| 241 | The characters in ABBREV must all be word constituents in the standard | ||
| 242 | syntax table. */) | ||
| 178 | (abbrev, expansion) | 243 | (abbrev, expansion) |
| 179 | Lisp_Object abbrev, expansion; | 244 | Lisp_Object abbrev, expansion; |
| 180 | { | 245 | { |
| 246 | abbrev_check_chars (abbrev, 1); | ||
| 247 | |||
| 181 | Fdefine_abbrev (Vglobal_abbrev_table, Fdowncase (abbrev), | 248 | Fdefine_abbrev (Vglobal_abbrev_table, Fdowncase (abbrev), |
| 182 | expansion, Qnil, make_number (0), Qnil); | 249 | expansion, Qnil, make_number (0), Qnil); |
| 183 | return abbrev; | 250 | return abbrev; |
| @@ -185,13 +252,16 @@ DEFUN ("define-global-abbrev", Fdefine_global_abbrev, Sdefine_global_abbrev, 2, | |||
| 185 | 252 | ||
| 186 | DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2, | 253 | DEFUN ("define-mode-abbrev", Fdefine_mode_abbrev, Sdefine_mode_abbrev, 2, 2, |
| 187 | "sDefine mode abbrev: \nsExpansion for %s: ", | 254 | "sDefine mode abbrev: \nsExpansion for %s: ", |
| 188 | doc: /* Define ABBREV as a mode-specific abbreviation for EXPANSION. */) | 255 | doc: /* Define ABBREV as a mode-specific abbreviation for EXPANSION. |
| 256 | The characters in ABBREV must all be word-constituents in the current mode. */) | ||
| 189 | (abbrev, expansion) | 257 | (abbrev, expansion) |
| 190 | Lisp_Object abbrev, expansion; | 258 | Lisp_Object abbrev, expansion; |
| 191 | { | 259 | { |
| 192 | if (NILP (current_buffer->abbrev_table)) | 260 | if (NILP (current_buffer->abbrev_table)) |
| 193 | error ("Major mode has no abbrev table"); | 261 | error ("Major mode has no abbrev table"); |
| 194 | 262 | ||
| 263 | abbrev_check_chars (abbrev, 0); | ||
| 264 | |||
| 195 | Fdefine_abbrev (current_buffer->abbrev_table, Fdowncase (abbrev), | 265 | Fdefine_abbrev (current_buffer->abbrev_table, Fdowncase (abbrev), |
| 196 | expansion, Qnil, make_number (0), Qnil); | 266 | expansion, Qnil, make_number (0), Qnil); |
| 197 | return abbrev; | 267 | return abbrev; |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 280429b5a71..ea5382ff9f3 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -257,8 +257,10 @@ install: $(ALL) | |||
| 257 | # | 257 | # |
| 258 | # Maintenance | 258 | # Maintenance |
| 259 | # | 259 | # |
| 260 | # We used to delete *~, s/*~, m/*~ here, but that might inadvertently | ||
| 261 | # remove precious files if it happens to match their short 8+3 aliases. | ||
| 260 | clean: | 262 | clean: |
| 261 | - $(DEL) *~ "s/*~" "m/*~" | 263 | - $(DEL) "s/*.h~" "m/*.h~" |
| 262 | - $(DEL) $(COMPILER_TEMP_FILES) | 264 | - $(DEL) $(COMPILER_TEMP_FILES) |
| 263 | - $(DEL_TREE) $(OBJDIR) | 265 | - $(DEL_TREE) $(OBJDIR) |
| 264 | - $(DEL) stamp_BLD | 266 | - $(DEL) stamp_BLD |
diff --git a/src/process.c b/src/process.c index 5551c0610d0..30cc13cfb2c 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1775,7 +1775,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1775 | XPROCESS (proc)->encoding_buf = make_uninit_string (0); | 1775 | XPROCESS (proc)->encoding_buf = make_uninit_string (0); |
| 1776 | 1776 | ||
| 1777 | XPROCESS (proc)->inherit_coding_system_flag | 1777 | XPROCESS (proc)->inherit_coding_system_flag |
| 1778 | = (NILP (buffer) || !inherit_process_coding_system); | 1778 | = !(NILP (buffer) || !inherit_process_coding_system); |
| 1779 | 1779 | ||
| 1780 | create_process (proc, (char **) new_argv, current_dir); | 1780 | create_process (proc, (char **) new_argv, current_dir); |
| 1781 | 1781 | ||
| @@ -3547,7 +3547,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3547 | p->encoding_buf = make_uninit_string (0); | 3547 | p->encoding_buf = make_uninit_string (0); |
| 3548 | 3548 | ||
| 3549 | p->inherit_coding_system_flag | 3549 | p->inherit_coding_system_flag |
| 3550 | = (!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); | 3550 | = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); |
| 3551 | 3551 | ||
| 3552 | UNGCPRO; | 3552 | UNGCPRO; |
| 3553 | return proc; | 3553 | return proc; |
| @@ -5176,7 +5176,7 @@ read_process_output (proc, channel) | |||
| 5176 | p->decoding_carryover = coding->carryover_bytes; | 5176 | p->decoding_carryover = coding->carryover_bytes; |
| 5177 | } | 5177 | } |
| 5178 | /* Adjust the multibyteness of TEXT to that of the filter. */ | 5178 | /* Adjust the multibyteness of TEXT to that of the filter. */ |
| 5179 | if (p->filter_multibyte != STRING_MULTIBYTE (text)) | 5179 | if (!p->filter_multibyte != !STRING_MULTIBYTE (text)) |
| 5180 | text = (STRING_MULTIBYTE (text) | 5180 | text = (STRING_MULTIBYTE (text) |
| 5181 | ? Fstring_as_unibyte (text) | 5181 | ? Fstring_as_unibyte (text) |
| 5182 | : Fstring_to_multibyte (text)); | 5182 | : Fstring_to_multibyte (text)); |
diff --git a/src/window.c b/src/window.c index 42a33828d8d..59b70152b09 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -62,6 +62,7 @@ static void window_scroll P_ ((Lisp_Object, int, int, int)); | |||
| 62 | static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); | 62 | static void window_scroll_pixel_based P_ ((Lisp_Object, int, int, int)); |
| 63 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); | 63 | static void window_scroll_line_based P_ ((Lisp_Object, int, int, int)); |
| 64 | static int window_min_size_1 P_ ((struct window *, int)); | 64 | static int window_min_size_1 P_ ((struct window *, int)); |
| 65 | static int window_min_size_2 P_ ((struct window *, int)); | ||
| 65 | static int window_min_size P_ ((struct window *, int, int, int *)); | 66 | static int window_min_size P_ ((struct window *, int, int, int *)); |
| 66 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); | 67 | static void size_window P_ ((Lisp_Object, int, int, int, int, int)); |
| 67 | static int freeze_window_start P_ ((struct window *, void *)); | 68 | static int freeze_window_start P_ ((struct window *, void *)); |
| @@ -2553,7 +2554,6 @@ check_frame_size (frame, rows, cols) | |||
| 2553 | *cols = MIN_SAFE_WINDOW_WIDTH; | 2554 | *cols = MIN_SAFE_WINDOW_WIDTH; |
| 2554 | } | 2555 | } |
| 2555 | 2556 | ||
| 2556 | |||
| 2557 | /* Value is non-zero if window W is fixed-size. WIDTH_P non-zero means | 2557 | /* Value is non-zero if window W is fixed-size. WIDTH_P non-zero means |
| 2558 | check if W's width can be changed, otherwise check W's height. | 2558 | check if W's width can be changed, otherwise check W's height. |
| 2559 | CHECK_SIBLINGS_P non-zero means check resizablity of WINDOW's | 2559 | CHECK_SIBLINGS_P non-zero means check resizablity of WINDOW's |
| @@ -2655,6 +2655,33 @@ window_fixed_size_p (w, width_p, check_siblings_p) | |||
| 2655 | return fixed_p; | 2655 | return fixed_p; |
| 2656 | } | 2656 | } |
| 2657 | 2657 | ||
| 2658 | /* Return the minimum size for leaf window W. WIDTH_P non-zero means | ||
| 2659 | take into account fringes and the scrollbar of W. WIDTH_P zero | ||
| 2660 | means take into account mode-line and header-line of W. Return 1 | ||
| 2661 | for the minibuffer. */ | ||
| 2662 | |||
| 2663 | static int | ||
| 2664 | window_min_size_2 (w, width_p) | ||
| 2665 | struct window *w; | ||
| 2666 | int width_p; | ||
| 2667 | { | ||
| 2668 | int size; | ||
| 2669 | |||
| 2670 | if (width_p) | ||
| 2671 | size = max (window_min_width, | ||
| 2672 | (MIN_SAFE_WINDOW_WIDTH | ||
| 2673 | + WINDOW_FRINGE_COLS (w) | ||
| 2674 | + WINDOW_SCROLL_BAR_COLS (w))); | ||
| 2675 | else if (MINI_WINDOW_P (w)) | ||
| 2676 | size = 1; | ||
| 2677 | else | ||
| 2678 | size = max (window_min_height, | ||
| 2679 | (MIN_SAFE_WINDOW_HEIGHT | ||
| 2680 | + (WINDOW_WANTS_MODELINE_P (w) ? 1 : 0) | ||
| 2681 | + (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ))); | ||
| 2682 | |||
| 2683 | return size; | ||
| 2684 | } | ||
| 2658 | 2685 | ||
| 2659 | /* Return the minimum size of window W, not taking fixed-width windows | 2686 | /* Return the minimum size of window W, not taking fixed-width windows |
| 2660 | into account. WIDTH_P non-zero means return the minimum width, | 2687 | into account. WIDTH_P non-zero means return the minimum width, |
| @@ -2724,22 +2751,7 @@ window_min_size_1 (w, width_p) | |||
| 2724 | } | 2751 | } |
| 2725 | } | 2752 | } |
| 2726 | else | 2753 | else |
| 2727 | { | 2754 | size = window_min_size_2 (w, width_p); |
| 2728 | if (width_p) | ||
| 2729 | size = max (window_min_width, | ||
| 2730 | (MIN_SAFE_WINDOW_WIDTH | ||
| 2731 | + WINDOW_FRINGE_COLS (w) | ||
| 2732 | + WINDOW_SCROLL_BAR_COLS (w))); | ||
| 2733 | else | ||
| 2734 | { | ||
| 2735 | if (MINI_WINDOW_P (w) | ||
| 2736 | || (!WINDOW_WANTS_MODELINE_P (w) | ||
| 2737 | && !WINDOW_WANTS_HEADER_LINE_P (w))) | ||
| 2738 | size = 1; | ||
| 2739 | else | ||
| 2740 | size = window_min_height; | ||
| 2741 | } | ||
| 2742 | } | ||
| 2743 | 2755 | ||
| 2744 | return size; | 2756 | return size; |
| 2745 | } | 2757 | } |
| @@ -2981,11 +2993,6 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) | |||
| 2981 | Lisp_Object child, *forward, *sideward; | 2993 | Lisp_Object child, *forward, *sideward; |
| 2982 | int old_size, min_size, safe_min_size; | 2994 | int old_size, min_size, safe_min_size; |
| 2983 | 2995 | ||
| 2984 | /* We test nodelete_p != 2 and nodelete_p != 1 below, so it | ||
| 2985 | seems like it's too soon to do this here. ++KFS. */ | ||
| 2986 | if (nodelete_p == 2) | ||
| 2987 | nodelete_p = 0; | ||
| 2988 | |||
| 2989 | check_min_window_sizes (); | 2996 | check_min_window_sizes (); |
| 2990 | size = max (0, size); | 2997 | size = max (0, size); |
| 2991 | 2998 | ||
| @@ -2996,22 +3003,23 @@ size_window (window, size, width_p, nodelete_p, first_only, last_only) | |||
| 2996 | { | 3003 | { |
| 2997 | old_size = WINDOW_TOTAL_COLS (w); | 3004 | old_size = WINDOW_TOTAL_COLS (w); |
| 2998 | min_size = window_min_width; | 3005 | min_size = window_min_width; |
| 2999 | /* Ensure that there is room for the scroll bar and fringes! | 3006 | safe_min_size = window_min_size_2 (w, 1); |
| 3000 | We may reduce display margins though. */ | ||
| 3001 | safe_min_size = (MIN_SAFE_WINDOW_WIDTH | ||
| 3002 | + WINDOW_FRINGE_COLS (w) | ||
| 3003 | + WINDOW_SCROLL_BAR_COLS (w)); | ||
| 3004 | } | 3007 | } |
| 3005 | else | 3008 | else |
| 3006 | { | 3009 | { |
| 3007 | old_size = XINT (w->total_lines); | 3010 | old_size = XINT (w->total_lines); |
| 3008 | min_size = window_min_height; | 3011 | min_size = window_min_height; |
| 3009 | safe_min_size = MIN_SAFE_WINDOW_HEIGHT; | 3012 | safe_min_size = window_min_size_2 (w, 0); |
| 3010 | } | 3013 | } |
| 3011 | 3014 | ||
| 3012 | if (old_size < min_size && nodelete_p != 2) | 3015 | if (old_size < min_size && nodelete_p != 2) |
| 3013 | w->too_small_ok = Qt; | 3016 | w->too_small_ok = Qt; |
| 3014 | 3017 | ||
| 3018 | /* Move the following test here since otherwise the | ||
| 3019 | preceding test doesn't make sense. martin. */ | ||
| 3020 | if (nodelete_p == 2) | ||
| 3021 | nodelete_p = 0; | ||
| 3022 | |||
| 3015 | /* Maybe delete WINDOW if it's too small. */ | 3023 | /* Maybe delete WINDOW if it's too small. */ |
| 3016 | if (nodelete_p != 1 && !NILP (w->parent)) | 3024 | if (nodelete_p != 1 && !NILP (w->parent)) |
| 3017 | { | 3025 | { |
| @@ -3708,9 +3716,6 @@ displayed. */) | |||
| 3708 | frames = Qnil; | 3716 | frames = Qnil; |
| 3709 | if (FRAME_MINIBUF_ONLY_P (f)) | 3717 | if (FRAME_MINIBUF_ONLY_P (f)) |
| 3710 | XSETFRAME (frames, last_nonminibuf_frame); | 3718 | XSETFRAME (frames, last_nonminibuf_frame); |
| 3711 | /* Don't try to create a window if we would get an error. */ | ||
| 3712 | if (split_height_threshold < window_min_height << 1) | ||
| 3713 | split_height_threshold = window_min_height << 1; | ||
| 3714 | 3719 | ||
| 3715 | /* Note that both Fget_largest_window and Fget_lru_window | 3720 | /* Note that both Fget_largest_window and Fget_lru_window |
| 3716 | ignore minibuffers and dedicated windows. | 3721 | ignore minibuffers and dedicated windows. |
| @@ -3733,25 +3738,30 @@ displayed. */) | |||
| 3733 | else | 3738 | else |
| 3734 | window = Fget_largest_window (frames, Qt); | 3739 | window = Fget_largest_window (frames, Qt); |
| 3735 | 3740 | ||
| 3736 | /* If we got a tall enough full-width window that can be split, | 3741 | /* If the largest window is tall enough, full-width, and either eligible |
| 3737 | split it. */ | 3742 | for splitting or the only window, split it. */ |
| 3738 | if (!NILP (window) | 3743 | if (!NILP (window) |
| 3739 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3744 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
| 3740 | && window_height (window) >= split_height_threshold | 3745 | && WINDOW_FULL_WIDTH_P (XWINDOW (window)) |
| 3741 | && WINDOW_FULL_WIDTH_P (XWINDOW (window))) | 3746 | && (window_height (window) >= split_height_threshold |
| 3747 | || (NILP (XWINDOW (window)->parent))) | ||
| 3748 | && (window_height (window) | ||
| 3749 | >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | ||
| 3742 | window = Fsplit_window (window, Qnil, Qnil); | 3750 | window = Fsplit_window (window, Qnil, Qnil); |
| 3743 | else | 3751 | else |
| 3744 | { | 3752 | { |
| 3745 | Lisp_Object upper, other; | 3753 | Lisp_Object upper, other; |
| 3746 | 3754 | ||
| 3747 | window = Fget_lru_window (frames, Qt); | 3755 | window = Fget_lru_window (frames, Qt); |
| 3748 | /* If the LRU window is selected, and big enough, | 3756 | /* If the LRU window is tall enough, and either eligible for splitting |
| 3749 | and can be split, split it. */ | 3757 | and selected or the only window, split it. */ |
| 3750 | if (!NILP (window) | 3758 | if (!NILP (window) |
| 3751 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) | 3759 | && ! FRAME_NO_SPLIT_P (XFRAME (XWINDOW (window)->frame)) |
| 3752 | && (EQ (window, selected_window) | 3760 | && ((EQ (window, selected_window) |
| 3753 | || EQ (XWINDOW (window)->parent, Qnil)) | 3761 | && window_height (window) >= split_height_threshold) |
| 3754 | && window_height (window) >= window_min_height << 1) | 3762 | || (NILP (XWINDOW (window)->parent))) |
| 3763 | && (window_height (window) | ||
| 3764 | >= (2 * window_min_size_2 (XWINDOW (window), 0)))) | ||
| 3755 | window = Fsplit_window (window, Qnil, Qnil); | 3765 | window = Fsplit_window (window, Qnil, Qnil); |
| 3756 | else | 3766 | else |
| 3757 | window = Fget_lru_window (frames, Qnil); | 3767 | window = Fget_lru_window (frames, Qnil); |
| @@ -4000,9 +4010,11 @@ See Info node `(elisp)Splitting Windows' for more details and examples.*/) | |||
| 4000 | 4010 | ||
| 4001 | if (NILP (horflag)) | 4011 | if (NILP (horflag)) |
| 4002 | { | 4012 | { |
| 4003 | if (size_int < window_min_height) | 4013 | int window_safe_height = window_min_size_2 (o, 0); |
| 4014 | |||
| 4015 | if (size_int < window_safe_height) | ||
| 4004 | error ("Window height %d too small (after splitting)", size_int); | 4016 | error ("Window height %d too small (after splitting)", size_int); |
| 4005 | if (size_int + window_min_height > XFASTINT (o->total_lines)) | 4017 | if (size_int + window_safe_height > XFASTINT (o->total_lines)) |
| 4006 | error ("Window height %d too small (after splitting)", | 4018 | error ("Window height %d too small (after splitting)", |
| 4007 | XFASTINT (o->total_lines) - size_int); | 4019 | XFASTINT (o->total_lines) - size_int); |
| 4008 | if (NILP (o->parent) | 4020 | if (NILP (o->parent) |
| @@ -4015,10 +4027,11 @@ See Info node `(elisp)Splitting Windows' for more details and examples.*/) | |||
| 4015 | } | 4027 | } |
| 4016 | else | 4028 | else |
| 4017 | { | 4029 | { |
| 4018 | if (size_int < window_min_width) | 4030 | int window_safe_width = window_min_size_2 (o, 1); |
| 4031 | |||
| 4032 | if (size_int < window_safe_width) | ||
| 4019 | error ("Window width %d too small (after splitting)", size_int); | 4033 | error ("Window width %d too small (after splitting)", size_int); |
| 4020 | 4034 | if (size_int + window_safe_width > XFASTINT (o->total_cols)) | |
| 4021 | if (size_int + window_min_width > XFASTINT (o->total_cols)) | ||
| 4022 | error ("Window width %d too small (after splitting)", | 4035 | error ("Window width %d too small (after splitting)", |
| 4023 | XFASTINT (o->total_cols) - size_int); | 4036 | XFASTINT (o->total_cols) - size_int); |
| 4024 | if (NILP (o->parent) | 4037 | if (NILP (o->parent) |
| @@ -4499,7 +4512,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag) | |||
| 4499 | 4512 | ||
| 4500 | /* Don't make this window too small. */ | 4513 | /* Don't make this window too small. */ |
| 4501 | if (XINT (CURSIZE (window)) + delta | 4514 | if (XINT (CURSIZE (window)) + delta |
| 4502 | < (horiz_flag ? window_min_width : window_min_height)) | 4515 | < window_min_size_2 (XWINDOW (window), horiz_flag)) |
| 4503 | { | 4516 | { |
| 4504 | Fset_window_configuration (old_config); | 4517 | Fset_window_configuration (old_config); |
| 4505 | error ("Cannot adjust window size as specified"); | 4518 | error ("Cannot adjust window size as specified"); |
| @@ -6897,7 +6910,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) | |||
| 6897 | vertical_type = Qnil; | 6910 | vertical_type = Qnil; |
| 6898 | } | 6911 | } |
| 6899 | 6912 | ||
| 6900 | if (!(EQ (vertical_type, Qnil) | 6913 | if (!(NILP (vertical_type) |
| 6901 | || EQ (vertical_type, Qleft) | 6914 | || EQ (vertical_type, Qleft) |
| 6902 | || EQ (vertical_type, Qright) | 6915 | || EQ (vertical_type, Qright) |
| 6903 | || EQ (vertical_type, Qt))) | 6916 | || EQ (vertical_type, Qt))) |
| @@ -7589,4 +7602,4 @@ keys_of_window () | |||
| 7589 | } | 7602 | } |
| 7590 | 7603 | ||
| 7591 | /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f | 7604 | /* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f |
| 7592 | (do not change this comment) */ | 7605 | (do not change thisc omment) */ |