style: Convert tabs to spaces across Emacs config
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
;;; init-kbd-func.el --- functions for keybindings -*- lexical-binding: t -*-
|
||||
;;; init-kbd-func.el --- functions for keybindings -*- lexical-binding: t -*-
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
@@ -55,11 +55,11 @@ otherwise toggle global-jinx-mode."
|
||||
(fboundp 'w32-shell-execute))
|
||||
(shell-command-to-string
|
||||
(encode-coding-string
|
||||
(replace-regexp-in-string "/" "\\\\"
|
||||
(format "explorer.exe %s"
|
||||
(file-name-directory
|
||||
(expand-file-name file))))
|
||||
'gbk))
|
||||
(replace-regexp-in-string "/" "\\\\"
|
||||
(format "explorer.exe %s"
|
||||
(file-name-directory
|
||||
(expand-file-name file))))
|
||||
'gbk))
|
||||
(call-process (pcase system-type
|
||||
('darwin "open")
|
||||
('cygwin "cygstart")
|
||||
@@ -93,7 +93,7 @@ otherwise toggle global-jinx-mode."
|
||||
"Return the path of current denote journal if it exists, otherwise return nil."
|
||||
(require 'denote-journal)
|
||||
(let* ((internal-date
|
||||
(denote-journal--date-in-interval-p (or date (current-time)) interval))
|
||||
(denote-journal--date-in-interval-p (or date (current-time)) interval))
|
||||
(files (denote-journal--get-entry internal-date interval)))
|
||||
(if files
|
||||
(denote-journal-select-file-prompt files))))
|
||||
@@ -134,9 +134,9 @@ otherwise toggle global-jinx-mode."
|
||||
"Publish blog , git add/commit/push , generate commit message."
|
||||
(interactive)
|
||||
(let* ((blog-dir (or directory
|
||||
(if *is-windows*
|
||||
"h:/emacs/hugo/this-is-my-blog/"
|
||||
"~/org/hugo/this-is-my-blog/")))
|
||||
(if *is-windows*
|
||||
"h:/emacs/hugo/this-is-my-blog/"
|
||||
"~/org/hugo/this-is-my-blog/")))
|
||||
(timestamp (format-time-string "%Y-%m-%d %H:%M:%S"))
|
||||
(default-directory blog-dir))
|
||||
(message "Adding files...")
|
||||
@@ -146,15 +146,15 @@ otherwise toggle global-jinx-mode."
|
||||
(message "Pushing to remote...")
|
||||
(let ((exit-code (eshell-command "git push")))
|
||||
(if (eq exit-code t)
|
||||
(message "Push may have failed or nothing to push, check *Messages* buffer for details")
|
||||
(message "Push successfully %s" timestamp)))))
|
||||
(message "Push may have failed or nothing to push, check *Messages* buffer for details")
|
||||
(message "Push successfully %s" timestamp)))))
|
||||
|
||||
(defun my-blog-preview ()
|
||||
"Save and preview blog."
|
||||
(interactive)
|
||||
(save-buffer)
|
||||
(let ((default-directory (if *is-windows*
|
||||
"h:/emacs/hugo/this-is-my-blog/"
|
||||
"h:/emacs/hugo/this-is-my-blog/"
|
||||
"~/org/hugo/this-is-my-blog/")))
|
||||
(start-process "hugo-server" "*hugo-server*"
|
||||
"hugo" "server" "-D" "--bind" "0.0.0.0" "--port" "1313")
|
||||
@@ -172,8 +172,8 @@ otherwise toggle global-jinx-mode."
|
||||
(when (eq major-mode 'org-mode)
|
||||
(setq-local header-line-format nil
|
||||
mode-line-format nil
|
||||
cursor-type 'hbar
|
||||
olivetti-body-width 100)
|
||||
cursor-type 'hbar
|
||||
olivetti-body-width 100)
|
||||
(blink-cursor-mode -1)
|
||||
(cnfonts-increase-fontsize 3)
|
||||
(hl-line-mode 'toggle)
|
||||
@@ -258,17 +258,17 @@ argument)."
|
||||
(consult-ripgrep (project-root proj))))
|
||||
|
||||
(defun consult-colors-emacs (color)
|
||||
"Show a list of all supported colors for a particular frame.
|
||||
"Show a list of all supported colors for a particular frame.
|
||||
|
||||
You can insert the name (default), or insert or kill the hexadecimal or RGB
|
||||
value of the selected COLOR."
|
||||
(interactive
|
||||
(list (consult--read (list-colors-duplicates (defined-colors))
|
||||
:prompt "Emacs color: "
|
||||
:require-match t
|
||||
:category 'color
|
||||
:history '(:input consult-colors-history))))
|
||||
(insert color))
|
||||
(interactive
|
||||
(list (consult--read (list-colors-duplicates (defined-colors))
|
||||
:prompt "Emacs color: "
|
||||
:require-match t
|
||||
:category 'color
|
||||
:history '(:input consult-colors-history))))
|
||||
(insert color))
|
||||
|
||||
(defun fix-theme-colors ()
|
||||
"Fix invalid color name in theme files."
|
||||
@@ -303,9 +303,9 @@ value of the selected COLOR."
|
||||
"Kill and restart fcitx5, to fix random issues in exwm."
|
||||
(interactive)
|
||||
(if (zerop (shell-command "pgrep fcitx5"))
|
||||
(progn
|
||||
(eshell-command "pkill fcitx5")
|
||||
(eshell-command "fcitx5 -d"))
|
||||
(progn
|
||||
(eshell-command "pkill fcitx5")
|
||||
(eshell-command "fcitx5 -d"))
|
||||
(eshell-command "fcitx5 -d"))))
|
||||
|
||||
(provide 'init-kbd-func)
|
||||
|
||||
Reference in New Issue
Block a user