diff options
author | Alan Pearce | 2014-04-01 21:58:28 +0100 |
---|---|---|
committer | Alan Pearce | 2014-04-01 21:58:28 +0100 |
commit | 4f58f906a49721af4b5e834db1f6ba5b4db2839a (patch) | |
tree | 1da74c3d14758c69589d0b18ca06a11338e226f5 /emacs/elisp | |
parent | e5a860c3b64437f3766cc6ea5af0a1111800635f (diff) | |
download | nixfiles-4f58f906a49721af4b5e834db1f6ba5b4db2839a.tar.lz nixfiles-4f58f906a49721af4b5e834db1f6ba5b4db2839a.tar.zst nixfiles-4f58f906a49721af4b5e834db1f6ba5b4db2839a.zip |
Emacs: Replace buggy eldoc-php with php-extras
Diffstat (limited to 'emacs/elisp')
-rw-r--r-- | emacs/elisp/eldoc-php.el | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/emacs/elisp/eldoc-php.el b/emacs/elisp/eldoc-php.el deleted file mode 100644 index 8101fea0..00000000 --- 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 "<div class=\"methodsynopsis dc-description\">\\(\\(.\\|\n\\)*?\\)</div>" nil t) - (setq desc - (replace-regexp-in-string - " +" " " - (replace-regexp-in-string - "\n" "" - (replace-regexp-in-string "<.*?>" "" (match-string-no-properties 1))))) - ;; Don't show the function description - ;; (when (re-search-forward "<p class=\"para rdfs-comment\">\\(\\(.\\|\n\\)*?\\)</p>" 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)))) |