Skip to content

Commit

Permalink
Improve naming of mime alist
Browse files Browse the repository at this point in the history
  • Loading branch information
svaante committed Dec 20, 2023
1 parent 28f43ea commit d1ab87f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dape.el
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ Functions and symbols in configuration:

;; TODO Add more defaults, don't know which adapters support
;; sourceReference
(defcustom dape-mime-mode '(("text/x-lldb.disassembly" . asm-mode))
(defcustom dape-mime-mode-alist '(("text/x-lldb.disassembly" . asm-mode))
"On source request of mime type key open buffer with mode value."
:type '(alist :key-type string :value-type function))

Expand Down Expand Up @@ -2135,10 +2135,10 @@ See `dape--callback' for expected CB signature."
(plist-get source :sourceReference) buffer))
(with-current-buffer buffer
(if-let* ((mime (plist-get body :mimeType))
(mode (alist-get mime dape-mime-mode nil nil 'equal)))
(mode (alist-get mime dape-mime-mode-alist nil nil 'equal)))
(unless (eq major-mode mode)
(funcall mode))
(message "Unknown mime type %s, see `dape-mime-mode'" (plist-get body :mimeType)))
(message "Unknown mime type %s, see `dape-mime-mode-alist'" (plist-get body :mimeType)))
(setq-local buffer-read-only t
dape--source source)
(let ((inhibit-read-only t))
Expand Down

0 comments on commit d1ab87f

Please sign in to comment.