all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
@ 2014-07-05 20:10 Samuel Bronson
  2022-05-11 14:29 ` Lars Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Samuel Bronson @ 2014-07-05 20:10 UTC (permalink / raw)
  To: 17948


The package `cperl' could *really* benefit from a way to do the
equivalent of `cperl-set-style' from a Local Variables block or
.dir-locals.el file.

It might be best to use that name, even, since the name could easily
lead one to believe that `cperl-mode' was somehow based on the `cc-mode'
package.  (At least, I thought it might be until I saw neither hide nor
hair of it in the source file.  It didn't help that `c-file-style'
*seemed* to be passing the usual `normal-mode' test, because
`cperl-mode' was failing to reset the style during reinitialization.)


In GNU Emacs 24.3.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2014-06-06 on babin, modified by Debian
Windowing system distributor `Colin Harrison', version 11.0.60900031
System Description:	Debian GNU/Linux testing (jessie)

Configured using:
 `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' '--without-gconf'
 '--without-gsettings' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2
 -fstack-protector --param=ssp-buffer-size=4 -Wformat
 -Werror=format-security -Wall' 'LDFLAGS=-Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: CPerl

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  xterm-mouse-mode: t
  show-paren-mode: t
  recentf-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-h v <return> C-x o C-x o <up> <up> <C-home> <next> 
<prior> <prior> <next> <prior> <prior> <next> <next> 
<next> <next> <next> <prior> <next> <prior> <down> 
<down> <end> <down> <down> <down> <C-home> <C-end> 
<C-home> M-x m o d e - p <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> p e r l <tab> - 
m o <tab> <return> <next> <prior> <next> <next> <next> 
<next> <next> <prior> M-x <up> <up> <up> <down> <down> 
c <end> <return> <up> <up> <up> <up> M-x p o d <tab> 
<tab> C-g <down> <next> <next> <next> <next> <next> 
<next> <prior> <prior> <prior> <prior> <prior> <up> 
<prior> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<right> <up> <up> M-x c <backspace> s h <backspace> 
<backspace> n o r m <tab> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> C-g 
M-. C-g C-h c C-g M-x d e s c <tab> c h <tab> <return> 
<down> <down> <down> <up> <end> <down> <down> <down> 
<down> M-x <up> <return> <up> <up> <up> <C-left> <C-left> 
<C-left> <next> <next> <prior> <next> <next> <next> 
<next> <C-home> <next> <next> <next> <next> <next> 
<next> <next> <prior> <prior> <prior> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> M-x C-g <next> <next> 
<next> <next> <prior> <next> <next> <next> <next> <prior> 
<next> <next> <next> <next> <C-home> <next> M-x r e 
p o r t <tab> c <tab> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> c p 
<tab> <backspace> <backspace> <backspace> <backspace> 
c p <tab> e r <tab> <tab> <tab> <tab> <tab> <tab> C-g 
<C-home> <next> <next> <down> <next> <next> <prior> 
<prior> <prior> <next> <next> <next> <next> <next> 
<next> <next> <prior> <C-home> <next> <next> <next> 
<next> <next> <next> <next> <next> <next> <next> <C-home> 
<next> <next> <next> <next> <next> <down> M-x r e <backspace> 
<backspace> e m a c s <tab> b <tab> <home> <home> r 
e p <tab> <end> <return>

Recent messages:
 [2 times]
Mark set
Quit
Mark set
delete-backward-char: Text is read-only
Making completion list... [2 times]
Compilation exited abnormally with code 2
Quit
Mark set [3 times]
Making completion list...

Load-path shadows:
/home/naesten/system/emacs/dist/elpa/w3-4.0.49/ssl hides /usr/share/emacs24/site-lisp/wl/ssl
/usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs/site-lisp/autoconf/autotest-mode hides /usr/share/emacs/site-lisp/autotest-mode
/usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs24/site-lisp/flim/md4 hides /usr/share/emacs/24.3/lisp/md4
/home/naesten/system/emacs/dist/elisp/loaddefs hides /usr/share/emacs/24.3/lisp/loaddefs
/usr/share/emacs24/site-lisp/flim/hex-util hides /usr/share/emacs/24.3/lisp/hex-util
/home/naesten/system/emacs/dist/elpa/json-1.2/json hides /usr/share/emacs/24.3/lisp/json
/home/naesten/system/emacs/dist/elisp/t-mouse hides /usr/share/emacs/24.3/lisp/t-mouse
/usr/share/emacs24/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/24.3/lisp/tempo
/usr/share/emacs24/site-lisp/css-mode/css-mode hides /usr/share/emacs/24.3/lisp/textmodes/css-mode
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.3/lisp/textmodes/rst
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell
/usr/share/emacs24/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.3/lisp/net/sasl-digest
/usr/share/emacs24/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.3/lisp/net/sasl-cram
/usr/share/emacs24/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.3/lisp/net/hmac-md5
/usr/share/emacs24/site-lisp/flim/hmac-def hides /usr/share/emacs/24.3/lisp/net/hmac-def
/usr/share/emacs24/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.3/lisp/net/sasl-ntlm
/usr/share/emacs24/site-lisp/flim/ntlm hides /usr/share/emacs/24.3/lisp/net/ntlm
/usr/share/emacs24/site-lisp/flim/sasl hides /usr/share/emacs/24.3/lisp/net/sasl
/usr/share/emacs24/site-lisp/wl/rfc2368 hides /usr/share/emacs/24.3/lisp/mail/rfc2368
/home/naesten/system/emacs/dist/elisp/package hides /usr/share/emacs/24.3/lisp/emacs-lisp/package
/home/naesten/system/emacs/dist/elpa/tabulated-list-0/tabulated-list hides /usr/share/emacs/24.3/lisp/emacs-lisp/tabulated-list
/usr/share/emacs24/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs24/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs24/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs24/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs24/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview
/usr/share/emacs24/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs24/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs24/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs
/usr/share/emacs24/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs24/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs24/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex
/usr/share/emacs24/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs24/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs24/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs24/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs24/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs24/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs24/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs24/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs24/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs24/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs24/site-lisp/html-helper-mode/hhm-config hides /usr/share/emacs/site-lisp/html-helper-mode/hhm-config
/usr/share/emacs24/site-lisp/html-helper-mode/visual-basic-mode hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode
/usr/share/emacs24/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/site-lisp/html-helper-mode/tempo
/usr/share/emacs24/site-lisp/html-helper-mode/html-helper-mode hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode
/usr/share/emacs24/site-lisp/mailcrypt/mc-toplev hides /usr/share/emacs/site-lisp/mailcrypt/mc-toplev
/usr/share/emacs24/site-lisp/mailcrypt/mc-remail hides /usr/share/emacs/site-lisp/mailcrypt/mc-remail
/usr/share/emacs24/site-lisp/mailcrypt/mc-pgp6 hides /usr/share/emacs/site-lisp/mailcrypt/mc-pgp6
/usr/share/emacs24/site-lisp/mailcrypt/mc-pgp5 hides /usr/share/emacs/site-lisp/mailcrypt/mc-pgp5
/usr/share/emacs24/site-lisp/mailcrypt/mc-pgp hides /usr/share/emacs/site-lisp/mailcrypt/mc-pgp
/usr/share/emacs24/site-lisp/mailcrypt/mc-gpg hides /usr/share/emacs/site-lisp/mailcrypt/mc-gpg
/usr/share/emacs24/site-lisp/mailcrypt/mailcrypt hides /usr/share/emacs/site-lisp/mailcrypt/mailcrypt
/usr/share/emacs24/site-lisp/mailcrypt/expect hides /usr/share/emacs/site-lisp/mailcrypt/expect
/usr/share/emacs24/site-lisp/mailcrypt/mc-setversion hides /usr/share/emacs/site-lisp/mailcrypt/mc-setversion
/usr/share/emacs24/site-lisp/psgml/psgml-edit hides /usr/share/emacs/site-lisp/psgml/psgml-edit
/usr/share/emacs24/site-lisp/psgml/psgml-charent hides /usr/share/emacs/site-lisp/psgml/psgml-charent
/usr/share/emacs24/site-lisp/psgml/psgml hides /usr/share/emacs/site-lisp/psgml/psgml
/usr/share/emacs24/site-lisp/psgml/psgml-other hides /usr/share/emacs/site-lisp/psgml/psgml-other
/usr/share/emacs24/site-lisp/psgml/psgml-api hides /usr/share/emacs/site-lisp/psgml/psgml-api
/usr/share/emacs24/site-lisp/psgml/psgml-sysdep hides /usr/share/emacs/site-lisp/psgml/psgml-sysdep
/usr/share/emacs24/site-lisp/psgml/psgml-init hides /usr/share/emacs/site-lisp/psgml/psgml-init
/usr/share/emacs24/site-lisp/psgml/psgml-parse hides /usr/share/emacs/site-lisp/psgml/psgml-parse
/usr/share/emacs24/site-lisp/psgml/psgml-info hides /usr/share/emacs/site-lisp/psgml/psgml-info
/usr/share/emacs24/site-lisp/psgml/psgml-ids hides /usr/share/emacs/site-lisp/psgml/psgml-ids
/usr/share/emacs24/site-lisp/psgml/psgml-dtd hides /usr/share/emacs/site-lisp/psgml/psgml-dtd
/usr/share/emacs/24.3/lisp/gnus/.dir-locals hides /home/naesten/system/emacs/dist/elisp/magit/.dir-locals
/usr/share/emacs/site-lisp/emacs-goodies-el/markdown-mode hides /home/naesten/system/emacs/dist/elisp/markdown-mode/markdown-mode

Features:
(shadow emacsbug descr-text shr nroff-mode two-column iso-transl dabbrev
tabify nneething perlcritic loadhist vhdl-mode hippie-exp verilog-mode
vera-mode tcl simula sieve sieve-mode sieve-manage sgml-mode ruby-mode
python prolog pascal octave-mod rng-nxml rng-valid rng-loc rng-uri
rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
modula2 meta-mode m4-mode ld-script js json info-look idlwave
idlwave-help idlw-help icon hideshow fortran f90 delphi dcl-mode
css-mode cfengine cfengine3 antlr-mode ada-mode which-func align
find-file sql ps-mode pde-util etags tabbar re-builder gud perldoc
imenu-tree pde-project help-dwim template-simple tempo-x pde-vars
windata tree-mode woman man pde-autoloads autoload tar-mode files-x
debug info vc-rcs url-handlers nnweb nnregistry spam-report apropos
bbdb-hooks flow-fill mm-archive gnus-html browse-url xml mm-url sort
smiley gnus-cite gnus-async gnus-bcklg qp gnus-ml mailcrypt disp-table
gnus-topic nndoc nndraft nnmh netrc gnutls nnfolder bbdb-gnus bbdb-snarf
mail-extr nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual
nntp gnus-cache gnus-registry registry eieio-base spam spam-stat gnus-uu
yenc gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime
dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start
gnus-spec gnus-int gnus-range message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode gmm-utils mailheader gnus-win gnus gnus-ems nnheader
gitignore-mode perl-mode filladapt basic basic-mode cperl-mode jka-compr
lisp-mnt mule-util network-stream starttls url-http tls mail-parse
rfc2231 url-gw url-cache url-auth finder-inf wdired ls-lisp find-dired
sh-script smie executable xmtn-dvc dvc-status xmtn-conflicts xmtn-ids
xmtn-match xmtn-automate xmtn-compat parse-time xmtn-run xmtn-basic-io
xmtn-base conf-mode tramp-cmds noutline outline tramp-cache tramp-sh rx
tramp tramp-compat tramp-loaddefs shell pcomplete format-spec view
magit-bisect magit-key-mode magit debian-copyright bbdb-com mailabbrev
misearch multi-isearch dired-aux debian-bug debian-changelog-mode imenu
cc-langs make-mode debian-control-mode dpkg-dev-el dpkg-dev-el-loaddefs
thingatpt help-mode tla smerge-mode dvc-state dvc-config diff sendmail
rfc2047 rfc2045 ietf-drums mail-utils tla-gnus dvc-gnus dvc-cmenu
dvc-about dvc-version vc-git xgit-dvc xgit cus-edit xgit-annotate rect
dvc-annotate xgit-log dvc-revlist dvc-diff uniquify dvc-fileinfo
bzr-core tla-core pp tla-autoconf tla-defs dvc-log dvc-unified dvc-tips
dired-x dired ffap commit-patch-buffer log-edit pcvs-util add-log vc
vc-dispatcher diff-mode easy-mmode ediff-merg ediff-diff ediff-wind
ediff-help ediff-util ediff-mult ediff-init ediff xdarcs-core xgit-core
xhg-core xmtn-minimal server derived xcscope arc-mode archive-mode
asm-mode my-asm slime-autoloads dvc-autoloads dvc-core dvc-lisp
dvc-buffers dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs
dvc-site cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs elisp-depend ps-print-bg-fixup bbdb timezone
wgrep grep compile comint ansi-color ring edebug warnings trace xt-mouse
paren recentf tree-widget wid-edit cus-start cus-load
eldoc-eval-autoloads elisp-cache-autoloads erc-hl-nicks-autoloads
fill-column-indicator-autoloads find-file-in-git-repo-autoloads
gitconfig-mode-autoloads gitignore-mode-autoloads mo-git-blame-autoloads
occur-x-autoloads smartparens-autoloads dash-autoloads
synonyms-autoloads tabulated-list-autoloads w3-autoloads wgrep-autoloads
yagist-autoloads json-autoloads yasnippet-bundle-autoloads
yasnippet-bundle dropdown-list advice help-fns advice-preload yasnippet
easymenu assoc package find-func cl-macs gv w3m-load psgml-init
proof-site proof-autoloads pg-vars mmm-auto mmm-vars mmm-compat cl
cl-lib mailcrypt-init haskell-mode-autoloads edmacro kmacro tempo url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp
byte-compile cconv gnus-util time-date mm-util mail-prsvr password-cache
url-vars mailcap xml-parse doxymacs debian-el debian-el-loaddefs
bbdb-autoloads preview-latex tex-site auto-loads tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
font-render-setting x-toolkit x multi-tty emacs)

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
  2014-07-05 20:10 bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' Samuel Bronson
@ 2022-05-11 14:29 ` Lars Ingebrigtsen
  2024-01-02 17:33   ` Stefan Kangas
  2024-01-03 19:02 ` Harald Jörg
  2024-03-08  8:13 ` bug#17948: Emacs bug control: close 17948 Harald Jörg
  2 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-11 14:29 UTC (permalink / raw)
  To: Samuel Bronson; +Cc: 17948

Samuel Bronson <naesten@gmail.com> writes:

> The package `cperl' could *really* benefit from a way to do the
> equivalent of `cperl-set-style' from a Local Variables block or
> .dir-locals.el file.

I've now added this to Emacs 29 (under the name cperl-file-style).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
  2022-05-11 14:29 ` Lars Ingebrigtsen
@ 2024-01-02 17:33   ` Stefan Kangas
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Kangas @ 2024-01-02 17:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Samuel Bronson, Harald Jörg, 17948

reopen 17948
thanks

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Samuel Bronson <naesten@gmail.com> writes:
>
>> The package `cperl' could *really* benefit from a way to do the
>> equivalent of `cperl-set-style' from a Local Variables block or
>> .dir-locals.el file.
>
> I've now added this to Emacs 29 (under the name cperl-file-style).

Harald Jörg <haj@posteo.de> writes:

> The current implementation might need some reconsideration, though... I
> have been playing around with it and am a bit confused.
>
> As far as I understand it, `cperl-file-style' is supposed to be set in
> .dir-locals.el.  If I define it there as "PBP", then that style going to
> be local in buffers visiting files from the same directory.  Fine so
> far.
>
> However, the individual settings like `cperl-indent-level' are not
> buffer-local, nor made buffer-local by cperl-set-style.  Therefore, if I
> run `cperl-set-style' in any buffer (or from a customize :set function
> or from another .dir-locals.el), then it will override the value ... in
> all buffers, regardless of their local style settings.
>
> The C modes (which are the example after which cperl-file-style was
> built) solve this with a special value 'set-from-style - I guess
> cperl-mode needs something in the same spirit.

So I don't think the feature is working in its current form.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
  2014-07-05 20:10 bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' Samuel Bronson
  2022-05-11 14:29 ` Lars Ingebrigtsen
@ 2024-01-03 19:02 ` Harald Jörg
  2024-01-05 20:18   ` Stefan Kangas
  2024-03-08  8:13 ` bug#17948: Emacs bug control: close 17948 Harald Jörg
  2 siblings, 1 reply; 12+ messages in thread
From: Harald Jörg @ 2024-01-03 19:02 UTC (permalink / raw)
  To: 17948; +Cc: Lars Ingebrigtsen, Stefan Kangas

I suggest the following solution:

 - A new command (proposed name: `cperl-file-style' in sync with the
   option) sets the same set of variables as `cperl-set-style', but at
   the same time makes them buffer-local.

 - The `cperl-mode' command will call this new function if
   the option `cperl-file-style' is set to a non-nil value.

 - The command cperl-set-style is modified to set the
   default-toplevel-value for each option.  This command will also be
   used by the :set function of customize.

So, if `cperl-file-style' is at its default value of nil, all variables
stay global but can of course still individually appear in file or
directory variables.  If `cperl-file-style' is set, it defines new
defaults for all options.

This does not allow to have "PBP-style, but with an indent level of 3"
as a *customizable* default because cperl-file-style will override it,
but I'd expect it to work if both options are set in the correct order
in .dir-locals.el or file variables.

Does that sound ok?  I can prepare a patch ~ this weekend.

-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
  2024-01-03 19:02 ` Harald Jörg
