From: Christopher Schmidt <christopher@ch.ristopher.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Narrowing: highlighting "Narrow" lighter?
Date: Sat, 4 Aug 2012 12:29:17 +0100 (BST) [thread overview]
Message-ID: <87sjc2c2ux@ch.ristopher.com> (raw)
In-Reply-To: <a84dblFmjrU1@mid.individual.net> (Raffaele Ricciardi's message of "Sat, 04 Aug 2012 12:55:20 +0100")
Raffaele Ricciardi <rfflrccrd@gmail.com> writes:
> I've thought about highlighting the "Narrow" lighter in the Mode Line, but as
> there is no Narrow mode and narrowing commands are defined in C source code, I
> can't find a way to do that without resorting to advices or writing a Narrow
> minor mode myself that manipulates the Mode Line.
(loop
for d in-ref mode-line-modes
until
(when (and (stringp d) (string= d "%n"))
(setf d '(:eval
(unless (and (eq (point-min) 1)
(eq (point-max) (1+ (buffer-size))))
(propertize
" Liebe"
'face '(:foreground "pink")
'help-echo "mouse-2: Weniger Liebe für diesen Buffer :x"
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map 'mouse-2
'mode-line-widen)))))))
Christopher
next prev parent reply other threads:[~2012-08-04 11:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-04 11:55 Narrowing: highlighting "Narrow" lighter? Raffaele Ricciardi
2012-08-04 11:29 ` Christopher Schmidt [this message]
[not found] ` <mailman.6302.1344079764.855.help-gnu-emacs@gnu.org>
2012-08-04 13:00 ` Raffaele Ricciardi
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=87sjc2c2ux@ch.ristopher.com \
--to=christopher@ch.ristopher.com \
--cc=help-gnu-emacs@gnu.org \
/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.