Function: php-ts-mode-show-ini
php-ts-mode-show-ini is an interactive and byte-compiled function
defined in php-ts-mode.el.gz.
Signature
(php-ts-mode-show-ini)
Documentation
Pop a buffer showing the PHP configuration file names.
Probably introduced at or before Emacs version 31.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/php-ts-mode.el.gz
(defun php-ts-mode-show-ini ()
"Pop a buffer showing the PHP configuration file names."
(interactive)
(let ((buffer (get-buffer-create "*PHP ini*"))
(button-action (lambda (_) (find-file-at-point)))
(remote (file-remote-p default-directory)))
(with-current-buffer buffer
(view-mode -1)
(erase-buffer)
(shell-command (concat (php-ts-mode--executable) " --ini") buffer)
;; Remove useless ',' at end of some rows.
(while (re-search-forward "," nil t)
(replace-match "" nil nil))
(goto-char (point-min))
(while (re-search-forward
"[a-zA-Z]?[:]?[/\\].+"
nil t)
(let ((start (match-beginning 0))
(end (match-end 0)))
;; If PHP is on a remote machine, the path must be preceded
;; by the remote identifier.
(when remote
(goto-char start)
(insert remote)
(setq end (+ end (length remote)))
(goto-char end))
(make-button start end 'action button-action)))
(goto-char (point-min))
(view-mode +1))
(when buffer
(pop-to-buffer buffer))))