Merge remote-tracking branch 'origin/master' into feature/android
This commit is contained in:
commit
61a38b470d
7 changed files with 77 additions and 24 deletions
|
@ -1463,6 +1463,10 @@ the archive of the file moved to, creating it if it does not exist."
|
|||
(point-max)))
|
||||
(content (buffer-substring-no-properties beg end))
|
||||
(counts (cdr (assoc cat todo-categories))))
|
||||
;; Restore display of selected category, so internal file
|
||||
;; structure is not visible if user is prompted to choose a new
|
||||
;; category name in target file.
|
||||
(todo-category-select)
|
||||
;; Move the category to the new file. Also update or create
|
||||
;; archive file if necessary.
|
||||
(with-current-buffer
|
||||
|
@ -1525,7 +1529,8 @@ the archive of the file moved to, creating it if it does not exist."
|
|||
;; last category, delete the file. Also handle archive file
|
||||
;; if necessary.
|
||||
(let ((buffer-read-only nil))
|
||||
(remove-overlays beg end)
|
||||
(widen)
|
||||
(remove-overlays beg end)
|
||||
(delete-region beg end)
|
||||
(goto-char (point-min))
|
||||
;; Put point after todo-categories sexp.
|
||||
|
@ -2856,7 +2861,8 @@ section in the category moved to."
|
|||
(while done-items
|
||||
(let ((buffer-read-only nil))
|
||||
(todo-insert-with-overlays (pop done-items)))
|
||||
(todo-forward-item)))
|
||||
(todo-item-end)
|
||||
(forward-line)))
|
||||
;; If only done items were moved, move point to the top
|
||||
;; one, otherwise, move point to the top moved todo item.
|
||||
(goto-char here)
|
||||
|
@ -5296,21 +5302,7 @@ changes you have made in the order of the categories.
|
|||
;; legitimate place to insert an item. But skip this space if
|
||||
;; count > 1, since that should only stop on an item.
|
||||
(when (and not-done (todo-done-item-p) (not count))
|
||||
;; (if (or (not count) (= count 1))
|
||||
(re-search-backward "^$" start t))));)
|
||||
;; The preceding sexp is insufficient when buffer is not narrowed,
|
||||
;; since there could be no done items in this category, so the
|
||||
;; search puts us on first todo item of next category. Does this
|
||||
;; ever happen? If so:
|
||||
;; (let ((opoint) (point))
|
||||
;; (forward-line -1)
|
||||
;; (when (or (not count) (= count 1))
|
||||
;; (cond ((looking-at (concat "^" (regexp-quote todo-category-beg)))
|
||||
;; (forward-line -2))
|
||||
;; ((looking-at (concat "^" (regexp-quote todo-category-done)))
|
||||
;; (forward-line -1))
|
||||
;; (t
|
||||
;; (goto-char opoint)))))))
|
||||
(re-search-backward "^$" start t))))
|
||||
|
||||
(defun todo-backward-item (&optional count)
|
||||
"Move point up to start of item with next higher priority.
|
||||
|
|
|
@ -5060,6 +5060,10 @@ binding slots have been popped."
|
|||
(byte-compile-warn-x
|
||||
condition "`condition-case' condition should not be quoted: %S"
|
||||
condition))
|
||||
(when (and (consp condition) (memq :success condition))
|
||||
(byte-compile-warn-x
|
||||
condition
|
||||
"`:success' must be the first element of a `condition-case' handler"))
|
||||
(unless (consp condition) (setq condition (list condition)))
|
||||
(dolist (c condition)
|
||||
(unless (and c (symbolp c))
|
||||
|
|
|
@ -1363,7 +1363,9 @@ place.")
|
|||
,cperl--ws*-rx
|
||||
(or "," "=" "||=" "//=" ")"))
|
||||
"A rx sequence for the begin of a signature with initializers.
|
||||
Initializers can contain almost all Perl constructs and thus can not be covered by regular expressions. This sequence captures enough to distinguish a signature from a prototype.")
|
||||
Initializers can contain almost all Perl constructs and thus can
|
||||
not be covered by regular expressions. This sequence captures
|
||||
enough to distinguish a signature from a prototype.")
|
||||
|
||||
(defconst cperl--package-rx
|
||||
`(sequence (group "package")
|
||||
|
|
|
@ -3212,7 +3212,7 @@ for which LSP on-type-formatting should be requested."
|
|||
parameter
|
||||
(when (zerop i)
|
||||
(goto-char (elt parlabel 0))
|
||||
(search-backward "(" nil t)
|
||||
(skip-syntax-backward "^w")
|
||||
(add-face-text-property (point-min) (point)
|
||||
'font-lock-function-name-face))
|
||||
;; ...perhaps highlight it in the formals list
|
||||
|
|
|
@ -864,10 +864,13 @@ See `sh-feature'.")
|
|||
("\\${?\\([[:alpha:]_][[:alnum:]_]*\\|[0-9]+\\|[$*_]\\)" 1
|
||||
font-lock-variable-name-face))
|
||||
(rpm sh-append rpm2
|
||||
("%{?\\(\\sw+\\)" 1 font-lock-keyword-face))
|
||||
("^\\s-*%\\(\\sw+\\)" 1 font-lock-keyword-face)
|
||||
("%{?\\([!?]*[[:alpha:]_][[:alnum:]_]*\\|[0-9]+\\|[%*#]\\*?\\|!?-[[:alpha:]]\\*?\\)"
|
||||
1 font-lock-variable-name-face))
|
||||
(rpm2 sh-append shell
|
||||
("^Summary:\\(.*\\)$" (1 font-lock-doc-face t))
|
||||
("^\\(\\sw+\\):" 1 font-lock-variable-name-face)))
|
||||
("^\\(\\sw+\\)\\((\\(\\sw+\\))\\)?:" (1 font-lock-variable-name-face)
|
||||
(3 font-lock-string-face nil t))))
|
||||
"Default expressions to highlight in Shell Script modes. See `sh-feature'.")
|
||||
|
||||
(defvar sh-font-lock-keywords-var-1
|
||||
|
|
|
@ -265,7 +265,7 @@ See also `xml-get-attribute-or-nil'."
|
|||
"\\)*\"\\|'\\(?:[^%&']\\|"
|
||||
xml-pe-reference-re "\\|"
|
||||
xml-reference-re "\\)*'\\)"))
|
||||
) ; End of `eval-when-compile'
|
||||
) ; End of `eval-and-compile'
|
||||
|
||||
|
||||
;; [75] ExternalID ::= 'SYSTEM' S SystemLiteral
|
||||
|
|
56
src/xdisp.c
56
src/xdisp.c
|
@ -1194,6 +1194,7 @@ static void get_cursor_offset_for_mouse_face (struct window *w,
|
|||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
static void produce_special_glyphs (struct it *, enum display_element_type);
|
||||
static void pad_mode_line (struct it *, bool);
|
||||
static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
|
||||
static bool coords_in_mouse_face_p (struct window *, int, int);
|
||||
static void reset_box_start_end_flags (struct it *);
|
||||
|
@ -28877,7 +28878,11 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st
|
|||
{
|
||||
/* Add truncation mark, but don't do it if the line is
|
||||
truncated at a padding space. */
|
||||
if (it_charpos < it->string_nchars)
|
||||
/* Need to do the below for the last string character as
|
||||
well, since it could be a double-width character, in
|
||||
which case the previous character ends before
|
||||
last_visible_x. Thus, comparison with <=, not <. */
|
||||
if (it_charpos <= it->string_nchars)
|
||||
{
|
||||
if (!FRAME_WINDOW_P (it->f))
|
||||
{
|
||||
|
@ -28885,6 +28890,18 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st
|
|||
|
||||
if (it->current_x > it->last_visible_x)
|
||||
{
|
||||
/* This flag is true if we are displaying mode
|
||||
line, false for header-line or tab-line. */
|
||||
bool mode_line_p = false;
|
||||
|
||||
/* ROW->mode_line_p is true if we display mode
|
||||
line or header-line or tab-line. */
|
||||
if (row->mode_line_p)
|
||||
{
|
||||
struct window *w = it->w;
|
||||
if (row == MATRIX_MODE_LINE_ROW (w->desired_matrix))
|
||||
mode_line_p = true;
|
||||
}
|
||||
if (!row->reversed_p)
|
||||
{
|
||||
for (ii = row->used[TEXT_AREA] - 1; ii > 0; --ii)
|
||||
|
@ -28902,7 +28919,10 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st
|
|||
for (n = row->used[TEXT_AREA]; ii < n; ++ii)
|
||||
{
|
||||
row->used[TEXT_AREA] = ii;
|
||||
produce_special_glyphs (it, IT_TRUNCATION);
|
||||
if (row->mode_line_p)
|
||||
pad_mode_line (it, mode_line_p);
|
||||
else
|
||||
produce_special_glyphs (it, IT_TRUNCATION);
|
||||
}
|
||||
}
|
||||
produce_special_glyphs (it, IT_TRUNCATION);
|
||||
|
@ -31728,6 +31748,38 @@ produce_special_glyphs (struct it *it, enum display_element_type what)
|
|||
it->nglyphs = temp_it.nglyphs;
|
||||
}
|
||||
|
||||
/* Produce padding glyphs for mode/header/tab-line whose text needs to
|
||||
be truncated. This is used when the last visible character leaves
|
||||
one or more columns till the window edge, but the next character is
|
||||
wider than that number of columns, and therefore cannot fit on the
|
||||
line. We then replace these columns with the appropriate padding
|
||||
character: '-' for the mode line and SPC for the other two. That's
|
||||
because these lines should not show the usual truncation glyphs
|
||||
there. This function is only used on TTY frames. */
|
||||
static void
|
||||
pad_mode_line (struct it *it, bool mode_line_p)
|
||||
{
|
||||
struct it temp_it;
|
||||
GLYPH glyph;
|
||||
|
||||
eassert (!FRAME_WINDOW_P (it->f));
|
||||
temp_it = *it;
|
||||
temp_it.object = Qnil;
|
||||
memset (&temp_it.current, 0, sizeof temp_it.current);
|
||||
|
||||
SET_GLYPH (glyph, mode_line_p ? '-' : ' ', it->base_face_id);
|
||||
|
||||
temp_it.dp = NULL;
|
||||
temp_it.what = IT_CHARACTER;
|
||||
temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph);
|
||||
temp_it.face_id = GLYPH_FACE (glyph);
|
||||
temp_it.len = CHAR_BYTES (temp_it.c);
|
||||
|
||||
PRODUCE_GLYPHS (&temp_it);
|
||||
it->pixel_width = temp_it.pixel_width;
|
||||
it->nglyphs = temp_it.nglyphs;
|
||||
}
|
||||
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
|
||||
/* Calculate line-height and line-spacing properties.
|
||||
|
|
Loading…
Add table
Reference in a new issue