diff options
| author | John Wiegley | 2016-01-18 22:59:51 -0800 |
|---|---|---|
| committer | John Wiegley | 2016-01-18 22:59:51 -0800 |
| commit | 1b76d9168336ede8976b980aeaed64ae2908501a (patch) | |
| tree | 749e3c082a8575eee1888ba9e61e1aeaa70d0dbc /doc | |
| parent | bca49307c8ea3f96d6eede375a7f42091ae5d5af (diff) | |
| parent | 2e5a89fad151f8efa97aea3f400823a95bee6289 (diff) | |
| download | emacs-1b76d9168336ede8976b980aeaed64ae2908501a.tar.gz emacs-1b76d9168336ede8976b980aeaed64ae2908501a.zip | |
-
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/maintaining.texi | 180 | ||||
| -rw-r--r-- | doc/emacs/programs.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 49 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 119 | ||||
| -rw-r--r-- | doc/lispref/lists.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 18 | ||||
| -rw-r--r-- | doc/lispref/macros.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/symbols.texi | 17 |
11 files changed, 288 insertions, 137 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 8842b8ea2f5..989d8ff7485 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -1686,19 +1686,38 @@ permitted provided the copyright notice and this notice are preserved. | |||
| 1686 | Of course, you should substitute the proper years and copyright holder. | 1686 | Of course, you should substitute the proper years and copyright holder. |
| 1687 | 1687 | ||
| 1688 | @node Xref | 1688 | @node Xref |
| 1689 | @section Find Identifier Definitions and References | 1689 | @section Find Identifier References |
| 1690 | @cindex xref | 1690 | @cindex xref |
| 1691 | 1691 | ||
| 1692 | An @dfn{identifier} is a syntactic elements of the program: a | 1692 | An @dfn{identifier} is a name of a syntactical subunit of the |
| 1693 | function, a subroutine, a method, a class, a data type, a macro, etc. | 1693 | program: a function, a subroutine, a method, a class, a data type, a |
| 1694 | In a programming language, each identifier is a symbol in the | 1694 | macro, etc. In a programming language, each identifier is a symbol in |
| 1695 | language's syntax. Many program development tools provide | 1695 | the language's syntax. Program development and maintenance requires |
| 1696 | capabilities to extract references to identifiers from source files, | 1696 | capabilities to quickly find where each identifier was defined and |
| 1697 | record them on specialized data bases, and then use those data bases | 1697 | referenced, to rename identifiers across the entire project, etc. |
| 1698 | to quickly find where each identifier was defined and referenced. | ||
| 1699 | 1698 | ||
| 1700 | Emacs provides a unified user interface to these tools, called | 1699 | These capabilities are also useful for finding references in major |
| 1701 | @samp{xref}. The tools supported by @samp{xref} include: | 1700 | modes other than those defined to support programming languages. For |
| 1701 | example, chapters, sections, appendices, etc.@: of a text or a @TeX{} | ||
| 1702 | document can be treated as subunits as well, and their names can be | ||
| 1703 | used as identifiers. In this chapter, we use the term ``identifiers'' | ||
| 1704 | to collectively refer to the names of any kind of subunits, in program | ||
| 1705 | source and in other kinds of text alike. | ||
| 1706 | |||
| 1707 | Emacs provides a unified interface to these capabilities, called | ||
| 1708 | @samp{xref}. | ||
| 1709 | |||
| 1710 | @cindex xref backend | ||
| 1711 | To do its job, @code{xref} needs to make use of information and to | ||
| 1712 | employ methods specific to the major mode. What files to search for | ||
| 1713 | identifiers, how to find references to identifiers, how to complete on | ||
| 1714 | identifiers---all this and more is mode-specific knowledge. | ||
| 1715 | @code{xref} delegates the mode-specific parts of its job to a | ||
| 1716 | @dfn{backend} provided by the mode; it also includes defaults for some | ||
| 1717 | of its commands, for those modes that don't provide their own. | ||
| 1718 | |||
| 1719 | A backend can implement its capabilities in a variety of ways. Here | ||
| 1720 | are a few examples: | ||
| 1702 | 1721 | ||
| 1703 | @enumerate a | 1722 | @enumerate a |
| 1704 | @item | 1723 | @item |
| @@ -1706,49 +1725,25 @@ Some major modes provide built-in means for looking up the language | |||
| 1706 | symbols. For example, Emacs Lisp symbols can be identified by | 1725 | symbols. For example, Emacs Lisp symbols can be identified by |
| 1707 | searching the package load history, maintained by the Emacs Lisp | 1726 | searching the package load history, maintained by the Emacs Lisp |
| 1708 | interpreter, and by consulting the built-in documentation strings; the | 1727 | interpreter, and by consulting the built-in documentation strings; the |
| 1709 | Emacs Lisp mode uses these facilities to find definitions of symbols. | 1728 | Emacs Lisp mode uses these facilities in its backend to allow finding |
| 1710 | 1729 | definitions of symbols. (One disadvantage of this kind of backend is | |
| 1711 | @item | 1730 | that it only knows about subunits that were loaded into the |
| 1712 | Etags, the command for tagging identifier definitions which is part of | 1731 | interpreter.) |
| 1713 | the Emacs distribution. @xref{Create Tags Table}. | ||
| 1714 | |||
| 1715 | @item | ||
| 1716 | @acronym{GNU} GLOBAL, the source code tagging system, which provides | ||
| 1717 | the @command{gtags} command and associated utilities. @xref{Command | ||
| 1718 | Line, gtags, , global, GNU GLOBAL source code tag system}. | ||
| 1719 | 1732 | ||
| 1720 | @item | 1733 | @item |
| 1721 | Cscope (@uref{http://cscope.sourceforge.net/}, a tool for browsing | 1734 | An external program can extract references by scanning the relevant |
| 1722 | source code. | 1735 | files, and build a database of these references. A backend can then |
| 1723 | 1736 | access this database whenever it needs to list or look up references. | |
| 1724 | @item | 1737 | The Emacs distribution includes @command{etags}, a command for tagging |
| 1725 | @acronym{GNU} IDUtils, a package for generating databases of | 1738 | identifier definitions in programs, which supports many programming |
| 1726 | identifier references and querying those databases. @xref{Top,,, | 1739 | languages and other major modes, such as HTML, by extracting |
| 1727 | idutils, ID database utilities}. | 1740 | references into @dfn{tags tables}. @xref{Create Tags Table}. Major |
| 1728 | 1741 | modes for languages supported by @command{etags} can use tags tables | |
| 1729 | @item | 1742 | as basis for their backend. (One disadvantage of this kind of backend |
| 1730 | Grep, the venerable program that searches files for lines matching | 1743 | is that tags tables need to be kept reasonably up to date, by |
| 1731 | patterns. @xref{Invoking,,, grep, GNU Grep Manual}. | 1744 | rebuilding them from time to time.) |
| 1732 | @end enumerate | 1745 | @end enumerate |
| 1733 | 1746 | ||
| 1734 | @noindent | ||
| 1735 | Additional tools could be supported as they become available, or as | ||
| 1736 | user extensions. Each such tool is used as a @dfn{backend} by | ||
| 1737 | commands described in this section. Each command detects which | ||
| 1738 | backends are available for the current major mode, and uses the most | ||
| 1739 | capable of the available backends, with Grep generally serving as the | ||
| 1740 | fall-back backend. | ||
| 1741 | |||
| 1742 | @cindex tag | ||
| 1743 | The commands described here are useful for finding references in major | ||
| 1744 | modes other than those defined to support programming languages. For | ||
| 1745 | example, chapters, sections, appendices, etc. of a text or a @TeX{} | ||
| 1746 | document can be treated as identifiers as well. In this chapter, we | ||
| 1747 | collectively refer to a reference that specifies the name of the file | ||
| 1748 | where the corresponding subunit is defined, and the position of the | ||
| 1749 | subunit's definition in that file, as a @dfn{tag}. We refer to the | ||
| 1750 | backends used by @code{xref} as @dfn{tagging backends}. | ||
| 1751 | |||
| 1752 | @menu | 1747 | @menu |
| 1753 | * Find Identifiers:: Commands to find where an identifier is defined | 1748 | * Find Identifiers:: Commands to find where an identifier is defined |
| 1754 | or referenced, to list identifiers, etc. | 1749 | or referenced, to list identifiers, etc. |
| @@ -1759,14 +1754,16 @@ backends used by @code{xref} as @dfn{tagging backends}. | |||
| 1759 | @node Find Identifiers | 1754 | @node Find Identifiers |
| 1760 | @subsection Find Identifiers | 1755 | @subsection Find Identifiers |
| 1761 | 1756 | ||
| 1762 | This subsection describes the commands that use the tagging backends | 1757 | This subsection describes the commands that find references to |
| 1763 | in order to find definitions of identifiers, references to | 1758 | identifiers and perform various queries about identifiers. Each such |
| 1764 | identifiers, and perform various queries about identifiers. With most | 1759 | reference could @emph{define} an identifier, e.g., provide the |
| 1765 | backends, these definitions and references were recorded as tags in | 1760 | implementation of a program subunit or the text of a document section; |
| 1766 | the database created and maintained by the backend. | 1761 | or it could @emph{use} the identifier, e.g., call a function or a |
| 1762 | method, assign a value to a variable, mention a chapter in a | ||
| 1763 | cross-reference, etc. | ||
| 1767 | 1764 | ||
| 1768 | @menu | 1765 | @menu |
| 1769 | * Looking Up Identifiers:: Commands to find the definition of a specific tag. | 1766 | * Looking Up Identifiers:: Commands to find the definition of an identifier. |
| 1770 | * Xref Commands:: Commands in the @file{*xref*} buffer. | 1767 | * Xref Commands:: Commands in the @file{*xref*} buffer. |
| 1771 | * Identifier Search:: Searching and replacing identifiers. | 1768 | * Identifier Search:: Searching and replacing identifiers. |
| 1772 | * List Identifiers:: Listing identifiers and completing on them. | 1769 | * List Identifiers:: Listing identifiers and completing on them. |
| @@ -1794,7 +1791,7 @@ Find definitions of identifier, but display it in another window | |||
| 1794 | Find definition of identifier, and display it in a new frame | 1791 | Find definition of identifier, and display it in a new frame |
| 1795 | (@code{xref-find-definitions-other-frame}). | 1792 | (@code{xref-find-definitions-other-frame}). |
| 1796 | @item M-, | 1793 | @item M-, |
| 1797 | Pop back to where you previously invoked @kbd{M-.} and friends | 1794 | Go back to where you previously invoked @kbd{M-.} and friends |
| 1798 | (@code{xref-pop-marker-stack}). | 1795 | (@code{xref-pop-marker-stack}). |
| 1799 | @end table | 1796 | @end table |
| 1800 | 1797 | ||
| @@ -1832,7 +1829,8 @@ former is @w{@kbd{C-x 4 .}} | |||
| 1832 | The command @kbd{C-M-.} (@code{xref-find-apropos}) finds the | 1829 | The command @kbd{C-M-.} (@code{xref-find-apropos}) finds the |
| 1833 | definitions of one or more identifiers that match a specified regular | 1830 | definitions of one or more identifiers that match a specified regular |
| 1834 | expression. It is just like @kbd{M-.} except that it does regexp | 1831 | expression. It is just like @kbd{M-.} except that it does regexp |
| 1835 | matching of identifiers instead of symbol name matching. | 1832 | matching of identifiers instead of matching symbol names as fixed |
| 1833 | strings. | ||
| 1836 | 1834 | ||
| 1837 | When any of the above commands finds more than one definition, it | 1835 | When any of the above commands finds more than one definition, it |
| 1838 | presents the @file{*xref*} buffer showing the definition candidates. | 1836 | presents the @file{*xref*} buffer showing the definition candidates. |
| @@ -1896,13 +1894,9 @@ without displaying the references. | |||
| 1896 | @cindex search and replace in multiple files | 1894 | @cindex search and replace in multiple files |
| 1897 | @cindex multiple-file search and replace | 1895 | @cindex multiple-file search and replace |
| 1898 | 1896 | ||
| 1899 | The commands in this section visit and search all the files listed | 1897 | The commands in this section perform various search and replace |
| 1900 | in the @code{xref} backend's database, one by one. For these | 1898 | operations either on identifiers themselves or on files that reference |
| 1901 | commands, the database serves only to specify a sequence of files to | 1899 | them. |
| 1902 | search. These commands scan all the databases starting with the first | ||
| 1903 | one (if any) that describes the current file, proceed from there to | ||
| 1904 | the end of the list, and then scan from the beginning of the list | ||
| 1905 | until they have covered all the databases in the list. | ||
| 1906 | 1900 | ||
| 1907 | @table @kbd | 1901 | @table @kbd |
| 1908 | @item M-? | 1902 | @item M-? |
| @@ -1931,7 +1925,7 @@ referenced. The XREF mode commands are available in this buffer, see | |||
| 1931 | 1925 | ||
| 1932 | @findex xref-query-replace | 1926 | @findex xref-query-replace |
| 1933 | @kbd{M-x xref-query-replace} reads a regexp to match identifier | 1927 | @kbd{M-x xref-query-replace} reads a regexp to match identifier |
| 1934 | names and a string to replace with, just like ordinary @kbd{M-x | 1928 | names and a replacement string, just like ordinary @kbd{M-x |
| 1935 | query-replace-regexp}. It then performs the specified replacement in | 1929 | query-replace-regexp}. It then performs the specified replacement in |
| 1936 | the names of the matching identifiers in all the places in all the | 1930 | the names of the matching identifiers in all the places in all the |
| 1937 | files where these identifiers are referenced. This is useful when you | 1931 | files where these identifiers are referenced. This is useful when you |
| @@ -1943,15 +1937,14 @@ be invoked in the @file{*xref*} buffer generated by @code{M-?}. | |||
| 1943 | searches for matches in all the files in the selected tags table, one | 1937 | searches for matches in all the files in the selected tags table, one |
| 1944 | file at a time. It displays the name of the file being searched so | 1938 | file at a time. It displays the name of the file being searched so |
| 1945 | you can follow its progress. As soon as it finds an occurrence, | 1939 | you can follow its progress. As soon as it finds an occurrence, |
| 1946 | @code{tags-search} returns. This command works only with the etags | 1940 | @code{tags-search} returns. This command requires tags tables to be |
| 1947 | backend, and requires tags tables to be available (@pxref{Tags | 1941 | available (@pxref{Tags Tables}). |
| 1948 | Tables}). | ||
| 1949 | 1942 | ||
| 1950 | @findex tags-loop-continue | 1943 | @findex tags-loop-continue |
| 1951 | Having found one match, you probably want to find all the rest. | 1944 | Having found one match with @code{tags-search}, you probably want to |
| 1952 | Type @kbd{M-x tags-loop-continue}) to resume the @code{tags-search}, | 1945 | find all the rest. Type @kbd{M-x tags-loop-continue} to resume the |
| 1953 | finding one more match. This searches the rest of the current buffer, | 1946 | @code{tags-search}, finding one more match. This searches the rest of |
| 1954 | followed by the remaining files of the tags table. | 1947 | the current buffer, followed by the remaining files of the tags table. |
| 1955 | 1948 | ||
| 1956 | @findex tags-query-replace | 1949 | @findex tags-query-replace |
| 1957 | @kbd{M-x tags-query-replace} performs a single | 1950 | @kbd{M-x tags-query-replace} performs a single |
| @@ -1960,7 +1953,6 @@ reads a regexp to search for and a string to replace with, just like | |||
| 1960 | ordinary @kbd{M-x query-replace-regexp}. It searches much like @kbd{M-x | 1953 | ordinary @kbd{M-x query-replace-regexp}. It searches much like @kbd{M-x |
| 1961 | tags-search}, but repeatedly, processing matches according to your | 1954 | tags-search}, but repeatedly, processing matches according to your |
| 1962 | input. @xref{Query Replace}, for more information on query replace. | 1955 | input. @xref{Query Replace}, for more information on query replace. |
| 1963 | This command works only with the etags backend. | ||
| 1964 | 1956 | ||
| 1965 | @vindex tags-case-fold-search | 1957 | @vindex tags-case-fold-search |
| 1966 | @cindex case-sensitivity and tags search | 1958 | @cindex case-sensitivity and tags search |
| @@ -1976,19 +1968,21 @@ has no special query replace meaning. You can resume the query | |||
| 1976 | replace subsequently by typing @kbd{M-x tags-loop-continue}; this | 1968 | replace subsequently by typing @kbd{M-x tags-loop-continue}; this |
| 1977 | command resumes the last tags search or replace command that you did. | 1969 | command resumes the last tags search or replace command that you did. |
| 1978 | For instance, to skip the rest of the current file, you can type | 1970 | For instance, to skip the rest of the current file, you can type |
| 1979 | @kbd{M-> M-x tags-loop-continue}. | 1971 | @w{@kbd{M-> M-x tags-loop-continue}}. |
| 1980 | 1972 | ||
| 1981 | The commands in this section carry out much broader searches than | 1973 | Note that the commands described above carry out much broader |
| 1982 | the @code{xref-find-definitions} family. The | 1974 | searches than the @code{xref-find-definitions} family. The |
| 1983 | @code{xref-find-definitions} commands search only for definitions of | 1975 | @code{xref-find-definitions} commands search only for definitions of |
| 1984 | identifiers that match your string or regexp. The commands | 1976 | identifiers that match your string or regexp. The commands |
| 1985 | @code{tags-search} and @code{tags-query-replace} find every occurrence | 1977 | @code{xref-find-references}, @code{tags-search}, and |
| 1986 | of the regexp, as ordinary search commands and replace commands do in | 1978 | @code{tags-query-replace} find every occurrence of the identifier or |
| 1987 | the current buffer. | 1979 | regexp, as ordinary search commands and replace commands do in the |
| 1980 | current buffer. | ||
| 1988 | 1981 | ||
| 1989 | As an alternative to @code{tags-search}, you can run @command{grep} | 1982 | As an alternative to @code{xref-find-references} and |
| 1990 | as a subprocess and have Emacs show you the matching lines one by one. | 1983 | @code{tags-search}, you can run @command{grep} as a subprocess and |
| 1991 | @xref{Grep Searching}. | 1984 | have Emacs show you the matching lines one by one. @xref{Grep |
| 1985 | Searching}. | ||
| 1992 | 1986 | ||
| 1993 | @node List Identifiers | 1987 | @node List Identifiers |
| 1994 | @subsubsection Identifier Inquiries | 1988 | @subsubsection Identifier Inquiries |
| @@ -1996,20 +1990,23 @@ as a subprocess and have Emacs show you the matching lines one by one. | |||
| 1996 | @table @kbd | 1990 | @table @kbd |
| 1997 | @item C-M-i | 1991 | @item C-M-i |
| 1998 | @itemx M-@key{TAB} | 1992 | @itemx M-@key{TAB} |
| 1999 | Perform completion on the text around point, using the @code{xref} | 1993 | Perform completion on the text around point, using the selected tags |
| 2000 | backend if one is available (@code{completion-at-point}). | 1994 | table if one is loaded (@code{completion-at-point}). |
| 2001 | @item M-x list-tags @key{RET} @var{file} @key{RET} | ||
| 2002 | Display a list of the tags defined in the program file @var{file}. | ||
| 2003 | @item M-x xref-find-apropos @key{RET} @var{regexp} @key{RET} | 1995 | @item M-x xref-find-apropos @key{RET} @var{regexp} @key{RET} |
| 2004 | Display a list of all known identifiers matching @var{regexp}. | 1996 | Display a list of all known identifiers matching @var{regexp}. |
| 1997 | @item M-x list-tags @key{RET} @var{file} @key{RET} | ||
| 1998 | Display a list of the identifiers defined in the program file | ||
| 1999 | @var{file}. | ||
| 2000 | @item M-x next-file | ||
| 2001 | Visit files recorded in the selected tags table. | ||
| 2005 | @end table | 2002 | @end table |
| 2006 | 2003 | ||
| 2007 | @cindex completion (symbol names) | 2004 | @cindex completion (symbol names) |
| 2008 | In most programming language modes, you can type @kbd{C-M-i} or | 2005 | In most programming language modes, you can type @kbd{C-M-i} or |
| 2009 | @kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol | 2006 | @kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol |
| 2010 | at point. If there is an @code{xref} backend available, this command | 2007 | at point. If there is a tags table loaded, this command can use it to |
| 2011 | can use it to generate completion candidates more intelligently. | 2008 | generate completion candidates more intelligently. @xref{Symbol |
| 2012 | @xref{Symbol Completion}. | 2009 | Completion}. |
| 2013 | 2010 | ||
| 2014 | @findex list-tags | 2011 | @findex list-tags |
| 2015 | @kbd{M-x list-tags} reads the name of one of the files covered by | 2012 | @kbd{M-x list-tags} reads the name of one of the files covered by |
| @@ -2044,12 +2041,15 @@ for details. | |||
| 2044 | The first time it is called, it visits the first file covered by the | 2041 | The first time it is called, it visits the first file covered by the |
| 2045 | table. Each subsequent call visits the next covered file, unless a | 2042 | table. Each subsequent call visits the next covered file, unless a |
| 2046 | prefix argument is supplied, in which case it returns to the first | 2043 | prefix argument is supplied, in which case it returns to the first |
| 2047 | file. This command works only with the etags backend. | 2044 | file. This command requires a tags table to be selected. |
| 2048 | 2045 | ||
| 2049 | @node Tags Tables | 2046 | @node Tags Tables |
| 2050 | @subsection Tags Tables | 2047 | @subsection Tags Tables |
| 2051 | @cindex tags and tag tables | 2048 | @cindex tags and tag tables |
| 2052 | 2049 | ||
| 2050 | @cindex tag | ||
| 2051 | A @dfn{tag} is a synonym for identifier reference. @xref{Xref}. | ||
| 2052 | |||
| 2053 | A @dfn{tags table} records the tags extracted by scanning the source | 2053 | A @dfn{tags table} records the tags extracted by scanning the source |
| 2054 | code of a certain program or a certain document. Tags extracted from | 2054 | code of a certain program or a certain document. Tags extracted from |
| 2055 | generated files reference the original files, rather than the | 2055 | generated files reference the original files, rather than the |
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index e4bd85c0ddd..780e00ca681 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi | |||
| @@ -1358,7 +1358,7 @@ the @kbd{M-@key{TAB}} key is usually reserved by the window manager | |||
| 1358 | for switching graphical windows, so you should type @kbd{C-M-i} or | 1358 | for switching graphical windows, so you should type @kbd{C-M-i} or |
| 1359 | @kbd{@key{ESC} @key{TAB}} instead. | 1359 | @kbd{@key{ESC} @key{TAB}} instead. |
| 1360 | 1360 | ||
| 1361 | @cindex xref-based completion | 1361 | @cindex tags-based completion |
| 1362 | @findex completion-at-point | 1362 | @findex completion-at-point |
| 1363 | @cindex Lisp symbol completion | 1363 | @cindex Lisp symbol completion |
| 1364 | @cindex completion (Lisp symbols) | 1364 | @cindex completion (Lisp symbols) |
| @@ -1368,7 +1368,7 @@ which generates its completion list in a flexible way. If Semantic | |||
| 1368 | mode is enabled, it tries to use the Semantic parser data for | 1368 | mode is enabled, it tries to use the Semantic parser data for |
| 1369 | completion (@pxref{Semantic}). If Semantic mode is not enabled or | 1369 | completion (@pxref{Semantic}). If Semantic mode is not enabled or |
| 1370 | fails at performing completion, it tries to complete using the | 1370 | fails at performing completion, it tries to complete using the |
| 1371 | available @code{xref} backend (@pxref{Xref}). If in Emacs Lisp mode, it | 1371 | selected tags table (@pxref{Tags Tables}). If in Emacs Lisp mode, it |
| 1372 | performs completion using the function, variable, or property names | 1372 | performs completion using the function, variable, or property names |
| 1373 | defined in the current Emacs session. | 1373 | defined in the current Emacs session. |
| 1374 | 1374 | ||
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index bef74e3b2c5..e854646d056 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -12,10 +12,10 @@ a string. Emacs also has commands to replace occurrences of a string | |||
| 12 | with a different string. There are also commands that do the same | 12 | with a different string. There are also commands that do the same |
| 13 | thing, but search for patterns instead of fixed strings. | 13 | thing, but search for patterns instead of fixed strings. |
| 14 | 14 | ||
| 15 | You can also search multiple files under the control of an | 15 | You can also search multiple files under the control of @code{xref} |
| 16 | @code{xref} backend (@pxref{Identifier Search}) or through the Dired | 16 | (@pxref{Identifier Search}) or through the Dired @kbd{A} command |
| 17 | @kbd{A} command (@pxref{Operating on Files}), or ask the @code{grep} | 17 | (@pxref{Operating on Files}), or ask the @code{grep} program to do it |
| 18 | program to do it (@pxref{Grep Searching}). | 18 | (@pxref{Grep Searching}). |
| 19 | 19 | ||
| 20 | @menu | 20 | @menu |
| 21 | * Incremental Search:: Search happens as you type the string. | 21 | * Incremental Search:: Search happens as you type the string. |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index dee43cefb15..9c1df895161 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -691,6 +691,14 @@ default is the return value of @code{this-command-keys-vector}. | |||
| 691 | @xref{Definition of this-command-keys-vector}. | 691 | @xref{Definition of this-command-keys-vector}. |
| 692 | @end defun | 692 | @end defun |
| 693 | 693 | ||
| 694 | @defun funcall-interactively function &rest arguments | ||
| 695 | This function works like @code{funcall} (@pxref{Calling Functions}), | ||
| 696 | but it makes the call look like an interactive invocation: a call to | ||
| 697 | @code{called-interactively-p} inside @var{function} will return | ||
| 698 | @code{t}. If @var{function} is not a command, it is called without | ||
| 699 | signaling an error. | ||
| 700 | @end defun | ||
| 701 | |||
| 694 | @defun command-execute command &optional record-flag keys special | 702 | @defun command-execute command &optional record-flag keys special |
| 695 | @cindex keyboard macro execution | 703 | @cindex keyboard macro execution |
| 696 | This function executes @var{command}. The argument @var{command} must | 704 | This function executes @var{command}. The argument @var{command} must |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 1c6674cdda9..614b7db0cac 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -1188,8 +1188,8 @@ named, this parameter will be @code{nil}. | |||
| 1188 | @cindex window position on display | 1188 | @cindex window position on display |
| 1189 | @cindex frame position | 1189 | @cindex frame position |
| 1190 | 1190 | ||
| 1191 | Position parameters' values are normally measured in pixels, but on | 1191 | Position parameters' values are measured in pixels. (Note that none |
| 1192 | text terminals they count characters or lines instead. | 1192 | of these parameters exist on TTY frames.) |
| 1193 | 1193 | ||
| 1194 | @table @code | 1194 | @table @code |
| 1195 | @vindex left, a frame parameter | 1195 | @vindex left, a frame parameter |
| @@ -2637,18 +2637,19 @@ defined in the file @file{lisp/term/x-win.el}. Use @kbd{M-x apropos | |||
| 2637 | @cindex primary selection | 2637 | @cindex primary selection |
| 2638 | @cindex secondary selection | 2638 | @cindex secondary selection |
| 2639 | 2639 | ||
| 2640 | In the X window system, data can be transferred between different | 2640 | In window systems, such as X, data can be transferred between |
| 2641 | applications by means of @dfn{selections}. X defines an arbitrary | 2641 | different applications by means of @dfn{selections}. X defines an |
| 2642 | number of @dfn{selection types}, each of which can store its own data; | 2642 | arbitrary number of @dfn{selection types}, each of which can store its |
| 2643 | however, only three are commonly used: the @dfn{clipboard}, | 2643 | own data; however, only three are commonly used: the @dfn{clipboard}, |
| 2644 | @dfn{primary selection}, and @dfn{secondary selection}. @xref{Cut and | 2644 | @dfn{primary selection}, and @dfn{secondary selection}. Other window |
| 2645 | Paste,, Cut and Paste, emacs, The GNU Emacs Manual}, for Emacs | 2645 | systems support only the clipboard. @xref{Cut and Paste,, Cut and |
| 2646 | commands that make use of these selections. This section documents | 2646 | Paste, emacs, The GNU Emacs Manual}, for Emacs commands that make use |
| 2647 | the low-level functions for reading and setting X selections. | 2647 | of these selections. This section documents the low-level functions |
| 2648 | for reading and setting window-system selections. | ||
| 2648 | 2649 | ||
| 2649 | @deffn Command x-set-selection type data | 2650 | @deffn Command gui-set-selection type data |
| 2650 | This function sets an X selection. It takes two arguments: a | 2651 | This function sets a window-system selection. It takes two arguments: |
| 2651 | selection type @var{type}, and the value to assign to it, @var{data}. | 2652 | a selection type @var{type}, and the value to assign to it, @var{data}. |
| 2652 | 2653 | ||
| 2653 | @var{type} should be a symbol; it is usually one of @code{PRIMARY}, | 2654 | @var{type} should be a symbol; it is usually one of @code{PRIMARY}, |
| 2654 | @code{SECONDARY} or @code{CLIPBOARD}. These are symbols with | 2655 | @code{SECONDARY} or @code{CLIPBOARD}. These are symbols with |
| @@ -2665,14 +2666,14 @@ stands for text in the overlay or between the markers. The argument | |||
| 2665 | This function returns @var{data}. | 2666 | This function returns @var{data}. |
| 2666 | @end deffn | 2667 | @end deffn |
| 2667 | 2668 | ||
| 2668 | @defun x-get-selection &optional type data-type | 2669 | @defun gui-get-selection &optional type data-type |
| 2669 | This function accesses selections set up by Emacs or by other X | 2670 | This function accesses selections set up by Emacs or by other |
| 2670 | clients. It takes two optional arguments, @var{type} and | 2671 | programs. It takes two optional arguments, @var{type} and |
| 2671 | @var{data-type}. The default for @var{type}, the selection type, is | 2672 | @var{data-type}. The default for @var{type}, the selection type, is |
| 2672 | @code{PRIMARY}. | 2673 | @code{PRIMARY}. |
| 2673 | 2674 | ||
| 2674 | The @var{data-type} argument specifies the form of data conversion to | 2675 | The @var{data-type} argument specifies the form of data conversion to |
| 2675 | use, to convert the raw data obtained from another X client into Lisp | 2676 | use, to convert the raw data obtained from another program into Lisp |
| 2676 | data. Meaningful values include @code{TEXT}, @code{STRING}, | 2677 | data. Meaningful values include @code{TEXT}, @code{STRING}, |
| 2677 | @code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE}, | 2678 | @code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE}, |
| 2678 | @code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME}, | 2679 | @code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME}, |
| @@ -2680,7 +2681,8 @@ data. Meaningful values include @code{TEXT}, @code{STRING}, | |||
| 2680 | @code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and | 2681 | @code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and |
| 2681 | @code{INTEGER}. (These are symbols with upper-case names in accord | 2682 | @code{INTEGER}. (These are symbols with upper-case names in accord |
| 2682 | with X conventions.) The default for @var{data-type} is | 2683 | with X conventions.) The default for @var{data-type} is |
| 2683 | @code{STRING}. | 2684 | @code{STRING}. Window systems other than X usually support only a |
| 2685 | small subset of these types, in addition to @code{STRING}. | ||
| 2684 | @end defun | 2686 | @end defun |
| 2685 | 2687 | ||
| 2686 | @defopt selection-coding-system | 2688 | @defopt selection-coding-system |
| @@ -2692,10 +2694,15 @@ converts to the text representation that X11 normally uses. | |||
| 2692 | 2694 | ||
| 2693 | @cindex clipboard support (for MS-Windows) | 2695 | @cindex clipboard support (for MS-Windows) |
| 2694 | When Emacs runs on MS-Windows, it does not implement X selections in | 2696 | When Emacs runs on MS-Windows, it does not implement X selections in |
| 2695 | general, but it does support the clipboard. @code{x-get-selection} | 2697 | general, but it does support the clipboard. @code{gui-get-selection} |
| 2696 | and @code{x-set-selection} on MS-Windows support the text data type | 2698 | and @code{gui-set-selection} on MS-Windows support the text data type |
| 2697 | only; if the clipboard holds other types of data, Emacs treats the | 2699 | only; if the clipboard holds other types of data, Emacs treats the |
| 2698 | clipboard as empty. | 2700 | clipboard as empty. The supported data type is @code{STRING}. |
| 2701 | |||
| 2702 | For backward compatibility, there are obsolete aliases | ||
| 2703 | @code{x-get-selection} and @code{x-set-selection}, which were the | ||
| 2704 | names of @code{gui-get-selection} and @code{gui-set-selection} before | ||
| 2705 | Emacs 25.1. | ||
| 2699 | 2706 | ||
| 2700 | @node Drag and Drop | 2707 | @node Drag and Drop |
| 2701 | @section Drag and Drop | 2708 | @section Drag and Drop |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index e596badcdd2..1e8e7540395 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -623,6 +623,96 @@ definition will have no effect on them. | |||
| 623 | and tells the Lisp compiler to perform inline expansion on it. | 623 | and tells the Lisp compiler to perform inline expansion on it. |
| 624 | @xref{Inline Functions}. | 624 | @xref{Inline Functions}. |
| 625 | 625 | ||
| 626 | Alternatively, you can define a function by providing the code which | ||
| 627 | will inline it as a compiler macro. The following macros make this | ||
| 628 | possible. | ||
| 629 | |||
| 630 | @c FIXME: Can define-inline use the interactive spec? | ||
| 631 | @defmac define-inline name args [doc] [declare] body@dots{} | ||
| 632 | Define a function @var{name} by providing code that does its inlining, | ||
| 633 | as a compiler macro. The function will accept the argument list | ||
| 634 | @var{args} and will have the specified @var{body}. | ||
| 635 | |||
| 636 | If present, @var{doc} should be the function's documentation string | ||
| 637 | (@pxref{Function Documentation}); @var{declare}, if present, should be | ||
| 638 | a @code{declare} form (@pxref{Declare Form}) specifying the function's | ||
| 639 | metadata. | ||
| 640 | @end defmac | ||
| 641 | |||
| 642 | Functions defined via @code{define-inline} have several advantages | ||
| 643 | with respect to macros defined by @code{defsubst} or @code{defmacro}: | ||
| 644 | |||
| 645 | @itemize @minus | ||
| 646 | @item | ||
| 647 | They can be passed to @code{mapcar} (@pxref{Mapping Functions}). | ||
| 648 | |||
| 649 | @item | ||
| 650 | They are more efficient. | ||
| 651 | |||
| 652 | @item | ||
| 653 | They can be used as @dfn{place forms} to store values | ||
| 654 | (@pxref{Generalized Variables}). | ||
| 655 | |||
| 656 | @item | ||
| 657 | They behave in a more predictable way than @code{cl-defsubst} | ||
| 658 | (@pxref{Argument Lists,,, cl, Common Lisp Extensions for GNU Emacs | ||
| 659 | Lisp}). | ||
| 660 | @end itemize | ||
| 661 | |||
| 662 | Like @code{defmacro}, a function inlined with @code{define-inline} | ||
| 663 | inherits the scoping rules, either dynamic or lexical, from the call | ||
| 664 | site. @xref{Variable Scoping}. | ||
| 665 | |||
| 666 | The following macros should be used in the body of a function defined | ||
| 667 | by @code{define-inline}. | ||
| 668 | |||
| 669 | @defmac inline-quote expression | ||
| 670 | Quote @var{expression} for @code{define-inline}. This is similar to | ||
| 671 | the backquote (@pxref{Backquote}), but quotes code and accepts only | ||
| 672 | @code{,}, not @code{,@@}. | ||
| 673 | @end defmac | ||
| 674 | |||
| 675 | @defmac inline-letevals (bindings@dots{}) body@dots{} | ||
| 676 | This is is similar to @code{let} (@pxref{Local Variables}): it sets up | ||
| 677 | local variables as specified by @var{bindings}, and then evaluates | ||
| 678 | @var{body} with those bindings in effect. Each element of | ||
| 679 | @var{bindings} should be either a symbol or a list of the form | ||
| 680 | @w{@code{(@var{var} @var{expr})}}; the result is to evaluate | ||
| 681 | @var{expr} and bind @var{var} to the result. The tail of | ||
| 682 | @var{bindings} can be either @code{nil} or a symbol which should hold | ||
| 683 | a list of arguments, in which case each argument is evaluated, and the | ||
| 684 | symbol is bound to the resulting list. | ||
| 685 | @end defmac | ||
| 686 | |||
| 687 | @defmac inline-const-p expression | ||
| 688 | Return non-@code{nil} if the value of @var{expression} is already | ||
| 689 | known. | ||
| 690 | @end defmac | ||
| 691 | |||
| 692 | @defmac inline-const-val expression | ||
| 693 | Return the value of @var{expression}. | ||
| 694 | @end defmac | ||
| 695 | |||
| 696 | @defmac inline-error format &rest args | ||
| 697 | Signal an error, formatting @var{args} according to @var{format}. | ||
| 698 | @end defmac | ||
| 699 | |||
| 700 | Here's an example of using @code{define-inline}: | ||
| 701 | |||
| 702 | @lisp | ||
| 703 | (define-inline myaccessor (obj) | ||
| 704 | (inline-letevals (obj) | ||
| 705 | (inline-quote (if (foo-p ,obj) (aref (cdr ,obj) 3) (aref ,obj 2))))) | ||
| 706 | @end lisp | ||
| 707 | |||
| 708 | @noindent | ||
| 709 | This is equivalent to | ||
| 710 | |||
| 711 | @lisp | ||
| 712 | (defsubst myaccessor (obj) | ||
| 713 | (if (foo-p obj) (aref (cdr obj) 3) (aref obj 2))) | ||
| 714 | @end lisp | ||
| 715 | |||
| 626 | @node Calling Functions | 716 | @node Calling Functions |
| 627 | @section Calling Functions | 717 | @section Calling Functions |
| 628 | @cindex function invocation | 718 | @cindex function invocation |
| @@ -664,6 +754,10 @@ they make sense only when given the unevaluated argument | |||
| 664 | expressions. @code{funcall} cannot provide these because, as we saw | 754 | expressions. @code{funcall} cannot provide these because, as we saw |
| 665 | above, it never knows them in the first place. | 755 | above, it never knows them in the first place. |
| 666 | 756 | ||
| 757 | If you need to use @code{funcall} to call a command and make it behave | ||
| 758 | as if invoked interactively, use @code{funcall-interactively} | ||
| 759 | (@pxref{Interactive Call}). | ||
| 760 | |||
| 667 | @example | 761 | @example |
| 668 | @group | 762 | @group |
| 669 | (setq f 'list) | 763 | (setq f 'list) |
| @@ -1706,19 +1800,24 @@ features of Emacs, you should not make a function inline, even if it's | |||
| 1706 | small, unless its speed is really crucial, and you've timed the code | 1800 | small, unless its speed is really crucial, and you've timed the code |
| 1707 | to verify that using @code{defun} actually has performance problems. | 1801 | to verify that using @code{defun} actually has performance problems. |
| 1708 | 1802 | ||
| 1709 | It's possible to define a macro to expand into the same code that an | ||
| 1710 | inline function would execute (@pxref{Macros}). But the macro would | ||
| 1711 | be limited to direct use in expressions---a macro cannot be called | ||
| 1712 | with @code{apply}, @code{mapcar} and so on. Also, it takes some work | ||
| 1713 | to convert an ordinary function into a macro. To convert it into an | ||
| 1714 | inline function is easy; just replace @code{defun} with | ||
| 1715 | @code{defsubst}. Since each argument of an inline function is | ||
| 1716 | evaluated exactly once, you needn't worry about how many times the | ||
| 1717 | body uses the arguments, as you do for macros. | ||
| 1718 | |||
| 1719 | After an inline function is defined, its inline expansion can be | 1803 | After an inline function is defined, its inline expansion can be |
| 1720 | performed later on in the same file, just like macros. | 1804 | performed later on in the same file, just like macros. |
| 1721 | 1805 | ||
| 1806 | It's possible to use @code{defsubst} to define a macro to expand | ||
| 1807 | into the same code that an inline function would execute | ||
| 1808 | (@pxref{Macros}). But the macro would be limited to direct use in | ||
| 1809 | expressions---a macro cannot be called with @code{apply}, | ||
| 1810 | @code{mapcar} and so on. Also, it takes some work to convert an | ||
| 1811 | ordinary function into a macro. To convert it into an inline function | ||
| 1812 | is easy; just replace @code{defun} with @code{defsubst}. Since each | ||
| 1813 | argument of an inline function is evaluated exactly once, you needn't | ||
| 1814 | worry about how many times the body uses the arguments, as you do for | ||
| 1815 | macros. | ||
| 1816 | |||
| 1817 | As an alternative to @code{defsubst}, you can use | ||
| 1818 | @code{define-inline} to define functions via their exhaustive compiler | ||
| 1819 | macro. @xref{Defining Functions, define-inline}. | ||
| 1820 | |||
| 1722 | @node Declare Form | 1821 | @node Declare Form |
| 1723 | @section The @code{declare} Form | 1822 | @section The @code{declare} Form |
| 1724 | @findex declare | 1823 | @findex declare |
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index d961caf49f6..c18c408209a 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -1556,6 +1556,14 @@ keys may not be symbols: | |||
| 1556 | @end smallexample | 1556 | @end smallexample |
| 1557 | @end defun | 1557 | @end defun |
| 1558 | 1558 | ||
| 1559 | @defun alist-get key value &optional default | ||
| 1560 | This function is like @code{assq}, but instead of returning the entire | ||
| 1561 | association for @var{key}, @code{(@var{key} . @var{value})}, it | ||
| 1562 | returns just the @var{value}. It returns @var{default} if @var{key} | ||
| 1563 | is not found in @var{alist}, defaulting to @code{nil} if @var{default} | ||
| 1564 | is omitted. | ||
| 1565 | @end defun | ||
| 1566 | |||
| 1559 | @defun rassq value alist | 1567 | @defun rassq value alist |
| 1560 | This function returns the first association with value @var{value} in | 1568 | This function returns the first association with value @var{value} in |
| 1561 | @var{alist}. It returns @code{nil} if no association in @var{alist} has | 1569 | @var{alist}. It returns @code{nil} if no association in @var{alist} has |
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 18e67f1abfe..06900a49477 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -73,12 +73,15 @@ To find the file, @code{load} first looks for a file named | |||
| 73 | @var{filename} with the extension @samp{.elc} appended. If such a | 73 | @var{filename} with the extension @samp{.elc} appended. If such a |
| 74 | file exists, it is loaded. If there is no file by that name, then | 74 | file exists, it is loaded. If there is no file by that name, then |
| 75 | @code{load} looks for a file named @file{@var{filename}.el}. If that | 75 | @code{load} looks for a file named @file{@var{filename}.el}. If that |
| 76 | file exists, it is loaded. Finally, if neither of those names is | 76 | file exists, it is loaded. If Emacs was compiled with support for |
| 77 | found, @code{load} looks for a file named @var{filename} with nothing | 77 | dynamic modules (@pxref{Dynamic Modules}), @code{load} next looks for |
| 78 | appended, and loads it if it exists. (The @code{load} function is not | 78 | a file named @file{@var{filename}.@var{ext}}, where @var{ext} is a |
| 79 | clever about looking at @var{filename}. In the perverse case of a | 79 | system-dependent file-name extension of shared libraries. Finally, if |
| 80 | file named @file{foo.el.el}, evaluation of @code{(load "foo.el")} will | 80 | neither of those names is found, @code{load} looks for a file named |
| 81 | indeed find it.) | 81 | @var{filename} with nothing appended, and loads it if it exists. (The |
| 82 | @code{load} function is not clever about looking at @var{filename}. | ||
| 83 | In the perverse case of a file named @file{foo.el.el}, evaluation of | ||
| 84 | @code{(load "foo.el")} will indeed find it.) | ||
| 82 | 85 | ||
| 83 | If Auto Compression mode is enabled, as it is by default, then if | 86 | If Auto Compression mode is enabled, as it is by default, then if |
| 84 | @code{load} can not find a file, it searches for a compressed version | 87 | @code{load} can not find a file, it searches for a compressed version |
| @@ -100,7 +103,8 @@ being tried. | |||
| 100 | If the optional argument @var{must-suffix} is non-@code{nil}, then | 103 | If the optional argument @var{must-suffix} is non-@code{nil}, then |
| 101 | @code{load} insists that the file name used must end in either | 104 | @code{load} insists that the file name used must end in either |
| 102 | @samp{.el} or @samp{.elc} (possibly extended with a compression | 105 | @samp{.el} or @samp{.elc} (possibly extended with a compression |
| 103 | suffix), unless it contains an explicit directory name. | 106 | suffix) or the shared-library extension, unless it contains an |
| 107 | explicit directory name. | ||
| 104 | 108 | ||
| 105 | If the option @code{load-prefer-newer} is non-@code{nil}, then when | 109 | If the option @code{load-prefer-newer} is non-@code{nil}, then when |
| 106 | searching suffixes, @code{load} selects whichever version of a file | 110 | searching suffixes, @code{load} selects whichever version of a file |
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index 7f3b670e328..3f9db8ce375 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi | |||
| @@ -160,6 +160,12 @@ expand the embedded calls to @code{inc}: | |||
| 160 | 160 | ||
| 161 | @end defun | 161 | @end defun |
| 162 | 162 | ||
| 163 | @defun macroexpand-1 form &optional environment | ||
| 164 | This function expands macros like @code{macroexpand}, but it only | ||
| 165 | performs one step of the expansion: if the result is another macro | ||
| 166 | call, @code{macroexpand-1} will not expand it. | ||
| 167 | @end defun | ||
| 168 | |||
| 163 | @node Compiling Macros | 169 | @node Compiling Macros |
| 164 | @section Macros and Byte Compilation | 170 | @section Macros and Byte Compilation |
| 165 | @cindex byte-compiling macros | 171 | @cindex byte-compiling macros |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 95723ca4487..091db5e4ebb 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -571,13 +571,19 @@ no characters is less than any other string. | |||
| 571 | @end example | 571 | @end example |
| 572 | 572 | ||
| 573 | Symbols are also allowed as arguments, in which case their print names | 573 | Symbols are also allowed as arguments, in which case their print names |
| 574 | are used. | 574 | are compared. |
| 575 | @end defun | 575 | @end defun |
| 576 | 576 | ||
| 577 | @defun string-lessp string1 string2 | 577 | @defun string-lessp string1 string2 |
| 578 | @code{string-lessp} is another name for @code{string<}. | 578 | @code{string-lessp} is another name for @code{string<}. |
| 579 | @end defun | 579 | @end defun |
| 580 | 580 | ||
| 581 | @defun string-greaterp string1 string2 | ||
| 582 | This function returns the result of comparing @var{string1} and | ||
| 583 | @var{string2} in the opposite order, i.e., it is equivalent to calling | ||
| 584 | @code{(string-lessp @var{string2} @var{string1})}. | ||
| 585 | @end defun | ||
| 586 | |||
| 581 | @cindex locale-dependent string comparison | 587 | @cindex locale-dependent string comparison |
| 582 | @defun string-collate-lessp string1 string2 &optional locale ignore-case | 588 | @defun string-collate-lessp string1 string2 &optional locale ignore-case |
| 583 | This function returns @code{t} if @var{string1} is less than | 589 | This function returns @code{t} if @var{string1} is less than |
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index c99f993e5da..8c1ec3d85e2 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi | |||
| @@ -461,10 +461,23 @@ You could define @code{put} in terms of @code{setplist} and | |||
| 461 | @end example | 461 | @end example |
| 462 | @end defun | 462 | @end defun |
| 463 | 463 | ||
| 464 | @defun function-get symbol property | 464 | @defun function-get symbol property &optional autoload |
| 465 | This function is identical to @code{get}, except that if @var{symbol} | 465 | This function is identical to @code{get}, except that if @var{symbol} |
| 466 | is the name of a function alias, it looks in the property list of the | 466 | is the name of a function alias, it looks in the property list of the |
| 467 | symbol naming the actual function. @xref{Defining Functions}. | 467 | symbol naming the actual function. @xref{Defining Functions}. If the |
| 468 | optional argument @var{autoload} is non-@code{nil}, and @var{symbol} | ||
| 469 | is auto-loaded, this function will try to autoload it, since | ||
| 470 | autoloading might set @var{property} of @var{symbol}. If | ||
| 471 | @var{autoload} is the symbol @code{macro}, only try autoloading if | ||
| 472 | @var{symbol} is an auto-loaded macro. | ||
| 473 | @end defun | ||
| 474 | |||
| 475 | @defun function-put function property value | ||
| 476 | This function sets @var{property} of @var{function} to @var{value}. | ||
| 477 | @var{function} should be a symbol. This function is preferred to | ||
| 478 | calling @code{put} for setting properties of a function, because it | ||
| 479 | will allow us some day to implement remapping of old properties to new | ||
| 480 | ones. | ||
| 468 | @end defun | 481 | @end defun |
| 469 | 482 | ||
| 470 | @node Standard Properties | 483 | @node Standard Properties |