commit 3b9cbacf6110daf7cb2a838e28afef1e4f5ff831 (HEAD, refs/remotes/origin/master) Author: Katsumi Yamaoka Date: Wed Sep 14 00:07:21 2016 +0000 sieve-manage.el: Rename sieve-manage-ignore-broken-tls * lisp/net/sieve-manage.el (sieve-manage-ignore-starttls): Rename from sieve-manage-ignore-broken-tls. If it is set, sieve-manage will never use STARTTLS even if the server says it is capable (but may be broken). diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index e199a7f..c8276e7 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -146,7 +146,7 @@ for doing the actual authentication." :type 'symbol :group 'sieve-manage) -(defcustom sieve-manage-ignore-broken-tls nil +(defcustom sieve-manage-ignore-starttls nil "Ignore STARTTLS even if STARTTLS capability is provided." :version "25.2" :type 'boolean @@ -216,14 +216,14 @@ Return the buffer associated with the connection." :return-list t :starttls-function (lambda (capabilities) - (when (and (not sieve-manage-ignore-broken-tls) + (when (and (not sieve-manage-ignore-starttls) (string-match "\\bSTARTTLS\\b" capabilities)) "STARTTLS\r\n"))) (setq sieve-manage-process proc) (setq sieve-manage-capability (sieve-manage-parse-capability (plist-get props :capabilities))) ;; Ignore new capabilities issues after successful STARTTLS - (when (or sieve-manage-ignore-broken-tls + (when (or sieve-manage-ignore-starttls (and (memq stream '(nil network starttls)) (eq (plist-get props :type) 'tls))) (sieve-manage-drop-next-answer)) commit 4a0d8b4cadcfef8c39581031bd00b3175ca37b43 Author: Paul Eggert Date: Tue Sep 13 15:29:26 2016 -0700 Port to ISO/IEC TS 18661-1:2014 * src/character.h (CHARACTER_WIDTH): Rename from CHAR_WIDTH. All uses changed. diff --git a/src/character.c b/src/character.c index b19e41d..75a7dab 100644 --- a/src/character.c +++ b/src/character.c @@ -278,7 +278,7 @@ If the multibyte character does not represent a byte, return -1. */) static ptrdiff_t char_width (int c, struct Lisp_Char_Table *dp) { - ptrdiff_t width = CHAR_WIDTH (c); + ptrdiff_t width = CHARACTER_WIDTH (c); if (dp) { @@ -291,7 +291,7 @@ char_width (int c, struct Lisp_Char_Table *dp) ch = AREF (disp, i); if (CHARACTERP (ch)) { - int w = CHAR_WIDTH (XFASTINT (ch)); + int w = CHARACTER_WIDTH (XFASTINT (ch)); if (INT_ADD_WRAPV (width, w, &width)) string_overflow (); } diff --git a/src/character.h b/src/character.h index 2cb76b0..b72b61d 100644 --- a/src/character.h +++ b/src/character.h @@ -588,9 +588,10 @@ sanitize_char_width (EMACS_INT width) /* Return the width of character C. The width is measured by how many columns C will occupy on the screen when displayed in the current - buffer. */ + buffer. The name CHARACTER_WIDTH avoids a collision with + CHAR_WIDTH when enabled; see ISO/IEC TS 18661-1:2014. */ -#define CHAR_WIDTH(c) \ +#define CHARACTER_WIDTH(c) \ (ASCII_CHAR_P (c) \ ? ASCII_CHAR_WIDTH (c) \ : sanitize_char_width (XINT (CHAR_TABLE_REF (Vchar_width_table, c)))) diff --git a/src/composite.c b/src/composite.c index 8aa6974..da92135 100644 --- a/src/composite.c +++ b/src/composite.c @@ -335,7 +335,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, ch = XINT (key_contents[i]); /* TAB in a composition means display glyphs with padding space on the left or right. */ - this_width = (ch == '\t' ? 1 : CHAR_WIDTH (ch)); + this_width = (ch == '\t' ? 1 : CHARACTER_WIDTH (ch)); if (cmp->width < this_width) cmp->width = this_width; } @@ -346,7 +346,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, double leftmost = 0.0, rightmost; ch = XINT (key_contents[0]); - rightmost = ch != '\t' ? CHAR_WIDTH (ch) : 1; + rightmost = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; for (i = 1; i < glyph_len; i += 2) { @@ -356,7 +356,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, rule = XINT (key_contents[i]); ch = XINT (key_contents[i + 1]); - this_width = ch != '\t' ? CHAR_WIDTH (ch) : 1; + this_width = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; /* A composition rule is specified by an integer value that encodes global and new reference points (GREF and @@ -1383,7 +1383,7 @@ composition_update_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff { c = XINT (LGSTRING_CHAR (gstring, from + i)); cmp_it->nbytes += CHAR_BYTES (c); - cmp_it->width += CHAR_WIDTH (c); + cmp_it->width += CHARACTER_WIDTH (c); } } return c; diff --git a/src/dispextern.h b/src/dispextern.h index f2c42de..79bc935 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2237,7 +2237,7 @@ struct composition_it /* Indices of the glyphs for the current grapheme cluster. */ int from, to; /* Width of the current grapheme cluster in units of columns it will - occupy on display; see CHAR_WIDTH. */ + occupy on display; see CHARACTER_WIDTH. */ int width; }; diff --git a/src/indent.c b/src/indent.c index f8c180d..cc5bf37 100644 --- a/src/indent.c +++ b/src/indent.c @@ -296,7 +296,7 @@ skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p, ptrdiff_t to, Lisp_Ob if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, ch))) \ width = sanitize_char_width (ASIZE (DISP_CHAR_VECTOR (dp, ch))); \ else \ - width = CHAR_WIDTH (ch); \ + width = CHARACTER_WIDTH (ch); \ } \ } while (0) diff --git a/src/menu.c b/src/menu.c index 90bb19a..638810b 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1045,7 +1045,7 @@ menu_item_width (const unsigned char *str) int ch_len; int ch = STRING_CHAR_AND_LENGTH (p, ch_len); - len += CHAR_WIDTH (ch); + len += CHARACTER_WIDTH (ch); p += ch_len; } return len; diff --git a/src/term.c b/src/term.c index 54a97e9..426674f 100644 --- a/src/term.c +++ b/src/term.c @@ -593,7 +593,7 @@ encode_terminal_code (struct glyph *src, int src_len, continue; if (char_charset (c, charset_list, NULL)) { - if (CHAR_WIDTH (c) == 0 + if (CHARACTER_WIDTH (c) == 0 && i > 0 && COMPOSITION_GLYPH (cmp, i - 1) == '\t') /* Should be left-padded */ { @@ -1626,7 +1626,7 @@ produce_glyphs (struct it *it) if (char_charset (it->char_to_display, charset_list, NULL)) { - it->pixel_width = CHAR_WIDTH (it->char_to_display); + it->pixel_width = CHARACTER_WIDTH (it->char_to_display); it->nglyphs = it->pixel_width; if (it->glyph_row) append_glyph (it); @@ -1832,7 +1832,7 @@ produce_glyphless_glyph (struct it *it, Lisp_Object acronym) } else if (it->glyphless_method == GLYPHLESS_DISPLAY_EMPTY_BOX) { - len = CHAR_WIDTH (it->c); + len = CHARACTER_WIDTH (it->c); if (len == 0) len = 1; else if (len > 4) diff --git a/src/xdisp.c b/src/xdisp.c index d1e8848..4bf1470 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -26927,7 +26927,7 @@ produce_glyphless_glyph (struct it *it, bool for_no_font, Lisp_Object acronym) } else if (it->glyphless_method == GLYPHLESS_DISPLAY_EMPTY_BOX) { - width = CHAR_WIDTH (it->c); + width = CHARACTER_WIDTH (it->c); if (width == 0) width = 1; else if (width > 4) commit 3988ceaa1cfa2022443906750cbb30127a1e161f Author: Tino Calancha Date: Wed Sep 14 00:04:32 2016 +0900 dired-jump: Expand file-name before dired-goto-file call Command dired-goto-file requires its argument to be an absolute file name. Interactively FILE-NAME is read with read-file-name, which could return an abbreviated file name (Bug#24409). * lisp/dired-x.el (dired-jump): Use expand-file-name on FILE-NAME. Clarify in doc string the meaning of arg FILE-NAME. diff --git a/lisp/dired-x.el b/lisp/dired-x.el index be762e6..41c2256 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -413,14 +413,19 @@ If in Dired already, pop up a level and goto old directory's line. In case the proper Dired file line cannot be found, refresh the dired buffer and try again. When OTHER-WINDOW is non-nil, jump to Dired buffer in other window. -Interactively with prefix argument, read FILE-NAME and -move to its line in dired." +When FILE-NAME is non-nil, jump to its line in Dired. +Interactively with prefix argument, read FILE-NAME." (interactive (list nil (and current-prefix-arg (read-file-name "Jump to Dired file: ")))) (if (bound-and-true-p tar-subfile-mode) (switch-to-buffer tar-superior-buffer) - (let* ((file (or file-name buffer-file-name)) + ;; Expand file-name before `dired-goto-file' call: + ;; `dired-goto-file' requires its argument to be an absolute + ;; file name; the result of `read-file-name' could be + ;; an abbreviated file name (Bug#24409). + (let* ((file (or (and file-name (expand-file-name file-name)) + buffer-file-name)) (dir (if file (file-name-directory file) default-directory))) (if (and (eq major-mode 'dired-mode) (null file-name)) (progn commit 469fcaa7f8d2ad57571a0af55a4082700345e4a5 Author: Tino Calancha Date: Tue Sep 13 18:01:38 2016 +0900 Add test for Bug#21454 * test/lisp/legacy/files-tests.el (files-test-bug-21454): New test. diff --git a/test/lisp/legacy/files-tests.el b/test/lisp/legacy/files-tests.el index 3c6f61b..56150c1 100644 --- a/test/lisp/legacy/files-tests.el +++ b/test/lisp/legacy/files-tests.el @@ -169,4 +169,32 @@ form.") ;; Stop the above "Local Var..." confusing Emacs. +(ert-deftest files-test-bug-21454 () + "Test for http://debbugs.gnu.org/21454 ." + :expected-result :failed + (let ((input-result + '(("/foo/bar//baz/:/bar/foo/baz//" nil ("/foo/bar/baz/" "/bar/foo/baz/")) + ("/foo/bar/:/bar/qux/:/qux/foo" nil ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("//foo/bar/:/bar/qux/:/qux/foo/" nil ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo/bar/:/bar/qux/:/qux/foo/" nil ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo//bar/:/bar/qux/:/qux/foo/" nil ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo//bar/:/bar/qux/:/qux/foo" nil ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo/bar" "$FOO/baz/:/qux/foo/" ("/foo/bar/baz/" "/qux/foo/")) + ("//foo/bar/" "$FOO/baz/:/qux/foo/" ("/foo/bar/baz/" "/qux/foo/")))) + (foo-env (getenv "FOO")) + (bar-env (getenv "BAR"))) + (unwind-protect + (dolist (test input-result) + (let ((foo (nth 0 test)) + (bar (nth 1 test)) + (res (nth 2 test))) + (setenv "FOO" foo) + (if bar + (progn + (setenv "BAR" bar) + (should (equal res (parse-colon-path (getenv "BAR"))))) + (should (equal res (parse-colon-path "$FOO")))))) + (setenv "FOO" foo-env) + (setenv "BAR" bar-env)))) + ;;; files.el ends here