|
|
|
|
@ -1265,17 +1265,38 @@ may have changed." |
|
|
|
|
(defun outshine-hide-hidden-lines-cookies () |
|
|
|
|
"Delete all hidden-lines cookies and fold buffer." |
|
|
|
|
(interactive) |
|
|
|
|
(save-excursion |
|
|
|
|
(goto-char (point-min)) |
|
|
|
|
(unless (outline-on-heading-p) |
|
|
|
|
(outline-next-visible-heading)) |
|
|
|
|
(save-restriction |
|
|
|
|
(let* ((base-buf (point-marker)) |
|
|
|
|
(indirect-buf-name |
|
|
|
|
(generate-new-buffer-name |
|
|
|
|
(buffer-name (marker-buffer base-buf))))) |
|
|
|
|
(unless outshine-show-hidden-lines-cookies-p |
|
|
|
|
(setq outshine-show-hidden-lines-cookies-p 1)) |
|
|
|
|
(clone-indirect-buffer indirect-buf-name nil 'NORECORD) |
|
|
|
|
(save-excursion |
|
|
|
|
(switch-to-buffer indirect-buf-name) |
|
|
|
|
(show-all) |
|
|
|
|
(unless outshine-show-hidden-lines-cookies-p |
|
|
|
|
(setq outshine-show-hidden-lines-cookies-p 1)) |
|
|
|
|
(outshine-write-hidden-lines-cookies) |
|
|
|
|
(hide-other) |
|
|
|
|
(hide-subtree)))) |
|
|
|
|
(let ((indirect-buf (point-marker))) |
|
|
|
|
(outshine-write-hidden-lines-cookies) |
|
|
|
|
(switch-to-buffer (marker-buffer base-buf)) |
|
|
|
|
(kill-buffer (marker-buffer indirect-buf)) |
|
|
|
|
(set-marker indirect-buf nil)) |
|
|
|
|
(set-marker base-buf nil)))) |
|
|
|
|
|
|
|
|
|
;; (defun outshine-hide-hidden-lines-cookies () |
|
|
|
|
;; "Delete all hidden-lines cookies and fold buffer." |
|
|
|
|
;; (interactive) |
|
|
|
|
;; (save-excursion |
|
|
|
|
;; (goto-char (point-min)) |
|
|
|
|
;; (unless (outline-on-heading-p) |
|
|
|
|
;; (outline-next-visible-heading)) |
|
|
|
|
;; (save-restriction |
|
|
|
|
;; (show-all) |
|
|
|
|
;; (unless outshine-show-hidden-lines-cookies-p |
|
|
|
|
;; (setq outshine-show-hidden-lines-cookies-p 1)) |
|
|
|
|
;; (outshine-write-hidden-lines-cookies) |
|
|
|
|
;; (hide-other) |
|
|
|
|
;; (hide-subtree)))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun outshine-toggle-hidden-lines-cookies-activation () |
|
|
|
|
"Toggles activation of hidden-lines cookies." |
|
|
|
|
|