commit 44ee91d82ef7e6075f37f1516e1e1b2fc6968083 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Sun Apr 2 23:09:53 2017 -0400 * lisp/ses.el: Silence byte-compiler warnings. (ses-jump, ses-recalculate-cell, ses-define-local-printer): Silence byte-compiler warnings. diff --git a/lisp/ses.el b/lisp/ses.el index 66fc0c5ebd..0fcd50c973 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2215,7 +2215,8 @@ Based on the current set of columns and `window-hscroll' position." (s (completing-read "Jump to cell: " (and ses--named-cell-hashmap - (progn (maphash (lambda (key val) (push (symbol-name key) names)) + (progn (maphash (lambda (key _val) + (push (symbol-name key) names)) ses--named-cell-hashmap) names))))) (if @@ -2272,10 +2273,10 @@ print area if NONARROW is nil." ;; (defvar maxrow) ;; (defvar maxcol) -(defun ses-recalculate-cell (&optional ses--curcell) +(defun ses-recalculate-cell (&optional curcell) "Recalculate and reprint the current cell or range. -If SES--CURCELL is non nil use it as current cell or range +If CURCELL is non nil use it as current cell or range without any check, otherwise function (ses-check-curcell 'range) is called. @@ -2284,7 +2285,8 @@ signals one, or otherwise shows the cell's complete value. For a range, the cells are recalculated in \"natural\" order, so cells that other cells refer to are recalculated first." (interactive "*") - (or ses--curcell (ses-check-curcell 'range)) + (if curcell (setq ses--curcell curcell) + (ses-check-curcell 'range)) (ses-begin-change) (ses-initialize-Dijkstra-attempt) (let (sig cur-rowcol) @@ -3572,7 +3574,7 @@ the current definition is proposed as default value, and the function is redefined." (interactive (let (name def already-defined-names) - (maphash (lambda (key val) (push (symbol-name key) already-defined-names)) + (maphash (lambda (key _val) (push (symbol-name key) already-defined-names)) ses--local-printer-hashmap) (setq name (completing-read "Enter printer name: " already-defined-names)) (when (string= name "") commit 8e394a7f35c2ba9297d222faa2689e177f268924 Author: Paul Eggert Date: Sun Apr 2 13:09:56 2017 -0700 Fix bugs in simplified test dependencies Problem reported by Glenn Morris in: http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00017.html * test/Makefile.in (LOGFILES, TESTS): Omit leading "./". (TESTS): Omit unnecessary patsubst. (test_template): Redo dependency heuristic, hopefully correctly this time. It's the .log file that depends, not the phony test target. Declare the phonies to be PHONY. Resurrect the exception for the *-tests subdirectory. Adjust to the fact that leading "./" is omitted now. diff --git a/test/Makefile.in b/test/Makefile.in index d218b64005..a1b772de21 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -128,8 +128,8 @@ ELFILES := $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \ -name "*resources" -prune -o -name "*.el" -print) ## .log files may be in a different directory for out of source builds LOGFILES := $(patsubst %.el,%.log, \ - $(patsubst $(srcdir)%,.%,$(ELFILES))) -TESTS := $(subst ${srcdir}/,,$(LOGFILES:.log=)) + $(patsubst $(srcdir)/%,%,$(ELFILES))) +TESTS := $(LOGFILES:.log=) ## If we have to interrupt a hanging test, preserve the log so we can ## see what the problem was. @@ -137,20 +137,24 @@ TESTS := $(subst ${srcdir}/,,$(LOGFILES:.log=)) .PHONY: ${TESTS} -## The short aliases that always re-run the tests, with no logging. -## Define an alias both with and without the directory name for ease -## of use. define test_template - ifeq (,$(patsubst $(srcdir)/src/%,,$(1))) - $(1): $(srcdir)/../src/$(1:.log=.c) - else - $(1): $(srcdir)/../lisp/$(1:.log=.el) + ## A test FOO-tests depends on the source file with the similar + ## name, unless FOO itself contains the string '-tests/'. + ## The similar name is FOO.c if FOO begins with 'src/', FOO.el + ## otherwise. Although this heuristic does not identify all the + ## dependencies, it is better than nothing. + ifeq (,$(patsubst %-tests,,$(1))$(findstring -tests/,$(1))) + $(1).log: $(patsubst %-tests,$(srcdir)/../%,$(1))$(if \ + $(patsubst src/%,,$(1)),.el,.c) endif -$(1): - @test ! -f ./$(1).log || mv ./$(1).log ./$(1).log~ - @${MAKE} ./$(1).log WRITE_LOG= -$(notdir $(1)): $(1) + ## Short aliases that always re-run the tests, with no logging. + ## Define both with and without the directory name for ease of use. + .PHONY: $(1) $(notdir $(1)) + $(1): + @test ! -f $(1).log || mv $(1).log $(1).log~ + @$(MAKE) $(1).log WRITE_LOG= + $(notdir $(1)): $(1) endef $(foreach test,${TESTS},$(eval $(call test_template,${test}))) @@ -173,9 +177,7 @@ check-expensive: mostlyclean check-no-automated-subdir ## Re-run all tests which are outdated. A test is outdated if its ## logfile is out-of-date with either the test file, or the source -## files that the tests depend on. The source file dependencies are -## determined by a heuristic and does not identify the full dependency -## graph. See test_template for details. +## files that the tests depend on. See test_template. .PHONY: check-maybe check-maybe: check-no-automated-subdir @${MAKE} check-doit SELECTOR="${SELECTOR_ACTUAL}" commit 2b18ecec5e662ac551963b532c43271a6c6434d4 Author: Wilfred Hughes Date: Sun Apr 2 19:29:14 2017 +0100 Fix typo in docstring * lisp/help.el: Fix typo. diff --git a/lisp/help.el b/lisp/help.el index d3aaa1e251..26be3b0e07 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1419,7 +1419,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." (defun help-function-arglist (def &optional preserve-names) "Return a formal argument list for the function DEF. -IF PRESERVE-NAMES is non-nil, return a formal arglist that uses +If PRESERVE-NAMES is non-nil, return a formal arglist that uses the same names as used in the original source code, when possible." ;; Handle symbols aliased to other symbols. (if (and (symbolp def) (fboundp def)) (setq def (indirect-function def))) commit 057d27760a7a186a1851630349e09e6c3c1ff26c Author: Glenn Morris Date: Sun Apr 2 12:11:26 2017 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 01a3e5d150..411969a542 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -5224,7 +5224,9 @@ You might also use mode hooks to specify it in certain modes, like this: (concat \"make -k \" (if buffer-file-name (shell-quote-argument - (file-name-sans-extension buffer-file-name))))))))") + (file-name-sans-extension buffer-file-name)))))))) + +It's often useful to leave a space at the end of the value.") (custom-autoload 'compile-command "compile" t) (put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) @@ -12465,12 +12467,10 @@ Copy directory-local variables to the -*- line. Non-nil means enable use of connection-local variables.") (autoload 'connection-local-set-profiles "files-x" "\ -Add PROFILES for remote servers. -CRITERIA is either a regular expression identifying a remote -server, or a function with one argument IDENTIFICATION, which -returns non-nil when a remote server shall apply PROFILE's -variables. If CRITERIA is nil, it always applies. -PROFILES are the names of a connection profile (a symbol). +Add PROFILES for CRITERIA. +CRITERIA is a plist identifying a connection and the application +using this connection, see `connection-local-criteria-alist'. +PROFILES are the names of connection profiles (a symbol). When a connection to a remote server is opened and CRITERIA matches to that server, the connection-local variables from @@ -12504,7 +12504,7 @@ will not be changed. (autoload 'with-connection-local-profiles "files-x" "\ Apply connection-local variables according to PROFILES in current buffer. -Execute BODY, and unwind connection local variables. +Execute BODY, and unwind connection-local variables. \(fn PROFILES &rest BODY)" nil t) @@ -15857,14 +15857,6 @@ This discards the buffer's undo information. ;;;*** -;;;### (autoloads "actual autoloads are elsewhere" "hfy-cmap" "hfy-cmap.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from hfy-cmap.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "hfy-cmap" '("hfy-" "htmlfontify-unload-rgb-file"))) - -;;;*** - ;;;### (autoloads nil "hi-lock" "hi-lock.el" (0 0 0 0)) ;;; Generated autoloads from hi-lock.el @@ -21868,7 +21860,7 @@ QUALITY can be: `approximate', in which case we may cut some corners to avoid excessive work. `exact', in which case we may end up re-(en/de)coding a large - part of the file/buffer. + part of the file/buffer, this can be expensive and slow. nil, in which case we may return nil rather than an approximation. \(fn BYTE &optional QUALITY CODING-SYSTEM)" nil nil) @@ -21882,7 +21874,7 @@ QUALITY can be: `approximate', in which case we may cut some corners to avoid excessive work. `exact', in which case we may end up re-(en/de)coding a large - part of the file/buffer. + part of the file/buffer, this can be expensive and slow. nil, in which case we may return nil rather than an approximation. \(fn POSITION &optional QUALITY CODING-SYSTEM)" nil nil) @@ -33879,7 +33871,7 @@ It can have the following values: (custom-autoload 'tramp-syntax "tramp" t) -(defconst tramp-file-name-regexp-unified (if (memq system-type '(cygwin windows-nt)) "\\`/\\(\\[.*\\]\\|[^/|:]\\{2,\\}[^/|]*\\):" "\\`/[^/|:][^/|]*:") "\ +(defconst tramp-file-name-regexp-unified "\\`/.+:.*:" "\ Value for `tramp-file-name-regexp' for unified remoting. See `tramp-file-name-structure' for more explanations. @@ -33889,23 +33881,23 @@ On W32 systems, the volume letter must be ignored.") Value for `tramp-file-name-regexp' for separate remoting. See `tramp-file-name-structure' for more explanations.") -(defvar tramp-file-name-regexp (cond ((equal tramp-syntax 'ftp) tramp-file-name-regexp-unified) ((equal tramp-syntax 'sep) tramp-file-name-regexp-separate) (t (error "Wrong `tramp-syntax' defined"))) "\ +(defvar tramp-file-name-regexp (cond ((eq tramp-syntax 'ftp) tramp-file-name-regexp-unified) ((eq tramp-syntax 'sep) tramp-file-name-regexp-separate) (t (error "Wrong `tramp-syntax' defined"))) "\ Regular expression matching file names handled by Tramp. This regexp should match Tramp file names but no other file names. When calling `tramp-register-file-name-handlers', the initial value is overwritten by the car of `tramp-file-name-structure'.") -(defconst tramp-completion-file-name-regexp-unified (if (memq system-type '(cygwin windows-nt)) "\\`/[^/]\\{2,\\}\\'" "\\`/[^/]*\\'") "\ +(defconst tramp-completion-file-name-regexp-unified (concat "\\`/\\(" "\\([^/|:]+:[^/|:]*|\\)*" (if (memq system-type '(cygwin windows-nt)) "\\(-\\|[^/|:]\\{2,\\}\\)" "[^/|:]+") "\\(:[^/|:]*\\)?" "\\)?\\'") "\ Value for `tramp-completion-file-name-regexp' for unified remoting. See `tramp-file-name-structure' for more explanations. On W32 systems, the volume letter must be ignored.") -(defconst tramp-completion-file-name-regexp-separate "\\`/\\([[][^]]*\\)?\\'" "\ +(defconst tramp-completion-file-name-regexp-separate "\\`/\\[\\([^]]*\\)?\\'" "\ Value for `tramp-completion-file-name-regexp' for separate remoting. See `tramp-file-name-structure' for more explanations.") -(defconst tramp-completion-file-name-regexp (cond ((equal tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified) ((equal tramp-syntax 'sep) tramp-completion-file-name-regexp-separate) (t (error "Wrong `tramp-syntax' defined"))) "\ +(defconst tramp-completion-file-name-regexp (cond ((eq tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified) ((eq tramp-syntax 'sep) tramp-completion-file-name-regexp-separate) (t (error "Wrong `tramp-syntax' defined"))) "\ Regular expression matching file names handled by Tramp completion. This regexp should match partial Tramp file names only. @@ -33916,20 +33908,31 @@ updated after changing this variable. Also see `tramp-file-name-structure'.") -(defun tramp-completion-run-real-handler (operation args) "\ -Invoke `tramp-file-name-handler' for OPERATION. +(defconst tramp-completion-file-name-handler-alist '((file-name-all-completions . tramp-completion-handle-file-name-all-completions) (file-name-completion . tramp-completion-handle-file-name-completion)) "\ +Alist of completion handler functions. +Used for file names matching `tramp-completion-file-name-regexp'. +Operations not mentioned here will be handled by Tramp's file +name handler functions, or the normal Emacs functions.") + +(defun tramp-run-real-handler (operation args) "\ +Invoke normal file name handler for OPERATION. First arg specifies the OPERATION, second arg is a list of arguments to -pass to the OPERATION." (let* ((inhibit-file-name-handlers (\` (tramp-completion-file-name-handler cygwin-mount-name-hook-function cygwin-mount-map-drive-hook-function \, (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers)))) (inhibit-file-name-operation operation)) (apply operation args))) -(defun tramp-completion-file-name-handler (operation &rest args) - (if (tramp-completion-mode-p) - (apply 'tramp-autoload-file-name-handler operation args) - (tramp-completion-run-real-handler operation args))) +pass to the OPERATION." (let* ((inhibit-file-name-handlers (\` (tramp-file-name-handler tramp-vc-file-name-handler tramp-completion-file-name-handler cygwin-mount-name-hook-function cygwin-mount-map-drive-hook-function \, (and (eq inhibit-file-name-operation operation) inhibit-file-name-handlers)))) (inhibit-file-name-operation operation)) (apply operation args))) -(defun tramp-autoload-file-name-handler (operation &rest args) "\ -Load Tramp file name handler, and perform OPERATION." (if (and (not (and (stringp (car args)) (string-equal (car args) "/"))) (let ((default-directory temporary-file-directory)) (and (null load-in-progress) (load "tramp" (quote noerror) (quote nomessage))))) (apply operation args) (tramp-completion-run-real-handler operation args))) +(autoload 'tramp-file-name-handler "tramp" "\ +Invoke Tramp file name handler. +Falls back to normal file name handler if no Tramp file name handler exists. + +\(fn OPERATION &rest ARGS)" nil nil) + +(autoload 'tramp-completion-file-name-handler "tramp" "\ +Invoke Tramp file name completion handler. +Falls back to normal file name handler if no Tramp file name handler exists. + +\(fn OPERATION &rest ARGS)" nil nil) (defun tramp-register-autoload-file-name-handlers nil "\ -Add Tramp file name handlers to `file-name-handler-alist' during autoload." (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-autoload-file-name-handler))) (put (quote tramp-autoload-file-name-handler) (quote safe-magic) t) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t)) +Add Tramp file name handlers to `file-name-handler-alist' during autoload." (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-file-name-handler))) (put (quote tramp-file-name-handler) (quote safe-magic) t) (put (quote tramp-file-name-handler) (quote operations) (quote (file-name-all-completions file-name-completion file-remote-p))) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t) (put (quote tramp-completion-file-name-handler) (quote operations) (mapcar (quote car) tramp-completion-file-name-handler-alist))) (tramp-register-autoload-file-name-handlers) @@ -33939,15 +33942,7 @@ Unload Tramp file name handlers from `file-name-handler-alist'. \(fn)" nil nil) (defvar tramp-completion-mode nil "\ -If non-nil, external packages signal that they are in file name completion. - -This is necessary, because Tramp uses a heuristic depending on last -input event. This fails when external packages use other characters -but , or ?\\? for file name completion. This variable -should never be set globally, the intention is to let-bind it.") - -(defun tramp-completion-mode-p nil "\ -Check, whether method / user name / host name completion is active." (or (and (boundp (quote non-essential)) (symbol-value (quote non-essential))) tramp-completion-mode (equal last-input-event (quote tab)))) +If non-nil, external packages signal that they are in file name completion.") (autoload 'tramp-unload-tramp "tramp" "\ Discard Tramp from loading remote files. @@ -37759,7 +37754,7 @@ The major browsing mode used is essentially the standard Man mode. Choose the filename for the man page using completion, based on the topic selected from the directories specified in `woman-manpath' and `woman-path'. The directory expansions and topics are cached for -speed, but a non-nil interactive argument forces the caches to be +speed. With a prefix argument, force the caches to be updated (e.g. to re-interpret the current directory). Used non-interactively, arguments are optional: if given then TOPIC @@ -38050,17 +38045,16 @@ Zone out, completely. ;;;*** ;;;### (autoloads nil nil ("abbrev.el" "bindings.el" "buff-menu.el" -;;;;;; "button.el" "calc/calc-aent.el" "calc/calc-embed.el" "calc/calc-loaddefs.el" -;;;;;; "calc/calc-misc.el" "calc/calc-yank.el" "calendar/cal-loaddefs.el" -;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "case-table.el" -;;;;;; "cedet/ede/base.el" "cedet/ede/config.el" "cedet/ede/cpp-root.el" -;;;;;; "cedet/ede/custom.el" "cedet/ede/dired.el" "cedet/ede/emacs.el" -;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el" -;;;;;; "cedet/ede/loaddefs.el" "cedet/ede/locate.el" "cedet/ede/make.el" -;;;;;; "cedet/ede/shell.el" "cedet/ede/speedbar.el" "cedet/ede/system.el" -;;;;;; "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" -;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" -;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/el.el" +;;;;;; "button.el" "calc/calc-aent.el" "calc/calc-embed.el" "calc/calc-misc.el" +;;;;;; "calc/calc-yank.el" "calendar/cal-loaddefs.el" "calendar/diary-loaddefs.el" +;;;;;; "calendar/hol-loaddefs.el" "case-table.el" "cedet/ede/base.el" +;;;;;; "cedet/ede/config.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" +;;;;;; "cedet/ede/dired.el" "cedet/ede/emacs.el" "cedet/ede/files.el" +;;;;;; "cedet/ede/generic.el" "cedet/ede/linux.el" "cedet/ede/locate.el" +;;;;;; "cedet/ede/make.el" "cedet/ede/shell.el" "cedet/ede/speedbar.el" +;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el" +;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/refs.el" +;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/el.el" ;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make.el" ;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/complete.el" ;;;;;; "cedet/semantic/ctxt.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" @@ -38071,40 +38065,38 @@ Zone out, completely. ;;;;;; "cedet/semantic/find.el" "cedet/semantic/format.el" "cedet/semantic/html.el" ;;;;;; "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" "cedet/semantic/idle.el" ;;;;;; "cedet/semantic/imenu.el" "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" -;;;;;; "cedet/semantic/loaddefs.el" "cedet/semantic/mru-bookmark.el" -;;;;;; "cedet/semantic/scope.el" "cedet/semantic/senator.el" "cedet/semantic/sort.el" -;;;;;; "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" -;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" -;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" -;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" +;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/scope.el" +;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" +;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/global.el" +;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" +;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" +;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" ;;;;;; "cedet/semantic/wisent/python.el" "cedet/srecode/compile.el" ;;;;;; "cedet/srecode/cpp.el" "cedet/srecode/document.el" "cedet/srecode/el.el" ;;;;;; "cedet/srecode/expandproto.el" "cedet/srecode/getset.el" -;;;;;; "cedet/srecode/insert.el" "cedet/srecode/java.el" "cedet/srecode/loaddefs.el" -;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/srt.el" -;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "composite.el" -;;;;;; "cus-face.el" "cus-start.el" "custom.el" "dired-aux.el" "dired-loaddefs.el" -;;;;;; "dired-x.el" "electric.el" "emacs-lisp/backquote.el" "emacs-lisp/byte-run.el" -;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" +;;;;;; "cedet/srecode/insert.el" "cedet/srecode/java.el" "cedet/srecode/map.el" +;;;;;; "cedet/srecode/mode.el" "cedet/srecode/srt.el" "cedet/srecode/template.el" +;;;;;; "cedet/srecode/texi.el" "composite.el" "cus-face.el" "cus-start.el" +;;;;;; "custom.el" "dired-aux.el" "dired-x.el" "electric.el" "emacs-lisp/backquote.el" +;;;;;; "emacs-lisp/byte-run.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" ;;;;;; "emacs-lisp/cl-preloaded.el" "emacs-lisp/cl-seq.el" "emacs-lisp/eieio-compat.el" -;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-loaddefs.el" -;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/eldoc.el" "emacs-lisp/float-sup.el" -;;;;;; "emacs-lisp/lisp-mode.el" "emacs-lisp/lisp.el" "emacs-lisp/macroexp.el" -;;;;;; "emacs-lisp/map-ynp.el" "emacs-lisp/nadvice.el" "emacs-lisp/syntax.el" -;;;;;; "emacs-lisp/timer.el" "env.el" "epa-hook.el" "eshell/em-alias.el" -;;;;;; "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el" -;;;;;; "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el" -;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el" -;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el" -;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" -;;;;;; "eshell/em-xtra.el" "eshell/esh-groups.el" "facemenu.el" -;;;;;; "faces.el" "files.el" "font-core.el" "font-lock.el" "format.el" -;;;;;; "frame.el" "help.el" "hfy-cmap.el" "htmlfontify-loaddefs.el" -;;;;;; "ibuf-ext.el" "ibuffer-loaddefs.el" "indent.el" "international/characters.el" -;;;;;; "international/charprop.el" "international/charscript.el" -;;;;;; "international/cp51932.el" "international/eucjp-ms.el" "international/mule-cmds.el" +;;;;;; "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-opt.el" "emacs-lisp/eldoc.el" +;;;;;; "emacs-lisp/float-sup.el" "emacs-lisp/lisp-mode.el" "emacs-lisp/lisp.el" +;;;;;; "emacs-lisp/macroexp.el" "emacs-lisp/map-ynp.el" "emacs-lisp/nadvice.el" +;;;;;; "emacs-lisp/syntax.el" "emacs-lisp/timer.el" "env.el" "epa-hook.el" +;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" +;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" +;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" +;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" +;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-tramp.el" +;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "facemenu.el" "faces.el" +;;;;;; "files.el" "font-core.el" "font-lock.el" "format.el" "frame.el" +;;;;;; "help.el" "hfy-cmap.el" "htmlfontify-loaddefs.el" "ibuf-ext.el" +;;;;;; "indent.el" "international/characters.el" "international/charprop.el" +;;;;;; "international/charscript.el" "international/cp51932.el" +;;;;;; "international/eucjp-ms.el" "international/mule-cmds.el" ;;;;;; "international/mule-conf.el" "international/mule.el" "international/uni-bidi.el" ;;;;;; "international/uni-brackets.el" "international/uni-category.el" ;;;;;; "international/uni-combining.el" "international/uni-comment.el" @@ -38132,32 +38124,30 @@ Zone out, completely. ;;;;;; "leim/quail/pypunct-b5.el" "leim/quail/rfc1345.el" "leim/quail/sgml-input.el" ;;;;;; "leim/quail/slovak.el" "leim/quail/symbol-ksc.el" "leim/quail/tamil-dvorak.el" ;;;;;; "leim/quail/vntelex.el" "leim/quail/vnvni.el" "leim/quail/welsh.el" -;;;;;; "loadup.el" "mail/blessmail.el" "mail/rmail-loaddefs.el" -;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el" -;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el" -;;;;;; "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el" "mh-e/mh-loaddefs.el" -;;;;;; "minibuffer.el" "mouse.el" "net/tramp-loaddefs.el" "newcomment.el" -;;;;;; "obarray.el" "org/ob-core.el" "org/ob-keys.el" "org/ob-lob.el" -;;;;;; "org/ob-matlab.el" "org/ob-tangle.el" "org/ob.el" "org/org-archive.el" -;;;;;; "org/org-attach.el" "org/org-bbdb.el" "org/org-clock.el" -;;;;;; "org/org-datetree.el" "org/org-element.el" "org/org-feed.el" -;;;;;; "org/org-footnote.el" "org/org-id.el" "org/org-indent.el" -;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-loaddefs.el" -;;;;;; "org/org-mobile.el" "org/org-plot.el" "org/org-table.el" -;;;;;; "org/org-timer.el" "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" -;;;;;; "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" -;;;;;; "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" -;;;;;; "org/ox.el" "progmodes/elisp-mode.el" "progmodes/prog-mode.el" -;;;;;; "ps-def.el" "ps-mule.el" "ps-print-loaddefs.el" "register.el" -;;;;;; "replace.el" "rfn-eshadow.el" "select.el" "simple.el" "startup.el" -;;;;;; "subdirs.el" "subr.el" "textmodes/fill.el" "textmodes/page.el" -;;;;;; "textmodes/paragraphs.el" "textmodes/reftex-auc.el" "textmodes/reftex-cite.el" -;;;;;; "textmodes/reftex-dcr.el" "textmodes/reftex-global.el" "textmodes/reftex-index.el" -;;;;;; "textmodes/reftex-loaddefs.el" "textmodes/reftex-parse.el" -;;;;;; "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" -;;;;;; "textmodes/text-mode.el" "uniquify.el" "vc/ediff-hook.el" -;;;;;; "vc/vc-hooks.el" "version.el" "widget.el" "window.el") (0 -;;;;;; 0 0 0)) +;;;;;; "loadup.el" "mail/blessmail.el" "mail/rmailedit.el" "mail/rmailkwd.el" +;;;;;; "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el" +;;;;;; "mail/rmailsum.el" "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el" +;;;;;; "mh-e/mh-loaddefs.el" "minibuffer.el" "mouse.el" "net/tramp-loaddefs.el" +;;;;;; "newcomment.el" "obarray.el" "org/ob-core.el" "org/ob-keys.el" +;;;;;; "org/ob-lob.el" "org/ob-matlab.el" "org/ob-tangle.el" "org/ob.el" +;;;;;; "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el" +;;;;;; "org/org-clock.el" "org/org-datetree.el" "org/org-element.el" +;;;;;; "org/org-feed.el" "org/org-footnote.el" "org/org-id.el" "org/org-indent.el" +;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-mobile.el" +;;;;;; "org/org-plot.el" "org/org-table.el" "org/org-timer.el" "org/ox-ascii.el" +;;;;;; "org/ox-beamer.el" "org/ox-html.el" "org/ox-icalendar.el" +;;;;;; "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" "org/ox-odt.el" +;;;;;; "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el" +;;;;;; "progmodes/elisp-mode.el" "progmodes/prog-mode.el" "ps-def.el" +;;;;;; "ps-mule.el" "register.el" "replace.el" "rfn-eshadow.el" +;;;;;; "select.el" "simple.el" "startup.el" "subdirs.el" "subr.el" +;;;;;; "textmodes/fill.el" "textmodes/page.el" "textmodes/paragraphs.el" +;;;;;; "textmodes/reftex-auc.el" "textmodes/reftex-cite.el" "textmodes/reftex-dcr.el" +;;;;;; "textmodes/reftex-global.el" "textmodes/reftex-index.el" +;;;;;; "textmodes/reftex-parse.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" +;;;;;; "textmodes/reftex-toc.el" "textmodes/text-mode.el" "uniquify.el" +;;;;;; "vc/ediff-hook.el" "vc/vc-hooks.el" "version.el" "widget.el" +;;;;;; "window.el") (0 0 0 0)) ;;;*** commit afabe53b562675b6279cc670ceba32357fac2214 Author: Tino Calancha Date: Sun Apr 2 21:16:37 2017 +0900 ; * lisp/replace.el (how-many, flush-lines, keep-lines): Remove empty line. diff --git a/lisp/replace.el b/lisp/replace.el index 0841ba11b8..a7b8ae6a34 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -848,7 +848,6 @@ called interactively by passing a non-nil INTERACTIVE argument. This function starts looking for the next match from the end of the previous match. Hence, it ignores matches that overlap a previously found match." - (interactive (progn (barf-if-buffer-read-only) @@ -923,7 +922,6 @@ a non-nil INTERACTIVE argument. If a match is split across lines, all the lines it lies in are deleted. They are deleted _before_ looking for the next match. Hence, a match starting on the same line at which another match ended is ignored." - (interactive (progn (barf-if-buffer-read-only) @@ -971,7 +969,6 @@ end of (the accessible portion of) the buffer. This function starts looking for the next match from the end of the previous match. Hence, it ignores matches that overlap a previously found match." - (interactive (keep-lines-read-args "How many matches for regexp")) (save-excursion commit 40a33a3cb711f894ac61691c03cc13e58bc38145 Merge: 59191cd0cb a184a7edc5 Author: Michael Albinus Date: Sun Apr 2 11:03:14 2017 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 59191cd0cbe8463f9095a71cb4048bb138d6e446 Author: Michael Albinus Date: Sun Apr 2 11:02:54 2017 +0200 Apply connecion-local variables for shells * doc/misc/tramp.texi (Remote processes): Show use of connection-local variables. Don't mention Emacs 23 anymore. (Frequently Asked Questions): Precise Emacs and MS Windows version. * lisp/files-x.el (connection-local-normalize-criteria): Suppress nil properties. (connection-local-set-profiles, with-connection-local-profiles): Adapt docstring. * lisp/shell.el (shell): Apply connecion-local variables. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index e1d84457ff..8e04d69c19 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2499,6 +2499,42 @@ Starting with Emacs 24, when @option{explicit-shell-file-name} is equal to @code{nil}, calling @code{shell} interactively will prompt for a shell name. +Starting with Emacs 26, you could use connection-local variables for +setting different values of @option{explicit-shell-file-name} for +different remote hosts. +@ifinfo +@pxref{Connection Local Variables, , , elisp} +@end ifinfo + +@lisp +@group +(connection-local-set-profile-variables + 'remote-bash + '((explicit-shell-file-name . "/bin/bash") + (explicit-bash-args . ("-i")))) +@end group + +@group +(connection-local-set-profile-variables + 'remote-ksh + '((explicit-shell-file-name . "/bin/ksh") + (explicit-ksh-args . ("-i")))) +@end group + +@group +(connection-local-set-profiles + '(:application 'tramp :protocol "ssh" :machine "localhost") + 'remote-bash) +@end group + +@group +(connection-local-set-profiles + `(:application 'tramp :protocol "sudo" + :user "root" :machine ,(system-name)) + 'remote-ksh) +@end group +@end lisp + @subsection Running @code{shell-command} on a remote host @cindex shell-command @@ -2542,11 +2578,10 @@ uid=0(root) gid=0(root) groups=0(root) @end group @end example -@code{eshell} in Emacs 23.2 added custom @code{su} and @code{sudo} -commands that set the default directory correctly for the -@file{*eshell*} buffer. @value{tramp} silently updates -@option{tramp-default-proxies-alist} with an entry for this directory -(@pxref{Multi-hops}): +@code{eshell} added custom @code{su} and @code{sudo} commands that set +the default directory correctly for the @file{*eshell*} buffer. +@value{tramp} silently updates @option{tramp-default-proxies-alist} +with an entry for this directory (@pxref{Multi-hops}): @example @group @@ -2763,11 +2798,12 @@ Where is the latest @value{tramp}? @item Which systems does it work on? -The package works successfully on Emacs 23, Emacs 24, and Emacs 25. +The package works successfully on Emacs 23, Emacs 24, Emacs 25, and +Emacs 26. While Unix and Unix-like systems are the primary remote targets, @value{tramp} has equal success connecting to other platforms, such as -MS Windows XP/Vista/7. +MS Windows 7/8/10. @item diff --git a/lisp/files-x.el b/lisp/files-x.el index a0cad70842..b7c6f51e65 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -585,7 +585,7 @@ Return a new ordered plist list containing only property names from PROPERTIES." nil (mapcar (lambda (property) - (when (plist-member criteria property) + (when (and (plist-member criteria property) (plist-get criteria property)) (list property (plist-get criteria property)))) properties))) @@ -606,12 +606,10 @@ using this connection, see `connection-local-criteria-alist'." ;;;###autoload (defun connection-local-set-profiles (criteria &rest profiles) - "Add PROFILES for remote servers. -CRITERIA is either a regular expression identifying a remote -server, or a function with one argument IDENTIFICATION, which -returns non-nil when a remote server shall apply PROFILE's -variables. If CRITERIA is nil, it always applies. -PROFILES are the names of a connection profile (a symbol). + "Add PROFILES for CRITERIA. +CRITERIA is a plist identifying a connection and the application +using this connection, see `connection-local-criteria-alist'. +PROFILES are the names of connection profiles (a symbol). When a connection to a remote server is opened and CRITERIA matches to that server, the connection-local variables from @@ -678,7 +676,7 @@ will not be changed." ;;;###autoload (defmacro with-connection-local-profiles (profiles &rest body) "Apply connection-local variables according to PROFILES in current buffer. -Execute BODY, and unwind connection local variables." +Execute BODY, and unwind connection-local variables." (declare (indent 1) (debug t)) `(let ((enable-connection-local-variables t) (old-buffer-local-variables (buffer-local-variables)) diff --git a/lisp/shell.el b/lisp/shell.el index c8a8555d63..55a053295f 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -711,36 +711,43 @@ Otherwise, one argument `-i' is passed to the shell. ;; If the current buffer is a dead shell buffer, use it. (current-buffer))) - ;; On remote hosts, the local `shell-file-name' might be useless. - (if (and (called-interactively-p 'any) - (file-remote-p default-directory) - (null explicit-shell-file-name) - (null (getenv "ESHELL"))) - (with-current-buffer buffer - (set (make-local-variable 'explicit-shell-file-name) - (expand-file-name - (file-local-name - (read-file-name - "Remote shell path: " default-directory shell-file-name - t shell-file-name)))))) - - ;; The buffer's window must be correctly set when we call comint (so - ;; that comint sets the COLUMNS env var properly). - (pop-to-buffer buffer) - (unless (comint-check-proc buffer) - (let* ((prog (or explicit-shell-file-name - (getenv "ESHELL") shell-file-name)) - (name (file-name-nondirectory prog)) - (startfile (concat "~/.emacs_" name)) - (xargs-name (intern-soft (concat "explicit-" name "-args")))) - (unless (file-exists-p startfile) - (setq startfile (concat user-emacs-directory "init_" name ".sh"))) - (apply 'make-comint-in-buffer "shell" buffer prog - (if (file-exists-p startfile) startfile) - (if (and xargs-name (boundp xargs-name)) - (symbol-value xargs-name) - '("-i"))) - (shell-mode))) + (with-current-buffer buffer + (when (file-remote-p default-directory) + ;; Apply connection-local variables. + (hack-connection-local-variables-apply + `(:application 'tramp + :protocol ,(file-remote-p default-directory 'method) + :user ,(file-remote-p default-directory 'user) + :machine ,(file-remote-p default-directory 'host))) + + ;; On remote hosts, the local `shell-file-name' might be useless. + (if (and (called-interactively-p 'any) + (null explicit-shell-file-name) + (null (getenv "ESHELL"))) + (set (make-local-variable 'explicit-shell-file-name) + (expand-file-name + (file-local-name + (read-file-name + "Remote shell path: " default-directory shell-file-name + t shell-file-name)))))) + + ;; The buffer's window must be correctly set when we call comint + ;; (so that comint sets the COLUMNS env var properly). + (pop-to-buffer buffer) + (unless (comint-check-proc buffer) + (let* ((prog (or explicit-shell-file-name + (getenv "ESHELL") shell-file-name)) + (name (file-name-nondirectory prog)) + (startfile (concat "~/.emacs_" name)) + (xargs-name (intern-soft (concat "explicit-" name "-args")))) + (unless (file-exists-p startfile) + (setq startfile (concat user-emacs-directory "init_" name ".sh"))) + (apply 'make-comint-in-buffer "shell" buffer prog + (if (file-exists-p startfile) startfile) + (if (and xargs-name (boundp xargs-name)) + (symbol-value xargs-name) + '("-i"))) + (shell-mode)))) buffer) ;;; Directory tracking