Remove unused functions, set stuff according to version number

This commit is contained in:
trémeur 2022-10-28 18:55:45 +01:00
parent de88bdf425
commit a10d99075d
2 changed files with 12 additions and 245 deletions

40
init.el
View file

@ -45,8 +45,6 @@
(package-initialize)
;; (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")))
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))
@ -151,9 +149,6 @@
:config
(show-paren-mode +1))
(use-package powershell)
;; for editing .ps1 files
(use-package rainbow-mode
;; colours css colours (≥ emacs26)
:hook
@ -225,9 +220,7 @@
(add-hook 'markdown-mode-hook 'auto-fill-mode)
(add-hook 'markdown-mode-hook 'typo-mode)
:config
(setq markdown-command "pandoc")
(setq markdown-asymmetric-header t)
(setq markdown-css-paths `("https://fonts.googleapis.com/css?family=Fredoka+One|Raleway:400,400i,800" ,(expand-file-name "~/.emacs.d/export.css"))) ; does this work on windows?
:custom
(markdown-header-scaling t)
:custom-face
@ -246,11 +239,11 @@
(setq org-noter-property-doc-file "INTERLEAVE_PDF"
org-noter-property-note-location "INTERLEAVE_PAGE_NOTE"))
(unless (iswin) ;; 27 only??
(unless (version< emacs-version "27")
(use-package org-sidebar
:bind ("C-c C-x s" . org-sidebar-tree)))
(unless (iswin) ;; 27 only??
(unless (version< emacs-version "27")
(use-package org-wc
:bind ("C-c C-x w" . org-wc-display)))
@ -297,19 +290,18 @@
(load-file "~/.emacs.d/agenda-common.el")
;; for agenda things used in both emacs and batch
(when (islin)
(unless (version< emacs-version "27")
(use-package org-modern
:hook
(org-mode . org-modern-mode)))
(use-package calfw
;; grid calendar that i forget to use
:bind ("C-c f" . cfw:open-org-calendar)
:config
(use-package calfw-org)
(setq cfw:org-overwrite-default-keybinding t
cfw:display-calendar-holidays nil
calendar-week-start-day 1))
(if (version< emacs-version "27")
(use-package org-bullets
;; makes bullets look nice
:custom
(org-bullets-bullet-list '(""))
(org-ellipsis "")
:hook (org-mode . org-bullets-mode)))
(unless (atwork)
(defun org-journal-file-header-func (time)
@ -327,15 +319,7 @@
(use-package org-agenda-property)
;; lets properties inherit
(unless (islin)
(use-package org-bullets
;; makes bullets look nice
:custom
(org-bullets-bullet-list '(""))
(org-ellipsis "")
:hook (org-mode . org-bullets-mode)))
(unless (iswin) ;; 27 only??
(unless (version< emacs-version "27")
(use-package org-contrib)
(require 'ox-extra)
(ox-extras-activate '(ignore-headlines)))
@ -419,7 +403,7 @@
;; Email
(when (islin)
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") ;; this is broken in emacs28
(load-file "~/.emacs.d/mail.el")
(require 'mu4e) ;; this uses cl … hopefully will be updated in a later emacs version?
(setq send-mail-function 'smtpmail-send-it))