Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/sheijk/merlin into sheijk…

…-master
  • Loading branch information...
commit 98cdbed016b07bd77f2e14178557771302b98593 2 parents 730e9e6 + 6e68cf9
@asmanur asmanur authored
Showing with 14 additions and 13 deletions.
  1. +14 −13 emacs/merlin.el
View
27 emacs/merlin.el
@@ -48,10 +48,20 @@
:group 'merlin)
(defface merlin-type-face
- '((t :inherit 'caml-types-expr-face))
+ '((t :inherit caml-types-expr-face))
"Face for highlighting a typed expr."
:group 'merlin)
+(defface merlin-compilation-warning-face
+ '((t :inherit compilation-error))
+ "If non-nil, face to use to highlight merlin warnings."
+ :group 'merlin)
+
+(defface merlin-compilation-error-face
+ '((t :inherit compilation-warning))
+ "If non-nil, face to use to highlight merlin errors."
+ :group 'merlin)
+
;;
;; Customizable vars
;;
@@ -138,15 +148,6 @@ In particular you can specify nil, meaning that the locked zone is not represent
"If non-nil, when locate opens a new window it will give it the focus."
:group 'merlin :type 'boolean)
-(defcustom merlin-compilation-warning-face 'compilation-warning-face
- "If non-nil, face to use to highlight merlin warnings."
- :group 'merlin :type '(choice symbol (const :tag "Disable" nil)))
-
-(defcustom merlin-compilation-error-face 'compilation-error-face
- "If non-nil, face to use to highlight merlin errors."
- :group 'merlin :type '(choice symbol (const :tag "Disable" nil)))
-
-
;;;;;;;;;;;;;;;;;;;;;;;;
;; Internal variables ;;
;;;;;;;;;;;;;;;;;;;;;;;;
@@ -319,7 +320,7 @@ An ocaml atom is any string containing [a-z_0-9A-Z`.]."
(defun merlin-put-margin-overlay (overlay string &optional face)
"Put a margin overlay inside OVERLAY, with face FACE and string STRING."
(set-window-margins nil 1)
- (when face (overlay-put overlay 'face (eval face)))
+ (when face (overlay-put overlay 'face face))
(overlay-put overlay 'before-string
(propertize " " 'display `((margin left-margin) ,string))))
@@ -775,10 +776,10 @@ If there is no error, do nothing."
(if (merlin-error-warning-p (cdr (assoc 'message err)))
(merlin-put-margin-overlay overlay
merlin-margin-warning-string
- merlin-compilation-warning-face)
+ 'merlin-compilation-warning-face)
(merlin-put-margin-overlay overlay
merlin-margin-error-string
- merlin-compilation-error-face))
+ 'merlin-compilation-error-face))
overlay)))
(errors (mapcar err-point errors)))
(setq merlin-pending-errors errors)
Please sign in to comment.
Something went wrong with that request. Please try again.