org-tempo: Fix TAB behaviour

* lisp/org-tempo.el (org-tempo-complete-tag): Use a different trick to
  handle failed completions.

Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00164.html>
This commit is contained in:
Nicolas Goaziou 2018-02-27 02:02:56 +01:00
parent f521400a08
commit 2c93a0b2d7
1 changed files with 3 additions and 2 deletions

View File

@ -126,8 +126,9 @@ Goes through `org-structure-template-alist' and
Unlike to `tempo-complete-tag', do not give a signal if a partial
completion or no match at all is found. Return nil if expansion
didn't succeed."
(cl-letf (((symbol-function 'ding) #'ignore))
(tempo-complete-tag t)))
;; `tempo-complete-tag' returns its SILENT argument when there is no
;; completion available at all.
(not (eq 'fail (tempo-complete-tag 'fail))))
;;; Additional keywords