]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.elm lisp/emacs-lisp/smie.el: Fix indent
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 May 2020 19:01:58 +0000 (15:01 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 29 May 2020 19:01:58 +0000 (15:01 -0400)
Use the new "space after paren" convention to get the desired indentation

lisp/emacs-lisp/package.el
lisp/emacs-lisp/smie.el

index 9a6d1d7319df59e68aaa1d137545cbbbd9fb6266..6298244c399422b3e2deb7b21342a2c5286bef3e 100644 (file)
@@ -690,9 +690,9 @@ updates `package-alist'."
       (progn (package-load-all-descriptors)
              package-alist)))
 
-(defun define-package (_name-string _version-string
-                                    &optional _docstring _requirements
-                                    &rest _extra-properties)
+(defun define-package ( _name-string _version-string
+                        &optional _docstring _requirements
+                        &rest _extra-properties)
   "Define a new package.
 NAME-STRING is the name of the package, as a string.
 VERSION-STRING is the version of the package, as a string.
@@ -1219,8 +1219,8 @@ The return result is a `package-desc'."
                              cipher-algorithm
                              digest-algorithm
                              compress-algorithm))
-(declare-function epg-verify-string "epg" (context signature
-                                                   &optional signed-text))
+(declare-function epg-verify-string "epg" ( context signature
+                                            &optional signed-text))
 (declare-function epg-context-result-for "epg" (context name))
 (declare-function epg-signature-status "epg" (signature) t)
 (declare-function epg-signature-to-string "epg" (signature))
index 60d8fa591e9edfc82ad3e61d9b84917c5f034c30..38a7b8b54c9bd02acb0c419495812f8277503f2a 100644 (file)
 ;;   error because the parser just automatically does something.  Better yet,
 ;;   we can afford to use a sloppy grammar.
 
+;; The benefits of this approach were presented in the following article,
+;; which includes a kind of tutorial to get started with SMIE:
+;;
+;;     SMIE: Weakness is Power!  Auto-indentation with incomplete information
+;;     Stefan Monnier, <Programming> Journal 2020, volumn 5, issue 1.
+;;     doi: 10.22152/programming-journal.org/2020/5/1
+
 ;; A good background to understand the development (especially the parts
 ;; building the 2D precedence tables and then computing the precedence levels
 ;; from it) can be found in pages 187-194 of "Parsing techniques" by Dick Grune
@@ -63,6 +70,7 @@
 ;; Since then, some of that code has been beaten into submission, but the
 ;; smie-indent-keyword is still pretty obscure.
 
+
 ;; Conflict resolution:
 ;;
 ;; - One source of conflicts is when you have:
@@ -1356,9 +1364,9 @@ Only meaningful when called from within `smie-rules-function'."
           (funcall smie-rules-function :elem 'basic))
       smie-indent-basic))
 
-(defun smie-indent--rule (method token
-                          ;; FIXME: Too many parameters.
-                          &optional after parent base-pos)
+(defun smie-indent--rule ( method token
+                           ;; FIXME: Too many parameters.
+                           &optional after parent base-pos)
   "Compute indentation column according to `smie-rules-function'.
 METHOD and TOKEN are passed to `smie-rules-function'.
 AFTER is the position after TOKEN, if known.