From b5110ccdb69d372a3ea44f1c8738ca9b72695ec5 Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Sun, 4 Jan 2009 19:40:22 +0100 Subject: [PATCH] FUEL: Fixes in help pages caching. --- misc/fuel/fuel-help.el | 2 +- misc/fuel/fuel-markup.el | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/fuel/fuel-help.el b/misc/fuel/fuel-help.el index 22ee00f1a6..2c936f5557 100644 --- a/misc/fuel/fuel-help.el +++ b/misc/fuel/fuel-help.el @@ -87,7 +87,7 @@ (defun fuel-help--history-current-content () (fuel-help--cache-get (car fuel-help--history))) -(defvar fuel-help--cache (make-hash-table :test 'equal)) +(defvar fuel-help--cache (make-hash-table :weakness 'key :test 'equal)) (defsubst fuel-help--cache-get (name) (gethash name fuel-help--cache)) diff --git a/misc/fuel/fuel-markup.el b/misc/fuel/fuel-markup.el index c1f9cf3a7d..2ee120c296 100644 --- a/misc/fuel/fuel-markup.el +++ b/misc/fuel/fuel-markup.el @@ -53,7 +53,7 @@ (when fuel-markup--follow-link-function (funcall fuel-markup--follow-link-function (button-get button 'markup-link) - (button-label button) + (button-get button 'markup-label) (button-get button 'markup-link-type)))) (defun fuel-markup--echo-link (link label type) @@ -65,8 +65,9 @@ (insert-text-button label :type 'fuel-markup--button 'markup-link link + 'markup-label label 'markup-link-type type - 'help-echo link))) + 'help-echo (format "%s (%s)" label type)))) (defun fuel-markup--article-title (name) (fuel-eval--retort-result @@ -76,7 +77,7 @@ (let ((button (condition-case nil (forward-button 0) (error nil)))) (when button (list (button-get button 'markup-link) - (button-label button) + (button-get button 'markup-label) (button-get button 'markup-link-type)))))