commit 6dbbd98abb7c3327013dba57c058a6372b6628af (HEAD, refs/remotes/origin/master) Merge: 9878cf4 8e22067 Author: Michael Albinus Date: Tue May 31 20:01:02 2016 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 8e22067d59f59ee3a39f5d4f95c27e8ea3c935d6 Merge: 6d66089 25cc0f2 Author: K. Handa Date: Wed Jun 1 09:16:32 2016 +0900 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 6d66089127313a1c5b5c5584eaf3e9edec010955 Author: Ikumi Keita Date: Wed Jun 1 09:15:20 2016 +0900 Cosmetic change to kinsoku-eol. (tiny change) * lisp/international/kinsoku.el (kinsoku-eol): Make the order of characters match with the comments. diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el index e9609f4..f5824d4 100644 --- a/lisp/international/kinsoku.el +++ b/lisp/international/kinsoku.el @@ -104,10 +104,10 @@ The value 0 means there's no limitation.") ;; JISX0201 Katakana "(I"(B" ;; Japanese JISX0208 - "$B!F!H!J!L!N!P!R!T!V!X!Z!k!l!m!n!w!x(B\ -$A!.!0#"#(!2!4!6!8!:!!c!d!e#@!f!l(B" + "$B!F!H!J!L!N!P!R!T!V!X!Z!k!l!m!n!w!x(B" ;; Chinese GB2312 - "$A(E(F(G(H(I(J(K(L(M(N(O(P(Q(R(S(T(U(V(W(X(Y(h(B\ + "$A!.!0#"#(!2!4!6!8!:!!c!d!e#@!f!l(B\ +$A(E(F(G(H(I(J(K(L(M(N(O(P(Q(R(S(T(U(V(W(X(Y(h(B\ \$(0!>!@!B!D!F!H!J!L!N!P!R!T!V!X!Z!\!^!`!b(B" ;; Chinese BIG5 "$(0!d!f!h!j!k!q!p"i"j"k"n"x$u$v$w$x$y$z${(B\ commit 58f77a137a84caac05611d0ea706d7707978b629 Author: Ikumi Keita Date: Wed Jun 1 08:33:05 2016 +0900 Add HIRAGANA ITERATION MARK to japanese-kana-table. (tiny change) * lisp/language/japan-util.el (japanese-kana-table): Add an entry for HIRAGANA ITERATION MARK (U+309D). (japanese-alpha-numeric-table): Fix docstring. diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el index f0d817b..939b70a 100644 --- a/lisp/language/japan-util.el +++ b/lisp/language/japan-util.el @@ -57,6 +57,7 @@ (?$B$C(B ?$B%C(B ?(I/(B) (?$B$c(B ?$B%c(B ?(I,(B) (?$B$e(B ?$B%e(B ?(I-(B) (?$B$g(B ?$B%g(B ?(I.(B) (?$B$n(B ?$B%n(B "(I\(B") + (?$B!5(B ?$B!3(B) (?$B!6(B ?$B!4(B) ("$B$&!+(B" ?$B%t(B "(I3^(B") (nil ?$B%u(B "(I6(B") (nil ?$B%v(B "(I9(B")) "Japanese JISX0208 Kana character table. Each element is of the form (HIRAGANA KATAKANA HANKAKU-KATAKANA), where @@ -146,7 +147,7 @@ and HANKAKU belongs to `japanese-jisx0201-kana'.") (?$B#p(B . ?p) (?$B#q(B . ?q) (?$B#r(B . ?r) (?$B#s(B . ?s) (?$B#t(B . ?t) (?$B#u(B . ?u) (?$B#v(B . ?v) (?$B#w(B . ?w) (?$B#x(B . ?x) (?$B#y(B . ?y) (?$B#z(B . ?z)) "Japanese JISX0208 alpha numeric character table. -Each element is of the form (ALPHA-NUMERIC ASCII), where ALPHA-NUMERIC +Each element is of the form (ALPHA-NUMERIC . ASCII), where ALPHA-NUMERIC belongs to `japanese-jisx0208', ASCII belongs to `ascii'.") ;; Put properties 'jisx0208 and 'ascii to each Japanese alpha numeric commit 4efef3db2fb1c3a20b83a67948e614d9b0c258dd Merge: 694d5e5 01030ee Author: K. Handa Date: Wed Jun 1 08:07:18 2016 +0900 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 694d5e5b56a9d55023ffc292188bd88f6f6cbca6 Author: K. Handa Date: Wed Jun 1 07:53:03 2016 +0900 Fix incomplete handling of translation table in a coding system. * coding.c (get_translation): New arg NCHARS. Even if TRANS is an alist, return a character or a vector of character. (produce_chars): Adjust for the above change. (consume_chars): Likewise. diff --git a/src/coding.c b/src/coding.c index 7d19956..55a4cea 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6947,18 +6947,21 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup) /* Return a translation of character(s) at BUF according to TRANS. - TRANS is TO-CHAR or ((FROM . TO) ...) where - FROM = [FROM-CHAR ...], TO is TO-CHAR or [TO-CHAR ...]. - The return value is TO-CHAR or ([FROM-CHAR ...] . TO) if a - translation is found, and Qnil if not found.. - If BUF is too short to lookup characters in FROM, return Qt. */ + TRANS is TO-CHAR, [TO-CHAR ...], or ((FROM . TO) ...) where FROM = + [FROM-CHAR ...], TO is TO-CHAR or [TO-CHAR ...]. The return value + is TO-CHAR or [TO-CHAR ...] if a translation is found, Qnil if not + found, or Qt if BUF is too short to lookup characters in FROM. As + a side effect, if a translation is found, *NCHARS is set to the + number of characters being translated. */ static Lisp_Object -get_translation (Lisp_Object trans, int *buf, int *buf_end) +get_translation (Lisp_Object trans, int *buf, int *buf_end, ptrdiff_t *nchars) { - - if (INTEGERP (trans)) - return trans; + if (INTEGERP (trans) || VECTORP (trans)) + { + *nchars = 1; + return trans; + } for (; CONSP (trans); trans = XCDR (trans)) { Lisp_Object val = XCAR (trans); @@ -6974,7 +6977,10 @@ get_translation (Lisp_Object trans, int *buf, int *buf_end) break; } if (i == len) - return val; + { + *nchars = len; + return XCDR (val); + } } return Qnil; } @@ -7017,20 +7023,13 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, LOOKUP_TRANSLATION_TABLE (translation_table, c, trans); if (! NILP (trans)) { - trans = get_translation (trans, buf, buf_end); + trans = get_translation (trans, buf, buf_end, &from_nchars); if (INTEGERP (trans)) c = XINT (trans); - else if (CONSP (trans)) + else if (VECTORP (trans)) { - from_nchars = ASIZE (XCAR (trans)); - trans = XCDR (trans); - if (INTEGERP (trans)) - c = XINT (trans); - else - { - to_nchars = ASIZE (trans); - c = XINT (AREF (trans, 0)); - } + to_nchars = ASIZE (trans); + c = XINT (AREF (trans, 0)); } else if (EQ (trans, Qt) && ! last_block) break; @@ -7671,22 +7670,16 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table, for (i = 1; i < max_lookup && p < src_end; i++) lookup_buf[i] = STRING_CHAR_ADVANCE (p); lookup_buf_end = lookup_buf + i; - trans = get_translation (trans, lookup_buf, lookup_buf_end); + trans = get_translation (trans, lookup_buf, lookup_buf_end, + &from_nchars); if (INTEGERP (trans)) c = XINT (trans); - else if (CONSP (trans)) + else if (VECTORP (trans)) { - from_nchars = ASIZE (XCAR (trans)); - trans = XCDR (trans); - if (INTEGERP (trans)) - c = XINT (trans); - else - { - to_nchars = ASIZE (trans); - if (buf_end - buf < to_nchars) - break; - c = XINT (AREF (trans, 0)); - } + to_nchars = ASIZE (trans); + if (buf_end - buf < to_nchars) + break; + c = XINT (AREF (trans, 0)); } else break; commit 9878cf4d30589eed27ea609de3ebd9cb9c72d41f Author: Michael Albinus Date: Tue May 31 20:00:21 2016 +0200 Improve robustness for out-of-band copy in Tramp * lisp/net/tramp-adb.el (tramp-adb-execute-adb-command) * lisp/net/tramp-cmds.el (tramp-append-tramp-buffers) * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Cosmetic changes. * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use local `default-directory'. Simplify command to send. Don't check return code, this was already done in `tramp-process-actions'. (tramp-get-inline-coding): Don't set `default-directory'. * lisp/net/tramp.el (tramp-action-out-of-band): Throw `out-of-band-failed'. (tramp-process-actions): Handle `out-of-band-failed'. (tramp-call-process, tramp-call-process-region): Use local `default-directory'. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 1281dbb..f77e44e 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -1045,7 +1045,7 @@ E.g. a host name \"192.168.1.1#5555\" returns \"192.168.1.1:5555\" "Returns nil on success error-output on failure." (when (and (> (length (tramp-file-name-host vec)) 0) ;; The -s switch is only available for ADB device commands. - (not (member (car args) (list "connect" "disconnect")))) + (not (member (car args) '("connect" "disconnect")))) (setq args (append (list "-s" (tramp-adb-get-device vec)) args))) (with-temp-buffer (prog1 diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 856011f..45f3004 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -345,7 +345,7 @@ names. Passwords will never be included there.") Please note that you have set `tramp-verbose' to a value of at least 6. Therefore, the contents of files might be included in the debug buffer(s).") - (add-text-properties start (point) (list 'face 'italic)))) + (add-text-properties start (point) '(face italic)))) (set-buffer-modified-p nil) (setq buffer-read-only t) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index ac390e5..0e874d6 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -680,7 +680,7 @@ file names." 'tramp-gvfs-send-command v gvfs-operation (append (and (eq op 'copy) (or keep-date preserve-uid-gid) - (list "--preserve")) + '("--preserve")) (list (tramp-gvfs-url-file-name filename) (tramp-gvfs-url-file-name newname)))) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index e9f78b7..19f687c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2517,19 +2517,18 @@ The method used must be an out-of-band method." ;; Use an asynchronous process. By this, password can ;; be handled. We don't set a timeout, because the - ;; copying of large files can last longer than 60 - ;; secs. - (let ((p (apply 'start-process-shell-command - (tramp-get-connection-name v) - (tramp-get-connection-buffer v) - copy-program - (append - copy-args - (list "&&" "echo" "tramp_exit_status" "0" - "||" "echo" "tramp_exit_status" "1"))))) - (tramp-message - orig-vec 6 "%s" - (mapconcat 'identity (process-command p) " ")) + ;; copying of large files can last longer than 60 secs. + (let* ((command + (mapconcat + 'identity (append (list copy-program) copy-args) + " ")) + (p (let ((default-directory + (tramp-compat-temporary-file-directory))) + (start-process-shell-command + (tramp-get-connection-name v) + (tramp-get-connection-buffer v) + command)))) + (tramp-message orig-vec 6 "%s" command) (tramp-set-connection-property p "vector" orig-vec) (set-process-query-on-exit-flag p nil) @@ -2537,23 +2536,7 @@ The method used must be an out-of-band method." ;; sending the password. (let ((tramp-local-end-of-line tramp-rsh-end-of-line)) (tramp-process-actions - p v nil tramp-actions-copy-out-of-band)) - - ;; Check the return code. - (goto-char (point-max)) - (unless - (re-search-backward "tramp_exit_status [0-9]+" nil t) - (tramp-error - orig-vec 'file-error - "Couldn't find exit status of `%s'" - (mapconcat 'identity (process-command p) " "))) - (skip-chars-forward "^ ") - (unless (zerop (read (current-buffer))) - (forward-line -1) - (tramp-error - orig-vec 'file-error - "Error copying: `%s'" - (buffer-substring (point-min) (point-at-eol)))))) + p v nil tramp-actions-copy-out-of-band)))) ;; Reset the transfer process properties. (tramp-set-connection-property v "process-name" nil) @@ -5597,18 +5580,14 @@ function cell is returned to be applied on a buffer." `(lambda (beg end) (,coding beg end) (let ((coding-system-for-write 'binary) - (coding-system-for-read 'binary) - (default-directory - (tramp-compat-temporary-file-directory))) + (coding-system-for-read 'binary)) (apply 'tramp-call-process-region ,vec (point-min) (point-max) (car (split-string ,compress)) t t nil (cdr (split-string ,compress))))) `(lambda (beg end) (let ((coding-system-for-write 'binary) - (coding-system-for-read 'binary) - (default-directory - (tramp-compat-temporary-file-directory))) + (coding-system-for-read 'binary)) (apply 'tramp-call-process-region ,vec beg end (car (split-string ,compress)) t t nil diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e375553..b02760b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3445,7 +3445,7 @@ The terminal type can be configured with `tramp-terminal-type'." (tramp-message vec 3 "Process has finished.") (throw 'tramp-action 'ok)) (tramp-message vec 3 "Process has died.") - (throw 'tramp-action 'process-died)))) + (throw 'tramp-action 'out-of-band-failed)))) (t nil))) ;;; Functions for processing the actions: @@ -3506,6 +3506,10 @@ connection buffer." (tramp-get-connection-buffer vec) vec 'file-error (cond ((eq exit 'permission-denied) "Permission denied") + ((eq exit 'out-of-band-failed) + (format-message + "Copy failed, see buffer `%s' for details" + (tramp-get-connection-buffer vec))) ((eq exit 'process-died) (substitute-command-keys (concat @@ -4003,7 +4007,8 @@ ALIST is of the form ((FROM . TO) ...)." It always returns a return code. The Lisp error raised when PROGRAM is nil is trapped also, returning 1. Furthermore, traces are written with verbosity of 6." - (let ((v (or vec + (let ((default-directory (tramp-compat-temporary-file-directory)) + (v (or vec (vector tramp-current-method tramp-current-user tramp-current-host nil nil))) (destination (if (eq destination t) (current-buffer) destination)) @@ -4033,7 +4038,8 @@ are written with verbosity of 6." It always returns a return code. The Lisp error raised when PROGRAM is nil is trapped also, returning 1. Furthermore, traces are written with verbosity of 6." - (let ((v (or vec + (let ((default-directory (tramp-compat-temporary-file-directory)) + (v (or vec (vector tramp-current-method tramp-current-user tramp-current-host nil nil))) (buffer (if (eq buffer t) (current-buffer) buffer)) commit 25cc0f2aada3e321e5f1c6d1e492a93d16da45b2 Merge: 4efef3d 788c9b6 Author: Paul Eggert Date: Tue May 31 08:07:41 2016 -0700 Merge from origin/emacs-25 788c9b6 ; Spelling fix 25c4a30 * lisp/recentf.el (recentf-dialog-mode-map): Remove follow-li... 0992ec3 Correct cl-flet usage (Bug#22317) 50caae3 Release MH-E manual version 8.6 602bb40 Update MH-E's documentation about HTML renderers 89018f0 Fx the we->the typo 845ee57 Restore frames into the current display by default ee28b4c * lisp/recentf.el (recentf-open-files-item): Quick fix for (b... 01c3cd1 etc/TODO: Remove out-of-place issue 5e18486 Clarify doc string of 'file-name-sans-extension' bffda22 Fix the MSDOS build f907f98 * lisp/progmodes/elisp-mode.el (elisp-function-argstring): Ca... 1a2ffd0 * src/dired.c (Ffile_name_all_completions): Doc fix. (Bug#23... f7ffc4b Fix infloop in 'number-sequence' 4ab2673 ; Spelling and punctuation fixes in comments 71c152e * lisp/emacs-lisp/find-func.el (find-function-library): commit 788c9b69e1801dd883dbe603281571ef3c78a724 Author: Paul Eggert Date: Mon May 30 23:16:41 2016 -0700 ; Spelling fix diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index 29081d3..f2dd582 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -3737,7 +3737,7 @@ * net/tramp.el (tramp-read-passwd): Ignore errors from `auth-source-*'. * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" - as end-of-line delimeter for passwords, when running on MS Windows. + as end-of-line delimiter for passwords, when running on MS Windows. 2014-12-27 Stefan Monnier commit 25c4a30692b20ee47eeadab1593f7922350e45a8 Author: Stefan Monnier Date: Mon May 30 20:46:24 2016 -0400 * lisp/recentf.el (recentf-dialog-mode-map): Remove follow-link (bug#22434) diff --git a/lisp/recentf.el b/lisp/recentf.el index 6d6ad48..dc94897 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1064,7 +1064,6 @@ Go to the beginning of buffer if not found." (define-key km "q" 'recentf-cancel-dialog) (define-key km "n" 'next-line) (define-key km "p" 'previous-line) - (define-key km [follow-link] "\C-m") km) "Keymap used in recentf dialogs.") commit 0992ec3b0bfaf98edce1d08462e9ec8e11d6b6e6 Author: Bill Wohler Date: Mon May 30 16:49:37 2016 -0700 Correct cl-flet usage (Bug#22317) * mh-compat.el: Rename mh-cl-flet to mh-flet and convert alias to macro using patch from Katsumi Yamaoka . * mh-thread.el (mh-thread-set-tables): * mh-show.el (mh-gnus-article-highlight-citation): * mh-mime.el (mh-display-with-external-viewer): (mh-mime-display, mh-press-button, mh-push-button): (mh-display-emphasis): Call mh-flet instead of mh-cl-flet. diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 10a8b6e..21ff5cb 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el @@ -75,11 +75,24 @@ introduced in Emacs 22." 'cancel-timer 'delete-itimer)) -;; Emacs 24 renamed flet to cl-flet. -(defalias 'mh-cl-flet - (if (fboundp 'cl-flet) - 'cl-flet - 'flet)) +;; Emacs 24 made flet obsolete and suggested either cl-flet or +;; cl-letf. This macro is based upon gmm-flet from Gnus. +(defmacro mh-flet (bindings &rest body) + "Make temporary overriding function definitions. +This is an analogue of a dynamically scoped `let' that operates on +the function cell of FUNCs rather than their value cell. + +\(fn ((FUNC ARGLIST BODY...) ...) FORM...)" + (if (fboundp 'cl-letf) + `(cl-letf ,(mapcar (lambda (binding) + `((symbol-function ',(car binding)) + (lambda ,@(cdr binding)))) + bindings) + ,@body) + `(flet ,bindings ,@body))) +(put 'mh-flet 'lisp-indent-function 1) +(put 'mh-flet 'edebug-form-spec + '((&rest (sexp sexp &rest form)) &rest form)) (defun mh-display-color-cells (&optional display) "Return the number of color cells supported by DISPLAY. diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index df3a42e..b8d700d 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -268,7 +268,7 @@ usually reads the file \"/etc/mailcap\"." (buffer-read-only nil)) (when (string-match "^[^% \t]+$" method) (setq method (concat method " %s"))) - (mh-cl-flet + (mh-flet ((mm-handle-set-external-undisplayer (handle function) (mh-handle-set-external-undisplayer folder handle function))) @@ -525,7 +525,7 @@ parsed and then displayed." (let ((handles ()) (folder mh-show-folder-buffer) (raw-message-data (buffer-string))) - (mh-cl-flet + (mh-flet ((mm-handle-set-external-undisplayer (handle function) (mh-handle-set-external-undisplayer folder handle function))) @@ -1049,7 +1049,7 @@ attachment, the attachment is hidden." (function (get-text-property (point) 'mh-callback)) (buffer-read-only nil) (folder mh-show-folder-buffer)) - (mh-cl-flet + (mh-flet ((mm-handle-set-external-undisplayer (handle function) (mh-handle-set-external-undisplayer folder handle function))) @@ -1070,7 +1070,7 @@ to click the MIME button." (mm-inline-media-tests mh-mm-inline-media-tests) (data (get-text-property (point) 'mh-data)) (function (get-text-property (point) 'mh-callback))) - (mh-cl-flet + (mh-flet ((mm-handle-set-external-undisplayer (handle func) (mh-handle-set-external-undisplayer folder handle func))) @@ -1166,7 +1166,7 @@ this ;-)" (defun mh-display-emphasis () "Display graphical emphasis." (when (and mh-graphical-emphasis-flag (mh-small-show-buffer-p)) - (mh-cl-flet + (mh-flet ((article-goto-body ())) ; shadow this function to do nothing (save-excursion (goto-char (point-min)) diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index afe9812..26e8216 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el @@ -900,7 +900,7 @@ See also `mh-folder-mode'. (interactive) ;; Don't allow Gnus to create buttons while highlighting, maybe this is bad ;; style? - (mh-cl-flet + (mh-flet ((gnus-article-add-button (&rest args) nil)) (let* ((modified (buffer-modified-p)) (gnus-article-buffer (buffer-name)) diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el index 5135e7e..e6acdba 100644 --- a/lisp/mh-e/mh-thread.el +++ b/lisp/mh-e/mh-thread.el @@ -647,7 +647,7 @@ Only information about messages in MSG-LIST are added to the tree." (defun mh-thread-set-tables (folder) "Use the tables of FOLDER in current buffer." - (mh-cl-flet + (mh-flet ((mh-get-table (symbol) (with-current-buffer folder (symbol-value symbol)))) commit 50caae30b04edf7da1cb6e1fdba90e9a8aebe041 Author: Bill Wohler Date: Mon May 30 16:15:32 2016 -0700 Release MH-E manual version 8.6 * doc/misc/mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for release 8.6. diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index 795f5c3..2ff0dac 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -9,12 +9,12 @@ @c %**end of header @c Version of the software and manual. -@set VERSION 8.5 +@set VERSION 8.6 @c Edition of the manual. It is either empty for the first edition or @c has the form ", nth Edition" (without the quotes). @set EDITION -@set UPDATED 2013-03-02 -@set UPDATE-MONTH March, 2013 +@set UPDATED 2016-04-29 +@set UPDATE-MONTH April, 2016 @c Other variables. @set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh commit 602bb40029525c14cb1429d4a521da552d3a583b Author: Mike Kupfer Date: Mon May 30 16:13:10 2016 -0700 Update MH-E's documentation about HTML renderers * doc/misc/mh-e.texi (HTML): Remove the footnote with the minimum Gnus version (we are no longer trying to support multiple Emacs releases). Sort the table of HTML renderers by name (the previous ordering was based on a 10-year-old survey). Add shr and gnus-w3m to the table. Remove the entry for w3 (no longer available). Update existing entries so that they are more consistent about what features are discussed, and to reflect recent testing (Debian 8). Small tweaks to existing text. diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index c48e4a4..795f5c3 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi @@ -2527,8 +2527,7 @@ in the @cite{The Gnus Manual}. @cindex HTML @cindex Gnus -MH-E can display messages that have been sent in HTML@footnote{This -feature depends on a version of Gnus that is at least 5.10.}. The +MH-E can display messages that have been sent in HTML. The content of the message will appear in the MH-Show buffer as you would expect if the entire message is HTML, or there is an inline HTML body part. However, if there is an HTML body part that is an attachment, @@ -2549,86 +2548,107 @@ based upon the presence of a known browser on your system. If you wish to use a different browser, then set this option accordingly. See the documentation for the browser you use for additional information on how to use it. In particular, find and disable the option to render -images as this can tip off spammers that the email address they have -used is valid. +images, as displaying remote images can tip off spammers that the +email address they have used is valid. @vindex mm-text-html-renderer If you're confused about which @code{mm-text-html-renderer} to use, -here's a brief description of each, sorted by popularity, that -includes the results of a quick poll of MH-E users from 2005-12-23. +here's a brief description of each, sorted by name. @table @asis +@cindex browser, @samp{gnus-w3m} +@cindex @samp{gnus-w3m} @cindex browser, @samp{w3m} @cindex @samp{w3m} -@kindex mouse-2 -@item @samp{w3m} 7 -The @samp{w3m} browser requires an external program. It's quick, -produces pretty nice output, and best of all, it's the only browser -that highlights links. These can be clicked with @kbd{mouse-2} to view -the content of the link in @samp{w3m}. The @samp{w3m} browser handles -tables well and actually respects the table's width parameter (which -can cause text to wrap if the author didn't anticipate that the page -would be viewed in Emacs). +@item @samp{gnus-w3m} +The @samp{gnus-w3m} browser requires an external program. It's quick, +produces pretty nice output, and it highlights links. It renders +@samp{–} and @samp{®} okay. It sometimes fails to wrap lines +properly. It always downloads remote images. @c ------------------------- -@cindex browser, @samp{w3m-standalone} -@cindex @samp{w3m-standalone} -@item @samp{w3m-standalone} 3 -This browser, along with @samp{nil} for the external browser, are the -only choices that work without having to download a separate lisp -package or external program. This browser is quick, but does not show -links. It handles simple tables but some tables get rendered much -wider than the Emacs frame. This browser was the only one not to -handle the escape @samp{–} (it printed a @samp{?}), but it did -render @samp{®}. +@cindex browser, @samp{html2text} +@cindex @samp{html2text} +@item @samp{html2text} +The @samp{html2text} browser requires an external program. Some users +have reported problems with it, such as filling the entire message as +if it were one paragraph, or displaying chunks of raw HTML. @c ------------------------- @cindex browser, @samp{links} @cindex @samp{links} -@item @samp{links} 1 +@item @samp{links} The @samp{links} browser requires an external program. It's quick, and produces nicer output than @samp{lynx} on single column mails in tables. However, it doesn't show links and it doesn't do as nice a job -on multi-column tables as some lines wrap. At least it fits in 80 -columns and thus seems better than @samp{w3} and -@samp{w3m-standalone}. Converts escapes such as @samp{®} to (R). +on multi-column tables as some lines wrap. It does do a good job of +fitting text within 80 columns. It appears to render special +characters using ASCII equivalents. For example, @samp{®} appears +as (R). It does not download images. @c ------------------------- @cindex browser, @samp{lynx} @cindex @samp{lynx} -@item @samp{lynx} 1 +@item @samp{lynx} The @samp{lynx} browser requires an external program. It's quick and produces pretty decent output but it doesn't show links. It doesn't seem to do multi-column tables which makes output much cleaner. It -centers the output and wraps long lines more than most. Handles -@samp{®}. +centers the output and wraps long lines more than most. It does not +always handle special characters like @samp{®} or @samp{–}. +It does not download images. @c ------------------------- -@item @samp{nil} 1 -This choice obviously requires an external browser. Like -@samp{w3m-standalone}, it works out of the box. With this setting, +@item @samp{nil} +This choice obviously requires an external browser. With this setting, HTML messages have a button for the body part which you can view with -@kbd{K v} (@code{mh-folder-toggle-mime-part}). -@c ------------------------- -@cindex browser, @samp{w3} -@cindex @samp{w3} -@item @samp{w3} 0 -This choice does not require an external program as all of the -rendering is done in lisp. You do need to get the package separately. -This browser is @strong{slow}, and doesn't appear to have been updated -since 2001 and the author hasn't responded to my emails. It displays -unknown tags instead of hiding them, so you get to see all the -Microsoft crap in certain messages. Tends to make multi-column tables -wider than even a full-screen Emacs can handle. Like @samp{w3m}, you -can follow links, but you have to find them first as they are not -highlighted. Performs well on single-column tables and handles escapes -such as @samp{®}. +@kbd{K v} (@code{mh-folder-toggle-mime-part}). Rendering of special +characters and handling of remote images depends on your choice of +browser. +@c ------------------------- +@item @samp{shr} +@cindex @samp{shr} +This choice does not require an external program, but it does require +that Emacs be configured at build time to use @samp{libxml2}. It is +fairly quick, it highlights links, and it supports HTML color +declarations. It renders @samp{–} and @samp{®} okay. It +sometimes truncates text, particularly if the message tries to have +fancy text layout. By default it does not download images; this +behavior is controlled by the options @code{mm-html-blocked-images} +and @code{mm-html-inhibit-images} +@ifinfo +(@pxref{Display Customization,,,emacs-mime}). +@end ifinfo +@ifnotinfo +(see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, +Display Customization} in the @cite{The Emacs MIME Manual}). +@end ifnotinfo @c ------------------------- -@cindex browser, @samp{html2text} -@cindex @samp{html2text} -@item @samp{html2text} 0 -The @samp{html2text} browser requires an external program. I noticed -that it can do some nasty things with simple HTML mails (like filling -the entire message as if it were one paragraph, including signature). -On another message, it displayed half of the HTML tags for some -reason. +@cindex browser, @samp{w3m} +@cindex @samp{w3m} +@kindex mouse-2 +@item @samp{w3m} +The @samp{w3m} browser requires an external program. It's quick, +produces pretty nice output, and it highlights links. These can be +clicked with @kbd{mouse-2} to view the content of the link in +@samp{w3m}. The @samp{w3m} browser handles tables well and actually +respects the table's width parameter (which can cause text to wrap if +the author didn't anticipate that the page would be viewed in Emacs). +It does not download images by default; this behavior is controlled by +the option @code{mm-w3m-safe-url-regexp} +@ifinfo +(@pxref{Display Customization,,,emacs-mime}). +@end ifinfo +@ifnotinfo +(see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, +Display Customization} in the @cite{The Emacs MIME Manual}). +@end ifnotinfo +@c ------------------------- +@cindex browser, @samp{w3m-standalone} +@cindex @samp{w3m-standalone} +@cindex browser, @samp{w3m} +@cindex @samp{w3m} +@item @samp{w3m-standalone} +This browser is quick, but does not show links. It handles simple +tables but some tables get rendered much wider than the Emacs frame. +This browser renders @samp{–} and @samp{®} okay. It does not +download images. @end table @vindex mm-text-html-renderer @@ -2637,13 +2657,14 @@ For a couple more sources of information about @code{mm-text-html-renderer}, @ifinfo @xref{Display Customization,,,emacs-mime}, and the documentation for -the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},). +the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus}). @end ifinfo @ifnotinfo see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, Display Customization} in the @cite{The Emacs MIME Manual} and the documentation for the Gnus command @kbd{W h} (see section -@uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the +@uref{http://www.gnus.org/manual/gnus_48.html#Article-Washing, Article +Washing} in the @cite{The Gnus Manual}). @end ifnotinfo commit 89018f003aab01f934f1847dd3768b03494b7c6a Author: Dmitry Gutov Date: Mon May 30 17:51:41 2016 +0300 Fx the we->the typo * doc/emacs/trouble.texi (Sending Patches): Fix the typo (bug#23657). diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 6f6071b..7a5defa 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -1130,7 +1130,8 @@ The patch itself. Use @samp{diff -u} to make your diffs. Diffs without context are hard to install reliably. More than that, they are hard to study; we must always study a patch to decide whether we want to install it. Context -format is better than contextless diffs, but we prefer we unified format. +format is better than contextless diffs, but we prefer the unified +format. If you have GNU diff, use @samp{diff -u -F'^[_a-zA-Z0-9$]\+ *('} when making diffs of C code. This shows the name of the function that each commit 845ee5773196461f3d2a0d4b964eaeb65ff63c28 Author: Paul Eggert Date: Sun May 29 22:45:33 2016 -0700 Restore frames into the current display by default * lisp/desktop.el (desktop-restore-in-current-display): Default to t, not nil (Bug#23604). * etc/NEWS: Mention the change. diff --git a/etc/NEWS b/etc/NEWS index 670465f..00515f5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -361,6 +361,10 @@ recommended to do this as soon as you have firmly upgraded to Emacs 25.1 (or later). Should you ever need to downgrade your desktop file to version 206, you can do this with 'C-u C-u M-x desktop-save'. +--- +*** desktop-restore-in-current-display now defaults to t, not nil. +That is, Emacs by default now restores frames into the current display. + +++ ** New function 'bookmark-set-no-overwrite' bound to 'C-x r M'. It raises an error if a bookmark of that name already exists, diff --git a/lisp/desktop.el b/lisp/desktop.el index dba3277..1f460b7 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -408,7 +408,7 @@ See related options `desktop-restore-reuses-frames', :group 'desktop :version "24.4") -(defcustom desktop-restore-in-current-display nil +(defcustom desktop-restore-in-current-display t "Controls how restoring of frames treats displays. If t, restores frames into the current display. If nil, restores frames into their original displays (if possible). commit ee28b4cd46487ca8ff3d587a5d0ada436aa3b955 Author: Stefan Monnier Date: Sun May 29 20:32:32 2016 -0400 * lisp/recentf.el (recentf-open-files-item): Quick fix for (bug#22434). diff --git a/lisp/recentf.el b/lisp/recentf.el index df7f3e2..6d6ad48 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1187,6 +1187,9 @@ IGNORE other arguments." :format "%[%t\n%]" :help-echo ,(concat "Open " (cdr menu-element)) :action recentf-open-files-action + ;; Override the (problematic) follow-link property of the + ;; `link' widget (bug#22434). + :follow-link nil ,(cdr menu-element)))) (defun recentf-open-files-items (files) commit 01c3cd1c0dbf87332a1de88540d37bfab88b2a6e Author: Stefan Monnier Date: Sun May 29 20:29:47 2016 -0400 etc/TODO: Remove out-of-place issue diff --git a/etc/TODO b/etc/TODO index 599e74a..fe0e2ac 100644 --- a/etc/TODO +++ b/etc/TODO @@ -1403,10 +1403,6 @@ elements **** In rng-valid, instead of using modification-hooks and insert-behind-hooks on dependent overlays, use same technique as nxml-mode. -**** Port to XEmacs. Issues include: Unicode (XEmacs seems to be based on -Mule-UCS); overlays/text properties vs extents; absence of -fontification-functions hook. - *** Fontification **** Allow face to depend on element qname, attribute qname, attribute commit 5e184861c39a7af576ad0cb26107acf09fbe988d Author: Eli Zaretskii Date: Sun May 29 17:59:59 2016 +0300 Clarify doc string of 'file-name-sans-extension' * lisp/files.el (file-name-sans-extension, file-name-extension): Clarify in the doc strings what is the extension, and which leading period doesn't count. (Bug#23643) diff --git a/lisp/files.el b/lisp/files.el index a188328..c5cfa8e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4257,8 +4257,8 @@ the group would be preserved too." (defun file-name-sans-extension (filename) "Return FILENAME sans final \"extension\". -The extension, in a file name, is the part that follows the last `.', -except that a leading `.', if any, doesn't count." +The extension, in a file name, is the part that begins with the last `.', +except that a leading `.' of the file name, if there is one, doesn't count." (save-match-data (let ((file (file-name-sans-versions (file-name-nondirectory filename))) directory) @@ -4273,15 +4273,16 @@ except that a leading `.', if any, doesn't count." (defun file-name-extension (filename &optional period) "Return FILENAME's final \"extension\". -The extension, in a file name, is the part that follows the last `.', -excluding version numbers and backup suffixes, -except that a leading `.', if any, doesn't count. +The extension, in a file name, is the part that begins with the last `.', +excluding version numbers and backup suffixes, except that a leading `.' +of the file name, if there is one, doesn't count. Return nil for extensionless file names such as `foo'. Return the empty string for file names such as `foo.'. -If PERIOD is non-nil, then the returned value includes the period -that delimits the extension, and if FILENAME has no extension, -the value is \"\"." +By default, the returned value excludes the period that starts the +extension, but if the optional argument PERIOD is non-nil, the period +is included in the value, and in that case, if FILENAME has no +extension, the value is \"\"." (save-match-data (let ((file (file-name-sans-versions (file-name-nondirectory filename)))) (if (and (string-match "\\.[^.]*\\'" file) commit bffda223c210832f535e753585235a791fb6e2f3 Author: Eli Zaretskii Date: Sat May 28 15:27:47 2016 +0300 Fix the MSDOS build * msdos/sed1v2.inp (PAXCTL_dumped, PAXCTL_notdumped): Define to empty, and remove the lines which use them in recipes, as that causes weird error message from Make and breaks the MSDOS build. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 383105a..d0ab8af 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -155,7 +155,8 @@ s/ *@LIBXPM@// /^[Aa][Mm]_/s/@AM_V@/$(V)/ /^[Aa][Mm]_/s/@AM_DEFAULT_V@/$(AM_DEFAULT_VERBOSITY)/ /^AUTO_DEPEND *=/s/@AUTO_DEPEND@/yes/ -/^PAXCTL_if_present *=/s/=.*$/=@Rem/ +/^PAXCTL_dumped *=/s/=.*$/=/ +/^PAXCTL_notdumped *=/s/=.*$/=/ /^lisp\.mk:/,/^$/c\ lisp.mk: $(lispsource)/loadup.el\ @rm -f $@\ @@ -174,7 +175,8 @@ lisp.mk: $(lispsource)/loadup.el\ /^\$(leimdir)\/leim-list.el: /s/bootstrap-emacs\$(EXEEXT)/b-emacs$(EXEEXT)/ /^ if test -f/,/^ fi$/c\ command.com /c if exist .gdbinit rm -f _gdbinit -/^ *\$(PAXCTL_if_present) -zex/d +/^ *ifneq (\$(PAXCTL_notdumped),)/,/^ *endif/d +/^ *ifneq (\$(PAXCTL_dumped),)/,/^ *endif/d /^ *ln /s/ln /cp / /^ *\$(SETFATTR_if_present) -n/d /^ fi/d commit f907f98b0b159f71f24d6aa5676eff33fc2a4aca Author: Andreas Schwab Date: Sat May 28 10:45:07 2016 +0200 * lisp/progmodes/elisp-mode.el (elisp-function-argstring): Call substitute-command-keys to undo help--docstring-quote. (Bug#23634) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 6c6c380..7ad8871 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1558,7 +1558,8 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." ARGLIST is either a string, or a list of strings or symbols." (let ((str (cond ((stringp arglist) arglist) ((not (listp arglist)) nil) - (t (help--make-usage-docstring 'toto arglist))))) + (t (substitute-command-keys + (help--make-usage-docstring 'toto arglist)))))) (if (and str (string-match "\\`([^ )]+ ?" str)) (replace-match "(" t t str) str))) commit 1a2ffd023600a5a206766b68aa281b24d1c5e80f Author: Eli Zaretskii Date: Fri May 27 16:06:57 2016 +0300 * src/dired.c (Ffile_name_all_completions): Doc fix. (Bug#23631) diff --git a/src/dired.c b/src/dired.c index e21b227..dba575c 100644 --- a/src/dired.c +++ b/src/dired.c @@ -424,8 +424,7 @@ DEFUN ("file-name-all-completions", Ffile_name_all_completions, These are all file names in directory DIRECTORY which begin with FILE. This function ignores some of the possible completions as determined -by the variables `completion-regexp-list' and -`completion-ignored-extensions', which see. `completion-regexp-list' +by `completion-regexp-list', which see. `completion-regexp-list' is matched against file and directory names relative to DIRECTORY. */) (Lisp_Object file, Lisp_Object directory) { commit f7ffc4b7d36041eba2abe9bc34927413f48056d4 Author: Eli Zaretskii Date: Fri May 27 12:17:15 2016 +0300 Fix infloop in 'number-sequence' * lisp/subr.el (number-sequence): Avoid overflow leading to an infloop. (Bug#23627) * test/automated/subr-tests.el (number-sequence-test): New test. diff --git a/lisp/subr.el b/lisp/subr.el index 3ac61f9..43660d7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -484,13 +484,16 @@ of course, also replace TO with a slightly larger value (list from) (or inc (setq inc 1)) (when (zerop inc) (error "The increment can not be zero")) - (let (seq (n 0) (next from)) + (let (seq (n 0) (next from) (last from)) (if (> inc 0) - (while (<= next to) + ;; The (>= next last) condition protects against integer + ;; overflow in computing NEXT. + (while (and (>= next last) (<= next to)) (setq seq (cons next seq) n (1+ n) + last next next (+ from (* n inc)))) - (while (>= next to) + (while (and (<= next last) (>= next to)) (setq seq (cons next seq) n (1+ n) next (+ from (* n inc))))) diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el index 7906a20..ce21290 100644 --- a/test/automated/subr-tests.el +++ b/test/automated/subr-tests.el @@ -61,6 +61,15 @@ (quote (0 font-lock-keyword-face)))))))) +(ert-deftest number-sequence-test () + (should (= (length + (number-sequence (1- most-positive-fixnum) most-positive-fixnum)) + 2)) + (should (= (length + (number-sequence + (1+ most-negative-fixnum) most-negative-fixnum -1)) + 2))) + (ert-deftest string-comparison-test () (should (string-lessp "abc" "acb")) (should (string-lessp "aBc" "abc")) commit 4ab2673d87794dbbe4db33856c0dc69e4b06db71 Author: Paul Eggert Date: Thu May 26 19:21:56 2016 -0700 ; Spelling and punctuation fixes in comments diff --git a/test/automated/viper-tests.el b/test/automated/viper-tests.el index 8b30f05..e2c39b3 100644 --- a/test/automated/viper-tests.el +++ b/test/automated/viper-tests.el @@ -33,7 +33,7 @@ after itself, although it will leave a buffer called (let ( ;; Viper just turns itself off during batch use. (noninteractive nil) - ;; Switch off start up message or it will chew the key presses + ;; Switch off start up message or it will chew the key presses. (viper-inhibit-startup-message 't) ;; Select an expert-level for the same reason. (viper-expert-level 5) @@ -42,7 +42,7 @@ after itself, although it will leave a buffer called (before-buffer (current-buffer))) (unwind-protect (progn - ;; viper-mode is essentially global, so set it here + ;; viper-mode is essentially global, so set it here. (viper-mode) ;; We must switch to buffer because we are using a keyboard macro ;; which appears to not go to the current-buffer but what ever is @@ -54,16 +54,16 @@ after itself, although it will leave a buffer called (erase-buffer) ;; The new buffer fails to enter vi state so set it. (viper-change-state-to-vi) - ;; Run the macro + ;; Run the macro. (execute-kbd-macro kmacro) (let ((rtn (buffer-substring-no-properties (point-min) (point-max)))) - ;; Kill the buffer iff the macro succeeds + ;; Kill the buffer iff the macro succeeds. (kill-buffer) rtn)) - ;; switch everthing off and restore the buffer + ;; Switch everything off and restore the buffer. (toggle-viper-mode) (switch-to-buffer before-buffer)))) commit 71c152e2af45e79bcc7e58a47571f83d6811256c Author: Glenn Morris Date: Thu May 26 19:50:54 2016 -0400 * lisp/emacs-lisp/find-func.el (find-function-library): Update for symbol-function no longer erroring. (Bug#23626) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index f174a64..d2e10ea 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -357,8 +357,10 @@ signal an error. If VERBOSE is non-nil, and FUNCTION is an alias, display a message about the whole chain of aliases." - (let ((def (if (symbolp function) - (find-function-advised-original function))) + (let ((def (when (symbolp function) + (or (fboundp function) + (signal 'void-function (list function))) + (find-function-advised-original function))) aliases) ;; FIXME for completeness, it might be nice to print something like: ;; foo (which is advised), which is an alias for bar (which is advised).