From 4f58f906a49721af4b5e834db1f6ba5b4db2839a Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 1 Apr 2014 21:58:28 +0100 Subject: Emacs: Replace buggy eldoc-php with php-extras --- emacs/elisp/eldoc-php.el | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 emacs/elisp/eldoc-php.el (limited to 'emacs/elisp/eldoc-php.el') diff --git a/emacs/elisp/eldoc-php.el b/emacs/elisp/eldoc-php.el deleted file mode 100644 index 8101fea..0000000 --- a/emacs/elisp/eldoc-php.el +++ /dev/null @@ -1,48 +0,0 @@ -(require 'xml) -(provide 'eldoc-php) - -(setq my-php-function-doc-hash (make-hash-table :test 'equal)) - - -(defun my-php-fetch-function-doc (function) - (let ((doc (gethash function my-php-function-doc-hash 'nope))) - (when (eq doc 'nope) - (setq doc nil) - - (let ((buf (url-retrieve-synchronously (concat "http://uk3.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 - (setq doc (xml-substitute-special desc))))) - - (kill-buffer buf)) - - (puthash function doc my-php-function-doc-hash)) - - doc)) - - -(defun my-php-eldoc-function () - (let ((symbol (thing-at-point 'symbol))) - (if (and symbol - (not (eq (elt symbol 0) ?$))) - (my-php-fetch-function-doc symbol)))) -- cgit 1.4.1