Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaad6fe commit 023bf79Copy full SHA for 023bf79
psci.el
@@ -148,10 +148,12 @@
148
"The default file referencing the purescript modules to load at psci startup.")
149
150
(defun psci/--file-content (filename)
151
- "Load the FILENAME's content as a string."
152
- (with-temp-buffer
153
- (insert-file-contents filename)
154
- (buffer-substring-no-properties (point-min) (point-max))))
+ "Load the FILENAME's content as a string.
+When FILENAME is nil or not a real file, returns nil."
+ (when (and filename (file-exists-p filename))
+ (with-temp-buffer
155
+ (insert-file-contents filename)
156
+ (buffer-substring-no-properties (point-min) (point-max)))))
157
158
(defun psci/--symbol (sym n)
159
"Compute the repetition of a symbol SYM N times as a string."
0 commit comments