Skip to content

Instantly share code, notes, and snippets.

@takaxp
Created January 17, 2012 13:22
Show Gist options
  • Save takaxp/1626603 to your computer and use it in GitHub Desktop.
Save takaxp/1626603 to your computer and use it in GitHub Desktop.
Abbreviation of the word "Narrow" in mode line
(defvar my-narrow-display " N")
(setq mode-line-modes
(mapcar (lambda (entry)
(if (and (stringp entry)
(string= entry "%n"))
'(:eval (if (and (= 1 (point-min))
(= (1+ (buffer-size)) (point-max))) ""
my-narrow-display)) entry))
mode-line-modes))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment