X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=emacs.el;h=6d4ffe8cad3efe1ec8ebd8abe04975e600e9881a;hp=bf6da94103435024c8e7c21278f3d8242868ee6e;hb=41d67536a6418bc1b6259cc3f390b892cb931417;hpb=fc2642e34fec0d82c0d8ce6d6bc9e6859fadac7e diff --git a/emacs.el b/emacs.el index bf6da94..6d4ffe8 100644 --- a/emacs.el +++ b/emacs.el @@ -34,9 +34,9 @@ ;; (set-default-font "Bitstream vera sans mono-12") ;; (set-default-font "Liberation Mono-13") (set-default-font "Inconsolata 15") -;;(set-default-font "DejaVu sans mono 11") -;;(set-default-font "Droid sans mono 13") -;;(set-default-font "Opensans 10") +;; (set-default-font "DejaVu sans mono 11") +;; (set-default-font "Droid sans mono 13") +;; (set-default-font "Opensans 10") (when (fboundp 'horizontal-scroll-bar-mode) (horizontal-scroll-bar-mode -1)) @@ -328,6 +328,8 @@ load-warning buffer in case of failure." ;; What modes for what file extentions (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode)) +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + (require 'org-table) (add-to-list 'auto-mode-alist '("\\.txt\\'" . (lambda() @@ -854,7 +856,11 @@ printer." (defun ff/sum-values-from-files (list-files prefix) (apply '+ (mapcar - (lambda (f) (string-to-number (ff/file-first-line (format "%s/%s" f prefix)))) + (lambda (f) + (condition-case nil + (string-to-number (ff/file-first-line (format "%s/%s" f prefix))) + (error 0)) + ) list-files))) (defun ff/battery-percent () @@ -890,7 +896,8 @@ printer." (pcase (ff/battery-state ff/battery-dirs) (`charging (format "c%d%%" (ff/battery-percent))) (`discharging (format "d%d%%" (ff/battery-percent))) - (code "f")) + (`unknown "f") + (_ "?")) ) @@ -925,7 +932,7 @@ printer." ) '( - ("hostname" nil t nil "-v") + ("hostname" nil t nil "-f") ("acpi" nil t) ("df" nil t nil "-h") ;; ("mount" nil t) @@ -1706,7 +1713,7 @@ int main(int argc, char **argv) { -