* Re: master bd86a6c4fde: perl-mode.el: Improve indent after hanging open-paren [not found] ` <20240705140249.2BC2DC1F9F8@vcs2.savannah.gnu.org> @ 2024-07-08 8:39 ` Andrea Corallo [not found] ` <wfJFTC-yn2A81SfJEzoBLmljvGlYuBGav0ubbB_IMNPwNFaQBpPm-MT0lSTYPdjt4w0NHuVfBSlH5_vbHYuC8eTn2HiHlxX_67xCLtud16I=@protonmail.com> 1 sibling, 0 replies; 3+ messages in thread From: Andrea Corallo @ 2024-07-08 8:39 UTC (permalink / raw) To: emacs-devel; +Cc: Stefan Monnier Stefan Monnier via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes: > branch: master > commit bd86a6c4fde1aa42ea9e8b5434f0cb63f8d52684 > Author: Stefan Monnier <monnier@iro.umontreal.ca> > Commit: Stefan Monnier <monnier@iro.umontreal.ca> > > perl-mode.el: Improve indent after hanging open-paren > > Make the indentation of the code right after an open paren/brace > use the same rule as already used to indent the corresponding > matching paren/brace. > > * lisp/progmodes/perl-mode.el (perl-calculate-indent): > Use `perl-indent-new-calculate`s "virtual" indentation instead of > approximating it with `current-indentation`. [...] Hello :) I see this is regressing cperl-test-bug-64364 here on my testbench on master. Andrea ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <wfJFTC-yn2A81SfJEzoBLmljvGlYuBGav0ubbB_IMNPwNFaQBpPm-MT0lSTYPdjt4w0NHuVfBSlH5_vbHYuC8eTn2HiHlxX_67xCLtud16I=@protonmail.com>]
* Re: master bd86a6c4fde: perl-mode.el: Improve indent after hanging open-paren [not found] ` <wfJFTC-yn2A81SfJEzoBLmljvGlYuBGav0ubbB_IMNPwNFaQBpPm-MT0lSTYPdjt4w0NHuVfBSlH5_vbHYuC8eTn2HiHlxX_67xCLtud16I=@protonmail.com> @ 2024-07-08 10:10 ` Pip Cet 2024-07-08 14:33 ` Stefan Monnier 0 siblings, 1 reply; 3+ messages in thread From: Pip Cet @ 2024-07-08 10:10 UTC (permalink / raw) To: Emacs Devel, Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 1086 bytes --] > On Friday, July 5th, 2024 at 14:02, Stefan Monnier via Mailing list for Emacs changes emacs-diffs@gnu.org wrote: > > > branch: master > > commit bd86a6c4fde1aa42ea9e8b5434f0cb63f8d52684 > > Author: Stefan Monnier monnier@iro.umontreal.ca > > > > Commit: Stefan Monnier monnier@iro.umontreal.ca > > > > perl-mode.el: Improve indent after hanging open-paren > > > > Make the indentation of the code right after an open paren/brace > > use the same rule as already used to indent the corresponding > > matching paren/brace. > > > > * lisp/progmodes/perl-mode.el (perl-calculate-indent): > > Use `perl-indent-new-calculate`s "virtual" indentation instead of > > approximating it with `current-indentation`. Sorry, I sent this to Stefan but not to emacs-devel... Is it possible this causes a test failure in cperl-test-bug-64364? It does appear to do so here, and the new indentation behavior seems weird to me (though I'm not using Perl much anymore, so maybe this is the New Way). I believe the attached patch might restore the intended behavior... Pip [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-perl-indent.patch --] [-- Type: text/x-patch; name=0001-perl-indent.patch, Size: 746 bytes --] diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index ff71970d41b..13d5d7f9451 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -1128,8 +1128,8 @@ perl-calculate-indent ;; Move back over whitespace before the openbrace. ;; If openbrace is not first nonwhite thing on the line, ;; add the perl-brace-imaginary-offset. - (progn (skip-chars-backward " \t") - (if (bolp) 0 perl-brace-imaginary-offset)) + (save-excursion (skip-chars-backward " \t") + (if (bolp) 0 perl-brace-imaginary-offset)) (perl-indent-new-calculate 'virtual)))))))) (defun perl-backward-to-noncomment () ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: master bd86a6c4fde: perl-mode.el: Improve indent after hanging open-paren 2024-07-08 10:10 ` Pip Cet @ 2024-07-08 14:33 ` Stefan Monnier 0 siblings, 0 replies; 3+ messages in thread From: Stefan Monnier @ 2024-07-08 14:33 UTC (permalink / raw) To: Pip Cet; +Cc: Emacs Devel > I believe the attached patch might restore the intended behavior... Indeed, thanks! Can you push it to `master` or should I? Stefan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-08 14:33 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <172018816877.20149.12049864165694613040@vcs2.savannah.gnu.org> [not found] ` <20240705140249.2BC2DC1F9F8@vcs2.savannah.gnu.org> 2024-07-08 8:39 ` master bd86a6c4fde: perl-mode.el: Improve indent after hanging open-paren Andrea Corallo [not found] ` <wfJFTC-yn2A81SfJEzoBLmljvGlYuBGav0ubbB_IMNPwNFaQBpPm-MT0lSTYPdjt4w0NHuVfBSlH5_vbHYuC8eTn2HiHlxX_67xCLtud16I=@protonmail.com> 2024-07-08 10:10 ` Pip Cet 2024-07-08 14:33 ` Stefan Monnier
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.