From 653381904aa8ff20dce3ffb4ed4fc5c3bf58c166 Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Thu, 4 Mar 2021 15:29:38 -0500 Subject: [PATCH] Check for symbols before using --- README.org | 20 +++++++++++++++----- hosts/localhost.el | 2 +- modules/core.el | 9 ++++++--- modules/writing.el | 8 ++++++++ 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/README.org b/README.org index bc54ff3..1077661 100644 --- a/README.org +++ b/README.org @@ -232,7 +232,7 @@ Raspberry Pi 400 personal computer, and a small fleet of Zero, Zero WH, 4, and 4 :header-args: :tangle hosts/localhost.el :END: -Android devices do not use the Linux host names, so setting a custom hostname is pointless as it just changes the value of ~kernel.hostname~ and have no impact on the running system. It's recommended to leave the hostname as =localhost= in Termux. While this raises an issue with my host definition system, it's no more of an issue than the =rasberry= namespace. +Android devices do not use the Linux host names, so setting a custom hostname is pointless as it just changes the value of ~kernel.hostname~ and have no impact on the running system. It's recommended to leave the hostname as =localhost= in Termux. While this raises an issue with my host definition system, it's no more of an issue than the =raspberry= namespace. + Increase font size for small screen @@ -242,7 +242,7 @@ Android devices do not use the Linux host names, so setting a custom hostname is * Modules -Breaking down the project into logical units or chapters to keep the code more maintainable and organized. This is also a fundemental requirement to achieve the goal of modularity. Incorporating just the =core= module on a build server to build literate programming projects is just one example. +Breaking down the project into logical units or chapters to keep the code more maintainable and organized. This is also a fundamental requirement to achieve the goal of modularity. Incorporating just the =core= module on a build server to build literate programming projects is just one example. ** Core :PROPERTIES: @@ -322,9 +322,12 @@ Emacs' default user interface is *horrendous*, let's do something about that. (global-prettify-symbols-mode) (when (window-system) - (tooltip-mode -1) - (tool-bar-mode -1) - (menu-bar-mode -1) + (when (fboundp 'tooltip-mode) + (tooltip-mode -1)) + (when (fboundp 'tool-bar-mode) + (tool-bar-mode -1)) + (when (fboundp 'menu-bar-mode) + (menu-bar-mode -1)) (when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))) #+end_src @@ -1124,6 +1127,13 @@ Use the built in =ispell= package to add spell checking features to buffers. :custom (ispell-dictionary dotfiles/lang)) #+end_src +Toggle highlighting within buffers with =SPC t s=. + +#+begin_src emacs-lisp +(dotfiles/leader + "ts" '(flyspell-buffer :which-key "Spelling")) +#+end_src + ** Projects :PROPERTIES: :header-args: :tangle modules/projects.el diff --git a/hosts/localhost.el b/hosts/localhost.el index 2601e60..ab15e3c 100644 --- a/hosts/localhost.el +++ b/hosts/localhost.el @@ -3,7 +3,7 @@ ;; :header-args: :tangle hosts/localhost.el ;; :END: -;; Android devices do not use the Linux host names, so setting a custom hostname is pointless as it just changes the value of ~kernel.hostname~ and have no impact on the running system. It's recommended to leave the hostname as =localhost= in Termux. While this raises an issue with my host definition system, it's no more of an issue than the =rasberry= namespace. +;; Android devices do not use the Linux host names, so setting a custom hostname is pointless as it just changes the value of ~kernel.hostname~ and have no impact on the running system. It's recommended to leave the hostname as =localhost= in Termux. While this raises an issue with my host definition system, it's no more of an issue than the =raspberry= namespace. ;; + Increase font size for small screen diff --git a/modules/core.el b/modules/core.el index e2debaf..48ec8db 100644 --- a/modules/core.el +++ b/modules/core.el @@ -71,9 +71,12 @@ (global-prettify-symbols-mode) (when (window-system) - (tooltip-mode -1) - (tool-bar-mode -1) - (menu-bar-mode -1) + (when (fboundp 'tooltip-mode) + (tooltip-mode -1)) + (when (fboundp 'tool-bar-mode) + (tool-bar-mode -1)) + (when (fboundp 'menu-bar-mode) + (menu-bar-mode -1)) (when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))) diff --git a/modules/writing.el b/modules/writing.el index 07867aa..b69c9c8 100644 --- a/modules/writing.el +++ b/modules/writing.el @@ -276,3 +276,11 @@ (use-package ispell :after org :custom (ispell-dictionary dotfiles/lang)) + + + +;; Toggle highlighting within buffers with =SPC t s=. + + +(dotfiles/leader + "ts" '(flyspell-buffer :which-key "Spelling"))