]> code.delx.au - gnu-emacs/blobdiff - lisp/org/org-ctags.el
Further doc fix for imagemagick-types-inhibit
[gnu-emacs] / lisp / org / org-ctags.el
index fc6b192e5660013060f2f5e2bf655c560897abd5..ea94d4199573c726b6ed660ee8572aaf017b0bb9 100644 (file)
@@ -1,12 +1,11 @@
 ;;; org-ctags.el - Integrate Emacs "tags" facility with org mode.
 ;;
-;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
 
 ;; Author: Paul Sexton <eeeickythump@gmail.com>
-;; Version: 7.01
+
 
 ;; Keywords: org, wp
-;; Version: 7.01
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -36,7 +35,7 @@
 ;; links to these 'tagged' destinations, allowing seamless navigation between
 ;; multiple org-mode files. Topics can be created in any org mode file and
 ;; will always be found by plain links from other files. Other file types
-;; recognised by ctags (source code files, latex files, etc) will also be
+;; recognized by ctags (source code files, latex files, etc) will also be
 ;; available as destinations for plain links, and similarly, org-mode links
 ;; will be available as tags from source files. Finally, the function
 ;; `org-ctags-find-tag-interactive' lets you choose any known tag, using
 
 (require 'org)
 
+(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
+
 (defgroup org-ctags nil
   "Options concerning use of ctags within org mode."
   :tag "Org-Ctags"
@@ -305,7 +306,7 @@ The new topic will be titled NAME (or TITLE if supplied)."
                            activate compile)
   "Before trying to find a tag, save our current position on org mark ring."
   (save-excursion
-    (if (and (org-mode-p) org-ctags-enabled-p)
+    (if (and (eq major-mode 'org-mode) org-ctags-enabled-p)
         (org-mark-ring-push))))
 
 
@@ -385,7 +386,7 @@ the new file."
     (cond
      ((get-buffer (concat name ".org"))
       ;; Buffer is already open
-      (switch-to-buffer (get-buffer (concat name ".org"))))
+      (org-pop-to-buffer-same-window (get-buffer (concat name ".org"))))
      ((file-exists-p filename)
       ;; File exists but is not open --> open it
       (message "Opening existing org file `%S'..."
@@ -537,5 +538,4 @@ a new topic."
 
 (provide 'org-ctags)
 
-;; arch-tag: 4b1ddd5a-8529-4b17-bcde-96a922d26343
 ;;; org-ctags.el ends here