diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-06-20 15:04:33 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-06-20 15:04:33 +0200 |
commit | 7d3380612f20e78ac0914c57cab9d7c7da8ea285 (patch) | |
tree | b7d9b8f4f060ff96840705118a9fc9cf43268ebe | |
parent | b67a3ff715afaec2a73a05adab7ca82ff2da4353 (diff) | |
download | org-mode-7d3380612f20e78ac0914c57cab9d7c7da8ea285.tar.gz |
org-ctags: Use lexical binding
* lisp/org-ctags.el (org-ctags-open-file):
(org-ctags-fail-silently): Silence byte-compiler.
-rw-r--r-- | lisp/org-ctags.el | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el index 3fd4a48..5c7af45 100644 --- a/lisp/org-ctags.el +++ b/lisp/org-ctags.el @@ -1,4 +1,4 @@ -;;; org-ctags.el - Integrate Emacs "tags" facility with org mode. +;;; org-ctags.el - Integrate Emacs "tags" Facility with Org -*- lexical-binding: t; -*- ;; ;; Copyright (C) 2007-2016 Free Software Foundation, Inc. @@ -280,18 +280,17 @@ Return the list." "Visit or create a file called `NAME.org', and insert a new topic. The new topic will be titled NAME (or TITLE if supplied)." (interactive "sFile name: ") - (let ((filename (substitute-in-file-name (expand-file-name name)))) - (condition-case v - (progn - (org-open-file name t) - (message "Opened file OK") - (goto-char (point-max)) - (insert (org-ctags-string-search-and-replace - "%t" (capitalize (or title name)) - org-ctags-new-topic-template)) - (message "Inserted new file text OK") - (org-mode-restart)) - (error (error "Error %S in org-ctags-open-file" v))))) + (condition-case v + (progn + (org-open-file name t) + (message "Opened file OK") + (goto-char (point-max)) + (insert (org-ctags-string-search-and-replace + "%t" (capitalize (or title name)) + org-ctags-new-topic-template)) + (message "Inserted new file text OK") + (org-mode-restart)) + (error (error "Error %S in org-ctags-open-file" v)))) ;;;; Misc interoperability with etags system ================================= @@ -459,10 +458,10 @@ Wrapper for org-ctags-rebuild-tags-file-then-find-tag." nil)) -(defun org-ctags-fail-silently (name) +(defun org-ctags-fail-silently (_name) "This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS. -Put as the last function in the list if you want to prevent org's default -behavior of free text search." +Put as the last function in the list if you want to prevent Org's +default behavior of free text search." t) |