• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/progmodes/

Lines Matching +defs:replace +defs:regexp +defs:in +defs:string

18 ;; GNU Emacs is distributed in the hope that it will be useful,
65 "Sorted list of line numbers and lists of err info in the form (file, err-text).")
69 "Same as `flymake-err-info', effective when a syntax check is in progress.")
87 (defalias 'flymake-replace-regexp-in-string
88 (if (eval-when-compile (fboundp 'replace-regexp-in-string))
89 'replace-regexp-in-string
90 (lambda (regexp rep str)
91 (replace-in-string str regexp rep))))
93 (defalias 'flymake-split-string
94 (if (condition-case nil (equal (split-string " bc " " " t) '("bc"))
96 (lambda (str pattern) (split-string str pattern t))
100 (let ((split (split-string str pattern)))
127 POSITION and WINDOW default to the position of point in the
197 "Return current row number in current frame."
208 "Return point position in pixels: (x, y)."
237 TEXT is a format control string, and the remaining arguments ARGS
238 are the string substitutions (see `format')."
245 ;; (flymake-save-buffer-in-file "d:/flymake.log" t) ; make log file name customizable
256 "Set VAL at position POS in LIST."
292 :type '(repeat (string symbol symbol symbol)))
301 (if (string-match (car (car fnm)) file-name)
331 :type '(repeat (string)))
383 :type '(repeat (string)))
428 This function is used in sort to move most possible file names
443 include-dirs regexp)
454 (setq regexp
455 (format regexp ; "[ \t]*#[ \t]*include[ \t]*\"\\(.*%s\\)\""
456 (regexp-quote source-file-nondir)))
461 (flymake-log 3 "checking %s against regexp %s"
462 master-file-name regexp)
465 (re-search-forward regexp search-limit t))
470 (setq inc-name (match-string 1))
479 ;; replace-match is not used here as it fails in
481 ;; check-includes calls replace-in-string
482 (flymake-replace-region
487 (flymake-save-buffer-in-file patched-master-file-name)))
496 (defun flymake-replace-region (beg end rep)
497 "Replace text in BUFFER in region (BEG END) with REP."
520 "Check if SOURCE-FILE-NAME can be found in include path.
540 (defun flymake-create-master-file (source-file-name patched-source-file-name get-incl-dirs-f create-temp-f masks include-regexp)
565 include-regexp))
574 (defun flymake-save-buffer-in-file (file-name)
579 (flymake-log 3 "saved buffer %s in file %s" (buffer-name) file-name))
581 (defun flymake-save-string-to-file (file-name data)
582 "Save string DATA to file FILE-NAME."
585 (defun flymake-read-file-to-string (file-name)
586 "Read contents of file FILE-NAME and return as a string."
629 (let ((err-str (format "Error in process sentinel for buffer %s: %s"
630 source-buffer (error-message-string err))))
646 (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)"
661 "Split OUTPUT into lines, merge in residual if necessary."
760 "Highlight error lines in BUFFER using info from ERR-INFO-LIST."
770 "Allocate a flymake overlay in range BEG and END."
783 "Delete all flymake overlays in BUFFER."
784 (dolist (ol (overlays-in (point-min) (point-max)))
793 (let ((ov (overlays-in beg end))
816 "Highlight line LINE-NO in current buffer.
854 "Parse err LINES, store info in ERR-INFO-LIST."
883 (let* ((lines (flymake-split-string output "[\n\r]+"))
884 (complete (equal "\n" (char-to-string (aref output (1- (length output))))))
892 "Grab error line patterns from ORIGINAL-LIST in compile.el format.
897 (let ((regexp (nth 0 item))
906 (setq converted-list (cons (list regexp file line col) converted-list)))))
911 (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
932 ;; compilation-error-regexp-alist)
933 (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
947 ;; "patterns for matching error/warning lines, (regexp file-idx line-idx err-text-idx)"
949 ;; :type '(repeat (string number number number))
962 (when (string-match (car (car patterns)) line)
966 (setq raw-file-name (if file-idx (match-string file-idx line) nil))
967 (setq line-no (if line-idx (string-to-number (match-string line-idx line)) 0))
969 (match-string (nth 4 (car patterns)) line)
972 (if (and err-text (string-match "^[wW]arning" err-text))
998 (or (string< (flymake-ler-type line-one) (flymake-ler-type line-two))
999 (and (string= (flymake-ler-type line-one) (flymake-ler-type line-two))
1001 (and (string= (flymake-ler-type line-one) (flymake-ler-type line-two))
1008 The new element is inserted in the proper position, according to
1052 (output (shell-command-to-string command-line))
1053 (lines (flymake-split-string output "\n"))
1057 (while (and (< idx count) (not (string-match "^INCLUDE_DIRS=.*" (nth idx lines))))
1060 (let* ((inc-lines (flymake-split-string (nth idx lines) " *-I"))
1063 (when (not (string-match "^INCLUDE_DIRS=.*" (nth (1- inc-count) inc-lines)))
1064 (push (flymake-replace-regexp-in-string "\"" "" (nth (1- inc-count) inc-lines)) inc-dirs))
1080 (if includes (flymake-split-string includes path-separator) nil)))
1103 ;; "Get dir to start program in."
1123 "If non-nil, syntax check won't be started in case compilation is running."
1179 cmd args (error-message-string err)))
1202 (and (boundp 'compilation-in-progress)
1203 compilation-in-progress))
1230 "Return number of current line in current buffer."
1234 "Return number of lines in buffer BUFFER."
1278 "Try to get buffer for FILE and goto line LINE in it."
1299 "Show status in mode line."
1345 (flymake-log 2 "flymake cannot check syntax in buffer %s" (buffer-name))
1401 (if (local-variable-p 'flymake-mode (current-buffer)) ; (???) other way to determine whether flymake is active in buffer being saved?
1461 "Go to next error in err ring."
1469 (flymake-log 1 "no errors in current buffer"))))
1472 "Go to previous error in err ring."
1480 (flymake-log 1 "no errors in current buffer"))))
1482 (defun flymake-patch-err-text (string)
1483 (if (string-match "^[\n\t :0-9]*\\(.*\\)$" string)
1484 (match-string 1 string)
1485 string))
1507 (slash-pos (string-match "/" dir))
1539 "Make a temporary copy of the current buffer, save its name in buffer data and return the name."
1543 (flymake-save-buffer-in-file temp-source-file-name)
1617 "Find buildfile, store its dir in buffer data and return its dir, if found."
1628 (defun flymake-init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp)
1635 master-file-masks include-regexp)))
1693 (defun flymake-master-make-init (get-incl-dirs-f master-file-masks include-regexp)
1698 master-file-masks include-regexp)))