1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

250 Commits

Author SHA1 Message Date
Glenn Morris
9ac6d28ab8 Merge from emacs-24; up to 2014-06-11T19:33:14Z!rgm@gnu.org 2014-06-25 23:55:15 -07:00
Stefan Monnier
50f2908126 * lisp/help-fns.el (describe-function-1): Check file-name is a string before
calling help-fns--autoloaded-p.

Fixes: debbugs:17564
2014-06-24 20:48:10 -04:00
Glenn Morris
fb3f83f5fd Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org 2014-05-07 20:41:21 -07:00
Glenn Morris
6da8d06975 * lisp/help-fns.el (describe-function-1): Test for an autoload before a macro
since `macrop' works on autoloads. 

* test/automated/help-fns.el: New file.

Fixes: debbugs:17410
2014-05-05 17:33:07 -04:00
Glenn Morris
f9c81e7b48 Include interactive-only information in describe-function output
* lisp/help-fns.el (help-fns--interactive-only): New function.
(help-fns-describe-function-functions): Add the above function.

* lisp/simple.el (beginning-of-buffer, end-of-buffer, insert-buffer)
(next-line, previous-line): Remove hand-written interactive-only
information from doc strings, it is auto-generated now.

* lisp/bookmark.el (bookmark-write):
* lisp/epa-mail.el (epa-mail-decrypt, epa-mail-verify, epa-mail-sign)
(epa-mail-import-keys): Mark interactive-only,
and remove hand-written interactive-only information from doc strings.

* lisp/epa.el (epa-decrypt-armor-in-region, epa-verify-region)
(epa-verify-cleartext-in-region, epa-sign-region, epa-encrypt-region):
* lisp/files.el (not-modified):
* lisp/simple.el (mark-whole-buffer): Mark interactive-only.

* doc/lispref/commands.texi (Defining Commands):
Mention that interactive-only also affects describe-function.

* etc/NEWS: Mention this.
2014-03-22 15:36:29 -07:00
Glenn Morris
56759cf12a Move some help functions from help-fns.el to help.el, which is preloaded.
They are now needed by eg the function `documentation' in some circumstances.

* lisp/help-fns.el (help-split-fundoc, help-add-fundoc-usage)
(help-function-arglist, help-make-usage): Move from here...

* lisp/help.el (help-split-fundoc, help-add-fundoc-usage)
(help-function-arglist, help-make-usage): ... to here. 

* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Do not load help-fns.

Fixes: debbugs:17001
2014-03-13 20:32:41 -04:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Glenn Morris
dd8e49fda2 * lisp/help-fns.el (describe-variable):
Check {file,dir}-local-variables-alist, and buffer-file-name,
in the correct buffer.

This seems to have Just Worked in 24.3 - when and why did it change?
2014-02-07 21:55:04 -05:00
Ingo Lohmar
7e088b2959 * help-fns.el (describe-variable): Fix case where value is directory-local
with no dir-locals file.

Fixes: debbugs:16635
2014-02-07 21:18:31 -05:00
Stefan Monnier
70e5a261ac * lisp/help-fns.el (help-C-file-name): Handle advised functions.
* lisp/emacs-lisp/find-func.el (find-function-C-source): Idem.
* lisp/emacs-lisp/nadvice.el (advice--cd*r): New function.
* help-fns.el (describe-function-1): Use it.

