+2008-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * bs.el (bs--sort-by-mode, bs--get-mode-name):
+ * imenu.el (imenu-add-to-menubar):
+ * makesum.el (make-command-summary):
+ * mouse.el (mouse-major-mode-menu, mouse-popup-menubar, mouse-buffer-menu):
+ * msb.el (msb--mode-menu-cond):
+ * calc/calc-embed.el (calc-do-embedded):
+ * emacs-lisp/helper.el (Helper-describe-mode):
+ * mail/emacsbug.el (report-emacs-bug):
+ * progmodes/hideshow.el (hs-grok-mode-type):
+ * textmodes/sgml-mode.el (sgml-mode-facemenu-add-face-function):
+ * textmodes/table.el (*table--cell-describe-mode):
+ Pass mode-name through format-mode-line.
+
2008-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/ada-xref.el (ada-prj-find-prj-file):
;;; bs.el --- menu for selecting and displaying buffers
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Keywords: convenience
(defun bs--sort-by-mode (b1 b2)
"Compare buffers B1 and B2 by mode name."
- (save-excursion
- (string< (progn (set-buffer b1) (format "%s" mode-name))
- (progn (set-buffer b2) (format "%s" mode-name)))))
+ (save-current-buffer
+ (string< (progn (set-buffer b1) (format-mode-line mode-name nil nil b1))
+ (progn (set-buffer b2) (format-mode-line mode-name nil nil b2)))))
(defun bs--sort-by-size (b1 b2)
"Compare buffers B1 and B2 by buffer size."
"Return the name of mode of current buffer for Buffer Selection Menu.
START-BUFFER is the buffer where we started buffer selection.
ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
- mode-name)
+ (format-mode-line mode-name nil nil buffer))
(defun bs--get-file-name (start-buffer all-buffers)
"Return string for column 'File' in Buffer Selection Menu.
;; Now provide feature bs
(provide 'bs)
-;;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802
+;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802
;;; bs.el ends here
;;; calc-embed.el --- embed Calc in a buffer
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
(set-buffer-modified-p (buffer-modified-p))
(calc-embedded-restore-original-modes)
(or calc-embedded-quiet
- (message "Back to %s mode" mode-name))))
+ (message "Back to %s mode" (format-mode-line mode-name)))))
(t
(if (buffer-name (aref calc-embedded-info 0))
(provide 'calc-embed)
-;;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc
+;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc
;;; calc-embed.el ends here
;;; helper.el --- utility help package supporting help in electric modes
;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007 Free Software Foundation, Inc.
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: FSF
(defun Helper-describe-mode ()
"Describe the current mode."
(interactive)
- (let ((name mode-name)
+ (let ((name (format-mode-line mode-name))
(documentation (documentation major-mode)))
- (save-excursion
- (set-buffer (get-buffer-create "*Help*"))
+ (with-current-buffer (get-buffer-create "*Help*")
(setq buffer-read-only nil)
(erase-buffer)
(insert name " Mode\n" documentation)
(provide 'helper)
-;;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9
+;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9
;;; helper.el ends here
+2008-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * erc-ibuffer.el (erc-channel-modes):
+ Pass mode-name through format-mode-line
+
2007-12-09 Michael Olson <mwolson@gnu.org>
* erc-services.el (erc-nickserv-alist): Fix regexps for GRnet.
;;; erc-ibuffer.el --- ibuffer integration with ERC
-;; Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: comm
(format "l %d" erc-channel-user-limit)
"")
")")
- (if (not (eq major-mode 'erc-mode))
- mode-name
+ (if (not (derived-mode-p 'erc-mode))
+ (format-mode-line mode-name nil nil (current-buffer))
"")))
(define-ibuffer-column erc-nick (:name "Nick")
;;; imenu.el --- framework for mode-specific buffer indexes
;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se>
;; Lars Lindberg <lli@sypro.cap.se>
`(menu-item ,name ,(make-sparse-keymap "Imenu")))
(use-local-map newmap)
(add-hook 'menu-bar-update-hook 'imenu-update-menubar))
- (error "The mode `%s' does not support Imenu" mode-name)))
+ (error "The mode `%s' does not support Imenu"
+ (format-mode-line mode-name))))
;;;###autoload
(defun imenu-add-menubar-index ()
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: FSF
default-enable-multibyte-characters))
(insert "\n")
(insert (format "Major mode: %s\n"
- (buffer-local-value 'mode-name from-buffer)))
+ (format-mode-line
+ (buffer-local-value 'mode-name from-buffer)
+ nil nil from-buffer)))
(insert "\n")
(insert "Minor modes in effect:\n")
(dolist (mode minor-mode-list)
;;; makesum.el --- generate key binding summary for Emacs
;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007 Free Software Foundation, Inc.
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: help
(if (re-search-forward "^Local Bindings:" nil t)
(progn
(forward-char -1)
- (insert " for " cur-mode " Mode")
+ (insert " for " (format-mode-line cur-mode) " Mode")
(while (search-forward "??\n" nil t)
(delete-region (point)
(progn
(provide 'makesum)
-;;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3
+;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3
;;; makesum.el ends here
;;; mouse.el --- window system-independent mouse support
;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: hardware, mouse
;; Make a keymap in which our last command leads to a menu or
;; default to the edit menu.
(newmap (if ancestor
- (make-sparse-keymap (concat mode-name " Mode"))
+ (make-sparse-keymap (concat (format-mode-line mode-name)
+ " Mode"))
menu-bar-edit-menu)))
(if ancestor
;; Make our menu inherit from the desired keymap which we want
(or (null local-menu)
(stringp local-title-or-map)
(setq local-menu (cons 'keymap
- (cons (concat mode-name " Mode Menu")
+ (cons (concat (formal-mode-line mode-name)
+ " Mode Menu")
(cdr local-menu)))))
(or (stringp global-title-or-map)
(setq global-menu (cons 'keymap
(setq elt (list adjusted-major-mode
(if (stringp adjusted-major-mode)
adjusted-major-mode
- mode-name))
+ (format-mode-line mode-name nil nil buf)))
split-by-major-mode (cons elt split-by-major-mode)))
(or (memq buf (cdr (cdr elt)))
(setcdr (cdr elt) (cons buf (cdr (cdr elt))))))))
;;; msb.el --- customizable buffer-selection with multiple menus
;; Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
-;; 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Lars Lindberg <lars.lindberg@home.se>
;; Maintainer: FSF
(with-current-buffer buffer
(when (and (not (msb-invisible-buffer-p))
(not (assq major-mode mode-list)))
- (push (cons major-mode mode-name)
+ (push (cons major-mode
+ (format-mode-line mode-name nil nil buffer))
mode-list))))
mode-list)
(lambda (item1 item2)
;;; hideshow.el --- minor mode cmds to selectively display code/comment blocks
;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Thien-Thi Nguyen <ttn@gnu.org>
;; Dan Nicolaescu <dann@ics.uci.edu>
hs-forward-sexp-func (or (nth 4 lookup) 'forward-sexp)
hs-adjust-block-beginning (nth 5 lookup)))
(setq hs-minor-mode nil)
- (error "%s Mode doesn't support Hideshow Minor Mode" mode-name)))
+ (error "%s Mode doesn't support Hideshow Minor Mode"
+ (format-mode-line mode-name))))
(defun hs-find-block-beginning ()
"Reposition point at block-start.
(provide 'hideshow)
-;;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e
+;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e
;;; hideshow.el ends here
;;; sgml-mode.el --- SGML- and HTML-editing modes -*- coding: iso-2022-7bit -*-
;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: James Clark <jjc@jclark.com>
;; Maintainer: FSF
(setq face (funcall skeleton-transformation-function face))
(setq facemenu-end-add-face (concat "</" face ">"))
(concat "<" face ">"))
- (error "Face not configured for %s mode" mode-name)))
+ (error "Face not configured for %s mode" (format-mode-line mode-name))))
(defun sgml-fill-nobreak ()
;; Don't break between a tag name and its first argument.
;;; table.el --- create and edit WYSIWYG text based embedded tables
;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Keywords: wp, convenience
;; Author: Takaaki Ota <Takaaki.Ota@am.sony.com>
(call-interactively 'describe-mode)
(with-output-to-temp-buffer "*Help*"
(princ "Table mode: (in ")
- (princ mode-name)
+ (princ (format-mode-line mode-name nil nil (current-buffer)))
(princ " mode)
Table is not a mode technically. You can regard it as a pseudo mode