Fix issue #135: 'Emacs temporary files cause DCD to crash'. dcd-server now ignores files starting with '.#'

This commit is contained in:
Atila Neves 2014-08-03 16:56:36 +02:00
parent fd1ac7e07a
commit 46b3370913
2 changed files with 25 additions and 25 deletions

View File

@ -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.

View File

@ -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);
}
}