emacsd / init-ncl.el

Full commit
;;; init-ncl.el
;; Copyright (C) Yagnesh Raghava Yakkala.

;; this line associates ncl-mode with the lisp package that defines it.

(autoload 'ncl-mode "ncl" "ncl-mode for editing ncar graphics" t)
(add-to-list 'ac-dictionary-directories

;;; append to the last
(setq yas/snippet-dirs
      (append yas/snippet-dirs '("~/.emacs.d/el-get/ncl/snippets/")))

(setq auto-mode-alist (cons '("\.ncl$" . ncl-mode) auto-mode-alist))
(setq ncl-startup-message nil)

;;; (add-hook 'ncl-mode-hook 'ncl-doc)

;;; imenu support for ncl-mode
(add-hook 'ncl-mode-hook
          (lambda ()
            (require 'ncl-doc)
            (ncl-doc-minor-mode 1)
            (make-local-variable browse-url-browser-function)
            (setq browse-url-browser-function 'w3m)

(setq ncl-doc-url-base "")
;(setq ncl-doc-url-base (directory-file-name "file:///home/yagnesh/docs/ncl"))

(defun ncl-del-comment-indentation ()
  "remove line beginning comment indentation"
  (interactive "r")
    (goto-char (point-min))
    (replace-regexp "^[ \t]*;*" ";")))

;;; init-ncl.el ends here