X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d7aff0d6929c16d15992304dd44c5f528df8f895..d5ccb7be025ddc5a6ac8c5291d89596b78d9745c:/lisp/subr.el?ds=sidebyside diff --git a/lisp/subr.el b/lisp/subr.el index 31798b4484..d86469dd15 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1885,9 +1885,11 @@ Signal an error if the program returns with a non-zero exit status." (defun process-live-p (process) "Returns non-nil if PROCESS is alive. A process is considered alive if its status is `run', `open', -`listen', `connect' or `stop'." - (memq (process-status process) - '(run open listen connect stop))) +`listen', `connect' or `stop'. Value is nil if PROCESS is not a +process." + (and (processp process) + (memq (process-status process) + '(run open listen connect stop)))) ;; compatibility @@ -2036,6 +2038,7 @@ by doing (clear-string STRING)." (setq-local select-active-regions nil) (use-local-map read-passwd-map) (setq-local inhibit-modification-hooks nil) ;bug#15501. + (setq-local show-paren-mode nil) ;bug#16091. (add-hook 'after-change-functions hide-chars-fun nil 'local)) (unwind-protect (let ((enable-recursive-minibuffers t)) @@ -3635,6 +3638,15 @@ to case differences." (eq t (compare-strings str1 nil nil str2 0 (length str1) ignore-case))) +(defun string-suffix-p (suffix string &optional ignore-case) + "Return non-nil if SUFFIX is a suffix of STRING. +If IGNORE-CASE is non-nil, the comparison is done without paying +attention to case differences." + (let ((start-pos (- (length string) (length suffix)))) + (and (>= start-pos 0) + (eq t (compare-strings suffix nil nil + string start-pos nil ignore-case))))) + (defun bidi-string-mark-left-to-right (str) "Return a string that can be safely inserted in left-to-right text.