@ 2024-01-05 20:18   ` Stefan Kangas
  2024-01-08  8:23     ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH] Harald Jörg
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Kangas @ 2024-01-05 20:18 UTC (permalink / raw)
  To: Harald Jörg, 17948; +Cc: Lars Ingebrigtsen

Harald Jörg <haj@posteo.de> writes:

> I suggest the following solution:
>
>  - A new command (proposed name: `cperl-file-style' in sync with the
>    option) sets the same set of variables as `cperl-set-style', but at
>    the same time makes them buffer-local.
>
>  - The `cperl-mode' command will call this new function if
>    the option `cperl-file-style' is set to a non-nil value.
>
>  - The command cperl-set-style is modified to set the
>    default-toplevel-value for each option.  This command will also be
>    used by the :set function of customize.
>
> So, if `cperl-file-style' is at its default value of nil, all variables
> stay global but can of course still individually appear in file or
> directory variables.  If `cperl-file-style' is set, it defines new
> defaults for all options.
>
> This does not allow to have "PBP-style, but with an indent level of 3"
> as a *customizable* default because cperl-file-style will override it,
> but I'd expect it to work if both options are set in the correct order
> in .dir-locals.el or file variables.
>
> Does that sound ok?  I can prepare a patch ~ this weekend.

Sounds good to me.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH]
  2024-01-05 20:18   ` Stefan Kangas
