+2011-12-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/prolog.el (prolog-find-value-by-system): Avoid error when
+ there's no inferior buffer (bug#10196).
+ (prolog-consult-compile): Don't use toggle-read-only.
+
2011-12-02 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-maybe-open-connection): Handle user
(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)
;; 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))