Commit d882f973 authored by privet-kitty's avatar privet-kitty Committed by Francois-Rene Rideau

Omit package prefix from each definition in UIOP's manual

parent a7b22449
......@@ -22,7 +22,7 @@ clean-crap:
rm -f *.aux *.cp *.fn *.fns *.ky *.log *.pg *.toc *.tp *.tps *.vr
clean: clean-include
rm -f *.pdf *.html *.info ${uiop}.texinfo
rm -rf *.pdf *.html *.info ${uiop}.texinfo ${uiop}
include:
sbcl --no-userinit --eval '(require :asdf)' \
......@@ -42,5 +42,8 @@ pdf: texinfo
html: texinfo
makeinfo --html --no-split ${uiop}.texinfo
htmls: texinfo
makeinfo --html ${uiop}.texinfo
info: texinfo
makeinfo ${uiop}.texinfo
......@@ -9,8 +9,7 @@
;;;; the COPYING file for more information.
;;;;
;;;; Written by Rudi Schlatte <rudi@constantly.at>, mangled
;;;; by Nikodemus Siivola.
;;;; Tweaked for UIOP by Hugo Ishimaru.
;;;; by Nikodemus Siivola. Tweaked for UIOP by Hugo Ishimaru.
;;;; TODO
;;;; * Verbatim text
......@@ -181,6 +180,10 @@ up filename handling. See `*character-replacements*' and
name))
;;;; generating various names
(defun short-package-name (package)
(unless (eq package *base-package*)
(car (sort (copy-list (cons (package-name package) (package-nicknames package)))
#'< :key #'length))))
(defgeneric name (thing)
(:documentation "Name for a documented thing. Names are either
......@@ -229,11 +232,6 @@ symbols or lists of symbols."))
(let ((kind (get-kind doc)))
(format nil "~:(~A~) ~(~A~)" kind (name-using-kind/name kind (get-name doc) doc))))
(defun short-package-name (package)
(unless (eq package *base-package*)
(car (sort (copy-list (cons (package-name package) (package-nicknames package)))
#'< :key #'length))))
;;; Definition titles for DOCUMENTATION instances
(defgeneric title-using-kind/name (kind name doc))
......@@ -703,9 +701,15 @@ followed another tabulation label or a tabulation body."
(not (and (typep (find-class symbol nil) 'standard-class)
(docstring slot t))))
(defun replace-ampersand (string)
(substitute #\a #\& string :test #'char=))
(defun texinfo-anchor (doc)
(format *texinfo-output* "@anchor{~A}~%" (node-name doc)))
(defparameter *omit-package-prefix* t
"Omit package designator from each definition of symbol.")
;;; KLUDGE: &AUX *PRINT-PRETTY* here means "no linebreaks please"
(defun texinfo-begin (doc &aux *print-pretty*)
(let ((kind (get-kind doc)))
......@@ -718,7 +722,9 @@ followed another tabulation label or a tabulation body."
(t
"deffn"))
(map 'string (lambda (char) (if (eql char #\-) #\Space char)) (string kind))
(title-name doc)
(if *omit-package-prefix*
(get-name doc)
(title-name doc))
;; &foo would be amusingly bold in the pdf thanks to TeX/Texinfo
;; interactions,so we escape the ampersand -- amusingly for TeX.
;; sbcl.texinfo defines macros that expand @&key and friends to &key.
......@@ -834,9 +840,6 @@ package, as well as for the package itself."
:if-exists :supersede)
,@forms))
(defun replace-ampersand (string)
(substitute #\a #\& string :test #'char=))
(defun write-ifnottex ()
;; We use @&key, etc to escape & from TeX in lambda lists -- so we need to
;; define them for info as well.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment