diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-12-02 23:12:11 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-12-02 23:12:11 -0500 |
commit | 5c3fe83faf7d7ee5e67a04984cc4cde55138c280 (patch) | |
tree | 10663d033f9cc2c7d39cdeef8aaa10d670b0b478 /lisp/progmodes/prolog.el | |
parent | 63e94eb8188788a857c08890a2796fde1ede5ad3 (diff) | |
download | emacs-5c3fe83faf7d7ee5e67a04984cc4cde55138c280.tar.gz |
* lisp/progmodes/prolog.el (prolog-find-value-by-system): Avoid error when
there's no inferior buffer.
(prolog-consult-compile): Don't use toggle-read-only.
Fixes: debbugs:10196
Diffstat (limited to 'lisp/progmodes/prolog.el')
-rw-r--r-- | lisp/progmodes/prolog.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 24ca78ad4ef..5b229cc0c24 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -868,8 +868,9 @@ VERSION is of the format (Major . Minor)" (defun prolog-find-value-by-system (alist) "Get value from ALIST according to `prolog-system'." (let ((system (or prolog-system - (buffer-local-value 'prolog-system - (prolog-inferior-buffer 'dont-run))))) + (let ((infbuf (prolog-inferior-buffer 'dont-run))) + (when infbuf + (buffer-local-value 'prolog-system infbuf)))))) (if (listp alist) (let (result id) @@ -1522,7 +1523,7 @@ This function must be called from the source code buffer." ;; Emacs-20). (set (make-local-variable 'compilation-parse-errors-function) 'prolog-parse-sicstus-compilation-errors)) - (toggle-read-only 0) + (setq buffer-read-only nil) (insert command-string "\n")) (save-selected-window (pop-to-buffer buffer)) |