]> code.delx.au - gnu-emacs-elpa/commitdiff
Merge commit '68160bad14b031b069f30f1bd494ba4f252321c1'
authorArtur Malabarba <bruce.connor.am@gmail.com>
Mon, 22 Feb 2016 16:14:50 +0000 (13:14 -0300)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Mon, 22 Feb 2016 16:14:50 +0000 (13:14 -0300)
1  2 
packages/sotlisp/sotlisp.el

index 09728cb11dc9b3ab27e317eae896f4352fb17e81,9aca06a9ce3e1870c60bb57b559235a1410439bc..a4cd9dca38dfa3efb80df60e67abd902ac4b24a0
@@@ -6,7 -6,7 +6,7 @@@
  ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
  ;; Keywords: convenience, lisp
  ;; Package-Requires: ((emacs "24.1"))
- ;; Version: 1.4.1
+ ;; Version: 1.5.1
  
  ;; This program is free software; you can redistribute it and/or modify
  ;; it under the terms of the GNU General Public License as published by
    "Non-nil if point is at the start of a sexp.
  Specially, avoids matching inside argument lists."
    (and (eq (char-before) ?\()
-        (not (sotlisp--looking-back "(\\(defun\\s-+.*\\|lambda\\s-+\\)("))
+        (not (sotlisp--looking-back "(\\(defun\\s-+.*\\|\\(lambda\\|dolist\\|dotimes\\)\\s-+\\)("))
+        (save-excursion
+          (forward-char -1)
+          (condition-case er
+              (progn
+                (backward-up-list)
+                (forward-sexp -1)
+                (not
+                 (looking-at-p (rx (* (or (syntax word) (syntax symbol) "-"))
+                                   "let" symbol-end))))
+            (error t)))
         (not (string-match (rx (syntax symbol)) (string last-command-event)))))
  
  (defun sotlisp--function-quote-p ()
@@@ -252,11 -262,13 +262,13 @@@ The space char is not included.  Any \"
      ("dfv" . "defvar $ t\n  \"\"")
      ("dk" . "define-key ")
      ("dl" . "dolist (it $)")
+     ("dt" . "dotimes (it $)")
      ("dmp" . "derived-mode-p '")
      ("dm" . "defmacro $ ()\n  \"\"\n  ")
      ("dr" . "delete-region ")
      ("dv" . "defvar $ t\n  \"\"")
      ("e" . "error \"$\"")
+     ("ef" . "executable-find ")
      ("efn" . "expand-file-name ")
      ("eol" . "end-of-line")
      ("f" . "format \"$\"")
      ("sf" . "search-forward $ nil 'noerror")
      ("sfr" . "search-forward-regexp $ nil 'noerror")
      ("sic" . "self-insert-command")
-     ("sl" . "string<")
+     ("sl" . "setq-local ")
      ("sm" . "string-match \"$\"")
      ("smd" . "save-match-data")
      ("sn" . "symbol-name ")
      ("sw" . "selected-window$")
      ("syp" . "symbolp ")
      ("tap" . "thing-at-point 'symbol")
+     ("tf" . "thread-first ")
+     ("tl" . "thread-last ")
      ("u" . "unless ")
      ("ul" . "up-list")
      ("up" . "unwind-protect\n(progn $)")
@@@ -531,7 -545,8 +545,7 @@@ removes hooks and abbrevs.
                         (looking-at-p "#'")))
        (thing-at-point 'symbol)
      (let ((fcap (function-called-at-point)))
 -      (if fcap
 -          (symbol-name fcap)
 +      (if fcap (symbol-name fcap)
          (thing-at-point 'symbol)))))
  
  (defun sotlisp-find-or-define-function (&optional prefix)