File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1493,10 +1493,19 @@ arguments which contain the debug port to use for opening TCP connection."
14931493(defun dap-register-debug-template (configuration-name configuration-settings )
14941494 " Register configuration template CONFIGURATION-NAME.
14951495
1496- CONFIGURATION-SETTINGS - plist containing the preset settings for the configuration."
1496+ CONFIGURATION-SETTINGS is a plist containing the preset settings
1497+ for the configuration. If its :name is omitted, it defaults to
1498+ CONFIGURATION-NAME."
14971499 (setq dap-debug-template-configurations
14981500 (delq (assoc configuration-name dap-debug-template-configurations)
14991501 dap-debug-template-configurations))
1502+ ; ; Use `plist-member' instead of just `plist-get' , because :name would
1503+ ; ; possibly not be properly removed in `dap-start-debugging-noexpand' due to
1504+ ; ; being specified twice (the inferred name, followed by nil).
1505+ (unless (plist-member configuration-settings :name )
1506+ ; ; We mustn't modify CONFIGURATION-SETTINGS; `push' is non-destructive.
1507+ (push configuration-name configuration-settings)
1508+ (push :name configuration-settings))
15001509 (add-to-list
15011510 'dap-debug-template-configurations
15021511 (cons configuration-name configuration-settings)))
You can’t perform that action at this time.
0 commit comments