lang/nim: remove nimsuggest--get-dirty-dir hack

Fixed upstream in nim-lang/nim-mode/commit/c8b50840
This commit is contained in:
Henrik Lissner 2019-10-19 14:37:08 -04:00
parent 63c41fefcb
commit 06da7fc20b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -11,18 +11,6 @@ nimsuggest isn't installed."
(nimsuggest-mode)))) (nimsuggest-mode))))
(when IS-WINDOWS (when IS-WINDOWS
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)
(defadvice! +nim--suggest-get-dirty-dir-a ()
"The original `nimsuggest--get-dirty-dir' incorrectly extracts the frame
number from the string representation of `selected-frame', which can contain
characters that are illegal on Windows, causing invalid argument errors when
`nimsuggest--make-tempdir' tries to use it."
:override #'nimsuggest--get-dirty-dir
(let* ((frame-str (format "%s" (selected-frame)))
(frame-num-str (if (string-match " \\(0x[0-9a-z]+\\)>$" frame-str)
(match-string 1 frame-str))))
(file-name-as-directory (concat nimsuggest-dirty-directory frame-num-str))))
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode) ;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)
(defadvice! +nim--suggest-get-temp-file-name-a (path) (defadvice! +nim--suggest-get-temp-file-name-a (path)
"Removes invalid characters from the temp file path, including the unicode "Removes invalid characters from the temp file path, including the unicode