Fixes: debbugs:16478
2014-02-01 21:25:05 -05:00
David Engster
abb82152dc Add new hook to augment help buffers.
* help-fns.el (help-fns-describe-function-functions): New variable to
call functions for augmenting help buffers.
(describe-function-1): Remove explicit calls to
`help-fns--compiler-macro', `help-fns--parent-mode' and
`help-fns--obsolete'.  Put them in above new variable instead.  Call
all of them through `run-hook-with-args'.
2014-01-07 21:40:44 +01:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Tassilo Horn
faec28d908 Fix describe-function with advised functions.
* lisp/help-fns.el (describe-function-1): Use new advice-* functions
rather than old ad-* functions.  Fix function type description and
source links for advised functions and subrs.
2013-12-07 18:05:38 +01:00
Juanma Barranquero
05e7ce9037 lisp/help-fns.el (describe-variable): Add extra line for permanent-local vars. 2013-06-15 03:12:05 +02:00
Stefan Monnier
cf4e5178a3 * lisp/help-fns.el (help-fns--compiler-macro): If the handler function is
named, then put a link to it.
* lisp/help-mode.el (help-function-cmacro): Adjust regexp for cl-lib names.
* lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-typep): New function.
(cl-typep): Use it.
(cl-eval-when): Simplify debug spec.
(cl-define-compiler-macro): Use eval-and-compile.  Give a name to the
compiler-macro function instead of setting `compiler-macro-file'.
2013-06-11 22:16:02 -04:00
Glenn Morris
6a378d89c5 * help-fns.el (find-lisp-object-file-name): Give special treatment
to all ~/.foo.elc files, not just ~/.emacs.

Fixes: debbugs:9007
2013-02-14 00:05:26 -08:00
Stefan Monnier
686d9fb678 * lisp/help-fns.el (help-split-fundoc): Don't insert byte-compiled body. 2013-02-01 10:56:22 -05:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Chong Yidong
f5733f8759 * help-fns.el (describe-variable): Make sure we get the right buffer name.
Suggested by Kelly Dean.

Fixes: debbugs:13105
2012-12-21 11:37:02 +08:00
Stefan Monnier
06485aa821 * src/doc.c (get_doc_string): Don't signal an error if the file is missing.
* lisp/help-fns.el (describe-variable, describe-function-1):
* lisp/help-mode.el (help-make-xrefs): Remove error handler, made unneeded.
2012-10-12 16:11:50 -04:00
Stefan Monnier
d8cc4c00ea * lisp/help-fns.el (describe-function-1): Handle autoloads w/o docstrings.
* lisp/emacs-lisp/cl-lib.el (cl--defsubst-expand): Move autoload...
* lisp/emacs-lisp/cl-macs.el (cl--defsubst-expand): ...here.
2012-10-11 16:11:23 -04:00
Chong Yidong
c4c0c2dff6 * help-fns.el (help-fns--obsolete): Fix last change. 2012-09-30 16:24:56 +08:00
Chong Yidong
863666ebae Minor fixes for the function obsolescence feature.
* lisp/help-fns.el (help-fns--obsolete): Handle macros properly.

* lisp/subr.el (declare): Doc fix.
2012-09-25 13:33:43 +08:00
Bastien Guerry
04e8abfa69 * help-fns.el (describe-variable): Fix typo. (bug#12346) 2012-09-11 15:43:06 +02:00
Christopher Schmidt
80a51fa01f * help-fns.el (help-fns--key-bindings): Abbreviate non-symbol remap targets.
Fixes: debbugs:12174
2012-08-22 00:02:15 -07:00
Stefan Monnier
f91b35be60 * lisp/help-fns.el (help-fns--key-bindings, help-fns--signature)
(help-fns--parent-mode, help-fns--obsolete): New funs, extracted from
describe-function-1.
(describe-function-1): Use them.  Move compiler macro after sig.
(help-fns--compiler-macro): Use function-get.  Assume we're already in
standard-output.  Adjust layout to new call order.
2012-08-06 17:05:48 -04:00
Chong Yidong
f0422feb64 Improvements to local-variable reporting in `describe-variable'.
* lisp/help-fns.el (describe-variable): Add hyperlink for
directory-local variables files.  Improve buffer-local and
permanent-local reporting; suggested by MON KEY.

* lisp/help-mode.el (help-dir-local-var-def): New button type.

Fixes: debbugs:6644
2012-08-05 16:41:12 +08:00
Stefan Monnier
7abaf5ccc9 Autoload more carefully from Lisp. Follow aliases for function properties.
* lisp/subr.el (autoloadp): New function.
(symbol-file): Use it.
(function-get): New function.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
autoload-do-load.
* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
(lisp-indent-function):
* lisp/emacs-lisp/gv.el (gv-get):
* lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
* lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form):
Use function-get.
* lisp/emacs-lisp/cl.el: Don't propagate function properties any more.

* src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
add argument, tune behavior, and adjust all callers.

* lisp/speedbar.el (speedbar-add-localized-speedbar-support):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/desktop.el (desktop-load-file):
* lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name)
(describe-function-1):
* lisp/emacs-lisp/find-func.el (find-function-noselect):
* lisp/emacs-lisp/elp.el (elp-instrument-function):
* lisp/emacs-lisp/advice.el (ad-has-proper-definition):
* lisp/apropos.el (apropos-safe-documentation, apropos-macrop):
* lisp/emacs-lisp/debug.el (debug-on-entry):
* lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
2012-07-25 21:27:33 -04:00
Chong Yidong
dea31bd311 Give permanent-local property to per-buffer variables without defaults.
* doc/emacs/custom.texi (Examining): Update C-h v message.

* lisp/bindings.el: Assign a non-nil permanent-local property to
per-buffer variables which lack a default value.

* lisp/help-fns.el (describe-variable): In the "automatically becomes
local" notice, take note of permanent-local variables.

