Fix issue #135: 'Emacs temporary files cause DCD to crash'. dcd-server now ignores files starting with '.#'
This commit is contained in:
parent
fd1ac7e07a
commit
46b3370913
|
@ -150,21 +150,19 @@ If you want to restart server, use `ac-dcd-init-server' instead."
|
|||
|
||||
|
||||
;; utility functions to call process
|
||||
|
||||
(defun ac-dcd-call-process (prefix args)
|
||||
(let ((buf (get-buffer-create ac-dcd-output-buffer-name))
|
||||
(defun ac-dcd-call-process (prefix &rest args)
|
||||
(if (null ac-dcd-executable)
|
||||
(error (format "Could not find dcd-client executable"))
|
||||
(let ((buf (get-buffer-create "*dcd-output*"))
|
||||
res)
|
||||
(with-current-buffer buf (erase-buffer))
|
||||
(setq res (apply 'call-process-region (point-min) (point-max)
|
||||
ac-dcd-executable nil buf nil
|
||||
args
|
||||
))
|
||||
ac-dcd-executable nil buf nil args))
|
||||
(with-current-buffer buf
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward ac-dcd-error-message-regexp nil t)
|
||||
(unless (eq 0 res)
|
||||
(ac-dcd-handle-error res args))
|
||||
;; Still try to get any useful input.
|
||||
(ac-dcd-parse-output prefix))))
|
||||
(ac-dcd-parse-output prefix)))))
|
||||
|
||||
(defsubst ac-dcd-cursor-position ()
|
||||
"Get cursor position to pass to dcd-client.
|
||||
|
|
|
@ -101,6 +101,8 @@ struct ModuleCache
|
|||
{
|
||||
foreach (fileName; dirEntries(path, "*.{d,di}", SpanMode.depth))
|
||||
{
|
||||
import std.path: baseName;
|
||||
if(fileName.baseName.startsWith(".#")) continue;
|
||||
getSymbolsInModule(fileName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue