all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* backquote upon variable for :eval
@ 2024-07-28 20:10 Heime
  2024-07-28 20:24 ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2024-07-28 20:10 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I am using the backquote, but I get errors when using ,tknm

How can this be fixed ?  Perhaps I got to arrange the code in a different way ?


(defun vodil-ellipses (bfname wmax &optional actn)
  (if (equal actn 'concat)
      (concat (substring bfname 0 (- wmax 1)) "… ")
    (truncate-string-to-width bfname wmax nil nil "…")) )


(defun vodil-bfnap (wmax &optional actn)

  (setq-default mode-line-buffer-identification
    `(:eval
        (let* ( (bfnm (buffer-name (window-buffer)))
                (tknm (if (> (length bfnm) wmax)
                          (vodil-ellipses bfnm wmax actn)
                        bfnm)) )
          (propertized-buffer-identification (format " %s " ,tknm))))))




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-28 21:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-28 20:10 backquote upon variable for :eval Heime
2024-07-28 20:24 ` Manuel Giraud via Users list for the GNU Emacs text editor
2024-07-28 20:44   ` Heime
2024-07-28 21:04     ` Christopher Dimech

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.