Mercurial > emacs
changeset 87567:4c3c683cdff8
* erc-ibuffer.el (erc-channel-modes):
* 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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 04 Jan 2008 06:29:12 +0000 |
parents | 0c4a74c24677 |
children | a7f6615bcf7f |
files | lisp/ChangeLog lisp/bs.el lisp/calc/calc-embed.el lisp/emacs-lisp/helper.el lisp/erc/ChangeLog lisp/erc/erc-ibuffer.el lisp/imenu.el lisp/mail/emacsbug.el lisp/makesum.el lisp/mouse.el lisp/msb.el lisp/progmodes/hideshow.el lisp/textmodes/sgml-mode.el lisp/textmodes/table.el |
diffstat | 14 files changed, 63 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/ChangeLog Fri Jan 04 06:29:12 2008 +0000 @@ -1,3 +1,18 @@ +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):
--- a/lisp/bs.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/bs.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ (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 @@ "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 @@ ;; Now provide feature bs (provide 'bs) -;;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802 +;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802 ;;; bs.el ends here
--- a/lisp/calc/calc-embed.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/calc/calc-embed.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ (provide 'calc-embed) -;;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc +;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc ;;; calc-embed.el ends here
--- a/lisp/emacs-lisp/helper.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/emacs-lisp/helper.el Fri Jan 04 06:29:12 2008 +0000 @@ -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
--- a/lisp/erc/ChangeLog Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/erc/ChangeLog Fri Jan 04 06:29:12 2008 +0000 @@ -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.
--- a/lisp/erc/erc-ibuffer.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/erc/erc-ibuffer.el Fri Jan 04 06:29:12 2008 +0000 @@ -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")
--- a/lisp/imenu.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/imenu.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ `(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 ()
--- a/lisp/mail/emacsbug.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/mail/emacsbug.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ 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)
--- a/lisp/makesum.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/makesum.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ (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 @@ (provide 'makesum) -;;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3 +;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3 ;;; makesum.el ends here
--- a/lisp/mouse.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/mouse.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ ;; 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 @@ (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 @@ (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))))))))
--- a/lisp/msb.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/msb.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ (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)
--- a/lisp/progmodes/hideshow.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/progmodes/hideshow.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ 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 @@ (provide 'hideshow) -;;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e +;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e ;;; hideshow.el ends here
--- a/lisp/textmodes/sgml-mode.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/textmodes/sgml-mode.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ (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.
--- a/lisp/textmodes/table.el Fri Jan 04 06:18:31 2008 +0000 +++ b/lisp/textmodes/table.el Fri Jan 04 06:29:12 2008 +0000 @@ -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 @@ (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