(require-package 'php-mode) (require-package 'smarty-mode) ;; From EmacsWiki: https://www.emacswiki.org/emacs/PhpMode (defun my/php-symbol-lookup () (interactive) (let ((symbol (symbol-at-point))) (if (not symbol) (message "No symbol at point.") (browse-url (concat "https://php.net/manual-lookup.php?pattern=" (symbol-name symbol)))))) (defun my/php-function-lookup () (interactive) (let* ((function (symbol-name (or (symbol-at-point) (error "No function at point.")))) (buf (url-retrieve-synchronously (concat "https://php.net/manual-lookup.php?pattern=" function)))) (with-current-buffer buf (goto-char (point-min)) (let (desc) (when (re-search-forward "
\\(\\(.\\|\n\\)*?\\)
" nil t) (setq desc (concat desc "\n\n" (replace-regexp-in-string " +" " " (replace-regexp-in-string "\n" "" (replace-regexp-in-string "<.*?>" "" (match-string-no-properties 1)))))))) (if desc (message desc) (message "Could not extract function info. Press C-F1 to go the description.")))) (kill-buffer buf))) (require-package 'ac-php) (defun my/php-mode-stuff () (local-set-key (kbd "