summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs3
-rw-r--r--.emacs.d/lisp/yaml-mode.el34
-rw-r--r--.emacs.d/snippets/python-mode.statnett/__repr__7
-rw-r--r--.emacs.d/snippets/python-mode.statnett/__str__7
-rw-r--r--.emacs.d/snippets/python-mode.statnett/function_docstring1
-rw-r--r--.emacs.d/snippets/python-mode/__repr__7
-rw-r--r--.emacs.d/snippets/python-mode/__str__7
-rw-r--r--.emacs.d/snippets/python-mode/function_docstring1
-rw-r--r--.emacs.pure3
9 files changed, 18 insertions, 52 deletions
diff --git a/.emacs b/.emacs
index b89bcb7..50d6ae0 100644
--- a/.emacs
+++ b/.emacs
@@ -105,6 +105,9 @@
105(setq split-height-threshold nil) 105(setq split-height-threshold nil)
106(setq split-width-threshold 160) 106(setq split-width-threshold 160)
107 107
108;; disable terminal mouse by default
109(xterm-mouse-mode -1)
110
108 111
109;; Programming section 112;; Programming section
110 113
diff --git a/.emacs.d/lisp/yaml-mode.el b/.emacs.d/lisp/yaml-mode.el
index dad0380..3add6b7 100644
--- a/.emacs.d/lisp/yaml-mode.el
+++ b/.emacs.d/lisp/yaml-mode.el
@@ -6,7 +6,7 @@
6;; Marshall T. Vandegrift <llasram@gmail.com> 6;; Marshall T. Vandegrift <llasram@gmail.com>
7;; Maintainer: Vasilij Schneidermann <mail@vasilij.de> 7;; Maintainer: Vasilij Schneidermann <mail@vasilij.de>
8;; URL: https://github.com/yoshiki/yaml-mode 8;; URL: https://github.com/yoshiki/yaml-mode
9;; Package-Requires: ((emacs "24.1")) 9;; Package-Requires: ((emacs "24.3"))
10;; Keywords: data yaml 10;; Keywords: data yaml
11;; Version: 0.0.16 11;; Version: 0.0.16
12 12
@@ -109,7 +109,7 @@ that key is pressed to begin a block literal."
109 :group 'yaml) 109 :group 'yaml)
110 110
111(defcustom yaml-imenu-generic-expression 111(defcustom yaml-imenu-generic-expression
112 '((nil "^\\(:?[a-zA-Z_-]+\\):" 1)) 112 '((nil "^\\(:?[a-zA-Z_][-a-zA-Z0-9_.]*\\):" 1))
113 "The imenu regex to parse an outline of the yaml file." 113 "The imenu regex to parse an outline of the yaml file."
114 :type 'string 114 :type 'string
115 :group 'yaml) 115 :group 'yaml)
@@ -218,17 +218,17 @@ that key is pressed to begin a block literal."
218(define-derived-mode yaml-mode text-mode "YAML" 218(define-derived-mode yaml-mode text-mode "YAML"
219 "Simple mode to edit YAML." 219 "Simple mode to edit YAML."
220 (setq-local electric-indent-inhibit t) ;We can't *re*indent reliably. 220 (setq-local electric-indent-inhibit t) ;We can't *re*indent reliably.
221 (set (make-local-variable 'comment-start) "# ") 221 (setq-local comment-start "# ")
222 (set (make-local-variable 'comment-start-skip) "#+ *") 222 (setq-local comment-start-skip "#+ *")
223 (set (make-local-variable 'comment-end) "") 223 (setq-local comment-end "")
224 (set (make-local-variable 'indent-line-function) #'yaml-indent-line) 224 (setq-local indent-line-function #'yaml-indent-line)
225 (set (make-local-variable 'indent-tabs-mode) nil) 225 (setq-local indent-tabs-mode nil)
226 (set (make-local-variable 'fill-paragraph-function) #'yaml-fill-paragraph) 226 (setq-local fill-paragraph-function #'yaml-fill-paragraph)
227 (set (make-local-variable 'page-delimiter) "^---\\([ \t].*\\)*\n") 227 (setq-local page-delimiter "^---\\([ \t].*\\)*\n")
228 228
229 (set (make-local-variable 'syntax-propertize-function) 229 (setq-local syntax-propertize-function #'yaml-mode-syntax-propertize-function)
230 #'yaml-mode-syntax-propertize-function) 230 (setq-local imenu-generic-expression yaml-imenu-generic-expression)
231 (setq font-lock-defaults '(yaml-font-lock-keywords))) 231 (setq-local font-lock-defaults '(yaml-font-lock-keywords)))
232 232
233 233
234;; Font-lock support 234;; Font-lock support
@@ -464,16 +464,6 @@ this will do usual adaptive fill behaviors."
464 (or (fill-comment-paragraph justify) 464 (or (fill-comment-paragraph justify)
465 (fill-paragraph justify region))))) 465 (fill-paragraph justify region)))))
466 466
467(defun yaml-set-imenu-generic-expression ()
468 ;; FIXME: Why set this var to its default value?
469 (setq-local imenu-create-index-function #'imenu-default-create-index-function)
470 (setq-local imenu-generic-expression yaml-imenu-generic-expression))
471
472;; FIXME: Why not inline `yaml-set-imenu-generic-expression' into the
473;; major mode function?
474(add-hook 'yaml-mode-hook #'yaml-set-imenu-generic-expression)
475
476
477(defun yaml-mode-version () 467(defun yaml-mode-version ()
478 "Display version of `yaml-mode'." 468 "Display version of `yaml-mode'."
479 (interactive) 469 (interactive)
diff --git a/.emacs.d/snippets/python-mode.statnett/__repr__ b/.emacs.d/snippets/python-mode.statnett/__repr__
deleted file mode 100644
index 85cb80f..0000000
--- a/.emacs.d/snippets/python-mode.statnett/__repr__
+++ /dev/null
@@ -1,7 +0,0 @@
1# -*- mode: snippet -*-
2# name: __repr__
3# key: _repr
4# group: Special methods
5# --
6def __repr__(self):
7 return $0
diff --git a/.emacs.d/snippets/python-mode.statnett/__str__ b/.emacs.d/snippets/python-mode.statnett/__str__
deleted file mode 100644
index f623df7..0000000
--- a/.emacs.d/snippets/python-mode.statnett/__str__
+++ /dev/null
@@ -1,7 +0,0 @@
1# -*- mode: snippet -*-
2# name: __str__
3# key: _str
4# group: Special methods
5# --
6def __str__(self):
7 return $0
diff --git a/.emacs.d/snippets/python-mode.statnett/function_docstring b/.emacs.d/snippets/python-mode.statnett/function_docstring
index 685eaf5..1f7f35b 100644
--- a/.emacs.d/snippets/python-mode.statnett/function_docstring
+++ b/.emacs.d/snippets/python-mode.statnett/function_docstring
@@ -2,7 +2,6 @@
2# name: function_docstring 2# name: function_docstring
3# key: fd 3# key: fd
4# group: definitions 4# group: definitions
5# NOTE: Use minimum indentation, because Emacs 25+ doesn't dedent docstrings.
6# -- 5# --
7def ${1:name}($2): 6def ${1:name}($2):
8 \"\"\"$3 7 \"\"\"$3
diff --git a/.emacs.d/snippets/python-mode/__repr__ b/.emacs.d/snippets/python-mode/__repr__
deleted file mode 100644
index 85cb80f..0000000
--- a/.emacs.d/snippets/python-mode/__repr__
+++ /dev/null
@@ -1,7 +0,0 @@
1# -*- mode: snippet -*-
2# name: __repr__
3# key: _repr
4# group: Special methods
5# --
6def __repr__(self):
7 return $0
diff --git a/.emacs.d/snippets/python-mode/__str__ b/.emacs.d/snippets/python-mode/__str__
deleted file mode 100644
index f623df7..0000000
--- a/.emacs.d/snippets/python-mode/__str__
+++ /dev/null
@@ -1,7 +0,0 @@
1# -*- mode: snippet -*-
2# name: __str__
3# key: _str
4# group: Special methods
5# --
6def __str__(self):
7 return $0
diff --git a/.emacs.d/snippets/python-mode/function_docstring b/.emacs.d/snippets/python-mode/function_docstring
index 685eaf5..1f7f35b 100644
--- a/.emacs.d/snippets/python-mode/function_docstring
+++ b/.emacs.d/snippets/python-mode/function_docstring
@@ -2,7 +2,6 @@
2# name: function_docstring 2# name: function_docstring
3# key: fd 3# key: fd
4# group: definitions 4# group: definitions
5# NOTE: Use minimum indentation, because Emacs 25+ doesn't dedent docstrings.
6# -- 5# --
7def ${1:name}($2): 6def ${1:name}($2):
8 \"\"\"$3 7 \"\"\"$3
diff --git a/.emacs.pure b/.emacs.pure
index 9dc4f05..71852b8 100644
--- a/.emacs.pure
+++ b/.emacs.pure
@@ -105,6 +105,9 @@
105(setq split-height-threshold nil) 105(setq split-height-threshold nil)
106(setq split-width-threshold 160) 106(setq split-width-threshold 160)
107 107
108;; disable terminal mouse by default
109(xterm-mouse-mode -1)
110
108 111
109;; Programming section 112;; Programming section
110 113