This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: Reload the currently active theme to reset all faces. | |
;; Gits URL: https://gist.github.com/jamescherti/202cd241e31af226c5b6d772a0d754e8 | |
;; License: MIT | |
;; Author: James Cherti | |
(defun my-reload-theme () | |
"Reload the currently active theme to reset all faces." | |
(interactive) | |
(let ((current-theme (car custom-enabled-themes))) | |
(when current-theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: Set all attributes of the specified FACE to `unspecified'. | |
;; Gits URL: https://gist.github.com/jamescherti/316e2f87b9e8f0af9a560ee594552083 | |
;; License: MIT | |
;; Author: James Cherti | |
(defun my-reset-face-attributes (face) | |
"Set all attributes of the specified FACE to `unspecified'." | |
(when (facep face) | |
(let ((attributes (face-all-attributes face))) | |
(dolist (attr attributes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: Emacs: Move to the next tab when the current tab | |
;; is closed. (similar to Firefox.) | |
;; Gits URL: https://gist.github.com/jamescherti/21436157fa3764022c95f00dfe2ae828 | |
;; License: MIT | |
;; Author: James Cherti | |
(defun my-tab-bar-close-tab-advice (orig-fun &rest args) | |
"Advice around `tab-bar-close-tab' to move to the next tab when closed. | |
ORIG-FUN is the original `tab-bar-close-tab` function. ARGS are the arguments | |
passed to `tab-bar-close-tab`." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Gits URL: https://gist.github.com/jamescherti/cc0b0734f4f2e90e3854f7550054760b | |
;; License: MIT | |
;; Author: James Cherti | |
;; | |
;; Description: | |
;; ------------ | |
;; This code provides an Emacs Lisp function to suppress specific Eglot | |
;; messages from being shown in the minibuffer. | |
(defun my-suppress-eglot-message (orig-fun format &rest args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Gits URL: https://gist.github.com/jamescherti/095812fefed49894cde5e5945ce5d63a | |
;; License: MIT | |
;; Author: James Cherti | |
;; | |
;; Description: | |
;; ------------ | |
;; Make the built-in (save-some-buffers) function automatically save | |
;; buffers that are visiting existing files, without prompting the | |
;; user for confirmation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; URL: https://gist.github.com/jamescherti/d4179eeece026081ac5d10d9eb1b25cf | |
;; License: MIT | |
;; Author: James Cherti | |
;; | |
;; Description: | |
;; Preserving Info-history-list across sessions using savehist or desktop.el | |
;; allows users to save and restore the links marked as "read" within the Info | |
;; system, providing a visual cue of which nodes have been visited. | |
;; | |
;; Info-history-list in Emacs is a variable that stores a list of previously |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Gits URL: https://gist.github.com/jamescherti/8a7c6e926fcb6a16251bc24b1fe06bcf | |
;; License: MIT | |
;; Author: James Cherti | |
;; | |
;; Description: | |
;; ------------ | |
;; When the C-h key is pressed in Emacs Evil mode, and | |
;; electric-pair-delete-adjacent-pairs is set to true, Electric Pair should | |
;; delete an adjacent pair of characters, similar to the behavior of the | |
;; Backspace key. Currently, this functionality only works with the Backspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: wcalc configuration file ~/.wcalcrc | |
# Gits URL: https://gist.github.com/jamescherti/ca94710ab7b473ca2e5118519fb06672 | |
# License: MIT | |
# Author: James Cherti | |
precision=2 | |
show_equals=false | |
save_errors=true | |
history_limit=2000 | |
color=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; Emacs: Switch to another project using (find-file) | |
;; Gits URL: https://gist.github.com/jamescherti/bf74fb911d17583e7f4b57946f1ea775 | |
;; License: MIT | |
;; Author: James Cherti | |
(defun my-project-prompt-project-dir () | |
"Prompt the user for a directory that is one of the known project roots." | |
(project--ensure-read-project-list) | |
(setq pr-dir (completing-read "Select project: " project--list nil t))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; Prevent 'evil-paste-after' and 'evil-paste-before' from failing when the | |
;; paste ring (akin to the clipboard) is empty. | |
;; | |
;; Gits URL: | |
;; License: MIT | |
;; Author: James Cherti | |
(defun ignore-empty-ring-errors (orig-func &rest args) | |
"Ignore errors related to the empty ring when calling ORIG-FUNC with ARGS." |
NewerOlder