@ 2024-01-08  8:23     ` Harald Jörg
  2024-01-08 12:51       ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Harald Jörg @ 2024-01-08  8:23 UTC (permalink / raw)
  To: 17948; +Cc: Lars Ingebrigtsen, Stefan Kangas

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

So... I promised a bit too much.  It is not possible to override an
individual indentation setting (e.g. cperl-indent-level) when a
cperl-file-style is used.  File (and directory) variables are applied
after the body of cperl-mode, and the styles do their work only after
that in hack-local-variables-hook.  I did not know that.  So, styles
will always override the settings they provide.

But apart from that, the patch (attached) does what I would expect:  I
can set a default style in custom, individual styles from .dir-locals.el
or file local variables work without affecting other buffers.

I suggest this patch should go to the emacs-29 branch.

--
Cheers,
haj

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch for Bug#17948 --]
[-- Type: text/x-diff, Size: 6635 bytes --]

From 40407c365d8c092bbd94d3db20cc8e709498ca3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Harald=20J=C3=B6rg?= <haj@posteo.de>
Date: Mon, 8 Jan 2024 09:01:02 +0100
Subject: [PATCH] cperl-mode.el: Make sure cperl-file-style is buffer-local
 when set

* lisp/progmodes/cperl-mode.el (cperl-file-style): Add description
what the options actually do.
(cperl-menu): Split the menu entry "Indent styles" into "Default
indent styles" and "Indent styles for current buffer"
(cperl--set-file-style): call `cperl-file-style' instead of
`cperl-set-style'.
(cperl-set-style): Explain when to use `cperl-file-style'.
Use `set-default-toplevel-value' instead of `set'.
(cperl-set-style-back): Use `set-default-toplevel-value' instead
of `set'.
(cperl-file-style): New command to set the file style for the
current buffer.

