From xemacs-m  Sun Jun 15 16:41:00 1997
Received: from bittersweet.inetarena.com (karlheg@bittersweet.inetarena.com [206.129.216.38])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA00499
	for <xemacs-beta@xemacs.org>; Sun, 15 Jun 1997 16:40:36 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.5/8.8.5) id OAA09958;
	Sun, 15 Jun 1997 14:40:50 -0700
Date: Sun, 15 Jun 1997 14:40:50 -0700
Message-Id: <199706152140.OAA09958@bittersweet.inetarena.com>
From: "Karl M. Hegbloom" <karlheg@inetarena.com>
To: <xemacs-beta@xemacs.org>
Subject: [patch] modes/...
X-Face: /Q}=yl}1_v7nP)xXo5XjG8+tl@=uVu7o5u6)f]zN?+<hB!K.m9:[|*p34jVN`O;:XZXVSy>/\R>qDt(t8w!-i{(y0"`jFw^uk8inzO9wXabd'CdjUWfC\GHi:6nO*YC89#-qD>Q4r%9!V"<RYJ=7D#$";q=zML5'!=wvXk^$`6FT=5CMofQX)WUKt0p:OKl.mFOXx/D


8<----------------------------------------------------------------->8
*** ada-mode.el.orig	Sun Jun 15 14:26:06 1997
--- ada-mode.el	Sun Jun 15 14:32:40 1997
***************
*** 828,834 ****
                 (search-forward "_" pos t))
        (and first
             (setq first nil))
!       (insert-char (upcase (following-char)) 1)
        (delete-char 1))
      (goto-char pos)))
  
--- 828,834 ----
                 (search-forward "_" pos t))
        (and first
             (setq first nil))
!       (insert-char (upcase (char-after (point))) 1)
        (delete-char 1))
      (goto-char pos)))
  
*** arc-mode.el.orig	Sun Jun 15 14:26:15 1997
--- arc-mode.el	Sun Jun 15 14:32:49 1997
***************
*** 976,982 ****
      (save-excursion
        (goto-char archive-file-list-start)
        (while (< (point) archive-file-list-end)
!         (or (= (following-char) ? )
              (progn (delete-char 1) (insert ? )))
          (forward-line 1)))
      (set-buffer-modified-p modified)))
--- 976,982 ----
      (save-excursion
        (goto-char archive-file-list-start)
        (while (< (point) archive-file-list-end)
!         (or (= (char-after (point)) ? )
              (progn (delete-char 1) (insert ? )))
          (forward-line 1)))
      (set-buffer-modified-p modified)))
***************
*** 993,999 ****
      (save-excursion
        (goto-char archive-file-list-start)
        (while (< (point) archive-file-list-end)
!         (if (= (following-char) mark)
  	    (setq files (cons (archive-get-descr) files)))
          (forward-line 1)))
      (or (nreverse files)
--- 993,999 ----
      (save-excursion
        (goto-char archive-file-list-start)
        (while (< (point) archive-file-list-end)
!         (if (= (char-after (point)) mark)
  	    (setq files (cons (archive-get-descr) files)))
          (forward-line 1)))
      (or (nreverse files)
***************
*** 1054,1060 ****
      (save-excursion
        (goto-char archive-file-list-start)
        (while (< (point) archive-file-list-end)
!         (if (= (following-char) ?D)
  	    (setq files (cons (aref (archive-get-descr) 0) files)))
          (forward-line 1)))
      (setq files (nreverse files))
--- 1054,1060 ----
      (save-excursion
        (goto-char archive-file-list-start)
        (while (< (point) archive-file-list-end)
!         (if (= (char-after (point)) ?D)
  	    (setq files (cons (aref (archive-get-descr) 0) files)))
          (forward-line 1)))
      (setq files (nreverse files))
*** asm-mode.el.orig	Sun Jun 15 14:26:22 1997
--- asm-mode.el	Sun Jun 15 14:32:58 1997
***************
*** 200,206 ****
    ;; on the current line if it was all comment, otherwise above it
    (end-of-line)
    (delete-horizontal-space)
!   (while (= (preceding-char) asm-comment-char)
      (delete-backward-char 1))
    (delete-horizontal-space)
    (if (bolp)
--- 200,206 ----
    ;; on the current line if it was all comment, otherwise above it
    (end-of-line)
    (delete-horizontal-space)
!   (while (= (char-before (point)) asm-comment-char)
      (delete-backward-char 1))
    (delete-horizontal-space)
    (if (bolp)
*** bibtex.el.orig	Sun Jun 15 14:26:36 1997
--- bibtex.el	Sun Jun 15 14:33:21 1997
***************
*** 914,920 ****
      (goto-char point)
      (while (search-forward "\"" nil t)
        (or (looking-at "[,}][ \t]*$")
! 	  (char-equal (preceding-char) ?\")
  	  ;; some versions put closing brace on separate line.
  	  (looking-at "[ \t]*\n}")
  	  (save-excursion
--- 914,920 ----
      (goto-char point)
      (while (search-forward "\"" nil t)
        (or (looking-at "[,}][ \t]*$")
! 	  (char-equal (char-before (point)) ?\")
  	  ;; some versions put closing brace on separate line.
  	  (looking-at "[ \t]*\n}")
  	  (save-excursion
***************
*** 1153,1159 ****
  	(if (looking-at "\"")
  	    (forward-char 1)))
      (goto-char (match-end bibtex-text-in-field))
!     (if (= (preceding-char) ?\")
  	(forward-char -1))))
  
  ;; (defun bibtex-find-text ()
--- 1153,1159 ----
  	(if (looking-at "\"")
  	    (forward-char 1)))
      (goto-char (match-end bibtex-text-in-field))
!     (if (= (char-before (point)) ?\")
  	(forward-char -1))))
  
  ;; (defun bibtex-find-text ()
***************
*** 1188,1196 ****
    (interactive)
    (end-of-line)
    (skip-chars-backward " \t")		;MON - maybe delete these chars?
!   (cond ((= (preceding-char) ?,)
  	 (forward-char -2))) ; -1 --> -2 sct@dcs.edinburgh.ac.uk
!   (cond ((= (preceding-char) ?\")
  	 (forward-char -1))))		;MON - only go back if quote
  
  (defun bibtex-remove-double-quotes ()
--- 1188,1196 ----
    (interactive)
    (end-of-line)
    (skip-chars-backward " \t")		;MON - maybe delete these chars?
!   (cond ((= (char-before (point)) ?,)
  	 (forward-char -2))) ; -1 --> -2 sct@dcs.edinburgh.ac.uk
!   (cond ((= (char-before (point)) ?\")
  	 (forward-char -1))))		;MON - only go back if quote
  
  (defun bibtex-remove-double-quotes ()
***************
*** 1480,1486 ****
      (save-excursion
        (previous-line 1)
        (end-of-line)
!       (if (eq (preceding-char) ?,)
   	  (backward-delete-char 1)))
      (skip-whitespace-and-comments)))
  
--- 1480,1486 ----
      (save-excursion
        (previous-line 1)
        (end-of-line)
!       (if (eq (char-before (point)) ?,)
   	  (backward-delete-char 1)))
      (skip-whitespace-and-comments)))
  
*** c-comment.el.orig	Sun Jun 15 14:26:43 1997
--- c-comment.el	Sun Jun 15 14:33:31 1997
***************
*** 192,198 ****
  	  (while (not (eobp))
  	    (insert c-comment-leader (if (eolp) "" " "))
  	    (forward-line)))
! 	(if (not (char-equal (preceding-char) ?\n))
  	    (insert "\n"))
  	(insert (if (string= c-comment-leader " *") " */" "*/"))
  	;; indent if necessary
--- 192,198 ----
  	  (while (not (eobp))
  	    (insert c-comment-leader (if (eolp) "" " "))
  	    (forward-line)))
! 	(if (not (char-equal (char-before (point)) ?\n))
  	    (insert "\n"))
  	(insert (if (string= c-comment-leader " *") " */" "*/"))
  	;; indent if necessary
*** cc-compat.el.orig	Sun Jun 15 14:26:51 1997
--- cc-compat.el	Sun Jun 15 14:33:40 1997
***************
*** 84,90 ****
    ;; taken directly from calculate-c-indent confusion
    (save-excursion
      (c-backward-syntactic-ws)
!     (if (= (preceding-char) ?{)
  	(forward-char -1)
        (goto-char (cdr langelem)))
      (let* ((curcol (save-excursion 
--- 84,90 ----
    ;; taken directly from calculate-c-indent confusion
    (save-excursion
      (c-backward-syntactic-ws)
!     (if (= (char-before (point)) ?{)
  	(forward-char -1)
        (goto-char (cdr langelem)))
      (let* ((curcol (save-excursion 
***************
*** 109,115 ****
  	      ;; move to the beginning of that; possibly a different
  	      ;; line
  	      (progn
! 		(if (eq (preceding-char) ?\))
  		    (forward-sexp -1))
  		;; Get initial indentation of the line we are on.
  		(current-indentation)))))
--- 109,115 ----
  	      ;; move to the beginning of that; possibly a different
  	      ;; line
  	      (progn
! 		(if (eq (char-before (point)) ?\))
  		    (forward-sexp -1))
  		;; Get initial indentation of the line we are on.
  		(current-indentation)))))
***************
*** 125,131 ****
  		     (current-column)))
  	   (bocm-lossage (progn
  			   (goto-char (cdr langelem))
! 			   (if (= (following-char) ?{)
  			       (setq bracep t)
  			     (goto-char here)
  			     (beginning-of-line)
--- 125,131 ----
  		     (current-column)))
  	   (bocm-lossage (progn
  			   (goto-char (cdr langelem))
! 			   (if (= (char-after (point)) ?{)
  			       (setq bracep t)
  			     (goto-char here)
  			     (beginning-of-line)
*** cc-mode.el.orig	Sun Jun 15 14:27:02 1997
--- cc-mode.el	Sun Jun 15 14:33:52 1997
***************
*** 730,736 ****
      ["Macro Expand Region"    c-macro-expand (mark)]
      ["Backslashify"           c-backslash-region (mark)]
      ["Indent Expression"      c-indent-exp
!      (memq (following-char) '(?\( ?\[ ?\{))]
      ["Indent Line"            c-indent-command t]
      ["Fill Comment Paragraph" c-fill-paragraph t]
      ["Up Conditional"         c-up-conditional t]
--- 730,736 ----
      ["Macro Expand Region"    c-macro-expand (mark)]
      ["Backslashify"           c-backslash-region (mark)]
      ["Indent Expression"      c-indent-exp
!      (memq (char-after (point)) '(?\( ?\[ ?\{))]
      ["Indent Line"            c-indent-command t]
      ["Fill Comment Paragraph" c-fill-paragraph t]
      ["Up Conditional"         c-up-conditional t]
***************
*** 2016,2022 ****
  	    blink-paren-hook		; emacs18
  	    (insertion-point (point))
  	    delete-temp-newline
! 	    (preserve-p (= 32 (char-syntax (preceding-char))))
  	    ;; shut this up too
  	    (c-echo-syntactic-information-p nil)
  	    (syntax (progn
--- 2016,2022 ----
  	    blink-paren-hook		; emacs18
  	    (insertion-point (point))
  	    delete-temp-newline
! 	    (preserve-p (= 32 (char-syntax (char-before (point)))))
  	    ;; shut this up too
  	    (c-echo-syntactic-information-p nil)
  	    (syntax (progn
***************
*** 2055,2061 ****
  		(save-restriction
  		  (narrow-to-region here (point))
  		  (if (and (c-safe (progn (backward-up-list -1) t))
! 			   (memq (preceding-char) '(?\) ?}))
  			   (progn (widen)
  				  (c-safe (progn (forward-sexp -1) t))))
  		      (setq c-state-cache
--- 2055,2061 ----
  		(save-restriction
  		  (narrow-to-region here (point))
  		  (if (and (c-safe (progn (backward-up-list -1) t))
! 			   (memq (char-before (point)) '(?\) ?}))
  			   (progn (widen)
  				  (c-safe (progn (forward-sexp -1) t))))
  		      (setq c-state-cache
***************
*** 2120,2126 ****
  		   (progn
  		     (forward-char -1)
  		     (skip-chars-backward " \t\n")
! 		     (= (preceding-char) ?\{))
  		   ;; make sure matching open brace isn't in a comment
  		   (not (c-in-literal)))
  	      (delete-region (point) (1- here)))
--- 2120,2126 ----
  		   (progn
  		     (forward-char -1)
  		     (skip-chars-backward " \t\n")
! 		     (= (char-before (point)) ?\{))
  		   ;; make sure matching open brace isn't in a comment
  		   (not (c-in-literal)))
  	      (delete-region (point) (1- here)))
***************
*** 2182,2188 ****
  is inhibited."
    (interactive "P")
    (let ((indentp (and (not arg)
! 		      (= (preceding-char) ?/)
  		      (= last-command-char ?/)
  		      (not (c-in-literal))))
  	;; shut this up
--- 2182,2188 ----
  is inhibited."
    (interactive "P")
    (let ((indentp (and (not arg)
! 		      (= (char-before (point)) ?/)
  		      (= last-command-char ?/)
  		      (not (c-in-literal))))
  	;; shut this up
***************
*** 2203,2213 ****
    ;; current line, unless this star introduces a comment-only line.
    (if (and (not arg)
  	   (memq (c-in-literal) '(c))
! 	   (= (preceding-char) ?*)
  	   (save-excursion
  	     (forward-char -1)
  	     (skip-chars-backward "*")
! 	     (if (= (preceding-char) ?/)
  		 (forward-char -1))
  	     (skip-chars-backward " \t")
  	     (bolp)))
--- 2203,2213 ----
    ;; current line, unless this star introduces a comment-only line.
    (if (and (not arg)
  	   (memq (c-in-literal) '(c))
! 	   (= (char-before (point)) ?*)
  	   (save-excursion
  	     (forward-char -1)
  	     (skip-chars-backward "*")
! 	     (if (= (char-before (point)) ?/)
  		 (forward-char -1))
  	     (skip-chars-backward " \t")
  	     (bolp)))
***************
*** 2252,2258 ****
  		   (progn
  		     (forward-char -1)
  		     (skip-chars-backward " \t\n")
! 		     (= (preceding-char) ?}))
  		   ;; make sure matching open brace isn't in a comment
  		   (not (c-in-literal lim)))
  	      (delete-region (point) here))
--- 2252,2258 ----
  		   (progn
  		     (forward-char -1)
  		     (skip-chars-backward " \t\n")
! 		     (= (char-before (point)) ?}))
  		   ;; make sure matching open brace isn't in a comment
  		   (not (c-in-literal lim)))
  	      (delete-region (point) here))
***************
*** 2289,2295 ****
      (if (condition-case nil
  	    (save-excursion
  	      (up-list -1)
! 	      (/= (following-char) ?\())
  	  (error t))
  	t
        'stop)))
--- 2289,2295 ----
      (if (condition-case nil
  	    (save-excursion
  	      (up-list -1)
! 	      (/= (char-after (point)) ?\())
  	  (error t))
  	t
        'stop)))
***************
*** 2323,2333 ****
  	    (here (point)))
  	(if (and c-auto-newline
  		 (memq 'scope-operator c-cleanup-list)
! 		 (= (preceding-char) ?:)
  		 (progn
  		   (forward-char -1)
  		   (skip-chars-backward " \t\n")
! 		   (= (preceding-char) ?:))
  		 (not (c-in-literal))
  		 (not (= (char-after (- (point) 2)) ?:)))
  	    (delete-region (point) (1- here)))
--- 2323,2333 ----
  	    (here (point)))
  	(if (and c-auto-newline
  		 (memq 'scope-operator c-cleanup-list)
! 		 (= (char-before (point)) ?:)
  		 (progn
  		   (forward-char -1)
  		   (skip-chars-backward " \t\n")
! 		   (= (char-before (point)) ?:))
  		 (not (c-in-literal))
  		 (not (= (char-after (- (point) 2)) ?:)))
  	    (delete-region (point) (1- here)))
***************
*** 2380,2386 ****
  supplied, or point is inside a literal."
    (interactive "P")
    (let ((indentp (and (not arg)
! 		      (= (preceding-char) last-command-char)
  		      (not (c-in-literal))))
  	;; shut this up
  	(c-echo-syntactic-information-p nil))
--- 2380,2386 ----
  supplied, or point is inside a literal."
    (interactive "P")
    (let ((indentp (and (not arg)
! 		      (= (char-before (point)) last-command-char)
  		      (not (c-in-literal))))
  	;; shut this up
  	(c-echo-syntactic-information-p nil))
***************
*** 2677,2684 ****
  			      ;; kludge alert, watch out for */, in
  			      ;; which case fill-prefix should *not*
  			      ;; be "*"!
! 			      (if (and (= (following-char) ?/)
! 				       (= (preceding-char) ?*))
  				  (forward-char -1))
  			      (point)))
  
--- 2677,2684 ----
  			      ;; kludge alert, watch out for */, in
  			      ;; which case fill-prefix should *not*
  			      ;; be "*"!
! 			      (if (and (= (char-after (point)) ?/)
! 				       (= (char-before (point)) ?*))
  				  (forward-char -1))
  			      (point)))
  
***************
*** 2868,2879 ****
  	(last-begin (point)))
      ;; first check for bare semicolon
      (if (and (progn (c-backward-syntactic-ws lim)
! 		    (= (preceding-char) ?\;))
  	     (c-safe (progn (forward-char -1)
  			    (setq saved (point))
  			    t))
  	     (progn (c-backward-syntactic-ws lim)
! 		    (memq (preceding-char) '(?\; ?{ ?} ?:)))
  	     )
  	(setq last-begin saved)
        (goto-char last-begin)
--- 2868,2879 ----
  	(last-begin (point)))
      ;; first check for bare semicolon
      (if (and (progn (c-backward-syntactic-ws lim)
! 		    (= (char-before (point)) ?\;))
  	     (c-safe (progn (forward-char -1)
  			    (setq saved (point))
  			    t))
  	     (progn (c-backward-syntactic-ws lim)
! 		    (memq (char-before (point)) '(?\; ?{ ?} ?:)))
  	     )
  	(setq last-begin saved)
        (goto-char last-begin)
***************
*** 2892,2898 ****
  		(save-excursion
  		  (c-backward-syntactic-ws lim)
  		  (skip-chars-backward "-+!*&:.~ \t\n")
! 		  (if (= (preceding-char) ?\()
  		      (setq last-begin (point))))
  		(goto-char last-begin)
  		(setq last-begin (point)
--- 2892,2898 ----
  		(save-excursion
  		  (c-backward-syntactic-ws lim)
  		  (skip-chars-backward "-+!*&:.~ \t\n")
! 		  (if (= (char-before (point)) ?\()
  		      (setq last-begin (point))))
  		(goto-char last-begin)
  		(setq last-begin (point)
***************
*** 2911,2921 ****
  	   ((c-in-literal lim))
  	   ;; CASE 3: are we looking at a conditional keyword?
  	   ((or (looking-at c-conditional-key)
! 		(and (= (following-char) ?\()
  		     (save-excursion
  		       (forward-sexp 1)
  		       (c-forward-syntactic-ws)
! 		       (/= (following-char) ?\;))
  		     (let ((here (point))
  			   (foundp (progn
  				     (c-backward-syntactic-ws lim)
--- 2911,2921 ----
  	   ((c-in-literal lim))
  	   ;; CASE 3: are we looking at a conditional keyword?
  	   ((or (looking-at c-conditional-key)
! 		(and (= (char-after (point)) ?\()
  		     (save-excursion
  		       (forward-sexp 1)
  		       (c-forward-syntactic-ws)
! 		       (/= (char-after (point)) ?\;))
  		     (let ((here (point))
  			   (foundp (progn
  				     (c-backward-syntactic-ws lim)
***************
*** 3018,3026 ****
  	    (skip-chars-forward "^;{}:" to)
  	    (if (not (c-in-literal lim))
  		(progn
! 		  (if (memq (following-char) '(?\; ?{ ?}))
  		      (setq crossedp t)
! 		    (if (= (following-char) ?:)
  			(setq maybe-labelp t))
  		    (forward-char 1))
  		  (setq lim (point)))
--- 3018,3026 ----
  	    (skip-chars-forward "^;{}:" to)
  	    (if (not (c-in-literal lim))
  		(progn
! 		  (if (memq (char-after (point)) '(?\; ?{ ?}))
  		      (setq crossedp t)
! 		    (if (= (char-after (point)) ?:)
  			(setq maybe-labelp t))
  		    (forward-char 1))
  		  (setq lim (point)))
***************
*** 3185,3197 ****
  		       ;; whitespace. failing that, try to find any
  		       ;; opening brace on the current line
  		       (skip-chars-forward " \t\n")
! 		       (if (memq (following-char) '(?\( ?\[ ?\{))
  			   (point)
  			 (let ((state (parse-partial-sexp (point)
  							  (c-point 'eol))))
  			   (and (nth 1 state)
  				(goto-char (nth 1 state))
! 				(memq (following-char) '(?\( ?\[ ?\{))
  				(point)))))))
  	  ;; find balanced expression end
  	  (setq end (and (c-safe (progn (forward-sexp 1) t))
--- 3185,3197 ----
  		       ;; whitespace. failing that, try to find any
  		       ;; opening brace on the current line
  		       (skip-chars-forward " \t\n")
! 		       (if (memq (char-after (point)) '(?\( ?\[ ?\{))
  			   (point)
  			 (let ((state (parse-partial-sexp (point)
  							  (c-point 'eol))))
  			   (and (nth 1 state)
  				(goto-char (nth 1 state))
! 				(memq (char-after (point)) '(?\( ?\[ ?\{))
  				(point)))))))
  	  ;; find balanced expression end
  	  (setq end (and (c-safe (progn (forward-sexp 1) t))
***************
*** 3231,3237 ****
      ;; if we're sitting at b-o-b, it might be because there was no
      ;; least enclosing brace and we were sitting on the defun's open
      ;; brace.
!     (if (and (bobp) (not (= (following-char) ?\{)))
  	(goto-char here))
      ;; if defun-prompt-regexp is non-nil, b-o-d might not leave us at
      ;; the open brace. I consider this an Emacs bug.
--- 3231,3237 ----
      ;; if we're sitting at b-o-b, it might be because there was no
      ;; least enclosing brace and we were sitting on the defun's open
      ;; brace.
!     (if (and (bobp) (not (= (char-after (point)) ?\{)))
  	(goto-char here))
      ;; if defun-prompt-regexp is non-nil, b-o-d might not leave us at
      ;; the open brace. I consider this an Emacs bug.
***************
*** 3347,3353 ****
  	  (goto-char (cdr brace))
  	(goto-char brace))
        (setq state (cdr state)))
!     (if (= (following-char) ?{)
  	(progn
  	  (forward-line -1)
  	  (while (not (or (bobp)
--- 3347,3353 ----
  	  (goto-char (cdr brace))
  	(goto-char brace))
        (setq state (cdr state)))
!     (if (= (char-after (point)) ?{)
  	(progn
  	  (forward-line -1)
  	  (while (not (or (bobp)
***************
*** 3425,3431 ****
  	(setq here (point))
  	(forward-comment hugenum)
  	;; skip preprocessor directives
! 	(if (and (= (following-char) ?#)
  		 (= (c-point 'boi) (point)))
  	    (end-of-line)
  	  )))))
--- 3425,3431 ----
  	(setq here (point))
  	(forward-comment hugenum)
  	;; skip preprocessor directives
! 	(if (and (= (char-after (point)) ?#)
  		 (= (c-point 'boi) (point)))
  	    (end-of-line)
  	  )))))
***************
*** 3496,3502 ****
  		  (let ((cnt 2))
  		    (while (not (or at-bob (zerop cnt)))
  		      (beginning-of-defun)
! 		      (if (= (following-char) ?\{)
  			  (setq cnt (1- cnt)))
  		      (if (bobp)
  			  (setq at-bob t))))
--- 3496,3502 ----
  		  (let ((cnt 2))
  		    (while (not (or at-bob (zerop cnt)))
  		      (beginning-of-defun)
! 		      (if (= (char-after (point)) ?\{)
  			  (setq cnt (1- cnt)))
  		      (if (bobp)
  			  (setq at-bob t))))
***************
*** 3642,3648 ****
  		       (point))))
      (c-backward-syntactic-ws lim)
      (while (and (> (point) lim)
! 		(memq (preceding-char) '(?, ?:))
  		(progn
  		  (beginning-of-line)
  		  (setq placeholder (point))
--- 3642,3648 ----
  		       (point))))
      (c-backward-syntactic-ws lim)
      (while (and (> (point) lim)
! 		(memq (char-before (point)) '(?, ?:))
  		(progn
  		  (beginning-of-line)
  		  (setq placeholder (point))
***************
*** 3679,3692 ****
      (let ((checkpoint (or containing (point))))
        (goto-char checkpoint)
        ;; could be looking at const specifier
!       (if (and (= (preceding-char) ?t)
  	       (forward-word -1)
  	       (looking-at "\\<const\\>"))
  	  (c-backward-syntactic-ws)
  	;; otherwise, we could be looking at a hanging member init
  	;; colon
  	(goto-char checkpoint)
! 	(if (and (= (preceding-char) ?:)
  		 (progn
  		   (forward-char -1)
  		   (c-backward-syntactic-ws)
--- 3679,3692 ----
      (let ((checkpoint (or containing (point))))
        (goto-char checkpoint)
        ;; could be looking at const specifier
!       (if (and (= (char-before (point)) ?t)
  	       (forward-word -1)
  	       (looking-at "\\<const\\>"))
  	  (c-backward-syntactic-ws)
  	;; otherwise, we could be looking at a hanging member init
  	;; colon
  	(goto-char checkpoint)
! 	(if (and (= (char-before (point)) ?:)
  		 (progn
  		   (forward-char -1)
  		   (c-backward-syntactic-ws)
***************
*** 3694,3708 ****
  	    nil
  	  (goto-char checkpoint))
  	)
!       (and (= (preceding-char) ?\))
  	   ;; check if we are looking at a method def
  	   (or (not c-method-key)
  	       (progn
  		 (forward-sexp -1)
  		 (forward-char -1)
  		 (c-backward-syntactic-ws)
! 		 (not (or (= (preceding-char) ?-)
! 			  (= (preceding-char) ?+)
  			  ;; or a class category
  			  (progn
  			    (forward-sexp -2)
--- 3694,3708 ----
  	    nil
  	  (goto-char checkpoint))
  	)
!       (and (= (char-before (point)) ?\))
  	   ;; check if we are looking at a method def
  	   (or (not c-method-key)
  	       (progn
  		 (forward-sexp -1)
  		 (forward-char -1)
  		 (c-backward-syntactic-ws)
! 		 (not (or (= (char-before (point)) ?-)
! 			  (= (char-before (point)) ?+)
  			  ;; or a class category
  			  (progn
  			    (forward-sexp -2)
***************
*** 3909,3915 ****
  		      ;; inside a template arg list
  		      (save-excursion
  			(skip-chars-backward "^<>" search-start)
! 			(if (= (preceding-char) ?<)
  			    (setq skipchars (concat skipchars ">"))))
  		      (skip-chars-forward skipchars search-end)
  		      (/= (point) search-end))
--- 3909,3915 ----
  		      ;; inside a template arg list
  		      (save-excursion
  			(skip-chars-backward "^<>" search-start)
! 			(if (= (char-before (point)) ?<)
  			    (setq skipchars (concat skipchars ">"))))
  		      (skip-chars-forward skipchars search-end)
  		      (/= (point) search-end))
***************
*** 3955,3961 ****
  		 (forward-sexp 1)
  		 (c-forward-syntactic-ws containing-sexp))
  	     (error (setq failedp t)))
! 	   (if (or failedp (/= (following-char) ?=))
  	       ;; lets see if we're nested. find the most nested
  	       ;; containing brace
  	       (setq containing-sexp (car brace-state)
--- 3955,3961 ----
  		 (forward-sexp 1)
  		 (c-forward-syntactic-ws containing-sexp))
  	     (error (setq failedp t)))
! 	   (if (or failedp (/= (char-after (point)) ?=))
  	       ;; lets see if we're nested. find the most nested
  	       ;; containing brace
  	       (setq containing-sexp (car brace-state)
***************
*** 4084,4092 ****
  	;; the most likely position to perform the majority of tests
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
! 	(setq char-after-ip (following-char))
  	(c-backward-syntactic-ws lim)
! 	(setq char-before-ip (preceding-char))
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
  
--- 4084,4092 ----
  	;; the most likely position to perform the majority of tests
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
! 	(setq char-after-ip (char-after (point)))
  	(c-backward-syntactic-ws lim)
! 	(setq char-before-ip (char-before (point)))
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
  
***************
*** 4128,4134 ****
  		       (setq placeholder (point))
  		       (forward-sexp 1)
  		       (c-forward-syntactic-ws)
! 		       (= (following-char) ?\"))))
  	      (goto-char placeholder)
  	      (c-add-syntax 'extern-lang-open (c-point 'boi)))
  	     ;; CASE 5A.2: we are looking at a class opening brace
--- 4128,4134 ----
  		       (setq placeholder (point))
  		       (forward-sexp 1)
  		       (c-forward-syntactic-ws)
! 		       (= (char-after (point)) ?\"))))
  	      (goto-char placeholder)
  	      (c-add-syntax 'extern-lang-open (c-point 'boi)))
  	     ;; CASE 5A.2: we are looking at a class opening brace
***************
*** 4166,4172 ****
  			 (= char-before-ip ?=))
  		     (save-excursion
  		       (skip-chars-forward "^;(" indent-point)
! 		       (not (memq (following-char) '(?\; ?\()))
  		       )))
  	      (c-add-syntax 'brace-list-open placeholder))
  	     ;; CASE 5A.4: inline defun open
--- 4166,4172 ----
  			 (= char-before-ip ?=))
  		     (save-excursion
  		       (skip-chars-forward "^;(" indent-point)
! 		       (not (memq (char-after (point)) '(?\; ?\()))
  		       )))
  	      (c-add-syntax 'brace-list-open placeholder))
  	     ;; CASE 5A.4: inline defun open
***************
*** 4192,4201 ****
  		  (forward-char -1))
  	      (c-backward-syntactic-ws lim)
  	      ;; TBD: is the preceding redundant?
! 	      (if (= (preceding-char) ?:)
  		  (progn (forward-char -1)
  			 (c-backward-syntactic-ws lim)))
! 	      (if (= (preceding-char) ?\))
  		  (backward-sexp 1))
  	      (setq placeholder (point))
  	      (save-excursion
--- 4192,4201 ----
  		  (forward-char -1))
  	      (c-backward-syntactic-ws lim)
  	      ;; TBD: is the preceding redundant?
! 	      (if (= (char-before (point)) ?:)
  		  (progn (forward-char -1)
  			 (c-backward-syntactic-ws lim)))
! 	      (if (= (char-before (point)) ?\))
  		  (backward-sexp 1))
  	      (setq placeholder (point))
  	      (save-excursion
***************
*** 4226,4232 ****
  			 (save-excursion
  			   (and (= char-after-ip ?:)
  				(c-safe (progn (forward-char 1) t))
! 				(/= (following-char) ?:)
  				)))
  		     (save-excursion
  		       (c-backward-syntactic-ws lim)
--- 4226,4232 ----
  			 (save-excursion
  			   (and (= char-after-ip ?:)
  				(c-safe (progn (forward-char 1) t))
! 				(/= (char-after (point)) ?:)
  				)))
  		     (save-excursion
  		       (c-backward-syntactic-ws lim)
***************
*** 4297,4308 ****
  	    (goto-char indent-point)
  	    (c-backward-syntactic-ws lim)
  	    (while (and (< lim (point))
! 			(= (preceding-char) ?,))
  	      ;; this will catch member inits with multiple
  	      ;; line arglists
  	      (forward-char -1)
  	      (c-backward-syntactic-ws (c-point 'bol))
! 	      (if (= (preceding-char) ?\))
  		  (backward-sexp 1))
  	      ;; now continue checking
  	      (beginning-of-line)
--- 4297,4308 ----
  	    (goto-char indent-point)
  	    (c-backward-syntactic-ws lim)
  	    (while (and (< lim (point))
! 			(= (char-before (point)) ?,))
  	      ;; this will catch member inits with multiple
  	      ;; line arglists
  	      (forward-char -1)
  	      (c-backward-syntactic-ws (c-point 'bol))
! 	      (if (= (char-before (point)) ?\))
  		  (backward-sexp 1))
  	      ;; now continue checking
  	      (beginning-of-line)
***************
*** 4310,4316 ****
  	    (cond
  	     ;; CASE 5D.1: hanging member init colon, but watch out
  	     ;; for bogus matches on access specifiers inside classes.
! 	     ((and (= (preceding-char) ?:)
  		   (save-excursion
  		     (forward-word -1)
  		     (not (looking-at c-access-key))))
--- 4310,4316 ----
  	    (cond
  	     ;; CASE 5D.1: hanging member init colon, but watch out
  	     ;; for bogus matches on access specifiers inside classes.
! 	     ((and (= (char-before (point)) ?:)
  		   (save-excursion
  		     (forward-word -1)
  		     (not (looking-at c-access-key))))
***************
*** 4324,4330 ****
  	     ;; CASE 5D.2: non-hanging member init colon
  	     ((progn
  		(c-forward-syntactic-ws indent-point)
! 		(= (following-char) ?:))
  	      (skip-chars-forward " \t:")
  	      (c-add-syntax 'member-init-cont (point)))
  	     ;; CASE 5D.3: perhaps a multiple inheritance line?
--- 4324,4330 ----
  	     ;; CASE 5D.2: non-hanging member init colon
  	     ((progn
  		(c-forward-syntactic-ws indent-point)
! 		(= (char-after (point)) ?:))
  	      (skip-chars-forward " \t:")
  	      (c-add-syntax 'member-init-cont (point)))
  	     ;; CASE 5D.3: perhaps a multiple inheritance line?
***************
*** 4335,4341 ****
  		(skip-chars-backward "^<" lim)
  		;; not sure if this is the right test, but it should
  		;; be fast and mostly accurate.
! 		(and (= (preceding-char) ?<)
  		     (not (c-in-literal lim))))
  	      ;; we can probably indent it just like and arglist-cont
  	      (c-add-syntax 'arglist-cont (point)))
--- 4335,4341 ----
  		(skip-chars-backward "^<" lim)
  		;; not sure if this is the right test, but it should
  		;; be fast and mostly accurate.
! 		(and (= (char-before (point)) ?<)
  		     (not (c-in-literal lim))))
  	      ;; we can probably indent it just like and arglist-cont
  	      (c-add-syntax 'arglist-cont (point)))
***************
*** 4391,4409 ****
  		   (save-excursion
  		     (c-backward-syntactic-ws limit)
  		     (setq placeholder (point))
! 		     (while (and (memq (preceding-char) '(?\; ?,))
  				 (> (point) limit))
  		       (beginning-of-line)
  		       (setq placeholder (point))
  		       (c-backward-syntactic-ws limit))
! 		     (and (= (preceding-char) ?\))
  			  (or (not c-method-key)
  			      (progn
  				(forward-sexp -1)
  				(forward-char -1)
  				(c-backward-syntactic-ws)
! 				(not (or (= (preceding-char) ?-)
! 					 (= (preceding-char) ?+)
  					 ;; or a class category
  					 (progn
  					   (forward-sexp -2)
--- 4391,4409 ----
  		   (save-excursion
  		     (c-backward-syntactic-ws limit)
  		     (setq placeholder (point))
! 		     (while (and (memq (char-before (point)) '(?\; ?,))
  				 (> (point) limit))
  		       (beginning-of-line)
  		       (setq placeholder (point))
  		       (c-backward-syntactic-ws limit))
! 		     (and (= (char-before (point)) ?\))
  			  (or (not c-method-key)
  			      (progn
  				(forward-sexp -1)
  				(forward-char -1)
  				(c-backward-syntactic-ws)
! 				(not (or (= (char-before (point)) ?-)
! 					 (= (char-before (point)) ?+)
  					 ;; or a class category
  					 (progn
  					   (forward-sexp -2)
***************
*** 4428,4434 ****
  		(backward-sexp 1)
  		(c-backward-syntactic-ws lim))
  	      (or (bobp)
! 		  (memq (preceding-char) '(?\; ?\}))))
  	    ;; real beginning-of-line could be narrowed out due to
  	    ;; enclosure in a class block
  	    (save-restriction
--- 4428,4434 ----
  		(backward-sexp 1)
  		(c-backward-syntactic-ws lim))
  	      (or (bobp)
! 		  (memq (char-before (point)) '(?\; ?\}))))
  	    ;; real beginning-of-line could be narrowed out due to
  	    ;; enclosure in a class block
  	    (save-restriction
***************
*** 4591,4597 ****
  		       (progn
  			 (c-safe (c-skip-conditional))
  			 (c-forward-syntactic-ws)
! 			 (if (memq (following-char) '(?\;))
  			     (progn
  			       (forward-char 1)
  			       (c-forward-syntactic-ws)))
--- 4591,4597 ----
  		       (progn
  			 (c-safe (c-skip-conditional))
  			 (c-forward-syntactic-ws)
! 			 (if (memq (char-after (point)) '(?\;))
  			     (progn
  			       (forward-char 1)
  			       (c-forward-syntactic-ws)))
***************
*** 4753,4759 ****
  		   (looking-at c-switch-label-key)))
  	    (goto-char indent-point)
  	    (skip-chars-forward " \t")
! 	    (if (= (following-char) ?{)
  		(c-add-syntax 'statement-case-open placeholder)
  	      (c-add-syntax 'statement-case-intro placeholder)))
  	   ;; CASE 15B: continued statement
--- 4753,4759 ----
  		   (looking-at c-switch-label-key)))
  	    (goto-char indent-point)
  	    (skip-chars-forward " \t")
! 	    (if (= (char-after (point)) ?{)
  		(c-add-syntax 'statement-case-open placeholder)
  	      (c-add-syntax 'statement-case-intro placeholder)))
  	   ;; CASE 15B: continued statement
***************
*** 4783,4792 ****
  	      (c-beginning-of-statement-1 safepos)
  	      ;; It is possible we're on the brace that opens a nested
  	      ;; function.
! 	      (if (and (= (following-char) ?{)
  		       (save-excursion
  			 (c-backward-syntactic-ws safepos)
! 			 (/= (preceding-char) ?\;)))
  		  (c-beginning-of-statement-1 safepos))
  	      (if (and inswitch-p
  		       (looking-at c-switch-label-key))
--- 4783,4792 ----
  	      (c-beginning-of-statement-1 safepos)
  	      ;; It is possible we're on the brace that opens a nested
  	      ;; function.
! 	      (if (and (= (char-after (point)) ?{)
  		       (save-excursion
  			 (c-backward-syntactic-ws safepos)
! 			 (/= (char-before (point)) ?\;)))
  		  (c-beginning-of-statement-1 safepos))
  	      (if (and inswitch-p
  		       (looking-at c-switch-label-key))
***************
*** 4821,4827 ****
  	    (if (/= (point) (c-point 'boi))
  		(progn
  		  (c-backward-syntactic-ws)
! 		  (c-safe (forward-sexp (if (= (preceding-char) ?\))
  					    -1 -2)))
  		  ))
  	    (c-add-syntax 'defun-block-intro (c-point 'boi)))
--- 4821,4827 ----
  	    (if (/= (point) (c-point 'boi))
  		(progn
  		  (c-backward-syntactic-ws)
! 		  (c-safe (forward-sexp (if (= (char-before (point)) ?\))
  					    -1 -2)))
  		  ))
  	    (c-add-syntax 'defun-block-intro (c-point 'boi)))
***************
*** 4957,4963 ****
  		 (- (current-column) cs-curcol))
  	(goto-char containing-sexp)
  	(or (eolp)
! 	    (not (memq (following-char) '(?{ ?\( )))
  	    (let ((eol (c-point 'eol))
  		  (here (progn
  			  (forward-char 1)
--- 4957,4963 ----
  		 (- (current-column) cs-curcol))
  	(goto-char containing-sexp)
  	(or (eolp)
! 	    (not (memq (char-after (point)) '(?{ ?\( )))
  	    (let ((eol (c-point 'eol))
  		  (here (progn
  			  (forward-char 1)
***************
*** 5104,5110 ****
  	   (equalp (save-excursion
  		     (goto-char (c-point 'boi))
  		     (skip-chars-forward "^=" (c-point 'eol))
! 		     (and (= (following-char) ?=)
  			  (- (point) (c-point 'boi)))))
  	   (curcol (progn
  		     (goto-char relpos)
--- 5104,5110 ----
  	   (equalp (save-excursion
  		     (goto-char (c-point 'boi))
  		     (skip-chars-forward "^=" (c-point 'eol))
! 		     (and (= (char-after (point)) ?=)
  			  (- (point) (c-point 'boi)))))
  	   (curcol (progn
  		     (goto-char relpos)
***************
*** 5116,5122 ****
  	(if (c-in-literal (cdr langelem))
  	    (forward-char 1)
  	  (setq donep t)))
!       (if (/= (following-char) ?=)
  	  ;; there's no equal sign on the line
  	  c-basic-offset
  	;; calculate indentation column after equals and ws, unless
--- 5116,5122 ----
  	(if (c-in-literal (cdr langelem))
  	    (forward-char 1)
  	  (setq donep t)))
!       (if (/= (char-after (point)) ?=)
  	  ;; there's no equal sign on the line
  	  c-basic-offset
  	;; calculate indentation column after equals and ws, unless
***************
*** 5140,5146 ****
      (let* ((extra (save-excursion
  		    (back-to-indentation)
  		    (c-backward-syntactic-ws (cdr langelem))
! 		    (if (= (preceding-char) ?:)
  			(- c-basic-offset)
  		      0)))
  	   (open-bracket-pos (cdr langelem))
--- 5140,5146 ----
      (let* ((extra (save-excursion
  		    (back-to-indentation)
  		    (c-backward-syntactic-ws (cdr langelem))
! 		    (if (= (char-before (point)) ?:)
  			(- c-basic-offset)
  		      0)))
  	   (open-bracket-pos (cdr langelem))
***************
*** 5168,5180 ****
  	   (first-col-column (progn
  			       (goto-char relpos)
  			       (skip-chars-forward "^:" eol)
! 			       (and (= (following-char) ?:)
  				    (current-column)))))
        (if (not first-col-column)
  	  c-basic-offset
  	(goto-char here)
  	(skip-chars-forward "^:" eol)
! 	(if (= (following-char) ?:)
  	    (+ curcol (- first-col-column (current-column)))
  	  c-basic-offset)))))
  
--- 5168,5180 ----
  	   (first-col-column (progn
  			       (goto-char relpos)
  			       (skip-chars-forward "^:" eol)
! 			       (and (= (char-after (point)) ?:)
  				    (current-column)))))
        (if (not first-col-column)
  	  c-basic-offset
  	(goto-char here)
  	(skip-chars-forward "^:" eol)
! 	(if (= (char-after (point)) ?:)
  	    (+ curcol (- first-col-column (current-column)))
  	  c-basic-offset)))))
  
***************
*** 5188,5200 ****
  	   (relpos (cdr langelem))
  	   (prev-col-column (progn
  			      (skip-chars-backward "^:" relpos)
! 			      (and (= (preceding-char) ?:)
  				   (- (current-column) 1)))))
        (if (not prev-col-column)
  	  c-basic-offset
  	(goto-char here)
  	(skip-chars-forward "^:" eol)
! 	(if (= (following-char) ?:)
  	    (+ curcol (- prev-col-column (current-column)))
  	  c-basic-offset)))))
  
--- 5188,5200 ----
  	   (relpos (cdr langelem))
  	   (prev-col-column (progn
  			      (skip-chars-backward "^:" relpos)
! 			      (and (= (char-before (point)) ?:)
  				   (- (current-column) 1)))))
        (if (not prev-col-column)
  	  c-basic-offset
  	(goto-char here)
  	(skip-chars-forward "^:" eol)
! 	(if (= (char-after (point)) ?:)
  	    (+ curcol (- prev-col-column (current-column)))
  	  c-basic-offset)))))
  
***************
*** 5210,5216 ****
        (if (and (eq syntax 'block-close)
  	       (setq langelem (assq 'block-close c-syntactic-context))
  	       (progn (goto-char (cdr langelem))
! 		      (if (= (following-char) ?{)
  			  (c-safe (forward-sexp -1)))
  		      (looking-at "\\<do\\>[^_]")))
  	  '(before)
--- 5210,5216 ----
        (if (and (eq syntax 'block-close)
  	       (setq langelem (assq 'block-close c-syntactic-context))
  	       (progn (goto-char (cdr langelem))
! 		      (if (= (char-after (point)) ?{)
  			  (c-safe (forward-sexp -1)))
  		      (looking-at "\\<do\\>[^_]")))
  	  '(before)
***************
*** 5266,5272 ****
        (if (not delete-flag)
            (while (< (point) to)
              (end-of-line)
!             (if (= (preceding-char) ?\\)
                  (progn (forward-char -1)
                         (skip-chars-backward " \t")))
              (setq column (max column (1+ (current-column))))
--- 5266,5272 ----
        (if (not delete-flag)
            (while (< (point) to)
              (end-of-line)
!             (if (= (char-before (point)) ?\\)
                  (progn (forward-char -1)
                         (skip-chars-backward " \t")))
              (setq column (max column (1+ (current-column))))
***************
*** 5297,5303 ****
  (defun c-append-backslash (column)
    (end-of-line)
    ;; Note that "\\\\" is needed to get one backslash.
!   (if (= (preceding-char) ?\\)
        (progn (forward-char -1)
               (delete-horizontal-space)
               (indent-to column))
--- 5297,5303 ----
  (defun c-append-backslash (column)
    (end-of-line)
    ;; Note that "\\\\" is needed to get one backslash.
!   (if (= (char-before (point)) ?\\)
        (progn (forward-char -1)
               (delete-horizontal-space)
               (indent-to column))
*** cperl-mode.el.orig	Sun Jun 15 14:27:22 1997
--- cperl-mode.el	Sun Jun 15 14:34:05 1997
***************
*** 1227,1233 ****
  			(not cperl-extra-newline-before-brace)
  			(save-excursion
  			  (skip-chars-backward " \t")
! 			  (eq (preceding-char) ?\))))
  		   (if cperl-auto-newline 
  		       (progn (cperl-indent-line) (newline) t) nil)))
  	  (progn
--- 1227,1233 ----
  			(not cperl-extra-newline-before-brace)
  			(save-excursion
  			  (skip-chars-backward " \t")
! 			  (eq (char-before (point)) ?\))))
  		   (if cperl-auto-newline 
  		       (progn (cperl-indent-line) (newline) t) nil)))
  	  (progn
***************
*** 1266,1272 ****
  				 (point-marker)) 
  			     nil))))
      (and (cperl-val 'cperl-electric-lbrace-space)
! 	 (eq (preceding-char) ?$)
  	 (save-excursion
  	   (skip-chars-backward "$")
  	   (looking-at "\\(\\$\\$\\)*\\$\\([^\\$]\\|$\\)"))
--- 1266,1272 ----
  				 (point-marker)) 
  			     nil))))
      (and (cperl-val 'cperl-electric-lbrace-space)
! 	 (eq (char-before (point)) ?$)
  	 (save-excursion
  	   (skip-chars-backward "$")
  	   (looking-at "\\(\\$\\$\\)*\\$\\([^\\$]\\|$\\)"))
***************
*** 1441,1447 ****
  					; start of parens group.
  	(progn
  	  (skip-chars-backward " \t")
! 	  (or (memq (preceding-char) (append ";{" nil))
  	      (insert ";"))
  	  (insert "\n")
  	  (forward-line -1)
--- 1441,1447 ----
  					; start of parens group.
  	(progn
  	  (skip-chars-backward " \t")
! 	  (or (memq (char-before (point)) (append ";{" nil))
  	      (insert ";"))
  	  (insert "\n")
  	  (forward-line -1)
***************
*** 1462,1468 ****
  		(end-of-line)
  		(search-backward "}" beg)
  		(skip-chars-backward " \t")
! 		(or (memq (preceding-char) (append ";{" nil))
  		    (insert ";"))
  		(insert "\n")
  		(cperl-indent-line)
--- 1462,1468 ----
  		(end-of-line)
  		(search-backward "}" beg)
  		(skip-chars-backward " \t")
! 		(or (memq (char-before (point)) (append ";{" nil))
  		    (insert ";"))
  		(insert "\n")
  		(cperl-indent-line)
***************
*** 1475,1481 ****
         ((and (looking-at "\n[ \t]*{$")
  	     (save-excursion
  	       (skip-chars-backward " \t")
! 	       (eq (preceding-char) ?\)))) ; Probably if () {} group
  					   ; with an extra newline.
  	(forward-line 2)
  	(cperl-indent-line))
--- 1475,1481 ----
         ((and (looking-at "\n[ \t]*{$")
  	     (save-excursion
  	       (skip-chars-backward " \t")
! 	       (eq (char-before (point)) ?\)))) ; Probably if () {} group
  					   ; with an extra newline.
  	(forward-line 2)
  	(cperl-indent-line))
***************
*** 1506,1512 ****
  		    (skip-chars-forward " \t")
  		    (or
  		     ;; Ignore in comment lines
! 		     (= (following-char) ?#)
  		     ;; Colon is special only after a label
  		     ;; So quickly rule out most other uses of colon
  		     ;; and do no indentation for them.
--- 1506,1512 ----
  		    (skip-chars-forward " \t")
  		    (or
  		     ;; Ignore in comment lines
! 		     (= (char-after (point)) ?#)
  		     ;; Colon is special only after a label
  		     ;; So quickly rule out most other uses of colon
  		     ;; and do no indentation for them.
***************
*** 1554,1560 ****
  	   (memq last-command '(cperl-electric-semi 
  				cperl-electric-terminator
  				cperl-electric-lbrace))
! 	   (memq (preceding-char) '(?  ?\t ?\n)))
        (let (p)
  	(if (eq last-command 'cperl-electric-lbrace) 
  	    (skip-chars-forward " \t\n"))
--- 1554,1560 ----
  	   (memq last-command '(cperl-electric-semi 
  				cperl-electric-terminator
  				cperl-electric-lbrace))
! 	   (memq (char-before (point)) '(?  ?\t ?\n)))
        (let (p)
  	(if (eq last-command 'cperl-electric-lbrace) 
  	    (skip-chars-forward " \t\n"))
***************
*** 1570,1576 ****
  	   (memq last-command '(cperl-electric-semi 
  				cperl-electric-terminator
  				cperl-electric-lbrace))
! 	   (memq (preceding-char) '(?  ?\t ?\n)))
        (let (p)
  	(if (eq last-command 'cperl-electric-lbrace) 
  	    (skip-chars-forward " \t\n"))
--- 1570,1576 ----
  	   (memq last-command '(cperl-electric-semi 
  				cperl-electric-terminator
  				cperl-electric-lbrace))
! 	   (memq (char-before (point)) '(?  ?\t ?\n)))
        (let (p)
  	(if (eq last-command 'cperl-electric-lbrace) 
  	    (skip-chars-forward " \t\n"))
***************
*** 1648,1658 ****
  		  (and (> indent 0)
  		       (setq indent (max cperl-min-label-indent
  					 (+ indent cperl-label-offset)))))
! 		 ((= (following-char) ?})
  		  (setq indent (- indent cperl-indent-level)))
! 		 ((memq (following-char) '(?\) ?\])) ; To line up with opening paren.
  		  (setq indent (+ indent cperl-close-paren-offset)))
! 		 ((= (following-char) ?{)
  		  (setq indent (+ indent cperl-brace-offset))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
--- 1648,1658 ----
  		  (and (> indent 0)
  		       (setq indent (max cperl-min-label-indent
  					 (+ indent cperl-label-offset)))))
! 		 ((= (char-after (point)) ?})
  		  (setq indent (- indent cperl-indent-level)))
! 		 ((memq (char-after (point)) '(?\) ?\])) ; To line up with opening paren.
  		  (setq indent (+ indent cperl-close-paren-offset)))
! 		 ((= (char-after (point)) ?{)
  		  (setq indent (+ indent cperl-brace-offset))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
***************
*** 1669,1675 ****
  
  (defun cperl-after-label ()
    ;; Returns true if the point is after label. Does not do save-excursion.
!   (and (eq (preceding-char) ?:)
         (memq (char-syntax (char-after (- (point) 2)))
  	     '(?w ?_))
         (progn
--- 1669,1675 ----
  
  (defun cperl-after-label ()
    ;; Returns true if the point is after label. Does not do save-excursion.
!   (and (eq (char-before (point)) ?:)
         (memq (char-syntax (char-after (- (point) 2)))
  	     '(?w ?_))
         (progn
***************
*** 1709,1718 ****
    ;; No save-excursion!
    (cperl-backward-to-noncomment (point-min))
    ;;(skip-chars-backward " \t\n\f")
!   (or (memq (preceding-char) (append ";){}$@&%\C-@" nil)) ; Or label! \C-@ at bobp
  					; Label may be mixed up with `$blah :'
        (save-excursion (cperl-after-label))
!       (and (memq (char-syntax (preceding-char)) '(?w ?_))
  	   (progn
  	     (backward-sexp)
  	     ;; Need take into account `bless', `return', `tr',...
--- 1709,1718 ----
    ;; No save-excursion!
    (cperl-backward-to-noncomment (point-min))
    ;;(skip-chars-backward " \t\n\f")
!   (or (memq (char-before (point)) (append ";){}$@&%\C-@" nil)) ; Or label! \C-@ at bobp
  					; Label may be mixed up with `$blah :'
        (save-excursion (cperl-after-label))
!       (and (memq (char-syntax (char-before (point))) '(?w ?_))
  	   (progn
  	     (backward-sexp)
  	     ;; Need take into account `bless', `return', `tr',...
***************
*** 1720,1726 ****
  		      (not (looking-at "\\(bless\\|return\\|qw\\|tr\\|[smy]\\)\\>")))
  		 (progn
  		   (skip-chars-backward " \t\n\f")
! 		   (and (memq (char-syntax (preceding-char)) '(?w ?_))
  			(progn
  			  (backward-sexp)
  			  (looking-at 
--- 1720,1726 ----
  		      (not (looking-at "\\(bless\\|return\\|qw\\|tr\\|[smy]\\)\\>")))
  		 (progn
  		   (skip-chars-backward " \t\n\f")
! 		   (and (memq (char-syntax (char-before (point))) '(?w ?_))
  			(progn
  			  (backward-sexp)
  			  (looking-at 
***************
*** 1741,1747 ****
  	     (containing-sexp (car (cdr state)))
  	     (char-after (save-excursion
  			   (skip-chars-forward " \t")
! 			   (following-char)))
  	     (start-indent (save-excursion
  			     (goto-char start)
  			     (- (current-indentation)
--- 1741,1747 ----
  	     (containing-sexp (car (cdr state)))
  	     (char-after (save-excursion
  			   (skip-chars-forward " \t")
! 			   (char-after (point))))
  	     (start-indent (save-excursion
  			     (goto-char start)
  			     (- (current-indentation)
***************
*** 1797,1803 ****
  	       ;; in which case this line is the first argument decl.
  	       (skip-chars-forward " \t")
  	       (+ start-indent
! 		  (if (= (following-char) ?{) cperl-continued-brace-offset 0)
  		  (progn
  		    (cperl-backward-to-noncomment (or parse-start (point-min)))
  		    ;;(skip-chars-backward " \t\f\n")
--- 1797,1803 ----
  	       ;; in which case this line is the first argument decl.
  	       (skip-chars-forward " \t")
  	       (+ start-indent
! 		  (if (= (char-after (point)) ?{) cperl-continued-brace-offset 0)
  		  (progn
  		    (cperl-backward-to-noncomment (or parse-start (point-min)))
  		    ;;(skip-chars-backward " \t\f\n")
***************
*** 1806,1814 ****
  		    ;; or function's arg decls.  Set basic-indent accordingly.
  		    ;; Now add a little if this is a continuation line.
  		    (if (or (bobp)
! 			    (memq (preceding-char) (append " ;}" nil)) ; Was ?\)
  			    (memq char-after (append ")]}" nil))
! 			    (and (eq (preceding-char) ?\:) ; label
  				 (progn
  				   (forward-sexp -1)
  				   (skip-chars-backward " \t")
--- 1806,1814 ----
  		    ;; or function's arg decls.  Set basic-indent accordingly.
  		    ;; Now add a little if this is a continuation line.
  		    (if (or (bobp)
! 			    (memq (char-before (point)) (append " ;}" nil)) ; Was ?\)
  			    (memq char-after (append ")]}" nil))
! 			    (and (eq (char-before (point)) ?\:) ; label
  				 (progn
  				   (forward-sexp -1)
  				   (skip-chars-backward " \t")
***************
*** 1843,1861 ****
  	       (cperl-backward-to-noncomment containing-sexp)
  	       ;; Back up over label lines, since they don't
  	       ;; affect whether our line is a continuation.
! 	       (while (or (eq (preceding-char) ?\,)
! 			  (and (eq (preceding-char) ?:)
  			       (or;;(eq (char-after (- (point) 2)) ?\') ; ????
  				(memq (char-syntax (char-after (- (point) 2)))
  				      '(?w ?_)))))
! 		 (if (eq (preceding-char) ?\,)
  		     ;; Will go to beginning of line, essentially.
  		     ;; Will ignore embedded sexpr XXXX.
  		     (cperl-backward-to-start-of-continued-exp containing-sexp))
  		 (beginning-of-line)
  		 (cperl-backward-to-noncomment containing-sexp))
  	       ;; Now we get the answer.
! 	       (if (not (memq (preceding-char) (append ", ;}{" '(nil)))) ; Was ?\,
  		   ;; This line is continuation of preceding line's statement;
  		   ;; indent  `cperl-continued-statement-offset'  more than the
  		   ;; previous line of the statement.
--- 1843,1861 ----
  	       (cperl-backward-to-noncomment containing-sexp)
  	       ;; Back up over label lines, since they don't
  	       ;; affect whether our line is a continuation.
! 	       (while (or (eq (char-before (point)) ?\,)
! 			  (and (eq (char-before (point)) ?:)
  			       (or;;(eq (char-after (- (point) 2)) ?\') ; ????
  				(memq (char-syntax (char-after (- (point) 2)))
  				      '(?w ?_)))))
! 		 (if (eq (char-before (point)) ?\,)
  		     ;; Will go to beginning of line, essentially.
  		     ;; Will ignore embedded sexpr XXXX.
  		     (cperl-backward-to-start-of-continued-exp containing-sexp))
  		 (beginning-of-line)
  		 (cperl-backward-to-noncomment containing-sexp))
  	       ;; Now we get the answer.
! 	       (if (not (memq (char-before (point)) (append ", ;}{" '(nil)))) ; Was ?\,
  		   ;; This line is continuation of preceding line's statement;
  		   ;; indent  `cperl-continued-statement-offset'  more than the
  		   ;; previous line of the statement.
***************
*** 1883,1889 ****
  		      (while (progn (skip-chars-forward " \t\n")
  				    (looking-at "#\\|[a-zA-Z0-9_$]*:[^:]"))
  			;; Skip over comments and labels following openbrace.
! 			(cond ((= (following-char) ?\#)
  			       (forward-line 1))
  			      ;; label:
  			      (t
--- 1883,1889 ----
  		      (while (progn (skip-chars-forward " \t\n")
  				    (looking-at "#\\|[a-zA-Z0-9_$]*:[^:]"))
  			;; Skip over comments and labels following openbrace.
! 			(cond ((= (char-after (point)) ?\#)
  			       (forward-line 1))
  			      ;; label:
  			      (t
***************
*** 1921,1927 ****
  		     ;; move to the beginning of that;
  		     ;; possibly a different line
  		     (progn
! 		       (if (eq (preceding-char) ?\))
  			   (forward-sexp -1))
  		       ;; In the case it starts a subroutine, indent with
  		       ;; respect to `sub', not with respect to the the
--- 1921,1927 ----
  		     ;; move to the beginning of that;
  		     ;; possibly a different line
  		     (progn
! 		       (if (eq (char-before (point)) ?\))
  			   (forward-sexp -1))
  		       ;; In the case it starts a subroutine, indent with
  		       ;; respect to `sub', not with respect to the the
***************
*** 1929,1935 ****
  		       ;; anonymous sub in a hash.
  		       ;;
  		       (skip-chars-backward " \t")
! 		       (if (and (eq (preceding-char) ?b)
  				(progn
  				  (forward-word -1)
  				  (looking-at "sub\\>"))
--- 1929,1935 ----
  		       ;; anonymous sub in a hash.
  		       ;;
  		       (skip-chars-backward " \t")
! 		       (if (and (eq (char-before (point)) ?b)
  				(progn
  				  (forward-word -1)
  				  (looking-at "sub\\>"))
***************
*** 1991,1999 ****
  	     ;;(skip-chars-backward " \t\f\n")
  	     (cond
  	      ((or (bobp)
! 		   (memq (preceding-char) (append ";}" nil)))
  	       (setq res (cons (list 'toplevel start) res)))
! 	      ((eq (preceding-char) ?\) )
  	       (setq res (cons (list 'toplevel-after-parenth start) res)))
  	      (t 
  	       (setq res (cons (list 'toplevel-continued start) res)))))
--- 1991,1999 ----
  	     ;;(skip-chars-backward " \t\f\n")
  	     (cond
  	      ((or (bobp)
! 		   (memq (char-before (point)) (append ";}" nil)))
  	       (setq res (cons (list 'toplevel start) res)))
! 	      ((eq (char-before (point)) ?\) )
  	       (setq res (cons (list 'toplevel-after-parenth start) res)))
  	      (t 
  	       (setq res (cons (list 'toplevel-continued start) res)))))
***************
*** 2028,2043 ****
  	     ;; Back up over label lines, since they don't
  	     ;; affect whether our line is a continuation.
  	     ;; Back up comma-delimited lines too ?????
! 	     (while (or (eq (preceding-char) ?\,)
  			(save-excursion (cperl-after-label)))
! 	       (if (eq (preceding-char) ?\,)
  		   ;; Will go to beginning of line, essentially
  		     ;; Will ignore embedded sexpr XXXX.
  		   (cperl-backward-to-start-of-continued-exp containing-sexp))
  	       (beginning-of-line)
  	       (cperl-backward-to-noncomment containing-sexp))
  	     ;; Now we get the answer.
! 	     (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\,
  		 ;; This line is continuation of preceding line's statement.
  		 (list (list 'statement-continued containing-sexp))
  	       ;; This line starts a new statement.
--- 2028,2043 ----
  	     ;; Back up over label lines, since they don't
  	     ;; affect whether our line is a continuation.
  	     ;; Back up comma-delimited lines too ?????
! 	     (while (or (eq (char-before (point)) ?\,)
  			(save-excursion (cperl-after-label)))
! 	       (if (eq (char-before (point)) ?\,)
  		   ;; Will go to beginning of line, essentially
  		     ;; Will ignore embedded sexpr XXXX.
  		   (cperl-backward-to-start-of-continued-exp containing-sexp))
  	       (beginning-of-line)
  	       (cperl-backward-to-noncomment containing-sexp))
  	     ;; Now we get the answer.
! 	     (if (not (memq (char-before (point)) (append ";}{" '(nil)))) ; Was ?\,
  		 ;; This line is continuation of preceding line's statement.
  		 (list (list 'statement-continued containing-sexp))
  	       ;; This line starts a new statement.
***************
*** 2057,2063 ****
  				       (looking-at
  					"#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]")))
  		      ;; Skip over comments and labels following openbrace.
! 		      (cond ((= (following-char) ?\#)
  			     ;;(forward-line 1)
  			     (end-of-line))
  			    ;; label:
--- 2057,2063 ----
  				       (looking-at
  					"#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]")))
  		      ;; Skip over comments and labels following openbrace.
! 		      (cond ((= (char-after (point)) ?\#)
  			     ;;(forward-line 1)
  			     (end-of-line))
  			    ;; label:
***************
*** 2099,2105 ****
  		   ;; move to the beginning of that;
  		   ;; possibly a different line
  		   (progn
! 		     (if (eq (preceding-char) ?\))
  			 (forward-sexp -1))
  		     ;; Get initial indentation of the line we are on.
  		     ;; If line starts with label, calculate label indentation
--- 2099,2105 ----
  		   ;; move to the beginning of that;
  		   ;; possibly a different line
  		   (progn
! 		     (if (eq (char-before (point)) ?\))
  			 (forward-sexp -1))
  		     ;; Get initial indentation of the line we are on.
  		     ;; If line starts with label, calculate label indentation
***************
*** 2122,2128 ****
        (beginning-of-line)
        (skip-chars-forward " \t")
        (setq end (point))
!       (and (= (following-char) ?#)
  	   (forward-line -1)
  	   (cperl-to-comment-or-eol)
  	   (setq end (point)))
--- 2122,2128 ----
        (beginning-of-line)
        (skip-chars-forward " \t")
        (setq end (point))
!       (and (= (char-after (point)) ?#)
  	   (forward-line -1)
  	   (cperl-to-comment-or-eol)
  	   (setq end (point)))
***************
*** 2136,2142 ****
    (let (state stop-in cpoint (lim (progn (end-of-line) (point))))
        (beginning-of-line)
        (if (re-search-forward "\\=[ \t]*\\(#\\|$\\)" lim t) 
! 	  (if (eq (preceding-char) ?\#) (progn (backward-char 1) t))
  	;; Else
  	(while (not stop-in)
  	  (setq state (parse-partial-sexp (point) lim nil nil nil t))
--- 2136,2142 ----
    (let (state stop-in cpoint (lim (progn (end-of-line) (point))))
        (beginning-of-line)
        (if (re-search-forward "\\=[ \t]*\\(#\\|$\\)" lim t) 
! 	  (if (eq (char-before (point)) ?\#) (progn (backward-char 1) t))
  	;; Else
  	(while (not stop-in)
  	  (setq state (parse-partial-sexp (point) lim nil nil nil t))
***************
*** 2491,2500 ****
  	  (progn
  	    (backward-char 1)
  	    (if test (eval test)
! 	      (memq (following-char) (append (or chars "{};") nil))))))))
  
  (defun cperl-backward-to-start-of-continued-exp (lim)
!   (if (memq (preceding-char) (append ")]}\"'`" nil))
        (forward-sexp -1))
    (beginning-of-line)
    (if (<= (point) lim)
--- 2491,2500 ----
  	  (progn
  	    (backward-char 1)
  	    (if test (eval test)
! 	      (memq (char-after (point)) (append (or chars "{};") nil))))))))
  
  (defun cperl-backward-to-start-of-continued-exp (lim)
!   (if (memq (char-before (point)) (append ")]}\"'`" nil))
        (forward-sexp -1))
    (beginning-of-line)
    (if (<= (point) lim)
***************
*** 2682,2688 ****
  	 fill-column)
    (let ((c (save-excursion (beginning-of-line)
  			   (cperl-to-comment-or-eol) (point)))
! 	(s (memq (following-char) '(?\ ?\t))) marker)
      (if (>= c (point)) nil
        (setq marker (point-marker))
        (cperl-fill-paragraph)
--- 2682,2688 ----
  	 fill-column)
    (let ((c (save-excursion (beginning-of-line)
  			   (cperl-to-comment-or-eol) (point)))
! 	(s (memq (char-after (point)) '(?\ ?\t))) marker)
      (if (>= c (point)) nil
        (setq marker (point-marker))
        (cperl-fill-paragraph)
***************
*** 2691,2701 ****
        (if (bolp) (progn (re-search-forward "#+[ \t]*") 
  			(goto-char (match-end 0))))
        ;; Following space could have gone:
!       (if (or (not s) (memq (following-char) '(?\ ?\t))) nil
  	(insert " ")
  	(backward-char 1))
        ;; Previous space could have gone:
!       (or (memq (preceding-char) '(?\ ?\t)) (insert " "))))))
  
  (defvar imenu-example--function-name-regexp-perl
        "^\\([ \t]*\\(sub\\|package\\)[ \t\n]+\\([a-zA-Z_0-9:']+\\)[ \t]*\\|=head\\([12]\\)[ \t]+\\([^\n]+\\)$\\)")
--- 2691,2701 ----
        (if (bolp) (progn (re-search-forward "#+[ \t]*") 
  			(goto-char (match-end 0))))
        ;; Following space could have gone:
!       (if (or (not s) (memq (char-after (point)) '(?\ ?\t))) nil
  	(insert " ")
  	(backward-char 1))
        ;; Previous space could have gone:
!       (or (memq (char-before (point)) '(?\ ?\t)) (insert " "))))))
  
  (defvar imenu-example--function-name-regexp-perl
        "^\\([ \t]*\\(sub\\|package\\)[ \t\n]+\\([a-zA-Z_0-9:']+\\)[ \t]*\\|=head\\([12]\\)[ \t]+\\([^\n]+\\)$\\)")
***************
*** 2740,2748 ****
  	 ((match-beginning 2)		; package or sub
  	  (save-excursion
  	    (goto-char (match-beginning 2))
! 	    (setq fchar (following-char))
  	    )
! 	  (setq char (following-char) meth nil)
  	  (setq p (point))
  	  (while (and ends-ranges (>= p (car ends-ranges)))
  	    ;; delete obsolete entries
--- 2740,2748 ----
  	 ((match-beginning 2)		; package or sub
  	  (save-excursion
  	    (goto-char (match-beginning 2))
! 	    (setq fchar (char-after (point)))
  	    )
! 	  (setq char (char-after (point)) meth nil)
  	  (setq p (point))
  	  (while (and ends-ranges (>= p (car ends-ranges)))
  	    ;; delete obsolete entries
***************
*** 3564,3570 ****
  	    (error "Cannot line up in a middle of the word"))
  	(if (looking-at "$")
  	    (error "Cannot line up end of line"))
! 	(setq search (regexp-quote (char-to-string (following-char)))))
        (setq step (or step cperl-lineup-step cperl-indent-level))
        (or minshift (setq minshift 1))
        (while (progn
--- 3564,3570 ----
  	    (error "Cannot line up in a middle of the word"))
  	(if (looking-at "$")
  	    (error "Cannot line up end of line"))
! 	(setq search (regexp-quote (char-to-string (char-after (point))))))
        (setq step (or step cperl-lineup-step cperl-indent-level))
        (or minshift (setq minshift 1))
        (while (progn
***************
*** 4089,4098 ****
        (if (or
  	   (looking-at cperl-not-bad-style-regexp)
  	   ;; Check for a < -b and friends
! 	   (and (eq (following-char) ?\-)
  		(save-excursion
  		  (skip-chars-backward " \t\n")
! 		  (memq (preceding-char) '(?\= ?\> ?\< ?\, ?\(, ?\[, ?\{))))
  	   ;; Now check for syntax type
  	   (save-match-data
  	     (setq found (point))
--- 4089,4098 ----
        (if (or
  	   (looking-at cperl-not-bad-style-regexp)
  	   ;; Check for a < -b and friends
! 	   (and (eq (char-after (point)) ?\-)
  		(save-excursion
  		  (skip-chars-backward " \t\n")
! 		  (memq (char-before (point)) '(?\= ?\> ?\< ?\, ?\(, ?\[, ?\{))))
  	   ;; Now check for syntax type
  	   (save-match-data
  	     (setq found (point))
***************
*** 4148,4183 ****
     ((looking-at "[a-zA-Z0-9_:]")	; symbol
      (skip-chars-backward "[a-zA-Z0-9_:]")
      (cond 
!      ((and (eq (preceding-char) ?^)	; $^I
  	   (eq (char-after (- (point) 2)) ?\$))
        (forward-char -2))
!      ((memq (preceding-char) (append "*$@%&\\" nil)) ; *glob
        (forward-char -1))
!      ((and (eq (preceding-char) ?\=)
  	   (eq (current-column) 1))
        (forward-char -1)))		; =head1
!     (if (and (eq (preceding-char) ?\<)
  	     (looking-at "\\$?[a-zA-Z0-9_:]+>")) ; <FH>
  	(forward-char -1)))
!    ((and (looking-at "=") (eq (preceding-char) ?x)) ; x=
      (forward-char -1))
!    ((and (looking-at "\\^") (eq (preceding-char) ?\$)) ; $^I
      (forward-char -1))
     ((looking-at "[-!&*+,-./<=>?\\\\^|~]")
      (skip-chars-backward "[-!&*+,-./<=>?\\\\^|~]")
      (cond
!      ((and (eq (preceding-char) ?\$)
  	   (not (eq (char-after (- (point) 2)) ?\$))) ; $-
        (forward-char -1))
!      ((and (eq (following-char) ?\>)
! 	   (string-match "[a-zA-Z0-9_]" (char-to-string (preceding-char)))
  	   (save-excursion
  	     (forward-sexp -1)
! 	     (and (eq (preceding-char) ?\<)
  		  (looking-at "\\$?[a-zA-Z0-9_:]+>")))) ; <FH>
        (search-backward "<"))))
!    ((and (eq (following-char) ?\$)
! 	 (eq (preceding-char) ?\<)
  	 (looking-at "\\$?[a-zA-Z0-9_:]+>")) ; <$fh>
      (forward-char -1)))
    (if (looking-at cperl-have-help-regexp)
--- 4148,4183 ----
     ((looking-at "[a-zA-Z0-9_:]")	; symbol
      (skip-chars-backward "[a-zA-Z0-9_:]")
      (cond 
!      ((and (eq (char-before (point)) ?^)	; $^I
  	   (eq (char-after (- (point) 2)) ?\$))
        (forward-char -2))
!      ((memq (char-before (point)) (append "*$@%&\\" nil)) ; *glob
        (forward-char -1))
!      ((and (eq (char-before (point)) ?\=)
  	   (eq (current-column) 1))
        (forward-char -1)))		; =head1
!     (if (and (eq (char-before (point)) ?\<)
  	     (looking-at "\\$?[a-zA-Z0-9_:]+>")) ; <FH>
  	(forward-char -1)))
!    ((and (looking-at "=") (eq (char-before (point)) ?x)) ; x=
      (forward-char -1))
!    ((and (looking-at "\\^") (eq (char-before (point)) ?\$)) ; $^I
      (forward-char -1))
     ((looking-at "[-!&*+,-./<=>?\\\\^|~]")
      (skip-chars-backward "[-!&*+,-./<=>?\\\\^|~]")
      (cond
!      ((and (eq (char-before (point)) ?\$)
  	   (not (eq (char-after (- (point) 2)) ?\$))) ; $-
        (forward-char -1))
!      ((and (eq (char-after (point)) ?\>)
! 	   (string-match "[a-zA-Z0-9_]" (char-to-string (char-before (point))))
  	   (save-excursion
  	     (forward-sexp -1)
! 	     (and (eq (char-before (point)) ?\<)
  		  (looking-at "\\$?[a-zA-Z0-9_:]+>")))) ; <FH>
        (search-backward "<"))))
!    ((and (eq (char-after (point)) ?\$)
! 	 (eq (char-before (point)) ?\<)
  	 (looking-at "\\$?[a-zA-Z0-9_:]+>")) ; <$fh>
      (forward-char -1)))
    (if (looking-at cperl-have-help-regexp)
*** f90.el.orig	Sun Jun 15 14:27:41 1997
--- f90.el	Sun Jun 15 14:34:25 1997
***************
*** 850,856 ****
  	(search-backward "!" bol)
  	(skip-chars-backward "!"))
        (skip-chars-backward " \t")
!       (= (preceding-char) ?&))))
  
  (defsubst f90-current-indentation ()
    "Return indentation of current line.
--- 850,856 ----
  	(search-backward "!" bol)
  	(skip-chars-backward "!"))
        (skip-chars-backward " \t")
!       (= (char-before (point)) ?&))))
  
  (defsubst f90-current-indentation ()
    "Return indentation of current line.
***************
*** 1454,1460 ****
    (let (pos (oldpos (point)))
      (end-of-line)
      (skip-chars-backward " \t")
!     (cond ((= (preceding-char) ?&)
  	   (delete-char -1)
  	   (setq pos (point))
  	   (forward-line 1)
--- 1454,1460 ----
    (let (pos (oldpos (point)))
      (end-of-line)
      (skip-chars-backward " \t")
!     (cond ((= (char-before (point)) ?&)
  	   (delete-char -1)
  	   (setq pos (point))
  	   (forward-line 1)
*** fortran.el.orig	Sun Jun 15 14:27:50 1997
--- fortran.el	Sun Jun 15 14:34:35 1997
***************
*** 1561,1567 ****
  		 (and (not (nth 3 parse-state))
  		      comment-start
  		      (equal comment-start
! 			     (char-to-string (preceding-char)))))
  		;; get around a bug in forward-line in versions <= 18.57
  		(if (or (> (forward-line 1) 0) (eobp))
  		    (setq not-done nil))
--- 1561,1567 ----
  		 (and (not (nth 3 parse-state))
  		      comment-start
  		      (equal comment-start
! 			     (char-to-string (char-before (point))))))
  		;; get around a bug in forward-line in versions <= 18.57
  		(if (or (> (forward-line 1) 0) (eobp))
  		    (setq not-done nil))
***************
*** 1573,1579 ****
  	      (cond ((= 5 (current-column)) (forward-char 1))
  		    ((and (< (current-column) 5)
  			  (equal fortran-continuation-string
! 				 (char-to-string (following-char)))
  			  (forward-char 1))))
  	      ;; find out parse-limit from here
  	      (setq end-of-line (save-excursion (end-of-line)(point)))
--- 1573,1579 ----
  	      (cond ((= 5 (current-column)) (forward-char 1))
  		    ((and (< (current-column) 5)
  			  (equal fortran-continuation-string
! 				 (char-to-string (char-after (point))))
  			  (forward-char 1))))
  	      ;; find out parse-limit from here
  	      (setq end-of-line (save-excursion (end-of-line)(point)))
*** icon.el.orig	Sun Jun 15 14:28:04 1997
--- icon.el	Sun Jun 15 14:34:45 1997
***************
*** 266,275 ****
  		  (setq indent (save-excursion
  				 (icon-backward-to-start-of-if)
  				 (current-indentation))))
! 		 ((or (= (following-char) ?})
  		      (looking-at "end\\b"))
  		  (setq indent (- indent icon-indent-level)))
! 		 ((= (following-char) ?{)
  		  (setq indent (+ indent icon-brace-offset))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
--- 266,275 ----
  		  (setq indent (save-excursion
  				 (icon-backward-to-start-of-if)
  				 (current-indentation))))
! 		 ((or (= (char-after (point)) ?})
  		      (looking-at "end\\b"))
  		  (setq indent (- indent icon-indent-level)))
! 		 ((= (char-after (point)) ?{)
  		  (setq indent (+ indent icon-brace-offset))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
***************
*** 335,341 ****
  		      (+ icon-continued-statement-offset (current-column)
  			 (if (save-excursion (goto-char indent-point)
  					     (skip-chars-forward " \t")
! 					     (eq (following-char) ?{))
  			     icon-continued-brace-offset 0)))
  		  ;; This line starts a new statement.
  		  ;; Position following last unclosed open.
--- 335,341 ----
  		      (+ icon-continued-statement-offset (current-column)
  			 (if (save-excursion (goto-char indent-point)
  					     (skip-chars-forward " \t")
! 					     (eq (char-after (point)) ?{))
  			     icon-continued-brace-offset 0)))
  		  ;; This line starts a new statement.
  		  ;; Position following last unclosed open.
***************
*** 386,392 ****
      ("static" . t) ("then") ("to" . t) ("until" . t) ("while" . t)))
  
  (defun icon-is-continuation-line ()
!   (let* ((ch (preceding-char))
  	 (ch-syntax (char-syntax ch)))
      (if (eq ch-syntax ?w)
  	(assoc (buffer-substring
--- 386,392 ----
      ("static" . t) ("then") ("to" . t) ("until" . t) ("while" . t)))
  
  (defun icon-is-continuation-line ()
!   (let* ((ch (char-before (point)))
  	 (ch-syntax (char-syntax ch)))
      (if (eq ch-syntax ?w)
  	(assoc (buffer-substring
***************
*** 407,420 ****
  	(setq stop t)))))
  
  (defun icon-backward-to-start-of-continued-exp (lim)
!   (if (memq (preceding-char) '(?\) ?\]))
        (forward-sexp -1))
    (beginning-of-line)
    (skip-chars-forward " \t")
    (cond
     ((<= (point) lim) (goto-char (1+ lim)))
     ((not (icon-is-continued-line)) 0)
!    ((and (eq (char-syntax (following-char)) ?w)
  	 (cdr
  	  (assoc (buffer-substring (point)
  				   (save-excursion (forward-word 1) (point)))
--- 407,420 ----
  	(setq stop t)))))
  
  (defun icon-backward-to-start-of-continued-exp (lim)
!   (if (memq (char-before (point)) '(?\) ?\]))
        (forward-sexp -1))
    (beginning-of-line)
    (skip-chars-forward " \t")
    (cond
     ((<= (point) lim) (goto-char (1+ lim)))
     ((not (icon-is-continued-line)) 0)
!    ((and (eq (char-syntax (char-after (point))) ?w)
  	 (cdr
  	  (assoc (buffer-substring (point)
  				   (save-excursion (forward-word 1) (point)))
***************
*** 533,539 ****
  		  ;; Find last non-comment character before this line
  		  (save-excursion
  		    (setq at-else (looking-at "else\\W"))
! 		    (setq at-brace (= (following-char) ?{))
  		    (icon-backward-to-noncomment opoint)
  		    (if (icon-is-continuation-line)
  			;; Preceding line did not end in comma or semi;
--- 533,539 ----
  		  ;; Find last non-comment character before this line
  		  (save-excursion
  		    (setq at-else (looking-at "else\\W"))
! 		    (setq at-brace (= (char-after (point)) ?{))
  		    (icon-backward-to-noncomment opoint)
  		    (if (icon-is-continuation-line)
  			;; Preceding line did not end in comma or semi;
***************
*** 558,567 ****
  		(setcar indent-stack
  			(setq this-indent val))))
  	    ;; Adjust line indentation according to its contents
! 	    (if (or (= (following-char) ?})
  		    (looking-at "end\\b"))
  		(setq this-indent (- this-indent icon-indent-level)))
! 	    (if (= (following-char) ?{)
  		(setq this-indent (+ this-indent icon-brace-offset)))
  	    ;; Put chosen indentation into effect.
  	    (or (= (current-column) this-indent)
--- 558,567 ----
  		(setcar indent-stack
  			(setq this-indent val))))
  	    ;; Adjust line indentation according to its contents
! 	    (if (or (= (char-after (point)) ?})
  		    (looking-at "end\\b"))
  		(setq this-indent (- this-indent icon-indent-level)))
! 	    (if (= (char-after (point)) ?{)
  		(setq this-indent (+ this-indent icon-brace-offset)))
  	    ;; Put chosen indentation into effect.
  	    (or (= (current-column) this-indent)
*** ksh-mode.el.orig	Sun Jun 15 14:28:19 1997
--- ksh-mode.el	Sun Jun 15 14:34:57 1997
***************
*** 1236,1242 ****
           (beg (unwind-protect
                    (save-excursion
                      (backward-sexp 1)
!                     (while (= (char-syntax (following-char)) ?\')
                        (forward-char 1))
                      (point))))
           (pattern (buffer-substring beg end))
--- 1236,1242 ----
           (beg (unwind-protect
                    (save-excursion
                      (backward-sexp 1)
!                     (while (= (char-syntax (char-after (point))) ?\')
                        (forward-char 1))
                      (point))))
           (pattern (buffer-substring beg end))
*** mail-abbrevs.el.orig	Sun Jun 15 14:28:33 1997
--- mail-abbrevs.el	Sun Jun 15 14:35:11 1997
***************
*** 205,211 ****
  		(t (insert-file-contents file)))
  	  ;; Don't lose if no final newline.
  	  (goto-char (point-max))
! 	  (or (eq (preceding-char) ?\n) (newline))
  	  (goto-char (point-min))
  	  ;; Delete comments from the file
  	  (while (search-forward "# " nil t)
--- 205,211 ----
  		(t (insert-file-contents file)))
  	  ;; Don't lose if no final newline.
  	  (goto-char (point-max))
! 	  (or (eq (char-before (point)) ?\n) (newline))
  	  (goto-char (point-min))
  	  ;; Delete comments from the file
  	  (while (search-forward "# " nil t)
***************
*** 216,222 ****
  	  ;; handle "\\\n" continuation lines
  	  (while (not (eobp))
  	    (end-of-line)
! 	    (if (= (preceding-char) ?\\)
  		(progn (delete-char -1) (delete-char 1) (insert ?\ ))
  	        (forward-char 1)))
  	  (goto-char (point-min))
--- 216,222 ----
  	  ;; handle "\\\n" continuation lines
  	  (while (not (eobp))
  	    (end-of-line)
! 	    (if (= (char-before (point)) ?\\)
  		(progn (delete-char -1) (delete-char 1) (insert ?\ ))
  	        (forward-char 1)))
  	  (goto-char (point-min))
***************
*** 591,597 ****
  when at end of line."
    (interactive)
    (if (and (looking-at "[ \t]*\n")
! 	   (= (char-syntax (preceding-char)) ?w))
        (expand-abbrev))
    (setq this-command 'next-line)
    (call-interactively 'next-line))
--- 591,597 ----
  when at end of line."
    (interactive)
    (if (and (looking-at "[ \t]*\n")
! 	   (= (char-syntax (char-before (point))) ?w))
        (expand-abbrev))
    (setq this-command 'next-line)
    (call-interactively 'next-line))
***************
*** 601,607 ****
  abbrevs when at end of buffer."
    (interactive)
    (if (and (looking-at "[ \t]*\n")
! 	   (= (char-syntax (preceding-char)) ?w))
        (expand-abbrev))
    (setq this-command 'end-of-buffer)
    (call-interactively 'end-of-buffer))
--- 601,607 ----
  abbrevs when at end of buffer."
    (interactive)
    (if (and (looking-at "[ \t]*\n")
! 	   (= (char-syntax (char-before (point))) ?w))
        (expand-abbrev))
    (setq this-command 'end-of-buffer)
    (call-interactively 'end-of-buffer))
*** make-mode.el.orig	Sun Jun 15 14:28:38 1997
--- make-mode.el	Sun Jun 15 14:35:19 1997
***************
*** 856,862 ****
  
      (save-excursion
        (goto-char beg)
!       (let ((pc (preceding-char)))
  	(cond
  	 ;; Beginning of line means anything.
  	 ((bolp)
--- 856,862 ----
  
      (save-excursion
        (goto-char beg)
!       (let ((pc (char-before (point))))
  	(cond
  	 ;; Beginning of line means anything.
  	 ((bolp)
***************
*** 873,879 ****
  		 (setq paren pc)
  		 (backward-char)
  		 (and (not (bolp))
! 		      (= (preceding-char) ?$))))
  	  (setq do-macros t)))))
  
      ;; Try completion.
--- 873,879 ----
  		 (setq paren pc)
  		 (backward-char)
  		 (and (not (bolp))
! 		      (= (char-before (point)) ?$))))
  	  (setq do-macros t)))))
  
      ;; Try completion.
*** outl-mouse.el.orig	Sun Jun 15 14:28:48 1997
--- outl-mouse.el	Sun Jun 15 14:35:30 1997
***************
*** 544,550 ****
  	     (beginning-of-line)
  	     (cond ((and (eq (extent-property x 'outline) 'down)
  			 ;; skip things we can't see
! 			 (not (eq (preceding-char) ?\^M)))
  		    (if (outline-more-to-hide)
  			;; reveal my twin
  			(annotation-reveal (annotation-data x))
--- 544,550 ----
  	     (beginning-of-line)
  	     (cond ((and (eq (extent-property x 'outline) 'down)
  			 ;; skip things we can't see
! 			 (not (eq (char-before (point)) ?\^M)))
  		    (if (outline-more-to-hide)
  			;; reveal my twin
  			(annotation-reveal (annotation-data x))
***************
*** 572,578 ****
  ;		  (save-excursion (outline-next-heading) 
  ;				  (if (eobp) nil (point)))))
    (if (save-excursion (outline-next-heading) 
! 		      (eq (preceding-char) ?\^M))
        (progn 
  	(save-excursion (show-children))
  	(outline-sync-visible-sub-headings))
--- 572,578 ----
  ;		  (save-excursion (outline-next-heading) 
  ;				  (if (eobp) nil (point)))))
    (if (save-excursion (outline-next-heading) 
! 		      (eq (char-before (point)) ?\^M))
        (progn 
  	(save-excursion (show-children))
  	(outline-sync-visible-sub-headings))
*** outline.el.orig	Sun Jun 15 14:28:55 1997
--- outline.el	Sun Jun 15 14:35:36 1997
***************
*** 349,355 ****
    (if (re-search-forward (concat "[\n\^M]\\(" outline-regexp "\\)")
  			 nil 'move)
        (goto-char (match-beginning 0)))
!   (if (memq (preceding-char) '(?\n ?\^M))
        (forward-char -1)))
  
  (defun outline-next-heading ()
--- 349,355 ----
    (if (re-search-forward (concat "[\n\^M]\\(" outline-regexp "\\)")
  			 nil 'move)
        (goto-char (match-beginning 0)))
!   (if (memq (char-before (point)) '(?\n ?\^M))
        (forward-char -1)))
  
  (defun outline-next-heading ()
***************
*** 495,501 ****
  	(pos (point)))
      (while (save-excursion
  	     (and (re-search-backward "[\n\r]" nil t)
! 		  (eq (following-char) ?\r)))
        (save-excursion
  	(beginning-of-line)
  	(if (eq last (point))
--- 495,501 ----
  	(pos (point)))
      (while (save-excursion
  	     (and (re-search-backward "[\n\r]" nil t)
! 		  (eq (char-after (point)) ?\r)))
        (save-excursion
  	(beginning-of-line)
  	(if (eq last (point))
***************
*** 522,532 ****
  		(or first (> (funcall outline-level) level)))
        (setq first nil)
        (outline-next-heading))
!     (if (memq (preceding-char) '(?\n ?\^M))
  	(progn
  	  ;; Go to end of line before heading
  	  (forward-char -1)
! 	  (if (memq (preceding-char) '(?\n ?\^M))
  	      ;; leave blank line before heading
  	      (forward-char -1))))))
  
--- 522,532 ----
  		(or first (> (funcall outline-level) level)))
        (setq first nil)
        (outline-next-heading))
!     (if (memq (char-before (point)) '(?\n ?\^M))
  	(progn
  	  ;; Go to end of line before heading
  	  (forward-char -1)
! 	  (if (memq (char-before (point)) '(?\n ?\^M))
  	      ;; leave blank line before heading
  	      (forward-char -1))))))
  
***************
*** 565,571 ****
  	    (save-excursion
  	      (outline-flag-region (save-excursion
  				     (forward-char -1)
! 				     (if (memq (preceding-char) '(?\n ?\^M))
  					 (forward-char -1))
  				     (point))
  				   (progn (outline-end-of-heading) (point))
--- 565,571 ----
  	    (save-excursion
  	      (outline-flag-region (save-excursion
  				     (forward-char -1)
! 				     (if (memq (char-before (point)) '(?\n ?\^M))
  					 (forward-char -1))
  				     (point))
  				   (progn (outline-end-of-heading) (point))
*** pascal.el.orig	Sun Jun 15 14:29:08 1997
--- pascal.el	Sun Jun 15 14:35:48 1997
***************
*** 454,460 ****
    ;; Do nothing if within a string or in a CPP directive.
    (if (or (pascal-within-string)
  	  (and (not (bolp))
! 	       (save-excursion (beginning-of-line) (eq (following-char) ?#))))
        (insert "\t")
      ;; If pascal-tab-always-indent, indent the beginning of the line.
      (if pascal-tab-always-indent
--- 454,460 ----
    ;; Do nothing if within a string or in a CPP directive.
    (if (or (pascal-within-string)
  	  (and (not (bolp))
! 	       (save-excursion (beginning-of-line) (eq (char-after (point)) ?#))))
        (insert "\t")
      ;; If pascal-tab-always-indent, indent the beginning of the line.
      (if pascal-tab-always-indent
***************
*** 831,837 ****
  			  (goto-char (scan-lists (point) -1 (car state)))
  			  (setq par (1+ (current-column))))
  			 ((save-excursion (beginning-of-line)
! 					  (eq (following-char) ?#))
  			  (throw 'nesting 'cpp)))
  		   ;; Loop until correct indent is found
  		   (while t
--- 831,837 ----
  			  (goto-char (scan-lists (point) -1 (car state)))
  			  (setq par (1+ (current-column))))
  			 ((save-excursion (beginning-of-line)
! 					  (eq (char-after (point)) ?#))
  			  (throw 'nesting 'cpp)))
  		   ;; Loop until correct indent is found
  		   (while t
***************
*** 893,899 ****
  			    (throw 'nesting 'block))
  			   (;--Found complete statement
  			    (save-excursion (forward-sexp 1)
! 					    (= (following-char) ?\;))
  			    (setq complete t))
  			   (;--No known statements
  			    (bobp)
--- 893,899 ----
  			    (throw 'nesting 'block))
  			   (;--Found complete statement
  			    (save-excursion (forward-sexp 1)
! 					    (= (char-after (point)) ?\;))
  			    (setq complete t))
  			   (;--No known statements
  			    (bobp)
***************
*** 958,964 ****
  	   (marker-position end) 'move)
  	  (forward-char -1))
        (indent-to (1+ ind))
!       (if (/= (following-char) ?:)
  	  ()
  	(forward-char 1)
  	(delete-horizontal-space)
--- 958,964 ----
  	   (marker-position end) 'move)
  	  (forward-char -1))
        (indent-to (1+ ind))
!       (if (/= (char-after (point)) ?:)
  	  ()
  	(forward-char 1)
  	(delete-horizontal-space)
*** perl-mode.el.orig	Sun Jun 15 14:29:13 1997
--- perl-mode.el	Sun Jun 15 14:35:54 1997
***************
*** 448,456 ****
  		 (skip-chars-forward " \t\f")
  		 (cond ((looking-at "\\(\\w\\|\\s_\\)+:")
  			(setq indent (max 1 (+ indent perl-label-offset))))
! 		       ((= (following-char) ?})
  			(setq indent (- indent perl-indent-level)))
! 		       ((= (following-char) ?{)
  			(setq indent (+ indent perl-brace-offset))))
  		 (- indent (current-column)))))
      (skip-chars-forward " \t\f")
--- 448,456 ----
  		 (skip-chars-forward " \t\f")
  		 (cond ((looking-at "\\(\\w\\|\\s_\\)+:")
  			(setq indent (max 1 (+ indent perl-label-offset))))
! 		       ((= (char-after (point)) ?})
  			(setq indent (- indent perl-indent-level)))
! 		       ((= (char-after (point)) ?{)
  			(setq indent (+ indent perl-brace-offset))))
  		 (- indent (current-column)))))
      (skip-chars-forward " \t\f")
***************
*** 487,498 ****
        (cond ((nth 3 state) state)	; In a quoted string?
  	    ((null containing-sexp)	; Line is at top level.
  	     (skip-chars-forward " \t\f")
! 	     (if (= (following-char) ?{)
  		 0   ; move to beginning of line if it starts a function body
  	       ;; indent a little if this is a continuation line
  	       (perl-backward-to-noncomment)
  	       (if (or (bobp)
! 		       (memq (preceding-char) '(?\; ?\})))
  		   0 perl-continued-statement-offset)))
  	    ((/= (char-after containing-sexp) ?{)
  	     ;; line is expression, not statement:
--- 487,498 ----
        (cond ((nth 3 state) state)	; In a quoted string?
  	    ((null containing-sexp)	; Line is at top level.
  	     (skip-chars-forward " \t\f")
! 	     (if (= (char-after (point)) ?{)
  		 0   ; move to beginning of line if it starts a function body
  	       ;; indent a little if this is a continuation line
  	       (perl-backward-to-noncomment)
  	       (if (or (bobp)
! 		       (memq (char-before (point)) '(?\; ?\})))
  		   0 perl-continued-statement-offset)))
  	    ((/= (char-after containing-sexp) ?{)
  	     ;; line is expression, not statement:
***************
*** 505,520 ****
  	     (perl-backward-to-noncomment)
  	     ;; Back up over label lines, since they don't
  	     ;; affect whether our line is a continuation.
! 	     (while (or (eq (preceding-char) ?\,)
! 			(and (eq (preceding-char) ?:)
  			     (memq (char-syntax (char-after (- (point) 2)))
  				   '(?w ?_))))
! 	       (if (eq (preceding-char) ?\,)
  		   (perl-backward-to-start-of-continued-exp containing-sexp)
  		 (beginning-of-line))
  	       (perl-backward-to-noncomment))
  	     ;; Now we get the answer.
! 	     (if (not (memq (preceding-char) '(?\; ?\} ?\{)))
  		 ;; This line is continuation of preceding line's statement;
  		 ;; indent  perl-continued-statement-offset  more than the
  		 ;; previous line of the statement.
--- 505,520 ----
  	     (perl-backward-to-noncomment)
  	     ;; Back up over label lines, since they don't
  	     ;; affect whether our line is a continuation.
! 	     (while (or (eq (char-before (point)) ?\,)
! 			(and (eq (char-before (point)) ?:)
  			     (memq (char-syntax (char-after (- (point) 2)))
  				   '(?w ?_))))
! 	       (if (eq (char-before (point)) ?\,)
  		   (perl-backward-to-start-of-continued-exp containing-sexp)
  		 (beginning-of-line))
  	       (perl-backward-to-noncomment))
  	     ;; Now we get the answer.
! 	     (if (not (memq (char-before (point)) '(?\; ?\} ?\{)))
  		 ;; This line is continuation of preceding line's statement;
  		 ;; indent  perl-continued-statement-offset  more than the
  		 ;; previous line of the statement.
***************
*** 572,578 ****
  		    ;; move to the beginning of that;
  		    ;; possibly a different line
  		    (progn
! 		      (if (eq (preceding-char) ?\))
  			  (forward-sexp -1))
  		      ;; Get initial indentation of the line we are on.
  		      (current-indentation))))))))))
--- 572,578 ----
  		    ;; move to the beginning of that;
  		    ;; possibly a different line
  		    (progn
! 		      (if (eq (char-before (point)) ?\))
  			  (forward-sexp -1))
  		      ;; Get initial indentation of the line we are on.
  		      (current-indentation))))))))))
***************
*** 593,599 ****
  		     (forward-char -1))))))
  
  (defun perl-backward-to-start-of-continued-exp (lim)
!   (if (= (preceding-char) ?\))
        (forward-sexp -1))
    (beginning-of-line)
    (if (<= (point) lim)
--- 593,599 ----
  		     (forward-char -1))))))
  
  (defun perl-backward-to-start-of-continued-exp (lim)
!   (if (= (char-before (point)) ?\))
        (forward-sexp -1))
    (beginning-of-line)
    (if (<= (point) lim)
*** picture.el.orig	Sun Jun 15 14:29:19 1997
--- picture.el	Sun Jun 15 14:36:13 1997
***************
*** 49,55 ****
      (if (< col column)
  	(indent-to column)
        (if (and (/= col column)
! 	       (= (preceding-char) ?\t))
  	  (let (indent-tabs-mode)
  	    (delete-char -1)
  	    (indent-to col)
--- 49,55 ----
      (if (< col column)
  	(indent-to column)
        (if (and (/= col column)
! 	       (= (char-before (point)) ?\t))
  	  (let (indent-tabs-mode)
  	    (delete-char -1)
  	    (indent-to col)
*** python-mode.el.orig	Sun Jun 15 14:29:27 1997
--- python-mode.el	Sun Jun 15 14:36:22 1997
***************
*** 1136,1142 ****
  		(goto-char (1+ open-bracket-pos)) ; just beyond bracket
  		;; is the first list item on the same line?
  		(skip-chars-forward " \t")
! 		(if (null (memq (following-char) '(?\n ?# ?\\)))
  					; yes, so line up with it
  		    (current-column)
  		  ;; first list item on another line, or doesn't exist yet
--- 1136,1142 ----
  		(goto-char (1+ open-bracket-pos)) ; just beyond bracket
  		;; is the first list item on the same line?
  		(skip-chars-forward " \t")
! 		(if (null (memq (char-after (point)) '(?\n ?# ?\\)))
  					; yes, so line up with it
  		    (current-column)
  		  ;; first list item on another line, or doesn't exist yet
***************
*** 1178,1184 ****
  			(setq searching nil) ; done searching in any case
  			(setq found
  			      (not (or
! 				    (eq (following-char) ?=)
  				    (memq (char-after (- (point) 2))
  					  '(?< ?> ?!)))))))))
  	      (if (or (not found)	; not an assignment
--- 1178,1184 ----
  			(setq searching nil) ; done searching in any case
  			(setq found
  			      (not (or
! 				    (eq (char-after (point)) ?=)
  				    (memq (char-after (- (point) 2))
  					  '(?< ?> ?!)))))))))
  	      (if (or (not found)	; not an assignment
***************
*** 1242,1248 ****
  				  nil 'move)
  	      (setq done (or (eq py-honor-comment-indentation t)
  			     (bobp)
! 			     (/= (following-char) ?#)
  			     (not (zerop (current-column)))))
  	      )))
  	;; if we landed inside a string, go to the beginning of that
--- 1242,1248 ----
  				  nil 'move)
  	      (setq done (or (eq py-honor-comment-indentation t)
  			     (bobp)
! 			     (/= (char-after (point)) ?#)
  			     (not (zerop (current-column)))))
  	      )))
  	;; if we landed inside a string, go to the beginning of that
***************
*** 1419,1425 ****
  	(setq ci (current-indentation))
  	;; figure out appropriate target column
  	(cond
! 	 ((or (eq (following-char) ?#)	; comment in column 1
  	      (looking-at "[ \t]*$"))	; entirely blank
  	  (setq target-column 0))
  	 ((py-continuation-line-p)	; shift relative to base line
--- 1419,1425 ----
  	(setq ci (current-indentation))
  	;; figure out appropriate target column
  	(cond
! 	 ((or (eq (char-after (point)) ?#)	; comment in column 1
  	      (looking-at "[ \t]*$"))	; entirely blank
  	  (setq target-column 0))
  	 ((py-continuation-line-p)	; shift relative to base line
*** reftex.el.orig	Sun Jun 15 14:30:04 1997
--- reftex.el	Sun Jun 15 14:36:48 1997
***************
*** 1822,1829 ****
          (progn
            ;; do we need to remove spaces?
            (if (string= "~" (substring form 0 1))
!               (while (or (= (preceding-char) ?\ )
!                          (= (preceding-char) ?\C-i))
                  (backward-delete-char 1)))
            ;; ok, insert the reference
            (insert (format form label label))
--- 1822,1829 ----
          (progn
            ;; do we need to remove spaces?
            (if (string= "~" (substring form 0 1))
!               (while (or (= (char-before (point)) ?\ )
!                          (= (char-before (point)) ?\C-i))
                  (backward-delete-char 1)))
            ;; ok, insert the reference
            (insert (format form label label))
***************
*** 2175,2181 ****
  (defun reftex-in-comment ()
    (save-excursion
      (skip-chars-backward "^%\n\r")
!     (= (preceding-char) ?%)))
  
  (defun reftex-short-context (env parse &optional bound)
    ;; Get about one line of useful context for the label definition at point.
--- 2175,2181 ----
  (defun reftex-in-comment ()
    (save-excursion
      (skip-chars-backward "^%\n\r")
!     (= (char-before (point)) ?%)))
  
  (defun reftex-short-context (env parse &optional bound)
    ;; Get about one line of useful context for the label definition at point.
***************
*** 2221,2228 ****
    ;; Return up to 100 chars from point
    ;; When point is just after a { or [, limit string to matching parenthesis
    (cond
!    ((or (= (preceding-char) ?\{)
!         (= (preceding-char) ?\[))
      ;; inside a list - get only the list, with modified syntax to be perfect
      (buffer-substring
       (point)
--- 2221,2228 ----
    ;; Return up to 100 chars from point
    ;; When point is just after a { or [, limit string to matching parenthesis
    (cond
!    ((or (= (char-before (point)) ?\{)
!         (= (char-before (point)) ?\[))
      ;; inside a list - get only the list, with modified syntax to be perfect
      (buffer-substring
       (point)
***************
*** 3028,3040 ****
          (while (re-search-forward "\\(\\w+\\)[ \t\n\r]*=[ \t\n\r]*" nil t)
            (setq key (reftex-no-props (downcase (match-string 1))))
            (cond
!            ((= (following-char) ?{)
              (forward-char 1)
              (setq start (point))
              (condition-case nil
                  (up-list 1)
                ('error nil)))
!            ((= (following-char) ?\")
              (forward-char 1)
              (setq start (point))
              (while (and (search-forward "\"" nil t)
--- 3028,3040 ----
          (while (re-search-forward "\\(\\w+\\)[ \t\n\r]*=[ \t\n\r]*" nil t)
            (setq key (reftex-no-props (downcase (match-string 1))))
            (cond
!            ((= (char-after (point)) ?{)
              (forward-char 1)
              (setq start (point))
              (condition-case nil
                  (up-list 1)
                ('error nil)))
!            ((= (char-after (point)) ?\")
              (forward-char 1)
              (setq start (point))
              (while (and (search-forward "\"" nil t)
***************
*** 3157,3169 ****
                  (not (listp arg)))
              (setq reftex-cite-format1
                    (concat
!                    (if (not (or (= (preceding-char) ?{)
!                                 (= (preceding-char) ?,)))
                         ","
                       "")
                     "KEY"
!                    (if (not (or (= (following-char) ?})
!                                 (= (following-char) ?,)))
                         ","
                       ""))))
             (t
--- 3157,3169 ----
                  (not (listp arg)))
              (setq reftex-cite-format1
                    (concat
!                    (if (not (or (= (char-before (point)) ?{)
!                                 (= (char-before (point)) ?,)))
                         ","
                       "")
                     "KEY"
!                    (if (not (or (= (char-after (point)) ?})
!                                 (= (char-after (point)) ?,)))
                         ","
                       ""))))
             (t
***************
*** 3527,3533 ****
      (if (and macro (eq last-command this-command))
  	(if (and (string= macro "cite")
  		 (skip-chars-forward "^}, \t\n\r")
! 		 (= (following-char) ?,))
  	    (setq key-start (1+ (point)))
  	  (setq macro nil)))
  
--- 3527,3533 ----
      (if (and macro (eq last-command this-command))
  	(if (and (string= macro "cite")
  		 (skip-chars-forward "^}, \t\n\r")
! 		 (= (char-after (point)) ?,))
  	    (setq key-start (1+ (point)))
  	  (setq macro nil)))
  
***************
*** 3609,3620 ****
                       (progn (up-list -1) t)
                     (error nil))
              ;; move back over any touching sexps
!             (while (or (= (preceding-char) ?\])
!                        (= (preceding-char) ?\}))
                (backward-sexp))
              (setq pos (point))
!             (if (and (or (= (following-char) ?\[)
!                          (= (following-char) ?\{))
                       (and (re-search-backward "\\(\\\\[a-zA-Z]+\\)" nil t)
                            (= (match-end 0) pos)))
                  (progn
--- 3609,3620 ----
                       (progn (up-list -1) t)
                     (error nil))
              ;; move back over any touching sexps
!             (while (or (= (char-before (point)) ?\])
!                        (= (char-before (point)) ?\}))
                (backward-sexp))
              (setq pos (point))
!             (if (and (or (= (char-after (point)) ?\[)
!                          (= (char-after (point)) ?\{))
                       (and (re-search-backward "\\(\\\\[a-zA-Z]+\\)" nil t)
                            (= (match-end 0) pos)))
                  (progn
*** rexx-mode.el.orig	Sun Jun 15 14:30:20 1997
--- rexx-mode.el	Sun Jun 15 14:37:12 1997
***************
*** 556,562 ****
      (save-excursion
        (beginning-of-line)
        (skip-chars-forward " \t")
!       (setq star-start (= (following-char) ?\*))
        (skip-chars-backward " \t\n")
        (setq end (point))
        (beginning-of-line)
--- 556,562 ----
      (save-excursion
        (beginning-of-line)
        (skip-chars-forward " \t")
!       (setq star-start (= (char-after (point)) ?\*))
        (skip-chars-backward " \t\n")
        (setq end (point))
        (beginning-of-line)
*** scribe.el.orig	Sun Jun 15 14:30:41 1997
--- scribe.el	Sun Jun 15 14:37:19 1997
***************
*** 152,158 ****
  backward."
    (let ((spos (point)) (epos (point)) (ccoun 0) noparens)
      (if (not (zerop count))
! 	(progn (if (= (char-syntax (preceding-char)) ?w)
  		   (forward-sexp (min -1 count)))
  	       (setq spos (point))
  	       (if (looking-at (concat "@\\w[" scribe-open-parentheses "]"))
--- 152,158 ----
  backward."
    (let ((spos (point)) (epos (point)) (ccoun 0) noparens)
      (if (not (zerop count))
! 	(progn (if (= (char-syntax (char-before (point))) ?w)
  		   (forward-sexp (min -1 count)))
  	       (setq spos (point))
  	       (if (looking-at (concat "@\\w[" scribe-open-parentheses "]"))
***************
*** 260,266 ****
      (let (lastfore lastback lastquote)
        (insert
         (cond
! 	((= (preceding-char) ?\\) ?\")
  	((bobp) "``")
  	(t
  	 (setq lastfore (save-excursion (and (search-backward
--- 260,266 ----
      (let (lastfore lastback lastquote)
        (insert
         (cond
! 	((= (char-before (point)) ?\\) ?\")
  	((bobp) "``")
  	(t
  	 (setq lastfore (save-excursion (and (search-backward
***************
*** 299,310 ****
  	(forward-char -1)
  	(setq point-save (point))
  	(skip-chars-backward (concat "^ \n\t\f" scribe-open-parentheses))
! 	(setq at-command (and (equal (following-char) ?@)
  			      (/= (point) (1- point-save)))))
        (if (and at-command
  	       (setq paren-char
  		     (string-match (regexp-quote
! 				    (char-to-string (preceding-char)))
  				   scribe-open-parentheses)))
  	  (save-excursion
  	    (insert (aref scribe-close-parentheses paren-char)))))))
--- 299,310 ----
  	(forward-char -1)
  	(setq point-save (point))
  	(skip-chars-backward (concat "^ \n\t\f" scribe-open-parentheses))
! 	(setq at-command (and (equal (char-after (point)) ?@)
  			      (/= (point) (1- point-save)))))
        (if (and at-command
  	       (setq paren-char
  		     (string-match (regexp-quote
! 				    (char-to-string (char-before (point))))
  				   scribe-open-parentheses)))
  	  (save-excursion
  	    (insert (aref scribe-close-parentheses paren-char)))))))
*** sendmail.el.orig	Sun Jun 15 14:30:49 1997
--- sendmail.el	Sun Jun 15 14:37:33 1997
***************
*** 590,596 ****
  	  (insert-buffer-substring mailbuf)
  	  (goto-char (point-max))
  	  ;; require one newline at the end.
! 	  (or (= (preceding-char) ?\n)
  	      (insert ?\n))
  	  ;; Change header-delimiter to be what sendmail expects.
  	  (goto-char (point-min))
--- 590,596 ----
  	  (insert-buffer-substring mailbuf)
  	  (goto-char (point-max))
  	  ;; require one newline at the end.
! 	  (or (= (char-before (point)) ?\n)
  	      (insert ?\n))
  	  ;; Change header-delimiter to be what sendmail expects.
  	  (goto-char (point-min))
*** sh-script.el.orig	Sun Jun 15 14:30:58 1997
--- sh-script.el	Sun Jun 15 14:37:39 1997
***************
*** 1008,1014 ****
  				  (forward-line -1)
  				  (back-to-indentation)
  				  (or (eolp)
! 				      (eq (following-char) ?#)))))
  		    (current-column)))
  	current)
      (save-excursion
--- 1008,1014 ----
  				  (forward-line -1)
  				  (back-to-indentation)
  				  (or (eolp)
! 				      (eq (char-after (point)) ?#)))))
  		    (current-column)))
  	current)
      (save-excursion
***************
*** 1444,1450 ****
        '(save-excursion
  	 (while (search-backward ":" v1 t)
  	   (replace-match " ARG] [+-" t t)))
!       (if (eq (preceding-char) ?-) -5)
        "] [--] ARGS...\"" \n
        "exit 2" \n
        < < "esac" \n
--- 1444,1450 ----
        '(save-excursion
  	 (while (search-backward ":" v1 t)
  	   (replace-match " ARG] [+-" t t)))
!       (if (eq (char-before (point)) ?-) -5)
        "] [--] ARGS...\"" \n
        "exit 2" \n
        < < "esac" \n
*** simula.el.orig	Sun Jun 15 14:31:07 1997
--- simula.el	Sun Jun 15 14:37:51 1997
***************
*** 311,317 ****
    ;; first, find out if this is a compiler directive line
    (if (save-excursion
  	(beginning-of-line)
! 	(eq (following-char) ?%))
        ;; YES - return 1
        1
      (save-excursion
--- 311,317 ----
    ;; first, find out if this is a compiler directive line
    (if (save-excursion
  	(beginning-of-line)
! 	(eq (char-after (point)) ?%))
        ;; YES - return 1
        1
      (save-excursion
***************
*** 330,353 ****
  		      (if (progn
  			    (beginning-of-line)
  			    ;; compiler directive line? If so, cont searching..
! 			    (eq (following-char) ?%))
  			  t
  			(while (< (point) saved-point)
  			  (skip-chars-forward "^;\"'")
  			  (forward-char 1)
  			  (cond
! 			   ((eq (preceding-char) ?\;)
  			    (setq saved-point (point)))
! 			   ((eq (preceding-char) ?\")
  			    (skip-chars-forward "^\";")
! 			    (if (eq (following-char) ?\;)
  				(setq saved-point (point) loopvalue t)
  			      (forward-char 1)))
  			   (t
! 			    (if (eq (following-char) ?')
  				(forward-char 1))
  			    (skip-chars-forward "^';")
! 			    (if (eq (following-char) ?\;)
  				(setq saved-point (point) loopvalue t)
  			      (forward-char 1)))))
  			loopvalue))
--- 330,353 ----
  		      (if (progn
  			    (beginning-of-line)
  			    ;; compiler directive line? If so, cont searching..
! 			    (eq (char-after (point)) ?%))
  			  t
  			(while (< (point) saved-point)
  			  (skip-chars-forward "^;\"'")
  			  (forward-char 1)
  			  (cond
! 			   ((eq (char-before (point)) ?\;)
  			    (setq saved-point (point)))
! 			   ((eq (char-before (point)) ?\")
  			    (skip-chars-forward "^\";")
! 			    (if (eq (char-after (point)) ?\;)
  				(setq saved-point (point) loopvalue t)
  			      (forward-char 1)))
  			   (t
! 			    (if (eq (char-after (point)) ?')
  				(forward-char 1))
  			    (skip-chars-forward "^';")
! 			    (if (eq (char-after (point)) ?\;)
  				(setq saved-point (point) loopvalue t)
  			      (forward-char 1)))))
  			loopvalue))
***************
*** 363,393 ****
  		(re-search-forward
  		 "\\<end\\>\\|!\\|\"\\|'\\|^%\\|\\<comment\\>" origin 'move))
  	  (cond
! 	   ((memq (preceding-char) '(?d ?D))
  	    (setq return-value 2)
! 	    (while (and (memq (preceding-char) '(?d ?D)) (not return-value))
  	      (while (and (re-search-forward
  			   ";\\|\\<end\\>\\|\\<else\\>\\|\\<otherwise\\>\\|\\<when\\>\\|^%"
  			   origin 'move)
! 			  (eq (preceding-char) ?%))
  		(beginning-of-line 2)))
  	    (if (looking-at "[ \t\n\f]*\\(;\\|\\<end\\>\\|\\<else\\>\\|\\<otherwise\\>\\|\\<when\\>\\)")
  		(setq return-value nil)))
! 	   ((memq (preceding-char) '(?! ?t ?T))
  	    ; skip comment
  	    (setq return-value 0)
  	    (skip-chars-forward "^%;" origin)
  	    (while (and return-value (< (point) origin))
! 	      (if (eq (following-char) ?\;)
  		  (setq return-value nil)
  		(if (bolp)
  		    (beginning-of-line 2)	; skip directive inside comment
  		  (forward-char 1))		; or single '%'
  		(skip-chars-forward "^%;" origin))))
! 	   ((eq (preceding-char) ?\")
  	    (if (not (search-forward "\"" origin 'move))
  		(setq return-value 3)))
! 	   ((eq (preceding-char) ?\')
  	    (if (or (eq (point) origin) (eobp))
  		(setq return-value 4)
  	      (forward-char 1)
--- 363,393 ----
  		(re-search-forward
  		 "\\<end\\>\\|!\\|\"\\|'\\|^%\\|\\<comment\\>" origin 'move))
  	  (cond
! 	   ((memq (char-before (point)) '(?d ?D))
  	    (setq return-value 2)
! 	    (while (and (memq (char-before (point)) '(?d ?D)) (not return-value))
  	      (while (and (re-search-forward
  			   ";\\|\\<end\\>\\|\\<else\\>\\|\\<otherwise\\>\\|\\<when\\>\\|^%"
  			   origin 'move)
! 			  (eq (char-before (point)) ?%))
  		(beginning-of-line 2)))
  	    (if (looking-at "[ \t\n\f]*\\(;\\|\\<end\\>\\|\\<else\\>\\|\\<otherwise\\>\\|\\<when\\>\\)")
  		(setq return-value nil)))
! 	   ((memq (char-before (point)) '(?! ?t ?T))
  	    ; skip comment
  	    (setq return-value 0)
  	    (skip-chars-forward "^%;" origin)
  	    (while (and return-value (< (point) origin))
! 	      (if (eq (char-after (point)) ?\;)
  		  (setq return-value nil)
  		(if (bolp)
  		    (beginning-of-line 2)	; skip directive inside comment
  		  (forward-char 1))		; or single '%'
  		(skip-chars-forward "^%;" origin))))
! 	   ((eq (char-before (point)) ?\")
  	    (if (not (search-forward "\"" origin 'move))
  		(setq return-value 3)))
! 	   ((eq (char-before (point)) ?\')
  	    (if (or (eq (point) origin) (eobp))
  		(setq return-value 4)
  	      (forward-char 1)
***************
*** 427,433 ****
  		 (or (memq next-char '(?\n ?\r))
  		     (and (eq next-char ?\t)
  			  simula-tab-always-indent)
! 		     (not (memq (following-char) '(?= ?-))))
  		 (not (simula-context))
  		 ;; label?
  		 (progn
--- 427,433 ----
  		 (or (memq next-char '(?\n ?\r))
  		     (and (eq next-char ?\t)
  			  simula-tab-always-indent)
! 		     (not (memq (char-after (point)) '(?= ?-))))
  		 (not (simula-context))
  		 ;; label?
  		 (progn
***************
*** 455,468 ****
  	    (while (> count 0)
  	      (re-search-backward "\\<begin\\>\\|\\<end\\>")
  	      (if (not (simula-context))
! 		  (setq count (if (memq (following-char) '(?b ?B))
  				  (1- count)
  				(1+ count)))))
  	  (while (< count 0)
  	    (re-search-forward "\\<begin\\>\\|\\<end\\>")
  	    (backward-word 1)
  	    (if (not (simula-context))
! 		(setq count (if (memq (following-char) '(?e ?E))
  				(1+ count)
  			      (1- count))))
  	    (backward-word -1)))
--- 455,468 ----
  	    (while (> count 0)
  	      (re-search-backward "\\<begin\\>\\|\\<end\\>")
  	      (if (not (simula-context))
! 		  (setq count (if (memq (char-after (point)) '(?b ?B))
  				  (1- count)
  				(1+ count)))))
  	  (while (< count 0)
  	    (re-search-forward "\\<begin\\>\\|\\<end\\>")
  	    (backward-word 1)
  	    (if (not (simula-context))
! 		(setq count (if (memq (char-after (point)) '(?e ?E))
  				(1+ count)
  			      (1- count))))
  	    (backward-word -1)))
***************
*** 489,495 ****
  	    (while (< count 0)
  	      (re-search-backward "\\<begin\\>\\|\\<end\\>")
  	      (if (not (simula-context))
! 		  (setq count (if (memq (following-char) '(?e ?E))
  				  (1+ count)
  				(1- count))))
  	      (if (< count start-count) (signal 'error nil)))
--- 489,495 ----
  	    (while (< count 0)
  	      (re-search-backward "\\<begin\\>\\|\\<end\\>")
  	      (if (not (simula-context))
! 		  (setq count (if (memq (char-after (point)) '(?e ?E))
  				  (1+ count)
  				(1- count))))
  	      (if (< count start-count) (signal 'error nil)))
***************
*** 497,503 ****
  	    (re-search-forward "\\<begin\\>\\|\\<end\\>")
  	    (backward-word 1)
  	    (if (not (simula-context))
! 		(setq count (if (memq (following-char) '(?b ?B))
  				(1- count)
  			      (1+ count))))
  	    (backward-word -1)
--- 497,503 ----
  	    (re-search-forward "\\<begin\\>\\|\\<end\\>")
  	    (backward-word 1)
  	    (if (not (simula-context))
! 		(setq count (if (memq (char-after (point)) '(?b ?B))
  				(1- count)
  			      (1+ count))))
  	    (backward-word -1)
***************
*** 524,542 ****
        (condition-case ()
  	  (progn
  	    (simula-skip-comment-backward)
! 	    (if (memq (preceding-char) '(?n ?N))
  		(progn
  		  (backward-word 1)
  		  (if (not (looking-at "\\<begin\\>"))
  		      (backward-word -1)))
! 	      (if (eq (preceding-char) ?\;)
  		  (backward-char 1)))
  	    (while (and (natnump (setq count (1- count)))
  			(setq status (simula-search-backward
  				      ";\\|\\<begin\\>" nil 'move))))
  	    (if status
  		(progn
! 		  (if (eq (following-char) ?\;)
  		      (forward-char 1)
  		    (backward-word -1))))
  	    (simula-skip-comment-forward))
--- 524,542 ----
        (condition-case ()
  	  (progn
  	    (simula-skip-comment-backward)
! 	    (if (memq (char-before (point)) '(?n ?N))
  		(progn
  		  (backward-word 1)
  		  (if (not (looking-at "\\<begin\\>"))
  		      (backward-word -1)))
! 	      (if (eq (char-before (point)) ?\;)
  		  (backward-char 1)))
  	    (while (and (natnump (setq count (1- count)))
  			(setq status (simula-search-backward
  				      ";\\|\\<begin\\>" nil 'move))))
  	    (if status
  		(progn
! 		  (if (eq (char-after (point)) ?\;)
  		      (forward-char 1)
  		    (backward-word -1))))
  	    (simula-skip-comment-forward))
***************
*** 561,567 ****
  	    (while (and (natnump (setq count (1- count)))
  			(setq status (simula-search-forward
  				      ";\\|\\<end\\>" (point-max) 'move))))
! 	    (if (and status (/= (preceding-char) ?\;))
  		(progn
  		  (backward-word 1)
  		  (simula-skip-comment-backward))))
--- 561,567 ----
  	    (while (and (natnump (setq count (1- count)))
  			(setq status (simula-search-forward
  				      ";\\|\\<end\\>" (point-max) 'move))))
! 	    (if (and status (/= (char-before (point)) ?\;))
  		(progn
  		  (backward-word 1)
  		  (simula-skip-comment-backward))))
***************
*** 577,583 ****
      (let (context)
        (while t
  	(skip-chars-backward " \t\n\f")
! 	(if (eq (preceding-char) ?\;)
  	    (save-excursion
  	      (backward-char 1)
  	      (setq context (simula-context)))
--- 577,583 ----
      (let (context)
        (while t
  	(skip-chars-backward " \t\n\f")
! 	(if (eq (char-before (point)) ?\;)
  	    (save-excursion
  	      (backward-char 1)
  	      (setq context (simula-context)))
***************
*** 585,592 ****
  	(cond
  	 ((memq context '(nil 3 4))
  	  ;; check to see if we found a label
! 	  (if (and (eq (preceding-char) ?:)
! 		   (not (memq (following-char) '(?- ?=)))
  		   (save-excursion
  		     (skip-chars-backward ": \t\fa-zA-Z0-9_")
  		     (not (looking-at "virtual\\>"))))
--- 585,592 ----
  	(cond
  	 ((memq context '(nil 3 4))
  	  ;; check to see if we found a label
! 	  (if (and (eq (char-before (point)) ?:)
! 		   (not (memq (char-after (point)) '(?- ?=)))
  		   (save-excursion
  		     (skip-chars-backward ": \t\fa-zA-Z0-9_")
  		     (not (looking-at "virtual\\>"))))
***************
*** 619,625 ****
        (cond
         ((looking-at "!\\|\\<comment\\>")
  	(search-forward ";" nil 'move))
!        ((and (bolp) (eq (following-char) ?%))
  	(beginning-of-line 2))
         ((and (looking-at "[a-z0-9_]*[ \t\f]*:[^-=]")
  	     (not (looking-at "virtual\\>")))
--- 619,625 ----
        (cond
         ((looking-at "!\\|\\<comment\\>")
  	(search-forward ";" nil 'move))
!        ((and (bolp) (eq (char-after (point)) ?%))
  	(beginning-of-line 2))
         ((and (looking-at "[a-z0-9_]*[ \t\f]*:[^-=]")
  	     (not (looking-at "virtual\\>")))
***************
*** 637,643 ****
      (while continue-loop
        (if (re-search-backward "\\<begin\\>\\|\\<end\\>" (point-min) 'move)
  	  (setq temp (simula-context)
! 	      return-value (and (memq (preceding-char) '(?d ?D))
  				(memq temp '(nil 2)))
  	      continue-loop (and (not return-value)
  				 (simula-forward-up-level)))
--- 637,643 ----
      (while continue-loop
        (if (re-search-backward "\\<begin\\>\\|\\<end\\>" (point-min) 'move)
  	  (setq temp (simula-context)
! 	      return-value (and (memq (char-before (point)) '(?d ?D))
  				(memq temp '(nil 2)))
  	      continue-loop (and (not return-value)
  				 (simula-forward-up-level)))
***************
*** 704,712 ****
  	 ((looking-at "if\\>\\|then\\>\\|else\\>")
  	  ;; search for the *starting* IF
  	  (cond
! 	   ((memq (following-char) '(?T ?t))
  	    (setq indent (car simula-if-indent)))
! 	   ((memq (following-char) '(?E ?e))
  	    (setq indent (cdr simula-if-indent)))
  	   (t
  	    (forward-word 1)
--- 704,712 ----
  	 ((looking-at "if\\>\\|then\\>\\|else\\>")
  	  ;; search for the *starting* IF
  	  (cond
! 	   ((memq (char-after (point)) '(?T ?t))
  	    (setq indent (car simula-if-indent)))
! 	   ((memq (char-after (point)) '(?E ?e))
  	    (setq indent (cdr simula-if-indent)))
  	   (t
  	    (forward-word 1)
***************
*** 717,723 ****
  	 ;;
  	 ((looking-at "when\\>\\|otherwise\\>")
  	  ;; search for corresponding INSPECT
! 	  (if (memq (following-char) '(?W ?w))
  	      (setq indent (car simula-inspect-indent))
  	    (setq indent (cdr simula-inspect-indent)))
  	  (simula-find-inspect))
--- 717,723 ----
  	 ;;
  	 ((looking-at "when\\>\\|otherwise\\>")
  	  ;; search for corresponding INSPECT
! 	  (if (memq (char-after (point)) '(?W ?w))
  	      (setq indent (car simula-inspect-indent))
  	    (setq indent (cdr simula-inspect-indent)))
  	  (simula-find-inspect))
***************
*** 730,737 ****
  	;; find line with non-comment text
  	(simula-skip-comment-backward)
  	(if (and found-end
! 		 (not (eq (preceding-char) ?\;))
! 		 (if (memq (preceding-char) '(?N ?n))
  		     (save-excursion
  		       (backward-word 1)
  		       (not (looking-at "begin\\>")))
--- 730,737 ----
  	;; find line with non-comment text
  	(simula-skip-comment-backward)
  	(if (and found-end
! 		 (not (eq (char-before (point)) ?\;))
! 		 (if (memq (char-before (point)) '(?N ?n))
  		     (save-excursion
  		       (backward-word 1)
  		       (not (looking-at "begin\\>")))
***************
*** 746,758 ****
  	      (save-excursion
  		(and (not (bobp))
  		     ;; (not found-end)
! 		     (if (eq (char-syntax (preceding-char)) ?w)
  			 (progn
  			   (backward-word 1)
  			   (not (looking-at
  				 "begin\\|then\\|else\\|when\\|otherwise\\|do"
  				 )))
! 		       (not (memq (preceding-char) '(?: ?\;)))))))
  	;;
  	;; MAIN calculation loop - count BEGIN/DO etc.
  	;;
--- 746,758 ----
  	      (save-excursion
  		(and (not (bobp))
  		     ;; (not found-end)
! 		     (if (eq (char-syntax (char-before (point))) ?w)
  			 (progn
  			   (backward-word 1)
  			   (not (looking-at
  				 "begin\\|then\\|else\\|when\\|otherwise\\|do"
  				 )))
! 		       (not (memq (char-before (point)) '(?: ?\;)))))))
  	;;
  	;; MAIN calculation loop - count BEGIN/DO etc.
  	;;
***************
*** 762,768 ****
  	       start-line 'move)
  	      (if (simula-context)
  		  ();; found something in a comment/string - ignore
! 		(setq temp (following-char))
  		(cond
  		 ((eq temp ?\;)
  		  (simula-previous-statement 1))
--- 762,768 ----
  	       start-line 'move)
  	      (if (simula-context)
  		  ();; found something in a comment/string - ignore
! 		(setq temp (char-after (point)))
  		(cond
  		 ((eq temp ?\;)
  		  (simula-previous-statement 1))
***************
*** 822,833 ****
  	    (simula-skip-comment-backward)
  	    (setq continued
  		  (and (not (bobp))
! 		       (if (eq (char-syntax (preceding-char)) ?w)
  			   (save-excursion
  			     (backward-word 1)
  			     (not (looking-at
  				   "begin\\|then\\|else\\|when\\|otherwise\\|do")))
! 			 (not (memq (preceding-char) '(?: ?\;))))))
  	    ;; if we the state of the continued-variable
  	    ;; changed, add indentation for continued statement
  	    (if (or (and prev-cont (not continued))
--- 822,833 ----
  	    (simula-skip-comment-backward)
  	    (setq continued
  		  (and (not (bobp))
! 		       (if (eq (char-syntax (char-before (point))) ?w)
  			   (save-excursion
  			     (backward-word 1)
  			     (not (looking-at
  				   "begin\\|then\\|else\\|when\\|otherwise\\|do")))
! 			 (not (memq (char-before (point)) '(?: ?\;))))))
  	    ;; if we the state of the continued-variable
  	    ;; changed, add indentation for continued statement
  	    (if (or (and prev-cont (not continued))
***************
*** 853,865 ****
    (catch 'simula-out
      (while t
        (if (and (simula-search-backward "\\<if\\>\\|;\\|\\<begin\\>"nil t)
! 	       (memq (following-char) '(?I ?i)))
  	  (save-excursion
  	    ;;
  	    ;; find out if this IF was really the start of the IF statement
  	    ;;
  	    (simula-skip-comment-backward)
! 	    (if (and (eq (char-syntax (preceding-char)) ?w)
  		     (progn
  		       (backward-word 1)
  		       (looking-at "else\\>")))
--- 853,865 ----
    (catch 'simula-out
      (while t
        (if (and (simula-search-backward "\\<if\\>\\|;\\|\\<begin\\>"nil t)
! 	       (memq (char-after (point)) '(?I ?i)))
  	  (save-excursion
  	    ;;
  	    ;; find out if this IF was really the start of the IF statement
  	    ;;
  	    (simula-skip-comment-backward)
! 	    (if (and (eq (char-syntax (char-before (point))) ?w)
  		     (progn
  		       (backward-word 1)
  		       (looking-at "else\\>")))
***************
*** 883,890 ****
        (while t
  	(if (and (simula-search-backward "\\<inspect\\>\\|\\<otherwise\\>\\|;"
  					  nil t)
! 		 (/= (following-char) ?\;))
! 	    (if (memq (following-char) '(?O ?o))
  		(setq level (1+ level))
  	      (if (zerop level)
  		  (throw 'simula-out t)
--- 883,890 ----
        (while t
  	(if (and (simula-search-backward "\\<inspect\\>\\|\\<otherwise\\>\\|;"
  					  nil t)
! 		 (/= (char-after (point)) ?\;))
! 	    (if (memq (char-after (point)) '(?O ?o))
  		(setq level (1+ level))
  	      (if (zerop level)
  		  (throw 'simula-out t)
***************
*** 914,924 ****
  	      (if (eq (simula-context) nil)
  		  ;; found something - check it out
  		  (cond
! 		   ((eq (following-char) ?\;)
  		    (if (zerop parlevel)
  			(throw 'simula-out nil)
  		      (error "Parenthesis mismatch or misplaced ';'")))
! 		   ((eq (following-char) ?\()
  		    (if (zerop parlevel)
  			(throw 'simula-out (1+ (current-column)))
  		      (setq parlevel (1- parlevel))))
--- 914,924 ----
  	      (if (eq (simula-context) nil)
  		  ;; found something - check it out
  		  (cond
! 		   ((eq (char-after (point)) ?\;)
  		    (if (zerop parlevel)
  			(throw 'simula-out nil)
  		      (error "Parenthesis mismatch or misplaced ';'")))
! 		   ((eq (char-after (point)) ?\()
  		    (if (zerop parlevel)
  			(throw 'simula-out (1+ (current-column)))
  		      (setq parlevel (1- parlevel))))
***************
*** 969,975 ****
      (if (let ((where (simula-context))
  	      (case-fold-search t))
  	  (if where
! 	      (if (and (eq where 2) (eq (char-syntax (preceding-char)) ?w))
  		  (save-excursion
  		    (backward-word 1)
  		    (not (looking-at "end\\>"))))))
--- 969,975 ----
      (if (let ((where (simula-context))
  	      (case-fold-search t))
  	  (if where
! 	      (if (and (eq where 2) (eq (char-syntax (char-before (point))) ?w))
  		  (save-excursion
  		    (backward-word 1)
  		    (not (looking-at "end\\>"))))))
***************
*** 985,991 ****
  	(condition-case nil
  	    (progn
  	      ;; check if the expanded word is on the beginning of the line.
! 	      (if (and (eq (char-syntax (preceding-char)) ?w)
  		       (progn
  			 (backward-word 1)
  			 (if (looking-at "end\\>")
--- 985,991 ----
  	(condition-case nil
  	    (progn
  	      ;; check if the expanded word is on the beginning of the line.
! 	      (if (and (eq (char-syntax (char-before (point))) ?w)
  		       (progn
  			 (backward-word 1)
  			 (if (looking-at "end\\>")
***************
*** 1028,1034 ****
                    (re-search-backward "\\<begin\\>\\|\\<end\\>")
                    (if (simula-context)
                        ()
!                     (setq level (if (memq (following-char) '(?b ?B))
                                      (1- level)
                                    (1+ level))))))
              (throw 'simula-out t)))))))
--- 1028,1034 ----
                    (re-search-backward "\\<begin\\>\\|\\<end\\>")
                    (if (simula-context)
                        ()
!                     (setq level (if (memq (char-after (point)) '(?b ?B))
                                      (1- level)
                                    (1+ level))))))
              (throw 'simula-out t)))))))
***************
*** 1050,1056 ****
  		  (re-search-forward "\\<begin\\>\\|\\<end\\>")
  		  (backward-word 1)
  		  (if (not (simula-context))
! 		      (setq level (if (memq (following-char) '(?e ?E))
  				      (1- level)
  				    (1+ level))))
  		  (backward-word -1)))
--- 1050,1056 ----
  		  (re-search-forward "\\<begin\\>\\|\\<end\\>")
  		  (backward-word 1)
  		  (if (not (simula-context))
! 		      (setq level (if (memq (char-after (point)) '(?e ?E))
  				      (1- level)
  				    (1+ level))))
  		  (backward-word -1)))
*** tcl.el.orig	Sun Jun 15 14:31:22 1997
--- tcl.el	Sun Jun 15 14:38:01 1997
***************
*** 1196,1204 ****
  	  (t
  	   (skip-chars-forward " \t")
  	   (if (listp indent) (setq indent (car indent)))
! 	   (cond ((= (following-char) ?})
  		  (setq indent (- indent tcl-indent-level)))
! 		 ((= (following-char) ?\])
  		  (setq indent (- indent 1))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
--- 1196,1204 ----
  	  (t
  	   (skip-chars-forward " \t")
  	   (if (listp indent) (setq indent (car indent)))
! 	   (cond ((= (char-after (point)) ?})
  		  (setq indent (- indent tcl-indent-level)))
! 		 ((= (char-after (point)) ?\])
  		  (setq indent (- indent 1))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
***************
*** 1270,1276 ****
  	      (if (bobp)
  		  nil
  		(backward-char)
! 		(= ?\\ (preceding-char)))))
  	   (continued-indent-value (if continued-line
  				       tcl-continued-indent-level
  				     0))
--- 1270,1276 ----
  	      (if (bobp)
  		  nil
  		(backward-char)
! 		(= ?\\ (char-before (point))))))
  	   (continued-indent-value (if continued-line
  				       tcl-continued-indent-level
  				     0))
***************
*** 1422,1428 ****
  	  (setq continued-line 
  		(save-excursion
  		  (backward-char)
! 		  (= (preceding-char) ?\\)))
  	  (skip-chars-forward " \t")
  	  (if (eolp)
  	      nil
--- 1422,1428 ----
  	  (setq continued-line 
  		(save-excursion
  		  (backward-char)
! 		  (= (char-before (point)) ?\\)))
  	  (skip-chars-forward " \t")
  	  (if (eolp)
  	      nil
***************
*** 1439,1447 ****
  			(setq this-indent val))
  		(setq continued-line nil)))
  	    (cond ((not (numberp this-indent)))
! 		  ((= (following-char) ?})
  		   (setq this-indent (- this-indent tcl-indent-level)))
! 		  ((= (following-char) ?\])
  		   (setq this-indent (- this-indent 1))))
  	    ;; Put chosen indentation into effect.
  	    (or (null this-indent)
--- 1439,1447 ----
  			(setq this-indent val))
  		(setq continued-line nil)))
  	    (cond ((not (numberp this-indent)))
! 		  ((= (char-after (point)) ?})
  		   (setq this-indent (- this-indent tcl-indent-level)))
! 		  ((= (char-after (point)) ?\])
  		   (setq this-indent (- this-indent 1))))
  	    ;; Put chosen indentation into effect.
  	    (or (null this-indent)
***************
*** 1676,1684 ****
        (backward-char)
        ;; Note -- continued comments are not supported here.  I
        ;; consider those to be a wart on the language.
!       (not (eq ?\\ (preceding-char))))
       (t
!       (memq (preceding-char) '(?\; ?{ ?\[))))))
  
  ;; FIXME doesn't actually return t.  See last case.
  (defun tcl-real-comment-p ()
--- 1676,1684 ----
        (backward-char)
        ;; Note -- continued comments are not supported here.  I
        ;; consider those to be a wart on the language.
!       (not (eq ?\\ (char-before (point)))))
       (t
!       (memq (char-before (point)) '(?\; ?{ ?\[))))))
  
  ;; FIXME doesn't actually return t.  See last case.
  (defun tcl-real-comment-p ()
***************
*** 2083,2089 ****
  	    (if (car result)
  		(beginning-of-line 2)
  	      (backward-char)
! 	      (if (eq ?# (following-char))
  		  (insert "\\"))
  	      (forward-char))
  	    (setq state (cdr result))))
--- 2083,2089 ----
  	    (if (car result)
  		(beginning-of-line 2)
  	      (backward-char)
! 	      (if (eq ?# (char-after (point)))
  		  (insert "\\"))
  	      (forward-char))
  	    (setq state (cdr result))))
***************
*** 2095,2101 ****
  	  ;; work.  So we just quote # if it isn't already quoted.
  	  ;; Bogus, but it works.
  	  (backward-char)
! 	  (if (not (eq ?\\ (preceding-char)))
  	      (insert "\\"))
  	  (forward-char))))))
  
--- 2095,2101 ----
  	  ;; work.  So we just quote # if it isn't already quoted.
  	  ;; Bogus, but it works.
  	  (backward-char)
! 	  (if (not (eq ?\\ (char-before (point))))
  	      (insert "\\"))
  	  (forward-char))))))
  
*** tex-mode.el.orig	Sun Jun 15 14:31:37 1997
--- tex-mode.el	Sun Jun 15 14:38:15 1997
***************
*** 482,488 ****
  		  (forward-char -1)
  		  (looking-at "\\s(\\|\\s \\|\\s>")))
  	    tex-open-quote)
! 	   ((= (preceding-char) ?\\)
  	    ?\")
  	   (t
  	    tex-close-quote)))))
--- 482,488 ----
  		  (forward-char -1)
  		  (looking-at "\\s(\\|\\s \\|\\s>")))
  	    tex-open-quote)
! 	   ((= (char-before (point)) ?\\)
  	    ?\")
  	   (t
  	    tex-close-quote)))))
*** verilog-mode.el.orig	Sun Jun 15 14:31:47 1997
--- verilog-mode.el	Sun Jun 15 14:38:22 1997
***************
*** 808,819 ****
  	(verilog-re-search-forward "\\<endprimitive\\>" nil 'move))
         (t 
  	(goto-char st)
! 	(if (= (following-char) ?\) )
  	    (forward-char 1)
  	  (forward-sexp 1)))))
       (t
        (goto-char st)
!       (if (= (following-char) ?\) )
  	  (forward-char 1)
  	(forward-sexp 1)))
       ) ;; cond
--- 808,819 ----
  	(verilog-re-search-forward "\\<endprimitive\\>" nil 'move))
         (t 
  	(goto-char st)
! 	(if (= (char-after (point)) ?\) )
  	    (forward-char 1)
  	  (forward-sexp 1)))))
       (t
        (goto-char st)
!       (if (= (char-after (point)) ?\) )
  	  (forward-char 1)
  	(forward-sexp 1)))
       ) ;; cond
***************
*** 1272,1278 ****
  	   (and
  	    (not (looking-at verilog-complete-reg))
  	    (verilog-backward-syntactic-ws)
! 	    (not (or (bolp) (= (preceding-char) ?\;)))
  	    )
  	   )
      (skip-chars-backward " \t")
--- 1272,1278 ----
  	   (and
  	    (not (looking-at verilog-complete-reg))
  	    (verilog-backward-syntactic-ws)
! 	    (not (or (bolp) (= (char-before (point)) ?\;)))
  	    )
  	   )
      (skip-chars-backward " \t")
***************
*** 1298,1310 ****
  		(setq pt (point))
  		(verilog-backward-syntactic-ws)
  		(not (bolp))
! 		(not (= (preceding-char) ?\;)))
        )
      (goto-char pt)
      (while (progn
  	     (setq pt (point))
  	     (and (not (looking-at verilog-complete-reg))
! 		  (not (= (preceding-char) ?\;))
  		  (verilog-continued-line))))
      (goto-char pt)
      (verilog-forward-syntactic-ws)
--- 1298,1310 ----
  		(setq pt (point))
  		(verilog-backward-syntactic-ws)
  		(not (bolp))
! 		(not (= (char-before (point)) ?\;)))
        )
      (goto-char pt)
      (while (progn
  	     (setq pt (point))
  	     (and (not (looking-at verilog-complete-reg))
! 		  (not (= (char-before (point)) ?\;))
  		  (verilog-continued-line))))
      (goto-char pt)
      (verilog-forward-syntactic-ws)
***************
*** 1353,1359 ****
  	 (progn (verilog-forward-syntactic-ws)	
  		(looking-at "\\<begin\\>"))
  	 (progn (verilog-backward-syntactic-ws)	
! 		(= (preceding-char) ?\:)))
  	(catch 'found
  	  (let ((nest 1))
  	    (while t
--- 1353,1359 ----
  	 (progn (verilog-forward-syntactic-ws)	
  		(looking-at "\\<begin\\>"))
  	 (progn (verilog-backward-syntactic-ws)	
! 		(= (char-before (point)) ?\:)))
  	(catch 'found
  	  (let ((nest 1))
  	    (while t
***************
*** 2158,2167 ****
     ((bolp)
      nil)
     (;-- Anything ending in a ; is complete
!     (= (preceding-char) ?\;)
      nil)
     (;-- Could be 'case (foo)' or 'always @(bar)' which is complete
!     (= (preceding-char) ?\))
      (progn
        (backward-char)
        (backward-up-list 1)
--- 2158,2167 ----
     ((bolp)
      nil)
     (;-- Anything ending in a ; is complete
!     (= (char-before (point)) ?\;)
      nil)
     (;-- Could be 'case (foo)' or 'always @(bar)' which is complete
!     (= (char-before (point)) ?\))
      (progn
        (backward-char)
        (backward-up-list 1)
***************
*** 2183,2189 ****
  	  ((back (point)))
  	(verilog-backward-syntactic-ws)
  	(cond
! 	 ((= (preceding-char) ?\:)
  	  (backward-char)
  	  (verilog-backward-syntactic-ws)
  	  (backward-sexp)
--- 2183,2189 ----
  	  ((back (point)))
  	(verilog-backward-syntactic-ws)
  	(cond
! 	 ((= (char-before (point)) ?\:)
  	  (backward-char)
  	  (verilog-backward-syntactic-ws)
  	  (backward-sexp)
***************
*** 2191,2200 ****
  	      nil
  	    t)
  	  )
! 	 ((= (preceding-char) ?\#)
  	  (backward-char)
  	  t)
! 	 ((= (preceding-char) ?\`)
  	  (backward-char)
  	  t)
  	 
--- 2191,2200 ----
  	      nil
  	    t)
  	  )
! 	 ((= (char-before (point)) ?\#)
  	  (backward-char)
  	  t)
! 	 ((= (char-before (point)) ?\`)
  	  (backward-char)
  	  t)
  	 
***************
*** 2449,2455 ****
        (let ((here (point)))
  	(verilog-backward-syntactic-ws)
  	(cond
! 	 ((= (preceding-char) ?\,)
  	  (let* ( fst
  		  (column 
  		   (save-excursion
--- 2449,2455 ----
        (let ((here (point)))
  	(verilog-backward-syntactic-ws)
  	(cond
! 	 ((= (char-before (point)) ?\,)
  	  (let* ( fst
  		  (column 
  		   (save-excursion
***************
*** 2460,2466 ****
  			 (progn ;; we have multiple words
  			   (goto-char (match-end 0))
  			   (skip-chars-forward " \t")
! 			   (if (= (following-char) ?\[)
  			       (progn
  				 (forward-char 1)
  				 (backward-up-list -1)
--- 2460,2466 ----
  			 (progn ;; we have multiple words
  			   (goto-char (match-end 0))
  			   (skip-chars-forward " \t")
! 			   (if (= (char-after (point)) ?\[)
  			       (progn
  				 (forward-char 1)
  				 (backward-up-list -1)
***************
*** 2480,2486 ****
  	    (delete-horizontal-space)
  	    (indent-to  column))
  	  )
! 	 ((= (preceding-char) ?\) )
  	  (goto-char here)
  	  (indent-to (eval (cdr (assoc type verilog-indent-alist))))
  	  )
--- 2480,2486 ----
  	    (delete-horizontal-space)
  	    (indent-to  column))
  	  )
! 	 ((= (char-before (point)) ?\) )
  	  (goto-char here)
  	  (indent-to (eval (cdr (assoc type verilog-indent-alist))))
  	  )
*** vhdl-mode.el.orig	Sun Jun 15 14:32:03 1997
--- vhdl-mode.el	Sun Jun 15 14:38:33 1997
***************
*** 251,257 ****
  (defvar vhdl-mode-menu
    '(["Comment Out Region"     comment-region (mark)]
      ;; ["Indent Expression"      vhdl-indent-exp
!     ;; (memq (following-char) '(?\( ?\[ ?\{))]
      ["Indent Line"            vhdl-indent-command t]
      ["Backward Statement"     vhdl-beginning-of-statement t]
      ;; ["Forward Statement"      vhdl-end-of-statement t]
--- 251,257 ----
  (defvar vhdl-mode-menu
    '(["Comment Out Region"     comment-region (mark)]
      ;; ["Indent Expression"      vhdl-indent-exp
!     ;; (memq (char-after (point)) '(?\( ?\[ ?\{))]
      ["Indent Line"            vhdl-indent-command t]
      ["Backward Statement"     vhdl-beginning-of-statement t]
      ;; ["Forward Statement"      vhdl-end-of-statement t]
***************
*** 976,982 ****
         ((eq (vhdl-in-literal lim) 'comment)
  	(skip-chars-backward "^-" lim)
  	(skip-chars-backward "-" lim)
! 	(while (not (or (and (= (following-char) ?-)
  			     (= (char-after (1+ (point))) ?-))
  			(<= (point) lim)))
  	  (skip-chars-backward "^-" lim)
--- 976,982 ----
         ((eq (vhdl-in-literal lim) 'comment)
  	(skip-chars-backward "^-" lim)
  	(skip-chars-backward "-" lim)
! 	(while (not (or (and (= (char-after (point)) ?-)
  			     (= (char-after (1+ (point))) ?-))
  			(<= (point) lim)))
  	  (skip-chars-backward "^-" lim)
***************
*** 1084,1094 ****
  			 (re-search-backward
  			  ";\\|\\b\\(architecture\\|case\\|configuration\\|entity\\|package\\|procedure\\|return\\|is\\|begin\\|process\\|block\\)\\b[^_]"
  			  lim 'move))
! 	       (if (or (= (preceding-char) ?_)
  		       (vhdl-in-literal lim))
  		   (backward-char)
  		 (setq foundp t))))
! 	   (and (/= (following-char) ?\;)
  		(not (looking-at "is\\|begin\\|process\\|block")))))
      t)
     ;; "begin", "then":
--- 1084,1094 ----
  			 (re-search-backward
  			  ";\\|\\b\\(architecture\\|case\\|configuration\\|entity\\|package\\|procedure\\|return\\|is\\|begin\\|process\\|block\\)\\b[^_]"
  			  lim 'move))
! 	       (if (or (= (char-before (point)) ?_)
  		       (vhdl-in-literal lim))
  		   (backward-char)
  		 (setq foundp t))))
! 	   (and (/= (char-after (point)) ?\;)
  		(not (looking-at "is\\|begin\\|process\\|block")))))
      t)
     ;; "begin", "then":
***************
*** 1100,1106 ****
  	 ;; conditional signal assignment.
  	 (save-excursion
  	   (re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
! 	   (or (eq (following-char) ?\;)
  	       (eq (point) lim))))
      t)
     ;; "block", "component", "generate", "loop", "process",
--- 1100,1106 ----
  	 ;; conditional signal assignment.
  	 (save-excursion
  	   (re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
! 	   (or (eq (char-after (point)) ?\;)
  	       (eq (point) lim))))
      t)
     ;; "block", "component", "generate", "loop", "process",
***************
*** 1138,1144 ****
  of an identifier that just happens to contain a \"begin\" keyword."
    (save-excursion
      (and (looking-at vhdl-begin-fwd-re)
! 	 (/= (preceding-char) ?_)
  	 (not (vhdl-in-literal lim))
  	 (vhdl-begin-p lim)
  	 (cond
--- 1138,1144 ----
  of an identifier that just happens to contain a \"begin\" keyword."
    (save-excursion
      (and (looking-at vhdl-begin-fwd-re)
! 	 (/= (char-before (point)) ?_)
  	 (not (vhdl-in-literal lim))
  	 (vhdl-begin-p lim)
  	 (cond
***************
*** 1198,1204 ****
        ;; assignment.
        (save-excursion
  	(re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
! 	(or (eq (following-char) ?\;)
  	    (eq (point) lim)))))
  
  (defun vhdl-corresponding-begin (&optional lim)
--- 1198,1204 ----
        ;; assignment.
        (save-excursion
  	(re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
! 	(or (eq (char-after (point)) ?\;)
  	    (eq (point) lim)))))
  
  (defun vhdl-corresponding-begin (&optional lim)
***************
*** 1295,1301 ****
  	   (if (save-excursion
  		 (forward-sexp)
  		 (skip-chars-forward " \t\n")
! 		 (= (following-char) ?\())
  	       (forward-sexp 2)
  	     (forward-sexp))
  	   (point))
--- 1295,1301 ----
  	   (if (save-excursion
  		 (forward-sexp)
  		 (skip-chars-forward " \t\n")
! 		 (= (char-after (point)) ?\())
  	       (forward-sexp 2)
  	     (forward-sexp))
  	   (point))
***************
*** 1367,1384 ****
    (let (foundp)
      (while (and (not foundp)
  		(re-search-backward vhdl-b-t-b-re lim 'move))
!       (if (or (= (preceding-char) ?_)
  	      (vhdl-in-literal lim))
  	  (backward-char)
  	(cond
  	 ;; "begin" keyword:
  	 ((and (looking-at vhdl-begin-fwd-re)
! 	       (/= (preceding-char) ?_)
  	       (vhdl-begin-p lim))
  	  (setq foundp 'begin))
  	 ;; "end" keyword:
  	 ((and (looking-at vhdl-end-fwd-re)
! 	       (/= (preceding-char) ?_)
  	       (vhdl-end-p lim))
  	  (setq foundp 'end))
  	 ))
--- 1367,1384 ----
    (let (foundp)
      (while (and (not foundp)
  		(re-search-backward vhdl-b-t-b-re lim 'move))
!       (if (or (= (char-before (point)) ?_)
  	      (vhdl-in-literal lim))
  	  (backward-char)
  	(cond
  	 ;; "begin" keyword:
  	 ((and (looking-at vhdl-begin-fwd-re)
! 	       (/= (char-before (point)) ?_)
  	       (vhdl-begin-p lim))
  	  (setq foundp 'begin))
  	 ;; "end" keyword:
  	 ((and (looking-at vhdl-end-fwd-re)
! 	       (/= (char-before (point)) ?_)
  	       (vhdl-end-p lim))
  	  (setq foundp 'end))
  	 ))
***************
*** 1399,1405 ****
  	(skip-chars-forward " \t\n")
  	;; Check for an unbalanced "end" keyword
  	(if (and (looking-at vhdl-end-fwd-re)
! 		 (/= (preceding-char) ?_)
  		 (not (vhdl-in-literal lim))
  		 (vhdl-end-p lim)
  		 (not (looking-at "else")))
--- 1399,1405 ----
  	(skip-chars-forward " \t\n")
  	;; Check for an unbalanced "end" keyword
  	(if (and (looking-at vhdl-end-fwd-re)
! 		 (/= (char-before (point)) ?_)
  		 (not (vhdl-in-literal lim))
  		 (vhdl-end-p lim)
  		 (not (looking-at "else")))
***************
*** 1428,1434 ****
  		(if (or (and column
  			     (/= (current-indentation) column)
  			     (> (point) eol))
! 			(= (preceding-char) ?_)
  			(setq literal (vhdl-in-literal lim)))
  		    (if (eq literal 'comment)
  			(end-of-line)
--- 1428,1434 ----
  		(if (or (and column
  			     (/= (current-indentation) column)
  			     (> (point) eol))
! 			(= (char-before (point)) ?_)
  			(setq literal (vhdl-in-literal lim)))
  		    (if (eq literal 'comment)
  			(end-of-line)
***************
*** 1467,1485 ****
  	;; "else" - an "else" keyword corresponds to both the opening brace
  	;; of the following sexp and the closing brace of the previous sexp.
  	(if (and (looking-at "else\\b\\([^_]\\|\\'\\)")
! 		 (/= (preceding-char) ?_)
  		 (not (vhdl-in-literal lim)))
  	    nil
  	  (backward-sexp)
  	  (if (and (looking-at vhdl-begin-fwd-re)
! 		   (/= (preceding-char) ?_)
  		   (not (vhdl-in-literal lim))
  		   (vhdl-begin-p lim))
  	      (error "Containing expression ends prematurely in vhdl-backward-sexp")))
  	;; If the current keyword is an "end" keyword, then find the
  	;; corresponding "begin" keyword.
  	(if (and (setq begin-vec (vhdl-corresponding-begin lim))
! 		 (/= (preceding-char) ?_))
  	    (let (
  		  ;; begin-re is the statement keyword to search for
  		  (begin-re
--- 1467,1485 ----
  	;; "else" - an "else" keyword corresponds to both the opening brace
  	;; of the following sexp and the closing brace of the previous sexp.
  	(if (and (looking-at "else\\b\\([^_]\\|\\'\\)")
! 		 (/= (char-before (point)) ?_)
  		 (not (vhdl-in-literal lim)))
  	    nil
  	  (backward-sexp)
  	  (if (and (looking-at vhdl-begin-fwd-re)
! 		   (/= (char-before (point)) ?_)
  		   (not (vhdl-in-literal lim))
  		   (vhdl-begin-p lim))
  	      (error "Containing expression ends prematurely in vhdl-backward-sexp")))
  	;; If the current keyword is an "end" keyword, then find the
  	;; corresponding "begin" keyword.
  	(if (and (setq begin-vec (vhdl-corresponding-begin lim))
! 		 (/= (char-before (point)) ?_))
  	    (let (
  		  ;; begin-re is the statement keyword to search for
  		  (begin-re
***************
*** 1506,1512 ****
  				  ;; well as current-indentation.
  				  (or (not internal-p)
  				      (/= (current-column) column))))
! 			(= (preceding-char) ?_)
  			(vhdl-in-literal lim))
  		    (backward-char)
  		  ;; If there is a supplementary keyword, then
--- 1506,1512 ----
  				  ;; well as current-indentation.
  				  (or (not internal-p)
  				      (/= (current-column) column))))
! 			(= (char-before (point)) ?_)
  			(vhdl-in-literal lim))
  		    (backward-char)
  		  ;; If there is a supplementary keyword, then
***************
*** 1534,1540 ****
  							last-backward t)
  				     (goto-char (match-beginning 1)))
  			   ;; If we are in a literal, then try again.
! 			   (if (or (= (preceding-char) ?_)
  				   (setq literal
  					 (vhdl-in-literal last-forward)))
  			       (if (eq literal 'comment)
--- 1534,1540 ----
  							last-backward t)
  				     (goto-char (match-beginning 1)))
  			   ;; If we are in a literal, then try again.
! 			   (if (or (= (char-before (point)) ?_)
  				   (setq literal
  					 (vhdl-in-literal last-forward)))
  			       (if (eq literal 'comment)
***************
*** 1619,1625 ****
      (while (and (not foundp)
  		(re-search-backward vhdl-libunit-re nil 'move))
        ;; If we are in a literal, or not at a real libunit, then try again.
!       (if (or (= (preceding-char) ?_)
  	      (vhdl-in-literal (point-min))
  	      (not (vhdl-libunit-p)))
  	  (backward-char)
--- 1619,1625 ----
      (while (and (not foundp)
  		(re-search-backward vhdl-libunit-re nil 'move))
        ;; If we are in a literal, or not at a real libunit, then try again.
!       (if (or (= (char-before (point)) ?_)
  	      (vhdl-in-literal (point-min))
  	      (not (vhdl-libunit-p)))
  	  (backward-char)
***************
*** 1628,1634 ****
  	(while (and (not foundp)
  		    (re-search-forward "\\bis\\b[^_]" last-backward t)
  		    (setq placeholder (match-beginning 0)))
! 	  (if (or (= (preceding-char) ?_)
  		  (setq literal (vhdl-in-literal last-forward)))
  	      ;; It wasn't a real keyword, so keep searching.
  	      (if (eq literal 'comment)
--- 1628,1634 ----
  	(while (and (not foundp)
  		    (re-search-forward "\\bis\\b[^_]" last-backward t)
  		    (setq placeholder (match-beginning 0)))
! 	  (if (or (= (char-before (point)) ?_)
  		  (setq literal (vhdl-in-literal last-forward)))
  	      ;; It wasn't a real keyword, so keep searching.
  	      (if (eq literal 'comment)
***************
*** 1669,1675 ****
  	(while (and (not foundp)
  		    (re-search-backward vhdl-defun-re nil 'move))
  	  ;; If we are in a literal, then try again.
! 	  (if (or (= (preceding-char) ?_)
  		  (vhdl-in-literal (point-min)))
  	      (backward-char)
  	    (if (setq begin-string (vhdl-corresponding-defun))
--- 1669,1675 ----
  	(while (and (not foundp)
  		    (re-search-backward vhdl-defun-re nil 'move))
  	  ;; If we are in a literal, then try again.
! 	  (if (or (= (char-before (point)) ?_)
  		  (vhdl-in-literal (point-min)))
  	      (backward-char)
  	    (if (setq begin-string (vhdl-corresponding-defun))
***************
*** 1681,1687 ****
  		  (setq last-forward (point))
  		  (while (and (not foundp)
  			      (search-forward begin-string last-backward t))
! 		    (if (or (= (preceding-char) ?_)
  			    (save-match-data
  			      (setq literal (vhdl-in-literal last-forward))))
  			;; It wasn't a real keyword, so keep searching.
--- 1681,1687 ----
  		  (setq last-forward (point))
  		  (while (and (not foundp)
  			      (search-forward begin-string last-backward t))
! 		    (if (or (= (char-before (point)) ?_)
  			    (save-match-data
  			      (setq literal (vhdl-in-literal last-forward))))
  			;; It wasn't a real keyword, so keep searching.
***************
*** 1757,1773 ****
  		(not (bobp))
  		;; look backwards for a statement boundary
  		(re-search-backward vhdl-b-o-s-re lim 'move))
!       (if (or (= (preceding-char) ?_)
  	      (vhdl-in-literal lim))
  	  (backward-char)
  	(cond
  	 ;; If we are looking at an open paren, then stop after it
! 	 ((eq (following-char) ?\()
  	  (forward-char)
  	  (vhdl-forward-syntactic-ws here)
  	  (setq donep t))
  	 ;; If we are looking at a close paren, then skip it
! 	 ((eq (following-char) ?\))
  	  (forward-char)
  	  (setq pos (point))
  	  (backward-sexp)
--- 1757,1773 ----
  		(not (bobp))
  		;; look backwards for a statement boundary
  		(re-search-backward vhdl-b-o-s-re lim 'move))
!       (if (or (= (char-before (point)) ?_)
  	      (vhdl-in-literal lim))
  	  (backward-char)
  	(cond
  	 ;; If we are looking at an open paren, then stop after it
! 	 ((eq (char-after (point)) ?\()
  	  (forward-char)
  	  (vhdl-forward-syntactic-ws here)
  	  (setq donep t))
  	 ;; If we are looking at a close paren, then skip it
! 	 ((eq (char-after (point)) ?\))
  	  (forward-char)
  	  (setq pos (point))
  	  (backward-sexp)
***************
*** 1776,1789 ****
  		     (vhdl-forward-syntactic-ws here)
  		     (setq donep t))))
  	 ;; If we are looking at a semicolon, then stop
! 	 ((eq (following-char) ?\;)
  	  (progn
  	    (forward-char)
  	    (vhdl-forward-syntactic-ws here)
  	    (setq donep t)))
  	 ;; If we are looking at a "begin", then stop
  	 ((and (looking-at vhdl-begin-fwd-re)
! 	       (/= (preceding-char) ?_)
  	       (vhdl-begin-p nil))
  	  ;; If it's a leader "begin", then find the
  	  ;; right place
--- 1776,1789 ----
  		     (vhdl-forward-syntactic-ws here)
  		     (setq donep t))))
  	 ;; If we are looking at a semicolon, then stop
! 	 ((eq (char-after (point)) ?\;)
  	  (progn
  	    (forward-char)
  	    (vhdl-forward-syntactic-ws here)
  	    (setq donep t)))
  	 ;; If we are looking at a "begin", then stop
  	 ((and (looking-at vhdl-begin-fwd-re)
! 	       (/= (char-before (point)) ?_)
  	       (vhdl-begin-p nil))
  	  ;; If it's a leader "begin", then find the
  	  ;; right place
***************
*** 1805,1811 ****
  	  (setq donep t))
  	 ;; If we are looking at a "statement", then stop
  	 ((and (looking-at vhdl-statement-fwd-re)
! 	       (/= (preceding-char) ?_)
  	       (vhdl-statement-p nil))
  	  (setq donep t))
  	 ;; If we are looking at a case alternative key, then stop
--- 1805,1811 ----
  	  (setq donep t))
  	 ;; If we are looking at a "statement", then stop
  	 ((and (looking-at vhdl-statement-fwd-re)
! 	       (/= (char-before (point)) ?_)
  	       (vhdl-statement-p nil))
  	  (setq donep t))
  	 ;; If we are looking at a case alternative key, then stop
***************
*** 1954,1960 ****
  	placeholder)
      (if (save-excursion
  	  (vhdl-backward-syntactic-ws lim)
! 	  (and (eq (preceding-char) ?:)
  	       (progn
  		 (backward-sexp)
  		 (setq placeholder (point))
--- 1954,1960 ----
  	placeholder)
      (if (save-excursion
  	  (vhdl-backward-syntactic-ws lim)
! 	  (and (eq (char-before (point)) ?:)
  	       (progn
  		 (backward-sexp)
  		 (setq placeholder (point))
***************
*** 2017,2023 ****
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
  	(setq literal (vhdl-in-literal lim))
! 	(setq char-after-ip (following-char))
  	(setq begin-after-ip (and
  			      (not literal)
  			      (looking-at vhdl-begin-fwd-re)
--- 2017,2023 ----
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
  	(setq literal (vhdl-in-literal lim))
! 	(setq char-after-ip (char-after (point)))
  	(setq begin-after-ip (and
  			      (not literal)
  			      (looking-at vhdl-begin-fwd-re)
***************
*** 2027,2033 ****
  			    (looking-at vhdl-end-fwd-re)
  			    (vhdl-end-p)))
  	(vhdl-backward-syntactic-ws lim)
! 	(setq char-before-ip (preceding-char))
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
  
--- 2027,2033 ----
  			    (looking-at vhdl-end-fwd-re)
  			    (vhdl-end-p)))
  	(vhdl-backward-syntactic-ws lim)
! 	(setq char-before-ip (char-before (point)))
  	(goto-char indent-point)
  	(skip-chars-forward " \t")
  
***************
*** 2069,2075 ****
  	   ((progn
  	      (vhdl-backward-syntactic-ws lim)
  	      (or (bobp)
! 		  (= (preceding-char) ?\;)))
  	    (vhdl-add-syntax 'statement placeholder))
  	   ;; CASE 2D: we are looking at a top-level statement-cont
  	   (t
--- 2069,2075 ----
  	   ((progn
  	      (vhdl-backward-syntactic-ws lim)
  	      (or (bobp)
! 		  (= (char-before (point)) ?\;)))
  	    (vhdl-add-syntax 'statement placeholder))
  	   ;; CASE 2D: we are looking at a top-level statement-cont
  	   (t
***************
*** 2334,2340 ****
  	(re-search-forward "\\(<\\|:\\)=\\|(" (vhdl-point 'eol) 'move)
  	(if (vhdl-in-literal (cdr langelem))
  	    (forward-char)
! 	  (if (= (preceding-char) ?\()
  	      ;; skip over any parenthesized expressions
  	      (goto-char (min (vhdl-point 'eol)
  			      (scan-lists (point) 1 1)))
--- 2334,2340 ----
  	(re-search-forward "\\(<\\|:\\)=\\|(" (vhdl-point 'eol) 'move)
  	(if (vhdl-in-literal (cdr langelem))
  	    (forward-char)
! 	  (if (= (char-before (point)) ?\()
  	      ;; skip over any parenthesized expressions
  	      (goto-char (min (vhdl-point 'eol)
  			      (scan-lists (point) 1 1)))
*** vrml-mode.el.orig	Sun Jun 15 14:32:13 1997
--- vrml-mode.el	Sun Jun 15 14:38:43 1997
***************
*** 387,395 ****
  	  (t
  	   (skip-chars-forward " \t")
  	   (if (listp indent) (setq indent (car indent)))
! 	   (cond ((= (following-char) ?})
  		  (setq indent (- indent vrml-indent-level)))
! 		 ((= (following-char) ?\])
  		  (setq indent (- indent 1))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
--- 387,395 ----
  	  (t
  	   (skip-chars-forward " \t")
  	   (if (listp indent) (setq indent (car indent)))
! 	   (cond ((= (char-after (point)) ?})
  		  (setq indent (- indent vrml-indent-level)))
! 		 ((= (char-after (point)) ?\])
  		  (setq indent (- indent 1))))))
      (skip-chars-forward " \t")
      (setq shift-amt (- indent (current-column)))
***************
*** 568,576 ****
  			(setq this-indent val))
  		))
  	    (cond ((not (numberp this-indent)))
! 		  ((= (following-char) ?})
  		   (setq this-indent (- this-indent vrml-indent-level)))
! 		  ((= (following-char) ?\])
  		   (setq this-indent (- this-indent 1))))
  	    ;; Put chosen indentation into effect.
  	    (or (null this-indent)
--- 568,576 ----
  			(setq this-indent val))
  		))
  	    (cond ((not (numberp this-indent)))
! 		  ((= (char-after (point)) ?})
  		   (setq this-indent (- this-indent vrml-indent-level)))
! 		  ((= (char-after (point)) ?\])
  		   (setq this-indent (- this-indent 1))))
  	    ;; Put chosen indentation into effect.
  	    (or (null this-indent)
***************
*** 598,606 ****
        (backward-char)
        ;; Note -- continued comments are not supported here.  I
        ;; consider those to be a wart on the language.
!       (not (eq ?\\ (preceding-char))))
       (t
!       (memq (preceding-char) '(?{))))))
  
  ;; FIXME doesn't actually return t.  See last case.
  (defun vrml-real-comment-p ()
--- 598,606 ----
        (backward-char)
        ;; Note -- continued comments are not supported here.  I
        ;; consider those to be a wart on the language.
!       (not (eq ?\\ (char-before (point)))))
       (t
!       (memq (char-before (point)) '(?{))))))
  
  ;; FIXME doesn't actually return t.  See last case.
  (defun vrml-real-comment-p ()
*** xrdb-mode.el.orig	Sun Jun 15 14:32:20 1997
--- xrdb-mode.el	Sun Jun 15 14:38:55 1997
***************
*** 138,144 ****
    (skip-chars-forward
     (concat "^" (char-to-string xrdb-separator-char))
     (xrdb-point 'eol))
!   (= (following-char) xrdb-separator-char))
  
  
  
--- 138,144 ----
    (skip-chars-forward
     (concat "^" (char-to-string xrdb-separator-char))
     (xrdb-point 'eol))
!   (= (char-after (point)) xrdb-separator-char))
  
  
  
8<----------------------------------------------------------------->8

-- 
Karl M. Hegbloom <karlheg@inetarena.com>
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.3  Linux 2.1.36 AMD K5 PR-133

