1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

* progmodes/ada-xref.el (ada-prj-find-prj-file):

* progmodes/ada-mode.el (comment-region):
* calendar/todo-mode.el (todo-insert-item):
* bookmark.el (bookmark-buffer-name): Test major-mode rather than mode-name.
This commit is contained in:
Stefan Monnier 2008-01-04 06:18:31 +00:00
parent a5832373fd
commit 3da360a745
7 changed files with 40 additions and 36 deletions

View File

@ -1,3 +1,10 @@
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):
* bookmark.el (bookmark-buffer-name): Test major-mode rather than mode-name.
2008-01-04 Richard Stallman <rms@gnu.org>
* emacs-lisp/bytecomp.el (byte-compile-from-buffer):

View File

@ -1,7 +1,7 @@
;;; bookmark.el --- set bookmarks, maybe annotate them, jump to them later
;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003,
;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Karl Fogel <kfogel@red-bean.com>
;; Maintainer: Karl Fogel <kfogel@red-bean.com>
@ -978,7 +978,7 @@ The directory part of the file name is not used."
In Info, return the current node."
(cond
;; Are we in Info?
((string-equal mode-name "Info") Info-current-node)
((derived-mode-p 'Info-mode) Info-current-node)
;; Or are we a file?
(buffer-file-name (file-name-nondirectory buffer-file-name))
;; Or are we a directory?
@ -2227,5 +2227,5 @@ This also runs `bookmark-exit-hook'."
(provide 'bookmark)
;;; arch-tag: 139f519a-dd0c-4b8d-8b5d-f9fcf53ca8f6
;; arch-tag: 139f519a-dd0c-4b8d-8b5d-f9fcf53ca8f6
;;; bookmark.el ends here

View File

@ -1,6 +1,6 @@
;;; todo-mode.el --- major mode for editing TODO list files
;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
;; Free Software Foundation, Inc.
;; Author: Oliver Seidel <os10000@seidel-space.de>
@ -592,7 +592,7 @@ With a prefix argument solicit the category, otherwise use the current
category."
(interactive "P")
(save-excursion
(if (not (string-equal mode-name "TODO")) (todo-show))
(if (not (derived-mode-p 'todo-mode)) (todo-show))
(let* ((new-item (concat todo-prefix " "
(read-from-minibuffer
"New TODO entry: "
@ -615,7 +615,7 @@ category."
"Insert new TODO list entry under the cursor."
(interactive "")
(save-excursion
(if (not (string-equal mode-name "TODO")) (todo-show))
(if (not (derived-mode-p 'todo-mode)) (todo-show))
(let* ((new-item (concat todo-prefix " "
(read-from-minibuffer
"New TODO entry: "
@ -959,5 +959,5 @@ Number of entries for each category is given by `todo-print-priorities'."
(provide 'todo-mode)
;;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
;;; todo-mode.el ends here

View File

@ -1,7 +1,7 @@
;;; ido.el --- interactively do things with buffers and files.
;; Copyright (C) 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: Kim F. Storm <storm@cua.dk>
;; Based on: iswitchb by Stephen Eglen <stephen@cns.ed.ac.uk>
@ -436,17 +436,16 @@ in merged file and directory lists."
:type '(repeat (choice regexp function))
:group 'ido)
;;; Examples for setting the value of ido-ignore-buffers
;(defun ido-ignore-c-mode (name)
; "Ignore all c mode buffers -- example function for ido."
; (save-excursion
; (set-buffer name)
; (string-match "^C$" mode-name)))
;
;(setq ido-ignore-buffers '("^ " ido-ignore-c-mode))
;; Examples for setting the value of ido-ignore-buffers
;;(defun ido-ignore-c-mode (name)
;; "Ignore all c mode buffers -- example function for ido."
;; (with-current-buffer name
;; (derived-mode-p 'c-mode)))
;;
;;(setq ido-ignore-buffers '("^ " ido-ignore-c-mode))
;;; Examples for setting the value of ido-ignore-files
;(setq ido-ignore-files '("^ " "\\.c$" "\\.h$"))
;; Examples for setting the value of ido-ignore-files
;;(setq ido-ignore-files '("^ " "\\.c\\'" "\\.h\\'"))
(defcustom ido-default-file-method 'raise-frame
"*How to visit a new file when using `ido-find-file'.
@ -4655,5 +4654,5 @@ DEF, if non-nil, is the default value."
(ido-read-internal 'list prompt hist def require-match initial-input)))
;;; arch-tag: b63a3500-1735-41bd-8a01-05373f0864da
;; arch-tag: b63a3500-1735-41bd-8a01-05373f0864da
;;; ido.el ends here

View File

@ -1,7 +1,7 @@
;;; iswitchb.el --- switch between buffers using substrings
;; Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
@ -311,15 +311,14 @@ window with completion alternatives, or `iswitchb-next-match' or
:type 'hook
:group 'iswitchb)
;;; Examples for setting the value of iswitchb-buffer-ignore
;(defun iswitchb-ignore-c-mode (name)
; "Ignore all c mode buffers -- example function for iswitchb."
; (save-excursion
; (set-buffer name)
; (string-match "^C$" mode-name)))
;; Examples for setting the value of iswitchb-buffer-ignore
;;(defun iswitchb-ignore-c-mode (name)
;; "Ignore all c mode buffers -- example function for iswitchb."
;; (with-current-buffer name
;; (derived-mode-p 'c-mode)))
;(setq iswitchb-buffer-ignore '("^ " iswitchb-ignore-c-mode))
;(setq iswitchb-buffer-ignore '("^ " "\\.c$" "\\.h$"))
;;(setq iswitchb-buffer-ignore '("^ " iswitchb-ignore-c-mode))
;;(setq iswitchb-buffer-ignore '("^ " "\\.c\\'" "\\.h\\'"))
(defcustom iswitchb-default-method 'always-frame
"*How to switch to new buffer when using `iswitchb-buffer'.

View File

@ -1,7 +1,7 @@
;;; ada-mode.el --- major-mode for editing Ada sources
;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Rolf Ebert <ebert@inf.enst.fr>
;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
@ -4811,10 +4811,9 @@ Moves to 'begin' if in a declarative part."
;; -------------------------------------------------------
(defadvice comment-region (before ada-uncomment-anywhere disable)
(if (and arg
(listp arg) ;; a prefix with \C-u is of the form '(4), whereas
(if (and (consp arg) ;; a prefix with \C-u is of the form '(4), whereas
;; \C-u 2 sets arg to '2' (fixed by S.Leake)
(string= mode-name "Ada"))
(derived-mode-p 'ada-mode))
(save-excursion
(let ((cs (concat "^[ \t]*" (regexp-quote comment-start))))
(goto-char beg)

View File

@ -1,7 +1,7 @@
;; ada-xref.el --- for lookup and completion in Ada mode
;; 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: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Rolf Ebert <ebert@inf.enst.fr>
@ -648,8 +648,8 @@ is non-nil, prompt the user to select one. If none are found, return
(let (selected)
(if (or (not (string= mode-name "Ada"))
(not (buffer-file-name)))
(if (not (and (derived-mode-p 'ada-mode)
buffer-file-name))
;; Not in an Ada buffer, or current buffer not associated
;; with a file (for instance an emerge buffer)
@ -2310,5 +2310,5 @@ For instance, it creates the gnat-specific menus, sets some hooks for
(provide 'ada-xref)
;;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e
;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e
;;; ada-xref.el ends here