From: Tim Vaughan Date: Sun, 28 Apr 2019 11:00:29 +0000 (+0200) Subject: Autoload main method. X-Git-Tag: v1.0.0~25 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=commitdiff_plain;h=12320978c9fab9ad8c46e3c92d39547c30ceef69 Autoload main method. --- 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)