From xemacs-m  Sun Jun 15 13:52:55 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 NAA15775
	for <xemacs-beta@xemacs.org>; Sun, 15 Jun 1997 13:52:52 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.5/8.8.5) id LAA07232;
	Sun, 15 Jun 1997 11:52:33 -0700
Date: Sun, 15 Jun 1997 11:52:33 -0700
Message-Id: <199706151852.LAA07232@bittersweet.inetarena.com>
From: "Karl M. Hegbloom" <karlheg@inetarena.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: <xemacs-beta@xemacs.org>
Subject: [patch] AUCTeX
X-Mailer: VM 6.32 under 20.3 "Oslo" XEmacs Lucid (beta7)
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


 Replaces obsolete (following-char) and (preceding-char) with
(char-after (point)) and (char-before (point)).

8<----------------------------------------------------------------->8
*** font-latex.el.orig	Sun Jun 15 11:44:27 1997
--- font-latex.el	Sun Jun 15 11:49:05 1997
***************
*** 496,505 ****
           (t
            (let ((kbeg (match-beginning 0))
                  (kend (+ (match-end 0) 
!                          (if (and asterix (eq (following-char) ?\*)) 1 0))) 
                  sbeg send cbeg cend)
              (goto-char kend)            ;May be moved by asterix
!             (while (eq (following-char) ?\[)
                (save-restriction
                  ;; Restrict to LIMIT.
                  (narrow-to-region (point-min) limit)
--- 496,506 ----
           (t
            (let ((kbeg (match-beginning 0))
                  (kend (+ (match-end 0) 
!                          (if (and asterix
! 				  (eq (char-after (point)) ?\*)) 1 0))) 
                  sbeg send cbeg cend)
              (goto-char kend)            ;May be moved by asterix
!             (while (eq (char-after (point)) ?\[)
                (save-restriction
                  ;; Restrict to LIMIT.
                  (narrow-to-region (point-min) limit)
***************
*** 511,517 ****
                    (setq send (point-max))
                    (goto-char send)
                    (setq font-latex-match-command-cache-state 'stop))))
!             (when (eq (following-char) ?\{)
                (save-restriction
                  ;; Restrict to LIMIT.
                  (narrow-to-region (point-min) limit)
--- 512,518 ----
                    (setq send (point-max))
                    (goto-char send)
                    (setq font-latex-match-command-cache-state 'stop))))
!             (when (eq (char-after (point)) ?\{)
                (save-restriction
                  ;; Restrict to LIMIT.
                  (narrow-to-region (point-min) limit)
***************
*** 523,529 ****
                    (setq cend (point-max))
                    (goto-char cend)
                    (setq font-latex-match-command-cache-state 'stop))))
!             (when (and twoargs (eq (following-char) ?\{))
                (save-restriction
                  ;; Restrict to LIMIT.
                  (narrow-to-region (point-min) limit)
--- 524,530 ----
                    (setq cend (point-max))
                    (goto-char cend)
                    (setq font-latex-match-command-cache-state 'stop))))
!             (when (and twoargs (eq (char-after (point)) ?\{))
                (save-restriction
                  ;; Restrict to LIMIT.
                  (narrow-to-region (point-min) limit)
***************
*** 678,684 ****
                (beg  (match-end 0)) end itbeg itend bfbeg bfend ttbeg ttend)
            (goto-char (match-beginning 0))
            (cond 
!            ((not (eq (preceding-char) ?\{))
              ;; Fontify only the keyword as bf/it/type (no argument found).
              (cond ((match-beginning 2) (setq itbeg kbeg itend kend))
                    ((match-beginning 5) (setq bfbeg kbeg bfend kend))
--- 679,685 ----
                (beg  (match-end 0)) end itbeg itend bfbeg bfend ttbeg ttend)
            (goto-char (match-beginning 0))
            (cond 
!            ((not (eq (char-before (point)) ?\{))
              ;; Fontify only the keyword as bf/it/type (no argument found).
              (cond ((match-beginning 2) (setq itbeg kbeg itend kend))
                    ((match-beginning 5) (setq bfbeg kbeg bfend kend))
***************
*** 720,726 ****
  \\ [ F = ma \\] but not \\\\ [len]"
    (when (re-search-forward "\\(\\\\(\\)\\|\\(\\\\\\[\\)" limit t)
      (goto-char (match-beginning 0))
!     (if (eq (preceding-char) ?\\)       ; \\[ is not a math environment
          (progn 
            (goto-char (match-end 0))
            (store-match-data (list nil nil)) 
--- 721,727 ----
  \\ [ F = ma \\] but not \\\\ [len]"
    (when (re-search-forward "\\(\\\\(\\)\\|\\(\\\\\\[\\)" limit t)
      (goto-char (match-beginning 0))
!     (if (eq (char-before (point)) ?\\)       ; \\[ is not a math environment
          (progn 
            (goto-char (match-end 0))
            (store-match-data (list nil nil)) 
*** latex.el.orig	Sun Jun 15 11:45:40 1997
--- latex.el	Sun Jun 15 11:48:44 1997
***************
*** 1570,1576 ****
         (+ (match-beginning 0)
  	  (if (save-excursion
  		(skip-chars-backward " ]})\"'")
! 		(memq (preceding-char) '(?. ?? ?!)))
  	      2 1))
         (match-end 0)))
      (goto-char (point-max))
--- 1570,1576 ----
         (+ (match-beginning 0)
  	  (if (save-excursion
  		(skip-chars-backward " ]})\"'")
! 		(memq (char-before (point)) '(?. ?? ?!)))
  	      2 1))
         (match-end 0)))
      (goto-char (point-max))
***************
*** 1589,1595 ****
  	      (skip-chars-forward "^ \n")
  	    (forward-char -1)))
  	(delete-horizontal-space)
! 	(if (equal (preceding-char) ?\\)
  	    (insert ? ))
  	(insert ?\n)
  	(LaTeX-indent-line)
--- 1589,1595 ----
  	      (skip-chars-forward "^ \n")
  	    (forward-char -1)))
  	(delete-horizontal-space)
! 	(if (equal (char-before (point)) ?\\)
  	    (insert ? ))
  	(insert ?\n)
  	(LaTeX-indent-line)
***************
*** 2836,2842 ****
    (save-excursion
      (catch 'done
        (while t
! 	(if (/= ?\\ (following-char))
  	    (skip-chars-backward "a-zA-Z "))
  	(skip-chars-backward "\\\\")
  	(if (looking-at "\\\\\\(emph\\|text[a-z]+\\){")
--- 2836,2842 ----
    (save-excursion
      (catch 'done
        (while t
! 	(if (/= ?\\ (char-after (point)))
  	    (skip-chars-backward "a-zA-Z "))
  	(skip-chars-backward "\\\\")
  	(if (looking-at "\\\\\\(emph\\|text[a-z]+\\){")
***************
*** 2990,2996 ****
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
  				       (backward-char 2)
! 				       (preceding-char)) ?\])
  				 ()
  			       (TeX-arg-counter t "Within counter"))
  		       "") ])
--- 2990,2996 ----
       [ TeX-arg-environment "Numbered like" ]
       t [ (TeX-arg-eval progn (if (eq (save-excursion
  				       (backward-char 2)
! 				       (char-before (point))) ?\])
  				 ()
  			       (TeX-arg-counter t "Within counter"))
  		       "") ])
*** tex.el.orig	Sun Jun 15 11:49:31 1997
--- tex.el	Sun Jun 15 11:50:26 1997
***************
*** 1246,1254 ****
  AUC TeX knows of some macros, and may query for extra arguments.
  Space will complete and exit."
    (interactive)
!   (cond ((eq (preceding-char) ?\\)
  	 (call-interactively 'self-insert-command))
! 	((eq (preceding-char) ?.)
  	 (let ((TeX-default-macro " ")
  	       (minibuffer-local-completion-map TeX-electric-macro-map))
  	   (call-interactively 'TeX-insert-macro)))
--- 1246,1254 ----
  AUC TeX knows of some macros, and may query for extra arguments.
  Space will complete and exit."
    (interactive)
!   (cond ((eq (char-before (point)) ?\\)
  	 (call-interactively 'self-insert-command))
! 	((eq (char-before (point)) ?.)
  	 (let ((TeX-default-macro " ")
  	       (minibuffer-local-completion-map TeX-electric-macro-map))
  	   (call-interactively 'TeX-insert-macro)))
***************
*** 2442,2448 ****
    ;; Return non-nil if point is in a comment.
    (if (or (bolp)
  	  (null comment-start-skip)
! 	  (eq (preceding-char) ?\r))
        nil
      (save-excursion
        (let ((pos (point)))
--- 2442,2448 ----
    ;; Return non-nil if point is in a comment.
    (if (or (bolp)
  	  (null comment-start-skip)
! 	  (eq (char-before (point)) ?\r))
        nil
      (save-excursion
        (let ((pos (point)))
***************
*** 2664,2670 ****
  	    (setq TeX-dollar-list
  		  (append TeX-dollar-list
  			  (list (set-marker (make-marker)
! 					    (if (= (following-char)
  						   TeX-dollar-sign)
  						(progn
  						  (forward-char 1)
--- 2664,2670 ----
  	    (setq TeX-dollar-list
  		  (append TeX-dollar-list
  			  (list (set-marker (make-marker)
! 					    (if (= (char-after (point))
  						   TeX-dollar-sign)
  						(progn
  						  (forward-char 1)
***************
*** 2685,2691 ****
  	(if (listp arg)
  	    (self-insert-command 1)	;C-u always inserts just one
  	  (self-insert-command count)))
!     (let ((pc (preceding-char))
  	  (pos (point))
  	  (pt (point))
  	  (single t))
--- 2685,2691 ----
  	(if (listp arg)
  	    (self-insert-command 1)	;C-u always inserts just one
  	  (self-insert-command count)))
!     (let ((pc (char-before (point)))
  	  (pos (point))
  	  (pt (point))
  	  (single t))
***************
*** 2707,2713 ****
  	(if TeX-symbol-marker
  	    (save-excursion
  	      (goto-char TeX-symbol-marker-pos)
! 	      (if (and (= (preceding-char) TeX-dollar-sign)
  		       (/= (char-after (- (point) 2)) TeX-dollar-sign))
  		  (progn
  		    (backward-char 1)
--- 2707,2713 ----
  	(if TeX-symbol-marker
  	    (save-excursion
  	      (goto-char TeX-symbol-marker-pos)
! 	      (if (and (= (char-before (point)) TeX-dollar-sign)
  		       (/= (char-after (- (point) 2)) TeX-dollar-sign))
  		  (progn
  		    (backward-char 1)
***************
*** 2774,2780 ****
      (if TeX-quote-after-quote
  	(insert (cond ((bobp)
  		       ?\")
! 		      ((not (= (preceding-char) ?\"))
  		       ?\")
  		      ((save-excursion
  			 (forward-char -1)
--- 2774,2780 ----
      (if TeX-quote-after-quote
  	(insert (cond ((bobp)
  		       ?\")
! 		      ((not (= (char-before (point)) ?\"))
  		       ?\")
  		      ((save-excursion
  			 (forward-char -1)
***************
*** 2791,2799 ****
  		       TeX-close-quote)))
        (insert (cond ((bobp)
  		     TeX-open-quote)
! 		    ((= (preceding-char) (string-to-char TeX-esc))
  		     ?\")
! 		    ((= (preceding-char) ?\")
  		     ?\")
  		    ((save-excursion
  		       (forward-char (- (length TeX-open-quote)))
--- 2791,2799 ----
  		       TeX-close-quote)))
        (insert (cond ((bobp)
  		     TeX-open-quote)
! 		    ((= (char-before (point)) (string-to-char TeX-esc))
  		     ?\")
! 		    ((= (char-before (point)) ?\")
  		     ?\")
  		    ((save-excursion
  		       (forward-char (- (length TeX-open-quote)))
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

