emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116667: Try to document some smie changes


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116667: Try to document some smie changes
Date: Wed, 05 Mar 2014 07:41:58 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116667
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2014-03-04 23:41:48 -0800
message:
  Try to document some smie changes
  
  * doc/lispref/modes.texi (SMIE Customization): New section.
  
  * doc/lispref/elisp.texi (Top): Update detailed menu.
  
  * etc/NEWS: Related edits.
modified:
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/elisp.texi         elisp.texi-20091113204419-o5vbwnq5f7feedwu-6176
  doc/lispref/modes.texi         modes.texi-20091113204419-o5vbwnq5f7feedwu-6201
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-03-04 10:44:46 +0000
+++ b/doc/lispref/ChangeLog     2014-03-05 07:41:48 +0000
@@ -1,3 +1,8 @@
+2014-03-05  Glenn Morris  <address@hidden>
+
+       * modes.texi (SMIE Customization): New section.
+       * elisp.texi (Top): Update detailed menu.
+
 2014-03-04  Martin Rudalics  <address@hidden>
 
        * windows.texi (Windows and Frames): Add some missing &optional

=== modified file 'doc/lispref/elisp.texi'
--- a/doc/lispref/elisp.texi    2014-03-02 03:34:36 +0000
+++ b/doc/lispref/elisp.texi    2014-03-05 07:41:48 +0000
@@ -903,6 +903,7 @@
 * SMIE Indentation::        Specifying indentation rules.
 * SMIE Indentation Helpers:: Helper functions for indentation rules.
 * SMIE Indentation Example:: Sample indentation rules.
+* SMIE Customization::      Customizing indentation.
 
 Documentation
 

=== modified file 'doc/lispref/modes.texi'
--- a/doc/lispref/modes.texi    2014-02-27 14:09:26 +0000
+++ b/doc/lispref/modes.texi    2014-03-05 07:41:48 +0000
@@ -3383,6 +3383,7 @@
 * SMIE Indentation::            Specifying indentation rules.
 * SMIE Indentation Helpers::    Helper functions for indentation rules.
 * SMIE Indentation Example::    Sample indentation rules.
+* SMIE Customization::          Customizing indentation.
 @end menu
 
 @node SMIE setup
@@ -3961,6 +3962,52 @@
 first @code{"if"} of the sequence.
 @end itemize
 
address@hidden In some sense this belongs more in the Emacs manual.
address@hidden SMIE Customization
address@hidden Customizing Indentation
+
+If you are using a mode whose indentation is provided by SMIE, you can
+customize the indentation to suit your preferences.  You can do this
+on a per-mode basis (using the option @code{smie-config}), or a
+per-file basis (using the function @code{smie-config-local} in a
+file-local variable specification).
+
address@hidden smie-config
+This option lets you customize indentation on a per-mode basis.
+It is an alist with elements of the form @code{(@var{mode} . @var{rules})}.
+For the precise form of rules, see the variable's documentation; but
+you may find it easier to use the command @code{smie-config-guess}.
address@hidden defopt
+
address@hidden Command smie-config-guess
+This command tries to work out appropriate settings to produce
+your preferred style of indentation.  Simply call the command while
+visiting a file that is indented with your style.
address@hidden deffn
+
address@hidden Command smie-config-save
+Call this command after using @code{smie-config-guess}, to save your
+settings for future sessions.
address@hidden deffn
+
address@hidden Command smie-config-show-indent &optional move
+This command displays the rules that are used to indent the current
+line.
address@hidden deffn
+
address@hidden Command smie-config-set-indent
+This command adds a local rule to adjust the indentation of the current line.
address@hidden deffn
+
address@hidden smie-config-local rules
+This function adds @var{rules} as indentation rules for the current buffer.
+These add to any mode-specific rules defined by the @code{smie-config} option.
+To specify custom indentation rules for a specific file, add an entry
+to the file's local variables of the form:
address@hidden: (smie-config-local '(@var{rules}))}.
address@hidden defun
+
+
 @node Desktop Save Mode
 @section Desktop Save Mode
 @cindex desktop save mode

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2014-03-04 10:44:46 +0000
+++ b/etc/NEWS  2014-03-05 07:41:48 +0000
@@ -904,11 +904,17 @@
 
 ** SMIE
 
-*** You can customize the indentation of modes that use SMIE via `smie-config'.
++++
+*** You can customize the SMIE indentation of a mode via `smie-config'.
 The command `smie-config-guess' can help you derive the appropriate
 indentation settings, if you provide it with an indented sample file.
 Use `smie-config-save' to save the result.
 
++++
+*** You can customize the SMIE indentation of a file by adding an entry to
+the file's local variables of the form: `eval: (smie-config-local '(RULES)'.
+
++++
 *** New commands `smie-config-show-indent' and `smie-config-set-indent'.
 
 ---


reply via email to

[Prev in Thread] Current Thread [Next in Thread]