summaryrefslogtreecommitdiff
path: root/smart-documents.org
diff options
context:
space:
mode:
Diffstat (limited to 'smart-documents.org')
-rw-r--r--smart-documents.org32
1 files changed, 21 insertions, 11 deletions
diff --git a/smart-documents.org b/smart-documents.org
index b3a2f61..1d58598 100644
--- a/smart-documents.org
+++ b/smart-documents.org
@@ -1726,11 +1726,15 @@ PDF. The binding is defined in Section [[Export to PDF]].
*** Fix indentation
#+BEGIN_SRC emacs-lisp :tangle yes
- (defun sd-indent-buffer ()
+ (defun sd-indent-buffer
+ ()
"Indent entire buffer."
(interactive)
(save-excursion
- (indent-region (point-min) (point-max) nil)))
+ (indent-region
+ (point-min)
+ (point-max)
+ nil)))
#+END_SRC
*** Beautify
@@ -1738,7 +1742,8 @@ PDF. The binding is defined in Section [[Export to PDF]].
**** All types of buffers
#+BEGIN_SRC emacs-lisp :tangle yes
- (defun sd-beautify-buffer ()
+ (defun sd-beautify-buffer
+ ()
"Clean up buffer in the most general sense.
This means performing the following actions:
@@ -1753,10 +1758,10 @@ PDF. The binding is defined in Section [[Export to PDF]].
((string-equal major-mode "org-mode")
(sd-org-fix-headlines-spacing))
((string-equal major-mode "python-mode")
- (or (shell-command (concat "~/.local/bin/black " buffer-file-name))
- (message "Could not find black Python formatter.")))))
-
-
+ (or
+ (shell-command
+ (concat "~/.local/bin/black " buffer-file-name))
+ (message "Could not find black Python formatter.")))))
#+END_SRC
**** TODO COMMENT For Org mode, specifically
@@ -1777,7 +1782,7 @@ PDF. The binding is defined in Section [[Export to PDF]].
** Smart quitting
:PROPERTIES:
-:test: t
+:test: t
:END:
*** Window
@@ -1794,10 +1799,15 @@ PDF. The binding is defined in Section [[Export to PDF]].
*** Frame
#+BEGIN_SRC emacs-lisp :tangle yes
- (defun sd-delete-frame-or-kill-emacs ()
- (interactive)
+ (defun sd-delete-frame-or-kill-emacs
+ ()
"Delete frame; if sole frame, kill Emacs."
- (if (> (length (frame-list)) 1)
+ (interactive)
+ (if
+ (>
+ (length
+ (frame-list))
+ 1)
(delete-frame)
(save-buffers-kill-terminal)))
#+END_SRC
Copyright 2019--2024 Marius PETER