Function: kbd-key:mark-spaces-to-keep

kbd-key:mark-spaces-to-keep is a byte-compiled function defined in hib-kbd.el.

Signature

(kbd-key:mark-spaces-to-keep STRING START-DELIM END-DELIM)

Documentation

Return STRING with all spaces between START-DELIM and END-DELIM marked to keep.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-kbd.el
(defun kbd-key:mark-spaces-to-keep (string start-delim end-delim)
  "Return STRING with all spaces between START-DELIM and END-DELIM marked to keep."
  (let ((regexp (format "\\(%s[^ \t\n\r\f]*\\)[ \t\n\r\f]\\(.*%s\\)"
			start-delim end-delim))
	(start 0)
	(end)
	(substring))
    (while (string-match regexp string start)
      (setq start (match-beginning 0)
	    end (match-end 0)
	    substring (match-string 0 string)
	    string (concat (substring string 0 start)
			   (replace-regexp-in-string "[ \t\n\r\f]" "\0\0\0" substring nil t)
			   (if (< end (length string))
			       (substring string end)
			     ""))
	    start end))
    string))