The byte-compiler ate my baby
This commit is contained in:
parent
7afa8a7e90
commit
1910453e29
6 changed files with 36 additions and 40 deletions
|
@ -44,8 +44,7 @@ FRAME parameter defaults to current frame."
|
||||||
(let* ((font (frame-parameter nil 'font))
|
(let* ((font (frame-parameter nil 'font))
|
||||||
(font (doom--font-name font))
|
(font (doom--font-name font))
|
||||||
(increment (* increment doom-font-increment))
|
(increment (* increment doom-font-increment))
|
||||||
(zoom-factor (or doom--font-scale 0))
|
(zoom-factor (or doom--font-scale 0)))
|
||||||
success)
|
|
||||||
(let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum))
|
(let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum))
|
||||||
increment)))
|
increment)))
|
||||||
(unless (> new-size 0)
|
(unless (> new-size 0)
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
(car (gethash (symbol-name package) straight--build-cache)))
|
(car (gethash (symbol-name package) straight--build-cache)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-package-dependencies (package &optional recursive noerror)
|
(defun doom-package-dependencies (package &optional recursive _noerror)
|
||||||
"Return a list of dependencies for a package."
|
"Return a list of dependencies for a package."
|
||||||
(let ((deps (nth 1 (gethash (symbol-name package) straight--build-cache))))
|
(let ((deps (nth 1 (gethash (symbol-name package) straight--build-cache))))
|
||||||
(if recursive
|
(if recursive
|
||||||
|
|
|
@ -88,7 +88,7 @@ library/userland functions"
|
||||||
((and (symbolp (setq module (sexp-at-point)))
|
((and (symbolp (setq module (sexp-at-point)))
|
||||||
(string-prefix-p "+" (symbol-name module)))
|
(string-prefix-p "+" (symbol-name module)))
|
||||||
(while (symbolp (sexp-at-point))
|
(while (symbolp (sexp-at-point))
|
||||||
(beginning-of-sexp))
|
(thing-at-point--beginning-of-sexp))
|
||||||
(setq flag module
|
(setq flag module
|
||||||
module (car (sexp-at-point)))
|
module (car (sexp-at-point)))
|
||||||
(when (re-search-backward "\\_<:\\w+\\_>" nil t)
|
(when (re-search-backward "\\_<:\\w+\\_>" nil t)
|
||||||
|
@ -99,7 +99,7 @@ library/userland functions"
|
||||||
(list category module flag))))))))
|
(list category module flag))))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +emacs-lisp-lookup-definition (thing)
|
(defun +emacs-lisp-lookup-definition (_thing)
|
||||||
"Lookup definition of THING."
|
"Lookup definition of THING."
|
||||||
(if-let (module (+emacs-lisp--module-at-point))
|
(if-let (module (+emacs-lisp--module-at-point))
|
||||||
(doom/help-modules (car module) (cadr module) 'visit-dir)
|
(doom/help-modules (car module) (cadr module) 'visit-dir)
|
||||||
|
|
|
@ -3,37 +3,38 @@
|
||||||
|
|
||||||
;; REVIEW Refactor me
|
;; REVIEW Refactor me
|
||||||
|
|
||||||
(defvar pcomplete-suffix-list)
|
|
||||||
(defvar company-pcomplete-available 'unknown)
|
(defvar company-pcomplete-available 'unknown)
|
||||||
|
|
||||||
(defun company-pcomplete--prefix ()
|
(defun company-pcomplete--prefix ()
|
||||||
(let* ((pcomplete-stub)
|
(with-no-warnings
|
||||||
pcomplete-seen
|
(let* ((pcomplete-stub)
|
||||||
pcomplete-norm-func
|
pcomplete-seen
|
||||||
pcomplete-args
|
pcomplete-norm-func
|
||||||
pcomplete-last pcomplete-index
|
pcomplete-args
|
||||||
(pcomplete-autolist pcomplete-autolist)
|
pcomplete-last pcomplete-index
|
||||||
(pcomplete-suffix-list pcomplete-suffix-list))
|
(pcomplete-autolist pcomplete-autolist)
|
||||||
(pcomplete-completions)
|
(pcomplete-suffix-list pcomplete-suffix-list))
|
||||||
(buffer-substring (pcomplete-begin) (point))))
|
(pcomplete-completions)
|
||||||
|
(buffer-substring (pcomplete-begin) (point)))))
|
||||||
|
|
||||||
(defun company-pcomplete--candidates ()
|
(defun company-pcomplete--candidates ()
|
||||||
(let* ((pcomplete-stub)
|
(with-no-warnings
|
||||||
(pcomplete-show-list t)
|
(let* ((pcomplete-stub)
|
||||||
pcomplete-seen pcomplete-norm-func
|
(pcomplete-show-list t)
|
||||||
pcomplete-args pcomplete-last pcomplete-index
|
pcomplete-seen pcomplete-norm-func
|
||||||
(pcomplete-autolist pcomplete-autolist)
|
pcomplete-args pcomplete-last pcomplete-index
|
||||||
(pcomplete-suffix-list pcomplete-suffix-list)
|
(pcomplete-autolist pcomplete-autolist)
|
||||||
(candidates (pcomplete-completions))
|
(pcomplete-suffix-list pcomplete-suffix-list)
|
||||||
(prefix (buffer-substring (pcomplete-begin) (point)))
|
(candidates (pcomplete-completions))
|
||||||
;; Collect all possible completions for the current stub
|
(prefix (buffer-substring (pcomplete-begin) (point)))
|
||||||
(cnds (all-completions pcomplete-stub candidates))
|
;; Collect all possible completions for the current stub
|
||||||
(bnds (completion-boundaries pcomplete-stub candidates nil ""))
|
(cnds (all-completions pcomplete-stub candidates))
|
||||||
(skip (- (length pcomplete-stub) (car bnds))))
|
(bnds (completion-boundaries pcomplete-stub candidates nil ""))
|
||||||
;; Replace the stub at the beginning of each candidate by the prefix
|
(skip (- (length pcomplete-stub) (car bnds))))
|
||||||
(mapcar (lambda (cand)
|
;; Replace the stub at the beginning of each candidate by the prefix
|
||||||
(concat prefix (substring cand skip)))
|
(mapcar (lambda (cand)
|
||||||
cnds)))
|
(concat prefix (substring cand skip)))
|
||||||
|
cnds))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun company-pcomplete-available ()
|
(defun company-pcomplete-available ()
|
||||||
|
|
|
@ -335,7 +335,7 @@ Otherwise, falls back on `find-file-at-point'."
|
||||||
((user-error "No dictionary backend is available"))))
|
((user-error "No dictionary backend is available"))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +lookup/synonyms (identifier &optional arg)
|
(defun +lookup/synonyms (identifier &optional _arg)
|
||||||
"Look up and insert a synonym for the word at point (or selection)."
|
"Look up and insert a synonym for the word at point (or selection)."
|
||||||
(interactive
|
(interactive
|
||||||
(list (doom-thing-at-point-or-region 'word) ; TODO actually use this
|
(list (doom-thing-at-point-or-region 'word) ; TODO actually use this
|
||||||
|
|
|
@ -21,14 +21,10 @@ Meant for `doom-change-font-size-hook'."
|
||||||
(setq +modeline--old-bar-height doom-modeline-height))
|
(setq +modeline--old-bar-height doom-modeline-height))
|
||||||
(let ((default-height +modeline--old-bar-height)
|
(let ((default-height +modeline--old-bar-height)
|
||||||
(scale (or (frame-parameter nil 'font-scale) 0)))
|
(scale (or (frame-parameter nil 'font-scale) 0)))
|
||||||
(if (> scale 0)
|
(setq doom-modeline-height
|
||||||
(let ((font-size (string-to-number
|
(if (> scale 0)
|
||||||
(aref (doom--font-name (frame-parameter nil 'font)
|
(+ default-height (* scale doom-font-increment))
|
||||||
(selected-frame))
|
default-height))))
|
||||||
xlfd-regexp-pixelsize-subnum)))
|
|
||||||
(scale (frame-parameter nil 'font-scale)))
|
|
||||||
(setq doom-modeline-height (+ default-height (* scale doom-font-increment))))
|
|
||||||
(setq doom-modeline-height default-height))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +modeline-update-env-in-all-windows-h (&rest _)
|
(defun +modeline-update-env-in-all-windows-h (&rest _)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue