commit 325200ac1dcf5bed6918ea827d8a48d89487e083 (HEAD, refs/remotes/origin/master) Author: Thomas Fitzsimmons Date: Wed Sep 23 01:45:29 2015 -0400 Do not include authorization header in an HTTP redirect * lisp/url/url-http.el (url-http-parse-headers): Do not automatically include Authorization header in redirect. (Bug#21350) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 6a7d8e2..7367a1e 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -25,8 +25,8 @@ ;;; Code: +(require 'cl-lib) (eval-when-compile - (require 'cl-lib) (require 'subr-x)) (defvar url-callback-arguments) @@ -646,6 +646,12 @@ should be shown to the user." ;; compute the redirection relative to the URL of the proxy. (setq redirect-uri (url-expand-file-name redirect-uri url-http-target-url))) + ;; Do not automatically include an authorization header in the + ;; redirect. If needed it will be regenerated by the relevant + ;; auth scheme when the new request happens. + (setq url-http-extra-headers + (cl-remove "Authorization" + url-http-extra-headers :key 'car :test 'equal)) (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) commit a4d5717e7bd53ce63624d5042586023a35b02d24 Author: Eli Zaretskii Date: Tue Sep 22 19:51:47 2015 +0300 Clarify documentation of ':relative-width' * doc/lispref/display.texi (Specified Space): Document that ':relative-width' is only supported on GUI frames. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index f3713bf..6a30adf 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -4386,8 +4386,9 @@ width. @var{width} can also be a @dfn{pixel width} specification @item :relative-width @var{factor} Specifies that the width of the stretch should be computed from the first character in the group of consecutive characters that have the -same @code{display} property. The space width is the width of that -character, multiplied by @var{factor}. +same @code{display} property. The space width is the pixel width of +that character, multiplied by @var{factor}. This specification is +only supported on graphic terminals. @item :align-to @var{hpos} Specifies that the space should be wide enough to reach @var{hpos}. commit 62831e7c3ff97c00474d2fcf41866d45afb3a153 Author: Eli Zaretskii Date: Tue Sep 22 19:33:47 2015 +0300 Fix 'current-column' in presence of :relative-width * src/indent.c (check_display_width): Support ':relative-width' in a display spec that specifies a stretch glyph. (Bug#21533) diff --git a/src/indent.c b/src/indent.c index ded1843..584f217 100644 --- a/src/indent.c +++ b/src/indent.c @@ -485,7 +485,9 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos) : MOST_POSITIVE_FIXNUM); if ((prop = Fplist_get (plist, QCwidth), - RANGED_INTEGERP (0, prop, INT_MAX))) + RANGED_INTEGERP (0, prop, INT_MAX)) + || (prop = Fplist_get (plist, QCrelative_width), + RANGED_INTEGERP (0, prop, INT_MAX))) width = XINT (prop); else if (FLOATP (prop) && 0 <= XFLOAT_DATA (prop) && XFLOAT_DATA (prop) <= INT_MAX) @@ -504,6 +506,18 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos) *endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); else get_property_and_range (pos, Qdisplay, &val, &start, endpos, Qnil); + + /* For :relative-width, we need to multiply by the column + width of the character at POS, if it is greater than 1. */ + if (!NILP (Fplist_get (plist, QCrelative_width)) + && !NILP (BVAR (current_buffer, enable_multibyte_characters))) + { + int b, wd; + unsigned char *p = BYTE_POS_ADDR (CHAR_TO_BYTE (pos)); + + MULTIBYTE_BYTES_WIDTH (p, buffer_display_table (), b, wd); + width *= wd; + } return width; } } commit e5947fee046a8374fc23714f06cbfbec79d0d2cb Author: Ken Manheimer Date: Tue Sep 22 11:26:13 2015 -0400 Reformat the pdbtrack remote-file fix ChangeLog.2 entry ... to conform better to CONTRIBUTE guidelines. diff --git a/ChangeLog.2 b/ChangeLog.2 index edad2d5..0fb3df6 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -13,8 +13,10 @@ 2015-09-19 Ken Manheimer - Repair pdbtrack so it follows transition from one remote file to another. - * python.el (python-pdbtrack-set-tracked-buffer). + Repair pdbtrack remote file tracking + * lisp/progmodes/python.el (python-pdbtrack-set-tracked-buffer): + Rectify pdbtrack so it follows transitions from one remote source + file to the next. 2015-09-19 Artur Malabarba commit 6c33e7ada5c0aa0dac1e6298c5b45c0134a90b92 Author: Stefan Monnier Date: Tue Sep 22 11:11:50 2015 -0400 * prolog.el: Fix indentation of empty line * lisp/emacs-lisp/smie.el (smie-rules-function): Document new `empty-line-token' element. (smie-indent-empty-line): New function. (smie-indent-functions): Add it. * lisp/progmodes/prolog.el (prolog-smie-rules): Fix :list-intro behavior and use the new `empty-line-token' element (bug#21526). (prolog-mode-variables): Fix comment-start-skip setting to match comment-start. * test/indent/prolog.prolog: Add nested indentation tests. * lisp/newcomment.el (comment-normalize-vars): Fix default value of comment-start-skip not to misuse submatch 1. diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index eb5a713..f305025 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1136,6 +1136,8 @@ METHOD can be: - :elem, in which case the function should return either: - the offset to use to indent function arguments (ARG = `arg') - the basic indentation step (ARG = `basic'). + - the token to use (when ARG = `empty-line-token') when we don't know how + to indent an empty line. - :list-intro, in which case ARG is a token and the function should return non-nil if TOKEN is followed by a list of expressions (not separated by any token) rather than an expression. @@ -1686,6 +1688,19 @@ should not be computed on the basis of the following token." (+ (smie-indent-virtual) (smie-indent--offset 'basic))) ; (t (smie-indent-virtual)))))) ;An infix. +(defun smie-indent-empty-line () + "Indentation rule when there's nothing yet on the line." + ;; Without this rule, SMIE assumes that an empty line will be filled with an + ;; argument (since it falls back to smie-indent-sexps), which tends + ;; to indent far too deeply. + (when (eolp) + (let ((token (or (funcall smie-rules-function :elem 'empty-line-token) + ;; FIXME: Should we default to ";"? + ;; ";" + ))) + (when (assoc token smie-grammar) + (smie-indent-keyword token))))) + (defun smie-indent-exps () ;; Indentation of sequences of simple expressions without ;; intervening keywords or operators. E.g. "a b c" or "g (balbla) f". @@ -1744,7 +1759,7 @@ should not be computed on the basis of the following token." smie-indent-comment smie-indent-comment-continue smie-indent-comment-close smie-indent-comment-inside smie-indent-inside-string smie-indent-keyword smie-indent-after-keyword - smie-indent-exps) + smie-indent-empty-line smie-indent-exps) "Functions to compute the indentation. Each function is called with no argument, shouldn't move point, and should return either nil if it has no opinion, or an integer representing the column diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 60f35c8..7df05a0 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -382,7 +382,7 @@ function should first call this function explicitly." (concat (unless (eq comment-use-syntax t) ;; `syntax-ppss' will detect escaping. "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)") - "\\(\\s<+\\|" + "\\(?:\\s<+\\|" (regexp-quote (comment-string-strip comment-start t t)) ;; Let's not allow any \s- but only [ \t] since \n ;; might be both a comment-end marker and \s-. diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 8c02e54..3d9b0c3 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -922,6 +922,11 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." (defun prolog-smie-rules (kind token) (pcase (cons kind token) (`(:elem . basic) prolog-indent-width) + ;; The list of arguments can never be on a separate line! + (`(:list-intro . ,_) t) + ;; When we don't know how to indent an empty line, assume the most + ;; likely token will be ";". + (`(:elem . empty-line-token) ";") (`(:after . ".") '(column . 0)) ;; To work around smie-closer-alist. ;; Allow indentation of if-then-else as: ;; ( test @@ -1023,7 +1028,7 @@ VERSION is of the format (Major . Minor)" (setq-local comment-start "%") (setq-local comment-end "") (setq-local comment-add 1) - (setq-local comment-start-skip "\\(?:/\\*+ *\\|%%+ *\\)") + (setq-local comment-start-skip "\\(?:/\\*+ *\\|%+ *\\)") (setq-local parens-require-spaces nil) ;; Initialize Prolog system specific variables (dolist (var '(prolog-keywords prolog-types prolog-mode-specificators diff --git a/test/indent/prolog.prolog b/test/indent/prolog.prolog index ca4d2c9..6bf9437 100644 --- a/test/indent/prolog.prolog +++ b/test/indent/prolog.prolog @@ -3,25 +3,24 @@ %% bug#21526 test1 :- ( a -> - b + ( a -> + b + ; c + ) ; c ). test2 :- ( a - -> b1, + -> ( a, + b + ; c + ), b2 ; c1, c2 ) -test3 :- - ( a, - b - ; c - ). - - %% Testing correct tokenizing. foo(X) :- 0'= = X. foo(X) :- 8'234 = X. commit 2fa2c87cac834cae253a7fc6fcab280723660f74 Author: Alan Mackenzie Date: Tue Sep 22 12:45:00 2015 +0000 Make description of `edebug-initial-mode' user friendly. Fixes debbugs#21365. dec/lispref/edebug.texi (Edebug Execution Modes): Change the desscription of `edebug-initial-mode' from that of its implementation to that of its visual effect and use. Move the paragraph higher up. diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 9080bf7..e086be3 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -281,6 +281,15 @@ can still stop the program by typing @kbd{S}, or any editing command. In general, the execution modes earlier in the above list run the program more slowly or stop sooner than the modes later in the list. +When you enter a new Edebug level, Edebug will normally stop at the +first instrumented function it encounters. If you prefer to stop only +at a break point, or not at all (for example, when gathering coverage +data), change the value of @code{edebug-initial-mode} from its default +@code{step} to @code{go} or @code{Go-nonstop}, or one of its other +values (@pxref{Edebug Options}). Note that you may reenter the same +Edebug level several times if, for example, an instrumented function +is called several times from one command. + While executing or tracing, you can interrupt the execution by typing any Edebug command. Edebug stops the program at the next stop point and then executes the command you typed. For example, typing @kbd{t} during @@ -300,13 +309,6 @@ executing a keyboard macro outside of Edebug does not affect commands inside Edebug. This is usually an advantage. See also the @code{edebug-continue-kbd-macro} option in @ref{Edebug Options}. -When you enter a new Edebug level, the initial execution mode comes -from the value of the variable @code{edebug-initial-mode} -(@pxref{Edebug Options}). By default, this specifies step mode. Note -that you may reenter the same Edebug level several times if, for -example, an instrumented function is called several times from one -command. - @defopt edebug-sit-for-seconds This option specifies how many seconds to wait between execution steps in trace mode or continue mode. The default is 1 second. commit 2e19cb4711e2869e7bb82d64b845ca8bf6fb57c8 Author: Eli Zaretskii Date: Tue Sep 22 13:16:11 2015 +0300 lisp/progmodes/gud.el (gud-format-command): Fix last commit * lisp/progmodes/gud.el (gud-format-command): Don't use Tramp internal functions 'tramp-file-name-localname' and 'tramp-dissect-file-name'. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 8b5d490..1284ef2 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2856,10 +2856,9 @@ Obeying it means displaying in another window the specified file and line." (let ((insource (not (eq (current-buffer) gud-comint-buffer))) (frame (or gud-last-frame gud-last-last-frame)) (buffer-file-name-localized - (if (and (buffer-file-name) (file-remote-p (buffer-file-name))) - (tramp-file-name-localname (tramp-dissect-file-name - (buffer-file-name) t)) - (buffer-file-name))) + (and (buffer-file-name) + (or (file-remote-p (buffer-file-name) 'localname) + (buffer-file-name)))) result) (while (and str (let ((case-fold-search nil)) commit 948059e564fc485fefa6e9277effa0b7c595745b Author: Eli Zaretskii Date: Tue Sep 22 13:08:02 2015 +0300 ; * doc/lispref/os.texi (File Notifications): Minor copy-edits. diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 1d0723e..204055d 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2625,7 +2625,8 @@ any one of the following symbols: @item deleted @var{file} was deleted @item changed -@var{file} has changed +@var{file}'s contents has changed; with @file{w32notify} library, +reports attribute changes as well @item renamed @var{file} has been renamed to @var{file1} @item attribute-changed @@ -2633,8 +2634,8 @@ a @var{file} attribute was changed @end table Note that the @file{w32notify} library does not report -@code{attribute-changed} events. Even in case a file attribute has -changed, like permissions or modification time, this library reports a +@code{attribute-changed} events. When some file's attribute, like +permissions or modification time, has changed, this library reports a @code{changed} event. @var{file} and @var{file1} are the name of the file(s) whose event is