help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Narrowing: highlighting "Narrow" lighter?


From: Christopher Schmidt
Subject: Re: Narrowing: highlighting "Narrow" lighter?
Date: Sat, 4 Aug 2012 12:29:17 +0100 (BST)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]