* etc/NEWS: Announce the new command cperl-file-style
---
 etc/NEWS                     |  5 +++
 lisp/progmodes/cperl-mode.el | 66 +++++++++++++++++++++++++++++++++---
 2 files changed, 66 insertions(+), 5 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 069661866ce..4b11c5208eb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1638,6 +1638,11 @@ doc string.
 This option determines the indentation style to be used.  It can also
 be used as a file-local variable.
 
+*** New command 'cperl-file-style'.
+This command sets the indentation style for the current buffer.  To
+change the default style, either use the option with the same name or
+use the command cperl-set-style.
+
 ** Gud
 
 *** 'gud-go' is now bound to 'C-c C-v'.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index b85db699e72..a75d257b101 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -101,7 +101,10 @@ cperl
   :version "20.3")
 
 (defgroup cperl-indentation-details nil
-  "Indentation."
+  "Indentation.
+The option `cperl-file-style' (which see) can be used to set
+several indentation options in one go, following popular
+indentation styles."
   :prefix "cperl-"
   :group 'cperl)
 
@@ -154,6 +157,29 @@ cperl-extra-newline-before-brace-multiline
   :type 'boolean
   :group 'cperl-autoinsert-details)
 
+(defcustom cperl-file-style nil
+  "Indentation style to use in cperl-mode.
+Setting this option will override options as given in
+`cperl-style-alist' for the keyword provided here.  If nil, then
+the individual options as customized are used.
+\"PBP\" is the style recommended in the Book \"Perl Best
+Practices\" by Damian Conway.  \"CPerl\" is the traditional style
+of cperl-mode, and \"PerlStyle\" follows the Perl documentation
+in perlstyle.  The other styles have been developed for other
+programming languages, mostly C."
+  :type '(choice (const "PBP")
+                 (const "CPerl")
+                 (const "PerlStyle")
+                 (const "GNU")
+                 (const "C++")
+                 (const "K&R")
+                 (const "BSD")
+                 (const "Whitesmith")
+                 (const :tag "Default" nil))
+  :group 'cperl-indentation-details
+  :version "29.1")
+;;;###autoload(put 'cperl-file-style 'safe-local-variable 'stringp)
+
 (defcustom cperl-indent-level 2
   "Indentation of CPerl statements with respect to containing block."
   :type 'integer
@@ -1147,7 +1173,7 @@ cperl-menu
      ["Fix whitespace on indent" cperl-toggle-construct-fix t]
      ["Auto-help on Perl constructs" cperl-toggle-autohelp t]
      ["Auto fill" auto-fill-mode t])
