diff options
| author | Chong Yidong | 2014-01-03 13:37:58 +0800 |
|---|---|---|
| committer | Chong Yidong | 2014-01-03 13:37:58 +0800 |
| commit | 0d53f628be877abf2da4693df620d91d474ec058 (patch) | |
| tree | 338b0147ef2192cb087849636437d287ea032012 /lisp/progmodes/sql.el | |
| parent | 6ef9aed822746c3daf05313bbc0df7dfa9f08171 (diff) | |
| download | emacs-0d53f628be877abf2da4693df620d91d474ec058.tar.gz emacs-0d53f628be877abf2da4693df620d91d474ec058.zip | |
Remove the dynamic-docstring-function feature.
* emacs-lisp/advice.el (ad--make-advised-docstring): Change args.
Ignore function-documentation property when getting documentation.
(ad-activate-advised-definition): Use function-documentation
generate the docstring.
(ad-make-advised-definition): Don't call
ad-make-advised-definition-docstring.
(ad-make-advised-definition-docstring, ad-advised-definition-p):
Delete functions.
* emacs-lisp/nadvice.el (advice--make-docstring): Change args.
(advice--docstring): Delete variable.
(advice--make-1): Leave the docstring empty.
(advice-add): Use function-documentation for advised docstring.
* progmodes/sql.el (sql-help): Use function-documentation instead
of dynamic-docstring-function property. No need to autoload now.
(sql--help-docstring): New variable.
(sql--make-help-docstring): Use it.
* doc.c (Fdocumentation): Remove dynamic-docstring-function.
Diffstat (limited to 'lisp/progmodes/sql.el')
| -rw-r--r-- | lisp/progmodes/sql.el | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d92d6a66ed2..eb8e0760e25 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -2826,14 +2826,14 @@ each line with INDENT." | |||
| 2826 | "]\n")))) | 2826 | "]\n")))) |
| 2827 | doc)) | 2827 | doc)) |
| 2828 | 2828 | ||
| 2829 | ;;;###autoload | 2829 | (defun sql-help () |
| 2830 | (eval | 2830 | "Show short help for the SQL modes." |
| 2831 | ;; FIXME: This dynamic-docstring-function trick doesn't work for byte-compiled | 2831 | (interactive) |
| 2832 | ;; functions, because of the lazy-loading of docstrings, which strips away | 2832 | (describe-function 'sql-help)) |
| 2833 | ;; text properties. | 2833 | (put 'sql-help 'function-documentation '(sql--make-help-docstring)) |
| 2834 | '(defun sql-help () | ||
| 2835 | #("Show short help for the SQL modes. | ||
| 2836 | 2834 | ||
| 2835 | (defvar sql--help-docstring | ||
| 2836 | "Show short help for the SQL modes. | ||
| 2837 | Use an entry function to open an interactive SQL buffer. This buffer is | 2837 | Use an entry function to open an interactive SQL buffer. This buffer is |
| 2838 | usually named `*SQL*'. The name of the major mode is SQLi. | 2838 | usually named `*SQL*'. The name of the major mode is SQLi. |
| 2839 | 2839 | ||
| @@ -2862,24 +2862,20 @@ anything. The name of the major mode is SQL. | |||
| 2862 | 2862 | ||
| 2863 | In this SQL buffer (SQL mode), you can send the region or the entire | 2863 | In this SQL buffer (SQL mode), you can send the region or the entire |
| 2864 | buffer to the interactive SQL buffer (SQLi mode). The results are | 2864 | buffer to the interactive SQL buffer (SQLi mode). The results are |
| 2865 | appended to the SQLi buffer without disturbing your SQL buffer." | 2865 | appended to the SQLi buffer without disturbing your SQL buffer.") |
| 2866 | 0 1 (dynamic-docstring-function sql--make-help-docstring)) | 2866 | |
| 2867 | (interactive) | 2867 | (defun sql--make-help-docstring () |
| 2868 | (describe-function 'sql-help))) | 2868 | "Return a docstring for `sql-help' listing loaded SQL products." |
| 2869 | 2869 | (let ((doc sql--help-docstring)) | |
| 2870 | (defun sql--make-help-docstring (doc _fun) | 2870 | ;; Insert FREE software list |
| 2871 | "Insert references to loaded products into the help buffer string." | 2871 | (when (string-match "^\\(\\s-*\\)[\\\\][\\\\]FREE\\s-*$" doc 0) |
| 2872 | 2872 | (setq doc (replace-match (sql-help-list-products (match-string 1 doc) t) | |
| 2873 | ;; Insert FREE software list | 2873 | t t doc 0))) |
| 2874 | (when (string-match "^\\(\\s-*\\)[\\\\][\\\\]FREE\\s-*\n" doc 0) | 2874 | ;; Insert non-FREE software list |
| 2875 | (setq doc (replace-match (sql-help-list-products (match-string 1 doc) t) | 2875 | (when (string-match "^\\(\\s-*\\)[\\\\][\\\\]NONFREE\\s-*$" doc 0) |
| 2876 | t t doc 0))) | 2876 | (setq doc (replace-match (sql-help-list-products (match-string 1 doc) nil) |
| 2877 | 2877 | t t doc 0))) | |
| 2878 | ;; Insert non-FREE software list | 2878 | doc)) |
| 2879 | (when (string-match "^\\(\\s-*\\)[\\\\][\\\\]NONFREE\\s-*\n" doc 0) | ||
| 2880 | (setq doc (replace-match (sql-help-list-products (match-string 1 doc) nil) | ||
| 2881 | t t doc 0))) | ||
| 2882 | doc) | ||
| 2883 | 2879 | ||
| 2884 | (defun sql-default-value (var) | 2880 | (defun sql-default-value (var) |
| 2885 | "Fetch the value of a variable. | 2881 | "Fetch the value of a variable. |