;;
;; Author: Phil S.
;; URL: http://www.emacswiki.org/emacs/DelightedModes
-;; Version: 1.03
+;; Keywords: convenience
+;; Created: 25 Jun 2013
+;; Version: 1.04
+
+;; This file is not part of GNU Emacs.
+
+;; This file is free software: you can redistribute it and/or modify it under
+;; the terms of the GNU General Public License as published by the Free Software
+;; Foundation, either version 3 of the License, or (at your option) any later
+;; version. See <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Changelog:
;;
+;; 1.04 (2016-02-28) Respect `inhibit-mode-name-delight' when already set.
;; 1.03 (2014-05-30) Added support for `mode-line-mode-menu'.
;; 1.02 (2014-05-04) Bug fix for missing 'cl requirement for
;; destructuring-bind macro.
,mode-name ;; glum
,(cadr major-delight)))))) ;; delighted
+(defvar inhibit-mode-name-delight)
+
(defadvice format-mode-line (around delighted-modes-are-glum activate)
"Delighted modes should exhibit their original `mode-name' when
`format-mode-line' is called. See `delight-major-mode'."
- (let ((inhibit-mode-name-delight t))
+ (let ((inhibit-mode-name-delight (if (boundp 'inhibit-mode-name-delight)
+ inhibit-mode-name-delight
+ t)))
ad-do-it))
(provide 'delight)