]> git.eshelyaron.com Git - emacs.git/commit
Move to start of current header in diff-{file,hunk}-prev
authorSpencer Baugh <sbaugh@janestreet.com>
Tue, 10 Sep 2024 18:18:39 +0000 (14:18 -0400)
committerEshel Yaron <me@eshelyaron.com>
Fri, 27 Sep 2024 10:24:01 +0000 (12:24 +0200)
commit900ebbc423e17b1fa5e069a3d581820f9070fd22
tree83f5b4975b473ef939d321d978453de8588d4846
parent35cb386fcb62ebeacef540dbd64551fe6bdde491
Move to start of current header in diff-{file,hunk}-prev

If point was after a file or hunk header, the diff-file-prev and
diff-hunk-prev commands would move to the start of that header.
But if point was *within* the header, they would not move, and
would report "No previous file" or "No previous hunk".  This
differs from the behavior of most other movement commands,
e.g. backward-sexp or backward-sentence.

This commit fixes diff-file-prev and diff-hunk-prev, as well as
other easy-mmode-define-navigation BASE-prev commands.  Now
these commands move to the start of the containing "thing" just
like other movement commands.

* lisp/emacs-lisp/easy-mmode.el (easy-mmode--prev):
Move to start of current match first. (bug#73172)
* etc/NEWS: Document the behavior change.

(cherry picked from commit e776903b31cf2b2d21d91cbc7d6b7dbc1e9d442f)
etc/NEWS
lisp/emacs-lisp/easy-mmode.el