# HG changeset patch # User Oleksandr Gavenko # Date 1382460045 -10800 # Node ID 1ceec47cf341533c62ac96336fe781e0db2e3882 # Parent 38a5f20eabeedb30af406268c667f19ec3d79a8f# Parent 7d9bd1fe3cb0be5783b15fde490fa841114b9d0f Automated merge with file:///home/srv/hg/dot-emacs diff -r 7d9bd1fe3cb0 -r 1ceec47cf341 .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) diff -r 7d9bd1fe3cb0 -r 1ceec47cf341 log4-hi-mode.el --- 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)