commit 2855e5df28db359979e103b7f6d2e718b042f5c2 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Mon Feb 29 21:10:42 2016 -0800 * lisp/emacs-lisp/autoload.el (autoload-timestamps): Experiment with setting to nil. ; * etc/NEWS: Mention this. diff --git a/etc/NEWS b/etc/NEWS index 9ffd7b7..a9ce265 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -122,6 +122,8 @@ Put your function on `window-size-change-functions' instead. ** Autoload files can be generated without timestamps, by setting `autoload-timestamps' to nil. +FIXME As an experiment, nil is the current default. +If no insurmountable problems before next release, it can stay that way. ** `ert-with-function-mocked' of 'ert-x package allows mocking of functions in unit tests. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 8f2b533..1b06fb6 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -87,7 +87,7 @@ that text will be copied verbatim to `generated-autoload-file'.") (defconst generate-autoload-section-continuation ";;;;;; " "String to add on each continuation of the section header form.") -(defvar autoload-timestamps t +(defvar autoload-timestamps nil ; experimental, see bug#22213 "Non-nil means insert a timestamp for each input file into the output. We use these in incremental updates of the output file to decide if we need to rescan an input file. If you set this to nil, commit 8c1503e41bb65e7d75d006c4650f5114fdc6eed2 Author: Lars Ingebrigtsen Date: Tue Mar 1 16:06:24 2016 +1100 Make the revert command in timer-list-mode work * lisp/emacs-lisp/timer-list.el (timer-list): Make the revert command work. diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el index eba1523..9b13e52d 100644 --- a/lisp/emacs-lisp/timer-list.el +++ b/lisp/emacs-lisp/timer-list.el @@ -25,7 +25,7 @@ ;;; Code: ;;;###autoload -(defun timer-list () +(defun timer-list (&optional _ignore-auto _nonconfirm) "List all timers in a buffer." (interactive) (pop-to-buffer-same-window (get-buffer-create "*timer-list*")) @@ -90,6 +90,7 @@ "Mode for listing and controlling timers." (setq truncate-lines t) (buffer-disable-undo) + (setq-local revert-buffer-function 'timer-list) (setq buffer-read-only t) (setq header-line-format (format "%4s %10s %8s %s" commit 4694f2f90679b21797a11f579f9cb9482eb36bdf Author: Glenn Morris Date: Mon Feb 29 21:03:47 2016 -0800 * lisp/emacs-lisp/autoload.el (autoload-find-destination): Fix 6-week old merge error. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 06231f5..8f2b533 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -744,7 +744,7 @@ removes any prior now out-of-date autoload entries." ;; last-time is the time-stamp (specifying ;; the last time we looked at the file) and ;; the file hasn't been changed since. - ((listp last-time) (= (length last-time) 2) + ((listp last-time) (not (time-less-p last-time file-time))) ;; FIXME? Arguably we should throw a ;; user error, or some kind of warning, commit d84bc5555a910b8b7350a1031a0872a3f159e09e Author: Glenn Morris Date: Mon Feb 29 20:51:47 2016 -0800 * lisp/emacs-lisp/autoload.el (update-file-autoloads): Ensure timestamps. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 3405b09..06231f5 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -674,6 +674,8 @@ FILE's modification time." (let ((version-control 'never)) (save-buffer))))) +;; FIXME This command should be deprecated. +;; See http://debbugs.gnu.org/22213#41 ;;;###autoload (defun update-file-autoloads (file &optional save-after outfile) "Update the autoloads for FILE. @@ -691,6 +693,9 @@ Return FILE if there was no autoload cookie in it, else nil." (read-file-name "Write autoload definitions to file: "))) (let* ((generated-autoload-file (or outfile generated-autoload-file)) (autoload-modified-buffers nil) + ;; We need this only if the output file handles more than one input. + ;; See http://debbugs.gnu.org/22213#38 and subsequent. + (autoload-timestamps t) (no-autoloads (autoload-generate-file-autoloads file))) (if autoload-modified-buffers (if save-after (autoload-save-buffers)) commit 86a7d1dba542a8de64979bda45b0b39c3e2e4626 Author: Glenn Morris Date: Mon Feb 29 20:47:12 2016 -0800 * lisp/emacs-lisp/package.el (package-generate-autoloads): Disable timestamps. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 6bfc96c..869c154 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -905,12 +905,15 @@ untar into a directory named DIR; otherwise, signal an error." file) (defvar generated-autoload-file) +(defvar autoload-timestamps) (defvar version-control) (defun package-generate-autoloads (name pkg-dir) (let* ((auto-name (format "%s-autoloads.el" name)) ;;(ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) + ;; We don't need 'em, and this makes the output reproducible. + (autoload-timestamps nil) ;; Silence `autoload-generate-file-autoloads'. (noninteractive inhibit-message) (backup-inhibited t) commit 144bb0cf322b9756d29def3e27a42303e2edce43 Author: Lars Ingebrigtsen Date: Tue Mar 1 14:49:26 2016 +1100 Allow binding `url-mime-accept-string' * lisp/url/url-http.el (url-http): Allow binding `url-mime-accept-string' (bug#22855). diff --git a/etc/NEWS b/etc/NEWS index b1c1e6e..9ffd7b7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1102,6 +1102,10 @@ to specify that we're running in a noninteractive context, and that we should not be queried about things like TLS certificate validity. --- +*** `url-mime-accept-string' can now be used as in "interface" +variable, meaning you can bind it around an `url-retrieve' call. + +--- *** If URL is used with a https connection, the first callback argument plist will contain a :peer element that has the output of `gnutls-peer-status' (if Emacs is built with GnuTLS support). diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index d49e527..33f6d11 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1210,6 +1210,7 @@ The return value of this function is the retrieval buffer." (and (boundp 'url-http-noninteractive) url-http-noninteractive))) (connection (url-http-find-free-connection host port gateway-method)) + (mime-accept-string url-mime-accept-string) (buffer (or retry-buffer (generate-new-buffer (format " *http %s:%d*" host port))))) @@ -1245,6 +1246,7 @@ The return value of this function is the retrieval buffer." url-http-target-url url-http-no-retry url-http-connection-opened + url-mime-accept-string url-http-proxy)) (set (make-local-variable var) nil)) @@ -1262,6 +1264,7 @@ The return value of this function is the retrieval buffer." url-http-target-url url-current-object url-http-no-retry retry-buffer url-http-connection-opened nil + url-mime-accept-string mime-accept-string url-http-proxy url-using-proxy) (set-process-buffer connection buffer) commit 65fa442f2bae42d3f9b06264ca432073ee3197c3 Author: Lars Ingebrigtsen Date: Tue Mar 1 14:31:35 2016 +1100 Add a NEWS entry for the colorful VC indicator diff --git a/etc/NEWS b/etc/NEWS index 8c4fb63..b1c1e6e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1160,6 +1160,11 @@ This command is useful when you perform version control commands outside Emacs (e.g., from the shell prompt), or if you switch the VC back-end for the buffer's file, or remove it from version control. +--- +*** The VC state indicator in the mode line now defaults to more +colorful faces to make it more obvious to the user what the state is. +See the `vc-faces' customization group. + +++ *** New option `vc-annotate-background-mode' controls whether the color range from `vc-annotate-color-map' is applied to the commit 2621c293d82c15c00d9e73a8db75d70da7d0a23b Author: Lars Ingebrigtsen Date: Tue Mar 1 14:25:27 2016 +1100 Use colors in the VC mode lines * lisp/vc/vc-hooks.el: Make the mode line faces default to using colors to more clearly tell the user what the status is. diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 0c1718e..6488e53 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -54,44 +54,51 @@ :group 'vc-faces) (defface vc-needs-update-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base-face) + (((class color)) :foreground "blue" :weight bold)) "Face for VC modeline state when the file needs update." :version "25.1" :group 'vc-faces) (defface vc-locked-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base-face) + (((class color)) :foreground "red")) "Face for VC modeline state when the file locked." :version "25.1" :group 'vc-faces) (defface vc-locally-added-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base-face) + (((class color)) :foreground "ForestGreen")) "Face for VC modeline state when the file is locally added." :version "25.1" :group 'vc-faces) (defface vc-conflict-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base-face) + (((class color)) :foreground "red" :weight bold)) "Face for VC modeline state when the file contains merge conflicts." :version "25.1" :group 'vc-faces) (defface vc-removed-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base-face) + (((class color)) :foreground "red")) "Face for VC modeline state when the file was removed from the VC system." :version "25.1" :group 'vc-faces) (defface vc-missing-state - '((default :inherit vc-state-base-face)) + '((default :inherit vc-state-base-face) + (((class color)) :foreground "red")) "Face for VC modeline state when the file is missing from the file system." :version "25.1" :group 'vc-faces) (defface vc-edited-state - '((default :inherit vc-state-base-face)) - "Face for VC modeline state when the file is up to date." + '((default :inherit vc-state-base-face) + (((class color)) :foreground "ForestGreen")) + "Face for VC modeline state when the file is edited." :version "25.1" :group 'vc-faces) commit 3dd82d7501a28c1ac6cebb9a2fc14399413b5c40 Author: Lars Ingebrigtsen Date: Tue Mar 1 11:19:52 2016 +1100 Support and * lisp/net/shr.el (shr-tag-bdo): New function. (shr-tag-bdi): Ditto. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index ab04b9a..c469e69 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1681,6 +1681,24 @@ The preference is a float determined from `shr-prefer-media-type'." (shr-colorize-region start (point) color (cdr (assq 'background-color shr-stylesheet)))))) +(defun shr-tag-bdo (dom) + (let* ((direction (dom-attr dom 'dir)) + (char (cond + ((equal direction "ltr") + #x202d) ; LRO + ((equal direction "rtl") + #x202e)))) ; RLO + (when char + (insert char)) + (shr-generic dom) + (when char + (insert #x202c)))) ; PDF + +(defun shr-tag-bdi (dom) + (insert #x2068) ; FSI + (shr-generic dom) + (insert #x2069)) ; PDI + ;;; Table rendering algorithm. ;; Table rendering is the only complicated thing here. We do this by commit fc819ea94ef1f466e422ed290e1fa01d5ec0302b Author: Lars Ingebrigtsen Date: Tue Mar 1 10:48:36 2016 +1100 Respect * lisp/net/shr.el (shr-tag-html): Respect the "auto" directional HTML setting. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index fc6fca7..ab04b9a 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1178,7 +1178,9 @@ ones, in case fg and bg are nil." ((equal dir "ltr") (setq bidi-paragraph-direction 'left-to-right)) ((equal dir "rtl") - (setq bidi-paragraph-direction 'right-to-left)))) + (setq bidi-paragraph-direction 'right-to-left)) + ((equal dir "auto") + (setq bidi-paragraph-direction nil)))) (shr-generic dom)) (defun shr-tag-body (dom) commit f71dbb30eeb4b9885ae1c9c580f65c956008d0cf Author: Lars Ingebrigtsen Date: Tue Mar 1 10:33:05 2016 +1100 Default bidi paragraph direction to nil * lisp/net/eww.el (eww-display-html): Default bidi rendering to nil, so that possibly more Arabic web pages render correctly (bug#22786). (eww-setup-buffer): Ditto. diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 91a1775..3c3736a 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -418,7 +418,7 @@ Currently this means either text/html or application/xhtml+xml." (source (and (null document) (buffer-substring (point) (point-max))))) (with-current-buffer buffer - (setq bidi-paragraph-direction 'left-to-right) + (setq bidi-paragraph-direction nil) (plist-put eww-data :source source) (plist-put eww-data :dom document) (let ((inhibit-read-only t) @@ -580,7 +580,7 @@ Currently this means either text/html or application/xhtml+xml." (let ((inhibit-read-only t)) (remove-overlays) (erase-buffer)) - (setq bidi-paragraph-direction 'left-to-right) + (setq bidi-paragraph-direction nil) (unless (eq major-mode 'eww-mode) (eww-mode))) commit b08b2e9e1232de51c0aa8788d3449d3a111c705b Author: Mathias Dahl Date: Sat Feb 27 14:11:02 2016 +0100 Preserve current column, going up/down in thumbnail view. diff --git a/lisp/image-dired.el b/lisp/image-dired.el index a8274f5..67b023d 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1143,7 +1143,8 @@ image." (defun image-dired-next-line () "Move to next line and display properties." (interactive) - (forward-line 1) + (let ((goal-column (current-column))) + (next-line)) ;; If we end up in an empty spot, back up to the next thumbnail. (if (not (image-dired-image-at-point-p)) (image-dired-backward-image)) @@ -1155,7 +1156,8 @@ image." (defun image-dired-previous-line () "Move to previous line and display properties." (interactive) - (forward-line -1) + (let ((goal-column (current-column))) + (previous-line)) ;; If we end up in an empty spot, back up to the next ;; thumbnail. This should only happen if the user deleted a ;; thumbnail and did not refresh, so it is not very common. But we commit 71dc8213b18d4baa5802cf6b7181d81f1f76cbdb Author: Alan Mackenzie Date: Mon Feb 29 21:51:32 2016 +0000 Handle "noise" macros and compiler directives. * lisp/progmodes/cc-langs.el (c-symbol-char-key): New language variable. * lisp/progmodes/cc-vars.el (c-noise-macro-names) (c-noise-macro-with-parens-names): New customizable variables. (c-noise-macro-name-re, c-noise-macro-with-parens-name-re): New variables. (c-make-noise-macro-regexps): New function. * lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Adapt to treat members of c-noise-macro-names as whitespace. (c-forward-noise-clause): New function. (c-forward-keyword-prefixed-id, c-forward-type, c-forward-declarator) (c-forward-decl-or-cast-1, c-backward-over-enum-header) (c-guess-basic-syntax CASE 5A.3, CASE 5A.5, CASE 9A): Handle "noise clauses" in parallel with, e.g., "hangon key clauses". * lisp/progmodes/cc-fonts.el (c-complex-decl-matchers): Handle "noise clauses" in parallel with "prefix-spec keywords". * lisp/progmodes/cc-mode.el (c-mode, c++-mode, objc-mode): call c-make-noise-macro-regexps to initialize the internal variables. * doc/misc/cc-mode.texi ("Noise Macros"): New section documenting the new facilities. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index bc8d24f..cdc659a 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -338,14 +338,15 @@ Line-Up Functions * Comment Line-Up:: * Misc Line-Up:: + Customizing Macros * Macro Backslashes:: * Macros with ;:: +* Noise Macros:: @end detailmenu @end menu - @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Introduction, Overview, Top, Top @comment node-name, next, previous, up @@ -6639,15 +6640,18 @@ Because a macro can expand into anything at all, near where one is invoked @ccmode{} can only indent and fontify code heuristically. Sometimes it gets it wrong. Usually you should try to design your macros so that they ''look like ordinary code'' when you invoke them. -However, one situation is so common that @ccmode{} handles it +However, two situations are so common that @ccmode{} handles them specially: that is when certain macros needn't (or mustn't) be -followed by a @samp{;}. You need to configure @ccmode{} to handle -these macros properly, see @ref{Macros with ;}. +followed by a @samp{;}, and when certain macros (or compiler +directives) expand to nothing. You need to configure @ccmode{} to +handle these macros properly, see @ref{Macros with ;} and @ref{Noise +Macros}. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @menu * Macro Backslashes:: * Macros with ;:: +* Noise Macros:: @end menu @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -6699,7 +6703,7 @@ get aligned only when you explicitly invoke the command @end defopt @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Macros with ;, , Macro Backslashes, Custom Macros +@node Macros with ;, Noise Macros, Macro Backslashes, Custom Macros @comment node-name, next, previous, up @section Macros with semicolons @cindex macros with semicolons @@ -6755,6 +6759,60 @@ initialization code. @end defun @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Noise Macros, , Macros with ;, Custom Macros +@comment node-name, next, previous, up +@section Noise Macros +@cindex noise macros +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +In @ccmode{}, @dfn{noise macros} are macros which expand to nothing, +or compiler directives (such as GCC's @code{__attribute__}) which play +no part in the syntax of the C (etc.) language. Some noise macros are +followed by arguments in parentheses (possibly optionally), others +are not. + +Noise macros can easily confuse @ccmode{}'s analysis of function +headers, causing them to be mis-fontified, or even mis-indented. You +can prevent this confusion by specifying the identifiers which +constitute noise macros. + +@defopt c-noise-macro-names +@vindex noise-macro-names (c-) +This variable is a list of names of noise macros which never have +parenthesized arguments. Each element is a string, and must be a +valid identifier. An element in @code{c-noise-macro-names} must not +also be in @code{c-noise-macro-with-parens-names}. Such an element is +treated as whitespace by @ccmode{}. +@end defopt + +@defopt c-noise-macro-with-parens-names +@vindex noise-macro-with-parens-names (c-) +This variable is a list of names of noise macros which optionally have +arguments in parentheses. Each element of the list is a string, and +must be a valid identifier. An element in +@code{c-noise-macro-with-parens-names} must not also be in +@code{c-noise-macro-names}. For performance reasons, such an element, +together with the optional parenthesized arguments, is specially +handled, but it is only handled when used in declaration +contexts@footnote{If this restriction causes your project +difficulties, please get in touch with @email{bug-cc-mode@@gnu.org}.}. + +The two compiler directives @code{__attribute__} and @code{__declspec} +have traditionally been handled specially in @ccmode{}; for example +they are fontified with font-lock-keyword-face. You don't need to +include these directives in @code{c-noise-macro-with-parens-names}, +but doing so is OK. +@end defopt + +@defun c-make-noise-macro-regexps +@findex make-noise-macro-regexps (c-) +Call this (non-interactive) function, which sets internal variables, +after changing the value of @code{c-noise-macro-names} or +@code{c-noise-macro-with-parens-names} (e.g. in a hook (@pxref{CC +Hooks})). This function is called by @ccmode{}'s initialization code. +@end defun + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Odds and Ends, Sample Init File, Custom Macros, Top @comment node-name, next, previous, up @chapter Odds and Ends diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index f5aa4df..66b5369 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1543,7 +1543,7 @@ comment at the start of cc-engine.el for more info." ;; two newlines with horizontal whitespace between them. ;; ;; The reason to include the first following char is to cope with -;; "rung positions" that doesn't have any ordinary whitespace. If +;; "rung positions" that don't have any ordinary whitespace. If ;; `c-is-sws' is put on a token character it does not have ;; `c-in-sws' set simultaneously. That's the only case when that ;; can occur, and the reason for not extending the `c-in-sws' @@ -1714,7 +1714,9 @@ comment at the start of cc-engine.el for more info." ;; if it's anything that can't start syntactic ws, so we can bail out ;; early in the majority of cases when there just are a few ws chars. (skip-chars-forward " \t\n\r\f\v") - (when (looking-at c-syntactic-ws-start) + (when (or (looking-at c-syntactic-ws-start) + (and c-opt-cpp-prefix + (looking-at c-noise-macro-name-re))) (setq rung-end-pos (min (1+ (point)) (point-max))) (if (setq rung-is-marked (text-property-any rung-pos rung-end-pos @@ -1733,6 +1735,10 @@ comment at the start of cc-engine.el for more info." (with-silent-modifications (while (progn + ;; In the following while form, we move over a "ladder" and + ;; following simple WS each time round the loop, appending the WS + ;; onto the ladder, joining adjacent ladders, and terminating when + ;; there is no more WS or we reach EOB. (while (when (and rung-is-marked (get-text-property (point) 'c-in-sws)) @@ -1776,6 +1782,7 @@ comment at the start of cc-engine.el for more info." (setq rung-pos (point) last-put-in-sws-pos rung-pos))) + ;; Now move over any comments (x)or a CPP construct. (setq simple-ws-end (point)) (c-forward-comments) @@ -1801,6 +1808,13 @@ comment at the start of cc-engine.el for more info." (forward-line 1) (setq safe-start t) ;; Don't cache at eob in case the buffer is narrowed. + (not (eobp))) + + ((and c-opt-cpp-prefix + (looking-at c-noise-macro-name-re)) + ;; Skip over a noise macro. + (goto-char (match-end 1)) + (setq safe-start t) (not (eobp))))) ;; We've searched over a piece of non-white syntactic ws. See if this @@ -1907,8 +1921,11 @@ comment at the start of cc-engine.el for more info." (when (and (not (bobp)) (save-excursion (backward-char) - (looking-at c-syntactic-ws-end))) - + (or (looking-at c-syntactic-ws-end) + (and c-opt-cpp-prefix + (looking-at c-symbol-char-key) + (progn (c-beginning-of-current-token) + (looking-at c-noise-macro-name-re)))))) ;; Try to find a rung position in the simple ws preceding point, so that ;; we can get a cache hit even if the last bit of the simple ws has ;; changed recently. @@ -1927,6 +1944,9 @@ comment at the start of cc-engine.el for more info." (with-silent-modifications (while (progn + ;; Each time round the next while form, we move back over a ladder + ;; and append any simple WS preceding it, if possible joining with + ;; the previous ladder. (while (when (and rung-is-marked (not (bobp)) @@ -2035,6 +2055,15 @@ comment at the start of cc-engine.el for more info." ;; narrowed out, and we can't risk marking the simple ws ;; at the end of it. (goto-char next-rung-pos) + t) + + ((and c-opt-cpp-prefix + (save-excursion + (and (< (skip-syntax-backward "w_") 0) + (progn (setq next-rung-pos (point)) + (looking-at c-noise-macro-name-re))))) + ;; Skipped over a noise macro + (goto-char next-rung-pos) t))) ;; We've searched over a piece of non-white syntactic ws. See if this @@ -5807,8 +5836,10 @@ comment at the start of cc-engine.el for more info." `(c-forward-type) `(c-forward-name))) nil - (and (looking-at c-keywords-regexp) - (c-forward-keyword-clause 1)))) + (cond ((looking-at c-keywords-regexp) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause))))) (when (memq res '(t known found prefix)) ,(when (eq type 'ref) `(when c-record-type-identifiers @@ -5830,6 +5861,17 @@ comment at the start of cc-engine.el for more info." (c-forward-syntactic-ws) (c-forward-keyword-prefixed-id ,type))))) +(defun c-forward-noise-clause () + ;; Point is at a c-noise-macro-with-parens-names macro identifier. Go + ;; forward over this name, any parenthesis expression which follows it, and + ;; any syntactic WS, ending up at the next token. If there is an unbalanced + ;; paren expression, leave point at it. Always Return t. + (c-forward-token-2) + (if (and (eq (char-after) ?\() + (c-go-list-forward)) + (c-forward-syntactic-ws)) + t) + (defun c-forward-keyword-clause (match) ;; Submatch MATCH in the current match data is assumed to surround a ;; token. If it's a keyword, move over it and any immediately @@ -6460,6 +6502,13 @@ comment at the start of cc-engine.el for more info." ; "typedef". (goto-char (match-end 1)) (c-forward-syntactic-ws) + + (while (cond + ((looking-at c-decl-hangon-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)))) + (setq pos (point)) (setq name-res (c-forward-name)) @@ -6852,31 +6901,38 @@ comment at the start of cc-engine.el for more info." ;; of the while. These are, e.g. "*" in "int *foo" or "(" and ;; "*" in "int (*foo) (void)" (Note similar code in ;; `c-forward-decl-or-cast-1'.) - (while (and (looking-at c-type-decl-prefix-key) - (if (and (c-major-mode-is 'c++-mode) - (match-beginning 3)) - ;; If the third submatch matches in C++ then - ;; we're looking at an identifier that's a - ;; prefix only if it specifies a member pointer. - (progn - (setq id-start (point)) - (c-forward-name) - (if (looking-at "\\(::\\)") - ;; We only check for a trailing "::" and - ;; let the "*" that should follow be - ;; matched in the next round. - t - ;; It turned out to be the real identifier, - ;; so flag that and stop. - (setq got-identifier t) - nil)) - t)) - (if (eq (char-after) ?\() - (progn - (setq paren-depth (1+ paren-depth)) - (forward-char)) - (goto-char (match-end 1))) - (c-forward-syntactic-ws)) + (while + (cond + ((looking-at c-decl-hangon-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)) + ((and (looking-at c-type-decl-prefix-key) + (if (and (c-major-mode-is 'c++-mode) + (match-beginning 3)) + ;; If the third submatch matches in C++ then + ;; we're looking at an identifier that's a + ;; prefix only if it specifies a member pointer. + (progn + (setq id-start (point)) + (c-forward-name) + (if (looking-at "\\(::\\)") + ;; We only check for a trailing "::" and + ;; let the "*" that should follow be + ;; matched in the next round. + t + ;; It turned out to be the real identifier, + ;; so flag that and stop. + (setq got-identifier t) + nil)) + t)) + (if (eq (char-after) ?\() + (progn + (setq paren-depth (1+ paren-depth)) + (forward-char)) + (goto-char (match-end 1))) + (c-forward-syntactic-ws) + t))) ;; If we haven't passed the identifier already, do it now. (unless got-identifier @@ -6901,9 +6957,12 @@ comment at the start of cc-engine.el for more info." ;; Skip over any trailing bit, such as "__attribute__". (progn - (when (looking-at c-decl-hangon-key) - (c-forward-keyword-clause 1)) - (<= (point) limit)) + (while (cond + ((looking-at c-decl-hangon-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)))) + (<= (point) limit)) ;; Search syntactically to the end of the declarator (";", ;; ",", a closing paren, eob etc) or to the beginning of an @@ -7082,18 +7141,24 @@ comment at the start of cc-engine.el for more info." ;; macros like __INLINE__, so we recognize both types and known ;; specifiers after them too. (while - (let* ((start (point)) kwd-sym kwd-clause-end found-type) + (let* ((start (point)) kwd-sym kwd-clause-end found-type noise-start) + (cond ;; Look for a specifier keyword clause. - (when (or (looking-at c-prefix-spec-kwds-re) ;FIXME!!! includes auto - (and (c-major-mode-is 'java-mode) - (looking-at "@[A-Za-z0-9]+"))) - (if (save-match-data (looking-at c-typedef-key)) - (setq at-typedef t)) + ((or (looking-at c-prefix-spec-kwds-re) + (and (c-major-mode-is 'java-mode) + (looking-at "@[A-Za-z0-9]+"))) + (save-match-data + (if (looking-at c-typedef-key) + (setq at-typedef t))) (setq kwd-sym (c-keyword-sym (match-string 1))) (save-excursion (c-forward-keyword-clause 1) (setq kwd-clause-end (point)))) + ((looking-at c-noise-macro-with-parens-name-re) + (setq noise-start (point)) + (c-forward-noise-clause) + (setq kwd-clause-end (point)))) (when (setq found-type (c-forward-type t)) ; brace-block-too ;; Found a known or possible type or a prefix of a known type. @@ -7131,16 +7196,17 @@ comment at the start of cc-engine.el for more info." backup-at-type-decl nil backup-maybe-typeless nil)) - (if kwd-sym + (if (or kwd-sym noise-start) (progn ;; Handle known specifier keywords and ;; `c-decl-hangon-kwds' which can occur after known ;; types. - (if (c-keyword-member kwd-sym 'c-decl-hangon-kwds) - ;; It's a hang-on keyword that can occur anywhere. + (if (or (c-keyword-member kwd-sym 'c-decl-hangon-kwds) + noise-start) + ;; It's a hang-on keyword or noise clause that can occur + ;; anywhere. (progn - (setq at-decl-or-cast t) (if at-type ;; Move the identifier start position if ;; we've passed a type. @@ -7192,8 +7258,11 @@ comment at the start of cc-engine.el for more info." ;; If a known type was found, we still need to skip over any ;; hangon keyword clauses after it. Otherwise it has already ;; been done in the loop above. - (while (looking-at c-decl-hangon-key) - (c-forward-keyword-clause 1)) + (while + (cond ((looking-at c-decl-hangon-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)))) (setq id-start (point))) ((eq at-type 'prefix) @@ -8960,6 +9029,11 @@ comment at the start of cc-engine.el for more info." t) ((looking-at c-after-brace-list-key) t) ((looking-at c-brace-list-key) nil) + ((eq (char-after) ?\() + (and (eq (c-backward-token-2) 0) + (or (looking-at c-decl-hangon-key) + (looking-at c-noise-macro-with-parens-name-re)))) + ((and c-recognize-<>-arglists (eq (char-after) ?<) (looking-at "\\s(")) @@ -10220,9 +10294,11 @@ comment at the start of cc-engine.el for more info." ;; CASE 5A.3: brace list open ((save-excursion (c-beginning-of-decl-1 lim) - (while (looking-at c-specifier-key) - (goto-char (match-end 1)) - (c-forward-syntactic-ws indent-point)) + (while (cond + ((looking-at c-specifier-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)))) (setq placeholder (c-point 'boi)) (or (consp special-brace-list) (and (or (save-excursion @@ -10274,9 +10350,11 @@ comment at the start of cc-engine.el for more info." (t (save-excursion (c-beginning-of-decl-1 lim) - (while (looking-at c-specifier-key) - (goto-char (match-end 1)) - (c-forward-syntactic-ws indent-point)) + (while (cond + ((looking-at c-specifier-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)))) (c-add-syntax 'defun-open (c-point 'boi)) ;; Bogus to use bol here, but it's the legacy. (Resolved, ;; 2007-11-09) @@ -10907,9 +10985,11 @@ comment at the start of cc-engine.el for more info." (c-beginning-of-statement-1 (c-safe-position (1- containing-sexp) paren-state)) (c-forward-token-2 0) - (while (looking-at c-specifier-key) - (goto-char (match-end 1)) - (c-forward-syntactic-ws)) + (while (cond + ((looking-at c-specifier-key) + (c-forward-keyword-clause 1)) + ((looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause)))) (c-add-syntax 'brace-list-open (c-point 'boi)))) ;; CASE 9B: brace-list-close brace diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 3cc537b..a7097b9 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1698,10 +1698,16 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." (unless (c-skip-comments-and-strings limit) (c-forward-syntactic-ws) ;; Handle prefix declaration specifiers. - (when (or (looking-at c-prefix-spec-kwds-re) - (and (c-major-mode-is 'java-mode) - (looking-at "@[A-Za-z0-9]+"))) - (c-forward-keyword-clause 1)) + (while + (or + (when (or (looking-at c-prefix-spec-kwds-re) + (and (c-major-mode-is 'java-mode) + (looking-at "@[A-Za-z0-9]+"))) + (c-forward-keyword-clause 1) + t) + (when (looking-at c-noise-macro-with-parens-name-re) + (c-forward-noise-clause) + t))) ,(if (c-major-mode-is 'c++-mode) `(when (and (c-forward-type) (eq (char-after) ?=)) @@ -1827,7 +1833,7 @@ higher." "\\)\\>" ;; Disallow various common punctuation chars that can't come ;; before the '{' of the enum list, to avoid searching too far. - "[^][{}();/#=]*" + "[^][{};/#=]*" "{") '((c-font-lock-declarators limit t nil) (save-match-data diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 86b6bec..d212482 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -619,6 +619,11 @@ This is of the form that fits inside [ ] in a regexp." objc (concat c-alnum "_$@")) (c-lang-defvar c-symbol-chars (c-lang-const c-symbol-chars)) +(c-lang-defconst c-symbol-char-key + "Regexp matching a sequence of at least one identifier character." + t (concat "[" (c-lang-const c-symbol-chars) "]+")) +(c-lang-defvar c-symbol-char-key (c-lang-const c-symbol-char-key)) + (c-lang-defconst c-symbol-key "Regexp matching identifiers and keywords (with submatch 0). Assumed to match if `c-symbol-start' matches on the same position." diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 58aebf8..9ebe6f7 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1493,6 +1493,7 @@ Key bindings: abbrev-mode t) (use-local-map c-mode-map) (c-init-language-vars-for 'c-mode) + (c-make-noise-macro-regexps) (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'c-mode) (easy-menu-add c-c-menu) @@ -1548,6 +1549,7 @@ Key bindings: abbrev-mode t) (use-local-map c++-mode-map) (c-init-language-vars-for 'c++-mode) + (c-make-noise-macro-regexps) (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'c++-mode) (easy-menu-add c-c++-menu) @@ -1601,6 +1603,7 @@ Key bindings: abbrev-mode t) (use-local-map objc-mode-map) (c-init-language-vars-for 'objc-mode) + (c-make-noise-macro-regexps) (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'objc-mode) (easy-menu-add c-objc-menu) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 8cee733..a695718 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1619,6 +1619,49 @@ names).")) :type 'c-extra-types-widget :group 'c) +(defvar c-noise-macro-with-parens-name-re nil) +(defvar c-noise-macro-name-re nil) + +(defcustom c-noise-macro-names nil + "A list of names of macros which expand to nothing, or compiler extensions +like \"????\" which are syntactic noise. Such a macro/extension is complete in +itself, never having parentheses. All these names must be syntactically valid +identifiers. + +If you change this variable's value, call the function +`c-make-noise-macro-regexps' to set the necessary internal variables (or do +this implicitly by reinitialising C/C++/Objc Mode on any buffer)." + :type '(repeat :tag "List of names" string) + :group 'c) + +(defcustom c-noise-macro-with-parens-names nil + "A list of names of macros \(or compiler extensions like \"__attribute__\") +which optionally have arguments in parentheses, and which expand to nothing. +These are recognized by CC Mode only in declarations." + :type '(regexp :tag "List of names (possibly empty)" string) + :group 'c) + +(defun c-make-noise-macro-regexps () + ;; Convert `c-noise-macro-names' and `c-noise-macro-with-parens-names' into + ;; `c-noise-macro-name-re' and `c-noise-macro-with-parens-name-re'. + (setq c-noise-macro-with-parens-name-re + (cond ((null c-noise-macro-with-parens-names) "\\<\\>") + ((consp c-noise-macro-with-parens-names) + (concat (regexp-opt c-noise-macro-with-parens-names t) + "\\([^[:alnum:]_$]\\|$\\)")) + ((stringp c-noise-macro-with-parens-names) + (copy-sequence c-noise-macro-with-parens-names)) + (t (error "c-make-noise-macro-regexps: \ +c-noise-macro-with-parens-names is invalid: %s" c-noise-macro-with-parens-names)))) + (setq c-noise-macro-name-re + (cond ((null c-noise-macro-names) "\\<\\>") + ((consp c-noise-macro-names) + (concat (regexp-opt c-noise-macro-names t) + "\\([^[:alnum:]_$]\\|$\\)")) + ((stringp c-noise-macro-names) + (copy-sequence c-noise-macro-names)) + (t (error "c-make-noise-macro-regexps: \ +c-noise-macro-names is invalid: %s" c-noise-macro-names))))) ;; Non-customizable variables, still part of the interface to CC Mode (defvar c-macro-with-semi-re nil commit 93bf7d52841c60ffc10e0c9c789a7987812ce55e Author: Paul Eggert Date: Mon Feb 29 09:39:45 2016 -0800 Stop calling res_init Emacs shouldn’t need to call res_init any more, now that nscd or equivalent is everywhere. On modern systems, calling res_init simply slows Emacs down. On ancient systems lacking nscd Emacs will still work well enough with this change; it’s just that it won’t respond to changes in /etc/resolv.conf. * configure.ac (HAVE_RES_INIT): Remove. Worry about -lresolv only when configured --with-hesiod. Hesiod is still used; see, e.g.: https://soylentnews.org/meta/article.pl?sid=15/07/13/0255214 * src/Makefile.in (LIBRESOLV): Remove. All uses removed. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 796b57d..86f2fa5 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -254,7 +254,6 @@ HAVE_RANDOM HAVE_READLINK HAVE_READLINKAT HAVE_RECVFROM -HAVE_RES_INIT HAVE_RINT HAVE_RSVG HAVE_SELECT diff --git a/configure.ac b/configure.ac index e750a43..48d9df1 100644 --- a/configure.ac +++ b/configure.ac @@ -4000,44 +4000,13 @@ AC_CACHE_CHECK([whether signals can be handled on alternate stack], [emacs_cv_alternate_stack=yes], [emacs_cv_alternate_stack=no])]) -# Do we have res_init, for detecting changes in /etc/resolv.conf? -# On Darwin, res_init appears not to be useful: see bug#562 and -# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html -resolv=no - -if test $opsys != darwin; then - - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#include -#include ]], - [[return res_init();]])], - have_res_init=yes, have_res_init=no) - if test "$have_res_init" = no; then - OLIBS="$LIBS" - LIBS="$LIBS -lresolv" - AC_MSG_CHECKING(for res_init with -lresolv) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#include -#include ]], - [[return res_init();]])], - have_res_init=yes, have_res_init=no) - AC_MSG_RESULT($have_res_init) - if test "$have_res_init" = yes ; then - resolv=yes - fi - LIBS="$OLIBS" - fi - - if test "$have_res_init" = yes; then - AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.]) - fi -fi dnl !darwin - # Do we need the Hesiod library to provide the support routines? dnl FIXME? Should we be skipping this on Darwin too? LIBHESIOD= +LIBRESOLV= if test "$with_hesiod" != no ; then # Don't set $LIBS here -- see comments above. FIXME which comments? + resolv=no AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, , [AC_CHECK_LIB(resolv, res_send, resolv=yes, [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])]) @@ -4046,21 +4015,16 @@ if test "$with_hesiod" != no ; then else RESOLVLIB= fi + hesiod=no AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost, hesiod=yes, :, $RESOLVLIB)]) if test x"$hesiod" = xyes; then LIBHESIOD=-lhesiod + LIBRESOLV=$RESOLVLIB fi fi AC_SUBST(LIBHESIOD) - -# Do we need libresolv (due to res_init or Hesiod)? -if test "$resolv" = yes && test $opsys != darwin; then - LIBRESOLV=-lresolv -else - LIBRESOLV= -fi AC_SUBST(LIBRESOLV) # These tell us which Kerberos-related libraries to use. diff --git a/src/Makefile.in b/src/Makefile.in index 99394ac..8dcaf7e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -302,9 +302,6 @@ CM_OBJ=@CM_OBJ@ LIBGPM = @LIBGPM@ -## -lresolv, or empty. -LIBRESOLV = @LIBRESOLV@ - LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ @@ -485,7 +482,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(WEBKIT_LIBS) \ $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ - $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ + $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) \ diff --git a/src/process.c b/src/process.c index f40e8e5..85a4885 100644 --- a/src/process.c +++ b/src/process.c @@ -75,11 +75,6 @@ along with GNU Emacs. If not, see . */ # include #endif -#ifdef HAVE_RES_INIT -#include -#include -#endif - #ifdef HAVE_UTIL_H #include #endif @@ -3827,10 +3822,6 @@ usage: (make-network-process &rest ARGS) */) immediate_quit = 1; QUIT; -#ifdef HAVE_RES_INIT - res_init (); -#endif - struct addrinfo hints; memset (&hints, 0, sizeof hints); hints.ai_family = family; @@ -3910,10 +3901,6 @@ usage: (make-network-process &rest ARGS) */) immediate_quit = 1; QUIT; -#ifdef HAVE_RES_INIT - res_init (); -#endif - host_info_ptr = gethostbyname ((const char *) SDATA (host)); immediate_quit = 0; commit 938f104f1b8de0a082f4736aaf504cea4f65765e Author: Glenn Morris Date: Mon Feb 29 08:51:12 2016 -0800 * lisp/progmodes/grep.el (grep-save-buffers): Fix type, tweak doc. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index a0b7e7d..2b44b58 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -229,20 +229,18 @@ to determine whether cdr should not be excluded." (defcustom grep-save-buffers 'ask "If non-nil, save buffers before running the grep commands. -If `ask', ask before saving. If the variable is a function, it -will be used as a predicate that should say whether the buffer should -be saved or not. -E.g., one can set this to +If `ask', ask before saving. If a function, call it with no arguments +with each buffer current, as a predicate to determine whether that +buffer should be saved or not. E.g., one can set this to (lambda () (string-prefix-p my-grep-root (file-truename (buffer-file-name)))) to limit saving to files located under `my-grep-root'." :version "25.2" :type '(choice - (const :tag "Default (ask before saving)" ask) + (const :tag "Ask before saving" ask) (const :tag "Don't save buffers" nil) - (const :tag "Save all buffers" t) - function) - :type 'boolean + function + (other :tag "Save all buffers" t)) :group 'grep) (defcustom grep-error-screen-columns nil commit cffe077b76769e8b5b109cf3cbbdfdcf31e1150d Author: Glenn Morris Date: Mon Feb 29 08:40:56 2016 -0800 * lisp/progmodes/grep.el (grep-save-buffers): Don't autoload defcustoms. ; (Unless there is a good, specific reason.) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index b035528..a0b7e7d 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -227,7 +227,6 @@ to determine whether cdr should not be excluded." (const :tag "No ignored files" nil)) :group 'grep) -;;;###autoload (defcustom grep-save-buffers 'ask "If non-nil, save buffers before running the grep commands. If `ask', ask before saving. If the variable is a function, it commit 71d63c472167d864c04d5b8f35e802383922a7a5 Author: Paul Eggert Date: Mon Feb 29 07:42:54 2016 -0800 * src/process.c (Fdelete_process): Simplify cast. diff --git a/src/process.c b/src/process.c index d83e2d2..f40e8e5 100644 --- a/src/process.c +++ b/src/process.c @@ -858,8 +858,7 @@ nil, indicating the current buffer's process. */) completion, and then free the request. */ if (! inhibit_sentinels) { - gai_suspend ((const struct gaicb * const*)&p->dns_request, - 1, NULL); + gai_suspend ((struct gaicb const **) &p->dns_request, 1, NULL); free_dns_request (process); } } commit cad0bc70558f9c28c808711c5295dec9fc5ad6e5 Author: Lars Ingebrigtsen Date: Mon Feb 29 22:21:11 2016 +1100 Use the correct background color when filling nested * lisp/net/shr.el (shr-face-background): Return the first background, because that's the one that's visible (bug#22680). diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 63e02d9..fc6fca7 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1911,7 +1911,8 @@ The preference is a float determined from `shr-prefer-media-type'." (let ((background nil)) (dolist (elem face) (when (and (consp elem) - (eq (car elem) :background)) + (eq (car elem) :background) + (not background)) (setq background (cadr elem)))) (and background (list :background background))))))