Skip to content

Commit

Permalink
fixes suggested by @dhanak (thanks!)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapp committed Apr 10, 2024
1 parent 4a1a68c commit 86da879
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions julia-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -938,12 +938,10 @@ buffer where the LaTeX symbol starts."
When multiple options match, ask the user to clarify via `completing-read', unless there is a complete match and `julia-latexsub-greedy' is `t'."
(when-let (beg (julia--latexsub-start-symbol))
(let ((partial (buffer-substring-no-properties beg (point))))
(message "partial %s" partial)
(when-let (replacements (gethash partial julia-mode--latexsubs-partials))
(message "replacements %s" (prin1 replacements))
(let* ((complete-match (member partial replacements))
(replacement (cond ((and complete-match julia-latexsub-greedy) partial)
((cdr replacements) (gethash (completing-read "LaTeX completions: " replacements) julia-mode-latexsubs))
((cdr replacements) (completing-read "LaTeX completions: " replacements))
(t (car replacements)))))
(cons beg replacement))))))

Expand Down

0 comments on commit 86da879

Please sign in to comment.