diff options
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/cc-styles.el | 51 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 11 | ||||
| -rw-r--r-- | lisp/progmodes/ebnf2ps.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 97 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/scheme.el | 71 | ||||
| -rw-r--r-- | lisp/progmodes/vhdl-mode.el | 24 |
8 files changed, 197 insertions, 74 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 92c402dbad4..63c6aad3aa1 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -395,11 +395,6 @@ that requires a literal mode spec at compile time." | |||
| 395 | (make-local-variable 'comment-end) | 395 | (make-local-variable 'comment-end) |
| 396 | (make-local-variable 'comment-start-skip) | 396 | (make-local-variable 'comment-start-skip) |
| 397 | (make-local-variable 'comment-multi-line) | 397 | (make-local-variable 'comment-multi-line) |
| 398 | (make-local-variable 'paragraph-start) | ||
| 399 | (make-local-variable 'paragraph-separate) | ||
| 400 | (make-local-variable 'paragraph-ignore-fill-prefix) | ||
| 401 | (make-local-variable 'adaptive-fill-mode) | ||
| 402 | (make-local-variable 'adaptive-fill-regexp) | ||
| 403 | 398 | ||
| 404 | ;; now set their values | 399 | ;; now set their values |
| 405 | (setq parse-sexp-ignore-comments t | 400 | (setq parse-sexp-ignore-comments t |
| @@ -1180,5 +1175,5 @@ Key bindings: | |||
| 1180 | 1175 | ||
| 1181 | (cc-provide 'cc-mode) | 1176 | (cc-provide 'cc-mode) |
| 1182 | 1177 | ||
| 1183 | ;;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7 | 1178 | ;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7 |
| 1184 | ;;; cc-mode.el ends here | 1179 | ;;; cc-mode.el ends here |
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index f0a7a2c4b7c..f20eb8e57de 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el | |||
| @@ -498,33 +498,34 @@ variables." | |||
| 498 | (let ((comment-line-prefix | 498 | (let ((comment-line-prefix |
| 499 | (concat "[ \t]*\\(" c-current-comment-prefix "\\)[ \t]*"))) | 499 | (concat "[ \t]*\\(" c-current-comment-prefix "\\)[ \t]*"))) |
| 500 | 500 | ||
| 501 | (setq paragraph-start (concat comment-line-prefix | 501 | (set (make-local-variable 'paragraph-start) |
| 502 | c-paragraph-start | 502 | (concat comment-line-prefix |
| 503 | "\\|" | 503 | c-paragraph-start |
| 504 | page-delimiter) | 504 | "\\|" |
| 505 | paragraph-separate (concat comment-line-prefix | 505 | page-delimiter)) |
| 506 | c-paragraph-separate | 506 | (set (make-local-variable 'paragraph-separate) |
| 507 | "\\|" | 507 | (concat comment-line-prefix |
| 508 | page-delimiter) | 508 | c-paragraph-separate |
| 509 | paragraph-ignore-fill-prefix t | 509 | "\\|" |
| 510 | adaptive-fill-mode t | 510 | page-delimiter)) |
| 511 | adaptive-fill-regexp | 511 | (set (make-local-variable 'paragraph-ignore-fill-prefix) t) |
| 512 | (concat comment-line-prefix | 512 | (set (make-local-variable 'adaptive-fill-mode) t) |
| 513 | (if (default-value 'adaptive-fill-regexp) | 513 | (set (make-local-variable 'adaptive-fill-regexp) |
| 514 | (concat "\\(" | 514 | (concat comment-line-prefix |
| 515 | (default-value 'adaptive-fill-regexp) | 515 | (if (default-value 'adaptive-fill-regexp) |
| 516 | "\\)") | 516 | (concat "\\(" |
| 517 | ""))) | 517 | (default-value 'adaptive-fill-regexp) |
| 518 | "\\)") | ||
| 519 | ""))) | ||
| 518 | 520 | ||
| 519 | (when (boundp 'adaptive-fill-first-line-regexp) | 521 | (when (boundp 'adaptive-fill-first-line-regexp) |
| 520 | ;; XEmacs (20.x) adaptive fill mode doesn't have this. | 522 | ;; XEmacs (20.x) adaptive fill mode doesn't have this. |
| 521 | (make-local-variable 'adaptive-fill-first-line-regexp) | 523 | (set (make-local-variable 'adaptive-fill-first-line-regexp) |
| 522 | (setq adaptive-fill-first-line-regexp | 524 | (concat "\\`" comment-line-prefix |
| 523 | (concat "\\`" comment-line-prefix | 525 | ;; Maybe we should incorporate the old value here, |
| 524 | ;; Maybe we should incorporate the old value here, | 526 | ;; but then we have to do all sorts of kludges to |
| 525 | ;; but then we have to do all sorts of kludges to | 527 | ;; deal with the \` and \' it probably contains. |
| 526 | ;; deal with the \` and \' it probably contains. | 528 | "\\'"))))) |
| 527 | "\\'"))))) | ||
| 528 | 529 | ||
| 529 | 530 | ||
| 530 | ;; Helper for setting up Filladapt mode. It's not used by CC Mode itself. | 531 | ;; Helper for setting up Filladapt mode. It's not used by CC Mode itself. |
| @@ -626,5 +627,5 @@ any reason to call this function directly." | |||
| 626 | 627 | ||
| 627 | (cc-provide 'cc-styles) | 628 | (cc-provide 'cc-styles) |
| 628 | 629 | ||
| 629 | ;;; arch-tag: c764f61a-96ba-484a-a68f-101c0e9d5d2c | 630 | ;; arch-tag: c764f61a-96ba-484a-a68f-101c0e9d5d2c |
| 630 | ;;; cc-styles.el ends here | 631 | ;;; cc-styles.el ends here |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1655aa33dcb..269fbeaf137 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -899,19 +899,20 @@ visible rather than the beginning." | |||
| 899 | :group 'compilation) | 899 | :group 'compilation) |
| 900 | 900 | ||
| 901 | 901 | ||
| 902 | (defun compilation-buffer-name (mode-name name-function) | 902 | (defun compilation-buffer-name (mode-name mode-command name-function) |
| 903 | "Return the name of a compilation buffer to use. | 903 | "Return the name of a compilation buffer to use. |
| 904 | If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME | 904 | If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME |
| 905 | to determine the buffer name. | 905 | to determine the buffer name. |
| 906 | Likewise if `compilation-buffer-name-function' is non-nil. | 906 | Likewise if `compilation-buffer-name-function' is non-nil. |
| 907 | If current buffer is in Compilation mode for the same mode name | 907 | If current buffer is the mode MODE-COMMAND, |
| 908 | return the name of the current buffer, so that it gets reused. | 908 | return the name of the current buffer, so that it gets reused. |
| 909 | Otherwise, construct a buffer name from MODE-NAME." | 909 | Otherwise, construct a buffer name from MODE-NAME." |
| 910 | (cond (name-function | 910 | (cond (name-function |
| 911 | (funcall name-function mode-name)) | 911 | (funcall name-function mode-name)) |
| 912 | (compilation-buffer-name-function | 912 | (compilation-buffer-name-function |
| 913 | (funcall compilation-buffer-name-function mode-name)) | 913 | (funcall compilation-buffer-name-function mode-name)) |
| 914 | ((eq major-mode (nth 1 compilation-arguments)) | 914 | ((and (eq mode-command major-mode) |
| 915 | (eq major-mode (nth 1 compilation-arguments))) | ||
| 915 | (buffer-name)) | 916 | (buffer-name)) |
| 916 | (t | 917 | (t |
| 917 | (concat "*" (downcase mode-name) "*")))) | 918 | (concat "*" (downcase mode-name) "*")))) |
| @@ -960,7 +961,7 @@ Returns the compilation buffer created." | |||
| 960 | (with-current-buffer | 961 | (with-current-buffer |
| 961 | (setq outbuf | 962 | (setq outbuf |
| 962 | (get-buffer-create | 963 | (get-buffer-create |
| 963 | (compilation-buffer-name name-of-mode name-function))) | 964 | (compilation-buffer-name name-of-mode mode name-function))) |
| 964 | (let ((comp-proc (get-buffer-process (current-buffer)))) | 965 | (let ((comp-proc (get-buffer-process (current-buffer)))) |
| 965 | (if comp-proc | 966 | (if comp-proc |
| 966 | (if (or (not (eq (process-status comp-proc) 'run)) | 967 | (if (or (not (eq (process-status comp-proc) 'run)) |
| @@ -1552,7 +1553,7 @@ Use this command in a compilation log buffer. Sets the mark at point there." | |||
| 1552 | (dired-other-window (car (get-text-property (point) 'directory))) | 1553 | (dired-other-window (car (get-text-property (point) 'directory))) |
| 1553 | (push-mark) | 1554 | (push-mark) |
| 1554 | (setq compilation-current-error (point)) | 1555 | (setq compilation-current-error (point)) |
| 1555 | (next-error 0))) | 1556 | (next-error-internal))) |
| 1556 | 1557 | ||
| 1557 | ;; Return a compilation buffer. | 1558 | ;; Return a compilation buffer. |
| 1558 | ;; If the current buffer is a compilation buffer, return it. | 1559 | ;; If the current buffer is a compilation buffer, return it. |
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 887e856ba1f..18d88c92699 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el | |||
| @@ -4261,7 +4261,7 @@ end | |||
| 4261 | ebnf-eps-max-height prod-height)) | 4261 | ebnf-eps-max-height prod-height)) |
| 4262 | ) | 4262 | ) |
| 4263 | (setq ebnf-eps-prod-width prod-width) | 4263 | (setq ebnf-eps-prod-width prod-width) |
| 4264 | (insert-buffer eps-buffer)) | 4264 | (insert-buffer-substring eps-buffer)) |
| 4265 | (setq prod-list (cdr prod-list)))) | 4265 | (setq prod-list (cdr prod-list)))) |
| 4266 | 4266 | ||
| 4267 | 4267 | ||
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 6c960c4c5d5..fe05119d2cd 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -103,6 +103,7 @@ and #define directives otherwise.") | |||
| 103 | (defvar gdb-error "Non-nil when GDB is reporting an error.") | 103 | (defvar gdb-error "Non-nil when GDB is reporting an error.") |
| 104 | (defvar gdb-macro-info nil | 104 | (defvar gdb-macro-info nil |
| 105 | "Non-nil if GDB knows that the inferior includes preprocessor macro info.") | 105 | "Non-nil if GDB knows that the inferior includes preprocessor macro info.") |
| 106 | (defvar gdb-buffer-fringe-width nil) | ||
| 106 | 107 | ||
| 107 | (defvar gdb-buffer-type nil | 108 | (defvar gdb-buffer-type nil |
| 108 | "One of the symbols bound in `gdb-buffer-rules'.") | 109 | "One of the symbols bound in `gdb-buffer-rules'.") |
| @@ -377,7 +378,8 @@ Also display the main routine in the disassembly buffer if present." | |||
| 377 | gdb-location-alist nil | 378 | gdb-location-alist nil |
| 378 | gdb-find-file-unhook nil | 379 | gdb-find-file-unhook nil |
| 379 | gdb-error nil | 380 | gdb-error nil |
| 380 | gdb-macro-info nil) | 381 | gdb-macro-info nil |
| 382 | gdb-buffer-fringe-width (car (window-fringes))) | ||
| 381 | ;; | 383 | ;; |
| 382 | (setq gdb-buffer-type 'gdba) | 384 | (setq gdb-buffer-type 'gdba) |
| 383 | ;; | 385 | ;; |
| @@ -1337,8 +1339,11 @@ static char *magick[] = { | |||
| 1337 | (setq bptno (match-string 1)) | 1339 | (setq bptno (match-string 1)) |
| 1338 | (setq flag (char-after (match-beginning 2))) | 1340 | (setq flag (char-after (match-beginning 2))) |
| 1339 | (beginning-of-line) | 1341 | (beginning-of-line) |
| 1340 | (if (re-search-forward " in .* at\\s-+" nil t) | 1342 | (if (re-search-forward " in \\(.*\\) at\\s-+" nil t) |
| 1341 | (progn | 1343 | (progn |
| 1344 | (let ((buffer-read-only nil)) | ||
| 1345 | (add-text-properties (match-beginning 1) (match-end 1) | ||
| 1346 | '(face font-lock-function-name-face))) | ||
| 1342 | (looking-at "\\(\\S-+\\):\\([0-9]+\\)") | 1347 | (looking-at "\\(\\S-+\\):\\([0-9]+\\)") |
| 1343 | (let ((line (match-string 2)) (buffer-read-only nil) | 1348 | (let ((line (match-string 2)) (buffer-read-only nil) |
| 1344 | (file (match-string 1))) | 1349 | (file (match-string 1))) |
| @@ -1531,17 +1536,34 @@ static char *magick[] = { | |||
| 1531 | (defun gdb-info-frames-custom () | 1536 | (defun gdb-info-frames-custom () |
| 1532 | (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) | 1537 | (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) |
| 1533 | (save-excursion | 1538 | (save-excursion |
| 1534 | (let ((buffer-read-only nil)) | 1539 | (let ((buffer-read-only nil) |
| 1540 | bl el) | ||
| 1535 | (goto-char (point-min)) | 1541 | (goto-char (point-min)) |
| 1536 | (while (< (point) (point-max)) | 1542 | (while (< (point) (point-max)) |
| 1537 | (add-text-properties (line-beginning-position) (line-end-position) | 1543 | (setq bl (line-beginning-position) |
| 1544 | el (line-end-position)) | ||
| 1545 | (add-text-properties bl el | ||
| 1538 | '(mouse-face highlight | 1546 | '(mouse-face highlight |
| 1539 | help-echo "mouse-2, RET: Select frame")) | 1547 | help-echo "mouse-2, RET: Select frame")) |
| 1540 | (beginning-of-line) | 1548 | (goto-char bl) |
| 1541 | (when (and (looking-at "^#\\([0-9]+\\)") | 1549 | (when (looking-at "^#\\([0-9]+\\)") |
| 1542 | (equal (match-string 1) gdb-frame-number)) | 1550 | (when (string-equal (match-string 1) gdb-frame-number) |
| 1543 | (put-text-property (line-beginning-position) (line-end-position) | 1551 | (put-text-property bl (+ bl 4) |
| 1544 | 'face '(:inverse-video t))) | 1552 | 'face '(:inverse-video t))) |
| 1553 | (when (re-search-forward | ||
| 1554 | (concat | ||
| 1555 | (if (string-equal (match-string 1) "0") "" " in ") | ||
| 1556 | "\\([^ ]+\\) (") el t) | ||
| 1557 | (put-text-property (match-beginning 1) (match-end 1) | ||
| 1558 | 'face font-lock-function-name-face) | ||
| 1559 | (setq bl (match-end 0)) | ||
| 1560 | (while (re-search-forward "<\\([^>]+\\)>" el t) | ||
| 1561 | (put-text-property (match-beginning 1) (match-end 1) | ||
| 1562 | 'face font-lock-function-name-face)) | ||
| 1563 | (goto-char bl) | ||
| 1564 | (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t) | ||
| 1565 | (put-text-property (match-beginning 1) (match-end 1) | ||
| 1566 | 'face font-lock-variable-name-face)))) | ||
| 1545 | (forward-line 1)))))) | 1567 | (forward-line 1)))))) |
| 1546 | 1568 | ||
| 1547 | (defun gdb-stack-buffer-name () | 1569 | (defun gdb-stack-buffer-name () |
| @@ -1587,6 +1609,7 @@ static char *magick[] = { | |||
| 1587 | 1609 | ||
| 1588 | (defun gdb-get-frame-number () | 1610 | (defun gdb-get-frame-number () |
| 1589 | (save-excursion | 1611 | (save-excursion |
| 1612 | (end-of-line) | ||
| 1590 | (let* ((pos (re-search-backward "^#*\\([0-9]*\\)" nil t)) | 1613 | (let* ((pos (re-search-backward "^#*\\([0-9]*\\)" nil t)) |
| 1591 | (n (or (and pos (match-string-no-properties 1)) "0"))) | 1614 | (n (or (and pos (match-string-no-properties 1)) "0"))) |
| 1592 | n))) | 1615 | n))) |
| @@ -1648,6 +1671,14 @@ static char *magick[] = { | |||
| 1648 | (define-key map [mouse-2] 'gdb-threads-select) | 1671 | (define-key map [mouse-2] 'gdb-threads-select) |
| 1649 | map)) | 1672 | map)) |
| 1650 | 1673 | ||
| 1674 | (defvar gdb-threads-font-lock-keywords | ||
| 1675 | '( | ||
| 1676 | (") +\\([^ ]+\\) (" (1 font-lock-function-name-face)) | ||
| 1677 | ("in \\([^ ]+\\) (" (1 font-lock-function-name-face)) | ||
| 1678 | ("\\(\\(\\sw\\|[_.]\\)+\\)=" (1 font-lock-variable-name-face)) | ||
| 1679 | ) | ||
| 1680 | "Font lock keywords used in `gdb-threads-mode'.") | ||
| 1681 | |||
| 1651 | (defun gdb-threads-mode () | 1682 | (defun gdb-threads-mode () |
| 1652 | "Major mode for gdb frames. | 1683 | "Major mode for gdb frames. |
| 1653 | 1684 | ||
| @@ -1657,6 +1688,8 @@ static char *magick[] = { | |||
| 1657 | (setq mode-name "Threads") | 1688 | (setq mode-name "Threads") |
| 1658 | (setq buffer-read-only t) | 1689 | (setq buffer-read-only t) |
| 1659 | (use-local-map gdb-threads-mode-map) | 1690 | (use-local-map gdb-threads-mode-map) |
| 1691 | (set (make-local-variable 'font-lock-defaults) | ||
| 1692 | '(gdb-threads-font-lock-keywords)) | ||
| 1660 | (run-mode-hooks 'gdb-threads-mode-hook) | 1693 | (run-mode-hooks 'gdb-threads-mode-hook) |
| 1661 | 'gdb-invalidate-threads) | 1694 | 'gdb-invalidate-threads) |
| 1662 | 1695 | ||
| @@ -1702,6 +1735,12 @@ static char *magick[] = { | |||
| 1702 | (define-key map "q" 'kill-this-buffer) | 1735 | (define-key map "q" 'kill-this-buffer) |
| 1703 | map)) | 1736 | map)) |
| 1704 | 1737 | ||
| 1738 | (defvar gdb-registers-font-lock-keywords | ||
| 1739 | '( | ||
| 1740 | ("^[^ ]+" . font-lock-variable-name-face) | ||
| 1741 | ) | ||
| 1742 | "Font lock keywords used in `gdb-registers-mode'.") | ||
| 1743 | |||
| 1705 | (defun gdb-registers-mode () | 1744 | (defun gdb-registers-mode () |
| 1706 | "Major mode for gdb registers. | 1745 | "Major mode for gdb registers. |
| 1707 | 1746 | ||
| @@ -1711,6 +1750,8 @@ static char *magick[] = { | |||
| 1711 | (setq mode-name "Registers:") | 1750 | (setq mode-name "Registers:") |
| 1712 | (setq buffer-read-only t) | 1751 | (setq buffer-read-only t) |
| 1713 | (use-local-map gdb-registers-mode-map) | 1752 | (use-local-map gdb-registers-mode-map) |
| 1753 | (set (make-local-variable 'font-lock-defaults) | ||
| 1754 | '(gdb-registers-font-lock-keywords)) | ||
| 1714 | (run-mode-hooks 'gdb-registers-mode-hook) | 1755 | (run-mode-hooks 'gdb-registers-mode-hook) |
| 1715 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 1756 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 1716 | 'gdb-invalidate-registers | 1757 | 'gdb-invalidate-registers |
| @@ -1955,6 +1996,12 @@ corresponding to the mode line clicked." | |||
| 1955 | (define-key map (vector 'header-line 'down-mouse-1) 'ignore) | 1996 | (define-key map (vector 'header-line 'down-mouse-1) 'ignore) |
| 1956 | map)) | 1997 | map)) |
| 1957 | 1998 | ||
| 1999 | (defvar gdb-memory-font-lock-keywords | ||
| 2000 | '(;; <__function.name+n> | ||
| 2001 | ("<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>" (1 font-lock-function-name-face)) | ||
| 2002 | ) | ||
| 2003 | "Font lock keywords used in `gdb-memory-mode'.") | ||
| 2004 | |||
| 1958 | (defun gdb-memory-mode () | 2005 | (defun gdb-memory-mode () |
| 1959 | "Major mode for examining memory. | 2006 | "Major mode for examining memory. |
| 1960 | 2007 | ||
| @@ -2026,6 +2073,8 @@ corresponding to the mode line clicked." | |||
| 2026 | 'help-echo "mouse-3: Select unit size" | 2073 | 'help-echo "mouse-3: Select unit size" |
| 2027 | 'mouse-face 'mode-line-highlight | 2074 | 'mouse-face 'mode-line-highlight |
| 2028 | 'local-map gdb-memory-unit-keymap)))) | 2075 | 'local-map gdb-memory-unit-keymap)))) |
| 2076 | (set (make-local-variable 'font-lock-defaults) | ||
| 2077 | '(gdb-memory-font-lock-keywords)) | ||
| 2029 | (run-mode-hooks 'gdb-memory-mode-hook) | 2078 | (run-mode-hooks 'gdb-memory-mode-hook) |
| 2030 | 'gdb-invalidate-memory) | 2079 | 'gdb-invalidate-memory) |
| 2031 | 2080 | ||
| @@ -2094,6 +2143,23 @@ corresponding to the mode line clicked." | |||
| 2094 | (define-key map "q" 'kill-this-buffer) | 2143 | (define-key map "q" 'kill-this-buffer) |
| 2095 | map)) | 2144 | map)) |
| 2096 | 2145 | ||
| 2146 | (defvar gdb-local-font-lock-keywords | ||
| 2147 | '( | ||
| 2148 | ;; var = (struct struct_tag) value | ||
| 2149 | ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +(\\(struct\\) \\(\\(\\sw\\|[_.]\\)+\\)" | ||
| 2150 | (1 font-lock-variable-name-face) | ||
| 2151 | (3 font-lock-keyword-face) | ||
| 2152 | (4 font-lock-type-face)) | ||
| 2153 | ;; var = (type) value | ||
| 2154 | ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +(\\(\\(\\sw\\|[_.]\\)+\\)" | ||
| 2155 | (1 font-lock-variable-name-face) | ||
| 2156 | (3 font-lock-type-face)) | ||
| 2157 | ;; var = val | ||
| 2158 | ( "\\(^\\(\\sw\\|[_.]\\)+\\) += +[^(]" | ||
| 2159 | (1 font-lock-variable-name-face)) | ||
| 2160 | ) | ||
| 2161 | "Font lock keywords used in `gdb-local-mode'.") | ||
| 2162 | |||
| 2097 | (defun gdb-locals-mode () | 2163 | (defun gdb-locals-mode () |
| 2098 | "Major mode for gdb locals. | 2164 | "Major mode for gdb locals. |
| 2099 | 2165 | ||
| @@ -2103,6 +2169,8 @@ corresponding to the mode line clicked." | |||
| 2103 | (setq mode-name (concat "Locals:" gdb-selected-frame)) | 2169 | (setq mode-name (concat "Locals:" gdb-selected-frame)) |
| 2104 | (setq buffer-read-only t) | 2170 | (setq buffer-read-only t) |
| 2105 | (use-local-map gdb-locals-mode-map) | 2171 | (use-local-map gdb-locals-mode-map) |
| 2172 | (set (make-local-variable 'font-lock-defaults) | ||
| 2173 | '(gdb-local-font-lock-keywords)) | ||
| 2106 | (run-mode-hooks 'gdb-locals-mode-hook) | 2174 | (run-mode-hooks 'gdb-locals-mode-hook) |
| 2107 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) | 2175 | (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) |
| 2108 | 'gdb-invalidate-locals | 2176 | 'gdb-invalidate-locals |
| @@ -2408,7 +2476,8 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2408 | (defun gdb-put-breakpoint-icon (enabled bptno) | 2476 | (defun gdb-put-breakpoint-icon (enabled bptno) |
| 2409 | (let ((start (- (line-beginning-position) 1)) | 2477 | (let ((start (- (line-beginning-position) 1)) |
| 2410 | (end (+ (line-end-position) 1)) | 2478 | (end (+ (line-end-position) 1)) |
| 2411 | (putstring (if enabled "B" "b"))) | 2479 | (putstring (if enabled "B" "b")) |
| 2480 | (source-window (get-buffer-window (current-buffer) 0))) | ||
| 2412 | (add-text-properties | 2481 | (add-text-properties |
| 2413 | 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") | 2482 | 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") |
| 2414 | putstring) | 2483 | putstring) |
| @@ -2418,7 +2487,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2418 | 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) | 2487 | 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) |
| 2419 | (gdb-remove-breakpoint-icons start end) | 2488 | (gdb-remove-breakpoint-icons start end) |
| 2420 | (if (display-images-p) | 2489 | (if (display-images-p) |
| 2421 | (if (>= (car (window-fringes)) 8) | 2490 | (if (>= (or left-fringe-width |
| 2491 | (if source-window (car (window-fringes source-window))) | ||
| 2492 | gdb-buffer-fringe-width) 8) | ||
| 2422 | (gdb-put-string | 2493 | (gdb-put-string |
| 2423 | nil (1+ start) | 2494 | nil (1+ start) |
| 2424 | `(left-fringe breakpoint | 2495 | `(left-fringe breakpoint |
| @@ -2428,9 +2499,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 2428 | (when (< left-margin-width 2) | 2499 | (when (< left-margin-width 2) |
| 2429 | (save-current-buffer | 2500 | (save-current-buffer |
| 2430 | (setq left-margin-width 2) | 2501 | (setq left-margin-width 2) |
| 2431 | (if (get-buffer-window (current-buffer) 0) | 2502 | (if source-window |
| 2432 | (set-window-margins | 2503 | (set-window-margins |
| 2433 | (get-buffer-window (current-buffer) 0) | 2504 | source-window |
| 2434 | left-margin-width right-margin-width)))) | 2505 | left-margin-width right-margin-width)))) |
| 2435 | (put-image | 2506 | (put-image |
| 2436 | (if enabled | 2507 | (if enabled |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 47d74f00aec..12c7e1c0ba0 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -137,11 +137,15 @@ Used to grey out relevant togolbar icons.") | |||
| 137 | :enable (and (not gud-running) | 137 | :enable (and (not gud-running) |
| 138 | (memq gud-minor-mode '(gdbmi gdba gdb perldb)))) | 138 | (memq gud-minor-mode '(gdbmi gdba gdb perldb)))) |
| 139 | ([remove] menu-item "Remove Breakpoint" gud-remove | 139 | ([remove] menu-item "Remove Breakpoint" gud-remove |
| 140 | :enable (not gud-running)) | 140 | :enable (not gud-running) |
| 141 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) | ||
| 142 | (window-fringes)))) | ||
| 141 | ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak | 143 | ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak |
| 142 | :enable (memq gud-minor-mode '(gdbmi gdba gdb sdb xdb bashdb))) | 144 | :enable (memq gud-minor-mode '(gdbmi gdba gdb sdb xdb bashdb))) |
| 143 | ([break] menu-item "Set Breakpoint" gud-break | 145 | ([break] menu-item "Set Breakpoint" gud-break |
| 144 | :enable (not gud-running)) | 146 | :enable (not gud-running) |
| 147 | :visible (not (and (memq gud-minor-mode '(gdbmi gdba)) | ||
| 148 | (window-fringes)))) | ||
| 145 | ([up] menu-item "Up Stack" gud-up | 149 | ([up] menu-item "Up Stack" gud-up |
| 146 | :enable (and (not gud-running) | 150 | :enable (and (not gud-running) |
| 147 | (memq gud-minor-mode | 151 | (memq gud-minor-mode |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index aa50a013585..15ab8edaadc 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -90,20 +90,26 @@ | |||
| 90 | (modify-syntax-entry ?\] ")[ " st) | 90 | (modify-syntax-entry ?\] ")[ " st) |
| 91 | (modify-syntax-entry ?{ "(} " st) | 91 | (modify-syntax-entry ?{ "(} " st) |
| 92 | (modify-syntax-entry ?} "){ " st) | 92 | (modify-syntax-entry ?} "){ " st) |
| 93 | (modify-syntax-entry ?\| "\" 23b" st) | 93 | (modify-syntax-entry ?\| "\" 23bn" st) |
| 94 | ;; Guile allows #! ... !# comments. | ||
| 95 | ;; But SRFI-22 defines the comment as #!...\n instead. | ||
| 96 | ;; Also Guile says that the !# should be on a line of its own. | ||
| 97 | ;; It's too difficult to get it right, for too little benefit. | ||
| 98 | ;; (modify-syntax-entry ?! "_ 2" st) | ||
| 94 | 99 | ||
| 95 | ;; Other atom delimiters | 100 | ;; Other atom delimiters |
| 96 | (modify-syntax-entry ?\( "() " st) | 101 | (modify-syntax-entry ?\( "() " st) |
| 97 | (modify-syntax-entry ?\) ")( " st) | 102 | (modify-syntax-entry ?\) ")( " st) |
| 98 | (modify-syntax-entry ?\; "< " st) | 103 | ;; It's used for single-line comments as well as for #;(...) sexp-comments. |
| 99 | (modify-syntax-entry ?\" "\" " st) | 104 | (modify-syntax-entry ?\; "< 2 " st) |
| 105 | (modify-syntax-entry ?\" "\" " st) | ||
| 100 | (modify-syntax-entry ?' "' " st) | 106 | (modify-syntax-entry ?' "' " st) |
| 101 | (modify-syntax-entry ?` "' " st) | 107 | (modify-syntax-entry ?` "' " st) |
| 102 | 108 | ||
| 103 | ;; Special characters | 109 | ;; Special characters |
| 104 | (modify-syntax-entry ?, "' " st) | 110 | (modify-syntax-entry ?, "' " st) |
| 105 | (modify-syntax-entry ?@ "' " st) | 111 | (modify-syntax-entry ?@ "' " st) |
| 106 | (modify-syntax-entry ?# "' 14bn" st) | 112 | (modify-syntax-entry ?# "' 14b" st) |
| 107 | (modify-syntax-entry ?\\ "\\ " st) | 113 | (modify-syntax-entry ?\\ "\\ " st) |
| 108 | st)) | 114 | st)) |
| 109 | 115 | ||
| @@ -163,13 +169,18 @@ | |||
| 163 | (setq imenu-generic-expression scheme-imenu-generic-expression) | 169 | (setq imenu-generic-expression scheme-imenu-generic-expression) |
| 164 | (set (make-local-variable 'imenu-syntax-alist) | 170 | (set (make-local-variable 'imenu-syntax-alist) |
| 165 | '(("+-*/.<>=?!$%_&~^:" . "w"))) | 171 | '(("+-*/.<>=?!$%_&~^:" . "w"))) |
| 166 | (make-local-variable 'font-lock-defaults) | 172 | (set (make-local-variable 'font-lock-defaults) |
| 167 | (setq font-lock-defaults | 173 | '((scheme-font-lock-keywords |
| 168 | '((scheme-font-lock-keywords | 174 | scheme-font-lock-keywords-1 scheme-font-lock-keywords-2) |
| 169 | scheme-font-lock-keywords-1 scheme-font-lock-keywords-2) | 175 | nil t (("+-*/.<>=!?$%_&~^:" . "w") (?#. "w 14")) |
| 170 | nil t (("+-*/.<>=!?$%_&~^:#" . "w")) beginning-of-defun | 176 | beginning-of-defun |
| 171 | (font-lock-mark-block-function . mark-defun) | 177 | (font-lock-mark-block-function . mark-defun) |
| 172 | (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function)))) | 178 | (font-lock-syntactic-face-function |
| 179 | . scheme-font-lock-syntactic-face-function) | ||
| 180 | (parse-sexp-lookup-properties . t) | ||
| 181 | (font-lock-extra-managed-props syntax-table))) | ||
| 182 | (set (make-local-variable 'lisp-doc-string-elt-property) | ||
| 183 | 'scheme-doc-string-elt)) | ||
| 173 | 184 | ||
| 174 | (defvar scheme-mode-line-process "") | 185 | (defvar scheme-mode-line-process "") |
| 175 | 186 | ||
| @@ -345,6 +356,44 @@ See `run-hooks'." | |||
| 345 | (defvar scheme-font-lock-keywords scheme-font-lock-keywords-1 | 356 | (defvar scheme-font-lock-keywords scheme-font-lock-keywords-1 |
| 346 | "Default expressions to highlight in Scheme modes.") | 357 | "Default expressions to highlight in Scheme modes.") |
| 347 | 358 | ||
| 359 | (defconst scheme-sexp-comment-syntax-table | ||
| 360 | (let ((st (make-syntax-table scheme-mode-syntax-table))) | ||
| 361 | (modify-syntax-entry ?\; "." st) | ||
| 362 | (modify-syntax-entry ?\n " " st) | ||
| 363 | (modify-syntax-entry ?# "'" st) | ||
| 364 | st)) | ||
| 365 | |||
| 366 | (put 'lambda 'scheme-doc-string-elt 2) | ||
| 367 | ;; Docstring's pos in a `define' depends on whether it's a var or fun def. | ||
| 368 | (put 'define 'scheme-doc-string-elt | ||
| 369 | (lambda () | ||
| 370 | ;; The function is called with point right after "define". | ||
| 371 | (forward-comment (point-max)) | ||
| 372 | (if (eq (char-after) ?\() 2 0))) | ||
| 373 | |||
| 374 | (defun scheme-font-lock-syntactic-face-function (state) | ||
| 375 | (when (and (null (nth 3 state)) | ||
| 376 | (eq (char-after (nth 8 state)) ?#) | ||
| 377 | (eq (char-after (1+ (nth 8 state))) ?\;)) | ||
| 378 | ;; It's a sexp-comment. Tell parse-partial-sexp where it ends. | ||
| 379 | (save-excursion | ||
| 380 | (let ((pos (point)) | ||
| 381 | (end | ||
| 382 | (condition-case err | ||
| 383 | (let ((parse-sexp-lookup-properties nil)) | ||
| 384 | (goto-char (+ 2 (nth 8 state))) | ||
| 385 | ;; FIXME: this doesn't handle the case where the sexp | ||
| 386 | ;; itself contains a #; comment. | ||
| 387 | (forward-sexp 1) | ||
| 388 | (point)) | ||
| 389 | (scan-error (nth 2 err))))) | ||
| 390 | (when (< pos (- end 2)) | ||
| 391 | (put-text-property pos (- end 2) | ||
| 392 | 'syntax-table scheme-sexp-comment-syntax-table)) | ||
| 393 | (put-text-property (- end 1) end 'syntax-table '(12))))) | ||
| 394 | ;; Choose the face to use. | ||
| 395 | (lisp-font-lock-syntactic-face-function state)) | ||
| 396 | |||
| 348 | ;;;###autoload | 397 | ;;;###autoload |
| 349 | (define-derived-mode dsssl-mode scheme-mode "DSSSL" | 398 | (define-derived-mode dsssl-mode scheme-mode "DSSSL" |
| 350 | "Major mode for editing DSSSL code. | 399 | "Major mode for editing DSSSL code. |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 1986148e8d5..ed64de4c89c 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -142,6 +142,8 @@ | |||
| 142 | (defvar lazy-lock-defer-contextually) | 142 | (defvar lazy-lock-defer-contextually) |
| 143 | (defvar lazy-lock-defer-on-scrolling) | 143 | (defvar lazy-lock-defer-on-scrolling) |
| 144 | (defvar lazy-lock-defer-on-the-fly) | 144 | (defvar lazy-lock-defer-on-the-fly) |
| 145 | (defvar speedbar-attached-frame) | ||
| 146 | |||
| 145 | 147 | ||
| 146 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 148 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 147 | ;;; Variables | 149 | ;;; Variables |
| @@ -13988,11 +13990,11 @@ if required." | |||
| 13988 | (speedbar-add-mode-functions-list | 13990 | (speedbar-add-mode-functions-list |
| 13989 | '("vhdl directory" | 13991 | '("vhdl directory" |
| 13990 | (speedbar-item-info . vhdl-speedbar-item-info) | 13992 | (speedbar-item-info . vhdl-speedbar-item-info) |
| 13991 | (speedbar-line-path . speedbar-files-line-path))) | 13993 | (speedbar-line-directory . speedbar-files-line-path))) |
| 13992 | (speedbar-add-mode-functions-list | 13994 | (speedbar-add-mode-functions-list |
| 13993 | '("vhdl project" | 13995 | '("vhdl project" |
| 13994 | (speedbar-item-info . vhdl-speedbar-item-info) | 13996 | (speedbar-item-info . vhdl-speedbar-item-info) |
| 13995 | (speedbar-line-path . vhdl-speedbar-line-project))) | 13997 | (speedbar-line-directory . vhdl-speedbar-line-project))) |
| 13996 | ;; keymap | 13998 | ;; keymap |
| 13997 | (unless vhdl-speedbar-key-map | 13999 | (unless vhdl-speedbar-key-map |
| 13998 | (setq vhdl-speedbar-key-map (speedbar-make-specialized-keymap)) | 14000 | (setq vhdl-speedbar-key-map (speedbar-make-specialized-keymap)) |
| @@ -14257,9 +14259,9 @@ otherwise use cached data." | |||
| 14257 | ((save-excursion (beginning-of-line) (looking-at "[^0-9]")) | 14259 | ((save-excursion (beginning-of-line) (looking-at "[^0-9]")) |
| 14258 | (re-search-forward "[0-9]+:" nil t) | 14260 | (re-search-forward "[0-9]+:" nil t) |
| 14259 | (vhdl-scan-directory-contents | 14261 | (vhdl-scan-directory-contents |
| 14260 | (abbreviate-file-name (speedbar-line-path)))) | 14262 | (abbreviate-file-name (speedbar-line-directory)))) |
| 14261 | ;; current directory | 14263 | ;; current directory |
| 14262 | (t (setq path (speedbar-line-path)) | 14264 | (t (setq path (speedbar-line-directory)) |
| 14263 | (string-match "^\\(.+[/\\]\\)" path) | 14265 | (string-match "^\\(.+[/\\]\\)" path) |
| 14264 | (vhdl-scan-directory-contents | 14266 | (vhdl-scan-directory-contents |
| 14265 | (abbreviate-file-name (match-string 1 path))))) | 14267 | (abbreviate-file-name (match-string 1 path))))) |
| @@ -14977,7 +14979,7 @@ NO-POSITION non-nil means do not re-position cursor." | |||
| 14977 | (cond ((string-match "+" text) ; we have to expand this dir | 14979 | (cond ((string-match "+" text) ; we have to expand this dir |
| 14978 | (setq speedbar-shown-directories | 14980 | (setq speedbar-shown-directories |
| 14979 | (cons (expand-file-name | 14981 | (cons (expand-file-name |
| 14980 | (concat (speedbar-line-path indent) token "/")) | 14982 | (concat (speedbar-line-directory indent) token "/")) |
| 14981 | speedbar-shown-directories)) | 14983 | speedbar-shown-directories)) |
| 14982 | (speedbar-change-expand-button-char ?-) | 14984 | (speedbar-change-expand-button-char ?-) |
| 14983 | (speedbar-reset-scanners) | 14985 | (speedbar-reset-scanners) |
| @@ -14986,12 +14988,12 @@ NO-POSITION non-nil means do not re-position cursor." | |||
| 14986 | (end-of-line) (forward-char 1) | 14988 | (end-of-line) (forward-char 1) |
| 14987 | (vhdl-speedbar-insert-dirs | 14989 | (vhdl-speedbar-insert-dirs |
| 14988 | (speedbar-file-lists | 14990 | (speedbar-file-lists |
| 14989 | (concat (speedbar-line-path indent) token "/")) | 14991 | (concat (speedbar-line-directory indent) token "/")) |
| 14990 | (1+ indent)) | 14992 | (1+ indent)) |
| 14991 | (speedbar-reset-scanners) | 14993 | (speedbar-reset-scanners) |
| 14992 | (vhdl-speedbar-insert-dir-hierarchy | 14994 | (vhdl-speedbar-insert-dir-hierarchy |
| 14993 | (abbreviate-file-name | 14995 | (abbreviate-file-name |
| 14994 | (concat (speedbar-line-path indent) token "/")) | 14996 | (concat (speedbar-line-directory indent) token "/")) |
| 14995 | (1+ indent) speedbar-power-click))) | 14997 | (1+ indent) speedbar-power-click))) |
| 14996 | (vhdl-speedbar-update-current-unit t t)) | 14998 | (vhdl-speedbar-update-current-unit t t)) |
| 14997 | ((string-match "-" text) ; we have to contract this node | 14999 | ((string-match "-" text) ; we have to contract this node |
| @@ -14999,7 +15001,7 @@ NO-POSITION non-nil means do not re-position cursor." | |||
| 14999 | (let ((oldl speedbar-shown-directories) | 15001 | (let ((oldl speedbar-shown-directories) |
| 15000 | (newl nil) | 15002 | (newl nil) |
| 15001 | (td (expand-file-name | 15003 | (td (expand-file-name |
| 15002 | (concat (speedbar-line-path indent) token)))) | 15004 | (concat (speedbar-line-directory indent) token)))) |
| 15003 | (while oldl | 15005 | (while oldl |
| 15004 | (if (not (string-match (concat "^" (regexp-quote td)) (car oldl))) | 15006 | (if (not (string-match (concat "^" (regexp-quote td)) (car oldl))) |
| 15005 | (setq newl (cons (car oldl) newl))) | 15007 | (setq newl (cons (car oldl) newl))) |
| @@ -15085,7 +15087,7 @@ NO-POSITION non-nil means do not re-position cursor." | |||
| 15085 | (if vhdl-speedbar-show-projects | 15087 | (if vhdl-speedbar-show-projects |
| 15086 | (vhdl-speedbar-line-project) | 15088 | (vhdl-speedbar-line-project) |
| 15087 | (abbreviate-file-name | 15089 | (abbreviate-file-name |
| 15088 | (file-name-as-directory (speedbar-line-path indent))))) | 15090 | (file-name-as-directory (speedbar-line-directory indent))))) |
| 15089 | 15091 | ||
| 15090 | (defun vhdl-speedbar-line-project (&optional indent) | 15092 | (defun vhdl-speedbar-line-project (&optional indent) |
| 15091 | "Get currently displayed project name." | 15093 | "Get currently displayed project name." |
| @@ -15236,7 +15238,7 @@ is already shown in a buffer." | |||
| 15236 | (unit-name (vhdl-speedbar-line-text)) | 15238 | (unit-name (vhdl-speedbar-line-text)) |
| 15237 | (vhdl-project (vhdl-speedbar-line-project)) | 15239 | (vhdl-project (vhdl-speedbar-line-project)) |
| 15238 | (directory (file-name-as-directory | 15240 | (directory (file-name-as-directory |
| 15239 | (or (speedbar-line-file) (speedbar-line-path))))) | 15241 | (or (speedbar-line-file) (speedbar-line-directory))))) |
| 15240 | (if (fboundp 'speedbar-select-attached-frame) | 15242 | (if (fboundp 'speedbar-select-attached-frame) |
| 15241 | (speedbar-select-attached-frame) | 15243 | (speedbar-select-attached-frame) |
| 15242 | (select-frame speedbar-attached-frame)) | 15244 | (select-frame speedbar-attached-frame)) |
| @@ -15248,7 +15250,7 @@ is already shown in a buffer." | |||
| 15248 | (interactive) | 15250 | (interactive) |
| 15249 | (let ((vhdl-project (vhdl-speedbar-line-project)) | 15251 | (let ((vhdl-project (vhdl-speedbar-line-project)) |
| 15250 | (default-directory (file-name-as-directory | 15252 | (default-directory (file-name-as-directory |
| 15251 | (or (speedbar-line-file) (speedbar-line-path))))) | 15253 | (or (speedbar-line-file) (speedbar-line-directory))))) |
| 15252 | (vhdl-generate-makefile))) | 15254 | (vhdl-generate-makefile))) |
| 15253 | 15255 | ||
| 15254 | (defun vhdl-speedbar-check-unit (design-unit) | 15256 | (defun vhdl-speedbar-check-unit (design-unit) |