Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2016 06:50
Show Gist options
  • Save anonymous/6823754c6e2aaee423f4a789d5224031 to your computer and use it in GitHub Desktop.
Save anonymous/6823754c6e2aaee423f4a789d5224031 to your computer and use it in GitHub Desktop.
(require 'nadvice)
(defun pps-after (x)
(interactive)
(let ((lst `(:depth ,(nth 0 x)
:char-add-start-innermost ,(nth 1 x)
:char-add-start-last ,(nth 2 x)
:instring ,(nth 3 x)
:inside-comment ,(nth 4 x)
:quote-char ,(nth 5 x)
:min-paren-depth ,(nth 6 x)
:char-add-start-comment-or-string ,(nth 7 x)
:open-paren-pos ,(nth 8 x)
:last-pos ,(nth 9 x))))
(message (format "%s" lst)))
x)
;; (advice-remove 'parse-partial-sexp 'pps-after)
(advice-add 'parse-partial-sexp :filter-return 'pps-after)
(ex-put-example 'mapl '(";; function &rest lists+ => list-1
(mapl #'(lambda (x y) (insert (format \"%s\\n\" (append x y)))) (list 1 0 2) (list 3 4 5))"))
(ex-put-example 'maplist '(";; function &rest lists+ => result-list
\(maplist #'list (list 1 2 3) (list 4 5 6))"
))
(ex-put-example 'maplist '(";; function &rest lists+ => result-list
\(maplist #'list (list 1 2 3) (list 4 5 6))"
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment