From: Andreas Gerler Date: Tue, 13 Nov 2018 11:09:53 +0000 (+0100) Subject: update flymake. X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=84cc39daa40b1545757de9ee5be6d61b61100d3c;p=emacsconfig.git update flymake. Signed-off-by: Andreas Gerler --- diff --git a/elpa/flymake-easy-20140818.55/flymake-easy-autoloads.el b/elpa/flymake-easy-20140818.55/flymake-easy-autoloads.el deleted file mode 100644 index 56c7e52d..00000000 --- a/elpa/flymake-easy-20140818.55/flymake-easy-autoloads.el +++ /dev/null @@ -1,16 +0,0 @@ -;;; flymake-easy-autoloads.el --- automatically extracted autoloads -;; -;;; Code: -(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) - -;;;### (autoloads nil nil ("flymake-easy.el") (22030 38967 706066 -;;;;;; 0)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; End: -;;; flymake-easy-autoloads.el ends here diff --git a/elpa/flymake-easy-20140818.55/flymake-easy-pkg.el b/elpa/flymake-easy-20140818.55/flymake-easy-pkg.el deleted file mode 100644 index b0cce196..00000000 --- a/elpa/flymake-easy-20140818.55/flymake-easy-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "flymake-easy" "20140818.55" "Helpers for easily building flymake checkers" 'nil :url "https://github.com/purcell/flymake-easy" :keywords '("convenience" "internal")) diff --git a/elpa/flymake-easy-20140818.55/flymake-easy.el b/elpa/flymake-easy-20140818.55/flymake-easy.el deleted file mode 100644 index f20f31f0..00000000 --- a/elpa/flymake-easy-20140818.55/flymake-easy.el +++ /dev/null @@ -1,151 +0,0 @@ -;;; flymake-easy.el --- Helpers for easily building flymake checkers - -;; Copyright (C) 2012 Steve Purcell - -;; Author: Steve Purcell -;; URL: https://github.com/purcell/flymake-easy -;; Package-Version: 20140818.55 -;; Version: DEV -;; Keywords: convenience, internal - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;; This library provides the `flymake-easy-load' helper function for -;; setting up flymake checkers. Just call that function with the -;; appropriate arguments in a major mode hook function. See -;; `flymake-ruby' for an example: -;; https://github.com/purcell/flymake-ruby - -;;; Code: - -(require 'flymake) - -(defvar flymake-easy--active nil - "Indicates when flymake-easy-load has successfully run in this buffer.") -(defvar flymake-easy--command-fn nil - "The user-specified function for building the flymake command.") -(defvar flymake-easy--location nil - "Where to create the temp file when checking, one of 'tempdir, 'inplace or -'temp-with-folder.") -(defvar flymake-easy--extension nil - "The canonical file name extension to use for the current file.") - -(mapc 'make-variable-buffer-local - '(flymake-easy--active - flymake-easy--command-fn - flymake-easy--location - flymake-easy--extension)) - -(defun flymake-easy--tempfile-in-temp-dir (file-name prefix) - "Create a temporary file for storing the contents of FILE-NAME in the system tempdir. -Argument PREFIX temp file prefix, supplied by flymake." - (make-temp-file (or prefix "flymake-easy") - nil - (concat "." flymake-easy--extension))) - -(defun flymake-easy--flymake-init () - "A catch-all flymake init function for use in `flymake-allowed-file-name-masks'." - (let* ((tempfile - (flymake-init-create-temp-buffer-copy - (cond - ((eq 'tempdir flymake-easy--location) - 'flymake-easy--tempfile-in-temp-dir) - ((eq 'inplace flymake-easy--location) - 'flymake-create-temp-inplace) - ((eq 'temp-with-folder flymake-easy--location) - 'flymake-create-temp-with-folder-structure) - (t - (error "unknown location for flymake-easy: %s" flymake-easy--location))))) - (command (funcall flymake-easy--command-fn tempfile))) - (list (car command) (cdr command)))) - -(defun flymake-easy-exclude-buffer-p () - "Whether to skip flymake in the current buffer." - (and (fboundp 'tramp-tramp-file-p) - (buffer-file-name) - (tramp-tramp-file-p (buffer-file-name)))) - -(defun flymake-easy-load (command-fn &optional err-line-patterns location extension warning-re info-re) - "Enable flymake in the containing buffer using a specific narrow configuration. -Argument COMMAND-FN function called to build the - command line to run (receives filename, returns list). -Argument ERR-LINE-PATTERNS patterns for identifying errors (see `flymake-err-line-patterns'). -Argument EXTENSION a canonical extension for this type of source file, e.g. \"rb\". -Argument LOCATION where to create the temporary copy: one of 'tempdir (default), 'inplace or 'temp-with-folder -Argument WARNING-RE a pattern which identifies error messages as warnings. -Argument INFO-RE a pattern which identifies messages as infos (supported only -by the flymake fork at https://github.com/illusori/emacs-flymake)." - (let ((executable (car (funcall command-fn "dummy")))) - (if (executable-find executable) ;; TODO: defer this checking - (unless (flymake-easy-exclude-buffer-p) - (setq flymake-easy--command-fn command-fn - flymake-easy--location (or location 'tempdir) - flymake-easy--extension extension - flymake-easy--active t) - (set (make-local-variable 'flymake-allowed-file-name-masks) - '(("." flymake-easy--flymake-init))) - (when err-line-patterns - (set (make-local-variable 'flymake-err-line-patterns) err-line-patterns)) - (dolist (var '(flymake-warning-re flymake-warn-line-regexp)) - (set (make-local-variable var) (or warning-re "^[wW]arn"))) - (when (boundp 'flymake-info-line-regexp) - (set (make-local-variable 'flymake-info-line-regexp) - (or info-re "^[iI]nfo"))) - (flymake-mode t)) - (message "Not enabling flymake: '%s' program not found" executable)))) - -;; Internal overrides for flymake - -(defun flymake-easy--find-all-matches (str) - "Return every match for `flymake-err-line-patterns' in STR. - -This is a judicious override for `flymake-split-output', enabled -by the advice below, which allows for matching multi-line -patterns." - (let (matches - (last-match-end-pos 0)) - (dolist (pattern flymake-err-line-patterns) - (let ((regex (car pattern)) - (pos 0)) - (while (string-match regex str pos) - (push (match-string 0 str) matches) - (setq pos (match-end 0))) - (setq last-match-end-pos (max pos last-match-end-pos)))) - (let ((residual (substring str last-match-end-pos))) - (list matches - (unless (string= "" residual) residual))))) - -(defadvice flymake-split-output (around flymake-easy--split-output (output) activate protect) - "Override `flymake-split-output' to support mult-line error messages." - (setq ad-return-value (if flymake-easy--active - (flymake-easy--find-all-matches output) - ad-do-it))) - - -(defadvice flymake-post-syntax-check (before flymake-easy--force-check-was-interrupted activate) - (when flymake-easy--active - (setq flymake-check-was-interrupted t))) - - -(provide 'flymake-easy) - -;; Local Variables: -;; coding: utf-8 -;; byte-compile-warnings: (not cl-functions) -;; eval: (checkdoc-minor-mode 1) -;; End: - -;;; flymake-easy.el ends here diff --git a/elpa/flymake-easy-20140818.755/flymake-easy-autoloads.el b/elpa/flymake-easy-20140818.755/flymake-easy-autoloads.el new file mode 100644 index 00000000..f7377712 --- /dev/null +++ b/elpa/flymake-easy-20140818.755/flymake-easy-autoloads.el @@ -0,0 +1,22 @@ +;;; flymake-easy-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "flymake-easy" "flymake-easy.el" (0 0 0 0)) +;;; Generated autoloads from flymake-easy.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flymake-easy" '("flymake-easy-"))) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; flymake-easy-autoloads.el ends here diff --git a/elpa/flymake-easy-20140818.755/flymake-easy-pkg.el b/elpa/flymake-easy-20140818.755/flymake-easy-pkg.el new file mode 100644 index 00000000..a2f59d5f --- /dev/null +++ b/elpa/flymake-easy-20140818.755/flymake-easy-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "flymake-easy" "20140818.755" "Helpers for easily building flymake checkers" 'nil :commit "de41ea49503f71f997e5c359a2ad08df696c0147" :keywords '("convenience" "internal") :authors '(("Steve Purcell" . "steve@sanityinc.com")) :maintainer '("Steve Purcell" . "steve@sanityinc.com") :url "https://github.com/purcell/flymake-easy") diff --git a/elpa/flymake-easy-20140818.755/flymake-easy.el b/elpa/flymake-easy-20140818.755/flymake-easy.el new file mode 100644 index 00000000..f5820f77 --- /dev/null +++ b/elpa/flymake-easy-20140818.755/flymake-easy.el @@ -0,0 +1,151 @@ +;;; flymake-easy.el --- Helpers for easily building flymake checkers + +;; Copyright (C) 2012 Steve Purcell + +;; Author: Steve Purcell +;; URL: https://github.com/purcell/flymake-easy +;; Package-Version: 20140818.755 +;; Version: DEV +;; Keywords: convenience, internal + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This library provides the `flymake-easy-load' helper function for +;; setting up flymake checkers. Just call that function with the +;; appropriate arguments in a major mode hook function. See +;; `flymake-ruby' for an example: +;; https://github.com/purcell/flymake-ruby + +;;; Code: + +(require 'flymake) + +(defvar flymake-easy--active nil + "Indicates when flymake-easy-load has successfully run in this buffer.") +(defvar flymake-easy--command-fn nil + "The user-specified function for building the flymake command.") +(defvar flymake-easy--location nil + "Where to create the temp file when checking, one of 'tempdir, 'inplace or +'temp-with-folder.") +(defvar flymake-easy--extension nil + "The canonical file name extension to use for the current file.") + +(mapc 'make-variable-buffer-local + '(flymake-easy--active + flymake-easy--command-fn + flymake-easy--location + flymake-easy--extension)) + +(defun flymake-easy--tempfile-in-temp-dir (file-name prefix) + "Create a temporary file for storing the contents of FILE-NAME in the system tempdir. +Argument PREFIX temp file prefix, supplied by flymake." + (make-temp-file (or prefix "flymake-easy") + nil + (concat "." flymake-easy--extension))) + +(defun flymake-easy--flymake-init () + "A catch-all flymake init function for use in `flymake-allowed-file-name-masks'." + (let* ((tempfile + (flymake-init-create-temp-buffer-copy + (cond + ((eq 'tempdir flymake-easy--location) + 'flymake-easy--tempfile-in-temp-dir) + ((eq 'inplace flymake-easy--location) + 'flymake-create-temp-inplace) + ((eq 'temp-with-folder flymake-easy--location) + 'flymake-create-temp-with-folder-structure) + (t + (error "unknown location for flymake-easy: %s" flymake-easy--location))))) + (command (funcall flymake-easy--command-fn tempfile))) + (list (car command) (cdr command)))) + +(defun flymake-easy-exclude-buffer-p () + "Whether to skip flymake in the current buffer." + (and (fboundp 'tramp-tramp-file-p) + (buffer-file-name) + (tramp-tramp-file-p (buffer-file-name)))) + +(defun flymake-easy-load (command-fn &optional err-line-patterns location extension warning-re info-re) + "Enable flymake in the containing buffer using a specific narrow configuration. +Argument COMMAND-FN function called to build the + command line to run (receives filename, returns list). +Argument ERR-LINE-PATTERNS patterns for identifying errors (see `flymake-err-line-patterns'). +Argument EXTENSION a canonical extension for this type of source file, e.g. \"rb\". +Argument LOCATION where to create the temporary copy: one of 'tempdir (default), 'inplace or 'temp-with-folder +Argument WARNING-RE a pattern which identifies error messages as warnings. +Argument INFO-RE a pattern which identifies messages as infos (supported only +by the flymake fork at https://github.com/illusori/emacs-flymake)." + (let ((executable (car (funcall command-fn "dummy")))) + (if (executable-find executable) ;; TODO: defer this checking + (unless (flymake-easy-exclude-buffer-p) + (setq flymake-easy--command-fn command-fn + flymake-easy--location (or location 'tempdir) + flymake-easy--extension extension + flymake-easy--active t) + (set (make-local-variable 'flymake-allowed-file-name-masks) + '(("." flymake-easy--flymake-init))) + (when err-line-patterns + (set (make-local-variable 'flymake-err-line-patterns) err-line-patterns)) + (dolist (var '(flymake-warning-re flymake-warn-line-regexp)) + (set (make-local-variable var) (or warning-re "^[wW]arn"))) + (when (boundp 'flymake-info-line-regexp) + (set (make-local-variable 'flymake-info-line-regexp) + (or info-re "^[iI]nfo"))) + (flymake-mode t)) + (message "Not enabling flymake: '%s' program not found" executable)))) + +;; Internal overrides for flymake + +(defun flymake-easy--find-all-matches (str) + "Return every match for `flymake-err-line-patterns' in STR. + +This is a judicious override for `flymake-split-output', enabled +by the advice below, which allows for matching multi-line +patterns." + (let (matches + (last-match-end-pos 0)) + (dolist (pattern flymake-err-line-patterns) + (let ((regex (car pattern)) + (pos 0)) + (while (string-match regex str pos) + (push (match-string 0 str) matches) + (setq pos (match-end 0))) + (setq last-match-end-pos (max pos last-match-end-pos)))) + (let ((residual (substring str last-match-end-pos))) + (list matches + (unless (string= "" residual) residual))))) + +(defadvice flymake-split-output (around flymake-easy--split-output (output) activate protect) + "Override `flymake-split-output' to support mult-line error messages." + (setq ad-return-value (if flymake-easy--active + (flymake-easy--find-all-matches output) + ad-do-it))) + + +(defadvice flymake-post-syntax-check (before flymake-easy--force-check-was-interrupted activate) + (when flymake-easy--active + (setq flymake-check-was-interrupted t))) + + +(provide 'flymake-easy) + +;; Local Variables: +;; coding: utf-8 +;; byte-compile-warnings: (not cl-functions) +;; eval: (checkdoc-minor-mode 1) +;; End: + +;;; flymake-easy.el ends here diff --git a/elpa/flymake-puppet-20141006.1855/flymake-puppet-autoloads.el b/elpa/flymake-puppet-20141006.1855/flymake-puppet-autoloads.el deleted file mode 100644 index fcfa26c0..00000000 --- a/elpa/flymake-puppet-20141006.1855/flymake-puppet-autoloads.el +++ /dev/null @@ -1,22 +0,0 @@ -;;; flymake-puppet-autoloads.el --- automatically extracted autoloads -;; -;;; Code: -(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) - -;;;### (autoloads nil "flymake-puppet" "flymake-puppet.el" (22030 -;;;;;; 38968 0 0)) -;;; Generated autoloads from flymake-puppet.el - -(autoload 'flymake-puppet-load "flymake-puppet" "\ -Configure flymake mode to check the current buffer's puppet syntax. - -\(fn)" t nil) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; End: -;;; flymake-puppet-autoloads.el ends here diff --git a/elpa/flymake-puppet-20141006.1855/flymake-puppet-pkg.el b/elpa/flymake-puppet-20141006.1855/flymake-puppet-pkg.el deleted file mode 100644 index 61710f49..00000000 --- a/elpa/flymake-puppet-20141006.1855/flymake-puppet-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "flymake-puppet" "20141006.1855" "An Emacs flymake handler for syntax-checking puppet using puppet-lint" '((flymake-easy "0.9")) :url "https://github.com/benprew/flymake-puppet") diff --git a/elpa/flymake-puppet-20141006.1855/flymake-puppet.el b/elpa/flymake-puppet-20141006.1855/flymake-puppet.el deleted file mode 100644 index e26a1896..00000000 --- a/elpa/flymake-puppet-20141006.1855/flymake-puppet.el +++ /dev/null @@ -1,39 +0,0 @@ -;;; flymake-puppet.el --- An Emacs flymake handler for syntax-checking puppet using puppet-lint - -;; Copyright 2013 Ben Prew - -;; Author: Ben Prew -;; URL: https://github.com/benprew/flymake-puppet -;; Package-Version: 20141006.1855 -;; Version: 1.0.0 -;; Package-Requires: ((flymake-easy "0.9")) - - -(require 'flymake-easy) - -(defconst flymake-puppet-err-line-patterns - '(("\\(.*line \\([0-9]+\\).*\\)" nil 2 nil 1) - ("\\(.*.rb:[0-9]+.*\\)" nil nil nil 1))) - -(defvar flymake-puppet-executable "puppet-lint" - "The executable to use for puppet-lint") - -(defvar flymake-puppet-options nil "Puppet-lint options") - -(defun flymake-puppet-command (filename) - "Construct a command that flymake can use to check puppet source." - (append (list flymake-puppet-executable) flymake-puppet-options - (list filename))) - -;;;###autoload -(defun flymake-puppet-load () - "Configure flymake mode to check the current buffer's puppet syntax." - (interactive) - (flymake-easy-load 'flymake-puppet-command - flymake-puppet-err-line-patterns - 'tempdir - "pp")) - -(provide 'flymake-puppet) - -;;; flymake-puppet.el ends here diff --git a/elpa/flymake-puppet-20170801.554/flymake-puppet-autoloads.el b/elpa/flymake-puppet-20170801.554/flymake-puppet-autoloads.el new file mode 100644 index 00000000..d363f4a3 --- /dev/null +++ b/elpa/flymake-puppet-20170801.554/flymake-puppet-autoloads.el @@ -0,0 +1,28 @@ +;;; flymake-puppet-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "flymake-puppet" "flymake-puppet.el" (0 0 0 +;;;;;; 0)) +;;; Generated autoloads from flymake-puppet.el + +(autoload 'flymake-puppet-load "flymake-puppet" "\ +Configure flymake mode to check the current buffer's puppet syntax. + +\(fn)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flymake-puppet" '("flymake-puppet-"))) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; flymake-puppet-autoloads.el ends here diff --git a/elpa/flymake-puppet-20170801.554/flymake-puppet-pkg.el b/elpa/flymake-puppet-20170801.554/flymake-puppet-pkg.el new file mode 100644 index 00000000..8e78b671 --- /dev/null +++ b/elpa/flymake-puppet-20170801.554/flymake-puppet-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "flymake-puppet" "20170801.554" "Flymake handler using puppet-lint" '((flymake-easy "0.9")) :commit "8a772395f4ccc59d883712ab53a92a17c1d9a429" :authors '(("Ben Prew")) :maintainer '("Ben Prew") :url "https://github.com/benprew/flymake-puppet") diff --git a/elpa/flymake-puppet-20170801.554/flymake-puppet.el b/elpa/flymake-puppet-20170801.554/flymake-puppet.el new file mode 100644 index 00000000..81ef9ba8 --- /dev/null +++ b/elpa/flymake-puppet-20170801.554/flymake-puppet.el @@ -0,0 +1,58 @@ +;;; flymake-puppet.el --- Flymake handler using puppet-lint + +;; Copyright 2013 Ben Prew + +;; Author: Ben Prew +;; URL: https://github.com/benprew/flymake-puppet +;; Package-Version: 20170801.554 +;; Version: 1.0.0 +;; Package-Requires: ((flymake-easy "0.9")) + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; This package implements a flymake handler for syntax-checking +;; puppet using puppet-lint. + +;;; Code: + +(require 'flymake-easy) + +(defconst flymake-puppet-err-line-patterns + '(("\\(.*line \\([0-9]+\\).*\\)" nil 2 nil 1) + ("\\(.*.rb:[0-9]+.*\\)" nil nil nil 1))) + +(defvar flymake-puppet-executable "puppet-lint" + "The executable to use for puppet-lint") + +(defvar flymake-puppet-options nil "Puppet-lint options") + +(defun flymake-puppet-command (filename) + "Construct a command that flymake can use to check puppet source." + (append (list flymake-puppet-executable) flymake-puppet-options + (list filename))) + +;;;###autoload +(defun flymake-puppet-load () + "Configure flymake mode to check the current buffer's puppet syntax." + (interactive) + (flymake-easy-load 'flymake-puppet-command + flymake-puppet-err-line-patterns + 'tempdir + "pp")) + +(provide 'flymake-puppet) + +;;; flymake-puppet.el ends here