(forward-line 1) ; does the line after delimiter match REGEXP?
(re-search-backward regexp beg t))))
-(defun Info-find-file (filename &optional noerror)
+(defun Info-find-file (filename &optional noerror no-pop-to-dir)
"Return expanded FILENAME, or t if FILENAME is \"dir\".
Optional second argument NOERROR, if t, means if file is not found
-just return nil (no error)."
+just return nil (no error).
+
+If NO-POP-TO-DIR, don't try to pop to the info buffer if we can't
+find a node."
;; Convert filename to lower case if not found as specified.
;; Expand it.
(cond
(if noerror
(setq filename nil)
;; If there is no previous Info file, go to the directory.
- (unless Info-current-file
+ (when (and (not no-pop-to-dir)
+ (not Info-current-file))
(Info-directory))
(user-error "Info file %s does not exist" filename)))
filename))))
(lambda (string pred action)
(complete-with-action
action
- (Info-build-node-completions (Info-find-file file1))
+ (Info-build-node-completions (Info-find-file file1 nil t))
string pred))
nodename predicate code))))
;; Otherwise use Info-read-node-completion-table.
This function is a sentinel watching the SQL interpreter process.
Sentinels will always get the two parameters PROCESS and EVENT."
- (with-current-buffer (process-buffer process)
- (let
- ((comint-input-ring-separator sql-input-ring-separator)
- (comint-input-ring-file-name sql-input-ring-file-name))
- (comint-write-input-ring))
-
- (if (not buffer-read-only)
- (insert (format "\nProcess %s %s\n" process event))
- (message "Process %s %s" process event))))
+ (when (buffer-live-p (process-buffer process))
+ (with-current-buffer (process-buffer process)
+ (let
+ ((comint-input-ring-separator sql-input-ring-separator)
+ (comint-input-ring-file-name sql-input-ring-file-name))
+ (comint-write-input-ring))
+
+ (if (not buffer-read-only)
+ (insert (format "\nProcess %s %s\n" process event))
+ (message "Process %s %s" process event)))))
\f