unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30393: 24.4; cperl-mode: indentation failure
@ 2018-02-08 15:25 paulusm
  2018-02-09  1:44 ` Noam Postavsky
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: paulusm @ 2018-02-08 15:25 UTC (permalink / raw)
  To: 30393

### How to foul up indentation in cperl-mode (cperl-indent-command)

# Here is some badly-indented Perl:

          my $sql = "insert into jobs (id, priority) values (1, 2);";
               my $sth = $dbh->prepare($sql) or die "bother";

# try indenting each line above (individually) by pressing TAB
# (cperl-indent-command).
#
# No problem - everything behaving normally.


# Now try this:

          my $sql = "insert into jobs
(id, priority)
values (1, 2);";
               my $sth = $dbh->prepare($sql) or die "bother";

# Note how "my $sth..." doesn't indent properly?  On my system, it
# stays where it is, where I expect it to re-indent to column 0.


# Now anything following refuses to indent:

          print "Help!";


# Comment out the second code block, and the "Help!" line indents
# properly again.

# It's worth noting at this point that the /contents/ of the string
# seem to trigger the issue.  If the "$sql = ..." lines were changed
# to:
#
# first case:
#   $sql = "select * from jobs;";
#
# second case:
#   $sql = "select *
#   from jobs;";
#
# The issue does not appear.



In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2017-09-12 on hullmann, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.10 (jessie)

--
Paul.





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

end of thread, other threads:[~2020-11-03 14:29 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08 15:25 bug#30393: 24.4; cperl-mode: indentation failure paulusm
2018-02-09  1:44 ` Noam Postavsky
     [not found] ` <mailman.8766.1518140709.27995.bug-gnu-emacs@gnu.org>
2018-02-09 17:50   ` Alan Mackenzie
2018-02-10  3:55     ` Noam Postavsky
2018-02-10  8:53     ` Dmitry Gutov
2018-02-10 11:26       ` Alan Mackenzie
2018-02-10 12:08         ` Eli Zaretskii
2018-02-11 12:49           ` Alan Mackenzie
2018-02-11 16:16             ` Eli Zaretskii
2018-02-14 21:00               ` Alan Mackenzie
2018-02-15 17:39                 ` Eli Zaretskii
2018-02-16 11:52                 ` Dmitry Gutov
2018-02-16 17:43                   ` Alan Mackenzie
2018-02-17  2:16                     ` Dmitry Gutov
2018-02-17 10:54                       ` Alan Mackenzie
2018-02-10 14:58         ` Stefan Monnier
2018-02-11 10:36           ` Alan Mackenzie
2018-02-11 22:53             ` Stefan Monnier
2018-02-12 18:38               ` Alan Mackenzie
2018-02-12 20:45                 ` Stefan Monnier
2018-03-05  8:42                   ` Alan Mackenzie
2018-03-05 16:14                     ` Eli Zaretskii
2018-03-06 18:09                       ` Alan Mackenzie
2018-04-08 10:52                       ` Alan Mackenzie
2018-04-09 18:41                         ` Eli Zaretskii
2018-04-10 17:31                           ` Alan Mackenzie
2018-04-16 19:21                           ` bug#30393: 24.4; cperl-mode: indentation failure - Documentation enhancements Alan Mackenzie
2018-04-19  7:52                             ` Eli Zaretskii
2020-08-22 16:07                               ` Lars Ingebrigtsen
2020-11-03 13:45 ` bug#30393: [PATCH] Add a test to verify that the bug is gone (and a fix for Emacs 26) Harald Jörg
2020-11-03 14:29   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).