aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2020-05-29 15:01:58 -0400
committerStefan Monnier2020-05-29 15:01:58 -0400
commit187fe4310834af72ecfcc5068af464c2e5f14b9a (patch)
tree6de4aaed6b56dfeae59e508583569dc18d31256f
parentba292ea330b55b06f4742e4aae397ef64086d3dc (diff)
downloademacs-187fe4310834af72ecfcc5068af464c2e5f14b9a.tar.gz
emacs-187fe4310834af72ecfcc5068af464c2e5f14b9a.zip
* lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent
Use the new "space after paren" convention to get the desired indentation
-rw-r--r--lisp/emacs-lisp/package.el10
-rw-r--r--lisp/emacs-lisp/smie.el14
2 files changed, 16 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 9a6d1d7319d..6298244c399 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -690,9 +690,9 @@ updates `package-alist'."
690 (progn (package-load-all-descriptors) 690 (progn (package-load-all-descriptors)
691 package-alist))) 691 package-alist)))
692 692
693(defun define-package (_name-string _version-string 693(defun define-package ( _name-string _version-string
694 &optional _docstring _requirements 694 &optional _docstring _requirements
695 &rest _extra-properties) 695 &rest _extra-properties)
696 "Define a new package. 696 "Define a new package.
697NAME-STRING is the name of the package, as a string. 697NAME-STRING is the name of the package, as a string.
698VERSION-STRING is the version of the package, as a string. 698VERSION-STRING is the version of the package, as a string.
@@ -1219,8 +1219,8 @@ The return result is a `package-desc'."
1219 cipher-algorithm 1219 cipher-algorithm
1220 digest-algorithm 1220 digest-algorithm
1221 compress-algorithm)) 1221 compress-algorithm))
1222(declare-function epg-verify-string "epg" (context signature 1222(declare-function epg-verify-string "epg" ( context signature
1223 &optional signed-text)) 1223 &optional signed-text))
1224(declare-function epg-context-result-for "epg" (context name)) 1224(declare-function epg-context-result-for "epg" (context name))
1225(declare-function epg-signature-status "epg" (signature) t) 1225(declare-function epg-signature-status "epg" (signature) t)
1226(declare-function epg-signature-to-string "epg" (signature)) 1226(declare-function epg-signature-to-string "epg" (signature))
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 60d8fa591e9..38a7b8b54c9 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -52,6 +52,13 @@
52;; error because the parser just automatically does something. Better yet, 52;; error because the parser just automatically does something. Better yet,
53;; we can afford to use a sloppy grammar. 53;; we can afford to use a sloppy grammar.
54 54
55;; The benefits of this approach were presented in the following article,
56;; which includes a kind of tutorial to get started with SMIE:
57;;
58;; SMIE: Weakness is Power! Auto-indentation with incomplete information
59;; Stefan Monnier, <Programming> Journal 2020, volumn 5, issue 1.
60;; doi: 10.22152/programming-journal.org/2020/5/1
61
55;; A good background to understand the development (especially the parts 62;; A good background to understand the development (especially the parts
56;; building the 2D precedence tables and then computing the precedence levels 63;; building the 2D precedence tables and then computing the precedence levels
57;; from it) can be found in pages 187-194 of "Parsing techniques" by Dick Grune 64;; from it) can be found in pages 187-194 of "Parsing techniques" by Dick Grune
@@ -63,6 +70,7 @@
63;; Since then, some of that code has been beaten into submission, but the 70;; Since then, some of that code has been beaten into submission, but the
64;; smie-indent-keyword is still pretty obscure. 71;; smie-indent-keyword is still pretty obscure.
65 72
73
66;; Conflict resolution: 74;; Conflict resolution:
67;; 75;;
68;; - One source of conflicts is when you have: 76;; - One source of conflicts is when you have:
@@ -1356,9 +1364,9 @@ Only meaningful when called from within `smie-rules-function'."
1356 (funcall smie-rules-function :elem 'basic)) 1364 (funcall smie-rules-function :elem 'basic))
1357 smie-indent-basic)) 1365 smie-indent-basic))
1358 1366
1359(defun smie-indent--rule (method token 1367(defun smie-indent--rule ( method token
1360 ;; FIXME: Too many parameters. 1368 ;; FIXME: Too many parameters.
1361 &optional after parent base-pos) 1369 &optional after parent base-pos)
1362 "Compute indentation column according to `smie-rules-function'. 1370 "Compute indentation column according to `smie-rules-function'.
1363METHOD and TOKEN are passed to `smie-rules-function'. 1371METHOD and TOKEN are passed to `smie-rules-function'.
1364AFTER is the position after TOKEN, if known. 1372AFTER is the position after TOKEN, if known.