Home > Archive > PERL Miscellaneous > June 2005 > (Ilya?) cperl-mode.el and strings like ||""$foo""|| *within a str
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
(Ilya?) cperl-mode.el and strings like ||""$foo""|| *within a str
|
|
| David Combs 2005-05-29, 3:58 am |
|
subject: (Ilya?) cperl-mode.el and strings like ||"\"$foo\""|| *within a string*?
The following lines, to me, seem absolutely identical.
But stick them into a file foo.pl, with cperl-mode, and I find
here on my computer that although when you put the cursor
on the right-paren just before the semicolon, it will
(a) (properly) turn both it and the matching left-paren green,
(b) except not on the sixth one (and beyond).
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
| print("\$aryOfAliasObjRefs[\$numAliases]->{name} is \"");
But what's different between the 5th and 6th line? I say nothing is
different between them.
Likewise, ediff-buffers agrees (when I take the two lines and put them
into two files, one line each).
I HAVE NO CLUE AS TO WHAT IS HAPPENING!
Does anyone?
Thanks!
David
PS: Anyone knonw how to find out what version of eg cperl-mode
a buffer is using? Or where the .el-file was actually found?
(No, I don't mean to just look at .../lisp/cperl-mode.el --
suppose you've also done a M-x load-file for one located in eg your
own directory -- and you aren't sure just where the one
actually being used came from, and want to find out precisely.)
| |
| Ilya Zakharevich 2005-05-31, 9:09 am |
| [A complimentary Cc of this posting was sent to
David Combs
<dkcombs@panix.com>], who wrote in article <d7bar7$kko$1@panix3.panix.com>:
>
> subject: (Ilya?) cperl-mode.el and strings like ||"\"$foo\""|| *within a string*?
>
>
>
> The following lines, to me, seem absolutely identical.
>
> But stick them into a file foo.pl, with cperl-mode, and I find
> here on my computer that although when you put the cursor
> on the right-paren just before the semicolon, it will
> (a) (properly) turn both it and the matching left-paren green,
> (b) except not on the sixth one (and beyond).
What happens if you explicitly do M-C-b? [I do not have auto-match
set on, so I can't check your symptoms; I do not see anything strange
here, with 21.2.1 and my CPerl.]
> PS: Anyone knonw how to find out what version of eg cperl-mode
> a buffer is using? Or where the .el-file was actually found?
Look in the CPerl menu (but I'm not sure that Emacs maintainers bother
to change it). locate-library.
The first thing to check is whether the errors persist with my version
of cperl-mode ($CPAN/emacs or some such).
Hope this helps,
Ilya
| |
| David Combs 2005-06-02, 3:57 pm |
| In article <d7hfdm$2fj3$1@agate.berkeley.edu>,
Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
>[A complimentary Cc of this posting was sent to
>David Combs
><dkcombs@panix.com>], who wrote in article <d7bar7$kko$1@panix3.panix.com>:
>
>What happens if you explicitly do M-C-b? [I do not have auto-match
>set on, so I can't check your symptoms; I do not see anything strange
>here, with 21.2.1 and my CPerl.]
>
>
>Look in the CPerl menu (but I'm not sure that Emacs maintainers bother
>to change it). locate-library.
>
>The first thing to check is whether the errors persist with my version
>of cperl-mode ($CPAN/emacs or some such).
>
>Hope this helps,
>Ilya
Well, that program-piece I posted was full of syntax (and semantic!) errors.
Anyway, I do tend to find that "\" within strings sometimes confuse
cperl-mode.
Ditto for within qq!...! strings.
But then sometimes it works fine!
Maybe totally *my* fault, or maybe some once-in-a-while glitches
in cperl-mode.
Here's something from my .emacs:
(if (y-or-n-p "Load in /dkcjunk/cperl-mode.el?")
(progn
(load-file "/dkcjunk/cperl-mode.el")
(setq have-returned-from-loading-file-dkcjunk--cperl-mode-el 1)))
I just checked (C-h v) on that "have-returned..." variable, shows "1").
Again, would be nice if your (well, all!) versions of cperl-mode had
a setq-variable that showed the version-number (and last-modified-date?)
for the version.
Nifty function you mentioned: locate-library.
Unfortunately, it's independent of how the various libraries
were *actually* loaded.
What would be nice would be a (optional?) feature that,
for *every* library loaded-in, would remember *the actual
command that read it in*. (And it'd have to be a list for
each one, since a *later* load-library (or whatever other
mechanism) *overrode* that prior one!)
---
<rant on need for macros>
For debugging something I'm writing (perl), I often have
lots of statements like:
print("value of \$myVar1 is \"$myVar1\".\n");
print("value of \$myVar2 is \"$myVar2\".\n");
print("value of \$myVar3 is \"$myVar1\".\n");
...
...
God!, if we had macros (built-into perl), doing that
would be *so* simple -- via eg showval($myVar1), etc,
with all the backslashes and quotes etc generated by
the MACRO!
Why the perl-honchos so *hate* macros is a real puzzle
to me!
Alas!
</rant on need for macros>
Thanks for the reply, Ilya!
David
| |
| Ilya Zakharevich 2005-06-03, 9:07 am |
| [A complimentary Cc of this posting was sent to
David Combs
<dkcombs@panix.com>], who wrote in article <d7ngll$i18$1@reader1.panix.com>:
> Anyway, I do tend to find that "\" within strings sometimes confuse
> cperl-mode.
Care for an example?
Yours,
Ilya
| |
| Radomir Hejl 2005-06-03, 9:07 am |
| > Again, would be nice if your (well, all!) versions of cperl-mode had
> a setq-variable that showed the version-number (and last-modified-date?)
> for the version.
Type C-h v cperl-mode, at least for my GNU emacs 21.3.1 on windows.
Or through menu Perl/Micro-docs/CPerl version.
Radek H.
| |
| David Combs 2005-06-10, 8:57 pm |
| In article <d7p72m$in6$1@ns.felk.cvut.cz>,
Radomir Hejl <rh62121@yahoo.com> wrote:
>
>Type C-h v cperl-mode, at least for my GNU emacs 21.3.1 on windows.
>Or through menu Perl/Micro-docs/CPerl version.
>
>Radek H.
>
>
Thanks!
I do that, and get these 4 possible completions (to cperl-mode-)
cperl-mode-{abbrev-table,map,hook,syntax-table} --
nothing for just plain cperl-mode.
For those four, C-h v finds nothing like a version-number -- just
that I can customize it, etc.
David
|
|
|
|
|