-    ("Indent styles..."
+    ("Default indent styles..."
      ["CPerl" (cperl-set-style "CPerl") t]
      ["PBP" (cperl-set-style  "PBP") t]
      ["PerlStyle" (cperl-set-style "PerlStyle") t]
@@ -1158,6 +1184,15 @@ cperl-menu
      ["Whitesmith" (cperl-set-style "Whitesmith") t]
      ["Memorize Current" (cperl-set-style "Current") t]
      ["Memorized" (cperl-set-style-back) cperl-old-style])
+    ("Indent styles for current buffer..."
+     ["CPerl" (cperl-set-style "CPerl") t]
+     ["PBP" (cperl-file-style  "PBP") t]
+     ["PerlStyle" (cperl-file-style "PerlStyle") t]
+     ["GNU" (cperl-file-style "GNU") t]
+     ["C++" (cperl-file-style "C++") t]
+     ["K&R" (cperl-file-style "K&R") t]
+     ["BSD" (cperl-file-style "BSD") t]
+     ["Whitesmith" (cperl-file-style "Whitesmith") t])
     ("Micro-docs"
      ["Tips" (describe-variable 'cperl-tips) t]
      ["Problems" (describe-variable 'cperl-problems) t]
@@ -1788,7 +1823,8 @@ cperl-mode
 
 (defun cperl--set-file-style ()
   (when cperl-file-style
-    (cperl-set-style cperl-file-style)))
+    (cperl-file-style cperl-file-style)))
+
 \f
 ;; Fix for perldb - make default reasonable
 (defun cperl-db ()
@@ -6259,6 +6295,10 @@ cperl-style-alist
 
 (defun cperl-set-style (style)
   "Set CPerl mode variables to use one of several different indentation styles.
+This command sets the default values for the variables.  It does
+not affect buffers visiting files where the style has been set as
+a file or directory variable.  To change the indentation style of
+a buffer, use the command `cperl-file-style' instead.
 The arguments are a string representing the desired style.
 The list of styles is in `cperl-style-alist', available styles
 are \"CPerl\", \"PBP\", \"PerlStyle\", \"GNU\", \"K&R\", \"BSD\", \"C++\"
@@ -6279,7 +6319,8 @@ cperl-set-style
   (let ((style (cdr (assoc style cperl-style-alist))) setting)
     (while style
       (setq setting (car style) style (cdr style))
-      (set (car setting) (cdr setting)))))
+      (set-default-toplevel-value (car setting) (cdr setting))))
+  (set-default-toplevel-value 'cperl-file-style style))
 
 (defun cperl-set-style-back ()
   "Restore a style memorized by `cperl-set-style'."
@@ -6289,7 +6330,22 @@ cperl-set-style-back
     (while cperl-old-style
       (setq setting (car cperl-old-style)
 	    cperl-old-style (cdr cperl-old-style))
-      (set (car setting) (cdr setting)))))
+      (set-default-toplevel-value (car setting) (cdr setting)))))
+
+(defun cperl-file-style (style)
+  "Set the indentation style for the current buffer to STYLE.
+The list of styles is in `cperl-style-alist', available styles
+are \"CPerl\", \"PBP\", \"PerlStyle\", \"GNU\", \"K&R\", \"BSD\", \"C++\"
+and \"Whitesmith\"."
+  (interactive
+   (list (completing-read "Enter style: " cperl-style-alist nil 'insist)))
+  (dolist (setting (cdr (assoc style cperl-style-alist)) style)
+    (let ((option (car setting))
+          (value (cdr setting)))
+      (make-variable-buffer-local option)
+      (set option value)))
+  (make-variable-buffer-local 'cperl-file-style)
+  (setq cperl-file-style style))
 
 (defvar perl-dbg-flags)
 (defun cperl-check-syntax ()
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH]
  2024-01-08  8:23     ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH] Harald Jörg
@ 2024-01-08 12:51       ` Eli Zaretskii
  2024-01-08 15:26         ` Harald Jörg
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-01-08 12:51 UTC (permalink / raw)
  To: Harald Jörg; +Cc: larsi, stefankangas, 17948

> Cc: Lars Ingebrigtsen <larsi@gnus.org>, Stefan Kangas <stefankangas@gmail.com>
> From: Harald Jörg <haj@posteo.de>
> Date: Mon, 08 Jan 2024 08:23:35 +0000
> 
> So... I promised a bit too much.  It is not possible to override an
> individual indentation setting (e.g. cperl-indent-level) when a
> cperl-file-style is used.  File (and directory) variables are applied
> after the body of cperl-mode, and the styles do their work only after
> that in hack-local-variables-hook.  I did not know that.  So, styles
> will always override the settings they provide.
> 
> But apart from that, the patch (attached) does what I would expect:  I
> can set a default style in custom, individual styles from .dir-locals.el
> or file local variables work without affecting other buffers.
> 
> I suggest this patch should go to the emacs-29 branch.

Sorry, no new commands/features on the release branch at this time.
This should go to master.

Thanks.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH]
  2024-01-08 12:51       ` Eli Zaretskii
@ 2024-01-08 15:26         ` Harald Jörg
  2024-01-08 19:27           ` Stefan Kangas
  2024-01-09 16:06           ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 12+ messages in thread
From: Harald Jörg @ 2024-01-08 15:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, stefankangas, 17948

Eli Zaretskii writes:

>> Cc: Lars Ingebrigtsen <larsi@gnus.org>, Stefan Kangas <stefankangas@gmail.com>
>> From: Harald Jörg <haj@posteo.de>
>> Date: Mon, 08 Jan 2024 08:23:35 +0000
>> [...]
>> I suggest this patch should go to the emacs-29 branch.
>
> Sorry, no new commands/features on the release branch at this time.
> This should go to master.
>
> Thanks.

Thanks for reviewing!

I understand - and have now pushed the patch to master.
-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH]
  2024-01-08 15:26         ` Harald Jörg
@ 2024-01-08 19:27           ` Stefan Kangas
  2024-01-09 16:06           ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 12+ messages in thread
