diff options
| author | Karoly Lorentey | 2004-04-27 15:53:30 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-04-27 15:53:30 +0000 |
| commit | 6c8caecfb9c96879b8ea6f1e08314408be40a832 (patch) | |
| tree | cec3e345d246fe9b789786da588c5c6334215679 /lisp/progmodes | |
| parent | ced7ed5611e2a6e60a5ac7a97e165545843d0fa9 (diff) | |
| parent | c4c07982c1a6b3ddd9339ecdb9af1876f70d8792 (diff) | |
| download | emacs-6c8caecfb9c96879b8ea6f1e08314408be40a832.tar.gz emacs-6c8caecfb9c96879b8ea6f1e08314408be40a832.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-241
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-242
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-243
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-244
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-245
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-246
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248
src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-250
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-251
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-252
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-253
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-254
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-255
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-153
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/compile.el | 142 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 2 |
3 files changed, 67 insertions, 79 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 9aaa992ca76..2c8ead87000 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -184,7 +184,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 184 | 184 | ||
| 185 | ;; fixme: should be `mips' | 185 | ;; fixme: should be `mips' |
| 186 | (irix | 186 | (irix |
| 187 | "^[-[:alnum:]_/]+: \\(?:[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*:\ | 187 | "^[-[:alnum:]_/]+: \\(?:[sS]evere\\|[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*:\ |
| 188 | \\([^,\" \n\t]+\\)\\(?:, line\\|:\\) \\([0-9]+\\):" 3 4 nil (1 . 2)) | 188 | \\([^,\" \n\t]+\\)\\(?:, line\\|:\\) \\([0-9]+\\):" 3 4 nil (1 . 2)) |
| 189 | 189 | ||
| 190 | (java | 190 | (java |
| @@ -587,10 +587,9 @@ Faces `compilation-error-face', `compilation-warning-face', | |||
| 587 | "Get the meta-info that will be added as text-properties. | 587 | "Get the meta-info that will be added as text-properties. |
| 588 | LINE, END-LINE, COL, END-COL are integers or nil. | 588 | LINE, END-LINE, COL, END-COL are integers or nil. |
| 589 | TYPE can be 0, 1, or 2. | 589 | TYPE can be 0, 1, or 2. |
| 590 | FILE should be (FILENAME . DIRNAME) or nil." | 590 | FILE should be (ABSOLUTE-FILENAME) or (RELATIVE-FILENAME . DIRNAME) or nil." |
| 591 | (unless file (setq file '("*unknown*"))) | 591 | (unless file (setq file '("*unknown*"))) |
| 592 | (setq file (or (gethash file compilation-locs) | 592 | (setq file (compilation-get-file-structure file fmt)) |
| 593 | (puthash file (list file fmt) compilation-locs))) | ||
| 594 | ;; Get first already existing marker (if any has one, all have one). | 593 | ;; Get first already existing marker (if any has one, all have one). |
| 595 | ;; Do this first, as the compilation-assq`s may create new nodes. | 594 | ;; Do this first, as the compilation-assq`s may create new nodes. |
| 596 | (let* ((marker-line (car (cddr file))) ; a line structure | 595 | (let* ((marker-line (car (cddr file))) ; a line structure |
| @@ -599,19 +598,17 @@ FILE should be (FILENAME . DIRNAME) or nil." | |||
| 599 | end-marker loc end-loc) | 598 | end-marker loc end-loc) |
| 600 | (if (not (and marker (marker-buffer marker))) | 599 | (if (not (and marker (marker-buffer marker))) |
| 601 | (setq marker) ; no valid marker for this file | 600 | (setq marker) ; no valid marker for this file |
| 602 | (setq loc (or line 1) ; normalize no linenumber to line 1 | 601 | (setq loc (or line 1)) ; normalize no linenumber to line 1 |
| 603 | marker-line) | 602 | (catch 'marker ; find nearest loc, at least one exists |
| 604 | (catch 'marker ; find nearest loc, at least one exists | 603 | (dolist (x (nthcdr 3 file)) ; loop over remaining lines |
| 605 | (dolist (x (cddr file)) ; loop over lines | 604 | (if (> (car x) loc) ; still bigger |
| 606 | (if (> (or (car x) 1) loc) ; still bigger | ||
| 607 | (setq marker-line x) | 605 | (setq marker-line x) |
| 608 | (if (or (not marker-line) ; first in list | 606 | (if (> (- (or (car marker-line) 1) loc) |
| 609 | (> (- (or (car marker-line) 1) loc) | 607 | (- loc (car x))) ; current line is nearer |
| 610 | (- loc (or (car x) 1)))) ; current line is nearer | ||
| 611 | (setq marker-line x)) | 608 | (setq marker-line x)) |
| 612 | (throw 'marker t)))) | 609 | (throw 'marker t)))) |
| 613 | (setq marker (nth 3 (cadr marker-line)) | 610 | (setq marker (nth 3 (cadr marker-line)) |
| 614 | marker-line (car marker-line)) | 611 | marker-line (or (car marker-line) 1)) |
| 615 | (with-current-buffer (marker-buffer marker) | 612 | (with-current-buffer (marker-buffer marker) |
| 616 | (save-restriction | 613 | (save-restriction |
| 617 | (widen) | 614 | (widen) |
| @@ -1451,6 +1448,7 @@ Use this command in a compilation log buffer. Sets the mark at point there." | |||
| 1451 | 1448 | ||
| 1452 | (defun compilation-fake-loc (marker file &optional line col) | 1449 | (defun compilation-fake-loc (marker file &optional line col) |
| 1453 | "Preassociate MARKER with FILE. | 1450 | "Preassociate MARKER with FILE. |
| 1451 | FILE should be ABSOLUTE-FILENAME or (RELATIVE-FILENAME . DIRNAME). | ||
| 1454 | This is useful when you compile temporary files, but want | 1452 | This is useful when you compile temporary files, but want |
| 1455 | automatic translation of the messages to the real buffer from | 1453 | automatic translation of the messages to the real buffer from |
| 1456 | which the temporary file came. This only works if done before a | 1454 | which the temporary file came. This only works if done before a |
| @@ -1466,13 +1464,12 @@ header with variable assignments and a code region), you must | |||
| 1466 | call this several times, once each for the last line of one | 1464 | call this several times, once each for the last line of one |
| 1467 | region and the first line of the next region." | 1465 | region and the first line of the next region." |
| 1468 | (or (consp file) (setq file (list file))) | 1466 | (or (consp file) (setq file (list file))) |
| 1469 | (setq file (or (gethash file compilation-locs) | 1467 | (setq file (compilation-get-file-structure file)) |
| 1470 | (puthash file (list file nil) compilation-locs))) | ||
| 1471 | (let ((loc (compilation-assq (or line 1) (cdr file)))) | 1468 | (let ((loc (compilation-assq (or line 1) (cdr file)))) |
| 1472 | (setq loc (compilation-assq col loc)) | 1469 | (setq loc (compilation-assq col loc)) |
| 1473 | (if (cdr loc) | 1470 | (if (cdr loc) |
| 1474 | (setcdr (cddr loc) (list marker)) | 1471 | (setcdr (cddr loc) (list marker)) |
| 1475 | (setcdr loc (list (or line 1) file marker))) | 1472 | (setcdr loc (list line file marker))) |
| 1476 | loc)) | 1473 | loc)) |
| 1477 | 1474 | ||
| 1478 | (defcustom compilation-context-lines next-screen-context-lines | 1475 | (defcustom compilation-context-lines next-screen-context-lines |
| @@ -1598,67 +1595,58 @@ Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." | |||
| 1598 | (overlays-in (point-min) (point-max))) | 1595 | (overlays-in (point-min) (point-max))) |
| 1599 | buffer))) | 1596 | buffer))) |
| 1600 | 1597 | ||
| 1601 | (defun compilation-normalize-filename (filename) | 1598 | (defun compilation-get-file-structure (file &optional fmt) |
| 1602 | "Convert FILENAME string found in an error message to make it usable." | 1599 | "Retrieve FILE's file-structure or create a new one. |
| 1603 | 1600 | FILE should be (ABSOLUTE-FILENAME) or (RELATIVE-FILENAME . DIRNAME)." | |
| 1604 | ;; Check for a comint-file-name-prefix and prepend it if | 1601 | |
| 1605 | ;; appropriate. (This is very useful for | 1602 | (or (gethash file compilation-locs) |
| 1606 | ;; compilation-minor-mode in an rlogin-mode buffer.) | 1603 | ;; File was not previously encountered, at least not in the form passed. |
| 1607 | (and (boundp 'comint-file-name-prefix) | 1604 | ;; Let's normalize it and look again. |
| 1608 | ;; If file name is relative, default-directory will | 1605 | (let ((filename (car file)) |
| 1609 | ;; already contain the comint-file-name-prefix (done | 1606 | (default-directory (if (cdr file) |
| 1610 | ;; by compile-abbreviate-directory). | 1607 | (file-truename (cdr file)) |
| 1611 | (file-name-absolute-p filename) | 1608 | default-directory))) |
| 1612 | (setq filename | 1609 | |
| 1613 | (concat (with-no-warnings 'comint-file-name-prefix) filename))) | 1610 | ;; Check for a comint-file-name-prefix and prepend it if appropriate. |
| 1614 | 1611 | ;; (This is very useful for compilation-minor-mode in an rlogin-mode | |
| 1615 | ;; If compilation-parse-errors-filename-function is | 1612 | ;; buffer.) |
| 1616 | ;; defined, use it to process the filename. | 1613 | (if (boundp 'comint-file-name-prefix) |
| 1617 | (when compilation-parse-errors-filename-function | 1614 | (if (file-name-absolute-p filename) |
| 1618 | (setq filename | 1615 | (setq filename |
| 1619 | (funcall compilation-parse-errors-filename-function | 1616 | (concat (with-no-warnings comint-file-name-prefix) filename)) |
| 1620 | filename))) | 1617 | (setq default-directory |
| 1621 | 1618 | (file-truename | |
| 1622 | ;; Some compilers (e.g. Sun's java compiler, reportedly) | 1619 | (concat (with-no-warnings comint-file-name-prefix) default-directory))))) |
| 1623 | ;; produce bogus file names like "./bar//foo.c" for file | 1620 | |
| 1624 | ;; "bar/foo.c"; expand-file-name will collapse these into | 1621 | ;; If compilation-parse-errors-filename-function is |
| 1625 | ;; "/foo.c" and fail to find the appropriate file. So we | 1622 | ;; defined, use it to process the filename. |
| 1626 | ;; look for doubled slashes in the file name and fix them | 1623 | (when compilation-parse-errors-filename-function |
| 1627 | ;; up in the buffer. | 1624 | (setq filename |
| 1628 | (setq filename (command-line-normalize-file-name filename))) | 1625 | (funcall compilation-parse-errors-filename-function |
| 1629 | 1626 | filename))) | |
| 1630 | 1627 | ||
| 1631 | ;; If directory DIR is a subdir of ORIG or of ORIG's parent, | 1628 | ;; Some compilers (e.g. Sun's java compiler, reportedly) produce bogus |
| 1632 | ;; return a relative name for it starting from ORIG or its parent. | 1629 | ;; file names like "./bar//foo.c" for file "bar/foo.c"; |
| 1633 | ;; ORIG-EXPANDED is an expanded version of ORIG. | 1630 | ;; expand-file-name will collapse these into "/foo.c" and fail to find |
| 1634 | ;; PARENT-EXPANDED is an expanded version of ORIG's parent. | 1631 | ;; the appropriate file. So we look for doubled slashes in the file |
| 1635 | ;; Those two args could be computed here, but we run faster by | 1632 | ;; name and fix them. |
| 1636 | ;; having the caller compute them just once. | 1633 | (setq filename (command-line-normalize-file-name filename)) |
| 1637 | (defun compile-abbreviate-directory (dir orig orig-expanded parent-expanded) | 1634 | |
| 1638 | ;; Apply canonical abbreviations to DIR first thing. | 1635 | ;; Now eliminate any "..", because find-file would get them wrong. |
| 1639 | ;; Those abbreviations are already done in the other arguments passed. | 1636 | ;; Make relative and absolute filenames, with or without links, the |
| 1640 | (setq dir (abbreviate-file-name dir)) | 1637 | ;; same. |
| 1641 | 1638 | (setq filename | |
| 1642 | ;; Check for a comint-file-name-prefix and prepend it if appropriate. | 1639 | (list (abbreviate-file-name |
| 1643 | ;; (This is very useful for compilation-minor-mode in an rlogin-mode | 1640 | (file-truename (if (cdr file) |
| 1644 | ;; buffer.) | 1641 | (expand-file-name filename) |
| 1645 | (if (boundp 'comint-file-name-prefix) | 1642 | filename))))) |
| 1646 | (setq dir (concat comint-file-name-prefix dir))) | 1643 | |
| 1647 | 1644 | ;; Store it for the possibly unnormalized name | |
| 1648 | (if (and (> (length dir) (length orig-expanded)) | 1645 | (puthash file |
| 1649 | (string= orig-expanded | 1646 | ;; Retrieve or create file-structure for normalized name |
| 1650 | (substring dir 0 (length orig-expanded)))) | 1647 | (or (gethash filename compilation-locs) |
| 1651 | (setq dir | 1648 | (puthash filename (list filename fmt) compilation-locs)) |
| 1652 | (concat orig | 1649 | compilation-locs)))) |
| 1653 | (substring dir (length orig-expanded))))) | ||
| 1654 | (if (and (> (length dir) (length parent-expanded)) | ||
| 1655 | (string= parent-expanded | ||
| 1656 | (substring dir 0 (length parent-expanded)))) | ||
| 1657 | (setq dir | ||
| 1658 | (concat (file-name-directory | ||
| 1659 | (directory-file-name orig)) | ||
| 1660 | (substring dir (length parent-expanded))))) | ||
| 1661 | dir) | ||
| 1662 | 1650 | ||
| 1663 | (add-to-list 'debug-ignored-errors "^No more [-a-z ]+s yet$") | 1651 | (add-to-list 'debug-ignored-errors "^No more [-a-z ]+s yet$") |
| 1664 | 1652 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4627f2ac639..bdf8c93f900 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -1401,7 +1401,7 @@ and source-file directory for your debugger." | |||
| 1401 | 1401 | ||
| 1402 | output)) | 1402 | output)) |
| 1403 | 1403 | ||
| 1404 | (defcustom gud-pdb-command-name "pdb" | 1404 | (defcustom gud-pdb-command-name "pydb" |
| 1405 | "File name for executing the Python debugger. | 1405 | "File name for executing the Python debugger. |
| 1406 | This should be an executable on your path, or an absolute file name." | 1406 | This should be an executable on your path, or an absolute file name." |
| 1407 | :type 'string | 1407 | :type 'string |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 5635a1b17f7..f47ca3a73d4 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -648,7 +648,7 @@ implemented as aliases. See `sh-feature'." | |||
| 648 | 648 | ||
| 649 | (rc "else") | 649 | (rc "else") |
| 650 | 650 | ||
| 651 | (sh "do" "elif" "else" "if" "then" "trap" "type" "until" "while")) | 651 | (sh "!" "do" "elif" "else" "if" "then" "trap" "type" "until" "while")) |
| 652 | "*List of keywords that may be immediately followed by a builtin or keyword. | 652 | "*List of keywords that may be immediately followed by a builtin or keyword. |
| 653 | Given some confusion between keywords and builtins depending on shell and | 653 | Given some confusion between keywords and builtins depending on shell and |
| 654 | system, the distinction here has been based on whether they influence the | 654 | system, the distinction here has been based on whether they influence the |