|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
perl-quote.el v.1This is a bit of code I've been using to convert perl strings between
single quotes 'foo' and double quote "foo". I use it mostly to automatically flip the backslashing needed, so 'xx"yy' -> "xx\"yy" or vice versa. I've also found the gettext style __"" -> __('') good because adding parens manually is a bit tedious. The q{} and qq{} support may be a bit superfluous, and might be imperfect too. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBKKGmxLFMCIV9q3ToRAsO5AJ9RSelyGtKDK8PZ/oG1TNSQBk3KZgCfbT5R h6nonw/IgEzo3M/yKvVPTko= =rfTa -----END PGP SIGNATURE----- _______________________________________________ gnu-emacs-sources mailing list gnu-emacs-sources@... http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources |
|
|
|
|
|
Re: perl-quote.el v.1Ilya Zakharevich <nospam-abuse@...> writes:
> > I would find the opposite conversion more often useful... It's there too :). Incidentally even when there's no backslashing to de-mangle I quite like having the two quotes changed in one keystroke. >> Parens are added for __ and N__ because __'' doesn't work, a >> quote there is the old-style package name separator, it must be >> __(''). > > Do not know: would not SPACE (instead of parens) be a better alternative? Personal preference no doubt :). When I started it I think I found parens clearer, and I don't think I knew __ was prototyped. N__ might be prototyped only in the next upcoming Locale::TextDomain, which could be a compatibility consideration if still using an older one. _______________________________________________ gnu-emacs-sources mailing list gnu-emacs-sources@... http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources |
| Free embeddable forum powered by Nabble | Forum Help |