From: Stefan Kangas @ 2024-01-08 19:27 UTC (permalink / raw)
  To: Harald Jörg, Eli Zaretskii; +Cc: larsi, 17948

Harald Jörg <haj@posteo.de> writes:

> I understand - and have now pushed the patch to master.

Thanks.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
  2024-01-08 15:26         ` Harald Jörg
  2024-01-08 19:27           ` Stefan Kangas
@ 2024-01-09 16:06           ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-09 18:23             ` Harald Jörg
  1 sibling, 1 reply; 12+ messages in thread
From: john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-09 16:06 UTC (permalink / raw)
  To: Harald Jörg; +Cc: Eli Zaretskii, larsi, 17948, stefankangas

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

Harald Jörg <haj@posteo.de> writes:

> Eli Zaretskii writes:
>
>>> Cc: Lars Ingebrigtsen <larsi@gnus.org>, Stefan Kangas <stefankangas@gmail.com>
>>> From: Harald Jörg <haj@posteo.de>
>>> Date: Mon, 08 Jan 2024 08:23:35 +0000
>>> [...]
>>> I suggest this patch should go to the emacs-29 branch.
>>
>> Sorry, no new commands/features on the release branch at this time.
>> This should go to master.
>>
>> Thanks.
>
> Thanks for reviewing!
>
> I understand - and have now pushed the patch to master.

This commit causes a couple of cperl-mode indent tests to start
failing. Attached is the log from running:

  make -k -C test check-lisp-progmodes


[-- Attachment #2: cperl-mode-tests.log --]
[-- Type: text/plain, Size: 8160 bytes --]

Running 57 tests (2024-01-09 10:00:55-0600, selector `(not (or (tag :expensive-test) (tag :unstable)))')
   passed   1/57  cperl-test-attribute-list-rx (0.000238 sec)
   passed   2/57  cperl-test-attribute-rx (0.000127 sec)
   passed   3/57  cperl-test-bug-11733 (0.002425 sec)
   passed   4/57  cperl-test-bug-11996 (0.001372 sec)
   passed   5/57  cperl-test-bug-14343 (0.002349 sec)
   passed   6/57  cperl-test-bug-16368 (0.000173 sec)
   passed   7/57  cperl-test-bug-19709 (0.001242 sec)
   passed   8/57  cperl-test-bug-22355 (0.000636 sec)
   passed   9/57  cperl-test-bug-23992 (0.001337 sec)
   passed  10/57  cperl-test-bug-25098 (0.000780 sec)
   passed  11/57  cperl-test-bug-28650 (0.001259 sec)
   passed  12/57  cperl-test-bug-30393 (0.001014 sec)
   passed  13/57  cperl-test-bug-35925 (0.001159 sec)
