diff options
| author | BardofSprites <[email protected]> | 2024-09-29 20:58:00 -0400 |
|---|---|---|
| committer | BardofSprites <[email protected]> | 2024-09-29 20:58:00 -0400 |
| commit | f0fffcceb660b0fd006ca1291d1bd05670002dd7 (patch) | |
| tree | a5f5d8cc3dcbeb5613bfb98cad0a99e6f369c643 /bard-elisp/bard-search.el | |
| parent | 5f9df8b8c6790c98831f7dc6a262fda9f84aefa8 (diff) | |
remove unused library
Diffstat (limited to 'bard-elisp/bard-search.el')
| -rw-r--r-- | bard-elisp/bard-search.el | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/bard-elisp/bard-search.el b/bard-elisp/bard-search.el deleted file mode 100644 index 90bf55a..0000000 --- a/bard-elisp/bard-search.el +++ /dev/null @@ -1,50 +0,0 @@ -;; Code provided by Protesilaos Starvou's dotemacs configuration. - -;;;; Outline - -(defun prot-search--get-outline () - "Return alist of outline outline-regexp and positions." - (let* ((outline-regexp (format "^\\(?:%s\\)" (or (bound-and-true-p outline-regexp) "[*\^L]+"))) - (heading-alist (bound-and-true-p outline-heading-alist)) - (level-fun (or (bound-and-true-p outline-level) - (lambda () ;; as in the default from outline.el - (or (cdr (assoc (match-string 0) heading-alist)) - (- (match-end 0) (match-beginning 0)))))) - candidates) - (save-excursion - (goto-char (point-min)) - (while (if (bound-and-true-p outline-search-function) - (funcall outline-search-function) - (re-search-forward outline-regexp nil t)) - (push - (format "%-5s %s" - (line-number-at-pos (point)) - (buffer-substring-no-properties (line-beginning-position) (line-end-position))) - candidates) - (goto-char (1+ (line-end-position))))) - (if candidates - (nreverse candidates) - (user-error "No outline")))) - -(defun prot-search--outline-prompt () - "Prompt for outline among headings retrieved by `prot-search--get-outline'." - (completing-read - "Go to outline: " - (prot-common-completion-table-no-sort 'imenu (prot-search--get-outline)) - nil :require-match)) - -(defvar prot-search-outline-hook nil - "Normal hook to run at the end of `prot-search-outline'.") - -;;;###autoload -(defun prot-search-outline () - "Go to the line of the given outline using completion." - (interactive) - (when-let ((selection (prot-search--outline-prompt)) - (line (string-to-number (car (split-string selection "\t"))))) - (goto-line line) - (run-hooks 'prot-search-outline-hook))) - -;; (define-key global-map (kbd "M-s M-o") #'prot-search-outline) - -(provide 'bard-search) |
