From 12320978c9fab9ad8c46e3c92d39547c30ceef69 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Sun, 28 Apr 2019 13:00:29 +0200 Subject: [PATCH] Autoload main method. --- elopher.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/elopher.el b/elopher.el index 0dab9d3..7e45cab 100644 --- a/elopher.el +++ b/elopher.el @@ -166,18 +166,6 @@ content and cursor position fields of the node." "Set the cursor position cache of NODE to POS." (setcar (nthcdr 4 node) pos)) -(defun elopher-save-pos () - "Save the current position of point to the current node." - (when elopher-current-node - (elopher-set-node-pos elopher-current-node (point)))) - -(defun elopher-restore-pos () - "Restore the position of point to that cached in the current node." - (let ((pos (elopher-node-pos elopher-current-node))) - (if pos - (goto-char pos) - (goto-char (point-min))))) - ;; Node graph traversal (defvar elopher-current-node) @@ -202,6 +190,18 @@ content and cursor position fields of the node." (elopher-set-node-content elopher-current-node nil) (elopher-visit-node elopher-current-node)) +(defun elopher-save-pos () + "Save the current position of point to the current node." + (when elopher-current-node + (elopher-set-node-pos elopher-current-node (point)))) + +(defun elopher-restore-pos () + "Restore the position of point to that cached in the current node." + (let ((pos (elopher-node-pos elopher-current-node))) + (if pos + (goto-char pos) + (goto-char (point-min))))) + ;;; Buffer preparation ;; @@ -635,6 +635,7 @@ The result is stored as a string in the variable elopher-selector-string." ;;; Main start procedure ;; +;;;###autoload (defun elopher () "Start elopher with default landing page." (interactive) -- 2.20.1