summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2016-12-17 15:26:15 +0100
committerJonas Bernoulli <jonas@bernoul.li>2016-12-17 15:26:15 +0100
commit134ecb3c883c51e19564813bf6227e3686c30ee3 (patch)
tree1298ab23f7d17381002ee99afe3cb2fc474b2975
parent42b7a774cf32827c9604e76d9b19e9016ee209c6 (diff)
downloademacs-134ecb3c88.tar.gz
Support outline-minor-mode
In "use-package.el" prefix headings with ";;;" instead of just ";;". In "bind-key.el" add the missing ";;; Code:" heading. In both libraries set `outline-regexp' to an appropriate value.
-rw-r--r--lisp/use-package/bind-key.el3
-rw-r--r--lisp/use-package/use-package.el52
2 files changed, 30 insertions, 25 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el
index 995e4816ff4..6564a263929 100644
--- a/lisp/use-package/bind-key.el
+++ b/lisp/use-package/bind-key.el
@@ -91,6 +91,8 @@
;; what the default was. Also, it will tell you if the key was rebound after
;; your binding it with `bind-key', and what it was rebound it to.
+;;; Code:
+
(require 'cl-lib)
(require 'easy-mmode)
@@ -407,6 +409,7 @@ function symbol (unquoted)."
(provide 'bind-key)
;; Local Variables:
+;; outline-regexp: ";;;\\(;* [^\s\t\n]\\|###autoload\\)\\|("
;; indent-tabs-mode: nil
;; End:
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el
index fb92010eaa5..62b87cbc667 100644
--- a/lisp/use-package/use-package.el
+++ b/lisp/use-package/use-package.el
@@ -194,7 +194,7 @@ Must be set before loading use-package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Utility functions
+;;; Utility functions
;;
(defun use-package-as-symbol (string-or-symbol)
@@ -351,12 +351,12 @@ This is in contrast to merely setting it to 0."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Keyword processing
+;;; Keyword processing
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; Normalization functions
+;;; Normalization functions
;;
(defun use-package-normalize-plist (name input)
@@ -414,7 +414,7 @@ next value for the STATE."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :pin
+;;; :pin
;;
(defun use-package-only-one (label args f)
@@ -484,7 +484,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :ensure
+;;; :ensure
;;
(defvar package-archive-contents)
(defun use-package-normalize/:ensure (name keyword args)
@@ -527,7 +527,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :if, :when and :unless
+;;; :if, :when and :unless
;;
(defsubst use-package-normalize-value (label arg)
@@ -558,7 +558,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :requires
+;;; :requires
;;
(defun use-package-as-one (label args f)
@@ -601,7 +601,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :load-path
+;;; :load-path
;;
(defun use-package-normalize-paths (label arg &optional recursed)
@@ -635,7 +635,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :no-require
+;;; :no-require
;;
(defun use-package-normalize-predicate (name keyword args)
@@ -652,7 +652,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :preface
+;;; :preface
;;
(defun use-package-normalize-form (label args)
@@ -679,7 +679,7 @@ manually updated package."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :bind, :bind*
+;;; :bind, :bind*
;;
(defsubst use-package-is-sympair (x &optional allow-vector)
@@ -748,7 +748,7 @@ may also be a string, as accepted by `define-key'."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :bind-keymap, :bind-keymap*
+;;; :bind-keymap, :bind-keymap*
;;
(defalias 'use-package-normalize/:bind-keymap 'use-package-normalize-binder)
@@ -805,7 +805,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :interpreter
+;;; :interpreter
;;
(defun use-package-normalize-mode (name keyword args)
@@ -828,7 +828,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :mode
+;;; :mode
;;
(defalias 'use-package-normalize/:mode 'use-package-normalize-mode)
@@ -847,7 +847,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :commands
+;;; :commands
;;
(defalias 'use-package-normalize/:commands 'use-package-normalize-symlist)
@@ -861,7 +861,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :defines
+;;; :defines
;;
(defalias 'use-package-normalize/:defines 'use-package-normalize-symlist)
@@ -872,7 +872,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :functions
+;;; :functions
;;
(defalias 'use-package-normalize/:functions 'use-package-normalize-symlist)
@@ -891,7 +891,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :defer
+;;; :defer
;;
(defalias 'use-package-normalize/:defer 'use-package-normalize-predicate)
@@ -925,7 +925,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :after
+;;; :after
;;
(defalias 'use-package-normalize/:after 'use-package-normalize-symlist)
@@ -951,7 +951,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :demand
+;;; :demand
;;
(defalias 'use-package-normalize/:demand 'use-package-normalize-predicate)
@@ -962,7 +962,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :init
+;;; :init
;;
(defalias 'use-package-normalize/:init 'use-package-normalize-forms)
@@ -982,7 +982,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :config
+;;; :config
;;
(defalias 'use-package-normalize/:config 'use-package-normalize-forms)
@@ -1017,7 +1017,8 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :diminish
+;;; :diminish
+;;
(defun use-package-normalize-diminish (name label arg &optional recursed)
"Normalize the arguments to diminish down to a list of one of two forms:
@@ -1055,7 +1056,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; :delight
+;;; :delight
;;
(defun use-package-normalize/:delight (name keyword args)
@@ -1081,7 +1082,7 @@ deferred until the prefix key sequence is pressed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; The main macro
+;;; The main macro
;;
;;;###autoload
@@ -1189,6 +1190,7 @@ this file. Usage:
(provide 'use-package)
;; Local Variables:
+;; outline-regexp: ";;;\\(;* [^\s\t\n]\\|###autoload\\)\\|("
;; indent-tabs-mode: nil
;; End: