~suntong001/emacs-starter-kit/+git/master:scratch/flymake-fancy-end-of-line

Last commit made on 2023-04-12
Get this branch:
git clone -b scratch/flymake-fancy-end-of-line https://git.launchpad.net/~suntong001/emacs-starter-kit/+git/master

Branch merges

Branch information

Name:
scratch/flymake-fancy-end-of-line
Repository:
lp:~suntong001/emacs-starter-kit/+git/master

Recent commits

f8216ce... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Flymake: experimental fancy flymake-show-eol-overlays option

Some editors have this. It's less obstrusive than I thought it would
be.

* lisp/progmodes/flymake.el (flymake--delete-overlay): New helper.
(flymake--highlight-line): New flymake-eol-face considered.
(flymake--clear-foreign-diags): Use flymake--delete-overlay.
(flymake--publish-diagnostics): Use flymake--delete-overlay.
(flymake-mode): Use flymake--delete-overlay.
(flymake-error-eol)
(flymake-warning-eol, flymake-note-eol): New faces.
(flymake-show-eol-overlays): New option.

861cf3a... by Stefan Monnier

(RE_SETUP_SYNTAX_TABLE_FOR_OBJECT): Simplify

It turns out all calls to this function pass the same value
for the `count` argument, and they're all in `regexp.c`.

* src/syntax.c (RE_SETUP_SYNTAX_TABLE_FOR_OBJECT):
Rename from `SETUP_SYNTAX_TABLE_FOR_OBJECT`. Remove `count` argument.
Move call to `RE_SYNTAX_TABLE_BYTE_TO_CHAR` to where its result is
actually used.
* src/regex-emacs.c (re_search_2, re_match_2): Adjust accordingly.

* src/syntax.h (RE_SYNTAX_TABLE_BYTE_TO_CHAR): Rename from
`SYNTAX_TABLE_BYTE_TO_CHAR` to clarify that it takes a byteoffset as
used in the regexp engine and not a "bytepos". Adjust all callers.

c2c3114... by Stefan Monnier

(SETUP_SYNTAX_TABLE_FOR_OBJECT): Take a byteoffset

* src/syntax.c (SETUP_SYNTAX_TABLE_FOR_OBJECT): Take a byteoffset.
* src/regex-emacs.c (re_search_2, re_match_2): Simplify accordingly.

d53ff9f... by Stefan Monnier

src/regex-emacs.c (POS_AS_IN_BUFFER): Delete macro

That macro added 1 to buffer positions because:

    Strings are 0-indexed, buffers are 1-indexed

but the reality is that this 1 was added to the regexp engine's "byte
offsets" which are not 1-based byte positions as used throughout
the rest of Emacs, but they are BEGV_BYTE-relative offsets, so the two
did not cancel out.

* src/regex-emacs.c (PTR_TO_OFFSET, POS_AS_IN_BUFFER): Delete macros;
use `POINTER_TO_OFFSET` instead.
(re_search_2, re_match_2, re_match_2_internal): Adjust accordingly.
* src/syntax.h (SYNTAX_TABLE_BYTE_TO_CHAR): Don't remove 1 from buffer
byteoffsets now that `POS_AS_IN_BUFFER` doesn't add it any more.

1e6463a... by Stefan Monnier

(struct gl_state_s): Delete `offset` field

`gl_state` had an `offset` field because:

    For buffers, regex-emacs.c passes arguments to the
    UPDATE_SYNTAX_TABLE functions which are relative to BEGV

but the reality is that these arguments are byte offsets relative to
BEGV_BYTE whereas `offset` was counted in chars, so the two didn't
cancel each other out.

* src/syntax.h (struct gl_state_s): Delete `offset` field.
(UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
(SYNTAX_TABLE_BYTE_TO_CHAR):
* src/syntax.c (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT)
(update_syntax_table, skip_syntaxes): Simplify accordingly.

8fdd771... by =?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>

Flymake: futher enhance echo-area appearance of diagnostics

Also describe new 'echo-face' property in the Flymake manual, and fix
it's mistaken mention of a non-existing 'flymake-severity' property.

* doc/misc/flymake.texi:
(Flymake error types): Describe new properties and correct mention
of 'severity' property.

* lisp/progmodes/flymake.el:
(flymake-diagnostic-oneliner): Rework.
(flymake-error, flymake-warning, flymake-note): Add new 'echo-face' property.
(flymake--highlight-line)
(flymake-eldoc-function)
(flymake--tabulated-entries-1): Use flymake-diagnostic-oneliner
(Version): Bump to 1.3.3

9d025ea... by =?utf-8?q?Mattias_Engdeg=C3=A5rd?= <email address hidden>

`byte-code-function-p` is error-free

* lisp/emacs-lisp/byte-opt.el
(side-effect-free-fns, side-effect-and-error-free-fns):
Upgrade `byte-code-function-p` to error-free status.

ea9831b... by =?utf-8?q?Mattias_Engdeg=C3=A5rd?= <email address hidden>

Better compilation of arguments to `ignore`

* lisp/emacs-lisp/bytecomp.el (byte-compile-form)
(byte-compile-ignore):
Instead of compiling each `ignore` argument for value which is then
immediately discarded, compile it for effect but suppress
ignore-return-value warnings by passing the special value
`for-effect-no-warn` as for-effect parameter.
Proposed by Stefan Monnier.

c146bd8... by Yuan Fu <email address hidden>

Prompt target dir in treesit-install-language-grammar (bug#62704)

* lisp/treesit.el (treesit--check-repo-url): New variable.
(treesit-install-language-grammar): Prompt for target directory.

1a5a03c... by Yuan Fu <email address hidden>

Define sexp in c-ts-mode more broadly (bug#62302)

* lisp/progmodes/c-ts-mode.el: Define sexp in c/c++-ts-mode as
anything but delimiters.