Add `defun-name-to-org-commit' helper function
This commit is contained in:
parent
a4fd8dd7a2
commit
a730279f23
21
README.org
21
README.org
@ -6149,6 +6149,27 @@ instance [[https://github.com/Fanael/rainbow-delimiters#readme][rainbow-delimite
|
||||
(show-smartparens-global-mode +1))
|
||||
#+end_src
|
||||
|
||||
#+caption[=Org= commit message helper]:
|
||||
#+caption: =Org= commit message helper.
|
||||
#+name: lst:org-commit-message-helper
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(with-eval-after-load 'smartparens-config
|
||||
(defun defun-name-to-org-commit ()
|
||||
"Copy and wrap the defun name for Org commit messages to the kill-ring.
|
||||
|
||||
BUG: `beginning-of-defun' may find any (`with-eval-after-load') toplevel sexp."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(beginning-of-defun)
|
||||
(sp-forward-symbol)
|
||||
(sp-copy-sexp))
|
||||
(with-temp-buffer
|
||||
(insert "(")
|
||||
(yank)
|
||||
(insert "):")
|
||||
(kill-region 1 (point)))))
|
||||
#+end_src
|
||||
|
||||
** [[https://github.com/davidshepherd7/electric-operator#readme][Electric operators]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:electric-operators
|
||||
|
Loading…
Reference in New Issue
Block a user