]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/ada-xref.el (ada-prj-find-prj-file):
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 4 Jan 2008 06:18:31 +0000 (06:18 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 4 Jan 2008 06:18:31 +0000 (06:18 +0000)
* 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.

lisp/ChangeLog
lisp/bookmark.el
lisp/calendar/todo-mode.el
lisp/ido.el
lisp/iswitchb.el
lisp/progmodes/ada-mode.el
lisp/progmodes/ada-xref.el

index 560fa9e4b77b1b12df006d084cc0c5648ab30250..a3a7aaa425b1a4618f3053c63465854b2c2f93c4 100644 (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):
index 49749f4e46565be459b87b8e244d1c93ca38da34..0968ff014113f0d1bc650f2e191fdb9ef808d6ea 100644 (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
index e3db7e46407a347953440f820ad9ca96a26df4ef..1727ed09d82289337c317d5e4aa35a947a0d99e1 100644 (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
index 4658a8877168a406864b0aea0474a792c08365c7..750eb6e6dfc50afa7fb38ff90ee0e65b169add65 100644 (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
index 792e610fa4a4d4a5a2785b3f2d0421a731cb0065..c259edcc9544d6f88354577140f255b2c73351bb 100644 (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'.
index 5910ebf3f28832bd699eda300dd94207d0a5216d..2c3acdda1766b65e87c499868875cfccc6063271 100644 (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)
index 00be89553a7e2f91caf8d6eaa69d9cd522c707d7..f9b5c026a4ec1a14c74ddefa4bc08b045404ee18 100644 (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