diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-12-30 14:39:21 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-12-30 14:39:21 +0000 |
commit | 688d6135cbe7fb06b32aa5d562bcce4ff3d0dc77 (patch) | |
tree | 1b3652e29995520c1f98d514df3fa769124a0b51 /helm-utils.el | |
parent | 8be4fa3d95dddb096f05cf25fdeee780dd42e274 (diff) | |
parent | 5b2057c7755f6ea20e1ea011c6fb992d12650161 (diff) |
Merge tag 'v2.8.7'
Version 2.8.7
* New command to toggle helm buffer full-frame.
* Allow yanking marked and choosing separator from main action, the third action "append" have been removed.
* Possibility to create new kmacro from marked kmacros.
* Allow toggling mark on more than one candidate with numeric prefix args.
# gpg: Signature made Sat 23 Dec 2017 08:02:48 GMT
# gpg: using DSA key 28D17F5359F29997
# gpg: Can't check signature: No public key
Diffstat (limited to 'helm-utils.el')
-rw-r--r-- | helm-utils.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/helm-utils.el b/helm-utils.el index ea99cb91..5d202c85 100644 --- a/helm-utils.el +++ b/helm-utils.el @@ -404,12 +404,17 @@ Default is `helm-current-buffer'." (defun helm-goto-char (loc) "Go to char, revealing if necessary." + (require 'org) ; On some old Emacs versions org may not be loaded. (goto-char loc) - (when (or (eq major-mode 'org-mode) - (and (boundp 'outline-minor-mode) - outline-minor-mode)) - (require 'org) ; On some old Emacs versions org may not be loaded. - (org-reveal))) + (let ((fn (cond ((eq major-mode 'org-mode) #'org-reveal) + ((and (boundp 'outline-minor-mode) + outline-minor-mode) + #'outline-show-subtree)))) + ;; outline may fail in some conditions e.g. with markdown enabled + ;; (issue #1919). + (condition-case nil + (and fn (funcall fn)) + (error nil)))) (defun helm-goto-line (lineno &optional noanim) "Goto LINENO opening only outline headline if needed. |