diff options
| author | João Távora | 2017-08-23 23:18:05 +0100 |
|---|---|---|
| committer | João Távora | 2017-10-03 13:49:04 +0100 |
| commit | bb8b663d327e79eb271b467317c283cc884106ac (patch) | |
| tree | 0596c22edbce8514da44c22b0516bdd01cdc91a4 | |
| parent | 6954270e87e3a9f829cd6e8c89febc2c0bc48845 (diff) | |
| download | emacs-bb8b663d327e79eb271b467317c283cc884106ac.tar.gz emacs-bb8b663d327e79eb271b467317c283cc884106ac.zip | |
Move symbols in flymake-proc.el to separate namespace
Every symbol in this flymake now starts with the prefix flymake-proc-.
Make obsolete aliases for (almost?) every symbol.
Furthermore, many flymake-proc.el symbols are prefixed with
"flymake-proc--", that is they were considered internal.
Some customization variables, interactive functions, and other symbols
considered useful to user customizations or third-party libraries are
considered "public" or "external" and so use a "flymake-proc-" prefix.
* lisp/progmodes/flymake-proc.el: Every symbol renamed.
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--current-face): Use
flymake-proc-warning-predicate, not flymake-warning-predicate.
* lisp/progmodes/flymake-proc.el
(flymake-proc--get-project-include-dirs-function)
(flymake-proc--get-project-include-dirs-imp)
(flymake-proc--get-include-dirs-dot) (flymake-proc--get-tex-args)
(flymake-proc--find-make-buildfile)
(flymake-proc--get-syntax-check-program-args)
(flymake-proc--init-create-temp-source-and-master-buffer-copy)
(flymake-proc--init-find-buildfile-dir)
(flymake-proc--get-full-nonpatched-file-name)
(flymake-proc--get-full-patched-file-name) (flymake-proc--base-dir,
flymake-proc--temp-master-file-name) (flymake-proc--master-file-name)
(flymake-proc--temp-source-file-name)
(flymake-proc--delete-temp-directory) (flymake-proc--kill-process)
(flymake-proc--start-syntax-check-process)
(flymake-proc--compilation-is-running)
(flymake-proc--safe-delete-directory) (flymake-proc--safe-delete-file)
(flymake-proc--get-program-dir) (flymake-proc--restore-formatting)
(flymake-proc--clear-project-include-dirs-cache)
(flymake-proc--project-include-dirs-cache)
(flymake-proc--get-system-include-dirs)
(flymake-proc--get-project-include-dirs)
(flymake-proc--add-project-include-dirs-to-cache)
(flymake-proc--get-project-include-dirs-from-cache)
(flymake-proc--post-syntax-check) (flymake-proc--process-sentinel)
(flymake-proc--process-filter) (flymake-proc--create-master-file)
(flymake-proc--find-buffer-for-file)
(flymake-proc--copy-buffer-to-temp-buffer)
(flymake-proc--read-file-to-temp-buffer)
(flymake-proc--save-buffer-in-file) (flymake-proc--replace-region,
flymake-proc--check-include)
(flymake-proc--check-patch-master-file-buffer)
(flymake-proc--master-file-compare)
(flymake-proc--find-possible-master-files)
(flymake-proc--included-file-name, flymake-proc--same-files)
(flymake-proc--fix-file-name, flymake-proc--find-buildfile)
(flymake-proc--clear-buildfile-cache)
(flymake-proc--add-buildfile-to-cache)
(flymake-proc--get-buildfile-from-cache)
(flymake-proc--find-buildfile-cache)
(flymake-proc--get-real-file-name-function)
(flymake-proc--get-cleanup-function) (flymake-proc--get-init-function)
(flymake-proc--get-file-name-mode-and-masks)
(flymake-proc--processes): Rename to internal symbol from
flymake-proc- version.
| -rw-r--r-- | lisp/progmodes/flymake-proc.el | 757 | ||||
| -rw-r--r-- | test/lisp/progmodes/flymake-tests.el | 2 |
2 files changed, 532 insertions, 227 deletions
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index dae118eb4f1..bdfdf9afcb4 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el | |||
| @@ -39,40 +39,40 @@ | |||
| 39 | 39 | ||
| 40 | (require 'flymake) | 40 | (require 'flymake) |
| 41 | 41 | ||
| 42 | (defcustom flymake-compilation-prevents-syntax-check t | 42 | (defcustom flymake-proc-compilation-prevents-syntax-check t |
| 43 | "If non-nil, don't start syntax check if compilation is running." | 43 | "If non-nil, don't start syntax check if compilation is running." |
| 44 | :group 'flymake | 44 | :group 'flymake |
| 45 | :type 'boolean) | 45 | :type 'boolean) |
| 46 | 46 | ||
| 47 | (defcustom flymake-xml-program | 47 | (defcustom flymake-proc-xml-program |
| 48 | (if (executable-find "xmlstarlet") "xmlstarlet" "xml") | 48 | (if (executable-find "xmlstarlet") "xmlstarlet" "xml") |
| 49 | "Program to use for XML validation." | 49 | "Program to use for XML validation." |
| 50 | :type 'file | 50 | :type 'file |
| 51 | :group 'flymake | 51 | :group 'flymake |
| 52 | :version "24.4") | 52 | :version "24.4") |
| 53 | 53 | ||
| 54 | (defcustom flymake-master-file-dirs '("." "./src" "./UnitTest") | 54 | (defcustom flymake-proc-master-file-dirs '("." "./src" "./UnitTest") |
| 55 | "Dirs where to look for master files." | 55 | "Dirs where to look for master files." |
| 56 | :group 'flymake | 56 | :group 'flymake |
| 57 | :type '(repeat (string))) | 57 | :type '(repeat (string))) |
| 58 | 58 | ||
| 59 | (defcustom flymake-master-file-count-limit 32 | 59 | (defcustom flymake-proc-master-file-count-limit 32 |
| 60 | "Max number of master files to check." | 60 | "Max number of master files to check." |
| 61 | :group 'flymake | 61 | :group 'flymake |
| 62 | :type 'integer) | 62 | :type 'integer) |
| 63 | 63 | ||
| 64 | (defcustom flymake-allowed-file-name-masks | 64 | (defcustom flymake-proc-allowed-file-name-masks |
| 65 | '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init) | 65 | '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-proc-simple-make-init) |
| 66 | ("\\.xml\\'" flymake-xml-init) | 66 | ("\\.xml\\'" flymake-proc-xml-init) |
| 67 | ("\\.html?\\'" flymake-xml-init) | 67 | ("\\.html?\\'" flymake-proc-xml-init) |
| 68 | ("\\.cs\\'" flymake-simple-make-init) | 68 | ("\\.cs\\'" flymake-proc-simple-make-init) |
| 69 | ("\\.p[ml]\\'" flymake-perl-init) | 69 | ("\\.p[ml]\\'" flymake-proc-perl-init) |
| 70 | ("\\.php[345]?\\'" flymake-php-init) | 70 | ("\\.php[345]?\\'" flymake-proc-php-init) |
| 71 | ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup) | 71 | ("\\.h\\'" flymake-proc-master-make-header-init flymake-proc-master-cleanup) |
| 72 | ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup) | 72 | ("\\.java\\'" flymake-proc-simple-make-java-init flymake-proc-simple-java-cleanup) |
| 73 | ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup) | 73 | ("[0-9]+\\.tex\\'" flymake-proc-master-tex-init flymake-proc-master-cleanup) |
| 74 | ("\\.tex\\'" flymake-simple-tex-init) | 74 | ("\\.tex\\'" flymake-proc-simple-tex-init) |
| 75 | ("\\.idl\\'" flymake-simple-make-init) | 75 | ("\\.idl\\'" flymake-proc-simple-make-init) |
| 76 | ;; ("\\.cpp\\'" 1) | 76 | ;; ("\\.cpp\\'" 1) |
| 77 | ;; ("\\.java\\'" 3) | 77 | ;; ("\\.java\\'" 3) |
| 78 | ;; ("\\.h\\'" 2 ("\\.cpp\\'" "\\.c\\'") | 78 | ;; ("\\.h\\'" 2 ("\\.cpp\\'" "\\.c\\'") |
| @@ -88,28 +88,28 @@ This is an alist with elements of the form: | |||
| 88 | REGEXP INIT [CLEANUP [NAME]] | 88 | REGEXP INIT [CLEANUP [NAME]] |
| 89 | REGEXP is a regular expression that matches a file name. | 89 | REGEXP is a regular expression that matches a file name. |
| 90 | INIT is the init function to use. | 90 | INIT is the init function to use. |
| 91 | CLEANUP is the cleanup function to use, default `flymake-simple-cleanup'. | 91 | CLEANUP is the cleanup function to use, default `flymake-proc-simple-cleanup'. |
| 92 | NAME is the file name function to use, default `flymake-get-real-file-name'." | 92 | NAME is the file name function to use, default `flymake-proc-get-real-file-name'." |
| 93 | :group 'flymake | 93 | :group 'flymake |
| 94 | :type '(alist :key-type (regexp :tag "File regexp") | 94 | :type '(alist :key-type (regexp :tag "File regexp") |
| 95 | :value-type | 95 | :value-type |
| 96 | (list :tag "Handler functions" | 96 | (list :tag "Handler functions" |
| 97 | (function :tag "Init function") | 97 | (function :tag "Init function") |
| 98 | (choice :tag "Cleanup function" | 98 | (choice :tag "Cleanup function" |
| 99 | (const :tag "flymake-simple-cleanup" nil) | 99 | (const :tag "flymake-proc-simple-cleanup" nil) |
| 100 | function) | 100 | function) |
| 101 | (choice :tag "Name function" | 101 | (choice :tag "Name function" |
| 102 | (const :tag "flymake-get-real-file-name" nil) | 102 | (const :tag "flymake-proc-get-real-file-name" nil) |
| 103 | function)))) | 103 | function)))) |
| 104 | 104 | ||
| 105 | (defvar flymake-processes nil | 105 | (defvar flymake-proc--processes nil |
| 106 | "List of currently active flymake processes.") | 106 | "List of currently active flymake processes.") |
| 107 | 107 | ||
| 108 | (defun flymake-get-file-name-mode-and-masks (file-name) | 108 | (defun flymake-proc--get-file-name-mode-and-masks (file-name) |
| 109 | "Return the corresponding entry from `flymake-allowed-file-name-masks'." | 109 | "Return the corresponding entry from `flymake-proc-allowed-file-name-masks'." |
| 110 | (unless (stringp file-name) | 110 | (unless (stringp file-name) |
| 111 | (error "Invalid file-name")) | 111 | (error "Invalid file-name")) |
| 112 | (let ((fnm flymake-allowed-file-name-masks) | 112 | (let ((fnm flymake-proc-allowed-file-name-masks) |
| 113 | (mode-and-masks nil)) | 113 | (mode-and-masks nil)) |
| 114 | (while (and (not mode-and-masks) fnm) | 114 | (while (and (not mode-and-masks) fnm) |
| 115 | (if (string-match (car (car fnm)) file-name) | 115 | (if (string-match (car (car fnm)) file-name) |
| @@ -118,58 +118,58 @@ NAME is the file name function to use, default `flymake-get-real-file-name'." | |||
| 118 | (flymake-log 3 "file %s, init=%s" file-name (car mode-and-masks)) | 118 | (flymake-log 3 "file %s, init=%s" file-name (car mode-and-masks)) |
| 119 | mode-and-masks)) | 119 | mode-and-masks)) |
| 120 | 120 | ||
| 121 | (defun flymake-can-syntax-check-file (file-name) | 121 | (defun flymake-proc-can-syntax-check-file (file-name) |
| 122 | "Determine whether we can syntax check FILE-NAME. | 122 | "Determine whether we can syntax check FILE-NAME. |
| 123 | Return nil if we cannot, non-nil if we can." | 123 | Return nil if we cannot, non-nil if we can." |
| 124 | (if (flymake-get-init-function file-name) t nil)) | 124 | (if (flymake-proc-get-init-function file-name) t nil)) |
| 125 | 125 | ||
| 126 | (defun flymake-get-init-function (file-name) | 126 | (defun flymake-proc--get-init-function (file-name) |
| 127 | "Return init function to be used for the file." | 127 | "Return init function to be used for the file." |
| 128 | (let* ((init-f (nth 0 (flymake-get-file-name-mode-and-masks file-name)))) | 128 | (let* ((init-f (nth 0 (flymake-proc--get-file-name-mode-and-masks file-name)))) |
| 129 | ;;(flymake-log 0 "calling %s" init-f) | 129 | ;;(flymake-log 0 "calling %s" init-f) |
| 130 | ;;(funcall init-f (current-buffer)) | 130 | ;;(funcall init-f (current-buffer)) |
| 131 | init-f)) | 131 | init-f)) |
| 132 | 132 | ||
| 133 | (defun flymake-get-cleanup-function (file-name) | 133 | (defun flymake-proc--get-cleanup-function (file-name) |
| 134 | "Return cleanup function to be used for the file." | 134 | "Return cleanup function to be used for the file." |
| 135 | (or (nth 1 (flymake-get-file-name-mode-and-masks file-name)) | 135 | (or (nth 1 (flymake-proc--get-file-name-mode-and-masks file-name)) |
| 136 | 'flymake-simple-cleanup)) | 136 | 'flymake-proc-simple-cleanup)) |
| 137 | 137 | ||
| 138 | (defun flymake-get-real-file-name-function (file-name) | 138 | (defun flymake-proc--get-real-file-name-function (file-name) |
| 139 | (or (nth 2 (flymake-get-file-name-mode-and-masks file-name)) | 139 | (or (nth 2 (flymake-proc--get-file-name-mode-and-masks file-name)) |
| 140 | 'flymake-get-real-file-name)) | 140 | 'flymake-proc-get-real-file-name)) |
| 141 | 141 | ||
| 142 | (defvar flymake-find-buildfile-cache (make-hash-table :test #'equal)) | 142 | (defvar flymake-proc--find-buildfile-cache (make-hash-table :test #'equal)) |
| 143 | 143 | ||
| 144 | (defun flymake-get-buildfile-from-cache (dir-name) | 144 | (defun flymake-proc--get-buildfile-from-cache (dir-name) |
| 145 | "Look up DIR-NAME in cache and return its associated value. | 145 | "Look up DIR-NAME in cache and return its associated value. |
| 146 | If DIR-NAME is not found, return nil." | 146 | If DIR-NAME is not found, return nil." |
| 147 | (gethash dir-name flymake-find-buildfile-cache)) | 147 | (gethash dir-name flymake-proc--find-buildfile-cache)) |
| 148 | 148 | ||
| 149 | (defun flymake-add-buildfile-to-cache (dir-name buildfile) | 149 | (defun flymake-proc--add-buildfile-to-cache (dir-name buildfile) |
| 150 | "Associate DIR-NAME with BUILDFILE in the buildfile cache." | 150 | "Associate DIR-NAME with BUILDFILE in the buildfile cache." |
| 151 | (puthash dir-name buildfile flymake-find-buildfile-cache)) | 151 | (puthash dir-name buildfile flymake-proc--find-buildfile-cache)) |
| 152 | 152 | ||
| 153 | (defun flymake-clear-buildfile-cache () | 153 | (defun flymake-proc--clear-buildfile-cache () |
| 154 | "Clear the buildfile cache." | 154 | "Clear the buildfile cache." |
| 155 | (clrhash flymake-find-buildfile-cache)) | 155 | (clrhash flymake-proc--find-buildfile-cache)) |
| 156 | 156 | ||
| 157 | (defun flymake-find-buildfile (buildfile-name source-dir-name) | 157 | (defun flymake-proc--find-buildfile (buildfile-name source-dir-name) |
| 158 | "Find buildfile starting from current directory. | 158 | "Find buildfile starting from current directory. |
| 159 | Buildfile includes Makefile, build.xml etc. | 159 | Buildfile includes Makefile, build.xml etc. |
| 160 | Return its file name if found, or nil if not found." | 160 | Return its file name if found, or nil if not found." |
| 161 | (or (flymake-get-buildfile-from-cache source-dir-name) | 161 | (or (flymake-proc--get-buildfile-from-cache source-dir-name) |
| 162 | (let* ((file (locate-dominating-file source-dir-name buildfile-name))) | 162 | (let* ((file (locate-dominating-file source-dir-name buildfile-name))) |
| 163 | (if file | 163 | (if file |
| 164 | (progn | 164 | (progn |
| 165 | (flymake-log 3 "found buildfile at %s" file) | 165 | (flymake-log 3 "found buildfile at %s" file) |
| 166 | (flymake-add-buildfile-to-cache source-dir-name file) | 166 | (flymake-proc--add-buildfile-to-cache source-dir-name file) |
| 167 | file) | 167 | file) |
| 168 | (progn | 168 | (progn |
| 169 | (flymake-log 3 "buildfile for %s not found" source-dir-name) | 169 | (flymake-log 3 "buildfile for %s not found" source-dir-name) |
| 170 | nil))))) | 170 | nil))))) |
| 171 | 171 | ||
| 172 | (defun flymake-fix-file-name (name) | 172 | (defun flymake-proc--fix-file-name (name) |
| 173 | "Replace all occurrences of `\\' with `/'." | 173 | "Replace all occurrences of `\\' with `/'." |
| 174 | (when name | 174 | (when name |
| 175 | (setq name (expand-file-name name)) | 175 | (setq name (expand-file-name name)) |
| @@ -177,16 +177,16 @@ Return its file name if found, or nil if not found." | |||
| 177 | (setq name (directory-file-name name)) | 177 | (setq name (directory-file-name name)) |
| 178 | name)) | 178 | name)) |
| 179 | 179 | ||
| 180 | (defun flymake-same-files (file-name-one file-name-two) | 180 | (defun flymake-proc--same-files (file-name-one file-name-two) |
| 181 | "Check if FILE-NAME-ONE and FILE-NAME-TWO point to same file. | 181 | "Check if FILE-NAME-ONE and FILE-NAME-TWO point to same file. |
| 182 | Return t if so, nil if not." | 182 | Return t if so, nil if not." |
| 183 | (equal (flymake-fix-file-name file-name-one) | 183 | (equal (flymake-proc--fix-file-name file-name-one) |
| 184 | (flymake-fix-file-name file-name-two))) | 184 | (flymake-proc--fix-file-name file-name-two))) |
| 185 | 185 | ||
| 186 | ;; This is bound dynamically to pass a parameter to a sort predicate below | 186 | ;; This is bound dynamically to pass a parameter to a sort predicate below |
| 187 | (defvar flymake-included-file-name) | 187 | (defvar flymake-proc--included-file-name) |
| 188 | 188 | ||
| 189 | (defun flymake-find-possible-master-files (file-name master-file-dirs masks) | 189 | (defun flymake-proc--find-possible-master-files (file-name master-file-dirs masks) |
| 190 | "Find (by name and location) all possible master files. | 190 | "Find (by name and location) all possible master files. |
| 191 | 191 | ||
| 192 | Name is specified by FILE-NAME and location is specified by | 192 | Name is specified by FILE-NAME and location is specified by |
| @@ -209,35 +209,35 @@ max-level parent dirs. File contents are not checked." | |||
| 209 | (while (and (not done) dir-files) | 209 | (while (and (not done) dir-files) |
| 210 | (when (not (file-directory-p (car dir-files))) | 210 | (when (not (file-directory-p (car dir-files))) |
| 211 | (setq files (cons (car dir-files) files)) | 211 | (setq files (cons (car dir-files) files)) |
| 212 | (when (>= (length files) flymake-master-file-count-limit) | 212 | (when (>= (length files) flymake-proc-master-file-count-limit) |
| 213 | (flymake-log 3 "master file count limit (%d) reached" flymake-master-file-count-limit) | 213 | (flymake-log 3 "master file count limit (%d) reached" flymake-proc-master-file-count-limit) |
| 214 | (setq done t))) | 214 | (setq done t))) |
| 215 | (setq dir-files (cdr dir-files)))) | 215 | (setq dir-files (cdr dir-files)))) |
| 216 | (setq masks (cdr masks)))) | 216 | (setq masks (cdr masks)))) |
| 217 | (setq dirs (cdr dirs))) | 217 | (setq dirs (cdr dirs))) |
| 218 | (when files | 218 | (when files |
| 219 | (let ((flymake-included-file-name (file-name-nondirectory file-name))) | 219 | (let ((flymake-proc--included-file-name (file-name-nondirectory file-name))) |
| 220 | (setq files (sort files 'flymake-master-file-compare)))) | 220 | (setq files (sort files 'flymake-proc--master-file-compare)))) |
| 221 | (flymake-log 3 "found %d possible master file(s)" (length files)) | 221 | (flymake-log 3 "found %d possible master file(s)" (length files)) |
| 222 | files)) | 222 | files)) |
| 223 | 223 | ||
| 224 | (defun flymake-master-file-compare (file-one file-two) | 224 | (defun flymake-proc--master-file-compare (file-one file-two) |
| 225 | "Compare two files specified by FILE-ONE and FILE-TWO. | 225 | "Compare two files specified by FILE-ONE and FILE-TWO. |
| 226 | This function is used in sort to move most possible file names | 226 | This function is used in sort to move most possible file names |
| 227 | to the beginning of the list (File.h -> File.cpp moved to top)." | 227 | to the beginning of the list (File.h -> File.cpp moved to top)." |
| 228 | (and (equal (file-name-sans-extension flymake-included-file-name) | 228 | (and (equal (file-name-sans-extension flymake-proc--included-file-name) |
| 229 | (file-name-base file-one)) | 229 | (file-name-base file-one)) |
| 230 | (not (equal file-one file-two)))) | 230 | (not (equal file-one file-two)))) |
| 231 | 231 | ||
| 232 | (defvar flymake-check-file-limit 8192 | 232 | (defvar flymake-proc-check-file-limit 8192 |
| 233 | "Maximum number of chars to look at when checking possible master file. | 233 | "Maximum number of chars to look at when checking possible master file. |
| 234 | Nil means search the entire file.") | 234 | Nil means search the entire file.") |
| 235 | 235 | ||
| 236 | (defun flymake-check-patch-master-file-buffer | 236 | (defun flymake-proc--check-patch-master-file-buffer |
| 237 | (master-file-temp-buffer | 237 | (master-file-temp-buffer |
| 238 | master-file-name patched-master-file-name | 238 | master-file-name patched-master-file-name |
| 239 | source-file-name patched-source-file-name | 239 | source-file-name patched-source-file-name |
| 240 | include-dirs regexp) | 240 | include-dirs regexp) |
| 241 | "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME. | 241 | "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME. |
| 242 | If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME | 242 | If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME |
| 243 | instead of SOURCE-FILE-NAME. | 243 | instead of SOURCE-FILE-NAME. |
| @@ -251,7 +251,7 @@ instead of reading master file from disk." | |||
| 251 | (source-file-nonext (file-name-sans-extension source-file-nondir)) | 251 | (source-file-nonext (file-name-sans-extension source-file-nondir)) |
| 252 | (found nil) | 252 | (found nil) |
| 253 | (inc-name nil) | 253 | (inc-name nil) |
| 254 | (search-limit flymake-check-file-limit)) | 254 | (search-limit flymake-proc-check-file-limit)) |
| 255 | (setq regexp | 255 | (setq regexp |
| 256 | (format regexp ; "[ \t]*#[ \t]*include[ \t]*\"\\(.*%s\\)\"" | 256 | (format regexp ; "[ \t]*#[ \t]*include[ \t]*\"\\(.*%s\\)\"" |
| 257 | ;; Hack for tex files, where \include often excludes .tex. | 257 | ;; Hack for tex files, where \include often excludes .tex. |
| @@ -287,18 +287,18 @@ instead of reading master file from disk." | |||
| 287 | inc-name (- (length inc-name) | 287 | inc-name (- (length inc-name) |
| 288 | (length source-file-nondir)) nil)) | 288 | (length source-file-nondir)) nil)) |
| 289 | (flymake-log 3 "inc-name=%s" inc-name) | 289 | (flymake-log 3 "inc-name=%s" inc-name) |
| 290 | (when (flymake-check-include source-file-name inc-name | 290 | (when (flymake-proc--check-include source-file-name inc-name |
| 291 | include-dirs) | 291 | include-dirs) |
| 292 | (setq found t) | 292 | (setq found t) |
| 293 | ;; replace-match is not used here as it fails in | 293 | ;; replace-match is not used here as it fails in |
| 294 | ;; XEmacs with 'last match not a buffer' error as | 294 | ;; XEmacs with 'last match not a buffer' error as |
| 295 | ;; check-includes calls replace-in-string | 295 | ;; check-includes calls replace-in-string |
| 296 | (flymake-replace-region | 296 | (flymake-proc--replace-region |
| 297 | match-beg match-end | 297 | match-beg match-end |
| 298 | (file-name-nondirectory patched-source-file-name)))) | 298 | (file-name-nondirectory patched-source-file-name)))) |
| 299 | (forward-line 1))) | 299 | (forward-line 1))) |
| 300 | (when found | 300 | (when found |
| 301 | (flymake-save-buffer-in-file patched-master-file-name))) | 301 | (flymake-proc--save-buffer-in-file patched-master-file-name))) |
| 302 | ;;+(flymake-log 3 "killing buffer %s" | 302 | ;;+(flymake-log 3 "killing buffer %s" |
| 303 | ;; (buffer-name master-file-temp-buffer)) | 303 | ;; (buffer-name master-file-temp-buffer)) |
| 304 | (kill-buffer master-file-temp-buffer)) | 304 | (kill-buffer master-file-temp-buffer)) |
| @@ -308,7 +308,7 @@ instead of reading master file from disk." | |||
| 308 | found)) | 308 | found)) |
| 309 | 309 | ||
| 310 | ;;; XXX: remove | 310 | ;;; XXX: remove |
| 311 | (defun flymake-replace-region (beg end rep) | 311 | (defun flymake-proc--replace-region (beg end rep) |
| 312 | "Replace text in BUFFER in region (BEG END) with REP." | 312 | "Replace text in BUFFER in region (BEG END) with REP." |
| 313 | (save-excursion | 313 | (save-excursion |
| 314 | (goto-char end) | 314 | (goto-char end) |
| @@ -316,14 +316,14 @@ instead of reading master file from disk." | |||
| 316 | (insert rep) | 316 | (insert rep) |
| 317 | (delete-region beg end))) | 317 | (delete-region beg end))) |
| 318 | 318 | ||
| 319 | (defun flymake-read-file-to-temp-buffer (file-name) | 319 | (defun flymake-proc--read-file-to-temp-buffer (file-name) |
| 320 | "Insert contents of FILE-NAME into newly created temp buffer." | 320 | "Insert contents of FILE-NAME into newly created temp buffer." |
| 321 | (let* ((temp-buffer (get-buffer-create (generate-new-buffer-name (concat "flymake:" (file-name-nondirectory file-name)))))) | 321 | (let* ((temp-buffer (get-buffer-create (generate-new-buffer-name (concat "flymake:" (file-name-nondirectory file-name)))))) |
| 322 | (with-current-buffer temp-buffer | 322 | (with-current-buffer temp-buffer |
| 323 | (insert-file-contents file-name)) | 323 | (insert-file-contents file-name)) |
| 324 | temp-buffer)) | 324 | temp-buffer)) |
| 325 | 325 | ||
| 326 | (defun flymake-copy-buffer-to-temp-buffer (buffer) | 326 | (defun flymake-proc--copy-buffer-to-temp-buffer (buffer) |
| 327 | "Copy contents of BUFFER into newly created temp buffer." | 327 | "Copy contents of BUFFER into newly created temp buffer." |
| 328 | (with-current-buffer | 328 | (with-current-buffer |
| 329 | (get-buffer-create (generate-new-buffer-name | 329 | (get-buffer-create (generate-new-buffer-name |
| @@ -331,13 +331,13 @@ instead of reading master file from disk." | |||
| 331 | (insert-buffer-substring buffer) | 331 | (insert-buffer-substring buffer) |
| 332 | (current-buffer))) | 332 | (current-buffer))) |
| 333 | 333 | ||
| 334 | (defun flymake-check-include (source-file-name inc-name include-dirs) | 334 | (defun flymake-proc--check-include (source-file-name inc-name include-dirs) |
| 335 | "Check if SOURCE-FILE-NAME can be found in include path. | 335 | "Check if SOURCE-FILE-NAME can be found in include path. |
| 336 | Return t if it can be found via include path using INC-NAME." | 336 | Return t if it can be found via include path using INC-NAME." |
| 337 | (if (file-name-absolute-p inc-name) | 337 | (if (file-name-absolute-p inc-name) |
| 338 | (flymake-same-files source-file-name inc-name) | 338 | (flymake-proc--same-files source-file-name inc-name) |
| 339 | (while (and include-dirs | 339 | (while (and include-dirs |
| 340 | (not (flymake-same-files | 340 | (not (flymake-proc--same-files |
| 341 | source-file-name | 341 | source-file-name |
| 342 | (concat (file-name-directory source-file-name) | 342 | (concat (file-name-directory source-file-name) |
| 343 | "/" (car include-dirs) | 343 | "/" (car include-dirs) |
| @@ -345,17 +345,17 @@ Return t if it can be found via include path using INC-NAME." | |||
| 345 | (setq include-dirs (cdr include-dirs))) | 345 | (setq include-dirs (cdr include-dirs))) |
| 346 | include-dirs)) | 346 | include-dirs)) |
| 347 | 347 | ||
| 348 | (defun flymake-find-buffer-for-file (file-name) | 348 | (defun flymake-proc--find-buffer-for-file (file-name) |
| 349 | "Check if there exists a buffer visiting FILE-NAME. | 349 | "Check if there exists a buffer visiting FILE-NAME. |
| 350 | Return t if so, nil if not." | 350 | Return t if so, nil if not." |
| 351 | (let ((buffer-name (get-file-buffer file-name))) | 351 | (let ((buffer-name (get-file-buffer file-name))) |
| 352 | (if buffer-name | 352 | (if buffer-name |
| 353 | (get-buffer buffer-name)))) | 353 | (get-buffer buffer-name)))) |
| 354 | 354 | ||
| 355 | (defun flymake-create-master-file (source-file-name patched-source-file-name get-incl-dirs-f create-temp-f masks include-regexp) | 355 | (defun flymake-proc--create-master-file (source-file-name patched-source-file-name get-incl-dirs-f create-temp-f masks include-regexp) |
| 356 | "Save SOURCE-FILE-NAME with a different name. | 356 | "Save SOURCE-FILE-NAME with a different name. |
| 357 | Find master file, patch and save it." | 357 | Find master file, patch and save it." |
| 358 | (let* ((possible-master-files (flymake-find-possible-master-files source-file-name flymake-master-file-dirs masks)) | 358 | (let* ((possible-master-files (flymake-proc--find-possible-master-files source-file-name flymake-proc-master-file-dirs masks)) |
| 359 | (master-file-count (length possible-master-files)) | 359 | (master-file-count (length possible-master-files)) |
| 360 | (idx 0) | 360 | (idx 0) |
| 361 | (temp-buffer nil) | 361 | (temp-buffer nil) |
| @@ -366,11 +366,11 @@ Find master file, patch and save it." | |||
| 366 | (while (and (not found) (< idx master-file-count)) | 366 | (while (and (not found) (< idx master-file-count)) |
| 367 | (setq master-file-name (nth idx possible-master-files)) | 367 | (setq master-file-name (nth idx possible-master-files)) |
| 368 | (setq patched-master-file-name (funcall create-temp-f master-file-name "flymake_master")) | 368 | (setq patched-master-file-name (funcall create-temp-f master-file-name "flymake_master")) |
| 369 | (if (flymake-find-buffer-for-file master-file-name) | 369 | (if (flymake-proc--find-buffer-for-file master-file-name) |
| 370 | (setq temp-buffer (flymake-copy-buffer-to-temp-buffer (flymake-find-buffer-for-file master-file-name))) | 370 | (setq temp-buffer (flymake-proc--copy-buffer-to-temp-buffer (flymake-proc--find-buffer-for-file master-file-name))) |
| 371 | (setq temp-buffer (flymake-read-file-to-temp-buffer master-file-name))) | 371 | (setq temp-buffer (flymake-proc--read-file-to-temp-buffer master-file-name))) |
| 372 | (setq found | 372 | (setq found |
| 373 | (flymake-check-patch-master-file-buffer | 373 | (flymake-proc--check-patch-master-file-buffer |
| 374 | temp-buffer | 374 | temp-buffer |
| 375 | master-file-name | 375 | master-file-name |
| 376 | patched-master-file-name | 376 | patched-master-file-name |
| @@ -386,7 +386,7 @@ Find master file, patch and save it." | |||
| 386 | (file-name-nondirectory source-file-name)) | 386 | (file-name-nondirectory source-file-name)) |
| 387 | nil)))) | 387 | nil)))) |
| 388 | 388 | ||
| 389 | (defun flymake-save-buffer-in-file (file-name) | 389 | (defun flymake-proc--save-buffer-in-file (file-name) |
| 390 | "Save the entire buffer contents into file FILE-NAME. | 390 | "Save the entire buffer contents into file FILE-NAME. |
| 391 | Create parent directories as needed." | 391 | Create parent directories as needed." |
| 392 | (make-directory (file-name-directory file-name) 1) | 392 | (make-directory (file-name-directory file-name) 1) |
| @@ -408,17 +408,17 @@ Create parent directories as needed." | |||
| 408 | fname | 408 | fname |
| 409 | line-number | 409 | line-number |
| 410 | (if (and message | 410 | (if (and message |
| 411 | (cond ((stringp flymake-warning-predicate) | 411 | (cond ((stringp flymake-proc-warning-predicate) |
| 412 | (string-match flymake-warning-predicate | 412 | (string-match flymake-proc-warning-predicate |
| 413 | message)) | 413 | message)) |
| 414 | ((functionp flymake-warning-predicate) | 414 | ((functionp flymake-proc-warning-predicate) |
| 415 | (funcall flymake-warning-predicate | 415 | (funcall flymake-proc-warning-predicate |
| 416 | message)))) | 416 | message)))) |
| 417 | "w" | 417 | "w" |
| 418 | "e") | 418 | "e") |
| 419 | message | 419 | message |
| 420 | (and fname | 420 | (and fname |
| 421 | (funcall (flymake-get-real-file-name-function | 421 | (funcall (flymake-proc--get-real-file-name-function |
| 422 | fname) | 422 | fname) |
| 423 | fname))) | 423 | fname))) |
| 424 | retval)))) | 424 | retval)))) |
| @@ -428,7 +428,7 @@ Create parent directories as needed." | |||
| 428 | pattern err) | 428 | pattern err) |
| 429 | nil))) | 429 | nil))) |
| 430 | 430 | ||
| 431 | (defun flymake-process-filter (proc string) | 431 | (defun flymake-proc--process-filter (proc string) |
| 432 | "Parse STRING and collect diagnostics info." | 432 | "Parse STRING and collect diagnostics info." |
| 433 | (flymake-log 3 "received %d byte(s) of output from process %d" | 433 | (flymake-log 3 "received %d byte(s) of output from process %d" |
| 434 | (length string) (process-id proc)) | 434 | (length string) (process-id proc)) |
| @@ -452,7 +452,7 @@ Create parent directories as needed." | |||
| 452 | ;; | 452 | ;; |
| 453 | (save-excursion | 453 | (save-excursion |
| 454 | (goto-char unprocessed-mark) | 454 | (goto-char unprocessed-mark) |
| 455 | (dolist (pattern flymake-err-line-patterns) | 455 | (dolist (pattern flymake-proc-err-line-patterns) |
| 456 | (let ((new (flymake-proc--diagnostics-for-pattern proc pattern))) | 456 | (let ((new (flymake-proc--diagnostics-for-pattern proc pattern))) |
| 457 | (process-put | 457 | (process-put |
| 458 | proc | 458 | proc |
| @@ -463,13 +463,13 @@ Create parent directories as needed." | |||
| 463 | (process-put proc 'flymake-proc--unprocessed-mark | 463 | (process-put proc 'flymake-proc--unprocessed-mark |
| 464 | (point-marker)))))))) | 464 | (point-marker)))))))) |
| 465 | 465 | ||
| 466 | (defun flymake-process-sentinel (process _event) | 466 | (defun flymake-proc--process-sentinel (process _event) |
| 467 | "Sentinel for syntax check buffers." | 467 | "Sentinel for syntax check buffers." |
| 468 | (when (memq (process-status process) '(signal exit)) | 468 | (when (memq (process-status process) '(signal exit)) |
| 469 | (let* ((exit-status (process-exit-status process)) | 469 | (let* ((exit-status (process-exit-status process)) |
| 470 | (command (process-command process)) | 470 | (command (process-command process)) |
| 471 | (source-buffer (process-buffer process)) | 471 | (source-buffer (process-buffer process)) |
| 472 | (cleanup-f (flymake-get-cleanup-function | 472 | (cleanup-f (flymake-proc--get-cleanup-function |
| 473 | (buffer-file-name source-buffer)))) | 473 | (buffer-file-name source-buffer)))) |
| 474 | 474 | ||
| 475 | (flymake-log 2 "process %d exited with code %d" | 475 | (flymake-log 2 "process %d exited with code %d" |
| @@ -483,11 +483,11 @@ Create parent directories as needed." | |||
| 483 | (funcall cleanup-f))) | 483 | (funcall cleanup-f))) |
| 484 | 484 | ||
| 485 | (delete-process process) | 485 | (delete-process process) |
| 486 | (setq flymake-processes (delq process flymake-processes)) | 486 | (setq flymake-proc--processes (delq process flymake-proc--processes)) |
| 487 | 487 | ||
| 488 | (when (buffer-live-p source-buffer) | 488 | (when (buffer-live-p source-buffer) |
| 489 | (with-current-buffer source-buffer | 489 | (with-current-buffer source-buffer |
| 490 | (flymake-post-syntax-check | 490 | (flymake-proc--post-syntax-check |
| 491 | exit-status command | 491 | exit-status command |
| 492 | (process-get process 'flymake-proc--collected-diagnostics)) | 492 | (process-get process 'flymake-proc--collected-diagnostics)) |
| 493 | (setq flymake-is-running nil)))) | 493 | (setq flymake-is-running nil)))) |
| @@ -498,7 +498,7 @@ Create parent directories as needed." | |||
| 498 | (with-current-buffer source-buffer | 498 | (with-current-buffer source-buffer |
| 499 | (setq flymake-is-running nil)))))))) | 499 | (setq flymake-is-running nil)))))))) |
| 500 | 500 | ||
| 501 | (defun flymake-post-syntax-check (exit-status command diagnostics) | 501 | (defun flymake-proc--post-syntax-check (exit-status command diagnostics) |
| 502 | (if (equal 0 exit-status) | 502 | (if (equal 0 exit-status) |
| 503 | (flymake-report diagnostics) | 503 | (flymake-report diagnostics) |
| 504 | (if flymake-check-was-interrupted | 504 | (if flymake-check-was-interrupted |
| @@ -509,7 +509,7 @@ Create parent directories as needed." | |||
| 509 | (format "Configuration error has occurred while running %s" command)) | 509 | (format "Configuration error has occurred while running %s" command)) |
| 510 | (flymake-report diagnostics))))) | 510 | (flymake-report diagnostics))))) |
| 511 | 511 | ||
| 512 | (defun flymake-reformat-err-line-patterns-from-compile-el (original-list) | 512 | (defun flymake-proc-reformat-err-line-patterns-from-compile-el (original-list) |
| 513 | "Grab error line patterns from ORIGINAL-LIST in compile.el format. | 513 | "Grab error line patterns from ORIGINAL-LIST in compile.el format. |
| 514 | Convert it to flymake internal format." | 514 | Convert it to flymake internal format." |
| 515 | (let* ((converted-list '())) | 515 | (let* ((converted-list '())) |
| @@ -529,7 +529,7 @@ Convert it to flymake internal format." | |||
| 529 | 529 | ||
| 530 | (require 'compile) | 530 | (require 'compile) |
| 531 | 531 | ||
| 532 | (defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text | 532 | (defvar flymake-proc-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text |
| 533 | (append | 533 | (append |
| 534 | '( | 534 | '( |
| 535 | ;; MS Visual C++ 6.0 | 535 | ;; MS Visual C++ 6.0 |
| @@ -553,24 +553,24 @@ Convert it to flymake internal format." | |||
| 553 | (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::[0-9]+\\)?:[ \t\n]*\\(.+\\)" | 553 | (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::[0-9]+\\)?:[ \t\n]*\\(.+\\)" |
| 554 | 2 4 nil 5)) | 554 | 2 4 nil 5)) |
| 555 | ;; compilation-error-regexp-alist) | 555 | ;; compilation-error-regexp-alist) |
| 556 | (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) | 556 | (flymake-proc-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) |
| 557 | "Patterns for matching error/warning lines. Each pattern has the form | 557 | "Patterns for matching error/warning lines. Each pattern has the form |
| 558 | \(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX). | 558 | \(REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX). |
| 559 | Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns | 559 | Use `flymake-proc-reformat-err-line-patterns-from-compile-el' to add patterns |
| 560 | from compile.el") | 560 | from compile.el") |
| 561 | 561 | ||
| 562 | (define-obsolete-variable-alias 'flymake-warning-re 'flymake-warning-predicate "24.4") | 562 | (define-obsolete-variable-alias 'flymake-warning-re 'flymake-proc-warning-predicate "24.4") |
| 563 | (defvar flymake-warning-predicate "^[wW]arning" | 563 | (defvar flymake-proc-warning-predicate "^[wW]arning" |
| 564 | "Predicate matching against error text to detect a warning. | 564 | "Predicate matching against error text to detect a warning. |
| 565 | Takes a single argument, the error's text and should return non-nil | 565 | Takes a single argument, the error's text and should return non-nil |
| 566 | if it's a warning. | 566 | if it's a warning. |
| 567 | Instead of a function, it can also be a regular expression.") | 567 | Instead of a function, it can also be a regular expression.") |
| 568 | 568 | ||
| 569 | (defun flymake-get-project-include-dirs-imp (basedir) | 569 | (defun flymake-proc-get-project-include-dirs-imp (basedir) |
| 570 | "Include dirs for the project current file belongs to." | 570 | "Include dirs for the project current file belongs to." |
| 571 | (if (flymake-get-project-include-dirs-from-cache basedir) | 571 | (if (flymake-proc--get-project-include-dirs-from-cache basedir) |
| 572 | (progn | 572 | (progn |
| 573 | (flymake-get-project-include-dirs-from-cache basedir)) | 573 | (flymake-proc--get-project-include-dirs-from-cache basedir)) |
| 574 | ;;else | 574 | ;;else |
| 575 | (let* ((command-line (concat "make -C " | 575 | (let* ((command-line (concat "make -C " |
| 576 | (shell-quote-argument basedir) | 576 | (shell-quote-argument basedir) |
| @@ -589,53 +589,53 @@ Instead of a function, it can also be a regular expression.") | |||
| 589 | (when (not (string-match "^INCLUDE_DIRS=.*" (nth (1- inc-count) inc-lines))) | 589 | (when (not (string-match "^INCLUDE_DIRS=.*" (nth (1- inc-count) inc-lines))) |
| 590 | (push (replace-regexp-in-string "\"" "" (nth (1- inc-count) inc-lines)) inc-dirs)) | 590 | (push (replace-regexp-in-string "\"" "" (nth (1- inc-count) inc-lines)) inc-dirs)) |
| 591 | (setq inc-count (1- inc-count))))) | 591 | (setq inc-count (1- inc-count))))) |
| 592 | (flymake-add-project-include-dirs-to-cache basedir inc-dirs) | 592 | (flymake-proc--add-project-include-dirs-to-cache basedir inc-dirs) |
| 593 | inc-dirs))) | 593 | inc-dirs))) |
| 594 | 594 | ||
| 595 | (defvar flymake-get-project-include-dirs-function #'flymake-get-project-include-dirs-imp | 595 | (defvar flymake-proc-get-project-include-dirs-function #'flymake-proc-get-project-include-dirs-imp |
| 596 | "Function used to get project include dirs, one parameter: basedir name.") | 596 | "Function used to get project include dirs, one parameter: basedir name.") |
| 597 | 597 | ||
| 598 | (defun flymake-get-project-include-dirs (basedir) | 598 | (defun flymake-proc--get-project-include-dirs (basedir) |
| 599 | (funcall flymake-get-project-include-dirs-function basedir)) | 599 | (funcall flymake-proc-get-project-include-dirs-function basedir)) |
| 600 | 600 | ||
| 601 | (defun flymake-get-system-include-dirs () | 601 | (defun flymake-proc--get-system-include-dirs () |
| 602 | "System include dirs - from the `INCLUDE' env setting." | 602 | "System include dirs - from the `INCLUDE' env setting." |
| 603 | (let* ((includes (getenv "INCLUDE"))) | 603 | (let* ((includes (getenv "INCLUDE"))) |
| 604 | (if includes (split-string includes path-separator t) nil))) | 604 | (if includes (split-string includes path-separator t) nil))) |
| 605 | 605 | ||
| 606 | (defvar flymake-project-include-dirs-cache (make-hash-table :test #'equal)) | 606 | (defvar flymake-proc--project-include-dirs-cache (make-hash-table :test #'equal)) |
| 607 | 607 | ||
| 608 | (defun flymake-get-project-include-dirs-from-cache (base-dir) | 608 | (defun flymake-proc--get-project-include-dirs-from-cache (base-dir) |
| 609 | (gethash base-dir flymake-project-include-dirs-cache)) | 609 | (gethash base-dir flymake-proc--project-include-dirs-cache)) |
| 610 | 610 | ||
| 611 | (defun flymake-add-project-include-dirs-to-cache (base-dir include-dirs) | 611 | (defun flymake-proc--add-project-include-dirs-to-cache (base-dir include-dirs) |
| 612 | (puthash base-dir include-dirs flymake-project-include-dirs-cache)) | 612 | (puthash base-dir include-dirs flymake-proc--project-include-dirs-cache)) |
| 613 | 613 | ||
| 614 | (defun flymake-clear-project-include-dirs-cache () | 614 | (defun flymake-proc--clear-project-include-dirs-cache () |
| 615 | (clrhash flymake-project-include-dirs-cache)) | 615 | (clrhash flymake-proc--project-include-dirs-cache)) |
| 616 | 616 | ||
| 617 | (defun flymake-get-include-dirs (base-dir) | 617 | (defun flymake-proc-get-include-dirs (base-dir) |
| 618 | "Get dirs to use when resolving local file names." | 618 | "Get dirs to use when resolving local file names." |
| 619 | (let* ((include-dirs (append '(".") (flymake-get-project-include-dirs base-dir) (flymake-get-system-include-dirs)))) | 619 | (let* ((include-dirs (append '(".") (flymake-proc--get-project-include-dirs base-dir) (flymake-proc--get-system-include-dirs)))) |
| 620 | include-dirs)) | 620 | include-dirs)) |
| 621 | 621 | ||
| 622 | ;; (defun flymake-restore-formatting () | 622 | ;; (defun flymake-proc--restore-formatting () |
| 623 | ;; "Remove any formatting made by flymake." | 623 | ;; "Remove any formatting made by flymake." |
| 624 | ;; ) | 624 | ;; ) |
| 625 | 625 | ||
| 626 | ;; (defun flymake-get-program-dir (buffer) | 626 | ;; (defun flymake-proc--get-program-dir (buffer) |
| 627 | ;; "Get dir to start program in." | 627 | ;; "Get dir to start program in." |
| 628 | ;; (unless (bufferp buffer) | 628 | ;; (unless (bufferp buffer) |
| 629 | ;; (error "Invalid buffer")) | 629 | ;; (error "Invalid buffer")) |
| 630 | ;; (with-current-buffer buffer | 630 | ;; (with-current-buffer buffer |
| 631 | ;; default-directory)) | 631 | ;; default-directory)) |
| 632 | 632 | ||
| 633 | (defun flymake-safe-delete-file (file-name) | 633 | (defun flymake-proc--safe-delete-file (file-name) |
| 634 | (when (and file-name (file-exists-p file-name)) | 634 | (when (and file-name (file-exists-p file-name)) |
| 635 | (delete-file file-name) | 635 | (delete-file file-name) |
| 636 | (flymake-log 1 "deleted file %s" file-name))) | 636 | (flymake-log 1 "deleted file %s" file-name))) |
| 637 | 637 | ||
| 638 | (defun flymake-safe-delete-directory (dir-name) | 638 | (defun flymake-proc--safe-delete-directory (dir-name) |
| 639 | (condition-case nil | 639 | (condition-case nil |
| 640 | (progn | 640 | (progn |
| 641 | (delete-directory dir-name) | 641 | (delete-directory dir-name) |
| @@ -643,23 +643,23 @@ Instead of a function, it can also be a regular expression.") | |||
| 643 | (error | 643 | (error |
| 644 | (flymake-log 1 "Failed to delete dir %s, error ignored" dir-name)))) | 644 | (flymake-log 1 "Failed to delete dir %s, error ignored" dir-name)))) |
| 645 | 645 | ||
| 646 | (defun flymake-start-syntax-check () | 646 | (defun flymake-proc-start-syntax-check () |
| 647 | "Start syntax checking for current buffer." | 647 | "Start syntax checking for current buffer." |
| 648 | (interactive) | 648 | (interactive) |
| 649 | (flymake-log 3 "flymake is running: %s" flymake-is-running) | 649 | (flymake-log 3 "flymake is running: %s" flymake-is-running) |
| 650 | (when (and (not flymake-is-running) | 650 | (when (not (and flymake-is-running |
| 651 | (flymake-can-syntax-check-file buffer-file-name)) | 651 | (flymake-proc-can-syntax-check-file buffer-file-name))) |
| 652 | (when (or (not flymake-compilation-prevents-syntax-check) | 652 | (when (or (not flymake-proc-compilation-prevents-syntax-check) |
| 653 | (not (flymake-compilation-is-running))) ;+ (flymake-rep-ort-status buffer "COMP") | 653 | (not (flymake-proc--compilation-is-running))) ;+ (flymake-rep-ort-status buffer "COMP") |
| 654 | (flymake-clear-buildfile-cache) | 654 | (flymake-proc--clear-buildfile-cache) |
| 655 | (flymake-clear-project-include-dirs-cache) | 655 | (flymake-proc--clear-project-include-dirs-cache) |
| 656 | 656 | ||
| 657 | (setq flymake-check-was-interrupted nil) | 657 | (setq flymake-check-was-interrupted nil) |
| 658 | (setq flymake-check-start-time (float-time)) | 658 | (setq flymake-check-start-time (float-time)) |
| 659 | 659 | ||
| 660 | (let* ((source-file-name buffer-file-name) | 660 | (let* ((source-file-name buffer-file-name) |
| 661 | (init-f (flymake-get-init-function source-file-name)) | 661 | (init-f (flymake-proc--get-init-function source-file-name)) |
| 662 | (cleanup-f (flymake-get-cleanup-function source-file-name)) | 662 | (cleanup-f (flymake-proc--get-cleanup-function source-file-name)) |
| 663 | (cmd-and-args (funcall init-f)) | 663 | (cmd-and-args (funcall init-f)) |
| 664 | (cmd (nth 0 cmd-and-args)) | 664 | (cmd (nth 0 cmd-and-args)) |
| 665 | (args (nth 1 cmd-and-args)) | 665 | (args (nth 1 cmd-and-args)) |
| @@ -670,9 +670,9 @@ Instead of a function, it can also be a regular expression.") | |||
| 670 | (funcall cleanup-f)) | 670 | (funcall cleanup-f)) |
| 671 | (progn | 671 | (progn |
| 672 | (setq flymake-last-change-time nil) | 672 | (setq flymake-last-change-time nil) |
| 673 | (flymake-start-syntax-check-process cmd args dir))))))) | 673 | (flymake-proc--start-syntax-check-process cmd args dir))))))) |
| 674 | 674 | ||
| 675 | (defun flymake-start-syntax-check-process (cmd args dir) | 675 | (defun flymake-proc--start-syntax-check-process (cmd args dir) |
| 676 | "Start syntax check process." | 676 | "Start syntax check process." |
| 677 | (condition-case err | 677 | (condition-case err |
| 678 | (let* ((process | 678 | (let* ((process |
| @@ -683,12 +683,12 @@ Instead of a function, it can also be a regular expression.") | |||
| 683 | :buffer (current-buffer) | 683 | :buffer (current-buffer) |
| 684 | :command (cons cmd args) | 684 | :command (cons cmd args) |
| 685 | :noquery t | 685 | :noquery t |
| 686 | :filter 'flymake-process-filter | 686 | :filter 'flymake-proc--process-filter |
| 687 | :sentinel 'flymake-process-sentinel)))) | 687 | :sentinel 'flymake-proc--process-sentinel)))) |
| 688 | (setf (process-get process 'flymake-proc--output-buffer) | 688 | (setf (process-get process 'flymake-proc--output-buffer) |
| 689 | (generate-new-buffer | 689 | (generate-new-buffer |
| 690 | (format " *flymake output for %s*" (current-buffer)))) | 690 | (format " *flymake output for %s*" (current-buffer)))) |
| 691 | (push process flymake-processes) | 691 | (push process flymake-proc--processes) |
| 692 | 692 | ||
| 693 | (setq flymake-is-running t) | 693 | (setq flymake-is-running t) |
| 694 | (setq flymake-last-change-time nil) | 694 | (setq flymake-last-change-time nil) |
| @@ -704,12 +704,12 @@ Instead of a function, it can also be a regular expression.") | |||
| 704 | "Failed to launch syntax check process `%s' with args %s: %s" | 704 | "Failed to launch syntax check process `%s' with args %s: %s" |
| 705 | cmd args (error-message-string err))) | 705 | cmd args (error-message-string err))) |
| 706 | (source-file-name buffer-file-name) | 706 | (source-file-name buffer-file-name) |
| 707 | (cleanup-f (flymake-get-cleanup-function source-file-name))) | 707 | (cleanup-f (flymake-proc--get-cleanup-function source-file-name))) |
| 708 | (flymake-log 0 err-str) | 708 | (flymake-log 0 err-str) |
| 709 | (funcall cleanup-f) | 709 | (funcall cleanup-f) |
| 710 | (flymake-report-fatal-status "PROCERR" err-str))))) | 710 | (flymake-report-fatal-status "PROCERR" err-str))))) |
| 711 | 711 | ||
| 712 | (defun flymake-kill-process (proc) | 712 | (defun flymake-proc--kill-process (proc) |
| 713 | "Kill process PROC." | 713 | "Kill process PROC." |
| 714 | (kill-process proc) | 714 | (kill-process proc) |
| 715 | (let* ((buf (process-buffer proc))) | 715 | (let* ((buf (process-buffer proc))) |
| @@ -718,24 +718,24 @@ Instead of a function, it can also be a regular expression.") | |||
| 718 | (setq flymake-check-was-interrupted t)))) | 718 | (setq flymake-check-was-interrupted t)))) |
| 719 | (flymake-log 1 "killed process %d" (process-id proc))) | 719 | (flymake-log 1 "killed process %d" (process-id proc))) |
| 720 | 720 | ||
| 721 | (defun flymake-stop-all-syntax-checks () | 721 | (defun flymake-proc-stop-all-syntax-checks () |
| 722 | "Kill all syntax check processes." | 722 | "Kill all syntax check processes." |
| 723 | (interactive) | 723 | (interactive) |
| 724 | (while flymake-processes | 724 | (while flymake-proc--processes |
| 725 | (flymake-kill-process (pop flymake-processes)))) | 725 | (flymake-proc--kill-process (pop flymake-proc--processes)))) |
| 726 | 726 | ||
| 727 | (defun flymake-compilation-is-running () | 727 | (defun flymake-proc--compilation-is-running () |
| 728 | (and (boundp 'compilation-in-progress) | 728 | (and (boundp 'compilation-in-progress) |
| 729 | compilation-in-progress)) | 729 | compilation-in-progress)) |
| 730 | 730 | ||
| 731 | (defun flymake-compile () | 731 | (defun flymake-proc-compile () |
| 732 | "Kill all flymake syntax checks, start compilation." | 732 | "Kill all flymake syntax checks, start compilation." |
| 733 | (interactive) | 733 | (interactive) |
| 734 | (flymake-stop-all-syntax-checks) | 734 | (flymake-proc-stop-all-syntax-checks) |
| 735 | (call-interactively 'compile)) | 735 | (call-interactively 'compile)) |
| 736 | 736 | ||
| 737 | ;;;; general init-cleanup and helper routines | 737 | ;;;; general init-cleanup and helper routines |
| 738 | (defun flymake-create-temp-inplace (file-name prefix) | 738 | (defun flymake-proc-create-temp-inplace (file-name prefix) |
| 739 | (unless (stringp file-name) | 739 | (unless (stringp file-name) |
| 740 | (error "Invalid file-name")) | 740 | (error "Invalid file-name")) |
| 741 | (or prefix | 741 | (or prefix |
| @@ -748,7 +748,7 @@ Instead of a function, it can also be a regular expression.") | |||
| 748 | (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) | 748 | (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) |
| 749 | temp-name)) | 749 | temp-name)) |
| 750 | 750 | ||
| 751 | (defun flymake-create-temp-with-folder-structure (file-name _prefix) | 751 | (defun flymake-proc-create-temp-with-folder-structure (file-name _prefix) |
| 752 | (unless (stringp file-name) | 752 | (unless (stringp file-name) |
| 753 | (error "Invalid file-name")) | 753 | (error "Invalid file-name")) |
| 754 | 754 | ||
| @@ -762,48 +762,48 @@ Instead of a function, it can also be a regular expression.") | |||
| 762 | (file-truename (expand-file-name (file-name-nondirectory file-name) | 762 | (file-truename (expand-file-name (file-name-nondirectory file-name) |
| 763 | temp-dir)))) | 763 | temp-dir)))) |
| 764 | 764 | ||
| 765 | (defun flymake-delete-temp-directory (dir-name) | 765 | (defun flymake-proc--delete-temp-directory (dir-name) |
| 766 | "Attempt to delete temp dir created by `flymake-create-temp-with-folder-structure', do not fail on error." | 766 | "Attempt to delete temp dir created by `flymake-proc-create-temp-with-folder-structure', do not fail on error." |
| 767 | (let* ((temp-dir temporary-file-directory) | 767 | (let* ((temp-dir temporary-file-directory) |
| 768 | (suffix (substring dir-name (1+ (length temp-dir))))) | 768 | (suffix (substring dir-name (1+ (length temp-dir))))) |
| 769 | 769 | ||
| 770 | (while (> (length suffix) 0) | 770 | (while (> (length suffix) 0) |
| 771 | (setq suffix (directory-file-name suffix)) | 771 | (setq suffix (directory-file-name suffix)) |
| 772 | ;;+(flymake-log 0 "suffix=%s" suffix) | 772 | ;;+(flymake-log 0 "suffix=%s" suffix) |
| 773 | (flymake-safe-delete-directory | 773 | (flymake-proc--safe-delete-directory |
| 774 | (file-truename (expand-file-name suffix temp-dir))) | 774 | (file-truename (expand-file-name suffix temp-dir))) |
| 775 | (setq suffix (file-name-directory suffix))))) | 775 | (setq suffix (file-name-directory suffix))))) |
| 776 | 776 | ||
| 777 | (defvar-local flymake-temp-source-file-name nil) | 777 | (defvar-local flymake-proc--temp-source-file-name nil) |
| 778 | (defvar-local flymake-master-file-name nil) | 778 | (defvar-local flymake-proc--master-file-name nil) |
| 779 | (defvar-local flymake-temp-master-file-name nil) | 779 | (defvar-local flymake-proc--temp-master-file-name nil) |
| 780 | (defvar-local flymake-base-dir nil) | 780 | (defvar-local flymake-proc--base-dir nil) |
| 781 | 781 | ||
| 782 | (defun flymake-init-create-temp-buffer-copy (create-temp-f) | 782 | (defun flymake-proc-init-create-temp-buffer-copy (create-temp-f) |
| 783 | "Make a temporary copy of the current buffer, save its name in buffer data and return the name." | 783 | "Make a temporary copy of the current buffer, save its name in buffer data and return the name." |
| 784 | (let* ((source-file-name buffer-file-name) | 784 | (let* ((source-file-name buffer-file-name) |
| 785 | (temp-source-file-name (funcall create-temp-f source-file-name "flymake"))) | 785 | (temp-source-file-name (funcall create-temp-f source-file-name "flymake"))) |
| 786 | 786 | ||
| 787 | (flymake-save-buffer-in-file temp-source-file-name) | 787 | (flymake-proc--save-buffer-in-file temp-source-file-name) |
| 788 | (setq flymake-temp-source-file-name temp-source-file-name) | 788 | (setq flymake-proc--temp-source-file-name temp-source-file-name) |
| 789 | temp-source-file-name)) | 789 | temp-source-file-name)) |
| 790 | 790 | ||
| 791 | (defun flymake-simple-cleanup () | 791 | (defun flymake-proc-simple-cleanup () |
| 792 | "Do cleanup after `flymake-init-create-temp-buffer-copy'. | 792 | "Do cleanup after `flymake-proc-init-create-temp-buffer-copy'. |
| 793 | Delete temp file." | 793 | Delete temp file." |
| 794 | (flymake-safe-delete-file flymake-temp-source-file-name) | 794 | (flymake-proc--safe-delete-file flymake-proc--temp-source-file-name) |
| 795 | (setq flymake-last-change-time nil)) | 795 | (setq flymake-last-change-time nil)) |
| 796 | 796 | ||
| 797 | (defun flymake-get-real-file-name (file-name-from-err-msg) | 797 | (defun flymake-proc-get-real-file-name (file-name-from-err-msg) |
| 798 | "Translate file name from error message to \"real\" file name. | 798 | "Translate file name from error message to \"real\" file name. |
| 799 | Return full-name. Names are real, not patched." | 799 | Return full-name. Names are real, not patched." |
| 800 | (let* ((real-name nil) | 800 | (let* ((real-name nil) |
| 801 | (source-file-name buffer-file-name) | 801 | (source-file-name buffer-file-name) |
| 802 | (master-file-name flymake-master-file-name) | 802 | (master-file-name flymake-proc--master-file-name) |
| 803 | (temp-source-file-name flymake-temp-source-file-name) | 803 | (temp-source-file-name flymake-proc--temp-source-file-name) |
| 804 | (temp-master-file-name flymake-temp-master-file-name) | 804 | (temp-master-file-name flymake-proc--temp-master-file-name) |
| 805 | (base-dirs | 805 | (base-dirs |
| 806 | (list flymake-base-dir | 806 | (list flymake-proc--base-dir |
| 807 | (file-name-directory source-file-name) | 807 | (file-name-directory source-file-name) |
| 808 | (if master-file-name (file-name-directory master-file-name)))) | 808 | (if master-file-name (file-name-directory master-file-name)))) |
| 809 | (files (list (list source-file-name source-file-name) | 809 | (files (list (list source-file-name source-file-name) |
| @@ -814,17 +814,17 @@ Return full-name. Names are real, not patched." | |||
| 814 | (when (equal 0 (length file-name-from-err-msg)) | 814 | (when (equal 0 (length file-name-from-err-msg)) |
| 815 | (setq file-name-from-err-msg source-file-name)) | 815 | (setq file-name-from-err-msg source-file-name)) |
| 816 | 816 | ||
| 817 | (setq real-name (flymake-get-full-patched-file-name file-name-from-err-msg base-dirs files)) | 817 | (setq real-name (flymake-proc--get-full-patched-file-name file-name-from-err-msg base-dirs files)) |
| 818 | ;; if real-name is nil, than file name from err msg is none of the files we've patched | 818 | ;; if real-name is nil, than file name from err msg is none of the files we've patched |
| 819 | (if (not real-name) | 819 | (if (not real-name) |
| 820 | (setq real-name (flymake-get-full-nonpatched-file-name file-name-from-err-msg base-dirs))) | 820 | (setq real-name (flymake-proc--get-full-nonpatched-file-name file-name-from-err-msg base-dirs))) |
| 821 | (if (not real-name) | 821 | (if (not real-name) |
| 822 | (setq real-name file-name-from-err-msg)) | 822 | (setq real-name file-name-from-err-msg)) |
| 823 | (setq real-name (flymake-fix-file-name real-name)) | 823 | (setq real-name (flymake-proc--fix-file-name real-name)) |
| 824 | (flymake-log 3 "get-real-file-name: file-name=%s real-name=%s" file-name-from-err-msg real-name) | 824 | (flymake-log 3 "get-real-file-name: file-name=%s real-name=%s" file-name-from-err-msg real-name) |
| 825 | real-name)) | 825 | real-name)) |
| 826 | 826 | ||
| 827 | (defun flymake-get-full-patched-file-name (file-name-from-err-msg base-dirs files) | 827 | (defun flymake-proc--get-full-patched-file-name (file-name-from-err-msg base-dirs files) |
| 828 | (let* ((base-dirs-count (length base-dirs)) | 828 | (let* ((base-dirs-count (length base-dirs)) |
| 829 | (file-count (length files)) | 829 | (file-count (length files)) |
| 830 | (real-name nil)) | 830 | (real-name nil)) |
| @@ -836,7 +836,7 @@ Return full-name. Names are real, not patched." | |||
| 836 | (this-file (nth 0 (nth (1- file-count) files))) | 836 | (this-file (nth 0 (nth (1- file-count) files))) |
| 837 | (this-real-name (nth 1 (nth (1- file-count) files)))) | 837 | (this-real-name (nth 1 (nth (1- file-count) files)))) |
| 838 | ;;+(flymake-log 0 "this-dir=%s this-file=%s this-real=%s msg-file=%s" this-dir this-file this-real-name file-name-from-err-msg) | 838 | ;;+(flymake-log 0 "this-dir=%s this-file=%s this-real=%s msg-file=%s" this-dir this-file this-real-name file-name-from-err-msg) |
| 839 | (when (and this-dir this-file (flymake-same-files | 839 | (when (and this-dir this-file (flymake-proc--same-files |
| 840 | (expand-file-name file-name-from-err-msg this-dir) | 840 | (expand-file-name file-name-from-err-msg this-dir) |
| 841 | this-file)) | 841 | this-file)) |
| 842 | (setq real-name this-real-name))) | 842 | (setq real-name this-real-name))) |
| @@ -844,7 +844,7 @@ Return full-name. Names are real, not patched." | |||
| 844 | (setq base-dirs-count (1- base-dirs-count))) | 844 | (setq base-dirs-count (1- base-dirs-count))) |
| 845 | real-name)) | 845 | real-name)) |
| 846 | 846 | ||
| 847 | (defun flymake-get-full-nonpatched-file-name (file-name-from-err-msg base-dirs) | 847 | (defun flymake-proc--get-full-nonpatched-file-name (file-name-from-err-msg base-dirs) |
| 848 | (let* ((real-name nil)) | 848 | (let* ((real-name nil)) |
| 849 | (if (file-name-absolute-p file-name-from-err-msg) | 849 | (if (file-name-absolute-p file-name-from-err-msg) |
| 850 | (setq real-name file-name-from-err-msg) | 850 | (setq real-name file-name-from-err-msg) |
| @@ -857,23 +857,23 @@ Return full-name. Names are real, not patched." | |||
| 857 | (setq base-dirs-count (1- base-dirs-count)))))) | 857 | (setq base-dirs-count (1- base-dirs-count)))))) |
| 858 | real-name)) | 858 | real-name)) |
| 859 | 859 | ||
| 860 | (defun flymake-init-find-buildfile-dir (source-file-name buildfile-name) | 860 | (defun flymake-proc--init-find-buildfile-dir (source-file-name buildfile-name) |
| 861 | "Find buildfile, store its dir in buffer data and return its dir, if found." | 861 | "Find buildfile, store its dir in buffer data and return its dir, if found." |
| 862 | (let* ((buildfile-dir | 862 | (let* ((buildfile-dir |
| 863 | (flymake-find-buildfile buildfile-name | 863 | (flymake-proc--find-buildfile buildfile-name |
| 864 | (file-name-directory source-file-name)))) | 864 | (file-name-directory source-file-name)))) |
| 865 | (if buildfile-dir | 865 | (if buildfile-dir |
| 866 | (setq flymake-base-dir buildfile-dir) | 866 | (setq flymake-proc--base-dir buildfile-dir) |
| 867 | (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) | 867 | (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) |
| 868 | (flymake-report-fatal-status | 868 | (flymake-report-fatal-status |
| 869 | "NOMK" (format "No buildfile (%s) found for %s" | 869 | "NOMK" (format "No buildfile (%s) found for %s" |
| 870 | buildfile-name source-file-name))))) | 870 | buildfile-name source-file-name))))) |
| 871 | 871 | ||
| 872 | (defun flymake-init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp) | 872 | (defun flymake-proc--init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp) |
| 873 | "Find master file (or buffer), create its copy along with a copy of the source file." | 873 | "Find master file (or buffer), create its copy along with a copy of the source file." |
| 874 | (let* ((source-file-name buffer-file-name) | 874 | (let* ((source-file-name buffer-file-name) |
| 875 | (temp-source-file-name (flymake-init-create-temp-buffer-copy create-temp-f)) | 875 | (temp-source-file-name (flymake-proc-init-create-temp-buffer-copy create-temp-f)) |
| 876 | (master-and-temp-master (flymake-create-master-file | 876 | (master-and-temp-master (flymake-proc--create-master-file |
| 877 | source-file-name temp-source-file-name | 877 | source-file-name temp-source-file-name |
| 878 | get-incl-dirs-f create-temp-f | 878 | get-incl-dirs-f create-temp-f |
| 879 | master-file-masks include-regexp))) | 879 | master-file-masks include-regexp))) |
| @@ -883,15 +883,15 @@ Return full-name. Names are real, not patched." | |||
| 883 | (flymake-log 1 "cannot find master file for %s" source-file-name) | 883 | (flymake-log 1 "cannot find master file for %s" source-file-name) |
| 884 | (flymake-report-status "!" "") ; NOMASTER | 884 | (flymake-report-status "!" "") ; NOMASTER |
| 885 | nil) | 885 | nil) |
| 886 | (setq flymake-master-file-name (nth 0 master-and-temp-master)) | 886 | (setq flymake-proc--master-file-name (nth 0 master-and-temp-master)) |
| 887 | (setq flymake-temp-master-file-name (nth 1 master-and-temp-master))))) | 887 | (setq flymake-proc--temp-master-file-name (nth 1 master-and-temp-master))))) |
| 888 | 888 | ||
| 889 | (defun flymake-master-cleanup () | 889 | (defun flymake-proc-master-cleanup () |
| 890 | (flymake-simple-cleanup) | 890 | (flymake-proc-simple-cleanup) |
| 891 | (flymake-safe-delete-file flymake-temp-master-file-name)) | 891 | (flymake-proc--safe-delete-file flymake-proc--temp-master-file-name)) |
| 892 | 892 | ||
| 893 | ;;;; make-specific init-cleanup routines | 893 | ;;;; make-specific init-cleanup routines |
| 894 | (defun flymake-get-syntax-check-program-args (source-file-name base-dir use-relative-base-dir use-relative-source get-cmd-line-f) | 894 | (defun flymake-proc--get-syntax-check-program-args (source-file-name base-dir use-relative-base-dir use-relative-source get-cmd-line-f) |
| 895 | "Create a command line for syntax check using GET-CMD-LINE-F." | 895 | "Create a command line for syntax check using GET-CMD-LINE-F." |
| 896 | (funcall get-cmd-line-f | 896 | (funcall get-cmd-line-f |
| 897 | (if use-relative-source | 897 | (if use-relative-source |
| @@ -902,7 +902,7 @@ Return full-name. Names are real, not patched." | |||
| 902 | (file-name-directory source-file-name)) | 902 | (file-name-directory source-file-name)) |
| 903 | base-dir))) | 903 | base-dir))) |
| 904 | 904 | ||
| 905 | (defun flymake-get-make-cmdline (source base-dir) | 905 | (defun flymake-proc-get-make-cmdline (source base-dir) |
| 906 | (list "make" | 906 | (list "make" |
| 907 | (list "-s" | 907 | (list "-s" |
| 908 | "-C" | 908 | "-C" |
| @@ -911,111 +911,416 @@ Return full-name. Names are real, not patched." | |||
| 911 | "SYNTAX_CHECK_MODE=1" | 911 | "SYNTAX_CHECK_MODE=1" |
| 912 | "check-syntax"))) | 912 | "check-syntax"))) |
| 913 | 913 | ||
| 914 | (defun flymake-get-ant-cmdline (source base-dir) | 914 | (defun flymake-proc-get-ant-cmdline (source base-dir) |
| 915 | (list "ant" | 915 | (list "ant" |
| 916 | (list "-buildfile" | 916 | (list "-buildfile" |
| 917 | (concat base-dir "/" "build.xml") | 917 | (concat base-dir "/" "build.xml") |
| 918 | (concat "-DCHK_SOURCES=" source) | 918 | (concat "-DCHK_SOURCES=" source) |
| 919 | "check-syntax"))) | 919 | "check-syntax"))) |
| 920 | 920 | ||
| 921 | (defun flymake-simple-make-init-impl (create-temp-f use-relative-base-dir use-relative-source build-file-name get-cmdline-f) | 921 | (defun flymake-proc-simple-make-init-impl (create-temp-f use-relative-base-dir use-relative-source build-file-name get-cmdline-f) |
| 922 | "Create syntax check command line for a directly checked source file. | 922 | "Create syntax check command line for a directly checked source file. |
| 923 | Use CREATE-TEMP-F for creating temp copy." | 923 | Use CREATE-TEMP-F for creating temp copy." |
| 924 | (let* ((args nil) | 924 | (let* ((args nil) |
| 925 | (source-file-name buffer-file-name) | 925 | (source-file-name buffer-file-name) |
| 926 | (buildfile-dir (flymake-init-find-buildfile-dir source-file-name build-file-name))) | 926 | (buildfile-dir (flymake-proc--init-find-buildfile-dir source-file-name build-file-name))) |
| 927 | (if buildfile-dir | 927 | (if buildfile-dir |
| 928 | (let* ((temp-source-file-name (flymake-init-create-temp-buffer-copy create-temp-f))) | 928 | (let* ((temp-source-file-name (flymake-proc-init-create-temp-buffer-copy create-temp-f))) |
| 929 | (setq args (flymake-get-syntax-check-program-args temp-source-file-name buildfile-dir | 929 | (setq args (flymake-proc--get-syntax-check-program-args temp-source-file-name buildfile-dir |
| 930 | use-relative-base-dir use-relative-source | 930 | use-relative-base-dir use-relative-source |
| 931 | get-cmdline-f)))) | 931 | get-cmdline-f)))) |
| 932 | args)) | 932 | args)) |
| 933 | 933 | ||
| 934 | (defun flymake-simple-make-init () | 934 | (defun flymake-proc-simple-make-init () |
| 935 | (flymake-simple-make-init-impl 'flymake-create-temp-inplace t t "Makefile" 'flymake-get-make-cmdline)) | 935 | (flymake-proc-simple-make-init-impl 'flymake-proc-create-temp-inplace t t "Makefile" 'flymake-proc-get-make-cmdline)) |
| 936 | 936 | ||
| 937 | (defun flymake-master-make-init (get-incl-dirs-f master-file-masks include-regexp) | 937 | (defun flymake-proc-master-make-init (get-incl-dirs-f master-file-masks include-regexp) |
| 938 | "Create make command line for a source file checked via master file compilation." | 938 | "Create make command line for a source file checked via master file compilation." |
| 939 | (let* ((make-args nil) | 939 | (let* ((make-args nil) |
| 940 | (temp-master-file-name (flymake-init-create-temp-source-and-master-buffer-copy | 940 | (temp-master-file-name (flymake-proc--init-create-temp-source-and-master-buffer-copy |
| 941 | get-incl-dirs-f 'flymake-create-temp-inplace | 941 | get-incl-dirs-f 'flymake-proc-create-temp-inplace |
| 942 | master-file-masks include-regexp))) | 942 | master-file-masks include-regexp))) |
| 943 | (when temp-master-file-name | 943 | (when temp-master-file-name |
| 944 | (let* ((buildfile-dir (flymake-init-find-buildfile-dir temp-master-file-name "Makefile"))) | 944 | (let* ((buildfile-dir (flymake-proc--init-find-buildfile-dir temp-master-file-name "Makefile"))) |
| 945 | (if buildfile-dir | 945 | (if buildfile-dir |
| 946 | (setq make-args (flymake-get-syntax-check-program-args | 946 | (setq make-args (flymake-proc--get-syntax-check-program-args |
| 947 | temp-master-file-name buildfile-dir nil nil 'flymake-get-make-cmdline))))) | 947 | temp-master-file-name buildfile-dir nil nil 'flymake-proc-get-make-cmdline))))) |
| 948 | make-args)) | 948 | make-args)) |
| 949 | 949 | ||
| 950 | (defun flymake-find-make-buildfile (source-dir) | 950 | (defun flymake-proc--find-make-buildfile (source-dir) |
| 951 | (flymake-find-buildfile "Makefile" source-dir)) | 951 | (flymake-proc--find-buildfile "Makefile" source-dir)) |
| 952 | 952 | ||
| 953 | ;;;; .h/make specific | 953 | ;;;; .h/make specific |
| 954 | (defun flymake-master-make-header-init () | 954 | (defun flymake-proc-master-make-header-init () |
| 955 | (flymake-master-make-init | 955 | (flymake-proc-master-make-init |
| 956 | 'flymake-get-include-dirs | 956 | 'flymake-proc-get-include-dirs |
| 957 | '("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'") | 957 | '("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'") |
| 958 | "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\"")) | 958 | "[ \t]*#[ \t]*include[ \t]*\"\\([[:word:]0-9/\\_.]*%s\\)\"")) |
| 959 | 959 | ||
| 960 | ;;;; .java/make specific | 960 | ;;;; .java/make specific |
| 961 | (defun flymake-simple-make-java-init () | 961 | (defun flymake-proc-simple-make-java-init () |
| 962 | (flymake-simple-make-init-impl 'flymake-create-temp-with-folder-structure nil nil "Makefile" 'flymake-get-make-cmdline)) | 962 | (flymake-proc-simple-make-init-impl 'flymake-proc-create-temp-with-folder-structure nil nil "Makefile" 'flymake-proc-get-make-cmdline)) |
| 963 | 963 | ||
| 964 | (defun flymake-simple-ant-java-init () | 964 | (defun flymake-proc-simple-ant-java-init () |
| 965 | (flymake-simple-make-init-impl 'flymake-create-temp-with-folder-structure nil nil "build.xml" 'flymake-get-ant-cmdline)) | 965 | (flymake-proc-simple-make-init-impl 'flymake-proc-create-temp-with-folder-structure nil nil "build.xml" 'flymake-proc-get-ant-cmdline)) |
| 966 | 966 | ||
| 967 | (defun flymake-simple-java-cleanup () | 967 | (defun flymake-proc-simple-java-cleanup () |
| 968 | "Cleanup after `flymake-simple-make-java-init' -- delete temp file and dirs." | 968 | "Cleanup after `flymake-proc-simple-make-java-init' -- delete temp file and dirs." |
| 969 | (flymake-safe-delete-file flymake-temp-source-file-name) | 969 | (flymake-proc--safe-delete-file flymake-proc--temp-source-file-name) |
| 970 | (when flymake-temp-source-file-name | 970 | (when flymake-proc--temp-source-file-name |
| 971 | (flymake-delete-temp-directory | 971 | (flymake-proc--delete-temp-directory |
| 972 | (file-name-directory flymake-temp-source-file-name)))) | 972 | (file-name-directory flymake-proc--temp-source-file-name)))) |
| 973 | 973 | ||
| 974 | ;;;; perl-specific init-cleanup routines | 974 | ;;;; perl-specific init-cleanup routines |
| 975 | (defun flymake-perl-init () | 975 | (defun flymake-proc-perl-init () |
| 976 | (let* ((temp-file (flymake-init-create-temp-buffer-copy | 976 | (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy |
| 977 | 'flymake-create-temp-inplace)) | 977 | 'flymake-proc-create-temp-inplace)) |
| 978 | (local-file (file-relative-name | 978 | (local-file (file-relative-name |
| 979 | temp-file | 979 | temp-file |
| 980 | (file-name-directory buffer-file-name)))) | 980 | (file-name-directory buffer-file-name)))) |
| 981 | (list "perl" (list "-wc " local-file)))) | 981 | (list "perl" (list "-wc " local-file)))) |
| 982 | 982 | ||
| 983 | ;;;; php-specific init-cleanup routines | 983 | ;;;; php-specific init-cleanup routines |
| 984 | (defun flymake-php-init () | 984 | (defun flymake-proc-php-init () |
| 985 | (let* ((temp-file (flymake-init-create-temp-buffer-copy | 985 | (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy |
| 986 | 'flymake-create-temp-inplace)) | 986 | 'flymake-proc-create-temp-inplace)) |
| 987 | (local-file (file-relative-name | 987 | (local-file (file-relative-name |
| 988 | temp-file | 988 | temp-file |
| 989 | (file-name-directory buffer-file-name)))) | 989 | (file-name-directory buffer-file-name)))) |
| 990 | (list "php" (list "-f" local-file "-l")))) | 990 | (list "php" (list "-f" local-file "-l")))) |
| 991 | 991 | ||
| 992 | ;;;; tex-specific init-cleanup routines | 992 | ;;;; tex-specific init-cleanup routines |
| 993 | (defun flymake-get-tex-args (file-name) | 993 | (defun flymake-proc--get-tex-args (file-name) |
| 994 | ;;(list "latex" (list "-c-style-errors" file-name)) | 994 | ;;(list "latex" (list "-c-style-errors" file-name)) |
| 995 | (list "texify" (list "--pdf" "--tex-option=-c-style-errors" file-name))) | 995 | (list "texify" (list "--pdf" "--tex-option=-c-style-errors" file-name))) |
| 996 | 996 | ||
| 997 | (defun flymake-simple-tex-init () | 997 | (defun flymake-proc-simple-tex-init () |
| 998 | (flymake-get-tex-args (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace))) | 998 | (flymake-proc--get-tex-args (flymake-proc-init-create-temp-buffer-copy 'flymake-proc-create-temp-inplace))) |
| 999 | 999 | ||
| 1000 | ;; Perhaps there should be a buffer-local variable flymake-master-file | 1000 | ;; Perhaps there should be a buffer-local variable flymake-master-file |
| 1001 | ;; that people can set to override this stuff. Could inherit from | 1001 | ;; that people can set to override this stuff. Could inherit from |
| 1002 | ;; the similar AUCTeX variable. | 1002 | ;; the similar AUCTeX variable. |
| 1003 | (defun flymake-master-tex-init () | 1003 | (defun flymake-proc-master-tex-init () |
| 1004 | (let* ((temp-master-file-name (flymake-init-create-temp-source-and-master-buffer-copy | 1004 | (let* ((temp-master-file-name (flymake-proc--init-create-temp-source-and-master-buffer-copy |
| 1005 | 'flymake-get-include-dirs-dot 'flymake-create-temp-inplace | 1005 | 'flymake-proc-get-include-dirs-dot 'flymake-proc-create-temp-inplace |
| 1006 | '("\\.tex\\'") | 1006 | '("\\.tex\\'") |
| 1007 | "[ \t]*\\in\\(?:put\\|clude\\)[ \t]*{\\(.*%s\\)}"))) | 1007 | "[ \t]*\\in\\(?:put\\|clude\\)[ \t]*{\\(.*%s\\)}"))) |
| 1008 | (when temp-master-file-name | 1008 | (when temp-master-file-name |
| 1009 | (flymake-get-tex-args temp-master-file-name)))) | 1009 | (flymake-proc--get-tex-args temp-master-file-name)))) |
| 1010 | 1010 | ||
| 1011 | (defun flymake-get-include-dirs-dot (_base-dir) | 1011 | (defun flymake-proc--get-include-dirs-dot (_base-dir) |
| 1012 | '(".")) | 1012 | '(".")) |
| 1013 | 1013 | ||
| 1014 | ;;;; xml-specific init-cleanup routines | 1014 | ;;;; xml-specific init-cleanup routines |
| 1015 | (defun flymake-xml-init () | 1015 | (defun flymake-proc-xml-init () |
| 1016 | (list flymake-xml-program | 1016 | (list flymake-proc-xml-program |
| 1017 | (list "val" (flymake-init-create-temp-buffer-copy | 1017 | (list "val" (flymake-proc-init-create-temp-buffer-copy |
| 1018 | 'flymake-create-temp-inplace)))) | 1018 | 'flymake-proc-create-temp-inplace)))) |
| 1019 | |||
| 1020 | |||
| 1021 | ;;;; | ||
| 1022 | |||
| 1023 | (progn | ||
| 1024 | (define-obsolete-variable-alias 'flymake-compilation-prevents-syntax-check | ||
| 1025 | 'flymake-proc-compilation-prevents-syntax-check "26.1" | ||
| 1026 | "If non-nil, don't start syntax check if compilation is running.") | ||
| 1027 | (define-obsolete-variable-alias 'flymake-xml-program | ||
| 1028 | 'flymake-proc-xml-program "26.1" | ||
| 1029 | "Program to use for XML validation.") | ||
| 1030 | (define-obsolete-variable-alias 'flymake-master-file-dirs | ||
| 1031 | 'flymake-proc-master-file-dirs "26.1" | ||
| 1032 | "Dirs where to look for master files.") | ||
| 1033 | (define-obsolete-variable-alias 'flymake-master-file-count-limit | ||
| 1034 | 'flymake-proc-master-file-count-limit "26.1" | ||
| 1035 | "Max number of master files to check.") | ||
| 1036 | (define-obsolete-variable-alias 'flymake-allowed-file-name-masks | ||
| 1037 | 'flymake-proc-allowed-file-name-masks "26.1" | ||
| 1038 | "Files syntax checking is allowed for. | ||
| 1039 | This is an alist with elements of the form: | ||
| 1040 | REGEXP INIT [CLEANUP [NAME]] | ||
| 1041 | REGEXP is a regular expression that matches a file name. | ||
| 1042 | INIT is the init function to use. | ||
| 1043 | CLEANUP is the cleanup function to use, default `flymake-simple-cleanup'. | ||
| 1044 | NAME is the file name function to use, default `flymake-get-real-file-name'.") | ||
| 1045 | (define-obsolete-variable-alias 'flymake-processes | ||
| 1046 | 'flymake-proc--processes "26.1" | ||
| 1047 | "List of currently active flymake processes.") | ||
| 1048 | (define-obsolete-function-alias 'flymake-get-file-name-mode-and-masks | ||
| 1049 | 'flymake-proc--get-file-name-mode-and-masks "26.1" | ||
| 1050 | "Return the corresponding entry from ‘flymake-allowed-file-name-masks’.") | ||
| 1051 | (define-obsolete-function-alias 'flymake-get-init-function | ||
| 1052 | 'flymake-proc--get-init-function "26.1" | ||
| 1053 | "Return init function to be used for the file.") | ||
| 1054 | (define-obsolete-function-alias 'flymake-get-cleanup-function | ||
| 1055 | 'flymake-proc--get-cleanup-function "26.1" | ||
| 1056 | "Return cleanup function to be used for the file.") | ||
| 1057 | (define-obsolete-function-alias 'flymake-get-real-file-name-function | ||
| 1058 | 'flymake-proc--get-real-file-name-function "26.1" | ||
| 1059 | nil) | ||
| 1060 | (define-obsolete-variable-alias 'flymake-find-buildfile-cache | ||
| 1061 | 'flymake-proc--find-buildfile-cache "26.1" | ||
| 1062 | nil) | ||
| 1063 | (define-obsolete-function-alias 'flymake-get-buildfile-from-cache | ||
| 1064 | 'flymake-proc--get-buildfile-from-cache "26.1" | ||
| 1065 | "Look up DIR-NAME in cache and return its associated value. | ||
| 1066 | If DIR-NAME is not found, return nil.") | ||
| 1067 | (define-obsolete-function-alias 'flymake-add-buildfile-to-cache | ||
| 1068 | 'flymake-proc--add-buildfile-to-cache "26.1" | ||
| 1069 | "Associate DIR-NAME with BUILDFILE in the buildfile cache.") | ||
| 1070 | (define-obsolete-function-alias 'flymake-clear-buildfile-cache | ||
| 1071 | 'flymake-proc--clear-buildfile-cache "26.1" | ||
| 1072 | "Clear the buildfile cache.") | ||
| 1073 | (define-obsolete-function-alias 'flymake-find-buildfile | ||
| 1074 | 'flymake-proc--find-buildfile "26.1" | ||
| 1075 | "Find buildfile starting from current directory. | ||
| 1076 | Buildfile includes Makefile, build.xml etc. | ||
| 1077 | Return its file name if found, or nil if not found.") | ||
| 1078 | (define-obsolete-function-alias 'flymake-fix-file-name | ||
| 1079 | 'flymake-proc--fix-file-name "26.1" | ||
| 1080 | "Replace all occurrences of ‘\\’ with ‘/’.") | ||
| 1081 | (define-obsolete-function-alias 'flymake-same-files | ||
| 1082 | 'flymake-proc--same-files "26.1" | ||
| 1083 | "Check if FILE-NAME-ONE and FILE-NAME-TWO point to same file. | ||
| 1084 | Return t if so, nil if not. | ||
| 1085 | |||
| 1086 | (fn FILE-NAME-ONE FILE-NAME-TWO)") | ||
| 1087 | (define-obsolete-variable-alias 'flymake-included-file-name\) | ||
| 1088 | 'flymake-proc--included-file-name\) "26.1" | ||
| 1089 | nil) | ||
| 1090 | (define-obsolete-function-alias 'flymake-find-possible-master-files | ||
| 1091 | 'flymake-proc--find-possible-master-files "26.1" | ||
| 1092 | "Find (by name and location) all possible master files. | ||
| 1093 | |||
| 1094 | Name is specified by FILE-NAME and location is specified by | ||
| 1095 | MASTER-FILE-DIRS. Master files include .cpp and .c for .h. | ||
| 1096 | Files are searched for starting from the .h directory and max | ||
| 1097 | max-level parent dirs. File contents are not checked.") | ||
| 1098 | (define-obsolete-function-alias 'flymake-master-file-compare | ||
| 1099 | 'flymake-proc--master-file-compare "26.1" | ||
| 1100 | "Compare two files specified by FILE-ONE and FILE-TWO. | ||
| 1101 | This function is used in sort to move most possible file names | ||
| 1102 | to the beginning of the list (File.h -> File.cpp moved to top).") | ||
| 1103 | (define-obsolete-variable-alias 'flymake-check-file-limit | ||
| 1104 | 'flymake-proc-check-file-limit "26.1" | ||
| 1105 | "Maximum number of chars to look at when checking possible master file. | ||
| 1106 | Nil means search the entire file.") | ||
| 1107 | (define-obsolete-function-alias 'flymake-check-patch-master-file-buffer | ||
| 1108 | 'flymake-proc--check-patch-master-file-buffer "26.1" | ||
| 1109 | "Check if MASTER-FILE-NAME is a master file for SOURCE-FILE-NAME. | ||
| 1110 | If yes, patch a copy of MASTER-FILE-NAME to include PATCHED-SOURCE-FILE-NAME | ||
| 1111 | instead of SOURCE-FILE-NAME. | ||
| 1112 | |||
| 1113 | For example, foo.cpp is a master file if it includes foo.h. | ||
| 1114 | |||
| 1115 | When a buffer for MASTER-FILE-NAME exists, use it as a source | ||
| 1116 | instead of reading master file from disk.") | ||
| 1117 | (define-obsolete-function-alias 'flymake-replace-region | ||
| 1118 | 'flymake-proc--replace-region "26.1" | ||
| 1119 | "Replace text in BUFFER in region (BEG END) with REP.") | ||
| 1120 | (define-obsolete-function-alias 'flymake-read-file-to-temp-buffer | ||
| 1121 | 'flymake-proc--read-file-to-temp-buffer "26.1" | ||
| 1122 | "Insert contents of FILE-NAME into newly created temp buffer.") | ||
| 1123 | (define-obsolete-function-alias 'flymake-copy-buffer-to-temp-buffer | ||
| 1124 | 'flymake-proc--copy-buffer-to-temp-buffer "26.1" | ||
| 1125 | "Copy contents of BUFFER into newly created temp buffer.") | ||
| 1126 | (define-obsolete-function-alias 'flymake-check-include | ||
| 1127 | 'flymake-proc--check-include "26.1" | ||
| 1128 | "Check if SOURCE-FILE-NAME can be found in include path. | ||
| 1129 | Return t if it can be found via include path using INC-NAME.") | ||
| 1130 | (define-obsolete-function-alias 'flymake-find-buffer-for-file | ||
| 1131 | 'flymake-proc--find-buffer-for-file "26.1" | ||
| 1132 | "Check if there exists a buffer visiting FILE-NAME. | ||
| 1133 | Return t if so, nil if not.") | ||
| 1134 | (define-obsolete-function-alias 'flymake-create-master-file | ||
| 1135 | 'flymake-proc--create-master-file "26.1" | ||
| 1136 | "Save SOURCE-FILE-NAME with a different name. | ||
| 1137 | Find master file, patch and save it.") | ||
| 1138 | (define-obsolete-function-alias 'flymake-save-buffer-in-file | ||
| 1139 | 'flymake-proc--save-buffer-in-file "26.1" | ||
| 1140 | "Save the entire buffer contents into file FILE-NAME. | ||
| 1141 | Create parent directories as needed.") | ||
| 1142 | (define-obsolete-function-alias 'flymake-process-filter | ||
| 1143 | 'flymake-proc--process-filter "26.1" | ||
| 1144 | "Parse OUTPUT and highlight error lines. | ||
| 1145 | It’s flymake process filter.") | ||
| 1146 | (define-obsolete-function-alias 'flymake-process-sentinel | ||
| 1147 | 'flymake-proc--process-sentinel "26.1" | ||
| 1148 | "Sentinel for syntax check buffers.") | ||
| 1149 | (define-obsolete-function-alias 'flymake-post-syntax-check | ||
| 1150 | 'flymake-proc--post-syntax-check "26.1" | ||
| 1151 | nil) | ||
| 1152 | (define-obsolete-function-alias 'flymake-reformat-err-line-patterns-from-compile-el | ||
| 1153 | 'flymake-proc-reformat-err-line-patterns-from-compile-el "26.1" | ||
| 1154 | "Grab error line patterns from ORIGINAL-LIST in compile.el format. | ||
| 1155 | Convert it to flymake internal format.") | ||
| 1156 | (define-obsolete-variable-alias 'flymake-err-line-patterns | ||
| 1157 | 'flymake-proc-err-line-patterns "26.1" | ||
| 1158 | "Patterns for matching error/warning lines. Each pattern has the form | ||
| 1159 | (REGEXP FILE-IDX LINE-IDX COL-IDX ERR-TEXT-IDX). | ||
| 1160 | Use `flymake-reformat-err-line-patterns-from-compile-el' to add patterns | ||
| 1161 | from compile.el") | ||
| 1162 | (define-obsolete-variable-alias 'flymake-warning-predicate | ||
| 1163 | 'flymake-proc-warning-predicate "26.1" | ||
| 1164 | "Predicate matching against error text to detect a warning. | ||
| 1165 | Takes a single argument, the error's text and should return non-nil | ||
| 1166 | if it's a warning. | ||
| 1167 | Instead of a function, it can also be a regular expression.") | ||
| 1168 | (define-obsolete-function-alias 'flymake-parse-line | ||
| 1169 | 'flymake-proc-parse-line "26.1" | ||
| 1170 | "Parse LINE to see if it is an error or warning. | ||
| 1171 | Return its components if so, nil otherwise.") | ||
| 1172 | (define-obsolete-function-alias 'flymake-get-project-include-dirs-imp | ||
| 1173 | 'flymake-proc--get-project-include-dirs-imp "26.1" | ||
| 1174 | "Include dirs for the project current file belongs to.") | ||
| 1175 | (define-obsolete-variable-alias 'flymake-get-project-include-dirs-function | ||
| 1176 | 'flymake-proc--get-project-include-dirs-function "26.1" | ||
| 1177 | "Function used to get project include dirs, one parameter: basedir name.") | ||
| 1178 | (define-obsolete-function-alias 'flymake-get-project-include-dirs | ||
| 1179 | 'flymake-proc--get-project-include-dirs "26.1" | ||
| 1180 | nil) | ||
| 1181 | (define-obsolete-function-alias 'flymake-get-system-include-dirs | ||
| 1182 | 'flymake-proc--get-system-include-dirs "26.1" | ||
| 1183 | "System include dirs - from the ‘INCLUDE’ env setting.") | ||
| 1184 | (define-obsolete-variable-alias 'flymake-project-include-dirs-cache | ||
| 1185 | 'flymake-proc--project-include-dirs-cache "26.1" | ||
| 1186 | nil) | ||
| 1187 | (define-obsolete-function-alias 'flymake-add-project-include-dirs-to-cache | ||
| 1188 | 'flymake-proc--add-project-include-dirs-to-cache "26.1" | ||
| 1189 | nil) | ||
| 1190 | (define-obsolete-function-alias 'flymake-clear-project-include-dirs-cache | ||
| 1191 | 'flymake-proc--clear-project-include-dirs-cache "26.1" | ||
| 1192 | nil) | ||
| 1193 | (define-obsolete-function-alias 'flymake-get-include-dirs | ||
| 1194 | 'flymake-proc-get-include-dirs "26.1" | ||
| 1195 | "Get dirs to use when resolving local file names.") | ||
| 1196 | (define-obsolete-variable-alias 'flymake-restore-formatting | ||
| 1197 | 'flymake-proc--restore-formatting "26.1" | ||
| 1198 | nil) | ||
| 1199 | (define-obsolete-variable-alias 'flymake-get-program-dir | ||
| 1200 | 'flymake-proc--get-program-dir "26.1" | ||
| 1201 | nil) | ||
| 1202 | (define-obsolete-function-alias 'flymake-safe-delete-file | ||
| 1203 | 'flymake-proc--safe-delete-file "26.1" | ||
| 1204 | nil) | ||
| 1205 | (define-obsolete-function-alias 'flymake-safe-delete-directory | ||
| 1206 | 'flymake-proc--safe-delete-directory "26.1" | ||
| 1207 | nil) | ||
| 1208 | (define-obsolete-function-alias 'flymake-start-syntax-check | ||
| 1209 | 'flymake-proc-start-syntax-check "26.1" | ||
| 1210 | "Start syntax checking for current buffer.") | ||
| 1211 | (define-obsolete-function-alias 'flymake-kill-process | ||
| 1212 | 'flymake-proc--kill-process "26.1" | ||
| 1213 | "Kill process PROC.") | ||
| 1214 | (define-obsolete-function-alias 'flymake-stop-all-syntax-checks | ||
| 1215 | 'flymake-proc-stop-all-syntax-checks "26.1" | ||
| 1216 | "Kill all syntax check processes.") | ||
| 1217 | (define-obsolete-function-alias 'flymake-compilation-is-running | ||
| 1218 | 'flymake-proc--compilation-is-running "26.1" | ||
| 1219 | nil) | ||
| 1220 | (define-obsolete-function-alias 'flymake-compile | ||
| 1221 | 'flymake-proc-compile "26.1" | ||
| 1222 | "Kill all flymake syntax checks, start compilation.") | ||
| 1223 | (define-obsolete-function-alias 'flymake-create-temp-inplace | ||
| 1224 | 'flymake-proc-create-temp-inplace "26.1" | ||
| 1225 | nil) | ||
| 1226 | (define-obsolete-function-alias 'flymake-create-temp-with-folder-structure | ||
| 1227 | 'flymake-proc-create-temp-with-folder-structure "26.1" | ||
| 1228 | nil) | ||
| 1229 | (define-obsolete-function-alias 'flymake-delete-temp-directory | ||
| 1230 | 'flymake-proc--delete-temp-directory "26.1" | ||
| 1231 | "Attempt to delete temp dir created by ‘flymake-create-temp-with-folder-structure’, do not fail on error.") | ||
| 1232 | (define-obsolete-variable-alias 'flymake-temp-source-file-name | ||
| 1233 | 'flymake-proc--temp-source-file-name "26.1" | ||
| 1234 | nil) | ||
| 1235 | (define-obsolete-variable-alias 'flymake-master-file-name | ||
| 1236 | 'flymake-proc--master-file-name "26.1" | ||
| 1237 | nil) | ||
| 1238 | (define-obsolete-variable-alias 'flymake-temp-master-file-name | ||
| 1239 | 'flymake-proc--temp-master-file-name "26.1" | ||
| 1240 | nil) | ||
| 1241 | (define-obsolete-variable-alias 'flymake-base-dir | ||
| 1242 | 'flymake-proc--base-dir "26.1" | ||
| 1243 | nil) | ||
| 1244 | (define-obsolete-function-alias 'flymake-init-create-temp-buffer-copy | ||
| 1245 | 'flymake-proc-init-create-temp-buffer-copy "26.1" | ||
| 1246 | "Make a temporary copy of the current buffer, save its name in buffer data and return the name.") | ||
| 1247 | (define-obsolete-function-alias 'flymake-simple-cleanup | ||
| 1248 | 'flymake-proc-simple-cleanup "26.1" | ||
| 1249 | "Do cleanup after ‘flymake-init-create-temp-buffer-copy’. | ||
| 1250 | Delete temp file.") | ||
| 1251 | (define-obsolete-function-alias 'flymake-get-real-file-name | ||
| 1252 | 'flymake-proc-get-real-file-name "26.1" | ||
| 1253 | "Translate file name from error message to \"real\" file name. | ||
| 1254 | Return full-name. Names are real, not patched.") | ||
| 1255 | (define-obsolete-function-alias 'flymake-get-full-patched-file-name | ||
| 1256 | 'flymake-proc--get-full-patched-file-name "26.1" | ||
| 1257 | nil) | ||
| 1258 | (define-obsolete-function-alias 'flymake-get-full-nonpatched-file-name | ||
| 1259 | 'flymake-proc--get-full-nonpatched-file-name "26.1" | ||
| 1260 | nil) | ||
| 1261 | (define-obsolete-function-alias 'flymake-init-find-buildfile-dir | ||
| 1262 | 'flymake-proc--init-find-buildfile-dir "26.1" | ||
| 1263 | "Find buildfile, store its dir in buffer data and return its dir, if found.") | ||
| 1264 | (define-obsolete-function-alias 'flymake-init-create-temp-source-and-master-buffer-copy | ||
| 1265 | 'flymake-proc--init-create-temp-source-and-master-buffer-copy "26.1" | ||
| 1266 | "Find master file (or buffer), create its copy along with a copy of the source file.") | ||
| 1267 | (define-obsolete-function-alias 'flymake-master-cleanup | ||
| 1268 | 'flymake-proc-master-cleanup "26.1" | ||
| 1269 | nil) | ||
| 1270 | (define-obsolete-function-alias 'flymake-get-syntax-check-program-args | ||
| 1271 | 'flymake-proc--get-syntax-check-program-args "26.1" | ||
| 1272 | "Create a command line for syntax check using GET-CMD-LINE-F.") | ||
| 1273 | (define-obsolete-function-alias 'flymake-get-make-cmdline | ||
| 1274 | 'flymake-proc-get-make-cmdline "26.1" | ||
| 1275 | nil) | ||
| 1276 | (define-obsolete-function-alias 'flymake-get-ant-cmdline | ||
| 1277 | 'flymake-proc-get-ant-cmdline "26.1" | ||
| 1278 | nil) | ||
| 1279 | (define-obsolete-function-alias 'flymake-simple-make-init-impl | ||
| 1280 | 'flymake-proc-simple-make-init-impl "26.1" | ||
| 1281 | "Create syntax check command line for a directly checked source file. | ||
| 1282 | Use CREATE-TEMP-F for creating temp copy.") | ||
| 1283 | (define-obsolete-function-alias 'flymake-simple-make-init | ||
| 1284 | 'flymake-proc-simple-make-init "26.1" | ||
| 1285 | nil) | ||
| 1286 | (define-obsolete-function-alias 'flymake-master-make-init | ||
| 1287 | 'flymake-proc-master-make-init "26.1" | ||
| 1288 | "Create make command line for a source file checked via master file compilation.") | ||
| 1289 | (define-obsolete-function-alias 'flymake-find-make-buildfile | ||
| 1290 | 'flymake-proc--find-make-buildfile "26.1" | ||
| 1291 | nil) | ||
| 1292 | (define-obsolete-function-alias 'flymake-master-make-header-init | ||
| 1293 | 'flymake-proc-master-make-header-init "26.1" | ||
| 1294 | nil) | ||
| 1295 | (define-obsolete-function-alias 'flymake-simple-make-java-init | ||
| 1296 | 'flymake-proc-simple-make-java-init "26.1" | ||
| 1297 | nil) | ||
| 1298 | (define-obsolete-function-alias 'flymake-simple-ant-java-init | ||
| 1299 | 'flymake-proc-simple-ant-java-init "26.1" | ||
| 1300 | nil) | ||
| 1301 | (define-obsolete-function-alias 'flymake-simple-java-cleanup | ||
| 1302 | 'flymake-proc-simple-java-cleanup "26.1" | ||
| 1303 | "Cleanup after ‘flymake-simple-make-java-init’ -- delete temp file and dirs.") | ||
| 1304 | (define-obsolete-function-alias 'flymake-perl-init | ||
| 1305 | 'flymake-proc-perl-init "26.1" | ||
| 1306 | nil) | ||
| 1307 | (define-obsolete-function-alias 'flymake-php-init | ||
| 1308 | 'flymake-proc-php-init "26.1" | ||
| 1309 | nil) | ||
| 1310 | (define-obsolete-function-alias 'flymake-get-tex-args | ||
| 1311 | 'flymake-proc--get-tex-args "26.1" | ||
| 1312 | nil) | ||
| 1313 | (define-obsolete-function-alias 'flymake-simple-tex-init | ||
| 1314 | 'flymake-proc-simple-tex-init "26.1" | ||
| 1315 | nil) | ||
| 1316 | (define-obsolete-function-alias 'flymake-master-tex-init | ||
| 1317 | 'flymake-proc-master-tex-init "26.1" | ||
| 1318 | nil) | ||
| 1319 | (define-obsolete-function-alias 'flymake-xml-init | ||
| 1320 | 'flymake-proc-xml-init "26.1" | ||
| 1321 | nil)) | ||
| 1322 | |||
| 1323 | |||
| 1019 | 1324 | ||
| 1020 | (provide 'flymake-proc) | 1325 | (provide 'flymake-proc) |
| 1021 | ;;; flymake-proc.el ends here | 1326 | ;;; flymake-proc.el ends here |
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index b04346fd97c..dda72a35d27 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | (i 0)) | 38 | (i 0)) |
| 39 | (unwind-protect | 39 | (unwind-protect |
| 40 | (with-current-buffer buffer | 40 | (with-current-buffer buffer |
| 41 | (setq-local flymake-warning-predicate predicate) | 41 | (setq-local flymake-proc-warning-predicate predicate) |
| 42 | (goto-char (point-min)) | 42 | (goto-char (point-min)) |
| 43 | (flymake-mode 1) | 43 | (flymake-mode 1) |
| 44 | ;; Weirdness here... https://debbugs.gnu.org/17647#25 | 44 | ;; Weirdness here... https://debbugs.gnu.org/17647#25 |