mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 06:00:41 -08:00
; Merge from emacs-26
9533d76b0bKeep Man sections in natural order (bug#28998)d63c9a96f5* lisp/minibuffer.el: Install a workaround for bug#162747657a86709Fix comparisons with tip_frame in GTK builds603a0716a8Improve the documentation of M-n for entering file names72f813fb56Fix desktop auto-save timer when linum-mode is used44340b475fFix "C-h k" in xterm-mouse-mode05aa6d4a68Fix off-by-1 bug in --enable-checking=stringbytes096f638ddcCorrect the indentation of C99's compound literals.c52a2aa8f3Improve the doc string of 'dired-isearch-filter-filenames'e592b92482* lisp/isearch.el (search-invisible): Doc fix. (Bug#29222)f3e69a80abFix display of line numbers in GTK buildse6f1fd4091Fix previous change to flymake-diag-region (bug#29174)89382780e1flymake-diag-region really returns nil if region is invali...535688a418Flymake correctly highlights whole last line if eob (bug#2...72e62d3fdbProtect Flymake checkdoc backend against checkdoc errors (...b28de57411Sort entries of the Flymake diagnostics buffer (bug#29175)fc56bea142Correctly indent C++14 brace lists which are a second argu...9dde8be9cdFix redisplay of overlay-arrows on GUI frames0da08f2f8eProtect Flymake tests against older Ruby and Perl (bug#29187)781f276cc1Fix URL cookie expiration bug
This commit is contained in:
commit
1fa0766cfa
20 changed files with 237 additions and 100 deletions
|
|
@ -63,6 +63,9 @@ completing up to a nonexistent file name, Emacs prints
|
||||||
@samp{[Confirm]} and you must type a second @key{RET} to confirm.
|
@samp{[Confirm]} and you must type a second @key{RET} to confirm.
|
||||||
@xref{Completion Exit}, for details.
|
@xref{Completion Exit}, for details.
|
||||||
|
|
||||||
|
Minibuffer history commands offer some special features for reading
|
||||||
|
file names, see @ref{Minibuffer History}.
|
||||||
|
|
||||||
@cindex default directory
|
@cindex default directory
|
||||||
@vindex default-directory
|
@vindex default-directory
|
||||||
@vindex insert-default-directory
|
@vindex insert-default-directory
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,10 @@ the default directory. If you now type @kbd{buffer.c} as input, that
|
||||||
specifies the file @file{/u2/emacs/src/buffer.c}. @xref{File Names},
|
specifies the file @file{/u2/emacs/src/buffer.c}. @xref{File Names},
|
||||||
for information about the default directory.
|
for information about the default directory.
|
||||||
|
|
||||||
You can specify the parent directory with @file{..}:
|
Alternative defaults for the file name you may want are available by
|
||||||
|
typing @kbd{M-n}, see @ref{Minibuffer History}.
|
||||||
|
|
||||||
|
You can specify a file in the parent directory with @file{..}:
|
||||||
@file{/a/b/../foo.el} is equivalent to @file{/a/foo.el}.
|
@file{/a/b/../foo.el} is equivalent to @file{/a/foo.el}.
|
||||||
Alternatively, you can use @kbd{M-@key{DEL}} to kill directory names
|
Alternatively, you can use @kbd{M-@key{DEL}} to kill directory names
|
||||||
backwards (@pxref{Words}).
|
backwards (@pxref{Words}).
|
||||||
|
|
@ -609,8 +612,6 @@ Move to a later item in the minibuffer history that matches
|
||||||
|
|
||||||
@kindex M-p @r{(minibuffer history)}
|
@kindex M-p @r{(minibuffer history)}
|
||||||
@kindex M-n @r{(minibuffer history)}
|
@kindex M-n @r{(minibuffer history)}
|
||||||
@kindex UP @r{(minibuffer history)}
|
|
||||||
@kindex DOWN @r{(minibuffer history)}
|
|
||||||
@findex next-history-element
|
@findex next-history-element
|
||||||
@findex previous-history-element
|
@findex previous-history-element
|
||||||
While in the minibuffer, @kbd{M-p} (@code{previous-history-element})
|
While in the minibuffer, @kbd{M-p} (@code{previous-history-element})
|
||||||
|
|
@ -627,8 +628,25 @@ typed @kbd{M-p}), Emacs tries fetching from a list of default
|
||||||
arguments: values that you are likely to enter. You can think of this
|
arguments: values that you are likely to enter. You can think of this
|
||||||
as moving through the ``future history''.
|
as moving through the ``future history''.
|
||||||
|
|
||||||
|
@cindex future history for file names
|
||||||
|
@cindex minibuffer defaults for file names
|
||||||
|
@vindex file-name-at-point-functions
|
||||||
|
The ``future history'' for file names includes several possible
|
||||||
|
alternatives you may find useful, such as the file name or the URL at
|
||||||
|
point in the current buffer. The defaults put into the ``future
|
||||||
|
history'' in this case are controlled by the functions mentioned in
|
||||||
|
the value of the option @code{file-name-at-point-functions}. By
|
||||||
|
default, its value invokes the @code{ffap} package (@pxref{FFAP}),
|
||||||
|
which tries to guess the default file or URL from the text around
|
||||||
|
point. To disable this guessing, customize the option to a @code{nil}
|
||||||
|
value, then the ``future history'' of file names will include only the
|
||||||
|
file, if any, visited by the current buffer, and the default
|
||||||
|
directory.
|
||||||
|
|
||||||
@findex previous-line-or-history-element
|
@findex previous-line-or-history-element
|
||||||
@findex next-line-or-history-element
|
@findex next-line-or-history-element
|
||||||
|
@kindex UP @r{(minibuffer history)}
|
||||||
|
@kindex DOWN @r{(minibuffer history)}
|
||||||
The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like
|
The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like
|
||||||
@kbd{M-p} and @kbd{M-n}, but if the current history item is longer
|
@kbd{M-p} and @kbd{M-n}, but if the current history item is longer
|
||||||
than a single line, they allow you to move to the previous or next
|
than a single line, they allow you to move to the previous or next
|
||||||
|
|
|
||||||
|
|
@ -1240,7 +1240,13 @@ Using it may cause conflicts. Use it anyway? " owner)))))
|
||||||
;; disabled when loading the desktop fails with errors,
|
;; disabled when loading the desktop fails with errors,
|
||||||
;; thus not overwriting the desktop with broken contents.
|
;; thus not overwriting the desktop with broken contents.
|
||||||
(setq desktop-autosave-was-enabled
|
(setq desktop-autosave-was-enabled
|
||||||
(memq 'desktop-auto-save-set-timer window-configuration-change-hook))
|
(memq 'desktop-auto-save-set-timer
|
||||||
|
;; Use the toplevel value of the hook, in case some
|
||||||
|
;; feature makes window-configuration-change-hook
|
||||||
|
;; buffer-local, and puts there stuff which
|
||||||
|
;; doesn't include our timer.
|
||||||
|
(default-toplevel-value
|
||||||
|
'window-configuration-change-hook)))
|
||||||
(desktop-auto-save-disable)
|
(desktop-auto-save-disable)
|
||||||
;; Evaluate desktop buffer and remember when it was modified.
|
;; Evaluate desktop buffer and remember when it was modified.
|
||||||
(setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))
|
(setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))
|
||||||
|
|
|
||||||
|
|
@ -2768,9 +2768,9 @@ Intended to be added to `isearch-mode-hook'."
|
||||||
(remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t))
|
(remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t))
|
||||||
|
|
||||||
(defun dired-isearch-filter-filenames (beg end)
|
(defun dired-isearch-filter-filenames (beg end)
|
||||||
"Test whether the current search hit is a file name.
|
"Test whether some part of the current search match is inside a file name.
|
||||||
Return non-nil if the text from BEG to END is part of a file
|
This function returns non-nil if some part of the text between BEG and END
|
||||||
name (has the text property `dired-filename')."
|
is part of a file name (i.e., has the text property `dired-filename')."
|
||||||
(text-property-not-all (min beg end) (max beg end)
|
(text-property-not-all (min beg end) (max beg end)
|
||||||
'dired-filename nil))
|
'dired-filename nil))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1560,7 +1560,15 @@ Switch to a buffer visiting file FILENAME,
|
||||||
creating one if none already exists.
|
creating one if none already exists.
|
||||||
Interactively, the default if you just type RET is the current directory,
|
Interactively, the default if you just type RET is the current directory,
|
||||||
but the visited file name is available through the minibuffer history:
|
but the visited file name is available through the minibuffer history:
|
||||||
type M-n to pull it into the minibuffer.
|
type \\[next-history-element] to pull it into the minibuffer.
|
||||||
|
|
||||||
|
The first time \\[next-history-element] is used after Emacs prompts for
|
||||||
|
the file name, the result is affected by `file-name-at-point-functions',
|
||||||
|
which by default try to guess the file name by looking at point in the
|
||||||
|
current buffer. Customize the value of `file-name-at-point-functions'
|
||||||
|
or set it to nil, if you want only the visited file name and the
|
||||||
|
current directory to be available on first \\[next-history-element]
|
||||||
|
request.
|
||||||
|
|
||||||
You can visit files on remote machines by specifying something
|
You can visit files on remote machines by specifying something
|
||||||
like /ssh:SOME_REMOTE_MACHINE:FILE for the file name. You can
|
like /ssh:SOME_REMOTE_MACHINE:FILE for the file name. You can
|
||||||
|
|
@ -1591,7 +1599,15 @@ an existing one. See the function `display-buffer'.
|
||||||
|
|
||||||
Interactively, the default if you just type RET is the current directory,
|
Interactively, the default if you just type RET is the current directory,
|
||||||
but the visited file name is available through the minibuffer history:
|
but the visited file name is available through the minibuffer history:
|
||||||
type M-n to pull it into the minibuffer.
|
type \\[next-history-element] to pull it into the minibuffer.
|
||||||
|
|
||||||
|
The first time \\[next-history-element] is used after Emacs prompts for
|
||||||
|
the file name, the result is affected by `file-name-at-point-functions',
|
||||||
|
which by default try to guess the file name by looking at point in the
|
||||||
|
current buffer. Customize the value of `file-name-at-point-functions'
|
||||||
|
or set it to nil, if you want only the visited file name and the
|
||||||
|
current directory to be available on first \\[next-history-element]
|
||||||
|
request.
|
||||||
|
|
||||||
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
|
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
|
||||||
expand wildcards (if any) and visit multiple files."
|
expand wildcards (if any) and visit multiple files."
|
||||||
|
|
@ -1615,7 +1631,15 @@ an existing one. See the function `display-buffer'.
|
||||||
|
|
||||||
Interactively, the default if you just type RET is the current directory,
|
Interactively, the default if you just type RET is the current directory,
|
||||||
but the visited file name is available through the minibuffer history:
|
but the visited file name is available through the minibuffer history:
|
||||||
type M-n to pull it into the minibuffer.
|
type \\[next-history-element] to pull it into the minibuffer.
|
||||||
|
|
||||||
|
The first time \\[next-history-element] is used after Emacs prompts for
|
||||||
|
the file name, the result is affected by `file-name-at-point-functions',
|
||||||
|
which by default try to guess the file name by looking at point in the
|
||||||
|
current buffer. Customize the value of `file-name-at-point-functions'
|
||||||
|
or set it to nil, if you want only the visited file name and the
|
||||||
|
current directory to be available on first \\[next-history-element]
|
||||||
|
request.
|
||||||
|
|
||||||
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
|
Interactively, or if WILDCARDS is non-nil in a call from Lisp,
|
||||||
expand wildcards (if any) and visit multiple files."
|
expand wildcards (if any) and visit multiple files."
|
||||||
|
|
|
||||||
16
lisp/help.el
16
lisp/help.el
|
|
@ -717,7 +717,7 @@ with `mouse-movement' events."
|
||||||
(cursor-in-echo-area t)
|
(cursor-in-echo-area t)
|
||||||
saved-yank-menu)
|
saved-yank-menu)
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(let (key)
|
(let (key down-ev)
|
||||||
;; If yank-menu is empty, populate it temporarily, so that
|
;; If yank-menu is empty, populate it temporarily, so that
|
||||||
;; "Select and Paste" menu can generate a complete event.
|
;; "Select and Paste" menu can generate a complete event.
|
||||||
(when (null (cdr yank-menu))
|
(when (null (cdr yank-menu))
|
||||||
|
|
@ -743,17 +743,21 @@ Describe the following key, mouse click, or menu item: "))
|
||||||
(let ((last-idx (1- (length key))))
|
(let ((last-idx (1- (length key))))
|
||||||
(and (eventp (aref key last-idx))
|
(and (eventp (aref key last-idx))
|
||||||
(memq 'down (event-modifiers (aref key last-idx)))))
|
(memq 'down (event-modifiers (aref key last-idx)))))
|
||||||
(or (and (eventp (aref key 0))
|
(or (and (eventp (setq down-ev (aref key 0)))
|
||||||
(memq 'down (event-modifiers (aref key 0)))
|
(memq 'down (event-modifiers down-ev))
|
||||||
;; However, for the C-down-mouse-2 popup
|
;; However, for the C-down-mouse-2 popup
|
||||||
;; menu, there is no subsequent up-event. In
|
;; menu, there is no subsequent up-event. In
|
||||||
;; this case, the up-event is the next
|
;; this case, the up-event is the next
|
||||||
;; element in the supplied vector.
|
;; element in the supplied vector.
|
||||||
(= (length key) 1))
|
(= (length key) 1))
|
||||||
(and (> (length key) 1)
|
(and (> (length key) 1)
|
||||||
(eventp (aref key 1))
|
(eventp (setq down-ev (aref key 1)))
|
||||||
(memq 'down (event-modifiers (aref key 1)))))
|
(memq 'down (event-modifiers down-ev))))
|
||||||
(read-event))))
|
(if (and (terminal-parameter nil 'xterm-mouse-mode)
|
||||||
|
(equal (terminal-parameter nil 'xterm-mouse-last-down)
|
||||||
|
down-ev))
|
||||||
|
(aref (read-key-sequence-vector nil) 0)
|
||||||
|
(read-event)))))
|
||||||
;; Put yank-menu back as it was, if we changed it.
|
;; Put yank-menu back as it was, if we changed it.
|
||||||
(when saved-yank-menu
|
(when saved-yank-menu
|
||||||
(setq yank-menu (copy-sequence saved-yank-menu))
|
(setq yank-menu (copy-sequence saved-yank-menu))
|
||||||
|
|
|
||||||
|
|
@ -128,9 +128,10 @@ a tab, a carriage return (control-M), a newline, and `]+'."
|
||||||
"If t incremental search/query-replace can match hidden text.
|
"If t incremental search/query-replace can match hidden text.
|
||||||
A nil value means don't match invisible text.
|
A nil value means don't match invisible text.
|
||||||
When the value is `open', if the text matched is made invisible by
|
When the value is `open', if the text matched is made invisible by
|
||||||
an overlay having an `invisible' property and that overlay has a property
|
an overlay having a non-nil `invisible' property, and that overlay
|
||||||
`isearch-open-invisible', then incremental search will show the contents.
|
has a non-nil property `isearch-open-invisible', then incremental
|
||||||
\(This applies when using `outline.el' and `hideshow.el'.)
|
search will show the hidden text. (This applies when using `outline.el'
|
||||||
|
and `hideshow.el'.)
|
||||||
|
|
||||||
To temporarily change the value for an active incremental search,
|
To temporarily change the value for an active incremental search,
|
||||||
use \\<isearch-mode-map>\\[isearch-toggle-invisible].
|
use \\<isearch-mode-map>\\[isearch-toggle-invisible].
|
||||||
|
|
|
||||||
|
|
@ -1522,7 +1522,8 @@ The following key bindings are currently in effect in the buffer:
|
||||||
(let ((section (match-string 1)))
|
(let ((section (match-string 1)))
|
||||||
(unless (member section Man--sections)
|
(unless (member section Man--sections)
|
||||||
(push section Man--sections)))
|
(push section Man--sections)))
|
||||||
(forward-line 1))))
|
(forward-line 1)))
|
||||||
|
(setq Man--sections (nreverse Man--sections)))
|
||||||
|
|
||||||
(defsubst Man-build-references-alist ()
|
(defsubst Man-build-references-alist ()
|
||||||
"Build the list of references (in the SEE ALSO section)."
|
"Build the list of references (in the SEE ALSO section)."
|
||||||
|
|
|
||||||
|
|
@ -896,8 +896,15 @@ This overrides the defaults specified in `completion-category-defaults'."
|
||||||
;; than from completion-extra-properties) because it may apply only to some
|
;; than from completion-extra-properties) because it may apply only to some
|
||||||
;; part of the string (e.g. substitute-in-file-name).
|
;; part of the string (e.g. substitute-in-file-name).
|
||||||
(let ((requote
|
(let ((requote
|
||||||
(when (completion-metadata-get metadata 'completion--unquote-requote)
|
(when (and
|
||||||
(cl-assert (functionp table))
|
(completion-metadata-get metadata 'completion--unquote-requote)
|
||||||
|
;; Sometimes a table's metadata is used on another
|
||||||
|
;; table (typically that other table is just a list taken
|
||||||
|
;; from the output of `all-completions' or something equivalent,
|
||||||
|
;; for progressive refinement). See bug#28898 and bug#16274.
|
||||||
|
;; FIXME: Rather than do nothing, we should somehow call
|
||||||
|
;; the original table, in that case!
|
||||||
|
(functionp table))
|
||||||
(let ((new (funcall table string point 'completion--unquote)))
|
(let ((new (funcall table string point 'completion--unquote)))
|
||||||
(setq string (pop new))
|
(setq string (pop new))
|
||||||
(setq table (pop new))
|
(setq table (pop new))
|
||||||
|
|
|
||||||
|
|
@ -10407,16 +10407,20 @@ comment at the start of cc-engine.el for more info."
|
||||||
(defun c-looking-at-or-maybe-in-bracelist (&optional containing-sexp lim)
|
(defun c-looking-at-or-maybe-in-bracelist (&optional containing-sexp lim)
|
||||||
;; Point is at an open brace. If this starts a brace list, return a list
|
;; Point is at an open brace. If this starts a brace list, return a list
|
||||||
;; whose car is the buffer position of the start of the construct which
|
;; whose car is the buffer position of the start of the construct which
|
||||||
;; introduces the list, and whose cdr is t if we have parsed a keyword
|
;; introduces the list, and whose cdr is the symbol `in-paren' if the brace
|
||||||
;; matching `c-opt-inexpr-brace-list-key' (e.g. Java's "new"), nil
|
;; is directly enclosed in a parenthesis form (i.e. an arglist), t if we
|
||||||
;; otherwise. Otherwise, if point might be inside an enclosing brace list,
|
;; have parsed a keyword matching `c-opt-inexpr-brace-list-key' (e.g. Java's
|
||||||
;; return t. If point is definitely neither at nor in a brace list, return
|
;; "new"), nil otherwise. Otherwise, if point might be inside an enclosing
|
||||||
;; nil.
|
;; brace list, return t. If point is definitely neither at nor in a brace
|
||||||
|
;; list, return nil.
|
||||||
;;
|
;;
|
||||||
;; CONTAINING-SEXP is the position of the brace/paren/bracket enclosing
|
;; CONTAINING-SEXP is the position of the brace/paren/bracket enclosing
|
||||||
;; POINT, or nil if there is no such position, or we do not know it. LIM is
|
;; POINT, or nil if there is no such position, or we do not know it. LIM is
|
||||||
;; a backward search limit.
|
;; a backward search limit.
|
||||||
;;
|
;;
|
||||||
|
;; The determination of whether the brace starts a brace list is solely by
|
||||||
|
;; the context of the brace, not by its contents.
|
||||||
|
;;
|
||||||
;; Here, "brace list" does not include the body of an enum.
|
;; Here, "brace list" does not include the body of an enum.
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((start (point))
|
(let ((start (point))
|
||||||
|
|
@ -10426,17 +10430,20 @@ comment at the start of cc-engine.el for more info."
|
||||||
(and (c-major-mode-is 'pike-mode)
|
(and (c-major-mode-is 'pike-mode)
|
||||||
c-decl-block-key))
|
c-decl-block-key))
|
||||||
(braceassignp 'dontknow)
|
(braceassignp 'dontknow)
|
||||||
inexpr-brace-list bufpos macro-start res pos after-type-id-pos)
|
inexpr-brace-list bufpos macro-start res pos after-type-id-pos
|
||||||
|
in-paren)
|
||||||
|
|
||||||
(setq res (c-backward-token-2 1 t lim))
|
(setq res (c-backward-token-2 1 t lim))
|
||||||
;; Checks to do only on the first sexp before the brace.
|
;; Checks to do only on the first sexp before the brace.
|
||||||
;; Have we a C++ initialization, without an "="?
|
;; Have we a C++ initialization, without an "="?
|
||||||
(if (and (c-major-mode-is 'c++-mode)
|
(if (and (c-major-mode-is 'c++-mode)
|
||||||
(cond
|
(cond
|
||||||
((and (not (eq res 0))
|
((and (or (not (eq res 0))
|
||||||
|
(eq (char-after) ?,))
|
||||||
(c-go-up-list-backward nil lim) ; FIXME!!! Check ; `lim' 2016-07-12.
|
(c-go-up-list-backward nil lim) ; FIXME!!! Check ; `lim' 2016-07-12.
|
||||||
(eq (char-after) ?\())
|
(eq (char-after) ?\())
|
||||||
(setq braceassignp 'c++-noassign))
|
(setq braceassignp 'c++-noassign
|
||||||
|
in-paren 'in-paren))
|
||||||
((looking-at c-pre-id-bracelist-key))
|
((looking-at c-pre-id-bracelist-key))
|
||||||
((looking-at c-return-key))
|
((looking-at c-return-key))
|
||||||
((and (looking-at c-symbol-start)
|
((and (looking-at c-symbol-start)
|
||||||
|
|
@ -10445,9 +10452,11 @@ comment at the start of cc-engine.el for more info."
|
||||||
(t nil))
|
(t nil))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(cond
|
(cond
|
||||||
((not (eq res 0))
|
((or (not (eq res 0))
|
||||||
|
(eq (char-after) ?,))
|
||||||
(and (c-go-up-list-backward nil lim) ; FIXME!!! Check `lim' 2016-07-12.
|
(and (c-go-up-list-backward nil lim) ; FIXME!!! Check `lim' 2016-07-12.
|
||||||
(eq (char-after) ?\()))
|
(eq (char-after) ?\()
|
||||||
|
(setq in-paren 'in-paren)))
|
||||||
((looking-at c-pre-id-bracelist-key))
|
((looking-at c-pre-id-bracelist-key))
|
||||||
((looking-at c-return-key))
|
((looking-at c-return-key))
|
||||||
(t (setq after-type-id-pos (point))
|
(t (setq after-type-id-pos (point))
|
||||||
|
|
@ -10486,7 +10495,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(c-backward-syntactic-ws)
|
(c-backward-syntactic-ws)
|
||||||
(eq (char-before) ?\()))
|
(eq (char-before) ?\()))
|
||||||
;; Single identifier between '(' and '{'. We have a bracelist.
|
;; Single identifier between '(' and '{'. We have a bracelist.
|
||||||
(cons after-type-id-pos nil))
|
(cons after-type-id-pos 'in-paren))
|
||||||
|
|
||||||
(t
|
(t
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
|
|
@ -10544,7 +10553,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(braceassignp
|
(braceassignp
|
||||||
;; We've hit the beginning of the aggregate list.
|
;; We've hit the beginning of the aggregate list.
|
||||||
(c-beginning-of-statement-1 containing-sexp)
|
(c-beginning-of-statement-1 containing-sexp)
|
||||||
(cons (point) inexpr-brace-list))
|
(cons (point) (or in-paren inexpr-brace-list)))
|
||||||
((and after-type-id-pos
|
((and after-type-id-pos
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when (eq (char-after) ?\;)
|
(when (eq (char-after) ?\;)
|
||||||
|
|
@ -10569,7 +10578,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
nil nil))
|
nil nil))
|
||||||
(and (consp res)
|
(and (consp res)
|
||||||
(eq (car res) after-type-id-pos))))))
|
(eq (car res) after-type-id-pos))))))
|
||||||
(cons bufpos inexpr-brace-list))
|
(cons bufpos (or in-paren inexpr-brace-list)))
|
||||||
((eq (char-after) ?\;)
|
((eq (char-after) ?\;)
|
||||||
;; Brace lists can't contain a semicolon, so we're done.
|
;; Brace lists can't contain a semicolon, so we're done.
|
||||||
;; (setq containing-sexp nil)
|
;; (setq containing-sexp nil)
|
||||||
|
|
@ -10593,12 +10602,16 @@ comment at the start of cc-engine.el for more info."
|
||||||
(t t)))) ;; The caller can go up one level.
|
(t t)))) ;; The caller can go up one level.
|
||||||
)))
|
)))
|
||||||
|
|
||||||
(defun c-inside-bracelist-p (containing-sexp paren-state)
|
(defun c-inside-bracelist-p (containing-sexp paren-state accept-in-paren)
|
||||||
;; return the buffer position of the beginning of the brace list
|
;; return the buffer position of the beginning of the brace list
|
||||||
;; statement if we're inside a brace list, otherwise return nil.
|
;; statement if we're inside a brace list, otherwise return nil.
|
||||||
;; CONTAINING-SEXP is the buffer pos of the innermost containing
|
;; CONTAINING-SEXP is the buffer pos of the innermost containing
|
||||||
;; paren. PAREN-STATE is the remainder of the state of enclosing
|
;; paren. PAREN-STATE is the remainder of the state of enclosing
|
||||||
;; braces
|
;; braces. ACCEPT-IN-PAREN is non-nil iff we will accept as a brace
|
||||||
|
;; list a brace directly enclosed in a parenthesis.
|
||||||
|
;;
|
||||||
|
;; The "brace list" here is recognized solely by its context, not by
|
||||||
|
;; its contents.
|
||||||
;;
|
;;
|
||||||
;; N.B.: This algorithm can potentially get confused by cpp macros
|
;; N.B.: This algorithm can potentially get confused by cpp macros
|
||||||
;; placed in inconvenient locations. It's a trade-off we make for
|
;; placed in inconvenient locations. It's a trade-off we make for
|
||||||
|
|
@ -10613,17 +10626,11 @@ comment at the start of cc-engine.el for more info."
|
||||||
;; this will pick up array/aggregate init lists, even if they are nested.
|
;; this will pick up array/aggregate init lists, even if they are nested.
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((bufpos t)
|
(let ((bufpos t)
|
||||||
lim next-containing)
|
next-containing)
|
||||||
(while (and (eq bufpos t)
|
(while (and (eq bufpos t)
|
||||||
containing-sexp)
|
containing-sexp)
|
||||||
(when paren-state
|
(when paren-state
|
||||||
(if (consp (car paren-state))
|
(setq next-containing (c-pull-open-brace paren-state)))
|
||||||
(setq lim (cdr (car paren-state))
|
|
||||||
paren-state (cdr paren-state))
|
|
||||||
(setq lim (car paren-state)))
|
|
||||||
(when paren-state
|
|
||||||
(setq next-containing (car paren-state)
|
|
||||||
paren-state (cdr paren-state))))
|
|
||||||
|
|
||||||
(goto-char containing-sexp)
|
(goto-char containing-sexp)
|
||||||
(if (c-looking-at-inexpr-block next-containing next-containing)
|
(if (c-looking-at-inexpr-block next-containing next-containing)
|
||||||
|
|
@ -10632,14 +10639,16 @@ comment at the start of cc-engine.el for more info."
|
||||||
;; containing sexp, so that c-looking-at-inexpr-block
|
;; containing sexp, so that c-looking-at-inexpr-block
|
||||||
;; doesn't check for an identifier before it.
|
;; doesn't check for an identifier before it.
|
||||||
(setq bufpos nil)
|
(setq bufpos nil)
|
||||||
(when (or (not (eq (char-after) ?{))
|
(if (not (eq (char-after) ?{))
|
||||||
(eq (setq bufpos (c-looking-at-or-maybe-in-bracelist
|
(setq bufpos nil)
|
||||||
next-containing lim))
|
(when (eq (setq bufpos (c-looking-at-or-maybe-in-bracelist
|
||||||
t))
|
next-containing next-containing))
|
||||||
|
t)
|
||||||
(setq containing-sexp next-containing
|
(setq containing-sexp next-containing
|
||||||
lim nil
|
next-containing nil)))))
|
||||||
next-containing nil))))
|
(and (consp bufpos)
|
||||||
(and (consp bufpos) (car bufpos))))))
|
(or accept-in-paren (not (eq (cdr bufpos) 'in-paren)))
|
||||||
|
(car bufpos))))))
|
||||||
|
|
||||||
(defun c-looking-at-special-brace-list (&optional _lim)
|
(defun c-looking-at-special-brace-list (&optional _lim)
|
||||||
;; If we're looking at the start of a pike-style list, i.e., `({ })',
|
;; If we're looking at the start of a pike-style list, i.e., `({ })',
|
||||||
|
|
@ -10717,26 +10726,35 @@ comment at the start of cc-engine.el for more info."
|
||||||
|
|
||||||
(defun c-looking-at-statement-block ()
|
(defun c-looking-at-statement-block ()
|
||||||
;; Point is at an opening brace. If this is a statement block (i.e. the
|
;; Point is at an opening brace. If this is a statement block (i.e. the
|
||||||
;; elements in it are terminated by semicolons) return t. Otherwise, return
|
;; elements in the block are terminated by semicolons, or the block is
|
||||||
;; nil.
|
;; empty, or the block contains a keyword) return t. Otherwise, return nil.
|
||||||
(let ((here (point)))
|
(let ((here (point)))
|
||||||
(prog1
|
(prog1
|
||||||
(if (c-go-list-forward)
|
(if (c-go-list-forward)
|
||||||
(let ((there (point)))
|
(let ((there (point)))
|
||||||
(backward-char)
|
(backward-char)
|
||||||
(c-syntactic-skip-backward
|
(c-syntactic-skip-backward "^;," here t)
|
||||||
"^;," here t)
|
|
||||||
(cond
|
(cond
|
||||||
((eq (char-before) ?\;) t)
|
((eq (char-before) ?\;) t)
|
||||||
((eq (char-before) ?,) nil)
|
((eq (char-before) ?,) nil)
|
||||||
(t (goto-char here)
|
(t ; We're at (1+ here).
|
||||||
|
(cond
|
||||||
|
((progn (c-forward-syntactic-ws)
|
||||||
|
(eq (point) (1- there)))
|
||||||
|
t)
|
||||||
|
((c-syntactic-re-search-forward c-keywords-regexp there t)
|
||||||
|
t)
|
||||||
|
((c-syntactic-re-search-forward "{" there t t)
|
||||||
|
(backward-char)
|
||||||
|
(c-looking-at-statement-block))
|
||||||
|
(t nil)))))
|
||||||
(forward-char)
|
(forward-char)
|
||||||
(and (c-syntactic-re-search-forward "{" there t t)
|
(cond
|
||||||
(progn (backward-char)
|
((c-syntactic-re-search-forward "[;,]" nil t t)
|
||||||
(c-looking-at-statement-block))))))
|
(eq (char-before) ?\;))
|
||||||
(forward-char)
|
((c-syntactic-re-search-forward c-keywords-regexp nil t t)
|
||||||
(and (c-syntactic-re-search-forward "[;,]" nil t t)
|
t)
|
||||||
(eq (char-before) ?\;)))
|
(t nil)))
|
||||||
(goto-char here))))
|
(goto-char here))))
|
||||||
|
|
||||||
(defun c-looking-at-inexpr-block (lim containing-sexp &optional check-at-end)
|
(defun c-looking-at-inexpr-block (lim containing-sexp &optional check-at-end)
|
||||||
|
|
@ -11506,6 +11524,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
;; The paren state outside `containing-sexp', or at
|
;; The paren state outside `containing-sexp', or at
|
||||||
;; `indent-point' if `containing-sexp' is nil.
|
;; `indent-point' if `containing-sexp' is nil.
|
||||||
(paren-state (c-parse-state))
|
(paren-state (c-parse-state))
|
||||||
|
(state-cache (copy-tree paren-state))
|
||||||
;; There's always at most one syntactic element which got
|
;; There's always at most one syntactic element which got
|
||||||
;; an anchor pos. It's stored in syntactic-relpos.
|
;; an anchor pos. It's stored in syntactic-relpos.
|
||||||
syntactic-relpos
|
syntactic-relpos
|
||||||
|
|
@ -11668,7 +11687,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(not (c-at-vsemi-p before-ws-ip))
|
(not (c-at-vsemi-p before-ws-ip))
|
||||||
(not (memq char-after-ip '(?\) ?\] ?,)))
|
(not (memq char-after-ip '(?\) ?\] ?,)))
|
||||||
(or (not (eq char-before-ip ?}))
|
(or (not (eq char-before-ip ?}))
|
||||||
(c-looking-at-inexpr-block-backward c-state-cache))
|
(c-looking-at-inexpr-block-backward state-cache))
|
||||||
(> (point)
|
(> (point)
|
||||||
(progn
|
(progn
|
||||||
;; Ought to cache the result from the
|
;; Ought to cache the result from the
|
||||||
|
|
@ -11746,7 +11765,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(if containing-sexp
|
(if containing-sexp
|
||||||
(progn
|
(progn
|
||||||
(goto-char containing-sexp)
|
(goto-char containing-sexp)
|
||||||
(setq lim (c-most-enclosing-brace c-state-cache
|
(setq lim (c-most-enclosing-brace state-cache
|
||||||
containing-sexp))
|
containing-sexp))
|
||||||
(c-backward-to-block-anchor lim)
|
(c-backward-to-block-anchor lim)
|
||||||
(c-add-stmt-syntax 'case-label nil t lim paren-state))
|
(c-add-stmt-syntax 'case-label nil t lim paren-state))
|
||||||
|
|
@ -11772,7 +11791,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
|
|
||||||
(containing-sexp
|
(containing-sexp
|
||||||
(goto-char containing-sexp)
|
(goto-char containing-sexp)
|
||||||
(setq lim (c-most-enclosing-brace c-state-cache
|
(setq lim (c-most-enclosing-brace state-cache
|
||||||
containing-sexp))
|
containing-sexp))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(setq tmpsymbol
|
(setq tmpsymbol
|
||||||
|
|
@ -11816,7 +11835,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(goto-char (cdr placeholder))
|
(goto-char (cdr placeholder))
|
||||||
(back-to-indentation)
|
(back-to-indentation)
|
||||||
(c-add-stmt-syntax tmpsymbol nil t
|
(c-add-stmt-syntax tmpsymbol nil t
|
||||||
(c-most-enclosing-brace c-state-cache (point))
|
(c-most-enclosing-brace state-cache (point))
|
||||||
paren-state)
|
paren-state)
|
||||||
(unless (eq (point) (cdr placeholder))
|
(unless (eq (point) (cdr placeholder))
|
||||||
(c-add-syntax (car placeholder))))
|
(c-add-syntax (car placeholder))))
|
||||||
|
|
@ -12239,11 +12258,11 @@ comment at the start of cc-engine.el for more info."
|
||||||
(and (eq (char-before) ?})
|
(and (eq (char-before) ?})
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((start (point)))
|
(let ((start (point)))
|
||||||
(if (and c-state-cache
|
(if (and state-cache
|
||||||
(consp (car c-state-cache))
|
(consp (car state-cache))
|
||||||
(eq (cdar c-state-cache) (point)))
|
(eq (cdar state-cache) (point)))
|
||||||
;; Speed up the backward search a bit.
|
;; Speed up the backward search a bit.
|
||||||
(goto-char (caar c-state-cache)))
|
(goto-char (caar state-cache)))
|
||||||
(c-beginning-of-decl-1 containing-sexp) ; Can't use `lim' here.
|
(c-beginning-of-decl-1 containing-sexp) ; Can't use `lim' here.
|
||||||
(setq placeholder (point))
|
(setq placeholder (point))
|
||||||
(if (= start (point))
|
(if (= start (point))
|
||||||
|
|
@ -12400,7 +12419,8 @@ comment at the start of cc-engine.el for more info."
|
||||||
((and (eq char-after-ip ?{)
|
((and (eq char-after-ip ?{)
|
||||||
(progn
|
(progn
|
||||||
(setq placeholder (c-inside-bracelist-p (point)
|
(setq placeholder (c-inside-bracelist-p (point)
|
||||||
paren-state))
|
paren-state
|
||||||
|
nil))
|
||||||
(if placeholder
|
(if placeholder
|
||||||
(setq tmpsymbol '(brace-list-open . inexpr-class))
|
(setq tmpsymbol '(brace-list-open . inexpr-class))
|
||||||
(setq tmpsymbol '(block-open . inexpr-statement)
|
(setq tmpsymbol '(block-open . inexpr-statement)
|
||||||
|
|
@ -12482,7 +12502,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(skip-chars-forward " \t"))
|
(skip-chars-forward " \t"))
|
||||||
(goto-char placeholder))
|
(goto-char placeholder))
|
||||||
(c-add-stmt-syntax 'arglist-cont-nonempty (list containing-sexp) t
|
(c-add-stmt-syntax 'arglist-cont-nonempty (list containing-sexp) t
|
||||||
(c-most-enclosing-brace c-state-cache (point))
|
(c-most-enclosing-brace state-cache (point))
|
||||||
paren-state))
|
paren-state))
|
||||||
|
|
||||||
;; CASE 7G: we are looking at just a normal arglist
|
;; CASE 7G: we are looking at just a normal arglist
|
||||||
|
|
@ -12523,7 +12543,11 @@ comment at the start of cc-engine.el for more info."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char containing-sexp)
|
(goto-char containing-sexp)
|
||||||
(c-looking-at-special-brace-list)))
|
(c-looking-at-special-brace-list)))
|
||||||
(c-inside-bracelist-p containing-sexp paren-state))))
|
(c-inside-bracelist-p containing-sexp paren-state t)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char containing-sexp)
|
||||||
|
(and (eq (char-after) ?{)
|
||||||
|
(not (c-looking-at-statement-block)))))))
|
||||||
(cond
|
(cond
|
||||||
|
|
||||||
;; CASE 9A: In the middle of a special brace list opener.
|
;; CASE 9A: In the middle of a special brace list opener.
|
||||||
|
|
@ -12571,7 +12595,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(= (point) containing-sexp)))
|
(= (point) containing-sexp)))
|
||||||
(if (eq (point) (c-point 'boi))
|
(if (eq (point) (c-point 'boi))
|
||||||
(c-add-syntax 'brace-list-close (point))
|
(c-add-syntax 'brace-list-close (point))
|
||||||
(setq lim (c-most-enclosing-brace c-state-cache (point)))
|
(setq lim (c-most-enclosing-brace state-cache (point)))
|
||||||
(c-beginning-of-statement-1 lim nil nil t)
|
(c-beginning-of-statement-1 lim nil nil t)
|
||||||
(c-add-stmt-syntax 'brace-list-close nil t lim paren-state)))
|
(c-add-stmt-syntax 'brace-list-close nil t lim paren-state)))
|
||||||
|
|
||||||
|
|
@ -12597,7 +12621,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(goto-char containing-sexp))
|
(goto-char containing-sexp))
|
||||||
(if (eq (point) (c-point 'boi))
|
(if (eq (point) (c-point 'boi))
|
||||||
(c-add-syntax 'brace-list-intro (point))
|
(c-add-syntax 'brace-list-intro (point))
|
||||||
(setq lim (c-most-enclosing-brace c-state-cache (point)))
|
(setq lim (c-most-enclosing-brace state-cache (point)))
|
||||||
(c-beginning-of-statement-1 lim)
|
(c-beginning-of-statement-1 lim)
|
||||||
(c-add-stmt-syntax 'brace-list-intro nil t lim paren-state)))
|
(c-add-stmt-syntax 'brace-list-intro nil t lim paren-state)))
|
||||||
|
|
||||||
|
|
@ -12619,7 +12643,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
((and (not (memq char-before-ip '(?\; ?:)))
|
((and (not (memq char-before-ip '(?\; ?:)))
|
||||||
(not (c-at-vsemi-p before-ws-ip))
|
(not (c-at-vsemi-p before-ws-ip))
|
||||||
(or (not (eq char-before-ip ?}))
|
(or (not (eq char-before-ip ?}))
|
||||||
(c-looking-at-inexpr-block-backward c-state-cache))
|
(c-looking-at-inexpr-block-backward state-cache))
|
||||||
(> (point)
|
(> (point)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(c-beginning-of-statement-1 containing-sexp)
|
(c-beginning-of-statement-1 containing-sexp)
|
||||||
|
|
@ -12753,7 +12777,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(skip-chars-forward " \t"))
|
(skip-chars-forward " \t"))
|
||||||
(goto-char placeholder))
|
(goto-char placeholder))
|
||||||
(c-add-stmt-syntax 'template-args-cont (list containing-<) t
|
(c-add-stmt-syntax 'template-args-cont (list containing-<) t
|
||||||
(c-most-enclosing-brace c-state-cache (point))
|
(c-most-enclosing-brace state-cache (point))
|
||||||
paren-state))
|
paren-state))
|
||||||
|
|
||||||
;; CASE 17: Statement or defun catchall.
|
;; CASE 17: Statement or defun catchall.
|
||||||
|
|
@ -12827,7 +12851,7 @@ comment at the start of cc-engine.el for more info."
|
||||||
(goto-char (cdr placeholder))
|
(goto-char (cdr placeholder))
|
||||||
(back-to-indentation)
|
(back-to-indentation)
|
||||||
(c-add-stmt-syntax tmpsymbol nil t
|
(c-add-stmt-syntax tmpsymbol nil t
|
||||||
(c-most-enclosing-brace c-state-cache (point))
|
(c-most-enclosing-brace state-cache (point))
|
||||||
paren-state)
|
paren-state)
|
||||||
(if (/= (point) (cdr placeholder))
|
(if (/= (point) (cdr placeholder))
|
||||||
(c-add-syntax (car placeholder))))
|
(c-add-syntax (car placeholder))))
|
||||||
|
|
|
||||||
|
|
@ -1615,7 +1615,11 @@ Calls REPORT-FN directly."
|
||||||
(generate-new-buffer " *checkdoc-temp*")))
|
(generate-new-buffer " *checkdoc-temp*")))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(checkdoc-current-buffer t))
|
;; checkdoc-current-buffer can error if there are
|
||||||
|
;; unbalanced parens, for example, but this shouldn't
|
||||||
|
;; disable the backend (bug#29176).
|
||||||
|
(ignore-errors
|
||||||
|
(checkdoc-current-buffer t)))
|
||||||
(kill-buffer checkdoc-diagnostic-buffer)))
|
(kill-buffer checkdoc-diagnostic-buffer)))
|
||||||
(funcall report-fn
|
(funcall report-fn
|
||||||
(cl-loop for (text start end _unfixable) in
|
(cl-loop for (text start end _unfixable) in
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,8 @@ region is invalid."
|
||||||
(end (or (and sexp-end
|
(end (or (and sexp-end
|
||||||
(not (= sexp-end beg))
|
(not (= sexp-end beg))
|
||||||
sexp-end)
|
sexp-end)
|
||||||
(ignore-errors (goto-char (1+ beg)))))
|
(and (< (goto-char (1+ beg)) (point-max))
|
||||||
|
(point))))
|
||||||
(safe-end (or end
|
(safe-end (or end
|
||||||
(fallback-eol beg))))
|
(fallback-eol beg))))
|
||||||
(cons (if end beg (fallback-bol))
|
(cons (if end beg (fallback-bol))
|
||||||
|
|
@ -342,7 +343,8 @@ region is invalid."
|
||||||
(let* ((beg (fallback-bol))
|
(let* ((beg (fallback-bol))
|
||||||
(end (fallback-eol beg)))
|
(end (fallback-eol beg)))
|
||||||
(cons beg end)))))))
|
(cons beg end)))))))
|
||||||
(error (flymake-log :warning "Invalid region line=%s col=%s" line col))))
|
(error (flymake-log :warning "Invalid region line=%s col=%s" line col)
|
||||||
|
nil)))
|
||||||
|
|
||||||
(defvar flymake-diagnostic-functions nil
|
(defvar flymake-diagnostic-functions nil
|
||||||
"Special hook of Flymake backends that check a buffer.
|
"Special hook of Flymake backends that check a buffer.
|
||||||
|
|
@ -1139,7 +1141,8 @@ POS can be a buffer position or a button"
|
||||||
|
|
||||||
(defun flymake--diagnostics-buffer-entries ()
|
(defun flymake--diagnostics-buffer-entries ()
|
||||||
(with-current-buffer flymake--diagnostics-buffer-source
|
(with-current-buffer flymake--diagnostics-buffer-source
|
||||||
(cl-loop for diag in (flymake-diagnostics)
|
(cl-loop for diag in
|
||||||
|
(cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg)
|
||||||
for (line . col) =
|
for (line . col) =
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (flymake--diag-beg diag))
|
(goto-char (flymake--diag-beg diag))
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ i.e. 1970-1-1) are loaded as expiring one year from now instead."
|
||||||
(let ((exp (url-cookie-expires cookie)))
|
(let ((exp (url-cookie-expires cookie)))
|
||||||
(and (> (length exp) 0)
|
(and (> (length exp) 0)
|
||||||
(condition-case ()
|
(condition-case ()
|
||||||
(time-less-p nil (date-to-time exp))
|
(time-less-p (date-to-time exp) nil)
|
||||||
(error nil)))))
|
(error nil)))))
|
||||||
|
|
||||||
(defun url-cookie-retrieve (host &optional localpart secure)
|
(defun url-cookie-retrieve (host &optional localpart secure)
|
||||||
|
|
|
||||||
|
|
@ -1760,7 +1760,7 @@ static char const string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] =
|
||||||
|
|
||||||
#ifdef GC_CHECK_STRING_BYTES
|
#ifdef GC_CHECK_STRING_BYTES
|
||||||
|
|
||||||
#define SDATA_SIZE(NBYTES) FLEXSIZEOF (struct sdata, data, NBYTES)
|
#define SDATA_SIZE(NBYTES) FLEXSIZEOF (struct sdata, data, (NBYTES) + 1)
|
||||||
|
|
||||||
#else /* not GC_CHECK_STRING_BYTES */
|
#else /* not GC_CHECK_STRING_BYTES */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3452,7 +3452,14 @@ void gamma_correct (struct frame *, COLORREF *);
|
||||||
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
|
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
|
||||||
void x_change_tool_bar_height (struct frame *f, int);
|
void x_change_tool_bar_height (struct frame *f, int);
|
||||||
|
|
||||||
|
/* The frame used to display a tooltip.
|
||||||
|
|
||||||
|
Note: In a GTK build with non-zero x_gtk_use_system_tooltips, this
|
||||||
|
variable holds the frame that shows the tooltip, not the frame of
|
||||||
|
the tooltip itself, so checking whether a frame is a tooltip frame
|
||||||
|
cannot just compare the frame to what this variable holds. */
|
||||||
extern Lisp_Object tip_frame;
|
extern Lisp_Object tip_frame;
|
||||||
|
|
||||||
extern Window tip_window;
|
extern Window tip_window;
|
||||||
extern frame_parm_handler x_frame_parm_handlers[];
|
extern frame_parm_handler x_frame_parm_handlers[];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1472,7 +1472,11 @@ DEFUN ("frame-list", Fframe_list, Sframe_list,
|
||||||
Lisp_Object frames;
|
Lisp_Object frames;
|
||||||
frames = Fcopy_sequence (Vframe_list);
|
frames = Fcopy_sequence (Vframe_list);
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
if (FRAMEP (tip_frame))
|
if (FRAMEP (tip_frame)
|
||||||
|
#ifdef USE_GTK
|
||||||
|
&& !NILP (Fframe_parameter (tip_frame, Qtooltip))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
frames = Fdelq (tip_frame, frames);
|
frames = Fdelq (tip_frame, frames);
|
||||||
#endif
|
#endif
|
||||||
return frames;
|
return frames;
|
||||||
|
|
|
||||||
20
src/xdisp.c
20
src/xdisp.c
|
|
@ -16066,8 +16066,10 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp,
|
||||||
since the handling of this_line_start_pos, etc., in redisplay
|
since the handling of this_line_start_pos, etc., in redisplay
|
||||||
handles the same cases. */
|
handles the same cases. */
|
||||||
&& !EQ (window, minibuf_window)
|
&& !EQ (window, minibuf_window)
|
||||||
&& (FRAME_WINDOW_P (f)
|
/* When overlay arrow is shown in current buffer, point movement
|
||||||
|| !overlay_arrow_in_current_buffer_p ()))
|
is no longer "simple", as it typically causes the overlay
|
||||||
|
arrow to move as well. */
|
||||||
|
&& !overlay_arrow_in_current_buffer_p ())
|
||||||
{
|
{
|
||||||
int this_scroll_margin, top_scroll_margin;
|
int this_scroll_margin, top_scroll_margin;
|
||||||
struct glyph_row *row = NULL;
|
struct glyph_row *row = NULL;
|
||||||
|
|
@ -17698,7 +17700,11 @@ try_window_reusing_current_matrix (struct window *w)
|
||||||
/* Don't try to reuse the display if windows have been split
|
/* Don't try to reuse the display if windows have been split
|
||||||
or such. */
|
or such. */
|
||||||
|| windows_or_buffers_changed
|
|| windows_or_buffers_changed
|
||||||
|| f->cursor_type_changed)
|
|| f->cursor_type_changed
|
||||||
|
/* This function cannot handle buffers where the overlay arrow
|
||||||
|
is shown on the fringes, because if the arrow position
|
||||||
|
changes, we cannot just reuse the current matrix. */
|
||||||
|
|| overlay_arrow_in_current_buffer_p ())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Can't do this if showing trailing whitespace. */
|
/* Can't do this if showing trailing whitespace. */
|
||||||
|
|
@ -21126,7 +21132,13 @@ should_produce_line_number (struct it *it)
|
||||||
|
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
/* Don't display line number in tooltip frames. */
|
/* Don't display line number in tooltip frames. */
|
||||||
if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame))
|
if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame)
|
||||||
|
#ifdef USE_GTK
|
||||||
|
/* GTK builds store in tip_frame the frame that shows the tip,
|
||||||
|
so we need an additional test. */
|
||||||
|
&& !NILP (Fframe_parameter (tip_frame, Qtooltip))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4915,7 +4915,11 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
|
||||||
struct frame *f = XFRAME (frame);
|
struct frame *f = XFRAME (frame);
|
||||||
|
|
||||||
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo
|
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo
|
||||||
&& !EQ (frame, tip_frame))
|
&& !(EQ (frame, tip_frame)
|
||||||
|
#ifdef USE_GTK
|
||||||
|
&& !NILP (Fframe_parameter (tip_frame, Qtooltip))
|
||||||
|
#endif
|
||||||
|
))
|
||||||
{
|
{
|
||||||
GdkWindow *gwin = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
|
GdkWindow *gwin = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
|
||||||
|
|
||||||
|
|
|
||||||
12
src/xterm.c
12
src/xterm.c
|
|
@ -997,7 +997,11 @@ x_update_begin (struct frame *f)
|
||||||
{
|
{
|
||||||
#ifdef USE_CAIRO
|
#ifdef USE_CAIRO
|
||||||
if (! NILP (tip_frame) && XFRAME (tip_frame) == f
|
if (! NILP (tip_frame) && XFRAME (tip_frame) == f
|
||||||
&& ! FRAME_VISIBLE_P (f))
|
&& ! FRAME_VISIBLE_P (f)
|
||||||
|
#ifdef USE_GTK
|
||||||
|
&& !NILP (Fframe_parameter (tip_frame, Qtooltip))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (! FRAME_CR_SURFACE (f))
|
if (! FRAME_CR_SURFACE (f))
|
||||||
|
|
@ -9960,7 +9964,11 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
|
||||||
/* Don't change the size of a tip frame; there's no point in
|
/* Don't change the size of a tip frame; there's no point in
|
||||||
doing it because it's done in Fx_show_tip, and it leads to
|
doing it because it's done in Fx_show_tip, and it leads to
|
||||||
problems because the tip frame has no widget. */
|
problems because the tip frame has no widget. */
|
||||||
if (NILP (tip_frame) || XFRAME (tip_frame) != f)
|
if (NILP (tip_frame) || XFRAME (tip_frame) != f
|
||||||
|
#ifdef USE_GTK
|
||||||
|
|| NILP (Fframe_parameter (tip_frame, Qtooltip))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
|
adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
|
||||||
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3,
|
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3,
|
||||||
|
|
|
||||||
|
|
@ -114,17 +114,24 @@ SEVERITY-PREDICATE is used to setup
|
||||||
(flymake-tests--with-flymake ("test.pl")
|
(flymake-tests--with-flymake ("test.pl")
|
||||||
(flymake-goto-next-error)
|
(flymake-goto-next-error)
|
||||||
(should (eq 'flymake-warning (face-at-point)))
|
(should (eq 'flymake-warning (face-at-point)))
|
||||||
(flymake-goto-next-error)
|
(goto-char (point-max))
|
||||||
|
(flymake-goto-prev-error)
|
||||||
(should (eq 'flymake-error (face-at-point)))))
|
(should (eq 'flymake-error (face-at-point)))))
|
||||||
|
|
||||||
(ert-deftest ruby-backend ()
|
(ert-deftest ruby-backend ()
|
||||||
"Test the ruby backend"
|
"Test the ruby backend"
|
||||||
(skip-unless (executable-find "ruby"))
|
(skip-unless (executable-find "ruby"))
|
||||||
|
;; Some versions of ruby fail if HOME doesn't exist (bug#29187).
|
||||||
|
(let* ((tempdir (make-temp-file "flymake-tests-ruby" t))
|
||||||
|
(process-environment (cons (format "HOME=%s" tempdir)
|
||||||
|
process-environment)))
|
||||||
|
(unwind-protect
|
||||||
(flymake-tests--with-flymake ("test.rb")
|
(flymake-tests--with-flymake ("test.rb")
|
||||||
(flymake-goto-next-error)
|
(flymake-goto-next-error)
|
||||||
(should (eq 'flymake-warning (face-at-point)))
|
(should (eq 'flymake-warning (face-at-point)))
|
||||||
(flymake-goto-next-error)
|
(flymake-goto-next-error)
|
||||||
(should (eq 'flymake-error (face-at-point)))))
|
(should (eq 'flymake-error (face-at-point))))
|
||||||
|
(delete-directory tempdir t))))
|
||||||
|
|
||||||
(ert-deftest different-diagnostic-types ()
|
(ert-deftest different-diagnostic-types ()
|
||||||
"Test GCC warning via function predicate."
|
"Test GCC warning via function predicate."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue