From a6114f89bf0d2fa1c77f81b8b2f52d62c6ff2a60 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 26 Apr 2026 18:36:24 +0200 Subject: [PATCH] update bicycle --- elpa/bicycle-20260101.1825/README-elpa | 27 +++ .../bicycle-autoloads.el | 8 +- .../bicycle-pkg.el | 6 +- .../bicycle.el | 193 +++++++++--------- 4 files changed, 131 insertions(+), 103 deletions(-) create mode 100644 elpa/bicycle-20260101.1825/README-elpa rename elpa/{bicycle-20251212.2319 => bicycle-20260101.1825}/bicycle-autoloads.el (91%) rename elpa/{bicycle-20251212.2319 => bicycle-20260101.1825}/bicycle-pkg.el (74%) rename elpa/{bicycle-20251212.2319 => bicycle-20260101.1825}/bicycle.el (72%) diff --git a/elpa/bicycle-20260101.1825/README-elpa b/elpa/bicycle-20260101.1825/README-elpa new file mode 100644 index 00000000..f505be9e --- /dev/null +++ b/elpa/bicycle-20260101.1825/README-elpa @@ -0,0 +1,27 @@ +This package provides commands for cycling the visibility of +outline sections and code blocks. These commands are intended to +be bound in `outline-minor-mode-map' and do most of the work using +functions provided by the `outline' package. + +This package is named `bicycle' because it can additionally make +use of the `hideshow' package. + +If `hs-minor-mode' is enabled and point is at the start of a code +block, then `hs-toggle-hiding' is used instead of some `outline' +function. When you later cycle the visibility of a section that +contains code blocks (which is done using `outline' functions), +then code block that have been hidden using `hs-toggle-hiding', +are *not* extended. + +A reasonable configuration could be: + + (use-package bicycle + :after outline + :bind (:map outline-minor-mode-map + ([C-tab] . bicycle-cycle) + ([S-tab] . bicycle-cycle-global))) + + (use-package prog-mode + :config + (add-hook 'prog-mode-hook #'outline-minor-mode) + (add-hook 'prog-mode-hook #'hs-minor-mode)) diff --git a/elpa/bicycle-20251212.2319/bicycle-autoloads.el b/elpa/bicycle-20260101.1825/bicycle-autoloads.el similarity index 91% rename from elpa/bicycle-20251212.2319/bicycle-autoloads.el rename to elpa/bicycle-20260101.1825/bicycle-autoloads.el index 48ce6c72..e910145e 100644 --- a/elpa/bicycle-20251212.2319/bicycle-autoloads.el +++ b/elpa/bicycle-20260101.1825/bicycle-autoloads.el @@ -11,15 +11,15 @@ ;;; Generated autoloads from bicycle.el -(autoload 'bicycle-cycle "bicycle" "\ -Cycle local or global visibility. +(autoload 'bicycle-cycle "bicycle" +"Cycle local or global visibility. With a prefix argument call `bicycle-cycle-global'. Without a prefix argument call `bicycle-cycle-local'. (fn &optional GLOBAL)" t) -(autoload 'bicycle-cycle-global "bicycle" "\ -Cycle visibility of all sections. +(autoload 'bicycle-cycle-global "bicycle" +"Cycle visibility of all sections. 1. OVERVIEW: Show only top-level headings. diff --git a/elpa/bicycle-20251212.2319/bicycle-pkg.el b/elpa/bicycle-20260101.1825/bicycle-pkg.el similarity index 74% rename from elpa/bicycle-20251212.2319/bicycle-pkg.el rename to elpa/bicycle-20260101.1825/bicycle-pkg.el index d877438c..e5085f0c 100644 --- a/elpa/bicycle-20251212.2319/bicycle-pkg.el +++ b/elpa/bicycle-20260101.1825/bicycle-pkg.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "bicycle" "20251212.2319" +(define-package "bicycle" "20260101.1825" "Cycle outline and code visibility." '((emacs "28.1") (compat "30.1")) :url "https://github.com/tarsius/bicycle" - :commit "80643a60f8066cba20a51f419be0c168af7fcbd7" - :revdesc "80643a60f806" + :commit "9da65dcb0e8ea6a9fe2b02d3be3cd4f2f4e29977" + :revdesc "9da65dcb0e8e" :keywords '("outlines") :authors '(("Jonas Bernoulli" . "emacs.bicycle@jonas.bernoulli.dev")) :maintainers '(("Jonas Bernoulli" . "emacs.bicycle@jonas.bernoulli.dev"))) diff --git a/elpa/bicycle-20251212.2319/bicycle.el b/elpa/bicycle-20260101.1825/bicycle.el similarity index 72% rename from elpa/bicycle-20251212.2319/bicycle.el rename to elpa/bicycle-20260101.1825/bicycle.el index ed2213f1..e137a558 100644 --- a/elpa/bicycle-20251212.2319/bicycle.el +++ b/elpa/bicycle-20260101.1825/bicycle.el @@ -1,13 +1,13 @@ ;;; bicycle.el --- Cycle outline and code visibility -*- lexical-binding:t -*- -;; Copyright (C) 2018-2025 Jonas Bernoulli +;; Copyright (C) 2018-2026 Jonas Bernoulli ;; Author: Jonas Bernoulli ;; Homepage: https://github.com/tarsius/bicycle ;; Keywords: outlines -;; Package-Version: 20251212.2319 -;; Package-Revision: 80643a60f806 +;; Package-Version: 20260101.1825 +;; Package-Revision: 9da65dcb0e8e ;; Package-Requires: ( ;; (emacs "28.1") ;; (compat "30.1")) @@ -122,24 +122,24 @@ to the previous state, then immediately continue to the next state." (unless (re-search-forward outline-regexp nil t) (user-error "Found no heading")) (cond - ((bicycle--maybe-cycle 'outline-cycle-overview 'outline-cycle-toc - (lambda () (and (bicycle--top-level-p) (bicycle--non-code-children-p))) - (lambda () - (bicycle--show-children - (- outline-code-level (bicycle--top-level) 1) - t))) - (bicycle--message "TOC")) - ((bicycle--maybe-cycle 'outline-cycle-toc 'outline-cycle-trees - (lambda () (cdr (bicycle--child-types))) - #'outline-show-branches) - (bicycle--message "TREES")) - ((eq last-command 'outline-cycle-trees) - (outline-show-all) - (bicycle--message "ALL")) - (t - (outline-hide-sublevels (bicycle--level)) - (bicycle--message "OVERVIEW") - (setq this-command 'outline-cycle-overview))))) + ((bicycle--maybe-cycle 'outline-cycle-overview 'outline-cycle-toc + (lambda () (and (bicycle--top-level-p) (bicycle--non-code-children-p))) + (lambda () + (bicycle--show-children + (- outline-code-level (bicycle--top-level) 1) + t))) + (bicycle--message "TOC")) + ((bicycle--maybe-cycle 'outline-cycle-toc 'outline-cycle-trees + (lambda () (cdr (bicycle--child-types))) + #'outline-show-branches) + (bicycle--message "TREES")) + ((eq last-command 'outline-cycle-trees) + (outline-show-all) + (bicycle--message "ALL")) + (t + (outline-hide-sublevels (bicycle--level)) + (bicycle--message "OVERVIEW") + (setq this-command 'outline-cycle-overview))))) (defun bicycle-cycle-local () "Cycle visibility of the current section. @@ -185,74 +185,74 @@ only one state, EMPTY, and cycling does nothing." (setq deactivate-mark t) (skip-chars-forward "\s\t") (cond - ((and hs-minor-mode - (bicycle--code-level-p) - (static-if (fboundp 'hs-find-block-beg-fn--default) - (hs-find-block-beg-fn--default) - (or (hs-looking-at-block-start-p) - (hs-find-block-beginning)))) - (cond - ((outline-invisible-p eoh) - (outline-show-entry) - (hs-life-goes-on - (when (hs-already-hidden-p) - (save-excursion (hs-show-block))))) - (t - (hs-life-goes-on - (if (hs-already-hidden-p) - (progn - (save-excursion (hs-show-block)) - (outline-show-entry)) - (save-excursion (hs-hide-block)) - (outline-hide-entry)))))) - ((save-excursion - (beginning-of-line 1) - (not (outline-on-heading-p t))) - (outline-back-to-heading) - (when (bicycle--code-level-p) - (outline-up-heading 1))) - (t - (outline-back-to-heading) - (cond - ((bicycle--code-level-p) - (outline-toggle-children) - (bicycle--message "CODE")) - ((or (= eos eoh) - (= (1+ eoh) (point-max))) - (outline-show-entry) - (bicycle--message "EMPTY")) - ((null (bicycle--child-types)) - (cond ((outline-invisible-p eoh) - (outline-show-entry) - (bicycle--message "SHOW")) - (t - (outline-hide-entry) - (bicycle--message "HIDE")))) - ((and (>= eol eos) - (not (eq last-command 'outline-cycle-children))) - (bicycle--show-children) - (bicycle--message "CHILDREN") - (setq this-command 'outline-cycle-children)) - ((and (not (derived-mode-p 'outline-mode)) - (bicycle--maybe-cycle - 'outline-cycle-children 'outline-cycle-headings - #'bicycle--non-code-children-p - #'outline-show-children - eoh eos)) - (bicycle--message "HEADINGS")) - ((and (not (derived-mode-p 'outline-mode)) - (bicycle--maybe-cycle - 'outline-cycle-headings 'outline-cycle-branches - (lambda () (not (bicycle--code-level-p))) - #'outline-show-branches - eoh eos)) - (bicycle--message "BRANCHES")) - ((eq last-command 'outline-cycle-branches) - (outline-show-subtree) - (bicycle--message "SUBTREE")) - (t - (outline-hide-subtree) - (bicycle--message "FOLDED"))))))) + ((and hs-minor-mode + (bicycle--code-level-p) + (static-if (fboundp 'hs-find-block-beg-fn--default) + (hs-find-block-beg-fn--default) + (or (hs-looking-at-block-start-p) + (hs-find-block-beginning)))) + (cond + ((outline-invisible-p eoh) + (outline-show-entry) + (hs-life-goes-on + (when (hs-already-hidden-p) + (save-excursion (hs-show-block))))) + (t + (hs-life-goes-on + (if (hs-already-hidden-p) + (progn + (save-excursion (hs-show-block)) + (outline-show-entry)) + (save-excursion (hs-hide-block)) + (outline-hide-entry)))))) + ((save-excursion + (beginning-of-line 1) + (not (outline-on-heading-p t))) + (outline-back-to-heading) + (when (bicycle--code-level-p) + (outline-up-heading 1))) + (t + (outline-back-to-heading) + (cond + ((bicycle--code-level-p) + (outline-toggle-children) + (bicycle--message "CODE")) + ((or (= eos eoh) + (= (1+ eoh) (point-max))) + (outline-show-entry) + (bicycle--message "EMPTY")) + ((null (bicycle--child-types)) + (cond ((outline-invisible-p eoh) + (outline-show-entry) + (bicycle--message "SHOW")) + (t + (outline-hide-entry) + (bicycle--message "HIDE")))) + ((and (>= eol eos) + (not (eq last-command 'outline-cycle-children))) + (bicycle--show-children) + (bicycle--message "CHILDREN") + (setq this-command 'outline-cycle-children)) + ((and (not (derived-mode-p 'outline-mode)) + (bicycle--maybe-cycle + 'outline-cycle-children 'outline-cycle-headings + #'bicycle--non-code-children-p + #'outline-show-children + eoh eos)) + (bicycle--message "HEADINGS")) + ((and (not (derived-mode-p 'outline-mode)) + (bicycle--maybe-cycle + 'outline-cycle-headings 'outline-cycle-branches + (lambda () (not (bicycle--code-level-p))) + #'outline-show-branches + eoh eos)) + (bicycle--message "BRANCHES")) + ((eq last-command 'outline-cycle-branches) + (outline-show-subtree) + (bicycle--message "SUBTREE")) + (t + (outline-hide-subtree) + (bicycle--message "FOLDED"))))))) ;;; Utilities @@ -289,13 +289,13 @@ is not considered to be a sublevel." (outline-back-to-heading) (while (and (not level) (outline-next-heading)) (cond - ((eobp) - (setq level 1)) - ((bicycle--code-level-p) - (unless level - (setq eoc (1+ (point))))) - ((not (> (point) eos)) - (setq level (max 1 (- (funcall outline-level) start-level))))))) + ((eobp) + (setq level 1)) + ((bicycle--code-level-p) + (unless level + (setq eoc (1+ (point))))) + ((not (> (point) eos)) + (setq level (max 1 (- (funcall outline-level) start-level))))))) (outline-show-children (or level (max 1 (- outline-code-level start-level)))) (when (and eoc (not nocode)) @@ -393,5 +393,6 @@ headings and/or code blocks." (provide 'bicycle) ;; Local Variables: ;; indent-tabs-mode: nil +;; lisp-indent-local-overrides: ((cond . 0) (interactive . 0)) ;; End: ;;; bicycle.el ends here -- 2.47.3