]> git.eshelyaron.com Git - emacs.git/commit
Fixes in prog-fill-reindent-defun
authorTheodor Thornhill <theo@thornhill.no>
Sun, 25 Dec 2022 21:47:36 +0000 (22:47 +0100)
committerJuri Linkov <juri@linkov.net>
Wed, 28 Dec 2022 17:21:52 +0000 (19:21 +0200)
commitf9a22cf78d1a7f6472b09c3046c6a7f6984bc2d2
tree1944caf59d846247516ab38be884646bf3984047
parentefc44727daaee4d3f9aeb19864074472e99b296a
Fixes in prog-fill-reindent-defun

Ensure that we don't consider lines such as

    switch (foo) {
        case 2:  // If point on 'c' in 'case'
            return 2;

not to be considered for filling.

Also make sure we check for the active region, to replicate the normal
fill-paragraph behavior.

* lisp/progmodes/prog-mode.el (prog-fill-reindent-defun): Adjust
regex, and make sure fill-paragraph checks for active region.

(bug#60360, bug#60322)
lisp/progmodes/prog-mode.el