End of `/ ... /' string/RE not found: (scan-error Unbalanced parentheses 7 13)
   passed  14/57  cperl-test-bug-37127 (0.977492 sec)
   passed  15/57  cperl-test-bug-42168 (0.001213 sec)
   passed  16/57  cperl-test-bug-45255 (0.000506 sec)
   passed  17/57  cperl-test-bug-47112 (0.001242 sec)
   passed  18/57  cperl-test-bug-47598 (0.000947 sec)
   passed  19/57  cperl-test-bug-64190 (0.005074 sec)
   passed  20/57  cperl-test-bug-64364 (0.005063 sec)
   passed  21/57  cperl-test-bug-65834 (0.000903 sec)
   passed  22/57  cperl-test-bug-66145 (0.004820 sec)
   passed  23/57  cperl-test-bug-66161 (0.001057 sec)
   passed  24/57  cperl-test-bug-997 (0.000413 sec)
   passed  25/57  cperl-test-fontify-attrs-and-signatures (0.003491 sec)
   passed  26/57  cperl-test-fontify-class (0.000867 sec)
   passed  27/57  cperl-test-fontify-declarations (0.000347 sec)
   passed  28/57  cperl-test-fontify-punct-vars (0.001012 sec)
   passed  29/57  cperl-test-fontify-special-variables (0.000342 sec)
   passed  30/57  cperl-test-fontify-sub-names (0.002409 sec)
Scanning for "hard" Perl constructions...
End of here-document `HERE' not found.
End of here-document `HERE' not found.
Scanning for "hard" Perl constructions...
End of here-document `THERE' not found.
End of here-document `THERE' not found.
Scanning for "hard" Perl constructions... done
   passed  31/57  cperl-test-here-doc-missing-end (0.001749 sec)
   passed  32/57  cperl-test-heredocs (0.041433 sec)
Precede char by C-q to avoid expansion
   passed  33/57  cperl-test-hyperactive-electric-else (0.002132 sec)
   passed  34/57  cperl-test-identifier-rx (0.000499 sec)
   passed  35/57  cperl-test-identify-heredoc (0.001102 sec)
   passed  36/57  cperl-test-identify-no-heredoc (0.001232 sec)
   passed  37/57  cperl-test-imenu-index (0.003937 sec)
Test cperl-test-indent-exp backtrace:
  signal(ert-test-failed (((should (equal got expected)) :form (equal 
  ert-fail(((should (equal got expected)) :form (equal "test case whil
  (if (unwind-protect (setq value-7 (apply fn-5 args-6)) (setq form-de
  (let (form-description-9) (if (unwind-protect (setq value-7 (apply f
  (let ((value-7 'ert-form-evaluation-aborted-8)) (let (form-descripti
  (let* ((fn-5 #'equal) (args-6 (condition-case err (list got expected
  (progn (insert code) (goto-char (point-min)) (funcall cperl-test-mod
  (unwind-protect (progn (insert code) (goto-char (point-min)) (funcal
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
  (let ((name (match-string 1)) (code (match-string 2)) (expected (mat
  (while (re-search-forward (concat "^# ?-+ \\_<\\(?1:.+?\\)\\_>: inpu
  (progn (insert-file-contents (expand-file-name "cperl-indent-exp.pl"
  (unwind-protect (progn (insert-file-contents (expand-file-name "cper
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
  (closure (t) nil (let* ((fn-0 #'eq) (args-1 (condition-case err (lis
  #f(compiled-function () #<bytecode 0x1fe51f30ad42b54d>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x1fe51f30ad42b54d
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name cperl-test-indent-exp :documentation 
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/progmodes/cperl-mode
  command-line()
  normal-top-level()
Test cperl-test-indent-exp condition:
    (ert-test-failed
     ((should (equal got expected)) :form
      (equal
       "test case while loop:\n{\n    while (1) {\n\11say \"boring loop\";\n    }\n    continue {\n\11last;\n    }\n}\n"
       "test case while loop:\n{\n  while (1) {\n    say \"boring loop\";\n  } continue {\n    last;\n  }\n}\n")
      :value nil :explanation
      (arrays-of-different-length 96 92
				  "test case while loop:\n{\n    while (1) {\n\11say \"boring loop\";\n    }\n    continue {\n\11last;\n    }\n}\n"
				  "test case while loop:\n{\n  while (1) {\n    say \"boring loop\";\n  } continue {\n    last;\n  }\n}\n"
				  first-mismatch-at 26)))
   FAILED  38/57  cperl-test-indent-exp (0.002078 sec) at lisp/progmodes/cperl-mode-tests.el:100
   passed  39/57  cperl-test-indent-styles (0.006402 sec)
   passed  40/57  cperl-test-package-regexp (0.000558 sec)
   passed  41/57  cperl-test-prototype-rx (0.000626 sec)
   passed  42/57  cperl-test-signature-rx (0.000521 sec)
   passed  43/57  cperl-test-unicode-arrays (0.003492 sec)
   passed  44/57  cperl-test-unicode-fhs (0.001231 sec)
   passed  45/57  cperl-test-unicode-hashes (0.003823 sec)
   passed  46/57  cperl-test-unicode-hashkeys (0.002064 sec)
   passed  47/57  cperl-test-unicode-hashref (0.000865 sec)
   passed  48/57  cperl-test-unicode-labels (0.000802 sec)
   passed  49/57  cperl-test-unicode-proto (0.000885 sec)
   passed  50/57  cperl-test-unicode-sub (0.000936 sec)
   passed  51/57  cperl-test-unicode-varname (0.000588 sec)
   passed  52/57  cperl-test-unicode-varname-list (0.001282 sec)
   passed  53/57  cperl-test-version-regexp (0.000345 sec)
   passed  54/57  cperl-test-word-at-point (0.000193 sec)
   passed  55/57  cperl-test-ws+-rx (0.000268 sec)
   passed  56/57  cperl-test-ws-rx (0.000167 sec)
Test test-indentation backtrace:
  signal(ert-test-failed (("Mismatch in test \"cperl-indent1\", file /
  ert-fail(("Mismatch in test \"cperl-indent1\", file /home/jm/src/ema
  ert-test--erts-test(((dummy . t) (code)) "/home/jm/src/emacs/test/li
  ert-test-erts-file("/home/jm/src/emacs/test/lisp/progmodes/cperl-mod
  (closure (perl-indent-parens-as-block perl-indent-level perl-continu
  #f(compiled-function () #<bytecode 0x1fe51f30ad42b54d>)()
  handler-bind-1(#f(compiled-function () #<bytecode 0x1fe51f30ad42b54d
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name test-indentation :documentation nil :
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/progmodes/cperl-mode
  command-line()
  normal-top-level()
Test test-indentation condition:
    (ert-test-failed
     ("Mismatch in test \"cperl-indent1\", file /home/jm/src/emacs/test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts"
      "{\n    print \"\",\n\11\"\",\n\11foo::bar(),\n\11\"\";\n}\n"
      "{\n    print \"\",\n      \"\",\n      foo::bar(),\n      \"\";\n}\n"))
   FAILED  57/57  test-indentation (0.001704 sec) at lisp/progmodes/cperl-mode-tests.el:1436

Ran 57 tests, 55 results as expected, 2 unexpected (2024-01-09 10:00:57-0600, 1.338509 sec)

2 unexpected results:
   FAILED  cperl-test-indent-exp
   FAILED  test-indentation


^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style'
  2024-01-09 16:06           ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-09 18:23             ` Harald Jörg
  0 siblings, 0 replies; 12+ messages in thread
