[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 245b5d6 046/110: avy.el: Fix compile warnings
From: |
Oleh Krehel |
Subject: |
[elpa] master 245b5d6 046/110: avy.el: Fix compile warnings |
Date: |
Sat, 11 May 2019 10:15:40 -0400 (EDT) |
branch: master
commit 245b5d62feb6f276971be53e63311de4a243bfbc
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy.el: Fix compile warnings
Re #214
---
avy.el | 69 ++++++++++++++++++++++++++++++++++--------------------------------
1 file changed, 36 insertions(+), 33 deletions(-)
diff --git a/avy.el b/avy.el
index 64353a6..16e4180 100644
--- a/avy.el
+++ b/avy.el
@@ -538,39 +538,6 @@ multiple DISPLAY-FN invokations."
(funcall avy-handler-function char))))
(cdar alist))))
-;; ** Org-mode
-
-(defun avy-org-refile-as-child ()
- "Refile current heading as first child of heading selected with `avy.'"
- ;; Inspired by `org-teleport':
http://kitchingroup.cheme.cmu.edu/blog/2016/03/18/Org-teleport-headlines/
- (interactive)
- (let ((rfloc (save-excursion
- (let* ((org-reverse-note-order t)
- (pos (avy-with avy-goto-line
- (avy--generic-jump (rx bol (1+ "*") (1+ space))
- nil avy-style)
- (point)))
- (filename (buffer-file-name (or (buffer-base-buffer
(current-buffer))
- (current-buffer)))))
- (list nil filename nil pos)))))
- ;; org-refile must be called outside of the excursion
- (org-refile nil nil rfloc)))
-
-(defun avy-org-goto-heading-timer (&optional arg)
- "Read one or many characters and jump to matching Org headings.
-The window scope is determined by `avy-all-windows' (ARG negates it)."
- (interactive "P")
- (let ((avy-all-windows (if arg
- (not avy-all-windows)
- avy-all-windows)))
- (avy-with avy-goto-char-timer
- (avy--process
- (avy--read-candidates
- (lambda (input)
- (format "^\\*+ .*\\(%s\\)" input)))
- (avy--style-fn avy-style))
- (org-back-to-heading))))
-
;;** Rest
(defun avy-window-list ()
"Return a list of windows depending on `avy-all-windows'."
@@ -1905,6 +1872,42 @@ The window scope is determined by `avy-all-windows' (ARG
negates it)."
(error
(set-mark-command 4)))))
+;; ** Org-mode
+(defvar org-reverse-note-order)
+(declare-function org-refile "org")
+(declare-function org-back-to-heading "org")
+
+(defun avy-org-refile-as-child ()
+ "Refile current heading as first child of heading selected with `avy.'"
+ ;; Inspired by `org-teleport':
http://kitchingroup.cheme.cmu.edu/blog/2016/03/18/Org-teleport-headlines/
+ (interactive)
+ (let ((rfloc (save-excursion
+ (let* ((org-reverse-note-order t)
+ (pos (avy-with avy-goto-line
+ (avy--generic-jump (rx bol (1+ "*") (1+ space))
+ nil avy-style)
+ (point)))
+ (filename (buffer-file-name (or (buffer-base-buffer
(current-buffer))
+ (current-buffer)))))
+ (list nil filename nil pos)))))
+ ;; org-refile must be called outside of the excursion
+ (org-refile nil nil rfloc)))
+
+(defun avy-org-goto-heading-timer (&optional arg)
+ "Read one or many characters and jump to matching Org headings.
+The window scope is determined by `avy-all-windows' (ARG negates it)."
+ (interactive "P")
+ (let ((avy-all-windows (if arg
+ (not avy-all-windows)
+ avy-all-windows)))
+ (avy-with avy-goto-char-timer
+ (avy--process
+ (avy--read-candidates
+ (lambda (input)
+ (format "^\\*+ .*\\(%s\\)" input)))
+ (avy--style-fn avy-style))
+ (org-back-to-heading))))
+
(provide 'avy)
;;; avy.el ends here
- [elpa] master 7f83bbc 059/110: avy.el (avy-action-ispell): Adjust for avy-goto-line, (continued)
- [elpa] master 7f83bbc 059/110: avy.el (avy-action-ispell): Adjust for avy-goto-line, Oleh Krehel, 2019/05/11
- [elpa] master a25b255 057/110: avy.el (avy-action-yank): Adjust for avy-goto-line, Oleh Krehel, 2019/05/11
- [elpa] master 631214d 060/110: Correct spelling mistake, Oleh Krehel, 2019/05/11
- [elpa] master ddf3c58 052/110: avy.el (avy-handler-default): Fix typo, Oleh Krehel, 2019/05/11
- [elpa] master a0ce6a7 050/110: Add avy-mouse-event-window and fix typo, Oleh Krehel, 2019/05/11
- [elpa] master 9489ca9 062/110: Add window selection via mouse button press and fix typo, Oleh Krehel, 2019/05/11
- [elpa] master 1b9f061 055/110: avy.el (avy-action-kill-stay): Adjust for avy-goto-line, Oleh Krehel, 2019/05/11
- [elpa] master dee0284 056/110: avy.el (avy-action-kill-move): Adjust for avy-goto-line, Oleh Krehel, 2019/05/11
- [elpa] master 56f6590 054/110: avy.el (avy-action-copy): Adjust for avy-goto-line, Oleh Krehel, 2019/05/11
- [elpa] master c08fc7c 049/110: Add option to match newline in avy-goto-char-timer, Oleh Krehel, 2019/05/11
- [elpa] master 245b5d6 046/110: avy.el: Fix compile warnings,
Oleh Krehel <=
- [elpa] master 0ed6408 043/110: avy.el: Fix checkdoc warnings, Oleh Krehel, 2019/05/11
- [elpa] master 36f768d 047/110: avy.el (avy-words): Specify custom type, Oleh Krehel, 2019/05/11
- [elpa] master 9103291 048/110: Update description to be easier to understand., Oleh Krehel, 2019/05/11
- [elpa] master f4c45d3 044/110: avy.el: Add org-mode commands for jumping to and refiling headings, Oleh Krehel, 2019/05/11
- [elpa] master 4af1993 053/110: avy.el (avy-read): Update avy-current-path before returning, Oleh Krehel, 2019/05/11
- [elpa] master 176f34f 051/110: avy.el (avy-handler-default): Error msg on mouse clicks, Oleh Krehel, 2019/05/11
- [elpa] master 8556274 045/110: avy.el (avy-org-goto-heading-timer): Simplify, Oleh Krehel, 2019/05/11
- [elpa] master 83859c3 040/110: avy.el: Add new avy-style to use words as sequences, Oleh Krehel, 2019/05/11
- [elpa] master 240d717 041/110: Makefile: Add target checkdoc to check documentation guidelines of lisp files, Oleh Krehel, 2019/05/11
- [elpa] master 3980c03 035/110: avy.el (avy-move-region): Insert in original window, Oleh Krehel, 2019/05/11