diff options
| author | Michael Albinus | 2019-05-18 18:14:39 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-05-18 18:14:39 +0200 |
| commit | 5b8be5809eff0f644c3484a2a110a8812236f518 (patch) | |
| tree | fb16ba787932cec788a38133ff028d65effea18e | |
| parent | 16f14a4dbb45075c2c48f25784ddfbecb4433792 (diff) | |
| parent | 95fb826dc58965eac287c0826831352edf2e56f7 (diff) | |
| download | emacs-5b8be5809eff0f644c3484a2a110a8812236f518.tar.gz emacs-5b8be5809eff0f644c3484a2a110a8812236f518.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 57 | ||||
| -rw-r--r-- | src/image.c | 12 |
3 files changed, 60 insertions, 10 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 556fb63a07f..31958ff7b04 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | (defvar gnus-tmp-indentation) | 42 | (defvar gnus-tmp-indentation) |
| 43 | (defvar gnus-tmp-level) | 43 | (defvar gnus-tmp-level) |
| 44 | (defvar gnus-tmp-lines) | 44 | (defvar gnus-tmp-lines) |
| 45 | (defvar gnus-tmp-name) | ||
| 45 | (defvar gnus-tmp-number) | 46 | (defvar gnus-tmp-number) |
| 46 | (defvar gnus-tmp-opening-bracket) | 47 | (defvar gnus-tmp-opening-bracket) |
| 47 | (defvar gnus-tmp-process) | 48 | (defvar gnus-tmp-process) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 41bab270daa..c0f044ddfeb 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -4491,6 +4491,30 @@ comment at the start of cc-engine.el for more info." | |||
| 4491 | (goto-char pos)))))) | 4491 | (goto-char pos)))))) |
| 4492 | (< (point) start))) | 4492 | (< (point) start))) |
| 4493 | 4493 | ||
| 4494 | (defun c-end-of-token (&optional back-limit) | ||
| 4495 | ;; Move to the end of the token we're just before or in the middle of. | ||
| 4496 | ;; BACK-LIMIT may be used to bound the backward search; if given it's | ||
| 4497 | ;; assumed to be at the boundary between two tokens. Return non-nil if the | ||
| 4498 | ;; point is moved, nil otherwise. | ||
| 4499 | ;; | ||
| 4500 | ;; This function might do hidden buffer changes. | ||
| 4501 | (let ((start (point))) | ||
| 4502 | (cond ;; ((< (skip-syntax-backward "w_" (1- start)) 0) | ||
| 4503 | ;; (skip-syntax-forward "w_")) | ||
| 4504 | ((> (skip-syntax-forward "w_") 0)) | ||
| 4505 | ((< (skip-syntax-backward ".()" back-limit) 0) | ||
| 4506 | (while (< (point) start) | ||
| 4507 | (if (looking-at c-nonsymbol-token-regexp) | ||
| 4508 | (goto-char (match-end 0)) | ||
| 4509 | ;; `c-nonsymbol-token-regexp' should always match since | ||
| 4510 | ;; we've skipped backward over punctuation or paren | ||
| 4511 | ;; syntax, but move forward in case it doesn't so that | ||
| 4512 | ;; we don't leave point earlier than we started with. | ||
| 4513 | (forward-char)))) | ||
| 4514 | (t (if (looking-at c-nonsymbol-token-regexp) | ||
| 4515 | (goto-char (match-end 0))))) | ||
| 4516 | (> (point) start))) | ||
| 4517 | |||
| 4494 | (defun c-end-of-current-token (&optional back-limit) | 4518 | (defun c-end-of-current-token (&optional back-limit) |
| 4495 | ;; Move to the end of the current token. Do not move if not in the | 4519 | ;; Move to the end of the current token. Do not move if not in the |
| 4496 | ;; middle of one. BACK-LIMIT may be used to bound the backward | 4520 | ;; middle of one. BACK-LIMIT may be used to bound the backward |
| @@ -5878,9 +5902,14 @@ comment at the start of cc-engine.el for more info." | |||
| 5878 | ;; comment style has removed face properties from a construct, | 5902 | ;; comment style has removed face properties from a construct, |
| 5879 | ;; and is relying on `c-font-lock-declarations' to add them | 5903 | ;; and is relying on `c-font-lock-declarations' to add them |
| 5880 | ;; again. | 5904 | ;; again. |
| 5881 | (and (< (point) cfd-limit) | 5905 | (cond |
| 5882 | (looking-at c-doc-line-join-re) | 5906 | ((looking-at c-noise-macro-name-re) |
| 5883 | (goto-char (match-end 0))))) | 5907 | (c-forward-noise-clause-not-macro-decl nil)) ; Returns t. |
| 5908 | ((looking-at c-noise-macro-with-parens-name-re) | ||
| 5909 | (c-forward-noise-clause-not-macro-decl t)) ; Always returns t. | ||
| 5910 | ((and (< (point) cfd-limit) | ||
| 5911 | (looking-at c-doc-line-join-re)) | ||
| 5912 | (goto-char (match-end 0)))))) | ||
| 5884 | ;; Set the position to continue at. We can avoid going over | 5913 | ;; Set the position to continue at. We can avoid going over |
| 5885 | ;; the comments skipped above a second time, but it's possible | 5914 | ;; the comments skipped above a second time, but it's possible |
| 5886 | ;; that the comment skipping has taken us past `cfd-prop-match' | 5915 | ;; that the comment skipping has taken us past `cfd-prop-match' |
| @@ -5909,6 +5938,8 @@ comment at the start of cc-engine.el for more info." | |||
| 5909 | ;; o The first token after the end of submatch 1 in | 5938 | ;; o The first token after the end of submatch 1 in |
| 5910 | ;; `c-decl-prefix-or-start-re' when that submatch matches. This | 5939 | ;; `c-decl-prefix-or-start-re' when that submatch matches. This |
| 5911 | ;; submatch is typically a (L or R) brace or paren, a ;, or a ,. | 5940 | ;; submatch is typically a (L or R) brace or paren, a ;, or a ,. |
| 5941 | ;; As a special case, noise macros are skipped over and the next | ||
| 5942 | ;; token regarded as the spot. | ||
| 5912 | ;; o The start of each `c-decl-prefix-or-start-re' match when | 5943 | ;; o The start of each `c-decl-prefix-or-start-re' match when |
| 5913 | ;; submatch 1 doesn't match. This is, for example, the keyword | 5944 | ;; submatch 1 doesn't match. This is, for example, the keyword |
| 5914 | ;; "class" in Pike. | 5945 | ;; "class" in Pike. |
| @@ -7439,6 +7470,21 @@ comment at the start of cc-engine.el for more info." | |||
| 7439 | (c-forward-syntactic-ws)) | 7470 | (c-forward-syntactic-ws)) |
| 7440 | t) | 7471 | t) |
| 7441 | 7472 | ||
| 7473 | (defun c-forward-noise-clause-not-macro-decl (maybe-parens) | ||
| 7474 | ;; Point is at a noise macro identifier, which, when MAYBE-PARENS is | ||
| 7475 | ;; non-nil, optionally takes paren arguments. Go forward over this name, | ||
| 7476 | ;; and when there may be optional parens, any parenthesis expression which | ||
| 7477 | ;; follows it, but DO NOT go over any macro declaration which may come | ||
| 7478 | ;; between them. Always return t. | ||
| 7479 | (c-end-of-token) | ||
| 7480 | (when maybe-parens | ||
| 7481 | (let ((here (point))) | ||
| 7482 | (c-forward-comments) | ||
| 7483 | (if (not (and (eq (char-after) ?\() | ||
| 7484 | (c-go-list-forward))) | ||
| 7485 | (goto-char here)))) | ||
| 7486 | t) | ||
| 7487 | |||
| 7442 | (defun c-forward-keyword-clause (match) | 7488 | (defun c-forward-keyword-clause (match) |
| 7443 | ;; Submatch MATCH in the current match data is assumed to surround a | 7489 | ;; Submatch MATCH in the current match data is assumed to surround a |
| 7444 | ;; token. If it's a keyword, move over it and any immediately | 7490 | ;; token. If it's a keyword, move over it and any immediately |
| @@ -9053,7 +9099,10 @@ This function might do hidden buffer changes." | |||
| 9053 | ((and c-opt-cpp-prefix | 9099 | ((and c-opt-cpp-prefix |
| 9054 | (looking-at c-noise-macro-with-parens-name-re)) | 9100 | (looking-at c-noise-macro-with-parens-name-re)) |
| 9055 | (setq noise-start (point)) | 9101 | (setq noise-start (point)) |
| 9056 | (c-forward-noise-clause) | 9102 | (while |
| 9103 | (and | ||
| 9104 | (c-forward-noise-clause) | ||
| 9105 | (looking-at c-noise-macro-with-parens-name-re))) | ||
| 9057 | (setq kwd-clause-end (point)))) | 9106 | (setq kwd-clause-end (point)))) |
| 9058 | 9107 | ||
| 9059 | (when (setq found-type (c-forward-type t)) ; brace-block-too | 9108 | (when (setq found-type (c-forward-type t)) ; brace-block-too |
diff --git a/src/image.c b/src/image.c index b82bf12aa5e..071b92a741e 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -9696,15 +9696,15 @@ static bool | |||
| 9696 | initialize_image_type (struct image_type const *type) | 9696 | initialize_image_type (struct image_type const *type) |
| 9697 | { | 9697 | { |
| 9698 | #ifdef WINDOWSNT | 9698 | #ifdef WINDOWSNT |
| 9699 | bool (*init) (void) = type->init; | 9699 | Lisp_Object typesym = builtin_lisp_symbol (type->type); |
| 9700 | Lisp_Object tested = Fassq (typesym, Vlibrary_cache); | ||
| 9701 | /* If we failed to load the library before, don't try again. */ | ||
| 9702 | if (CONSP (tested)) | ||
| 9703 | return !NILP (XCDR (tested)) ? true : false; | ||
| 9700 | 9704 | ||
| 9705 | bool (*init) (void) = type->init; | ||
| 9701 | if (init) | 9706 | if (init) |
| 9702 | { | 9707 | { |
| 9703 | /* If we failed to load the library before, don't try again. */ | ||
| 9704 | Lisp_Object typesym = builtin_lisp_symbol (type->type); | ||
| 9705 | Lisp_Object tested = Fassq (typesym, Vlibrary_cache); | ||
| 9706 | if (CONSP (tested) && NILP (XCDR (tested))) | ||
| 9707 | return false; | ||
| 9708 | bool type_valid = init (); | 9708 | bool type_valid = init (); |
| 9709 | Vlibrary_cache = Fcons (Fcons (typesym, type_valid ? Qt : Qnil), | 9709 | Vlibrary_cache = Fcons (Fcons (typesym, type_valid ? Qt : Qnil), |
| 9710 | Vlibrary_cache); | 9710 | Vlibrary_cache); |