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