We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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