commit cbb289e13eff6b187a942658971aa5419e3ed920 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Fri Jul 24 20:02:59 2015 +0200 Minor cleanup in tramp-tests.el * test/automated/tramp-tests.el (tramp-test31-*, tramp-test32-*): Implement using the documented interface `tramp-connection-properties', rather than with internal functions. diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 6972373..a03dbf3 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -1695,7 +1695,7 @@ This requires restrictions of file name syntax." (defun tramp--test-hpux-p () "Check, whether the remote host runs HP-UX. Several special characters do not work properly there." - ;; We must refill the cache. + ;; We must refill the cache. `file-truename' does it. (with-parsed-tramp-file-name (file-truename tramp-test-temporary-file-directory) nil (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) @@ -1894,14 +1894,12 @@ Use the `stat' command." (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-stat v))) - (unwind-protect - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "perl" nil) - (tramp--test-special-characters)) - - ;; Reset suppressed properties. - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "perl" 'undef)))) + (let ((tramp-connection-properties + (append + `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "perl" nil)) + tramp-connection-properties))) + (tramp--test-special-characters))) (ert-deftest tramp-test31-special-characters-with-perl () "Check special characters in file names. @@ -1914,14 +1912,12 @@ Use the `perl' command." (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-perl v))) - (unwind-protect - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" nil) - (tramp--test-special-characters)) - - ;; Reset suppressed properties. - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" 'undef)))) + (let ((tramp-connection-properties + (append + `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "stat" nil)) + tramp-connection-properties))) + (tramp--test-special-characters))) (ert-deftest tramp-test31-special-characters-with-ls () "Check special characters in file names. @@ -1932,16 +1928,14 @@ Use the `ls' command." (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) 'tramp-sh-file-name-handler)) - (unwind-protect - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" nil) - (tramp-set-connection-property v "perl" nil) - (tramp--test-special-characters)) - - ;; Reset suppressed properties. - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" 'undef) - (tramp-set-connection-property v "perl" 'undef)))) + (let ((tramp-connection-properties + (append + `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "perl" nil) + (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "stat" nil)) + tramp-connection-properties))) + (tramp--test-special-characters))) (defun tramp--test-utf8 () "Perform the test in `tramp-test32-utf8*'." @@ -1972,14 +1966,12 @@ Use the `stat' command." (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-stat v))) - (unwind-protect - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "perl" nil) - (tramp--test-utf8)) - - ;; Reset suppressed properties. - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "perl" 'undef)))) + (let ((tramp-connection-properties + (append + `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "perl" nil)) + tramp-connection-properties))) + (tramp--test-utf8))) (ert-deftest tramp-test32-utf8-with-perl () "Check UTF8 encoding in file names and file contents. @@ -1992,14 +1984,12 @@ Use the `perl' command." (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil (skip-unless (tramp-get-remote-perl v))) - (unwind-protect - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" nil) - (tramp--test-utf8)) - - ;; Reset suppressed properties. - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" 'undef)))) + (let ((tramp-connection-properties + (append + `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "stat" nil)) + tramp-connection-properties))) + (tramp--test-utf8))) (ert-deftest tramp-test32-utf8-with-ls () "Check UTF8 encoding in file names and file contents. @@ -2010,16 +2000,14 @@ Use the `ls' command." (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) 'tramp-sh-file-name-handler)) - (unwind-protect - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" nil) - (tramp-set-connection-property v "perl" nil) - (tramp--test-utf8)) - - ;; Reset suppressed properties. - (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil - (tramp-set-connection-property v "stat" 'undef) - (tramp-set-connection-property v "perl" 'undef)))) + (let ((tramp-connection-properties + (append + `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "perl" nil) + (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory)) + "stat" nil)) + tramp-connection-properties))) + (tramp--test-utf8))) ;; This test is inspired by Bug#16928. (ert-deftest tramp-test33-asynchronous-requests () commit c1ff88c0ce3bf79ed0c6bf914b6a33a8c37173d6 Author: Harald Hanche-Olsen Date: Thu Jul 23 18:09:44 2015 +0200 Pass lambdas to `skeleton-read' * lisp/skeleton.el (skeleton-read): Allow PROMPT to be a function. * lisp/textmodes/sgml-mode.el (sgml-attributes, sgml-value): Pass lambdas to `skeleton-read' (bug#20386). Copyright-paperwork-exempt: yes diff --git a/lisp/skeleton.el b/lisp/skeleton.el index d23488b..2c017dd 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -277,7 +277,8 @@ When done with skeleton, but before going back to `_'-point call (defun skeleton-read (prompt &optional initial-input recursive) "Function for reading a string from the minibuffer within skeletons. -PROMPT must be a string or a form that evaluates to a string. +PROMPT must be a string or a function that evaluates to a string. +It may also be a form that evaluates to a string (deprecated). It may contain a `%s' which will be replaced by `skeleton-subprompt'. If non-nil second arg INITIAL-INPUT or variable `input' is a string or cons with index to insert before reading. If third arg RECURSIVE is non-nil @@ -306,12 +307,14 @@ automatically, and you are prompted to fill in the variable parts."))) ;; before point. (save-excursion (insert "\n"))) (unwind-protect - (setq prompt (if (stringp prompt) - (read-string (format prompt skeleton-subprompt) - (setq initial-input - (or initial-input - (symbol-value 'input)))) - (eval prompt))) + (setq prompt (cond ((stringp prompt) + (read-string (format prompt skeleton-subprompt) + (setq initial-input + (or initial-input + (symbol-value 'input))))) + ((functionp prompt) + (funcall prompt)) + (t (eval prompt)))) (or eolp (delete-char 1)))) (if (and recursive diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 2ffe9c1..6a14b52 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -759,9 +759,10 @@ If QUIET, do not print a message when there are no attributes for TAG." (insert ?\s) (insert (funcall skeleton-transformation-function (setq attribute - (skeleton-read '(completing-read - "Attribute: " - alist))))) + (skeleton-read (lambda () + (completing-read + "Attribute: " + alist)))))) (if (string= "" attribute) (setq i 0) (sgml-value (assoc (downcase attribute) alist)) @@ -1177,13 +1178,16 @@ See `sgml-tag-alist' for info about attribute rules." (if (and (eq (car alist) t) (not sgml-xml-mode)) (when (cdr alist) (insert "=\"") - (setq alist (skeleton-read '(completing-read "Value: " (cdr alist)))) + (setq alist (skeleton-read (lambda () + (completing-read + "Value: " (cdr alist))))) (if (string< "" alist) (insert alist ?\") (delete-char -2))) (insert "=\"") (if (cdr alist) - (insert (skeleton-read '(completing-read "Value: " alist))) + (insert (skeleton-read (lambda () + (completing-read "Value: " alist)))) (when (null alist) (insert (skeleton-read '(read-string "Value: "))))) (insert ?\")))) commit 67eb6ae9db8543d6819c9bf63bbb810f2304f1d0 Author: Eli Zaretskii Date: Fri Jul 24 16:42:08 2015 +0300 * INSTALL (DETAILED BUILDING AND INSTALLATION): Mention --without-imagemagick. diff --git a/INSTALL b/INSTALL index ebd36e7..7a41505 100644 --- a/INSTALL +++ b/INSTALL @@ -275,12 +275,13 @@ To disable individual types of image support in Emacs for some reason, even though configure finds the libraries, you can configure with one or more of these options: - --without-xpm for XPM image support - --without-jpeg for JPEG image support - --without-tiff for TIFF image support - --without-gif for GIF image support - --without-png for PNG image support - --without-rsvg for SVG image support + --without-xpm for XPM image support + --without-jpeg for JPEG image support + --without-tiff for TIFF image support + --without-gif for GIF image support + --without-png for PNG image support + --without-rsvg for SVG image support + --without-imagemagick for Imagemagick support Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars.