summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/bs.el12
-rw-r--r--lisp/calc/calc-embed.el6
-rw-r--r--lisp/emacs-lisp/helper.el9
-rw-r--r--lisp/erc/ChangeLog5
-rw-r--r--lisp/erc/erc-ibuffer.el6
-rw-r--r--lisp/imenu.el5
-rw-r--r--lisp/mail/emacsbug.el6
-rw-r--r--lisp/makesum.el6
-rw-r--r--lisp/mouse.el10
-rw-r--r--lisp/msb.el5
-rw-r--r--lisp/progmodes/hideshow.el7
-rw-r--r--lisp/textmodes/sgml-mode.el4
-rw-r--r--lisp/textmodes/table.el4
14 files changed, 63 insertions, 37 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a3a7aaa425b..99bc34cb2be 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,20 @@
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):
* progmodes/ada-mode.el (comment-region):
* calendar/todo-mode.el (todo-insert-item):
diff --git a/lisp/bs.el b/lisp/bs.el
index 4eef017129d..5c380c2e892 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1,7 +1,7 @@
;;; 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
@@ -369,9 +369,9 @@ A value of `always' means to show buffer regardless of the configuration.")
(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."
@@ -1331,7 +1331,7 @@ ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
"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.
@@ -1480,5 +1480,5 @@ name of buffer configuration."
;; Now provide feature bs
(provide 'bs)
-;;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802
+;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802
;;; bs.el ends here
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index ff2dc3e5d29..51cdd3f9174 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -1,7 +1,7 @@
;;; 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>
@@ -254,7 +254,7 @@
(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))
@@ -1374,5 +1374,5 @@ The command \\[yank] can retrieve it from there."
(provide 'calc-embed)
-;;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc
+;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc
;;; calc-embed.el ends here
diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el
index a5459a5db83..abcf6e89596 100644
--- a/lisp/emacs-lisp/helper.el
+++ b/lisp/emacs-lisp/helper.el
@@ -1,7 +1,7 @@
;;; 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
@@ -120,10 +120,9 @@
(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)
@@ -158,5 +157,5 @@
(provide 'helper)
-;;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9
+;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9
;;; helper.el ends here
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index cdb64e87d0d..30e5a644692 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
+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.
diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el
index 76c2d2b18b1..14ac36540a9 100644
--- a/lisp/erc/erc-ibuffer.el
+++ b/lisp/erc/erc-ibuffer.el
@@ -1,6 +1,6 @@
;;; 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
@@ -158,8 +158,8 @@
(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")
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 6c1de967e66..401fc3ea2d2 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -1,7 +1,7 @@
;;; 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>
@@ -954,7 +954,8 @@ See the command `imenu' for more information."
`(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 ()
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index eb96ef07612..0221eabf87f 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,7 +1,7 @@
;;; 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
@@ -168,7 +168,9 @@ usually do not have translators to read other languages for them.\n\n")
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)
diff --git a/lisp/makesum.el b/lisp/makesum.el
index d3eaa18008f..9427fb5b955 100644
--- a/lisp/makesum.el
+++ b/lisp/makesum.el
@@ -1,7 +1,7 @@
;;; 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
@@ -65,7 +65,7 @@ Previous contents of that buffer are killed first."
(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
@@ -114,5 +114,5 @@ Previous contents of that buffer are killed first."
(provide 'makesum)
-;;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3
+;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3
;;; makesum.el ends here
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8802aa98317..80f4999355f 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1,7 +1,7 @@
;;; 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
@@ -192,7 +192,8 @@ Default to the Edit menu if the major mode doesn't define a menu."
;; 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
@@ -272,7 +273,8 @@ not it is actually displayed."
(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
@@ -1861,7 +1863,7 @@ and selects that window."
(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))))))))
diff --git a/lisp/msb.el b/lisp/msb.el
index cc5a0adcded..a0312064f99 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -1,7 +1,7 @@
;;; 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
@@ -829,7 +829,8 @@ results in
(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)
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 85d26427a3f..5a784b159d3 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -1,7 +1,7 @@
;;; 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>
@@ -632,7 +632,8 @@ function; and adjust-block-beginning function."
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.
@@ -965,5 +966,5 @@ Key bindings:
(provide 'hideshow)
-;;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e
+;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e
;;; hideshow.el ends here
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 245ffc47908..0c361463022 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -1,7 +1,7 @@
;;; 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
@@ -397,7 +397,7 @@ a DOCTYPE or an XML declaration."
(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.
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 5e8b8c7cbc2..2aea24cede5 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -1,7 +1,7 @@
;;; 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>
@@ -4061,7 +4061,7 @@ converts a table into plain text without frames. It is a companion to
(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