[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 8a3cab0 27/46: tiny.el: removed `tiny-replace-preceding-se
From: |
Oleh Krehel |
Subject: |
[elpa] master 8a3cab0 27/46: tiny.el: removed `tiny-replace-preceding-sexp' |
Date: |
Sun, 22 Mar 2015 17:42:33 +0000 |
branch: master
commit 8a3cab094fe19ea986bc0cb38201c0dc413201d1
Author: oleh <address@hidden>
Commit: oleh <address@hidden>
tiny.el: removed `tiny-replace-preceding-sexp'
---
tiny.el | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/tiny.el b/tiny.el
index a717e45..a5ef22b 100644
--- a/tiny.el
+++ b/tiny.el
@@ -114,16 +114,6 @@ At the moment, only `tiny-mapconcat' is supported.
(defun tiny-setup-default ()
(global-set-key (kbd "C-;") 'tiny-expand))
-(defun tiny-replace-preceding-sexp ()
- (unless (looking-back ")")
- (error "bad location"))
- (let ((sexp (preceding-sexp)))
- (if (eq (car sexp) 'lambda)
- (error "lambda evaluates to itself")
- (let ((value (eval sexp)))
- (kill-sexp -1)
- (insert (format "%s" value))))))
-
(defun tiny-replace-this-sexp ()
"Eval and replace the current sexp.
On error go up list and try again."
@@ -131,8 +121,15 @@ On error go up list and try again."
(catch 'success
(while t
(ignore-errors
- (tiny-replace-preceding-sexp)
- (throw 'success t))
+ (unless (looking-back ")")
+ (error "bad location"))
+ (let ((sexp (preceding-sexp)))
+ (if (eq (car sexp) 'lambda)
+ (error "lambda evaluates to itself")
+ (let ((value (eval sexp)))
+ (kill-sexp -1)
+ (insert (format "%s" value))
+ (throw 'success t)))))
;; if can't replace, go up list
(condition-case nil
(tiny-up-list)
- [elpa] master 78241c4 15/46: tiny.el: fixed a bug for expansion of m5%x., (continued)
- [elpa] master 78241c4 15/46: tiny.el: fixed a bug for expansion of m5%x., Oleh Krehel, 2015/03/22
- [elpa] master 29b5b76 16/46: Added README.md, Oleh Krehel, 2015/03/22
- [elpa] master b9c35e1 17/46: README.md: minor update., Oleh Krehel, 2015/03/22
- [elpa] master 97b9fdf 14/46: tiny.el: fixed up the previous change., Oleh Krehel, 2015/03/22
- [elpa] master 80e64b8 18/46: README.md: minor update., Oleh Krehel, 2015/03/22
- [elpa] master 2bd9abb 21/46: tiny.el: moved tests to tiny-test.el., Oleh Krehel, 2015/03/22
- [elpa] master b99315d 20/46: tiny.el: updated the doc., Oleh Krehel, 2015/03/22
- [elpa] master 11722a1 19/46: tiny.el: fixed typos., Oleh Krehel, 2015/03/22
- [elpa] master b4fff55 23/46: tiny.el: fixed `tiny-tokenize', Oleh Krehel, 2015/03/22
- [elpa] master 5df4f79 25/46: tiny.el: removed `tiny-beginning-of-string', Oleh Krehel, 2015/03/22
- [elpa] master 8a3cab0 27/46: tiny.el: removed `tiny-replace-preceding-sexp',
Oleh Krehel <=
- [elpa] master f1d1a2e 22/46: tiny-test.el: switched to ERT., Oleh Krehel, 2015/03/22
- [elpa] master 4c87ade 29/46: tiny.el: fixed a bug in `tiny-mapconcat-parse'., Oleh Krehel, 2015/03/22
- [elpa] master a6e4144 30/46: tiny.el (tiny-extract-sexps): can handle e.g. %0.1f(...) style formatting., Oleh Krehel, 2015/03/22
- [elpa] master 80cd28f 28/46: tiny-test.el: added a test for `tiny-replace-this-sexp', Oleh Krehel, 2015/03/22
- [elpa] master 08ba593 24/46: tiny.el: fixed `tiny-tokenize', Oleh Krehel, 2015/03/22
- [elpa] master e6abbc6 31/46: tiny.el (tiny-date): renamed from t-date. In format string it's just "date", Oleh Krehel, 2015/03/22
- [elpa] master c59bc94 36/46: tiny.el (tiny-extract-sexps): add missing let binding, Oleh Krehel, 2015/03/22
- [elpa] master cf74dd1 34/46: tiny.el: fix docs, Oleh Krehel, 2015/03/22
- [elpa] master b843226 26/46: tiny.el: removed `tiny-replace-sexp-desperately', Oleh Krehel, 2015/03/22
- [elpa] master 7893a02 35/46: tiny.el: add autoload to `tiny-expand', Oleh Krehel, 2015/03/22