Commits

Anonymous committed 6d981f0

Updates so it can work on all XEmacs manuals

Comments (0)

Files changed (3)

+1998-06-10  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+	* texinfmt.el: Added `texinfo-format-uref'.  Matching only files
+	registered for texinfo-mode in auto-mode-alist.  This also fixes
+	infinite recursion of this function when called on directories NB:
+	(directory-files ...) returns "." and ".." as well.  Using
+	(set-syntax-table texinfo-format-syntax-table) in
+	texinfo-multitable-buffer-name so that scan-lists will do that
+	according to the proper syntax.
+
 1998-04-07  SL Baur  <steve@altair.xemacs.org>
 
 	* Makefile (srckit): Use TAR/EXCLUDES variables from XEmacs.rules.
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 1.07
+VERSION = 1.08
 AUTHOR_VERSION =
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = texinfo
    "t{\\|"
    "TeX{\\|"
    "today{\\|"
+   "uref{\\|"
    "url{\\|"
    "var{\\|"
    "w{\\|"
 	(unformated-row (texinfo-multitable-extract-row)))
     ;; Use a temporary buffer
     (set-buffer (get-buffer-create texinfo-multitable-buffer-name))
+    (set-syntax-table texinfo-format-syntax-table)
     (delete-region (point-min) (point-max))
     (insert unformated-row)
     (goto-char (point-min))
   (insert (texinfo-parse-arg-discard))
   (goto-char texinfo-command-start))
 
+(put 'uref 'texinfo-format 'texinfo-format-uref)
+(defun texinfo-format-uref ()
+  (let* ((args (texinfo-format-parse-args))
+	 (url (nth 0 args))
+	 (displayed-text (nth 1 args)))
+    (texinfo-discard-command)
+    (if displayed-text
+	(insert (format "%s (%s)" displayed-text url))
+      (insert (format "`%s'" url)))))
+
 (put 'bullet 'texinfo-format 'texinfo-format-bullet)
 (defun texinfo-format-bullet ()
   "Insert an asterisk.
                      command-line-args-left (cdr command-line-args-left)))
               ((file-directory-p file)
                (setq command-line-args-left
-                     (nconc (directory-files file)
+                     (nconc (directory-files
+			     file
+			     nil
+			     ;; Match only files registered for
+			     ;; texinfo-mode in auto-mode-alist.
+			     ;; This also fixes infinite recursion of
+			     ;; this function when called on
+			     ;; directories
+			     ;; NB: (directory-files ...) returns
+			     ;; "." and ".." as well.
+			     (mapconcat
+			      (function
+			       (lambda (regexp)
+				 regexp))
+			      (mapcan
+			       (function
+				(lambda (a)
+				  (if (equal (cdr a) 'texinfo-mode)
+				      (list (car a))
+				    nil)))
+			       auto-mode-alist)
+			      "\\|"))
                             (cdr command-line-args-left))))
               (t
                (setq files (cons file files)