Automated merge with file:///home/srv/hg/dot-emacs
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 22 Oct 2013 19:40:45 +0300
changeset 1090 1ceec47cf341
parent 1088 38a5f20eabee (diff)
parent 1089 7d9bd1fe3cb0 (current diff)
child 1092 19e472322085
Automated merge with file:///home/srv/hg/dot-emacs
.emacs-my
--- a/.emacs-my	Mon Oct 21 19:40:51 2013 +0300
+++ b/.emacs-my	Tue Oct 22 19:40:45 2013 +0300
@@ -1104,6 +1104,7 @@
                       (buffer-file-name (current-buffer)))
     (auto-revert-tail-mode 1)
     (log4-hi-mode 1)
+    (setq scroll-margin my-scroll-margin)
     ))
 (add-hook 'find-file-hook 'my-auto-revert-tail-mode-hook)
 
--- a/log4-hi-mode.el	Mon Oct 21 19:40:51 2013 +0300
+++ b/log4-hi-mode.el	Tue Oct 22 19:40:45 2013 +0300
@@ -11,11 +11,21 @@
   '((t :inherit success))
   "Face for informational message.")
 
+(defface log4-hi-func-face
+  '((t :inherit font-lock-function-name-face))
+  "Face for functions in trace.")
+
 (defvar log4-hi-keywords
   '(("FATAL\\|ERROR" . 'log4-hi-error-face)
     ("WARN" . 'log4-hi-warn-face)
     ("INFO\\|DEBUG\\|TRACE" . 'log4-hi-info-face) ))
 
+(defvar log4-func-hi-keywords
+  '(("at [[:alnum:].]+\\.\\([[:alnum:]$]+\\.[[:alnum:]$<>]+\\)([[:alnum:]]+\\.java:[0-9]+)" 1 'log4-hi-func-face) ))
+
+(defvar log4-func-hi t
+  "Mark to use hilighting of function names in stacktraces. Currently only Java supported.")
+
 ;;;###autoload
 (define-minor-mode log4-hi-mode
   "Highlight standard elements in log4* like log-files."
@@ -25,8 +35,10 @@
     (when log4-hi-mode
       (font-lock-mode 1)
       (font-lock-add-keywords nil log4-hi-keywords)
+      (when log4-func-hi (font-lock-add-keywords nil log4-func-hi-keywords))
       (throw 'exit nil))
-    (font-lock-remove-keywords nil log4-hi-keywords))
+    (font-lock-remove-keywords nil log4-hi-keywords)
+    (font-lock-remove-keywords nil log4-func-hi-keywords))
   (font-lock-fontify-buffer))
 
 (provide 'log4-hi-mode)