aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStephen Leake2019-04-11 14:00:02 -0700
committerStephen Leake2019-04-11 14:00:02 -0700
commit7ba7def5caf7ec9d9bebffff489f0a658229fbda (patch)
treee0cfcb59937ca0528fb81769d7d48a904a91f5dc /doc
parent7768581172e11be52b1fcd8224f4594e126bbdb7 (diff)
parentde238b39e335c6814283faa171b35145f124edf2 (diff)
downloademacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.tar.gz
emacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.zip
Merge commit 'de238b39e335c6814283faa171b35145f124edf2'
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/lispref/text.texi4
-rw-r--r--doc/lispref/windows.texi115
-rw-r--r--doc/misc/eieio.texi52
-rw-r--r--doc/misc/tramp.texi6
5 files changed, 102 insertions, 77 deletions
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 7edc1a5fae1..58ec3730299 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -1484,7 +1484,7 @@ Stevens, Andy Stewart, Jonathan Stigelman, Martin Stjernholm, Kim F.
1484Storm, Steve Strassmann, Christopher Suckling, Olaf Sylvester, Naoto 1484Storm, Steve Strassmann, Christopher Suckling, Olaf Sylvester, Naoto
1485Takahashi, Steven Tamm, Jan Tatarik, Luc Teirlinck, Jean-Philippe Theberge, Jens 1485Takahashi, Steven Tamm, Jan Tatarik, Luc Teirlinck, Jean-Philippe Theberge, Jens
1486T. Berger Thielemann, Spencer Thomas, Jim Thompson, Toru Tomabechi, 1486T. Berger Thielemann, Spencer Thomas, Jim Thompson, Toru Tomabechi,
1487David O'Toole, Markus Triska, Tom Tromey, Enami Tsugutomo, Eli 1487David O'Toole, Markus Triska, Tom Tromey, Eli
1488Tziperman, Daiki Ueno, Masanobu Umeda, Rajesh Vaidheeswarran, Neil 1488Tziperman, Daiki Ueno, Masanobu Umeda, Rajesh Vaidheeswarran, Neil
1489W. Van Dyke, Didier Verna, Joakim Verona, Ulrik Vieth, Geoffrey 1489W. Van Dyke, Didier Verna, Joakim Verona, Ulrik Vieth, Geoffrey
1490Voelker, Johan Vromans, Inge Wallin, John Paul Wallington, Colin 1490Voelker, Johan Vromans, Inge Wallin, John Paul Wallington, Colin
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 86f9fa0e5f5..1ef836b8f94 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -2577,11 +2577,11 @@ The quick brown fox jum @point{}ped.
2577@end example 2577@end example
2578@end deffn 2578@end deffn
2579 2579
2580@deffn Command indent-relative-maybe 2580@deffn Command indent-relative-first-indent-point
2581@comment !!SourceFile indent.el 2581@comment !!SourceFile indent.el
2582This command indents the current line like the previous nonblank line, 2582This command indents the current line like the previous nonblank line,
2583by calling @code{indent-relative} with @code{t} as the 2583by calling @code{indent-relative} with @code{t} as the
2584@var{unindented-ok} argument. The return value is unpredictable. 2584@var{first-only} argument. The return value is unpredictable.
2585 2585
2586If the previous nonblank line has no indent points beyond the current 2586If the previous nonblank line has no indent points beyond the current
2587column, this command does nothing. 2587column, this command does nothing.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 6b716323357..32e8c2afa31 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -1951,7 +1951,13 @@ The optional argument @var{all-frames} has the same meaning as in
1951@code{next-window}. 1951@code{next-window}.
1952 1952
1953This function does not select a window that has a non-@code{nil} 1953This function does not select a window that has a non-@code{nil}
1954@code{no-other-window} window parameter (@pxref{Window Parameters}). 1954@code{no-other-window} window parameter (@pxref{Window Parameters}),
1955provided that @code{ignore-window-parameters} is @code{nil}.
1956
1957If the @code{other-window} parameter of the selected window is a
1958function, and @code{ignore-window-parameters} is @code{nil}, that
1959function will be called with the arguments @var{count} and
1960@var{all-frames} instead of the normal operation of this function.
1955@end deffn 1961@end deffn
1956 1962
1957@defun walk-windows fun &optional minibuf all-frames 1963@defun walk-windows fun &optional minibuf all-frames
@@ -3936,8 +3942,33 @@ described next to deal with the window and its buffer.
3936This function handles @var{window} and its buffer after quitting. The 3942This function handles @var{window} and its buffer after quitting. The
3937optional argument @var{window} must be a live window and defaults to 3943optional argument @var{window} must be a live window and defaults to
3938the selected one. The function's behavior is determined by the four 3944the selected one. The function's behavior is determined by the four
3939elements of the @code{quit-restore} window parameter (@pxref{Window 3945elements of the list specified by the @code{quit-restore} window
3940Parameters}), which is set to @code{nil} afterwards. 3946parameter (@pxref{Window Parameters}), which is set to @code{nil}
3947afterwards.
3948
3949The first element of the @code{quit-restore} parameter is one of the
3950symbols @code{window}, meaning that the window has been specially
3951created by @code{display-buffer}; @code{frame}, a separate frame has
3952been created; @code{same}, the window has only ever displayed this
3953buffer; or @code{other}, the window showed another buffer before.
3954@code{frame} and @code{window} affect how the window is quit, while
3955@code{same} and @code{other} affect the redisplay of buffers
3956previously shown in this window.
3957
3958The second element is either one of the symbols @code{window} or
3959@code{frame}, or a list whose elements are the buffer shown in the
3960window before, that buffer's window start and window point positions,
3961and the window's height at that time. If that buffer is still live
3962when the window is quit, then the function @code{quit-restore-window}
3963reuses the window to display the buffer.
3964
3965The third element is the window selected at the time the parameter was
3966created. If @code{quit-restore-window} deletes the window passed to
3967it as argument, it then tries to reselect this window.
3968
3969The fourth element is the buffer whose display caused the creation of
3970this parameter. @code{quit-restore-window} deletes the specified window
3971only if it still shows that buffer.
3941 3972
3942The window is deleted entirely if: 1) the first element of the 3973The window is deleted entirely if: 1) the first element of the
3943@code{quit-restore} parameter is one of 'window or 'frame, 2) the 3974@code{quit-restore} parameter is one of 'window or 'frame, 2) the
@@ -4627,13 +4658,14 @@ This function sets the display-start position of @var{window} to
4627@var{position} in @var{window}'s buffer. It returns @var{position}. 4658@var{position} in @var{window}'s buffer. It returns @var{position}.
4628 4659
4629The display routines insist that the position of point be visible when a 4660The display routines insist that the position of point be visible when a
4630buffer is displayed. Normally, they change the display-start position 4661buffer is displayed. Normally, they select the display-start position
4631(that is, scroll the window) whenever necessary to make point visible. 4662according to their internal logic (and scroll the window if necessary)
4632However, if you specify the start position with this function using 4663to make point visible. However, if you specify the start position
4633@code{nil} for @var{noforce}, it means you want display to start at 4664with this function using @code{nil} for @var{noforce}, it means you
4634@var{position} even if that would put the location of point off the 4665want display to start at @var{position} even if that would put the
4635screen. If this does place point off screen, the display routines move 4666location of point off the screen. If this does place point off
4636point to the left margin on the middle line in the window. 4667screen, the display routines attempt to move point to the left margin
4668on the middle line in the window.
4637 4669
4638For example, if point @w{is 1} and you set the start of the window 4670For example, if point @w{is 1} and you set the start of the window
4639@w{to 37}, the start of the next line, point will be above the top 4671@w{to 37}, the start of the next line, point will be above the top
@@ -4680,6 +4712,13 @@ it is still 1 when redisplay occurs. Here is an example:
4680@end group 4712@end group
4681@end example 4713@end example
4682 4714
4715If the attempt to make point visible (i.e., in a fully-visible screen
4716line) fails, the display routines will disregard the requested
4717window-start position and compute a new one anyway. Thus, for
4718reliable results Lisp programs that call this function should always
4719move point to be inside the window whose display starts at
4720@var{position}.
4721
4683If @var{noforce} is non-@code{nil}, and @var{position} would place point 4722If @var{noforce} is non-@code{nil}, and @var{position} would place point
4684off screen at the next redisplay, then redisplay computes a new window-start 4723off screen at the next redisplay, then redisplay computes a new window-start
4685position that works well with point, and thus @var{position} is not used. 4724position that works well with point, and thus @var{position} is not used.
@@ -5796,8 +5835,8 @@ and heights, if possible. Frames are not resized by this function.
5796@section Window Parameters 5835@section Window Parameters
5797@cindex window parameters 5836@cindex window parameters
5798 5837
5799This section describes how window parameters can be used to associate 5838This section describes the window parameters that can be used to
5800additional information with windows. 5839associate additional information with windows.
5801 5840
5802@defun window-parameter window parameter 5841@defun window-parameter window parameter
5803This function returns @var{window}'s value for @var{parameter}. The 5842This function returns @var{window}'s value for @var{parameter}. The
@@ -5930,44 +5969,21 @@ parameter is installed and updated by the function
5930@vindex quit-restore@r{, a window parameter} 5969@vindex quit-restore@r{, a window parameter}
5931This parameter is installed by the buffer display functions 5970This parameter is installed by the buffer display functions
5932(@pxref{Choosing Window}) and consulted by @code{quit-restore-window} 5971(@pxref{Choosing Window}) and consulted by @code{quit-restore-window}
5933(@pxref{Quitting Windows}). It contains four elements: 5972(@pxref{Quitting Windows}). It is a list of four elements, see the
5934 5973description of @code{quit-restore-window} in @ref{Quitting Windows}
5935The first element is one of the symbols @code{window}, meaning that 5974for details.
5936the window has been specially created by @code{display-buffer};
5937@code{frame}, a separate frame has been created; @code{same}, the
5938window has only ever displayed this buffer; or @code{other}, the
5939window showed another buffer before. @code{frame} and @code{window}
5940affect how the window is quit, while @code{same} and @code{other}
5941affect the redisplay of buffers previously shown in this window.
5942 5975
5943The second element is either one of the symbols @code{window} or 5976@item window-side
5944@code{frame}, or a list whose elements are the buffer shown in the 5977@itemx window-slot
5945window before, that buffer's window start and window point positions,
5946and the window's height at that time. If that buffer is still live
5947when the window is quit, then the function @code{quit-restore-window}
5948reuses the window to display the buffer.
5949
5950The third element is the window selected at the time the parameter was
5951created. If @code{quit-restore-window} deletes the window passed to
5952it as argument, it then tries to reselect this window.
5953
5954The fourth element is the buffer whose display caused the creation of
5955this parameter. @code{quit-restore-window} deletes the specified window
5956only if it still shows that buffer.
5957
5958See the description of @code{quit-restore-window} in @ref{Quitting
5959Windows} for details.
5960
5961@item window-side window-slot
5962@vindex window-side@r{, a window parameter} 5978@vindex window-side@r{, a window parameter}
5963@vindex window-slot@r{, a window parameter} 5979@vindex window-slot@r{, a window parameter}
5964These parameters are used for implementing side windows (@pxref{Side 5980These parameters are used internally for implementing side windows
5965Windows}). 5981(@pxref{Side Windows}).
5966 5982
5967@item window-atom 5983@item window-atom
5968@vindex window-atom@r{, a window parameter} 5984@vindex window-atom@r{, a window parameter}
5969This parameter is used for implementing atomic windows, see @ref{Atomic 5985This parameter is used internally for implementing atomic windows, see
5970Windows}. 5986@ref{Atomic Windows}.
5971 5987
5972@item mode-line-format 5988@item mode-line-format
5973@vindex mode-line-format@r{, a window parameter} 5989@vindex mode-line-format@r{, a window parameter}
@@ -5989,11 +6005,12 @@ affected.
5989 6005
5990@item min-margins 6006@item min-margins
5991@vindex min-margins@r{, a window parameter} 6007@vindex min-margins@r{, a window parameter}
5992The value of this parameter is a cons cell whose @sc{car} and @sc{cdr}, 6008The value of this parameter is a cons cell whose @sc{car} and
5993if non-@code{nil}, specify the minimum values (in columns) for the left 6009@sc{cdr}, if non-@code{nil}, specify the minimum values (in columns)
5994and right margin of this window. When present, Emacs will use these 6010for the left and right margin of this window (@pxref{Display Margins}.
5995values instead of the actual margin widths for determining whether a 6011When present, Emacs will use these values instead of the actual margin
5996window can be split or shrunk horizontally. 6012widths for determining whether a window can be split or shrunk
6013horizontally.
5997 6014
5998Emacs never auto-adjusts the margins of any window after splitting or 6015Emacs never auto-adjusts the margins of any window after splitting or
5999resizing it. It is the sole responsibility of any application setting 6016resizing it. It is the sole responsibility of any application setting
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index d03ee79f18b..f56b2b67a40 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -88,11 +88,11 @@ framework for writing object-oriented applications in Emacs.
88use @eieio{} to create classes, methods for those classes, and 88use @eieio{} to create classes, methods for those classes, and
89instances of classes. 89instances of classes.
90 90
91Here is a simple example of a class named @code{record}, containing 91Here is a simple example of a class named @code{person}, containing
92three slots named @code{name}, @code{birthday}, and @code{phone}: 92three slots named @code{name}, @code{birthday}, and @code{phone}:
93 93
94@example 94@example
95(defclass record () ; No superclasses 95(defclass person () ; No superclasses
96 ((name :initarg :name 96 ((name :initarg :name
97 :initform "" 97 :initform ""
98 :type string 98 :type string
@@ -106,23 +106,23 @@ three slots named @code{name}, @code{birthday}, and @code{phone}:
106 (phone :initarg :phone 106 (phone :initarg :phone
107 :initform "" 107 :initform ""
108 :documentation "Phone number.")) 108 :documentation "Phone number."))
109 "A single record for tracking people I know.") 109 "A class for tracking people I know.")
110@end example 110@end example
111 111
112Each class can have methods, which are defined like this: 112Each class can have methods, which are defined like this:
113 113
114@example 114@example
115(cl-defmethod call-record ((rec record) &optional scriptname) 115(cl-defmethod call-person ((pers person) &optional scriptname)
116 "Dial the phone for the record REC. 116 "Dial the phone for the person PERS.
117Execute the program SCRIPTNAME to dial the phone." 117Execute the program SCRIPTNAME to dial the phone."
118 (message "Dialing the phone for %s" (oref rec name)) 118 (message "Dialing the phone for %s" (oref pers name))
119 (shell-command (concat (or scriptname "dialphone.sh") 119 (shell-command (concat (or scriptname "dialphone.sh")
120 " " 120 " "
121 (oref rec phone)))) 121 (oref pers phone))))
122@end example 122@end example
123 123
124@noindent 124@noindent
125In this example, the first argument to @code{call-record} is a list, 125In this example, the first argument to @code{call-person} is a list,
126of the form (@var{varname} @var{classname}). @var{varname} is the 126of the form (@var{varname} @var{classname}). @var{varname} is the
127name of the variable used for the first argument; @var{classname} is 127name of the variable used for the first argument; @var{classname} is
128the name of the class that is expected as the first argument for this 128the name of the class that is expected as the first argument for this
@@ -130,17 +130,17 @@ method.
130 130
131@eieio{} dispatches methods based on the type of the first argument. 131@eieio{} dispatches methods based on the type of the first argument.
132You can have multiple methods with the same name for different classes 132You can have multiple methods with the same name for different classes
133of object. When the @code{call-record} method is called, the first 133of object. When the @code{call-person} method is called, the first
134argument is examined to determine the class of that argument, and the 134argument is examined to determine the class of that argument, and the
135method matching the input type is then executed. 135method matching the input type is then executed.
136 136
137Once the behavior of a class is defined, you can create a new 137Once the behavior of a class is defined, you can create a new
138object of type @code{record}. Objects are created by calling the 138object of type @code{person}. Objects are created by calling the
139constructor. The constructor is a function with the same name as your 139constructor. The constructor is a function with the same name as your
140class which returns a new instance of that class. Here is an example: 140class which returns a new instance of that class. Here is an example:
141 141
142@example 142@example
143(setq rec (record :name "Eric" :birthday "June" :phone "555-5555")) 143(setq pers (person :name "Eric" :birthday "June" :phone "555-5555"))
144@end example 144@end example
145 145
146@noindent 146@noindent
@@ -157,19 +157,19 @@ first argument should be an object of a class which has had this
157method defined for it. In this example it would look like this: 157method defined for it. In this example it would look like this:
158 158
159@example 159@example
160(call-record rec) 160(call-person pers)
161@end example 161@end example
162 162
163@noindent 163@noindent
164or 164or
165 165
166@example 166@example
167(call-record rec "my-call-script") 167(call-person pers "my-call-script")
168@end example 168@end example
169 169
170In these examples, @eieio{} automatically examines the class of 170In these examples, @eieio{} automatically examines the class of
171@code{rec}, and ensures that the method defined above is called. If 171@code{pers}, and ensures that the method defined above is called. If
172@code{rec} is some other class lacking a @code{call-record} method, or 172@code{pers} is some other class lacking a @code{call-person} method, or
173some other data type, Emacs signals a @code{cl-no-applicable-method} 173some other data type, Emacs signals a @code{cl-no-applicable-method}
174error. @ref{Signals}. 174error. @ref{Signals}.
175 175
@@ -270,10 +270,18 @@ by a symbol with the name @var{class-name}. @eieio{} stores the structure of
270the class as a symbol property of @var{class-name} (@pxref{Symbol 270the class as a symbol property of @var{class-name} (@pxref{Symbol
271Components,,,elisp,GNU Emacs Lisp Reference Manual}). 271Components,,,elisp,GNU Emacs Lisp Reference Manual}).
272 272
273When defining a class, @eieio{} overwrites any preexisting variable or
274function bindings for the symbol @var{class-name}, which may lead to
275undesired consequences. Before naming a new class, you should check
276for name conflicts. To help avoid cross-package conflicts you should
277choose a name with the same prefix you chose for the rest of your
278package's functions and variables (@pxref{Coding
279Conventions,,,elisp,GNU Emacs Lisp Reference Manual}).
280
273The @var{class-name} symbol's variable documentation string is a 281The @var{class-name} symbol's variable documentation string is a
274modified version of the doc string found in @var{options-and-doc}. 282modified version of the doc string found in @var{options-and-doc}.
275Each time a method is defined, the symbol's documentation string is 283Each time a method is defined, the symbol's documentation string is
276updated to include the methods documentation as well. 284updated to include the method's documentation as well.
277 285
278The parent classes for @var{class-name} is @var{superclass-list}. 286The parent classes for @var{class-name} is @var{superclass-list}.
279Each element of @var{superclass-list} must be a class. These classes 287Each element of @var{superclass-list} must be a class. These classes
@@ -625,10 +633,10 @@ function of @code{:initform}.
625@node Making New Objects 633@node Making New Objects
626@chapter Making New Objects 634@chapter Making New Objects
627 635
628Suppose we have a simple class is defined, such as: 636Suppose we have defined a simple class, such as:
629 637
630@example 638@example
631(defclass record () 639(defclass my-class ()
632 ( ) "Doc String") 640 ( ) "Doc String")
633@end example 641@end example
634 642
@@ -636,10 +644,10 @@ Suppose we have a simple class is defined, such as:
636It is now possible to create objects of that class type. 644It is now possible to create objects of that class type.
637 645
638Calling @code{defclass} has defined two new functions. One is the 646Calling @code{defclass} has defined two new functions. One is the
639constructor @var{record}, and the other is the predicate, 647constructor @var{my-class}, and the other is the predicate,
640@var{record}-p. 648@var{my-class}-p.
641 649
642@defun record object-name &rest slots 650@defun my-class object-name &rest slots
643 651
644This creates and returns a new object. This object is not assigned to 652This creates and returns a new object. This object is not assigned to
645anything, and will be garbage collected if not saved. This object 653anything, and will be garbage collected if not saved. This object
@@ -657,7 +665,7 @@ can do any valid Lispy thing you want with it, such as
657Example of creating an object from a class: 665Example of creating an object from a class:
658 666
659@example 667@example
660(record :value 3 :reference nil) 668(my-class :value 3 :reference nil)
661@end example 669@end example
662 670
663@end defun 671@end defun
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 264a64b26ad..e376fc7495e 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2671,7 +2671,7 @@ name syntax. Its value changes after every call of
2671this variable in external packages, a call of @code{file-remote-p} is 2671this variable in external packages, a call of @code{file-remote-p} is
2672much more appropriate. 2672much more appropriate.
2673@ifinfo 2673@ifinfo
2674@pxref{Magic File Names, , , elisp} 2674@pxref{Magic File Names, , , elisp}.
2675@end ifinfo 2675@end ifinfo
2676@end defvar 2676@end defvar
2677@end ifset 2677@end ifset
@@ -3010,7 +3010,7 @@ Starting with Emacs 26, you could use connection-local variables for
3010setting different values of @code{explicit-shell-file-name} for 3010setting different values of @code{explicit-shell-file-name} for
3011different remote hosts. 3011different remote hosts.
3012@ifinfo 3012@ifinfo
3013@xref{Connection Variables, , , emacs} 3013@xref{Connection Variables, , , emacs}.
3014@end ifinfo 3014@end ifinfo
3015 3015
3016@lisp 3016@lisp
@@ -3720,7 +3720,7 @@ Set @code{file-precious-flag} to @code{t} for files accessed by
3720@value{tramp} so the file contents are checked using checksum by 3720@value{tramp} so the file contents are checked using checksum by
3721first saving to a temporary file. 3721first saving to a temporary file.
3722@ifinfo 3722@ifinfo
3723@pxref{Saving Buffers, , , elisp} 3723@pxref{Saving Buffers, , , elisp}.
3724@end ifinfo 3724@end ifinfo
3725 3725
3726@lisp 3726@lisp