From fcc6ce77ffc01b402c8c2c6c704ec36d10c18e5b Mon Sep 17 00:00:00 2001 From: Sergei Litvin Date: Mon, 16 Jul 2018 02:38:37 +0300 Subject: [PATCH] Fixed: visit-tags-or-die should not rely on visit-tags-table return value --- mizar.el | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mizar.el b/mizar.el index 81c5769..39f31bb 100644 --- a/mizar.el +++ b/mizar.el @@ -1270,7 +1270,7 @@ The explanations is the 'expl property of the symbols. (defun mizar-get-ref-str (win obj pos) "Get the string explaining reference REF. The variable `mizar-ref-table' might be modified by this function." -(if (visit-tags-or-die mizreftags) +(visit-tags-or-die mizreftags) (save-excursion (set-buffer obj) (goto-char pos) @@ -1308,7 +1308,7 @@ The variable `mizar-ref-table' might be modified by this function." (if (string-match "[ \n\r\t]+\\(proof\\|and\\)[ \n\r\t]" res1) (substring res1 1 (match-beginning 0)) (substring res1 1)))) - "")))))) + ""))))) (defun mizar-bubble-ref-region (beg end) @@ -1930,14 +1930,14 @@ If TAG is given, search for it instead. NOOTHERW finds in current window. File symbtags is included in the Mizar distribution." (interactive) - (if (visit-tags-or-die mizsymbtags) - (let ((abs (or nootherw (buffer-abstract-p (current-buffer))))) + (visit-tags-or-die mizsymbtags) + (let ((abs (or nootherw (buffer-abstract-p (current-buffer))))) (if nocompletion (let ((tag (or tag (mizar-ref-at-point)))) (if abs (find-tag tag) (find-tag-other-window tag))) (if abs (call-interactively 'find-tag) - (call-interactively 'find-tag-other-window)))))) + (call-interactively 'find-tag-other-window))))) (defun mizar-show-ref (&optional nocompletion) @@ -1948,17 +1948,17 @@ Library references are theorems, definitions and schemes imported from other Mizar articles. File reftags is included in the Mizar distribution." (interactive) - (if (visit-tags-or-die mizreftags) - (if nocompletion + (visit-tags-or-die mizreftags) + (if nocompletion (find-tag-other-window (mizar-ref-at-point)) - (call-interactively 'find-tag-other-window)))) + (call-interactively 'find-tag-other-window))) (defun symbol-apropos () "Displays list of all MML symbols that match a regexp." (interactive) - (if (visit-tags-or-die mizsymbtags) - (call-interactively 'tags-apropos))) + (visit-tags-or-die mizsymbtags) + (call-interactively 'tags-apropos)) @@ -1966,14 +1966,14 @@ File reftags is included in the Mizar distribution." "Popup menu with last 20 visited tags and go to selection. Works properly only for symbols (not references)." (interactive) - (if (visit-tags-or-die mizsymbtags) - (let* ((allowed (unique (delete nil (copy-alist find-tag-history)) )) + (visit-tags-or-die mizsymbtags) + (let* ((allowed (unique (delete nil (copy-alist find-tag-history)) )) (double (mapcar #'(lambda (x) (cons x x)) (remove-from 20 allowed))) (backadded (cons (cons "Go to previous" t) double)) (menu (list "Visited symbols" (cons "Tags" backadded))) (tag (x-popup-menu t menu))) (if (eq tag t) (pop-tag-mark) - (if (stringp tag) (find-tag tag)))))) + (if (stringp tag) (find-tag tag))))) -- 2.18.0