From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: mode-line now has WAY fewer items on it! eg follow-mode
Date: Wed, 09 Oct 2013 21:55:06 +0200 [thread overview]
Message-ID: <87li226wy4.fsf@nl106-137-194.student.uu.se> (raw)
In-Reply-To: l337fu$5or$1@panix2.panix.com
dkcombs@panix.com (David Combs) writes:
> Even an abbreviation would be better than nothing:
> follow rather than follow-mode, say. Of foll.
I don't know exactly what you are after but I managed to
fix the mode-line issue in my early Emacs days with the
below material [1]. I you (or anyone else) know how to
improve it do tell.
Here is a dump [2] that shows that, at the surface at
least, it works. But I wonder if those functions get
called an unnecessary amount of times?
Yes, how *do* you setup the mode line, on a mode-basis,
the standard way?
[1]
;; mode line / mode bar color and face
(defun set-mode-bar-colors (f b)
(interactive "s Background (bar) color: \ns Foreground (face) color: ")
(set-face-attribute 'modeline nil
:reverse-video nil
:background f :foreground b) )
(set-mode-bar-colors "blue" "white")
;; minibuffer
(set-face-foreground 'minibuffer-prompt "green")
;; mode line: what to show
(defvar *show-mode-line-caption*)
(setq *show-mode-line-caption* nil)
(defvar *mode-line-caption*)
(defvar *show-mode-line-modified*)
(setq *show-mode-line-modified* t)
(defvar *show-default-directory*)
(setq *show-default-directory* t)
(defvar *show-mode-line-buffer-identification*)
(setq *show-mode-line-buffer-identification* t)
(defvar *show-mode-line-modes*)
(setq *show-mode-line-modes* nil)
(setq column-number-mode nil)
(setq line-number-mode nil)
(defun set-mode-line ()
(interactive)
(setq-default mode-line-format
`(" "
(*silly-projector* " ")
(*show-mode-line-modified* mode-line-modified)
(*show-mode-line-modified* " ")
(*show-mode-line-caption* *mode-line-caption*)
(*show-mode-line-caption* " ")
(*show-default-directory* default-directory)
(*show-mode-line-buffer-identification* mode-line-buffer-identification)
(*show-mode-line-buffer-identification* " ")
(line-number-mode "[%l] ")
(column-number-mode "{%c} ")
(*show-mode-line-modes* mode-line-modes) )))
(set-mode-line)
;; example for local mode
(defun set-buffer-menu-mode-line ()
"Mode line: Set the mode line for Buffer Menu mode."
(set-variable '*mode-line-caption* "" t)
(set-variable '*show-mode-line-caption* nil t)
(set-variable '*show-mode-line-modified* nil t)
(set-variable '*show-default-directory* nil t)
(set-variable '*show-mode-line-buffer-identification* t t)
(set-variable '*show-mode-line-modes* nil t)
(set-variable 'column-number-mode nil t)
(set-variable 'line-number-mode nil t) )
(add-hook 'buffer-menu-mode-hook 'set-buffer-menu-mode-line)
[2] http://user.it.uu.se/~embe8573/pics/usenet.png
--
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united: http://user.it.uu.se/~embe8573
prev parent reply other threads:[~2013-10-09 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-09 9:26 mode-line now has WAY fewer items on it! eg follow-mode David Combs
2013-10-09 16:28 ` jpkotta
2013-10-09 19:55 ` Emanuel Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87li226wy4.fsf@nl106-137-194.student.uu.se \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).