From: JUAN-LEON Lahoz Garcia <juanleon1@gmail.com>
Subject: Minor enhancement to font-look keywords of perl-mode
Date: Tue, 22 Mar 2005 18:01:40 +0100 [thread overview]
Message-ID: <m38y4f7gy3.fsf@kaliban.madrid.ecid.cig.mot.com> (raw)
Hi.
When perl-mode decides to fontify variables and functions by looking
at the syntax prefix ($ or &) in a word, it does not take into account
that maybe the variable or function can be of an external module.
So in expresions "$Foo::bar" or "&Foo:bar" only "Foo" is
fontified. This looks ackward when editing code where such programming
practices are followed.
Following patch solves this, IMHO. Maybe someone in this list can
review and/or apply it.
Regards
juanleon
--- perl-mode.el.~1.52.~ Mon Feb 28 00:13:19 2005
+++ perl-mode.el Tue Mar 22 17:45:24 2005
@@ -207,10 +207,10 @@
'("\\<\\(local\\|my\\)\\>" . font-lock-type-face)
;;
;; Fontify function, variable and file name references.
- '("&\\(\\sw+\\)" 1 font-lock-function-name-face)
+ '("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face)
;; Additionally underline non-scalar variables. Maybe this is a bad idea.
;;'("[$@%*][#{]?\\(\\sw+\\)" 1 font-lock-variable-name-face)
- '("[$*]{?\\(\\sw+\\)" 1 font-lock-variable-name-face)
+ '("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face)
'("\\([@%]\\|\\$#\\)\\(\\sw+\\)"
(2 (cons font-lock-variable-name-face '(underline))))
'("<\\(\\sw+\\)>" 1 font-lock-constant-face)
next reply other threads:[~2005-03-22 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 17:01 JUAN-LEON Lahoz Garcia [this message]
2005-03-22 19:46 ` Minor enhancement to font-look keywords of perl-mode Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m38y4f7gy3.fsf@kaliban.madrid.ecid.cig.mot.com \
--to=juanleon1@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.