* abbrev table gets messed in cperl-mode repeatedly
@ 2010-05-22 0:48 Harry Putnam
0 siblings, 0 replies; only message in thread
From: Harry Putnam @ 2010-05-22 0:48 UTC (permalink / raw)
To: emacs-devel
GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.7)
of 2010-03-14 on reader
I'm guessing what I'm seeing with the abbrev table is not a real bug
since in the last several thousand posts there have been no messages
with that kind of subject. There have been a couple with subjects
including the string `abbrev' but not about what I'm about to try to
describe.
Before anyone tells me to submit a bug. Please understand that I am
simply not sharp enough to know if this is likely to be a real bug,
and not (more likely) some kind of self inflicted wound.
I have a fairly extensive set of abbrevs, especially for cperl-mode
I add and subtract fairly often. I've found in one particular area
shown here from the buffer shown with M-x edit-abbrevs.
What I see:
This is from cperl-mode table, and in this particular area I see a
recurring problem that renders one or more abbrevs useless.
This is a buffer where I've just edited pdbif Pressed C-c C-c to
enable the edit, then C-x b to return to working perl script.
[...]
"pbase" 4 "" hp-pbase
"pdb" 13 "" hp-pdb
"pdb1" 12 "" hp-pdb1
"pdbif 0 "" hp-pdbif
"pdie" 13 "" hp-pdie
[...]
Once back at my script.. I type `pdb1<spc>' and the correct abbrev is
inserted: `my $pdb = 1;'
Now press `pdbif<spc>' But nothing happens.
Ok, return to abbrevs table with M-x edit-abbrevs <ENTER>
This is what I see in that same area:
[...]
"pbase" 4 "" hp-pbase
"pdb" 13 "" hp-pdb
"pdb1" 13 "" hp-pdb1
"pdbif 0 " 0 pdie " 13 "
"pfor" 8 "" hp-pfor
[...]
What could be causing this? Where does this line come from?
"pdbif 0 " 0 pdie " 13 "
Its not always the same line, but it is always one from that bunch,
------- --------- ---=--- --------- --------
As you may have noticed all the abbrevs in question are calls to home
made functions... actually skeletons, so I wondered if it may be one
or more of them at fault. So, have included the set from that area:
(define-skeleton hp-pbase
"Insert `\$myscript setup;"
nil
"my $myscript;
($myscript = $0) =~ s/^.*\\///;\n")
(define-skeleton hp-pdb
"Insert a $pdb and print [...] for debuging"
nil
"$pdb and print \"hpdb "_"\\n\";")
(define-skeleton hp-pdb1
"Insert my $pdb = 1;\n for debuging"
nil
"my $pdb = 1;\n")
(define-skeleton hp-pdbif
"Insert if($pdb){blah"
nil
" if ( $pdb ) {
"_"
}")
(define-skeleton hp-pdie
"Insert an `or die' section"
nil
" or die \"Can't open <$"_">: $!\";")
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-22 0:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 0:48 abbrev table gets messed in cperl-mode repeatedly Harry Putnam
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).