[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/macrostep 8b89694 012/110: Only enter macrostep-mode after
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/macrostep 8b89694 012/110: Only enter macrostep-mode after successful macro expansion |
Date: |
Sat, 7 Aug 2021 09:17:52 -0400 (EDT) |
branch: elpa/macrostep
commit 8b89694ec40f7eda984cbc4a05b841fb1feebd4b
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>
Only enter macrostep-mode after successful macro expansion
This prevents a confusing situation where an error occurs in macro
expansion, leaving the buffer read-only and in macrostep-mode.
Also use `inhibit-read-only' instead of let-binding
`buffer-read-only'.
---
README.org | 2 ++
macrostep.el | 9 ++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/README.org b/README.org
index 17416ea..ce34396 100644
--- a/README.org
+++ b/README.org
@@ -127,6 +127,8 @@
under Emacs 24.
** Changelog
+ - v0.4, 2013-04-07: only enter macrostep-mode on successful
+ macro-expansion
- v0.3, 2012-10-30: print dotted lists correctly. autoload
definitions.
diff --git a/macrostep.el b/macrostep.el
index 7aa2c5c..0bb4d1d 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -163,6 +163,8 @@
;;
;; 1.6 Changelog
;; ==============
+;; - v0.4, 2013-04-07: only enter macrostep-mode on successful
+;; macro-expansion
;; - v0.3, 2012-10-30: print dotted lists correctly. autoload
;; definitions.
;;
@@ -192,7 +194,7 @@
;;; Faces
(defgroup macrostep nil
"Interactive macro stepper for Emacs Lisp."
- :version 0.1
+ :version 0.4
:group 'lisp
:link '(emacs-commentary-link :tag "commentary" "macrostep.el")
:link '(emacs-library-link :tag "lisp file" "macrostep.el")
@@ -316,13 +318,14 @@ buffer and expand the next macro form found, if any."
(if (consp sexp)
(error "(%s ...) is not a macro form" (car sexp))
(error "Text at point is not a macro form.")))))
- (unless macrostep-mode (macrostep-mode t))
- (let* ((buffer-read-only nil)
+
+ (let* ((inhibit-read-only t)
(expansion (macrostep-expand-1 sexp))
(existing-ol (macrostep-overlay-at-point))
(macrostep-gensym-depth macrostep-gensym-depth)
(macrostep-gensyms-this-level nil)
text priority)
+ (unless macrostep-mode (macrostep-mode t))
(if existing-ol ; expanding an expansion
(setq text sexp
priority (1+ (overlay-get existing-ol 'priority))
- [nongnu] elpa/macrostep 0fd292c 006/110: Better README, (continued)
- [nongnu] elpa/macrostep 0fd292c 006/110: Better README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0db08ec 007/110: add Url: header for marmalade, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep aa4736c 067/110: Fix some silly errors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0b1c0fe 069/110: Add swank/gray:stream-read-char-no-hang implementation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 704f164 091/110: Merge branch 'generic', ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep bf87b7c 095/110: Whitespace cleanup, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep d1e954d 099/110: Attempt to shell out to "indent" in macrostep-c, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep b65cc96 102/110: Makefile tweaks, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 424e373 110/110: Merge pull request #16 from fice-t/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep c5d1c5b 009/110: Autoload macro definitions if needed., ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 8b89694 012/110: Only enter macrostep-mode after successful macro expansion,
ELPA Syncer <=
- [nongnu] elpa/macrostep b060e1a 014/110: Add visible highlight of expanded section, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 4b0d96f 013/110: Remove incorrect use of :version in defgroup, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0bcb143 019/110: Handle backquotes better, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 1c01145 039/110: Merge pull request #9 from xuchunyang/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep c20152b 011/110: Handle aliases by using `indirect-function' instead of `symbol-function', ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 99ac330 029/110: Make inner macrolet definitions correctly shadow outer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 0c8b64c 051/110: Position macrostep-slime-macro-form-p in the correct package, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep f34deb7 055/110: Specify text bounds when propertizing SLIME macros, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep b449cd0 059/110: Restore compiler-macro expansion under SLIME, ELPA Syncer, 2021/08/07
- [nongnu] elpa/macrostep 5e0c28f 068/110: Establish *macroexpand-printer-bindings* before pretty printing, ELPA Syncer, 2021/08/07