X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=emacs.el;h=aea32d6e39ba44a532ec3e635d0b899221f43d96;hp=bf6da94103435024c8e7c21278f3d8242868ee6e;hb=44da93db15b7b045e0513ab4cee0a0c8361d7ac9;hpb=fc2642e34fec0d82c0d8ce6d6bc9e6859fadac7e diff --git a/emacs.el b/emacs.el index bf6da94..aea32d6 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,7 @@ printer." (pcase (ff/battery-state ff/battery-dirs) (`charging (format "c%d%%" (ff/battery-percent))) (`discharging (format "d%d%%" (ff/battery-percent))) - (code "f")) + (_ "f")) ) @@ -925,7 +931,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 +1712,7 @@ int main(int argc, char **argv) { -