Skip to content

Commit

Permalink
Miscellaneous fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raxod502 committed Apr 7, 2018
1 parent eb73a3f commit 7c797e9
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
* Order `use-package` keywords as follows, so that they are in the
rough order of execution:
* `:straight`
* `:init`
* `:mode`
* `:interpreter`
* `:init`
* `:bind`
* `:bind*`
* `:bind-keymap`
Expand Down
8 changes: 0 additions & 8 deletions radian-emacs/radian-command.el

This file was deleted.

73 changes: 69 additions & 4 deletions radian-emacs/radian-langs.el
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,25 @@

;; https://www.haskell.org/

;; Package `haskell-mode' provides syntax highlighting, indentation,
;; and interactive REPL integration for Haskell code.
(use-package haskell-mode
:config

;; Disable in-buffer underlining of errors and warnings, since we
;; already have them from Flycheck.
(setq haskell-process-show-overlays nil))
(setq haskell-process-show-overlays nil)

;; Enable REPL integration when editing Haskell files.
(add-hook 'haskell-mode-hook #'interactive-haskell-mode))

;; Package `hindent' provides a way to invoke the Haskell code
;; formatter of the same name as a `fill-paragraph' replacement.
(use-package hindent
:init

(with-eval-after-load 'haskell-mode
(add-hook 'haskell-mode-hook #'hindent-mode)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; HTML
Expand Down Expand Up @@ -178,10 +191,37 @@ This function calls `json-mode--update-auto-mode' to change the
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Markdown

;; https://daringfireball.net/projects/markdown/
;;

;; Package `markdown-mode' provides syntax highlighting and structural
;; editing commands for Markdown. See
;; https://daringfireball.net/projects/markdown/ for more details on
;; Markdown.
(use-package markdown-mode
:mode "\\.mmark\\'")
:init

;; Redefine the `auto-mode-alist' entries provided by
;; `markdown-mode', because `markdown-mode' adds them to the end of
;; the list, and in Emacs 26 an earlier entry takes precedence to
;; cause files named "CHANGELOG.md" to open in ChangeLog mode
;; instead of Markdown mode.
(dolist (regex '("\\.md\\'" "\\.markdown\\'"))
(setq auto-mode-alist
(cl-remove regex auto-mode-alist :test #'equal :key #'car))
(add-to-list 'auto-mode-alist `(,regex . markdown-mode)))

:mode (;; Extension used by Hugo.
("\\.mmark\\'" . markdown-mode))
:config

(defalias 'radian-advice-markdown-disable-metadata-fontification #'ignore
"Disable fontification of YAML front-matter in `markdown-mode'.
This is an `:override' advice for
`markdown-match-generic-metadata'. See also
https://github.com/jrblevin/markdown-mode/issues/328.")

(advice-add #'markdown-match-generic-metadata :override
#'radian-advice-markdown-disable-metadata-fontification))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Python
Expand Down Expand Up @@ -571,7 +611,15 @@ This is an `:around' advice for `TeX-load-style-file'."
(funcall TeX-load-style-file file)))

(advice-add #'TeX-load-style-file :around
#'radian--advice-inhibit-style-loading-message))
#'radian--advice-inhibit-style-loading-message)

;; Disable annoying Flycheck checkers for TeX.

(defun radian-flycheck-disable-tex ()
"Disable annoying Flycheck checkers for TeX code."
(setq-local flycheck-disabled-checkers '(tex-chktex tex-lacheck)))

(add-hook 'TeX-mode-hook #'radian-flycheck-disable-tex))

(use-package tex-buf
:straight auctex
Expand Down Expand Up @@ -602,6 +650,23 @@ This is a `:filter-return' advice for `TeX-process-buffer-name'."
;; is to be used, via a file-local variable.
(put 'LaTeX-using-Biber 'safe-local-variable #'booleanp))

(use-package font-latex
:straight auctex
:config

;; Prevent superscripts and subscripts from being displayed in a
;; different font size.
(setq font-latex-fontify-script nil)

;; Prevent section headers from being displayed in different font
;; sizes.
(setq font-latex-fontify-sectioning 1)

;; If faces were already defined, then we need to explicitly ask for
;; them to be updated after changing configuration.
(when (featurep 'font-latex)
(font-latex-update-sectioning-faces)))

;; Company integration for AUCTeX.
(use-package company-auctex
:demand t
Expand Down
13 changes: 13 additions & 0 deletions radian-emacs/radian-warnings.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
;;; radian-warnings.el --- Disable warnings

;; Enable all disabled commands.
(setq disabled-command-function nil)

;; Disable warnings from obsolete advice system. They don't provide
;; useful diagnostic information and often they can't be fixed except
;; by changing packages upstream.
(setq ad-redefinition-action 'accept)

(provide 'radian-warnings)

;;; radian-warnings.el ends here
1 change: 1 addition & 0 deletions versions.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
("go-mode.el" . "bfe7a14e9bf957d050e3c429156e697bb3670f21")
("haskell-mode" . "9018ad5cac0b1b1b5e0a51586027fb0ca4076b1a")
("help-fns-plus" . "7213ef84d0345e2625f28e2b3134f8d98489391f")
("hindent" . "6f6db40cca1b759f78d7e4b971111e40833c3aa0")
("historian.el" . "99e282bdd8994cb4e23185d9004b2cb42a214927")
("hydra" . "38ce88a9c3be11b0431080078095159b2211ca7a")
("iflipb" . "e19229473be70e55c56a26ccc26c4e11e8be6389")
Expand Down

0 comments on commit 7c797e9

Please sign in to comment.