unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Changes to mode-line-format for non-truncated buffer identification
@ 2024-07-23 19:09 Heime
  0 siblings, 0 replies; only message in thread
From: Heime @ 2024-07-23 19:09 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I want to change the modeline so that the buffer identification 
is not truncated.  Have copied the text properties from position 
0, and set 'local-map . Finally changing mode-line-format.

I am doing things correctly this way, or does the code require changes?

(defun vodil-buffer-name ()
  (format " %s " (buffer-name)))

(defun vodil-face ()
  (if (mode-line-window-selected-p)
        'vodil-active-facespk
    'vodil-inaktv-facespk))

(defface vodil-mouse-facespk
  `((t :background ,vodil-white
       :foreground ,vodil-orange-red)))

(defun vodil-bfgestion ()
  (format-mode-line mode-line-buffer-identification))

(defun vodil-properties ()
  (text-properties-at 0 (vodil-bfgestion)))

(defvar-local vodil-panel
  '(:eval
      (let ((propiets (vodil-properties)))
        (apply 'propertize
          (vodil-buffer-name)
          (append propiets
            (list 'face (vodil-face)
                  'mouse-face 'vodil-mouse-facespk
                  'local-map
                    (get-text-property 0 'local-map
                      (vodil-bfgestion))))))))

  (setq-default mode-line-format '( "%e" vodil-panel))



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-23 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-23 19:09 Changes to mode-line-format for non-truncated buffer identification Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).