[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116651: Small smie.el doc and fix
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r116651: Small smie.el doc and fix |
Date: |
Tue, 04 Mar 2014 08:35:19 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116651
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2014-03-04 00:35:11 -0800
message:
Small smie.el doc and fix
* lisp/emacs-lisp/smie.el (smie-config-guess): Doc fix.
Explicit error if no grammar.
(smie-config-save): Doc fix. Fix quote typo.
* etc/NEWS: Related edit.
modified:
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/smie.el smie.el-20100517192034-xap3ihmey43772vj-1
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2014-03-03 01:41:28 +0000
+++ b/etc/NEWS 2014-03-04 08:35:11 +0000
@@ -896,9 +896,14 @@
---
*** `sh-mode' now has its own setting for `add-log-current-defun-function'.
-** SMIE indentation can be customized via `smie-config'.
-Emacs can learn the appropriate indentation settings if you provide it
-with an indented sample file.
+** SMIE
+
+*** You can customize the indentation of modes that use SMIE 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.
+
+*** New commands `smie-config-show-indent' and `smie-config-set-indent'.
---
** SQL mode
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-03-04 04:03:34 +0000
+++ b/lisp/ChangeLog 2014-03-04 08:35:11 +0000
@@ -1,3 +1,9 @@
+2014-03-04 Glenn Morris <address@hidden>
+
+ * emacs-lisp/smie.el (smie-config-guess): Doc fix.
+ Explicit error if no grammar.
+ (smie-config-save): Doc fix. Fix quote typo.
+
2014-03-04 Stefan Monnier <address@hidden>
* progmodes/cc-mode.el (c-initialize-cc-mode): Only hook into
=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el 2014-01-01 07:43:34 +0000
+++ b/lisp/emacs-lisp/smie.el 2014-03-04 08:35:11 +0000
@@ -2149,8 +2149,11 @@
rules))))
(defun smie-config-guess ()
- "Try and figure out this buffer's indentation settings."
+ "Try and figure out this buffer's indentation settings.
+To save the result for future sessions, use `smie-config-save'."
(interactive)
+ (if (eq smie-grammar 'unset)
+ (user-error "This buffer does not seem to be using SMIE"))
(let ((config (smie-config--guess (point-min) (point-max))))
(cond
((null config) (message "Nothing to change"))
@@ -2168,7 +2171,8 @@
(message "Rules guessed: %S" config)))))
(defun smie-config-save ()
- "Save local rules for use with this major mode."
+ "Save local rules for use with this major mode.
+One way to generate local rules is the command `smie-config-guess'."
(interactive)
(cond
((null smie-config--buffer-local)
@@ -2190,7 +2194,7 @@
(setcdr existing config)
(push (cons major-mode config) smie-config))
(setq smie-config--mode-local config)
- (kill-local-variable smie-config--buffer-local)
+ (kill-local-variable 'smie-config--buffer-local)
(customize-mark-as-set 'smie-config)))))
(provide 'smie)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116651: Small smie.el doc and fix,
Glenn Morris <=