mirror of
https://github.com/emacscollective/emacs.g.git
synced 2025-07-03 15:37:35 -04:00
Emacsg: Silence byte-compiler
Before this commit when running "touch init.el; emacs", then the compilation triggered by `auto-compile-on-load-mode' resulted in: Warning (bytecomp): the following functions might not be defined at runtime: server-running-p, magit-add-section-hook Warning (bytecomp): the following functions are not known to be defined: indent-spaces-mode, indicate-buffer-boundaries-left While "make build-init" only resulted in: init.el:193:1: Warning: the function ‘magit-add-section-hook’ might not be defined at runtime. This commit addresses all of these warnings: - Don't sharp quote functions, because they resulted in invalid warnings. - Use the `use-package' keyword `:commands' to suppress the other warnings, because `:functions' fails to its job even though theoretically it is more suitable in these cases.
This commit is contained in:
parent
70c1e2f11f
commit
0f9e8e769e
8
init.el
8
init.el
@ -57,6 +57,7 @@
|
|||||||
(load custom-file)))
|
(load custom-file)))
|
||||||
|
|
||||||
(use-package server
|
(use-package server
|
||||||
|
:commands (server-running-p)
|
||||||
:config (or (server-running-p) (server-mode)))
|
:config (or (server-running-p) (server-mode)))
|
||||||
|
|
||||||
(progn ; startup
|
(progn ; startup
|
||||||
@ -104,10 +105,11 @@
|
|||||||
(add-hook 'emacs-lisp-mode-hook 'reveal-mode)
|
(add-hook 'emacs-lisp-mode-hook 'reveal-mode)
|
||||||
(defun indent-spaces-mode ()
|
(defun indent-spaces-mode ()
|
||||||
(setq indent-tabs-mode nil))
|
(setq indent-tabs-mode nil))
|
||||||
(add-hook 'lisp-interaction-mode-hook #'indent-spaces-mode))
|
(add-hook 'lisp-interaction-mode-hook 'indent-spaces-mode))
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:defer t
|
:defer t
|
||||||
|
:commands (magit-add-section-hook)
|
||||||
:config
|
:config
|
||||||
(magit-add-section-hook 'magit-status-sections-hook
|
(magit-add-section-hook 'magit-status-sections-hook
|
||||||
'magit-insert-modules
|
'magit-insert-modules
|
||||||
@ -125,7 +127,7 @@
|
|||||||
:config (global-prettify-symbols-mode)
|
:config (global-prettify-symbols-mode)
|
||||||
(defun indicate-buffer-boundaries-left ()
|
(defun indicate-buffer-boundaries-left ()
|
||||||
(setq indicate-buffer-boundaries 'left))
|
(setq indicate-buffer-boundaries 'left))
|
||||||
(add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left))
|
(add-hook 'prog-mode-hook 'indicate-buffer-boundaries-left))
|
||||||
|
|
||||||
(use-package recentf
|
(use-package recentf
|
||||||
:demand t
|
:demand t
|
||||||
@ -149,7 +151,7 @@
|
|||||||
(set-face-attribute 'smerge-refined-added nil :extend t)))
|
(set-face-attribute 'smerge-refined-added nil :extend t)))
|
||||||
|
|
||||||
(progn ; `text-mode'
|
(progn ; `text-mode'
|
||||||
(add-hook 'text-mode-hook #'indicate-buffer-boundaries-left))
|
(add-hook 'text-mode-hook 'indicate-buffer-boundaries-left))
|
||||||
|
|
||||||
(use-package tramp
|
(use-package tramp
|
||||||
:defer t
|
:defer t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user