auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] Changes to auctex/tex.el,v


From: Reiner Steib
Subject: [AUCTeX-diffs] Changes to auctex/tex.el,v
Date: Wed, 07 Jun 2006 08:59:26 +0000

CVSROOT:        /sources/auctex
Module name:    auctex
Changes by:     Reiner Steib <rsteib>   06/06/07 08:59:26

Index: tex.el
===================================================================
RCS file: /sources/auctex/auctex/tex.el,v
retrieving revision 5.572
retrieving revision 5.573
diff -u -b -r5.572 -r5.573
--- tex.el      25 May 2006 14:07:49 -0000      5.572
+++ tex.el      7 Jun 2006 08:59:26 -0000       5.573
@@ -710,6 +710,20 @@
     (multi-prompt "," nil prompt table predicate require-match initial-input
                  hist)))
 
+(if (fboundp 'line-number-at-pos)
+    (defalias 'TeX-line-number-at-pos 'line-number-at-pos)
+  ;; `line-number-at-pos' from `simple.el' in Emacs CVS (2006-06-07)
+  (defun TeX-line-number-at-pos (&optional pos)
+    "Return (narrowed) buffer line number at position POS.
+If POS is nil, use current buffer location."
+    (let ((opoint (or pos (point))) start)
+      (save-excursion
+       (goto-char (point-min))
+       (setq start (point))
+       (goto-char opoint)
+       (forward-line 0)
+       (1+ (count-lines start (point)))))))
+
 ;;; Special support for GNU Emacs
 
 (unless (featurep 'xemacs)
@@ -781,7 +795,6 @@
   "Return sorted list of all strings in LIST."
   (sort (copy-sequence list) #'string<))
 
-
 ;;; Buffer
 
 (defgroup TeX-output nil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]