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
;;; pinstall.el --- Parallel package install script | |
;; Copyright (C) 2019 SeungKi Kim | |
;; Author: SeungKi Kim <[email protected]> | |
;; URL: https://github.com/tttuuu888/.emacs.d | |
;; Version: 0.7.0 | |
;;; Commentary |
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
(require 'hi-lock) | |
(defun toggle-highlight-word () | |
(interactive) | |
(let ((regex (concat "\\_<" (current-word) "\\_>"))) | |
(if (member regex (mapcar #'car hi-lock-interactive-patterns)) | |
(unhighlight-regexp regex) | |
(highlight-symbol-at-point)))) | |
(defun unhighlight-all-highlighted-words () |
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
(defvar sk-package-loading-notice-list '(org yasnippet)) | |
(defun sk-package-loading-notice (old &rest r) | |
(let* ((elt (car r)) | |
(mode | |
(when (stringp elt) | |
(let ((ret (assoc-default elt auto-mode-alist 'string-match))) | |
(and (symbolp ret) (symbol-name ret))))) | |
(pkg | |
(cond ((symbolp elt) elt) |
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
(defun git-tracked-file-p (&optional file-name) | |
(let ((file (or file-name buffer-file-name))) | |
(and file | |
(file-exists-p file) | |
(zerop (process-file "git" nil nil nil | |
"ls-files" "--error-unmatch" | |
(file-name-nondirectory file)))))) | |
(defun git-branch-of-file (file) | |
(when (git-tracked-file-p file) |