aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2005-03-24 18:41:26 +0000
committerMiles Bader <[email protected]>2005-03-24 18:41:26 +0000
commit5c5385965643b3b951da725c36f6d36862229876 (patch)
tree1c858c489197a9c2a43fb7726c540497c350dfa9 /lisp/progmodes
parent1bac4db5629da854a984a0e84a9469f14b6b9e76 (diff)
parentc29749e73120925796d8c741f5e12388091d6691 (diff)
Revision: [email protected]/emacs--unicode--0--patch-29
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 192-205) - Update from CVS - Use gdb-ui breakpoint faces on ttys too - Tweak gdb-ui breakpoint faces - Tweak info/.arch-inventory to identify info/.cvsignore as source - Clean up gdb-ui breakpoint faces
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/dcl-mode.el2
-rw-r--r--lisp/progmodes/gdb-ui.el32
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/perl-mode.el92
4 files changed, 72 insertions, 56 deletions
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 81ed7780a6..b52e004e5b 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -78,7 +78,7 @@
(defvar dcl-font-lock-keywords
'(("\\<\\(if\\|then\\|else\\|endif\\)\\>"
1 font-lock-keyword-face)
- ("\\<f[$][a-z]+\\>"
+ ("\\<f[$][a-z_]+\\>"
0 font-lock-builtin-face)
("[.]\\(eq\\|not\\|or\\|and\\|lt\\|gt\\|le\\|ge\\|eqs\\|nes\\)[.]"
0 font-lock-builtin-face))
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index fea1bbce69..cb58a53a0d 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1160,20 +1160,25 @@ static char *magick[] = {
(define-fringe-bitmap 'breakpoint
"\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
-(defface breakpoint-enabled-bitmap-face
+(defface breakpoint-enabled
'((t
- :inherit fringe
- :foreground "red"))
+ :foreground "red"
+ :weight bold))
"Face for enabled breakpoint icon in fringe."
:group 'gud)
-
-(defface breakpoint-disabled-bitmap-face
- '((t
- :inherit fringe
- :foreground "grey60"))
+;; compatibility alias for old name
+(put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled)
+
+(defface breakpoint-disabled
+ ;; We use different values of grey for different background types,
+ ;; so that on low-color displays it will end up as something visible
+ ;; if it has to be approximated.
+ '((((background dark)) :foreground "grey60")
+ (((background light)) :foreground "grey40"))
"Face for disabled breakpoint icon in fringe."
:group 'gud)
-
+;; compatibility alias for old name
+(put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled)
;;-put breakpoint icons in relevant margins (even those set in the GUD buffer)
(defun gdb-info-breakpoints-custom ()
@@ -2194,8 +2199,8 @@ BUFFER nil or omitted means use the current buffer."
nil (1+ start)
`(left-fringe breakpoint
,(if enabled
- 'breakpoint-enabled-bitmap-face
- 'breakpoint-disabled-bitmap-face)))
+ 'breakpoint-enabled
+ 'breakpoint-disabled)))
(when (< left-margin-width 2)
(save-current-buffer
(setq left-margin-width 2)
@@ -2232,7 +2237,10 @@ BUFFER nil or omitted means use the current buffer."
(set-window-margins
(get-buffer-window (current-buffer) 0)
left-margin-width right-margin-width))))
- (gdb-put-string putstring (1+ start)))))
+ (gdb-put-string
+ (propertize putstring
+ 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled))
+ (1+ start)))))
(defun gdb-remove-breakpoint-icons (start end &optional remove-margin)
(gdb-remove-strings start end)
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index c6a70173e6..8eba384730 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -7926,7 +7926,7 @@ If we do not know about MODULE, just return KEYWORD literally."
"\n Source information truncated to %d entries."
idlwave-rinfo-max-source-lines))
(setq all nil)))
- (beginning-of-buffer)
+ (goto-char (point-min))
(setq buffer-read-only t))
(display-buffer "*Help*")
(if (and (setq win (get-buffer-window "*Help*"))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 841c62f512..0febea4450 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -207,11 +207,11 @@ The expansion is entirely correct because it uses the C preprocessor."
'("\\<\\(local\\|my\\)\\>" . font-lock-type-face)
;;
;; Fontify function, variable and file name references.
- '("&\\(\\sw+\\)" 1 font-lock-function-name-face)
+ '("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face)
;; Additionally underline non-scalar variables. Maybe this is a bad idea.
;;'("[$@%*][#{]?\\(\\sw+\\)" 1 font-lock-variable-name-face)
- '("[$*]{?\\(\\sw+\\)" 1 font-lock-variable-name-face)
- '("\\([@%]\\|\\$#\\)\\(\\sw+\\)"
+ '("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face)
+ '("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)"
(2 (cons font-lock-variable-name-face '(underline))))
'("<\\(\\sw+\\)>" 1 font-lock-constant-face)
;;
@@ -330,30 +330,34 @@ The expansion is entirely correct because it uses the C preprocessor."
nil nil state 'syntax-table)))
;; The open/close chars are matched like () [] {} and <>.
(let ((parse-sexp-lookup-properties nil))
- (ignore-errors
- (with-syntax-table st
- (goto-char (nth 8 state)) (forward-sexp 1))
- (when twoargs
- (save-excursion
- ;; Skip whitespace and make sure that font-lock will
- ;; refontify the second part in the proper context.
- (put-text-property
- (point) (progn (forward-comment (point-max)) (point))
- 'font-lock-multiline t)
- ;;
- (unless
- (save-excursion
- (let* ((char2 (char-after))
- (st2 (perl-quote-syntax-table char2)))
- (with-syntax-table st2 (forward-sexp 1))
- (put-text-property pos (line-end-position)
- 'jit-lock-defer-multiline t)
- (looking-at "\\s-*\\sw*e")))
- (put-text-property (point) (1+ (point))
- 'syntax-table
- (if (assoc (char-after)
- perl-quote-like-pairs)
- '(15) '(7)))))))))
+ (condition-case err
+ (progn
+ (with-syntax-table st
+ (goto-char (nth 8 state)) (forward-sexp 1))
+ (when twoargs
+ (save-excursion
+ ;; Skip whitespace and make sure that font-lock will
+ ;; refontify the second part in the proper context.
+ (put-text-property
+ (point) (progn (forward-comment (point-max)) (point))
+ 'font-lock-multiline t)
+ ;;
+ (unless
+ (save-excursion
+ (with-syntax-table
+ (perl-quote-syntax-table (char-after))
+ (forward-sexp 1))
+ (put-text-property pos (line-end-position)
+ 'jit-lock-defer-multiline t)
+ (looking-at "\\s-*\\sw*e"))
+ (put-text-property (point) (1+ (point))
+ 'syntax-table
+ (if (assoc (char-after)
+ perl-quote-like-pairs)
+ '(15) '(7)))))))
+ ;; The arg(s) is not terminated, so it extends until EOB.
+ (scan-error (goto-char (point-max))))))
+ ;; Point is now right after the arg(s).
;; Erase any syntactic marks within the quoted text.
(put-text-property pos (1- (point)) 'syntax-table nil)
(when (eq (char-before (1- (point))) ?$)
@@ -649,20 +653,7 @@ changed by, or (parse-state) if line starts in a quoted string."
((looking-at (or nochange perl-nochange)) 0)
(t
(skip-chars-forward " \t\f")
- (cond ((looking-at "\\(\\w\\|\\s_\\)+:[^:]")
- (setq indent (max 1 (+ indent perl-label-offset))))
- ((= (char-syntax (following-char)) ?\))
- (setq indent
- (save-excursion
- (forward-char 1)
- (forward-sexp -1)
- (forward-char 1)
- (if (perl-hanging-paren-p)
- (- indent perl-indent-level)
- (forward-char -1)
- (current-column)))))
- ((= (following-char) ?{)
- (setq indent (+ indent perl-brace-offset))))
+ (setq indent (perl-indent-new-calculate nil indent bof))
(- indent (current-column)))))
(skip-chars-forward " \t\f")
(if (and (numberp shift-amt) (/= 0 shift-amt))
@@ -698,13 +689,30 @@ changed by, or (parse-state) if line starts in a quoted string."
(save-excursion
(skip-syntax-backward " (") (not (bolp)))))
+(defun perl-indent-new-calculate (&optional virtual default parse-start)
+ (or
+ (and virtual (save-excursion (skip-chars-backward " \t") (bolp))
+ (current-column))
+ (and (looking-at "\\(\\w\\|\\s_\\)+:[^:]")
+ (max 1 (+ (or default (perl-calculate-indent parse-start))
+ perl-label-offset)))
+ (and (= (char-syntax (following-char)) ?\))
+ (save-excursion
+ (forward-char 1)
+ (forward-sexp -1)
+ (perl-indent-new-calculate 'virtual nil parse-start)))
+ (and (and (= (following-char) ?{)
+ (save-excursion (forward-char) (perl-hanging-paren-p)))
+ (+ (or default (perl-calculate-indent parse-start))
+ perl-brace-offset))
+ (or default (perl-calculate-indent parse-start))))
+
(defun perl-calculate-indent (&optional parse-start)
"Return appropriate indentation for current line as Perl code.
In usual case returns an integer: the column to indent to.
Returns (parse-state) if line starts inside a string.
Optional argument PARSE-START should be the position of `beginning-of-defun'."
(save-excursion
- (beginning-of-line)
(let ((indent-point (point))
(case-fold-search nil)
(colon-line-end 0)