From 455913886de58e0dcfdb4041b1b3b5b2aa1b64d4 Mon Sep 17 00:00:00 2001 From: condy Date: Tue, 22 Dec 2020 21:07:43 +0800 Subject: [PATCH] imenu integration --- dictionary.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dictionary.el b/dictionary.el index 25f3514..1e1f9ae 100644 --- a/dictionary.el +++ b/dictionary.el @@ -39,6 +39,7 @@ (require 'easymenu) (require 'custom) +(require 'imenu) (require 'connection) (require 'link) @@ -369,6 +370,14 @@ by the choice value: (make-local-variable 'dictionary-default-dictionary) (make-local-variable 'dictionary-default-strategy) + + ;; User can jump to dictionary quickly + (setq imenu-generic-expression `((nil + ,(concat "^From " + (regexp-quote dictionary-description-open-delimiter) + "\\(.+\\)" + (regexp-quote dictionary-description-close-delimiter)) + 1))) (if (featurep 'xemacs) (make-local-hook 'kill-buffer-hook))