summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-05-26 05:42:19 +0000
committerMiles Bader <miles@gnu.org>2005-05-26 05:42:19 +0000
commitd2eeec7fb90dc54c4b08e85f452a23317c0ee65d (patch)
treecd13677b902ee91ff96c5f43ca30ae2aba828312 /lisp/progmodes
parent5611ba87dd81c98d2cc00a4d01e19db3d26cf9d5 (diff)
parentc0e9b2d0ec9cb343733243371efecf77722b067f (diff)
downloademacs-d2eeec7fb90dc54c4b08e85f452a23317c0ee65d.tar.gz
emacs-d2eeec7fb90dc54c4b08e85f452a23317c0ee65d.tar.bz2
emacs-d2eeec7fb90dc54c4b08e85f452a23317c0ee65d.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-55
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 320-323) - Update from CVS
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-align.el10
-rw-r--r--lisp/progmodes/cc-awk.el19
-rw-r--r--lisp/progmodes/cc-cmds.el9
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/cc-engine.el34
-rw-r--r--lisp/progmodes/cc-fonts.el2
-rw-r--r--lisp/progmodes/cc-langs.el2
-rw-r--r--lisp/progmodes/cc-mode.el38
-rw-r--r--lisp/progmodes/cc-styles.el1
-rw-r--r--lisp/progmodes/cperl-mode.el23
-rw-r--r--lisp/progmodes/etags.el3
-rw-r--r--lisp/progmodes/flymake.el3
-rw-r--r--lisp/progmodes/gdb-ui.el26
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/make-mode.el14
-rw-r--r--lisp/progmodes/sh-script.el4
-rw-r--r--lisp/progmodes/vhdl-mode.el6
17 files changed, 128 insertions, 70 deletions
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index c5dd091f291..139bfc8aa5a 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -24,9 +24,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
@@ -175,7 +175,8 @@ Works with: arglist-cont, arglist-cont-nonempty."
(let ((open-paren (elt c-syntactic-element 2))
(paren-state (c-parse-state)))
(while (not (eq (car paren-state) open-paren))
- (goto-char (car paren-state))
+ (unless (consp (car paren-state)) ;; ignore matched braces
+ (goto-char (car paren-state)))
(setq paren-state (cdr paren-state)))))
(let ((start (point)) c)
@@ -1171,6 +1172,7 @@ Otherwise, no determination is made."
;;(/= (point-max)
;; (save-excursion (skip-syntax-forward " ") (point))
(zerop (forward-line 1))
+ (bolp) ; forward-line has funny behavior at eob.
(not (looking-at "^[ \t]*$")))
'stop
nil)))
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index dbcfa9d991e..419803a7ada 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -2,7 +2,7 @@
;; Copyright (C) 1988,94,96,2000,01,02,03 Free Software Foundation, Inc.
-;; Author: Alan Mackenzie (originally based on awk-mode.el)
+;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el)
;; Maintainer: FSF
;; Keywords: AWK, cc-mode, unix, languages
@@ -526,13 +526,22 @@
;; Matches any AWK regexp character which doesn't require special analysis.
(defconst c-awk-escaped-newlines*-re "\\(\\\\[\n\r]\\)*")
;; Matches a (possibly empty) sequence of escaped newlines.
+
+;; NOTE: In what follows, "[asdf]" in a regexp will be called a "character
+;; list", and "[:alpha:]" inside a character list will be known as a
+;; "character class". These terms for these things vary between regexp
+;; descriptions .
(defconst c-awk-regexp-char-class-re
+ "\\[:[a-z]+:\\]")
+ ;; Matches a character class spec (e.g. [:alpha:]).
+(defconst c-awk-regexp-char-list-re
(concat "\\[" c-awk-escaped-newlines*-re "^?" c-awk-escaped-newlines*-re "]?"
- "\\(" c-awk-esc-pair-re "\\|" "[^]\n\r]" "\\)*" "\\(]\\|$\\)"))
-;; Matches a regexp char class, up to (but not including) EOL if the ] is
+ "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-class-re
+ "\\|" "[^]\n\r]" "\\)*" "\\(]\\|$\\)"))
+;; Matches a regexp char list, up to (but not including) EOL if the ] is
;; missing.
(defconst c-awk-regexp-innards-re
- (concat "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-class-re
+ (concat "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-list-re
"\\|" c-awk-regexp-normal-re "\\)*"))
;; Matches the inside of an AWK regexp (i.e. without the enclosing /s)
(defconst c-awk-regexp-without-end-re
@@ -549,7 +558,7 @@
;; A "neutral" char(pair). Doesn't change the "state" of a subsequent /.
;; This is space/tab, braces, an auto-increment/decrement operator or an
;; escaped character. Or one of the (illegal) characters @ or `. But NOT an
-;; end of line (even if escpaed).
+;; end of line (even if escaped).
(defconst c-awk-neutrals*-re
(concat "\\(" c-awk-neutral-re "\\)*"))
;; A (possibly empty) string of neutral characters (or character pairs).
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 806fbade693..7be8e370f07 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -2441,7 +2441,8 @@ command to conveniently insert and align the necessary backslashes."
(delete-region (point) end)
(indent-to column 1)))
- (= (forward-line 1) 0))))
+ (zerop (forward-line 1)))
+ (bolp))) ; forward-line has funny behavior at eob.
;; Make sure there are backslashes with at least one space in
;; front of them.
@@ -2466,7 +2467,8 @@ command to conveniently insert and align the necessary backslashes."
(insert ?\\)
(insert ?\ ?\\)))
- (= (forward-line 1) 0)))))))
+ (zerop (forward-line 1)))
+ (bolp)))))) ; forward-line has funny behavior at eob.
(defun c-delete-backslashes-forward (to-mark point-pos)
;; This function does not do any hidden buffer changes.
@@ -2481,7 +2483,8 @@ command to conveniently insert and align the necessary backslashes."
(skip-chars-backward " \t" (if (>= (point) point-pos)
point-pos))
(point))))
- (= (forward-line 1) 0)))))
+ (zerop (forward-line 1)))
+ (bolp)))) ; forward-line has funny behavior at eob.
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 64f3a72f56f..d9caca90666 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -104,7 +104,7 @@
;;; Variables also used at compile time.
-(defconst c-version "5.30.9"
+(defconst c-version "5.30.10"
"CC Mode version number.")
(defconst c-version-sym (intern c-version))
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0a4cb6c8cd6..e9ed474e792 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -24,9 +24,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
@@ -3198,6 +3198,7 @@ This function does not do any hidden buffer changes."
;; when font-lock refontifies the current line only.
(when (save-excursion
(and (= (forward-line 1) 0)
+ (bolp) ; forward-line has funny behavior at eob.
(or (< (c-point 'eol) cfd-limit)
(progn (backward-char)
(not (eq (char-before) ?\\))))))
@@ -4551,7 +4552,7 @@ brace."
;; operator token preceded by "operator".
(save-excursion
(and (c-safe (c-backward-sexp) t)
- (looking-at "operator\\([^_]\\|$\\)")))
+ (looking-at "operator\\>\\([^_]\\|$\\)")))
(and (eq (char-before) ?<)
(c-with-syntax-table c++-template-syntax-table
(if (c-safe (goto-char (c-up-list-forward (point))))
@@ -6104,7 +6105,12 @@ This function does not do any hidden buffer changes."
;; Note: We use the fact that lim is always after any
;; preceding brace sexp.
(while (and (zerop (c-backward-token-2 1 t lim))
- (not (looking-at "[;<,=]"))))
+ (or (not (looking-at "[;<,=]"))
+ (and c-overloadable-operators-regexp
+ (looking-at c-overloadable-operators-regexp)
+ (save-excursion
+ (c-backward-token-2 1 nil lim)
+ (looking-at "operator\\>[^_]"))))))
(or (memq (char-after) '(?, ?=))
(and (c-major-mode-is 'c++-mode)
(zerop (c-backward-token-2 1 nil lim))
@@ -6237,7 +6243,15 @@ This function does not do any hidden buffer changes."
;; CASE 5I: ObjC method definition.
((and c-opt-method-key
(looking-at c-opt-method-key))
- (c-beginning-of-statement-1 lim)
+ (c-beginning-of-statement-1 nil t)
+ (if (= (point) indent-point)
+ ;; Handle the case when it's the first (non-comment)
+ ;; thing in the buffer. Can't look for a 'same return
+ ;; value from cbos1 since ObjC directives currently
+ ;; aren't recognized fully, so that we get 'same
+ ;; instead of 'previous if it moved over a preceding
+ ;; directive.
+ (goto-char (point-min)))
(c-add-syntax 'objc-method-intro (c-point 'boi)))
;; CASE 5P: AWK pattern or function or continuation
;; thereof.
@@ -6316,11 +6330,13 @@ This function does not do any hidden buffer changes."
;; CASE 5K: we are at an ObjC method definition
;; continuation line.
((and c-opt-method-key
- (progn
+ (save-excursion
+ (goto-char indent-point)
(c-beginning-of-statement-1 lim)
(beginning-of-line)
- (looking-at c-opt-method-key)))
- (c-add-syntax 'objc-method-args-cont (point)))
+ (when (looking-at c-opt-method-key)
+ (setq placeholder (point)))))
+ (c-add-syntax 'objc-method-args-cont placeholder))
;; CASE 5L: we are at the first argument of a template
;; arglist that begins on the previous line.
((eq (char-before) ?<)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 26c0bdaf60f..29946dc4682 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -875,7 +875,7 @@ casts and declarations are fontified. Used on level 2 and higher."
;; with array initializers. Otherwise stop at braces
;; to avoid going past full function and class blocks.
(and (if (and (eq got-init ?=)
- (= (c-forward-token-2) 0)
+ (= (c-forward-token-2 1 nil limit) 0)
(looking-at "{"))
(c-safe (c-forward-sexp) t)
t)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 6a36f89c8d3..94d58c66061 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1186,7 +1186,7 @@ will be handled."
(c-lang-defvar c-brace-list-key (c-lang-const c-brace-list-key))
(c-lang-defconst c-other-block-decl-kwds
- "Keywords where the following block (if any) contain another
+ "Keywords where the following block (if any) contains another
declaration level that should not be considered a class.
If any of these also are on `c-type-list-kwds', `c-ref-list-kwds',
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index eaa798217cf..0f17a003ef4 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -24,9 +24,9 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
@@ -91,10 +91,12 @@
(cc-require 'cc-align)
(cc-require 'cc-menus)
-;; SILENCE the compiler.
+;; Silence the compiler.
(cc-bytecomp-defvar comment-line-break-function) ; (X)Emacs 20+
(cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs 20+
(cc-bytecomp-defun set-keymap-parents) ; XEmacs
+(cc-bytecomp-defun run-mode-hooks) ; Emacs 21.1+
+(cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1.
;; We set these variables during mode init, yet we don't require
;; font-lock.
@@ -201,12 +203,15 @@ control). See \"cc-mode.el\" for more info."
(defun c-make-inherited-keymap ()
(let ((map (make-sparse-keymap)))
+ ;; Necessary to use `cc-bytecomp-fboundp' below since this
+ ;; function is called from top-level forms that are evaluated
+ ;; while cc-bytecomp is active when one does M-x eval-buffer.
(cond
;; XEmacs
- ((fboundp 'set-keymap-parents)
+ ((cc-bytecomp-fboundp 'set-keymap-parents)
(set-keymap-parents map c-mode-base-map))
;; Emacs
- ((fboundp 'set-keymap-parent)
+ ((cc-bytecomp-fboundp 'set-keymap-parent)
(set-keymap-parent map c-mode-base-map))
;; incompatible
(t (error "CC Mode is incompatible with this version of Emacs")))
@@ -587,6 +592,13 @@ Note that the style variables are always made local to the buffer."
(add-hook 'hack-local-variables-hook 'c-postprocess-file-styles)
+(defmacro c-run-mode-hooks (&rest hooks)
+ ;; Emacs 21.1 has introduced a system with delayed mode hooks that
+ ;; require the use of the new function `run-mode-hooks'.
+ (if (cc-bytecomp-fboundp 'run-mode-hooks)
+ `(run-mode-hooks ,@hooks)
+ `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks))))
+
;; Support for C
@@ -667,7 +679,7 @@ Key bindings:
(c-common-init 'c-mode)
(easy-menu-add c-c-menu)
(cc-imenu-init cc-imenu-c-generic-expression)
- (run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
(c-update-modeline))
@@ -730,7 +742,7 @@ Key bindings:
(c-common-init 'c++-mode)
(easy-menu-add c-c++-menu)
(cc-imenu-init cc-imenu-c++-generic-expression)
- (run-mode-hooks 'c-mode-common-hook 'c++-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'c++-mode-hook)
(c-update-modeline))
@@ -794,7 +806,7 @@ Key bindings:
(c-common-init 'objc-mode)
(easy-menu-add c-objc-menu)
(cc-imenu-init nil 'cc-imenu-objc-function)
- (run-mode-hooks 'c-mode-common-hook 'objc-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'objc-mode-hook)
(c-update-modeline))
@@ -864,7 +876,7 @@ Key bindings:
(c-common-init 'java-mode)
(easy-menu-add c-java-menu)
(cc-imenu-init cc-imenu-java-generic-expression)
- (run-mode-hooks 'c-mode-common-hook 'java-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'java-mode-hook)
(c-update-modeline))
@@ -922,7 +934,7 @@ Key bindings:
(c-common-init 'idl-mode)
(easy-menu-add c-idl-menu)
;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO
- (run-mode-hooks 'c-mode-common-hook 'idl-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'idl-mode-hook)
(c-update-modeline))
@@ -984,7 +996,7 @@ Key bindings:
(c-common-init 'pike-mode)
(easy-menu-add c-pike-menu)
;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO
- (run-mode-hooks 'c-mode-common-hook 'pike-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'pike-mode-hook)
(c-update-modeline))
@@ -1076,7 +1088,7 @@ Key bindings:
;; in cc-engine.el, just before (defun c-fast-in-literal ...
(defalias 'c-in-literal 'c-slow-in-literal)
- (run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
+ (c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
(c-update-modeline))
) ;; closes the (if (not (memq 'syntax-properties c-emacs-features))
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index 1a26e54bf06..14f988feb03 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -48,6 +48,7 @@
;; Silence the compiler.
(cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs
+(cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1.
(defvar c-style-alist
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 436bc04d044..4abd8123e6a 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -342,10 +342,19 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
:type 'integer
:group 'cperl-indentation-details)
-(defcustom cperl-vc-header-alist '((SCCS "($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;")
- (RCS "($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/) ;"))
- "*What to use as `vc-header-alist' in CPerl."
- :type '(repeat (list symbol string))
+(defvar cperl-vc-header-alist nil)
+(make-obsolete-variable
+ 'cperl-vc-header-alist
+ "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.")
+
+(defcustom cperl-vc-sccs-header '("($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;")
+ "*Special version of `vc-sccs-header' that is used in CPerl mode buffers."
+ :type '(repeat string)
+ :group 'cperl)
+
+(defcustom cperl-vc-rcs-header '("($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/) ;")
+ "*Special version of `vc-rcs-header' that is used in CPerl mode buffers."
+ :type '(repeat string)
:group 'cperl)
(defcustom cperl-clobber-mode-lists
@@ -1485,8 +1494,10 @@ or as help on variables `cperl-tips', `cperl-problems',
(function cperl-imenu--create-perl-index))
(make-local-variable 'imenu-sort-function)
(setq imenu-sort-function nil)
- (make-local-variable 'vc-header-alist)
- (set 'vc-header-alist cperl-vc-header-alist) ; Avoid warning
+ (make-local-variable 'vc-rcs-header)
+ (set 'vc-rcs-header cperl-vc-rcs-header)
+ (make-local-variable 'vc-sccs-header)
+ (set 'vc-sccs-header cperl-vc-sccs-header)
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
(cond
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 32ede0e1474..b119b03f0bf 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1858,7 +1858,8 @@ directory specification."
(error "File %s not in current tags tables" file)))))
(with-current-buffer "*Tags List*"
(require 'apropos)
- (apropos-mode)
+ (with-no-warnings
+ (apropos-mode))
(setq buffer-read-only t)))
;;;###autoload
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 5463ee3ffa9..28a6aae2435 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -47,7 +47,8 @@
(defsubst flymake-makehash (&optional test)
(if (fboundp 'make-hash-table)
(if test (make-hash-table :test test) (make-hash-table))
- (makehash test)))
+ (with-no-warnings
+ (makehash test))))
(defalias 'flymake-float-time
(if (fboundp 'float-time)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index ba0266de574..1a26b64beca 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -698,6 +698,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
(define-key map "\C-c\C-z" 'gdb-inferior-io-stop)
(define-key map "\C-c\C-\\" 'gdb-inferior-io-quit)
(define-key map "\C-c\C-d" 'gdb-inferior-io-eof)
+ (define-key map "\C-d" 'gdb-inferior-io-eof)
map))
(define-derived-mode gdb-inferior-io-mode comint-mode "Inferior I/O"
@@ -953,7 +954,7 @@ function is used to change the focus of GUD tooltips to #define
directives."
(setq gdb-active-process nil)
(gdb-stopping ignored))
-
+
(defun gdb-frame-begin (ignored)
(let ((sink gdb-output-sink))
(cond
@@ -1303,7 +1304,8 @@ static char *magick[] = {
(looking-at "\\(\\S-+\\):\\([0-9]+\\)")
(let ((line (match-string 2)) (buffer-read-only nil)
(file (match-string 1)))
- (add-text-properties (point-at-bol) (point-at-eol)
+ (add-text-properties (line-beginning-position)
+ (line-end-position)
'(mouse-face highlight
help-echo "mouse-2, RET: visit breakpoint"))
(unless (file-exists-p file)
@@ -1504,13 +1506,13 @@ static char *magick[] = {
(let ((buffer-read-only nil))
(goto-char (point-min))
(while (< (point) (point-max))
- (add-text-properties (point-at-bol) (point-at-eol)
+ (add-text-properties (line-beginning-position) (line-end-position)
'(mouse-face highlight
help-echo "mouse-2, RET: Select frame"))
(beginning-of-line)
(when (and (looking-at "^#\\([0-9]+\\)")
(equal (match-string 1) gdb-current-stack-level))
- (put-text-property (point-at-bol) (point-at-eol)
+ (put-text-property (line-beginning-position) (line-end-position)
'face '(:inverse-video t)))
(forward-line 1))))))
@@ -1588,7 +1590,7 @@ static char *magick[] = {
(let ((buffer-read-only nil))
(goto-char (point-min))
(while (< (point) (point-max))
- (add-text-properties (point-at-bol) (point-at-eol)
+ (add-text-properties (line-beginning-position) (line-end-position)
'(mouse-face highlight
help-echo "mouse-2, RET: select thread"))
(forward-line 1)))))
@@ -1974,14 +1976,14 @@ corresponding to the mode line clicked."
(let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
(with-current-buffer buf
(goto-char (point-min))
- (while (re-search-forward "^ .*\n" nil t)
+ (while (re-search-forward "^[ }].*\n" nil t)
(replace-match "" nil nil))
(goto-char (point-min))
- (while (re-search-forward "{[-0-9, {}\]*\n" nil t)
- (replace-match "(array);\n" nil nil))
+ (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t)
+ (replace-match "(structure);\n" nil nil))
(goto-char (point-min))
- (while (re-search-forward "{.*=.*\n" nil t)
- (replace-match "(structure);\n" nil nil))))
+ (while (re-search-forward "\\s-*{.*\n" nil t)
+ (replace-match " (array);\n" nil nil))))
(let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
(and buf (with-current-buffer buf
(let ((p (point))
@@ -2316,8 +2318,8 @@ BUFFER nil or omitted means use the current buffer."
(delete-overlay overlay))))
(defun gdb-put-breakpoint-icon (enabled bptno)
- (let ((start (progn (beginning-of-line) (- (point) 1)))
- (end (progn (end-of-line) (+ (point) 1)))
+ (let ((start (- (line-beginning-position) 1))
+ (end (+ (line-end-position) 1))
(putstring (if enabled "B" "b")))
(add-text-properties
0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt")
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 35e4b68c9b8..a118b0055a9 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -3548,7 +3548,7 @@ is non-nil."
(let ((pos (point)))
(if idlwave-file-header
(cond ((car idlwave-file-header)
- (insert-file (car idlwave-file-header)))
+ (insert-file-contents (car idlwave-file-header)))
((stringp (car (cdr idlwave-file-header)))
(insert (car (cdr idlwave-file-header))))))
(goto-char pos)))
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 86002768757..05c3ac50787 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -484,7 +484,7 @@ not be enclosed in { } or ( )."
("\\\\\n" 0 ".")))
(defvar makefile-imenu-generic-expression
- `(("Dependencies" ,makefile-dependency-regex 1)
+ `(("Dependencies" makefile-previous-dependency 1)
("Macro Assignment" ,makefile-macroassign-regex 1))
"Imenu generic expression for Makefile mode. See `imenu-generic-expression'.")
@@ -854,7 +854,10 @@ Makefile mode can be configured by modifying the following variables:
"^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)")
(setq font-lock-defaults
- `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))))
+ `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
+ imenu-generic-expression
+ `(("Functions" "^[ \t]*\\(?:make\\)?sub[ \t]+\\([A-Za-z0-9_]+\\)" 1)
+ ,@imenu-generic-expression)))
;;;###autoload
(define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
@@ -866,10 +869,7 @@ Makefile mode can be configured by modifying the following variables:
(set (make-local-variable 'makefile-rule-action-regex)
"^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)")
(setq font-lock-defaults
- `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))
- imenu-generic-expression
- `(("Dependencies" ,makefile-dependency-regex 1)
- ,@(cdr imenu-generic-expression))))
+ `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
@@ -1682,7 +1682,7 @@ matched in a rule action."
(catch 'found
(let ((pt (point)))
(while (progn (skip-chars-forward makefile-dependency-skip bound)
- (not (eobp)))
+ (< (point) (or bound (point-max))))
(forward-char)
(or (eq (char-after) ?=)
(get-text-property (1- (point)) 'face)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 0173c419b5d..87915933862 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1389,7 +1389,7 @@ with your script for an edit-interpret-debug cycle."
(cond ((looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")
(match-string 2))
((and buffer-file-name
- (string-match "\\.m?spec$" buffer-file-name))
+ (string-match "\\.m?spec\\'" buffer-file-name))
"rpm")))))
(sh-set-shell (or interpreter sh-shell-file) nil nil))
(run-hooks 'sh-mode-hook))
@@ -2290,7 +2290,7 @@ we go to the end of the previous line and do not check for continuations."
(if (looking-at "[\"'`]")
(sh-safe-forward-sexp)
;; (> (skip-chars-forward "^ \t\n\"'`") 0)
- (> (skip-chars-forward "-_a-zA-Z\$0-9") 0)
+ (> (skip-chars-forward "-_a-zA-Z$0-9") 0)
))
(buffer-substring start (point))
))
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 12f04895f98..f840ef356d9 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -12364,8 +12364,8 @@ File statistics: \"%s\"\n\
(save-match-data
(goto-char (match-end 1))
;; move to next item
- (if (looking-at "\\(\\s-*,\\)")
- (goto-char (match-end 1))
+ (if (looking-at "\\s-*,")
+ (goto-char (match-end 0))
(end-of-line) t))))
(error t)))
@@ -12736,7 +12736,7 @@ This does background highlighting of translate-off regions.")
'(font-lock-syntactic-keywords . vhdl-font-lock-syntactic-keywords)))
(when (fboundp 'font-lock-unset-defaults)
(font-lock-unset-defaults)) ; not implemented in XEmacs
- (font-lock-set-defaults)
+ (font-lock-set-defaults) ;What for? --Stef
(font-lock-mode nil)
(font-lock-mode t))