unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

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).