Fixes: debbugs:11930
2012-07-13 22:25:59 +08:00
Andreas Schwab
b9d8233998 Fixes: debbugs:11848
* help-fns.el (describe-function-1): Only call
help-fns--autoloaded-p when we have a file name.
2012-07-03 09:12:22 +02:00
Chong Yidong
c89926a5f1 Let C-h f do autoloading, and report if a function was previously autoloaded.
* lisp/help-fns.el (help-fns--autoloaded-p): New function.
(describe-function-1): Refer to a function as "autoloaded" if it
was autoloaded at any time in the past.  Perform autoloading if
help-enable-auto-load is non-nil.

* lisp/help.el (help-enable-auto-load): New variable.

* src/doc.c (Fsubstitute_command_keys): Fix punctuation.
2012-06-27 13:47:14 +08:00
Stefan Monnier
dc5d230cac Miscellaneous minor cleanups and simplifications.
* lisp/help-fns.el (describe-variable): Don't croak when doc is not found.
* lisp/vc/pcvs.el (cvs-retrieve-revision): Avoid toggle-read-only.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Purecopy a tiny bit more.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Simplify with new `if' place.
* lisp/emacs-lisp/smie.el (smie-next-sexp): CSE.
* lisp/emacs-lisp/macroexp.el (macroexp-let2): Fix edebug spec and avoid
((lambda ..) ..).
* lisp/emacs-lisp/eieio.el (eieio-oref, slot-value): Use simpler defsetf.
2012-06-23 11:38:23 -04:00
Stefan Monnier
71adb94b71 Fix compiler-expansion of CL's cXXr functions.
* emacs-lisp/cl-lib.el (cl--defalias): New function.
(cl-values, cl-values-list, cl-copy-seq, cl-svref, cl-first)
(cl-second, cl-rest, cl-endp, cl-third, cl-fourth): Use it.
(cl-plusp, cl-minusp, cl-fifth, cl-sixth, cl-seventh, cl-eighth)
(cl-ninth, cl-tenth): Mark them as inlinable.
(cl-caaar, cl-caadr, cl-cadar, cl-caddr, cl-cdaar, cl-cdadr)
(cl-cddar, cl-cdddr, cl-caaaar, cl-caaadr, cl-caadar, cl-caaddr)
(cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr, cl-cdaaar, cl-cdaadr)
(cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr, cl-cdddar, cl-cddddr):
Add a compiler-macro declaration to use cl--compiler-macro-cXXr.
(cl-list*, cl-adjoin): Don't put an autoload manually.
* emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin)
(cl--compiler-macro-list*): Add autoload cookie.
(cl--compiler-macro-cXXr): New function.
* help-fns.el (help-fns--compiler-macro): New function extracted from
describe-function-1; follow aliases and use `compiler-macro' property.
(describe-function-1): Use it.

