tweak(emacs-lisp): remove pin truncation
This removes the truncation of `package!` `:pin`s. This was originally intended to make packages.el files easier to skim, but in hindsight it didn't really. It served little other purpose but to make it harder for folks to interact with the :pin string.
This commit is contained in:
parent
90070c639a
commit
639fcc6a2e
2 changed files with 0 additions and 16 deletions
|
@ -413,20 +413,6 @@ This generally applies to your private config (`doom-user-dir') or Doom's source
|
|||
;;
|
||||
;;; Fontification
|
||||
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp-truncate-pin ()
|
||||
"Truncates long SHA1 hashes in `package!' :pin's."
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
(and (stringp (plist-get (sexp-at-point) :pin))
|
||||
(search-forward ":pin" nil t)
|
||||
(let ((start (re-search-forward "\"[^\"\n]\\{12\\}" nil t))
|
||||
(finish (and (re-search-forward "\"" (line-end-position) t)
|
||||
(match-beginning 0))))
|
||||
(when (and start finish)
|
||||
(put-text-property start finish 'display "...")))))
|
||||
nil)
|
||||
|
||||
(defvar +emacs-lisp--face nil)
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp-highlight-vars-and-faces (end)
|
||||
|
|
|
@ -115,8 +115,6 @@ See `+emacs-lisp-non-package-mode' for details.")
|
|||
'emacs-lisp-mode
|
||||
(append `(;; custom Doom cookies
|
||||
("^;;;###\\(autodef\\|if\\|package\\)[ \n]" (1 font-lock-warning-face t)))
|
||||
;; Shorten the :pin of `package!' statements to 10 characters
|
||||
`(("(package!\\_>" (0 (+emacs-lisp-truncate-pin))))
|
||||
;; highlight defined, special variables & functions
|
||||
(when +emacs-lisp-enable-extra-fontification
|
||||
`((+emacs-lisp-highlight-vars-and-faces . +emacs-lisp--face)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue