The byte-compiler ate my baby

This commit is contained in:
Henrik Lissner 2020-02-06 15:30:50 -05:00
parent 7afa8a7e90
commit 1910453e29
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
6 changed files with 36 additions and 40 deletions

View file

@ -44,8 +44,7 @@ FRAME parameter defaults to current frame."
(let* ((font (frame-parameter nil 'font))
(font (doom--font-name font))
(increment (* increment doom-font-increment))
(zoom-factor (or doom--font-scale 0))
success)
(zoom-factor (or doom--font-scale 0)))
(let ((new-size (+ (string-to-number (aref font xlfd-regexp-pixelsize-subnum))
increment)))
(unless (> new-size 0)

View file

@ -54,7 +54,7 @@
(car (gethash (symbol-name package) straight--build-cache)))
;;;###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."
(let ((deps (nth 1 (gethash (symbol-name package) straight--build-cache))))
(if recursive

View file

@ -88,7 +88,7 @@ library/userland functions"
((and (symbolp (setq module (sexp-at-point)))
(string-prefix-p "+" (symbol-name module)))
(while (symbolp (sexp-at-point))
(beginning-of-sexp))
(thing-at-point--beginning-of-sexp))
(setq flag module
module (car (sexp-at-point)))
(when (re-search-backward "\\_<:\\w+\\_>" nil t)
@ -99,7 +99,7 @@ library/userland functions"
(list category module flag))))))))
;;;###autoload
(defun +emacs-lisp-lookup-definition (thing)
(defun +emacs-lisp-lookup-definition (_thing)
"Lookup definition of THING."
(if-let (module (+emacs-lisp--module-at-point))
(doom/help-modules (car module) (cadr module) 'visit-dir)

View file

@ -3,37 +3,38 @@
;; REVIEW Refactor me
(defvar pcomplete-suffix-list)
(defvar company-pcomplete-available 'unknown)
(defun company-pcomplete--prefix ()
(let* ((pcomplete-stub)
pcomplete-seen
pcomplete-norm-func
pcomplete-args
pcomplete-last pcomplete-index
(pcomplete-autolist pcomplete-autolist)
(pcomplete-suffix-list pcomplete-suffix-list))
(pcomplete-completions)
(buffer-substring (pcomplete-begin) (point))))
(with-no-warnings
(let* ((pcomplete-stub)
pcomplete-seen
pcomplete-norm-func
pcomplete-args
pcomplete-last pcomplete-index
(pcomplete-autolist pcomplete-autolist)
(pcomplete-suffix-list pcomplete-suffix-list))
(pcomplete-completions)
(buffer-substring (pcomplete-begin) (point)))))
(defun company-pcomplete--candidates ()
(let* ((pcomplete-stub)
(pcomplete-show-list t)
pcomplete-seen pcomplete-norm-func
pcomplete-args pcomplete-last pcomplete-index
(pcomplete-autolist pcomplete-autolist)
(pcomplete-suffix-list pcomplete-suffix-list)
(candidates (pcomplete-completions))
(prefix (buffer-substring (pcomplete-begin) (point)))
;; Collect all possible completions for the current stub
(cnds (all-completions pcomplete-stub candidates))
(bnds (completion-boundaries pcomplete-stub candidates nil ""))
(skip (- (length pcomplete-stub) (car bnds))))
;; Replace the stub at the beginning of each candidate by the prefix
(mapcar (lambda (cand)
(concat prefix (substring cand skip)))
cnds)))
(with-no-warnings
(let* ((pcomplete-stub)
(pcomplete-show-list t)
pcomplete-seen pcomplete-norm-func
pcomplete-args pcomplete-last pcomplete-index
(pcomplete-autolist pcomplete-autolist)
(pcomplete-suffix-list pcomplete-suffix-list)
(candidates (pcomplete-completions))
(prefix (buffer-substring (pcomplete-begin) (point)))
;; Collect all possible completions for the current stub
(cnds (all-completions pcomplete-stub candidates))
(bnds (completion-boundaries pcomplete-stub candidates nil ""))
(skip (- (length pcomplete-stub) (car bnds))))
;; Replace the stub at the beginning of each candidate by the prefix
(mapcar (lambda (cand)
(concat prefix (substring cand skip)))
cnds))))
;;;###autoload
(defun company-pcomplete-available ()

View file

@ -335,7 +335,7 @@ Otherwise, falls back on `find-file-at-point'."
((user-error "No dictionary backend is available"))))
;;;###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)."
(interactive
(list (doom-thing-at-point-or-region 'word) ; TODO actually use this

View file

@ -21,14 +21,10 @@ Meant for `doom-change-font-size-hook'."
(setq +modeline--old-bar-height doom-modeline-height))
(let ((default-height +modeline--old-bar-height)
(scale (or (frame-parameter nil 'font-scale) 0)))
(if (> scale 0)
(let ((font-size (string-to-number
(aref (doom--font-name (frame-parameter nil 'font)
(selected-frame))
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))))
(setq doom-modeline-height
(if (> scale 0)
(+ default-height (* scale doom-font-increment))
default-height))))
;;;###autoload
(defun +modeline-update-env-in-all-windows-h (&rest _)