Fixes: debbugs:11673
2012-06-11 16:35:00 -04:00
Stefan Monnier
bb3faf5b98 Use lexical-binding for all of CL, and clean up its namespace.
* lisp/emacs-lisp/cl-lib.el: Use lexical-binding.
(cl-map-extents, cl-maclisp-member): Remove.
(cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring)
(cl--set-substring, cl--block-wrapper, cl--block-throw)
(cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix.
* lisp/emacs-lisp/cl-extra.el: Use lexical-binding.
(cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals)
(cl--map-overlays, cl--set-frame-visible-p, cl--progv-save)
(cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf)
(cl--do-remf, cl--do-prettyprint): Use "cl--" prefix.
* lisp/emacs-lisp/cl-seq.el: Use lexical-binding.
(cl--parsing-keywords, cl--check-key, cl--check-test-nokey)
(cl--check-test, cl--check-match): Use "cl--" prefix and backquotes.
(cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec):
* lisp/emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix.
* lisp/edmacro.el (edmacro-mismatch): Simplify to remove dependence on
CL's internals.
2012-06-11 11:52:50 -04:00
Chong Yidong
07498861ae * help-fns.el (describe-function-1): Clarify description of remapping.
Fixes: debbugs:10844
2012-02-26 17:24:13 +08:00
Chong Yidong
6c1e4b4642 Update Loading chapter of Emacs manual.
* doc/emacs/loading.texi (Loading): Don't emphasize "library" terminology.
(Library Search): load-path is not a user option.  Mention role of
-L option and packages.  Improve examples.
(Loading Non-ASCII): Don't mention unibyte Emacs, which is
obsolete.
(Autoload): Minor clarifications.
2012-02-10 15:57:21 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
91af3942e9 Spelling fixes. 2011-11-14 15:59:56 -08:00
Stefan Monnier
673e08bbd4 * lisp/emacs-lisp/cl-macs.el (cl--make-usage-var, cl--make-usage-args):
New functions.
(cl-transform-lambda): Use them.

Fixes: debbugs:9239
2011-08-05 12:31:21 -04:00
Stefan Monnier
e2b551c50e * lisp/help-fns.el (describe-variable): Fix message for terminal-local vars. 2011-06-27 17:39:03 -04:00
Stefan Monnier
2403c841a8 Silence various byte-compiler warnings.
* lisp/emacs-lisp/byte-run.el (make-obsolete-variable): New argument
`access-type' and new obsolescence format.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Adjust to
new format.
(byte-compile-check-variable): New `access-type' argument.
Only warn if the access-type is obsolete.
(byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
(byte-compile-variable-set): Adjust callers.
* lisp/help-fns.el (describe-variable): Adjust to new obsolescence format.
* lisp/mail/sendmail.el (mail-mailer-swallows-blank-line): Only mark
setting it as obsolete.
* lisp/simple.el (minibuffer-completing-symbol):
* lisp/font-lock.el (font-lock-beginning-of-syntax-function): Only mark read
access as obsolete.
* lisp/minibuffer.el (minibuffer-completing-file-name): Don't make it
obsolete yet.
* lisp/international/quail.el (quail-mouse-choose-completion): Remove unused
code referring to obsolete var.
(quail-choose-completion-string): Remove.
* lisp/server.el (server-clients-with, server-kill-buffer-query-function)
(server-kill-emacs-query-function): Silence "unused `proc'" warnings.
* lisp/proced.el (proced-send-signal):
* lisp/emacs-lisp/lisp.el (lisp-complete-symbol):
Replace completion-annotate-function with completion-extra-properties.
2011-06-01 16:32:04 -03:00
Stefan Monnier
2462470b9e Miscellaneous tweaks.
* lisp/emacs-lisp/cl-macs.el (dolist, dotimes): Use the same strategy for
lexical scoping as in subr.el's dolist and dotimes.
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Silence compiler warning.
* lisp/thingatpt.el (forward-whitespace): Trivial coding style fix.
* lisp/subr.el (with-output-to-temp-buffer): Provide an edebug spec.
* lisp/international/ccl.el (ccl-compile): Trivial simplification.
* lisp/help-fns.el (help-do-arg-highlight): Silence compiler warning.
* lisp/emacs-lisp/testcover.el (testcover-end): Remove spurious
`printflag' argument.
* lisp/emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy the whole obsolescence data.
2011-06-01 11:19:45 -03:00
Chong Yidong
5199bde177 In describe-function, print the parent of a derived mode.
* lisp/help-fns.el (describe-function-1): If the function is a derived
major mode, print the parent mode.
2011-05-28 13:40:37 -04:00
Stefan Monnier
c2bd2ab028 Preserve arg names for advice of subr and lexical functions.
* lisp/help-fns.el (help-function-arglist): Consolidate the subr and
new-byte-code cases.  Add argument `preserve-names' to extract names
from the docstring when needed.
* lisp/emacs-lisp/advice.el (ad-define-subr-args, ad-undefine-subr-args)
(ad-subr-args-defined-p, ad-get-subr-args, ad-subr-arglist): Remove.
(ad-arglist): Use help-function-arglist's new arg.
(ad-definition-type): Use cond.

Fixes: debbugs:8457
2011-04-13 14:56:47 -03:00
Juanma Barranquero
6f4e1aedda lisp/help-fns.el: Fix mistake in previous change. 2011-04-05 00:33:12 +02:00
Juanma Barranquero
8d17e7ca1f lisp/help-fns.el (describe-variable): Fix completion.
http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00112.html
2011-04-05 00:08:01 +02:00
Juanma Barranquero
2fbc1934ae Convert some .el files to lexical scoping.
* bs.el (bs-refresh, bs-sort-buffer-interns-are-last)
  (bs--get-marked-string, bs--get-modified-string)
  (bs--get-readonly-string, bs--get-size-string, bs--get-name)
  (bs--get-mode-name, bs--get-file-name): Mark unused arguments.
  (bs--configuration-name-for-prefix-arg): Rename argument PREFIX-ARG.

* ehelp.el (electric-help-execute-extended)
  (electric-help-ctrl-x-prefix):
* hexl.el (hexl-revert-buffer-function):
* linum.el (linum-after-change, linum-after-scroll):
* emacs-lisp/re-builder.el (reb-auto-update): Mark unused arguments.

* help-fns.el (help-describe-category-set): Remove unused ERR variable.
2011-04-04 11:35:16 +02:00
Stefan Monnier
cafdcef32d Merge from trunk 2011-03-21 12:42:16 -04:00
Kevin Ryde
047b2bb9a2 * lisp/help-fns.el (variable-at-point): Skip leading quotes, if any
(bug#8253).
2011-03-14 22:36:07 -04:00