Commit bc330842 authored by marc0s's avatar marc0s

style: fix elisp linter warnings

parent ea7dcd83
......@@ -235,6 +235,8 @@ work here..."
("M-x" . helm-M-x)
("C-x C-f" . helm-find-files))
:config
(defvar helm-mode-fuzzy-match)
(defvar helm-completion-in-region-fuzzy-match)
(add-to-list 'helm-sources-using-default-as-input 'helm-source-man-pages)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) ; rebind tab to run persistent action
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) ; make TAB works in terminal
......@@ -515,6 +517,7 @@ work here..."
:ensure t
:config
(show-paren-mode 1)
(defvar show-paren-delay)
(setq show-paren-delay 0))
(use-package typescript-mode
......@@ -551,12 +554,8 @@ work here..."
(require 'npm-mode)
(npm-global-mode))
(use-package org-jira
:init
(setq jiralib-url "https://quobis.atlassian.net")
(setq org-jira-worklog-sync-p t))
(use-package ox-reveal)
;; need manual setup
;; (use-package ox-reveal)
(use-package spaceline
:ensure t
......@@ -678,11 +677,11 @@ The destination file is derived from the CURRENT buffer file name,
(require 'term)
(defun marc0s/visit-ansi-term ()
"If the current buffer is:
1) a running ansi-term named *ansi-term*, rename it.
2) a stopped ansi-term, kill it and create a new one.
3) a non ansi-term, go to an already running ansi-term
or start a new one while killing a defunt one
Borrowed from http://www.enigmacurry.com/2008/12/26/emacs-ansi-term-tricks/"
1) a running 'ansi-term' named *ansi-term*, rename it.
2) a stopped 'ansi-term', kill it and create a new one.
3) a non 'ansi-term', go to an already running 'ansi-term'
or start a new one while killing a defunt one
Borrowed from http://www.enigmacurry.com/2008/12/26/emacs-ansi-term-tricks/"
(interactive)
(let ((is-term (string= "term-mode" major-mode))
(is-running (term-check-proc (buffer-name)))
......@@ -707,6 +706,7 @@ The destination file is derived from the CURRENT buffer file name,
(require 'ansi-color)
(defun colorize-compilation-buffer ()
"Add colors to compilation buffer."
(let ((inhibit-read-only t))
(ansi-color-apply-on-region (point-min) (point-max))))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
......@@ -716,13 +716,14 @@ The destination file is derived from the CURRENT buffer file name,
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
(defun compile-on-save-start ()
"Run compile-on-save."
(let ((buffer (compilation-find-buffer)))
(unless (get-buffer-process buffer)
(recompile))))
(defun bury-compile-buffer-if-successful (buffer string)
"Bury a compilation BUFFER if succeeded without warnings."
"Bury a compilation BUFFER (identified by STRING) if succeeded without warnings."
(when (and
(buffer-live-p buffer)
(string-match "compilation" (buffer-name buffer))
......@@ -752,23 +753,23 @@ The destination file is derived from the CURRENT buffer file name,
(setq compilation-scroll-output t)
(defun marc0s/flycheck-from-buffer-start ()
"Move point to buffer start before calling flycheck-next-error"
"Move point to buffer start before calling flycheck-next-error."
(interactive)
(save-excursion)
(goto-char (point-min))
(flycheck-next-error))
(global-set-key (kbd "<f9>") 'marc0s/flycheck-from-buffer-start)
(defun copy-line (arg)
(defun copy-line ()
"Copy lines (as many as prefix argument) in the kill ring.
Ease of use features:
- Move to start of next line.
- Appends the copy on sequential calls.
- Use newline as last char even on the last line of the buffer.
- If region is active, copy its lines."
Ease of use features:
- Move to start of next line.
- Appends the copy on sequential calls.
- Use newline as last char even on the last line of the buffer.
- If region is active, copy its lines."
(interactive "p")
(let ((beg (line-beginning-position))
(end (line-end-position arg)))
(end (line-end-position)))
(when mark-active
(if (> (point) (mark))
(setq beg (save-excursion (goto-char (mark)) (line-beginning-position)))
......@@ -777,8 +778,7 @@ The destination file is derived from the CURRENT buffer file name,
(kill-append (buffer-substring beg end) (< end beg))
(kill-ring-save beg end)))
(kill-append "\n" nil)
(beginning-of-line (or (and arg (1+ arg)) 2))
(if (and arg (not (= 1 arg))) (message "%d lines copied" arg)))
(beginning-of-line))
(global-set-key (kbd "C-c C-k") 'copy-line)
;;; SCSS helper to show RGB color
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment