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

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

Re: Removing line and column number settings from some buffers


From: Jean Louis
Subject: Re: Removing line and column number settings from some buffers
Date: Fri, 4 Dec 2020 10:40:42 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* daniela-spit@gmx.it <daniela-spit@gmx.it> [2020-12-04 07:17]:
> Can somebody help me make a key binding that cycles
> through a function (appt-mode-line n) where 'n' can
> be 1, 2 or 3.

Step one:

(defvar my-mode-lines nil "To store mode lines here")

Step two, push various configurations there. Each time you modify
something, push it.

(push mode-line-format my-mode-lines)

You could then store the list my-mode-lines into file or into
buffer for later reuse. That could be easier than writing all
codes.

(defun my-next-mode-line (n)
  (setq mode-line-format (elt my-mode-lines n))
  (force-mode-line-update t))

Access with:

(my-next-mode-line 0)

It works on my side.



reply via email to

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