org-ctags: Silence byte-compiler

* lisp/org-ctags.el (y-or-n-minibuffer): Remove function.
(org-ctags-find-tag):
(org-ctags-find-tag-interactive): Use `xref-find-definitions' instead of
`find-tag'.
This commit is contained in:
Nicolas Goaziou 2015-11-13 23:21:26 +01:00
parent 7f937b3cea
commit cfbd2b516b
2 changed files with 9 additions and 13 deletions

View File

@ -540,7 +540,7 @@ Implements `file-equal-p' for older emacsen and XEmacs."
(/= (- (point-max) (point-min)) (buffer-size))))
;; As of Emacs 25.1, `outline-mode` functions are under the 'outline-'
;; prefix.
;; prefix and `find-tag` is replaced with `xref-find-definition`.
(when (< emacs-major-version 25)
(defalias 'outline-show-all 'show-all)
(defalias 'outline-hide-subtree 'hide-subtree)
@ -548,7 +548,8 @@ Implements `file-equal-p' for older emacsen and XEmacs."
(defalias 'outline-show-branches 'show-branches)
(defalias 'outline-show-entry 'show-entry)
(defalias 'outline-hide-entry 'hide-entry)
(defalias 'outline-hide-sublevels 'hide-sublevels))
(defalias 'outline-hide-sublevels 'hide-sublevels)
(defalias 'xref-find-definitions 'find-tag))
(defmacro org-with-silent-modifications (&rest body)
(if (fboundp 'with-silent-modifications)

View File

@ -273,11 +273,6 @@ Return the list."
(replace-regexp-in-string (regexp-quote search) replace string t t))
(defun y-or-n-minibuffer (prompt)
(let ((use-dialog-box nil))
(y-or-n-p prompt)))
;;; Internal functions =======================================================
@ -302,12 +297,12 @@ The new topic will be titled NAME (or TITLE if supplied)."
;;;; Misc interoperability with etags system =================================
(defadvice find-tag (before org-ctags-set-org-mark-before-finding-tag
activate compile)
(defadvice xref-find-definitions
(before org-ctags-set-org-mark-before-finding-tag activate compile)
"Before trying to find a tag, save our current position on org mark ring."
(save-excursion
(if (and (derived-mode-p 'org-mode) org-ctags-enabled-p)
(org-mark-ring-push))))
(when (and (derived-mode-p 'org-mode) org-ctags-enabled-p)
(org-mark-ring-push))))
@ -359,7 +354,7 @@ visit the file and location where the tag is found."
(old-pnt (point-marker))
(old-mark (copy-marker (mark-marker))))
(condition-case nil
(progn (find-tag name)
(progn (xref-find-definitions name)
t)
(error
;; only restore old location if find-tag raises error
@ -528,7 +523,7 @@ a new topic."
((member tag org-ctags-tag-list)
;; Existing tag
(push tag org-ctags-find-tag-history)
(find-tag tag))
(xref-find-definitions tag))
(t
;; New tag
(run-hook-with-args-until-success