|
|
|
|
@ -293,7 +293,7 @@ |
|
|
|
|
(defconst outshine-protected-variables |
|
|
|
|
'(outline-regexp outline-level outline-heading-end-regexp) |
|
|
|
|
"A list of variables to save when activating |
|
|
|
|
`outshine-minor-mode' and restore afterwards. |
|
|
|
|
`outshine-mode' and restore afterwards. |
|
|
|
|
|
|
|
|
|
Don't touch this: if a variable is missing from this list, report |
|
|
|
|
a bug or send a PR." ) |
|
|
|
|
@ -445,9 +445,9 @@ A comment subtree does not open during visibility cycling.") |
|
|
|
|
|
|
|
|
|
;;;; Vars |
|
|
|
|
|
|
|
|
|
(defvar outshine-minor-mode-map |
|
|
|
|
(defvar outshine-mode-map |
|
|
|
|
(make-sparse-keymap) |
|
|
|
|
"The keymap for `outshine-minor-mode'.") |
|
|
|
|
"The keymap for `outshine-mode'.") |
|
|
|
|
|
|
|
|
|
(defvar-local outshine-protected-variables-values nil |
|
|
|
|
"The values of variables defined by `outshine-protected-variables'.") |
|
|
|
|
@ -1378,7 +1378,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." |
|
|
|
|
(outshine-defkey map (vector 'remap old) new) |
|
|
|
|
(substitute-key-definition old new map global-map))))) |
|
|
|
|
|
|
|
|
|
(outshine-remap outshine-minor-mode-map |
|
|
|
|
(outshine-remap outshine-mode-map |
|
|
|
|
'self-insert-command 'outshine-self-insert-command) |
|
|
|
|
|
|
|
|
|
;;;;; Functions for hiding comment-subtrees |
|
|
|
|
@ -1556,12 +1556,12 @@ function was called upon." |
|
|
|
|
;;;;; Minor mode |
|
|
|
|
|
|
|
|
|
;;;###autoload |
|
|
|
|
(define-minor-mode outshine-minor-mode |
|
|
|
|
(define-minor-mode outshine-mode |
|
|
|
|
"Outshine brings the look&feel of Org-mode to the (GNU Emacs) |
|
|
|
|
world outside of the Org major-mode." |
|
|
|
|
:init-value nil |
|
|
|
|
:lighter "Outshine" |
|
|
|
|
(if outshine-minor-mode |
|
|
|
|
(if outshine-mode |
|
|
|
|
(outshine--minor-mode-activate) |
|
|
|
|
(outshine--minor-mode-deactivate)) |
|
|
|
|
(run-hooks 'outshine-hook)) |
|
|
|
|
@ -1570,7 +1570,7 @@ world outside of the Org major-mode." |
|
|
|
|
"Activate Outshine. |
|
|
|
|
|
|
|
|
|
Don't use this function, the public interface is |
|
|
|
|
`outshine-minor-mode'." |
|
|
|
|
`outshine-mode'." |
|
|
|
|
|
|
|
|
|
;; Ensure outline is on |
|
|
|
|
(unless outline-minor-mode |
|
|
|
|
@ -1585,7 +1585,7 @@ Don't use this function, the public interface is |
|
|
|
|
;; Advise org-store-log-note |
|
|
|
|
(defadvice org-store-log-note (around org-store-log-note-around activate) |
|
|
|
|
"Outcomment inserted log-note in Outshine buffers." |
|
|
|
|
(when outshine-minor-mode |
|
|
|
|
(when outshine-mode |
|
|
|
|
(let ((outshine-log-note-beg-marker |
|
|
|
|
;; stay before inserted text |
|
|
|
|
;; (copy-marker org-log-note-marker nil)) |
|
|
|
|
@ -1637,7 +1637,7 @@ Don't use this function, the public interface is |
|
|
|
|
"Deactivate Outshine. |
|
|
|
|
|
|
|
|
|
Don't use this function, the public interface is |
|
|
|
|
`outshine-minor-mode'." |
|
|
|
|
`outshine-mode'." |
|
|
|
|
;; Restore variables |
|
|
|
|
(cl-mapc 'set outshine-protected-variables outshine-protected-variables-values) |
|
|
|
|
|
|
|
|
|
@ -1646,17 +1646,17 @@ Don't use this function, the public interface is |
|
|
|
|
|
|
|
|
|
;;;###autoload |
|
|
|
|
(defun outshine-hook-function () |
|
|
|
|
"DEPRECATED, use `outshine-minor-mode'." |
|
|
|
|
(warn "`outshine-hook-function' has been deprecated, use `outshine-minor-mode'") |
|
|
|
|
(outshine-minor-mode 1)) |
|
|
|
|
"DEPRECATED, use `outshine-mode'." |
|
|
|
|
(warn "`outshine-hook-function' has been deprecated, use `outshine-mode'") |
|
|
|
|
(outshine-mode 1)) |
|
|
|
|
|
|
|
|
|
(defun outshine--outline-minor-mode-hook () |
|
|
|
|
"Deactivate `outshine-minor-mode' if `outshine-minor-mode' but not `outline-minor-mode'. |
|
|
|
|
"Deactivate `outshine-mode' if `outshine-mode' but not `outline-minor-mode'. |
|
|
|
|
|
|
|
|
|
This function will be hooked to `outline-minor-mode'." |
|
|
|
|
(when (and outshine-minor-mode |
|
|
|
|
(when (and outshine-mode |
|
|
|
|
(not outline-minor-mode)) |
|
|
|
|
(outshine-minor-mode 0))) |
|
|
|
|
(outshine-mode 0))) |
|
|
|
|
|
|
|
|
|
|