diff options
Diffstat (limited to 'lisp/+titlecase.el')
-rw-r--r-- | lisp/+titlecase.el | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lisp/+titlecase.el b/lisp/+titlecase.el deleted file mode 100644 index 6defda7..0000000 --- a/lisp/+titlecase.el +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | ;;; +titlecase.el --- Titlecase extras -*- lexical-binding: t; -*- | ||
2 | |||
3 | ;;; Commentary: | ||
4 | |||
5 | ;;; Code: | ||
6 | |||
7 | (require 'titlecase) | ||
8 | |||
9 | (defun +titlecase-sentence-style-dwim (&optional arg) | ||
10 | "Titlecase a sentence. | ||
11 | With prefix ARG, toggle the value of | ||
12 | `titlecase-downcase-sentences' before sentence-casing." | ||
13 | (interactive "P") | ||
14 | (let ((titlecase-downcase-sentences (if arg (not titlecase-downcase-sentences) | ||
15 | titlecase-downcase-sentences))) | ||
16 | (titlecase-dwim 'sentence))) | ||
17 | |||
18 | (defun +titlecase-org-headings () | ||
19 | (interactive) | ||
20 | (save-excursion | ||
21 | (goto-char (point-min)) | ||
22 | ;; See also `org-map-tree'. I'm not using that function because I want to | ||
23 | ;; skip the first headline. A better solution would be to patch | ||
24 | ;; `titlecase-line' to ignore org-mode metadata (TODO cookies, tags, etc). | ||
25 | (let ((level (funcall outline-level)) | ||
26 | (org-special-ctrl-a/e t)) | ||
27 | (while (and (progn (outline-next-heading) | ||
28 | (> (funcall outline-level) level)) | ||
29 | (not (eobp))) | ||
30 | (titlecase-region (org-beginning-of-line) | ||
31 | (org-end-of-line)))))) | ||
32 | |||
33 | (provide '+titlecase) | ||
34 | ;;; +titlecase.el ends here | ||