From: Harald Jörg @ 2024-01-09 18:23 UTC (permalink / raw)
  To: john muhl; +Cc: Eli Zaretskii, larsi, 17948, stefankangas

john muhl <jm@pub.pink> writes:

> Harald Jörg <haj@posteo.de> writes:
> 
>> Eli Zaretskii writes:
>>
>>>> Cc: Lars Ingebrigtsen <larsi@gnus.org>, Stefan Kangas <stefankangas@gmail.com>
>>>> From: Harald Jörg <haj@posteo.de>
>>>> Date: Mon, 08 Jan 2024 08:23:35 +0000
>>>> [...]
>>>> I suggest this patch should go to the emacs-29 branch.
>>>
>>> Sorry, no new commands/features on the release branch at this time.
>>> This should go to master.
>>>
>>> Thanks.
>>
>> Thanks for reviewing!
>>
>> I understand - and have now pushed the patch to master.
>
> This commit causes a couple of cperl-mode indent tests to start
> failing. Attached is the log from running:
>
>   make -k -C test check-lisp-progmodes

Indeed: I forgot to push the tests.  They need to use the new command to
make sure that settings don't bleed out into the following tests.

My bad.  I should have double-checked that.
Pushed now.
-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#17948: Emacs bug control: close 17948
  2014-07-05 20:10 bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' Samuel Bronson
  2022-05-11 14:29 ` Lars Ingebrigtsen
  2024-01-03 19:02 ` Harald Jörg
@ 2024-03-08  8:13 ` Harald Jörg
  2 siblings, 0 replies; 12+ messages in thread
From: Harald Jörg @ 2024-03-08  8:13 UTC (permalink / raw)
  To: 17948

close 17948
thanks

After I've done my homework, I guess we can now close this bug (again).

-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-08  8:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-05 20:10 bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' Samuel Bronson
2022-05-11 14:29 ` Lars Ingebrigtsen
2024-01-02 17:33   ` Stefan Kangas
2024-01-03 19:02 ` Harald Jörg
2024-01-05 20:18   ` Stefan Kangas
2024-01-08  8:23     ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' [PATCH] Harald Jörg
2024-01-08 12:51       ` Eli Zaretskii
2024-01-08 15:26         ` Harald Jörg
2024-01-08 19:27           ` Stefan Kangas
2024-01-09 16:06           ` bug#17948: 24.3; cperl: Needs an equivalent to `c-file-style' john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 18:23             ` Harald Jörg
2024-03-08  8:13 ` bug#17948: Emacs bug control: close 17948 Harald Jörg

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.