FUEL: Avoid contiguous duplicates in help history.

db4
Jose A. Ortega Ruiz 2009-01-04 19:17:04 +01:00
parent e603602e18
commit b05a2388f0
2 changed files with 13 additions and 8 deletions

View File

@ -59,9 +59,13 @@
(car fuel-help--history))
(defun fuel-help--history-push (link)
(when (and link (not (equal link (car fuel-help--history))))
(ring-insert (nth 1 fuel-help--history) (car fuel-help--history)))
(setcar fuel-help--history link))
(unless (equal link (car fuel-help--history))
(let ((next (fuel-help--history-next)))
(unless (equal link next)
(when next (fuel-help--history-previous))
(ring-insert (nth 1 fuel-help--history) (car fuel-help--history))
(setcar fuel-help--history link))))
link)
(defun fuel-help--history-next ()
(when (not (ring-empty-p (nth 2 fuel-help--history)))

View File

@ -280,9 +280,9 @@
(defun fuel-markup--links (e)
(dolist (link (cdr e))
(insert " ")
(fuel-markup--link (list '$link link))
(insert " ")))
(insert ", "))
(delete-backward-char 2))
(defun fuel-markup--index-quotation (q)
(cond ((null q) null)
@ -398,6 +398,10 @@
(fuel-markup--insert-heading "See also")
(fuel-markup--links (cons '$links (cdr e))))
(defun fuel-markup--related (e)
(fuel-markup--insert-heading "See also")
(fuel-markup--links (cons '$links (cadr e))))
(defun fuel-markup--shuffle (e)
(insert "\nShuffle word. Re-arranges the stack "
"according to the stack effect pattern.")
@ -443,9 +447,6 @@
(defun fuel-markup--contract (e)
(fuel-markup--elem-with-heading e "Generic word contract"))
(defun fuel-markup--related (e)
(fuel-markup--elem-with-heading e "See also"))
(defun fuel-markup--errors (e)
(fuel-markup--elem-with-heading e "Errors"))