aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorJoakim Verona2013-07-02 22:46:17 +0200
committerJoakim Verona2013-07-02 22:46:17 +0200
commit3718127221fbbc31f8ebd027ab7c95403dbe9118 (patch)
treeef422898f3344c8f94f6ecf63eb583122bbf2bd8 /doc/lispref
parent1ce45b902c67b8a0dda8d71bd2812de29a9988a6 (diff)
parenta3b49114c186d84404226af75ae7905bd1cd018f (diff)
downloademacs-3718127221fbbc31f8ebd027ab7c95403dbe9118.tar.gz
emacs-3718127221fbbc31f8ebd027ab7c95403dbe9118.zip
Merge branch 'trunk' into xwidget
Conflicts: src/window.c
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog55
-rw-r--r--doc/lispref/Makefile.in8
-rw-r--r--doc/lispref/buffers.texi7
-rw-r--r--doc/lispref/display.texi60
-rw-r--r--doc/lispref/functions.texi3
-rw-r--r--doc/lispref/keymaps.texi11
-rw-r--r--doc/lispref/loading.texi2
-rw-r--r--doc/lispref/modes.texi6
-rw-r--r--doc/lispref/numbers.texi5
-rw-r--r--doc/lispref/text.texi24
-rw-r--r--doc/lispref/tips.texi12
-rw-r--r--doc/lispref/variables.texi2
12 files changed, 154 insertions, 41 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e14f7543443..dc0c1564735 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,58 @@
12013-06-29 Eli Zaretskii <eliz@gnu.org>
2
3 * display.texi (Bidirectional Display): Document move-point-visually.
4
52013-06-29 Xue Fuqiao <xfq.free@gmail.com>
6
7 * buffers.texi (Buffer File Name): Fix typo.
8
92013-06-26 Christopher Schmidt <christopher@ch.ristopher.com>
10
11 * tips.texi (Coding Conventions): Improve wording.
12
132013-06-24 Glenn Morris <rgm@gnu.org>
14
15 * loading.texi (Autoload): Fix typo.
16
17 * variables.texi (Lexical Binding): Fix typo.
18
19 * functions.texi (Anonymous Functions): Put back ' removed 2012-10-23.
20
212013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
22
23 * display.texi (ImageMagick Images): Mention :max-width and
24 :max-height.
25
262013-06-20 Paul Eggert <eggert@cs.ucla.edu>
27
28 * numbers.texi (Math Functions): Remove obsolete function log10.
29
302013-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
31
32 * modes.texi (Mode Line Data, Properties in Mode): Advertise `keymap'
33 rather than `local-map'.
34
35 * keymaps.texi (Active Keymaps): Fix documentation of
36 set-temporary-overlay-map and overriding-terminal-local-map.
37
382013-06-19 Glenn Morris <rgm@gnu.org>
39
40 * Makefile.in (dist): Edit more configure variables.
41 Try to check that we do not miss any in future.
42
432013-06-17 Juanma Barranquero <lekktu@gmail.com>
44
45 * text.texi (Undo, Changing Properties): Fix typos.
46
472013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
48
49 * text.texi (Changing Properties): Document `add-face-text-property'.
50
512013-06-17 Kenichi Handa <handa@gnu.org>
52
53 * display.texi (Face Attributes): Refer to "Low-Level font" (not
54 "Font Selection") in the explanation of :font attribute (bug#14629).
55
12013-06-13 Stefan Monnier <monnier@iro.umontreal.ca> 562013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
2 57
3 * loading.texi (Hooks for Loading): Don't document after-load-alist. 58 * loading.texi (Hooks for Loading): Don't document after-load-alist.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 8e04d085c60..19cf2cc4a5d 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -19,6 +19,9 @@
19 19
20SHELL = /bin/sh 20SHELL = /bin/sh
21 21
22# NB If you add any more configure variables,
23# update the sed rules in the dist target below.
24
22# Standard configure variables. 25# Standard configure variables.
23srcdir = @srcdir@ 26srcdir = @srcdir@
24 27
@@ -163,7 +166,12 @@ dist:
163 -e 's/^\(buildinfodir *=\).*/\1 ./' \ 166 -e 's/^\(buildinfodir *=\).*/\1 ./' \
164 -e 's/^\(clean:.*\)/\1 infoclean/' \ 167 -e 's/^\(clean:.*\)/\1 infoclean/' \
165 -e "s/@ver[s]ion@/${version}/" \ 168 -e "s/@ver[s]ion@/${version}/" \
169 -e 's/@MAKE[I]NFO@/makeinfo/' -e 's/@MK[D]IR_P@/mkdir -p/' \
170 -e 's/@IN[F]O_EXT@/.info/' -e 's/@IN[F]O_OPTS@//' \
166 ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile 171 ${srcdir}/Makefile.in > emacs-lispref-${version}/Makefile
172 @if grep '@[a-zA-Z_]*@' emacs-lispref-${version}/Makefile; then \
173 echo "Unexpanded configure variables in Makefile?" 1>&2; exit 1; \
174 fi
167 tar -cf emacs-lispref-${version}.tar emacs-lispref-${version} 175 tar -cf emacs-lispref-${version}.tar emacs-lispref-${version}
168 rm -rf emacs-lispref-${version} 176 rm -rf emacs-lispref-${version}
169 177
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 7ed1876e4b1..01269851250 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -488,8 +488,9 @@ Normally, this function asks the user for confirmation if there
488already is a buffer visiting @var{filename}. If @var{no-query} is 488already is a buffer visiting @var{filename}. If @var{no-query} is
489non-@code{nil}, that prevents asking this question. If there already 489non-@code{nil}, that prevents asking this question. If there already
490is a buffer visiting @var{filename}, and the user confirms or 490is a buffer visiting @var{filename}, and the user confirms or
491@var{query} is non-@code{nil}, this function makes the new buffer name 491@var{no-query} is non-@code{nil}, this function makes the new
492unique by appending a number inside of @samp{<@dots{}>} to @var{filename}. 492buffer name unique by appending a number inside of @samp{<@dots{}>} to
493@var{filename}.
493 494
494If @var{along-with-file} is non-@code{nil}, that means to assume that 495If @var{along-with-file} is non-@code{nil}, that means to assume that
495the former visited file has been renamed to @var{filename}. In this 496the former visited file has been renamed to @var{filename}. In this
@@ -1064,7 +1065,7 @@ Buffer foo.changed modified; kill anyway? (yes or no) @kbd{yes}
1064@end deffn 1065@end deffn
1065 1066
1066@defvar kill-buffer-query-functions 1067@defvar kill-buffer-query-functions
1067After confirming unsaved changes, @code{kill-buffer} calls the functions 1068Before confirming unsaved changes, @code{kill-buffer} calls the functions
1068in the list @code{kill-buffer-query-functions}, in order of appearance, 1069in the list @code{kill-buffer-query-functions}, in order of appearance,
1069with no arguments. The buffer being killed is the current buffer when 1070with no arguments. The buffer being killed is the current buffer when
1070they are called. The idea of this feature is that these functions will 1071they are called. The idea of this feature is that these functions will
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 4adcfdf8f4f..44fbc66a60e 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1655,26 +1655,26 @@ if it becomes empty (i.e., if its length becomes zero). If you give
1655an empty overlay a non-@code{nil} @code{evaporate} property, that deletes 1655an empty overlay a non-@code{nil} @code{evaporate} property, that deletes
1656it immediately. 1656it immediately.
1657 1657
1658@item local-map
1659@cindex keymap of character (and overlays)
1660@kindex local-map @r{(overlay property)}
1661If this property is non-@code{nil}, it specifies a keymap for a portion
1662of the text. The property's value replaces the buffer's local map, when
1663the character after point is within the overlay. @xref{Active Keymaps}.
1664
1665@item keymap 1658@item keymap
1659@cindex keymap of character (and overlays)
1666@kindex keymap @r{(overlay property)} 1660@kindex keymap @r{(overlay property)}
1667The @code{keymap} property is similar to @code{local-map} but overrides the 1661If this property is non-@code{nil}, it specifies a keymap for a portion of the
1668buffer's local map (and the map specified by the @code{local-map} 1662text. This keymap is used when the character after point is within the
1669property) rather than replacing it. 1663overlay, and takes precedence over most other keymaps. @xref{Active Keymaps}.
1664
1665@item local-map
1666@kindex local-map @r{(overlay property)}
1667The @code{local-map} property is similar to @code{keymap} but replaces the
1668buffer's local map rather than augmenting existing keymaps. This also means it
1669has lower precedence than minor mode keymaps.
1670@end table 1670@end table
1671 1671
1672The @code{local-map} and @code{keymap} properties do not affect a 1672The @code{keymap} and @code{local-map} properties do not affect a
1673string displayed by the @code{before-string}, @code{after-string}, or 1673string displayed by the @code{before-string}, @code{after-string}, or
1674@code{display} properties. This is only relevant for mouse clicks and 1674@code{display} properties. This is only relevant for mouse clicks and
1675other mouse events that fall on the string, since point is never on 1675other mouse events that fall on the string, since point is never on
1676the string. To bind special mouse events for the string, assign it a 1676the string. To bind special mouse events for the string, assign it a
1677@code{local-map} or @code{keymap} text property. @xref{Special 1677@code{keymap} or @code{local-map} text property. @xref{Special
1678Properties}. 1678Properties}.
1679 1679
1680@node Finding Overlays 1680@node Finding Overlays
@@ -2126,7 +2126,8 @@ used automatically to handle certain shades of gray.
2126 2126
2127@item :font 2127@item :font
2128The font used to display the face. Its value should be a font object. 2128The font used to display the face. Its value should be a font object.
2129@xref{Font Selection}, for information about font objects. 2129@xref{Low-Level Font}, for information about font objects, font specs,
2130and font entities.
2130 2131
2131When specifying this attribute using @code{set-face-attribute} 2132When specifying this attribute using @code{set-face-attribute}
2132(@pxref{Attribute Functions}), you may also supply a font spec, a font 2133(@pxref{Attribute Functions}), you may also supply a font spec, a font
@@ -3260,7 +3261,9 @@ to @var{value}.
3260properties are intermediate between a font object and a font spec: 3261properties are intermediate between a font object and a font spec:
3261like a font object, and unlike a font spec, it refers to a single, 3262like a font object, and unlike a font spec, it refers to a single,
3262specific font. Unlike a font object, creating a font entity does not 3263specific font. Unlike a font object, creating a font entity does not
3263load the contents of that font into computer memory. 3264load the contents of that font into computer memory. Emacs may open
3265multiple font objects of different sizes from a single font entity
3266referring to a scalable font.
3264 3267
3265@defun find-font font-spec &optional frame 3268@defun find-font font-spec &optional frame
3266This function returns a font entity that best matches the font spec 3269This function returns a font entity that best matches the font spec
@@ -4650,6 +4653,15 @@ image. If only one of them is specified, the other one will be
4650calculated so as to preserve the aspect ratio. If both are specified, 4653calculated so as to preserve the aspect ratio. If both are specified,
4651aspect ratio may not be preserved. 4654aspect ratio may not be preserved.
4652 4655
4656@item :max-width, :max-height
4657The @code{:max-width} and @code{:max-height} keywords are used for
4658scaling if the size of the image of the image exceeds these values.
4659If @code{:width} is set it will have precedence over @code{max-width},
4660and if @code{:height} is set it will have precedence over
4661@code{max-height}, but you can otherwise mix these keywords as you
4662wish. @code{:max-width} and @code{:max-height} will always preserve
4663the aspect ratio.
4664
4653@item :rotation 4665@item :rotation
4654Specifies a rotation angle in degrees. 4666Specifies a rotation angle in degrees.
4655 4667
@@ -6419,6 +6431,26 @@ determined dynamically by Emacs. For buffers whose value of
6419buffers, this function always returns @code{left-to-right}. 6431buffers, this function always returns @code{left-to-right}.
6420@end defun 6432@end defun
6421 6433
6434@cindex visual-order cursor motion
6435 Sometimes there's a need to move point in strict visual order,
6436either to the left or to the right of its current screen position.
6437Emacs provides a primitive to do that.
6438
6439@defun move-point-visually direction
6440This function moves point of the currently selected window to the
6441buffer position that appears immediately to the right or to the left
6442of point on the screen. If @var{direction} is positive, point will
6443move one screen position to the right, otherwise it will move one
6444screen position to the left. Note that, depending on the surrounding
6445bidirectional context, this could potentially move point many buffer
6446positions away. If invoked at the end of a screen line, the function
6447moves point to the rightmost or leftmost screen position of the next
6448or previous screen line, as appropriate for the value of
6449@var{direction}.
6450
6451The function returns the new buffer position as its value.
6452@end defun
6453
6422@cindex layout on display, and bidirectional text 6454@cindex layout on display, and bidirectional text
6423@cindex jumbled display of bidirectional text 6455@cindex jumbled display of bidirectional text
6424@cindex concatenating bidirectional strings 6456@cindex concatenating bidirectional strings
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 7768c147827..fcd345ef83b 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -974,10 +974,11 @@ Note that we do not quote the @code{lambda} form.
974compiled. This would not happen if, say, you had constructed the 974compiled. This would not happen if, say, you had constructed the
975anonymous function by quoting it as a list: 975anonymous function by quoting it as a list:
976 976
977@c Do not unquote this lambda!
977@example 978@example
978@group 979@group
979(defun double-property (symbol prop) 980(defun double-property (symbol prop)
980 (change-property symbol prop (lambda (x) (* 2 x)))) 981 (change-property symbol prop '(lambda (x) (* 2 x))))
981@end group 982@end group
982@end example 983@end example
983 984
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 822e952ef98..ef020364082 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -663,17 +663,16 @@ additional active keymaps through the variable
663 663
664 The highest precedence normal keymap comes from the @code{keymap} 664 The highest precedence normal keymap comes from the @code{keymap}
665text or overlay property. If that is non-@code{nil}, it is the first 665text or overlay property. If that is non-@code{nil}, it is the first
666keymap to be processed, in normal circumstances. Next comes 666keymap to be processed, in normal circumstances.
667any keymap added by the function @code{set-temporary-overlay-map}.
668@xref{Controlling Active Maps}.
669 667
670 However, there are also special ways for programs to substitute 668 However, there are also special ways for programs to substitute
671other keymaps for some of those. The variable 669other keymaps for some of those. The variable
672@code{overriding-local-map}, if non-@code{nil}, specifies a keymap 670@code{overriding-local-map}, if non-@code{nil}, specifies a keymap
673that replaces all the usual active keymaps except the global keymap. 671that replaces all the usual active keymaps except the global keymap.
674Another way to do this is with @code{overriding-terminal-local-map}; 672
675it operates on a per-terminal basis. These variables are documented 673The very highest precedence keymap comes from
676below. 674@code{overriding-terminal-local-map}; it operates on a per-terminal basis and
675is normally used for modal/transient keybindings.
677 676
678@cindex major mode keymap 677@cindex major mode keymap
679 Since every buffer that uses the same major mode normally uses the 678 Since every buffer that uses the same major mode normally uses the
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 4c0f0d73e41..dab8e8d1255 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -461,7 +461,7 @@ and calls @code{define-key}; not even if the variable name is the same
461symbol @var{function}. 461symbol @var{function}.
462 462
463@cindex function cell in autoload 463@cindex function cell in autoload
464if @var{function} already has non-void function definition that is not 464If @var{function} already has a non-void function definition that is not
465an autoload object, this function does nothing and returns @code{nil}. 465an autoload object, this function does nothing and returns @code{nil}.
466Otherwise, it constructs an autoload object (@pxref{Autoload Type}), 466Otherwise, it constructs an autoload object (@pxref{Autoload Type}),
467and stores it as the function definition for @var{function}. The 467and stores it as the function definition for @var{function}. The
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 7d42d2591d6..59729380ea7 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1800,7 +1800,7 @@ display of the text just as they would text in the buffer. Any
1800characters which have no @code{face} properties are displayed, by 1800characters which have no @code{face} properties are displayed, by
1801default, in the face @code{mode-line} or @code{mode-line-inactive} 1801default, in the face @code{mode-line} or @code{mode-line-inactive}
1802(@pxref{Standard Faces,,, emacs, The GNU Emacs Manual}). The 1802(@pxref{Standard Faces,,, emacs, The GNU Emacs Manual}). The
1803@code{help-echo} and @code{local-map} properties in @var{string} have 1803@code{help-echo} and @code{keymap} properties in @var{string} have
1804special meanings. @xref{Properties in Mode}. 1804special meanings. @xref{Properties in Mode}.
1805 1805
1806@item @var{symbol} 1806@item @var{symbol}
@@ -2205,7 +2205,7 @@ The value of @code{global-mode-string}.
2205 Certain text properties are meaningful in the 2205 Certain text properties are meaningful in the
2206mode line. The @code{face} property affects the appearance of text; the 2206mode line. The @code{face} property affects the appearance of text; the
2207@code{help-echo} property associates help strings with the text, and 2207@code{help-echo} property associates help strings with the text, and
2208@code{local-map} can make the text mouse-sensitive. 2208@code{keymap} can make the text mouse-sensitive.
2209 2209
2210 There are four ways to specify text properties for text in the mode 2210 There are four ways to specify text properties for text in the mode
2211line: 2211line:
@@ -2229,7 +2229,7 @@ structure, and make @var{form} evaluate to a string that has a text
2229property. 2229property.
2230@end enumerate 2230@end enumerate
2231 2231
2232 You can use the @code{local-map} property to specify a keymap. This 2232 You can use the @code{keymap} property to specify a keymap. This
2233keymap only takes real effect for mouse clicks; binding character keys 2233keymap only takes real effect for mouse clicks; binding character keys
2234and function keys to it has no effect, since it is impossible to move 2234and function keys to it has no effect, since it is impossible to move
2235point into the mode line. 2235point into the mode line.
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index eeebac6bf72..2b6f31b670b 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -1156,11 +1156,6 @@ This function returns the logarithm of @var{arg}, with base
1156returns a NaN. 1156returns a NaN.
1157@end defun 1157@end defun
1158 1158
1159@defun log10 arg
1160This function returns the logarithm of @var{arg}, with base 10:
1161@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}.
1162@end defun
1163
1164@defun expt x y 1159@defun expt x y
1165This function returns @var{x} raised to power @var{y}. If both 1160This function returns @var{x} raised to power @var{y}. If both
1166arguments are integers and @var{y} is positive, the result is an 1161arguments are integers and @var{y} is positive, the result is an
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 6d5a39d887a..c10458b39ae 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1226,7 +1226,7 @@ list, which is in the variable @code{buffer-undo-list}.
1226 1226
1227@defvar buffer-undo-list 1227@defvar buffer-undo-list
1228This buffer-local variable's value is the undo list of the current 1228This buffer-local variable's value is the undo list of the current
1229buffer. A value of @code{t} disables the recording of undo information. 1229buffer. A value of @code{t} disables the recording of undo information.
1230@end defvar 1230@end defvar
1231 1231
1232Here are the kinds of elements an undo list can have: 1232Here are the kinds of elements an undo list can have:
@@ -2805,6 +2805,28 @@ from the specified range of text. Here's an example:
2805Do not rely on the return value of this function. 2805Do not rely on the return value of this function.
2806@end defun 2806@end defun
2807 2807
2808@defun add-face-text-property start end face &optional appendp object
2809@code{face} text attributes can be combined. If you want to make a
2810section both italic and green, you can either define a new face that
2811have those attributes, or you can add both these attributes separately
2812to text:
2813
2814@example
2815(add-face-text-property @var{start} @var{end} 'italic)
2816(add-face-text-property @var{start} @var{end} '(:foreground "#00ff00"))
2817@end example
2818
2819The attribute is (by default) prepended to the list of face
2820attributes, and the first attribute of the same type takes
2821precedence. So if you have two @code{:foreground} specifications, the
2822first one will take effect.
2823
2824If you pass in @var{appendp}, the attribute will be appended instead
2825of prepended, which means that it will have no effect if there is
2826already an attribute of the same type.
2827
2828@end defun
2829
2808 The easiest way to make a string with text properties 2830 The easiest way to make a string with text properties
2809is with @code{propertize}: 2831is with @code{propertize}:
2810 2832
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index c40ae408f7f..2e3760e573e 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -54,12 +54,12 @@ You should choose a short word to distinguish your program from other
54Lisp programs. The names of all global symbols in your program, that 54Lisp programs. The names of all global symbols in your program, that
55is the names of variables, constants, and functions, should begin with 55is the names of variables, constants, and functions, should begin with
56that chosen prefix. Separate the prefix from the rest of the name 56that chosen prefix. Separate the prefix from the rest of the name
57with a hyphen, @samp{-}. Use two hyphens if the symbol is not meant 57with a hyphen, @samp{-}. This practice helps avoid name conflicts,
58to be used by other packages. This practice helps avoid name 58since all global variables in Emacs Lisp share the same name space,
59conflicts, since all global variables in Emacs Lisp share the same 59and all functions share another name space@footnote{The benefits of a
60name space, and all functions share another name space@footnote{The 60Common Lisp-style package system are considered not to outweigh the
61benefits of a Common Lisp-style package system are considered not to 61costs.}. Use two hyphens to separate prefix and name if the symbol is
62outweigh the costs.}. 62not meant to be used by other packages.
63 63
64Occasionally, for a command name intended for users to use, it is more 64Occasionally, for a command name intended for users to use, it is more
65convenient if some words come before the package's name prefix. And 65convenient if some words come before the package's name prefix. And
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 4bcf7985f0c..4a38fa9ccd5 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -988,7 +988,7 @@ Here is an example:
988 (setq my-ticker (lambda () 988 (setq my-ticker (lambda ()
989 (setq x (1+ x))))) 989 (setq x (1+ x)))))
990 @result{} (closure ((x . 0) t) () 990 @result{} (closure ((x . 0) t) ()
991 (1+ x)) 991 (setq x (1+ x)))
992 992
993(funcall my-ticker) 993(funcall my-ticker)
994 @result{} 1 994 @result{} 1