Skip to content

Commit

Permalink
addany
Browse files Browse the repository at this point in the history
  • Loading branch information
semenInRussia committed Jun 20, 2024
1 parent d4e3247 commit dd0dba8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
3 changes: 2 additions & 1 deletion lisp/editing/my-editing.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
(delete-horizontal-space t))

(leaf yank-indent
:ensure (yank-indent :repo "jimeh/yank-indent" :host github))
:ensure (yank-indent :repo "jimeh/yank-indent" :host github)
:hook prog-mode-hook text-mode-hook)

(defvar w32-pass-lwindow-to-system)
(defvar w32-lwindow-modifier)
Expand Down
30 changes: 16 additions & 14 deletions lisp/local-projects/my-org-autoformat.el
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,22 @@ Only names, without #, + and :"
(defun my-org-sentence-capitalization ()
"Capitalize first letter of a sentence in the `org-mode'."
(interactive)
(cond
((just-call-on-prev-line*
(or (just-line-is-whitespaces-p)
(my-org-heading-p)
(my-org-properties-end-p)
(my-org-list-item-p)))
(my-autoformat-sentence-capitalization t))
((just-call-on-prev-line* (equal (pos-bol) (point-min)))
(my-autoformat-sentence-capitalization))
(t
(just-call-on-backward-char*
(and (looking-back my-autoformat-sentence-end nil)
(looking-at-p "[[:alpha:]]")
(upcase-char 1))))))
(and
(not (texmathp))
(cond
((just-call-on-prev-line*
(or (just-line-is-whitespaces-p)
(my-org-heading-p)
(my-org-properties-end-p)
(my-org-list-item-p)))
(my-autoformat-sentence-capitalization t))
((just-call-on-prev-line* (equal (pos-bol) (point-min)))
(my-autoformat-sentence-capitalization))
(t
(just-call-on-backward-char*
(and (looking-back my-autoformat-sentence-end nil)
(looking-at-p "[[:alpha:]]")
(upcase-char 1)))))))

(defun my-org-heading-p ()
"Return t, when the cursor located at a `org-mode' heading text."
Expand Down
2 changes: 2 additions & 0 deletions lisp/misc/my-use-afk.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
;; do things on the minibuffer items, browse the URL at the cursor
ffap ; a dependency
embark
;; yank-indent
yank-indent
;; I frequently use `dired', but it have a bad start up time, load it in AFK
dired
;; I use `ace-window' (alternative to C-x o) in 100% of cases.
Expand Down

0 comments on commit dd0dba8

Please sign in to comment.