Commit 4bee1b8b authored by Glenn Morris's avatar Glenn Morris
Browse files

Stop keeping multiple doc copies for items defined multiple times

It was always a nuisance to keep all the copies in sync.
* src/doc.c (Fsnarf_documentation): Don't skip entire files.
Instead, skip individual doc strings starting with "SKIP".
* doc/lispref/internals.texi (Writing Emacs Primitives):
Mention this skipping.
* lisp/term/ns-win.el, lisp/term/pc-win.el, src/dosfns.c:
* src/frame.c, src/nsfns.m, src/nsmenu.m, src/nsterm.m:
* src/w16select.c, src/w32fns.c, src/w32menu.c, src/w32select.c:
* src/w32term.c, src/xmenu.c: Remove duplicated doc strings.
* src/xfns.c: Merge in information from doc string duplicates.
parent 6c7186de
......@@ -758,6 +758,13 @@ names in the documentation string from the ones used in the C code.
@samp{usage:} is required if the function has an unlimited number of
arguments.
Some primitives have multiple definitions, one per platform (e.g.,
@code{x-create-frame}). In such cases, rather than writing the
same documentation string in each definition, only one definition has
the actual documentation. The others have placeholders beginning with
@samp{SKIP}, which are ignored by the function that parses the
@file{DOC} file.
All the usual rules for documentation strings in Lisp code
(@pxref{Documentation Tips}) apply to C code documentation strings
too.
......
......@@ -437,14 +437,7 @@ Lines are highlighted according to `ns-input-line'."
;;;; File handling.
(defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p)
"Read file name, prompting with PROMPT in directory DIR.
Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file
selection box, if specified. If MUSTMATCH is non-nil, the returned file
or directory must exist.
This function is only defined on NS, MS Windows, and X Windows with the
Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored.
Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories."
"SKIP: real doc in xfns.c."
(ns-read-file-name prompt dir mustmatch default_filename only_dir_p))
(defun ns-open-file-using-panel ()
......
......@@ -158,159 +158,59 @@ created."
;; a useful function for returning 'nil regardless of argument.
;; Note: Any re-definition in this file of a function that is defined
;; in C on other platforms, should either have no doc-string, or one
;; that is identical to the C version, but with the arglist signature
;; at the end. Otherwise help-split-fundoc gets confused on other
;; platforms. (Bug#10783)
;; in C on other platforms, should either have a doc-string that
;; starts with "SKIP", or one that is identical to the C version,
;; but with the arglist signature at the end. Otherwise
;; help-split-fundoc gets confused on other platforms. (Bug#10783)
;; From src/xfns.c
(defun x-list-fonts (_pattern &optional _face _frame _maximum width)
"Return a list of the names of available fonts matching PATTERN.
If optional arguments FACE and FRAME are specified, return only fonts
the same size as FACE on FRAME.
PATTERN should be a string containing a font name in the XLFD,
Fontconfig, or GTK format. A font name given in the XLFD format may
contain wildcard characters:
the * character matches any substring, and
the ? character matches any single character.
PATTERN is case-insensitive.
The return value is a list of strings, suitable as arguments to
`set-face-font'.
Fonts Emacs can't use may or may not be excluded
even if they match PATTERN and FACE.
The optional fourth argument MAXIMUM sets a limit on how many
fonts to match. The first MAXIMUM fonts are reported.
The optional fifth argument WIDTH, if specified, is a number of columns
occupied by a character of a font. In that case, return only fonts
the WIDTH times as wide as FACE on FRAME."
"SKIP: real doc in xfaces.c."
(if (or (null width) (and (numberp width) (= width 1)))
(list "ms-dos")
(list "no-such-font")))
(defun x-display-pixel-width (&optional frame)
"Return the width in pixels of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the pixel width for all
physical monitors associated with DISPLAY. To get information for
each physical monitor, use `display-monitor-attributes-list'."
"SKIP: real doc in xfns.c."
(frame-width frame))
(defun x-display-pixel-height (&optional frame)
"Return the height in pixels of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the pixel height for all
physical monitors associated with DISPLAY. To get information for
each physical monitor, use `display-monitor-attributes-list'."
"SKIP: real doc in xfns.c."
(frame-height frame))
(defun x-display-planes (&optional _frame)
"Return the number of bitplanes of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
4) ;bg switched to 16 colors as well
(defun x-display-color-cells (&optional _frame)
"Return the number of color cells of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
16)
(defun x-server-max-request-size (&optional _frame)
"Return the maximum request size of the server of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
1000000) ; ???
(defun x-server-vendor (&optional _frame)
"Return the \"vendor ID\" string of the GUI software on TERMINAL.
\(Labeling every distributor as a \"vendor\" embodies the false assumption
that operating systems cannot be developed and distributed noncommercially.)
For GNU and Unix systems, this queries the X server software; for
MS-Windows, this queries the OS.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
"GNU")
(defun x-server-version (&optional _frame)
"Return the version numbers of the GUI software on TERMINAL.
The value is a list of three integers specifying the version of the GUI
software in use.
For GNU and Unix system, the first 2 numbers are the version of the X
Protocol used on TERMINAL and the 3rd number is the distributor-specific
release number. For MS-Windows, the 3 numbers report the version and
the build number of the OS.
See also the function `x-server-vendor'.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
'(1 0 0))
(defun x-display-screens (&optional _frame)
"Return the number of screens on the server of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
1)
(defun x-display-mm-height (&optional _frame)
"Return the height in millimeters of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the height in millimeters for
all physical monitors associated with DISPLAY. To get information
for each physical monitor, use `display-monitor-attributes-list'."
"SKIP: real doc in xfns.c."
245) ; Guess the size of my...
(defun x-display-mm-width (&optional _frame)
"Return the width in millimeters of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the width in millimeters for
all physical monitors associated with TERMINAL. To get information
for each physical monitor, use `display-monitor-attributes-list'."
"SKIP: real doc in xfns.c."
322) ; ...monitor, EZ...
(defun x-display-backing-store (&optional _frame)
"Return an indication of whether DISPLAY does backing store.
The value may be `always', `when-mapped', or `not-useful'.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
'not-useful)
(defun x-display-visual-class (&optional _frame)
"Return the visual class of DISPLAY.
The value is one of the symbols `static-gray', `gray-scale',
`static-color', `pseudo-color', `true-color', or `direct-color'.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"SKIP: real doc in xfns.c."
'static-color)
(fset 'x-display-save-under 'ignore)
(fset 'x-get-resource 'ignore)
;; From lisp/term/x-win.el
(defvar x-display-name "pc"
"The name of the window display on which Emacs was started.
On X, the display name of individual X frames is recorded in the
`display' frame parameter.")
"SKIP: real doc in common-win.el.")
(defvar x-colors (mapcar 'car msdos-color-values)
"List of basic colors available on color displays.
For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20.
For Nextstep, this is a list of non-PANTONE colors returned by
the operating system.")
"SKIP: real doc in common-win.el.")
;; From lisp/term/w32-win.el
;
......
......@@ -535,7 +535,6 @@ the same file name is found in the `doc-directory'. */)
EMACS_INT pos;
Lisp_Object sym;
char *p, *name;
bool skip_file = 0;
ptrdiff_t count;
char const *dirname;
ptrdiff_t dirlen;
......@@ -609,34 +608,24 @@ the same file name is found in the `doc-directory'. */)
{
end = strchr (p, '\n');
/* See if this is a file name, and if it is a file in build-files. */
if (p[1] == 'S')
{
skip_file = 0;
if (end - p > 4 && end[-2] == '.'
&& (end[-1] == 'o' || end[-1] == 'c'))
{
ptrdiff_t len = end - p - 2;
char *fromfile = SAFE_ALLOCA (len + 1);
memcpy (fromfile, &p[2], len);
fromfile[len] = 0;
if (fromfile[len-1] == 'c')
fromfile[len-1] = 'o';
skip_file = NILP (Fmember (build_string (fromfile),
Vbuild_files));
}
}
/* We used to skip files not in build_files, so that when a
function was defined several times in different files
(typically, once in xterm, once in w32term, ...), we only
paid attention to the relevant one.
But this meant the doc had to be kept and updated in
multiple files. Nowadays we keep the doc only in eg xterm.
The (f)boundp checks below ensure we don't report
docs for eg w32-specific items on X.
*/
sym = oblookup (Vobarray, p + 2,
multibyte_chars_in_text ((unsigned char *) p + 2,
end - p - 2),
end - p - 2);
/* Check skip_file so that when a function is defined several
times in different files (typically, once in xterm, once in
w32term, ...), we only pay attention to the one that
matters. */
if (! skip_file && SYMBOLP (sym))
/* Ignore docs that start with SKIP. These mark
placeholders where the real doc is elsewhere. */
if (SYMBOLP (sym))
{
/* Attach a docstring to a variable? */
if (p[1] == 'V')
......@@ -644,8 +633,9 @@ the same file name is found in the `doc-directory'. */)
/* Install file-position as variable-documentation property
and make it negative for a user-variable
(doc starts with a `*'). */
if (!NILP (Fboundp (sym))
if ((!NILP (Fboundp (sym))
|| !NILP (Fmemq (sym, delayed_init)))
&& strncmp (end, "\nSKIP", 5))
Fput (sym, Qvariable_documentation,
make_number ((pos + end + 1 - buf)
* (end[1] == '*' ? -1 : 1)));
......@@ -654,7 +644,7 @@ the same file name is found in the `doc-directory'. */)
/* Attach a docstring to a function? */
else if (p[1] == 'F')
{
if (!NILP (Ffboundp (sym)))
if (!NILP (Ffboundp (sym)) && strncmp (end, "\nSKIP", 5))
store_function_docstring (sym, pos + end + 1 - buf);
}
else if (p[1] == 'S')
......
......@@ -480,11 +480,7 @@ x_set_title (struct frame *f, Lisp_Object name)
#endif /* !HAVE_X_WINDOWS */
DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0,
doc: /* Return storage information about the file system FILENAME is on.
Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total
storage of the file system, FREE is the free storage, and AVAIL is the
storage available to a non-superuser. All 3 numbers are in bytes.
If the underlying system call fails, value is nil. */)
doc: /* SKIP: real doc in fileio.c. */)
(Lisp_Object filename)
{
struct statfs stfs;
......
......@@ -317,7 +317,7 @@ predicates which report frame's specific UI-related capabilities. */)
/* Placeholder used by temacs -nw before window.el is loaded. */
DEFUN ("frame-windows-min-size", Fframe_windows_min_size,
Sframe_windows_min_size, 4, 4, 0,
doc: /* */
doc: /* SKIP: real doc in window.el. */
attributes: const)
(Lisp_Object frame, Lisp_Object horizontal,
Lisp_Object ignore, Lisp_Object pixelwise)
......
......@@ -998,15 +998,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1, 1, 0,
doc: /* Make a new Nextstep window, called a "frame" in Emacs terms.
Return an Emacs frame object.
PARMS is an alist of frame parameters.
If the parameters specify that the frame should not have a minibuffer,
and do not specify a specific minibuffer window to use,
then `default-minibuffer-frame' must be a frame whose minibuffer can
be shared by the new frame.
This function is an internal primitive--use `make-frame' instead. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object parms)
{
struct frame *f;
......@@ -1702,7 +1694,7 @@ Frames are listed from topmost (first) to bottommost (last). */)
DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
Sx_server_max_request_size,
0, 1, 0,
doc: /* This function is a no-op. It is only present for completeness. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -1713,12 +1705,7 @@ Frames are listed from topmost (first) to bottommost (last). */)
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
doc: /* Return the "vendor ID" string of Nextstep display server TERMINAL.
\(Labeling every distributor as a "vendor" embodies the false assumption
that operating systems cannot be developed and distributed noncommercially.)
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -1731,14 +1718,7 @@ Frames are listed from topmost (first) to bottommost (last). */)
DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0,
doc: /* Return the version numbers of the server of display TERMINAL.
The value is a list of three integers: the major and minor
version numbers of the X Protocol in use, and the distributor-specific release
number. See also the function `x-server-vendor'.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -1753,14 +1733,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0,
doc: /* Return the number of screens on Nextstep display server TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
Note: "screen" here is not in Nextstep terminology but in X11's. For
the number of physical monitors, use `(length
\(display-monitor-attributes-list TERMINAL))' instead. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -1769,14 +1742,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0,
doc: /* Return the height in millimeters of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the height in millimeters for
all physical monitors associated with TERMINAL. To get information
for each physical monitor, use `display-monitor-attributes-list'. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
struct ns_display_info *dpyinfo = check_ns_display_info (terminal);
......@@ -1786,14 +1752,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
doc: /* Return the width in millimeters of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the width in millimeters for
all physical monitors associated with TERMINAL. To get information
for each physical monitor, use `display-monitor-attributes-list'. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
struct ns_display_info *dpyinfo = check_ns_display_info (terminal);
......@@ -1804,14 +1763,11 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-backing-store", Fx_display_backing_store,
Sx_display_backing_store, 0, 1, 0,
doc: /* Return an indication of whether the Nextstep display TERMINAL does backing store.
The value may be `buffered', `retained', or `non-retained'.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
/* Note that the xfns.c version has different return values. */
switch ([ns_get_window (terminal) backingType])
{
case NSBackingStoreBuffered:
......@@ -1831,13 +1787,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-visual-class", Fx_display_visual_class,
Sx_display_visual_class, 0, 1, 0,
doc: /* Return the visual class of the Nextstep display TERMINAL.
The value is one of the symbols `static-gray', `gray-scale',
`static-color', `pseudo-color', `true-color', or `direct-color'.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
NSWindowDepth depth;
......@@ -1863,10 +1813,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-save-under", Fx_display_save_under,
Sx_display_save_under, 0, 1, 0,
doc: /* Return t if TERMINAL supports the save-under feature.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -1890,12 +1837,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
1, 3, 0,
doc: /* Open a connection to a display server.
DISPLAY is the name of the display to connect to.
Optional second arg XRM-STRING is a string of resources in xrdb format.
If the optional third arg MUST-SUCCEED is non-nil,
terminate Emacs if we can't open the connection.
\(In the Nextstep version, the last two arguments are currently ignored.) */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed)
{
struct ns_display_info *dpyinfo;
......@@ -1920,10 +1862,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-close-connection", Fx_close_connection, Sx_close_connection,
1, 1, 0,
doc: /* Close the connection to TERMINAL's Nextstep display server.
For TERMINAL, specify a terminal object, a frame or a display name (a
string). If TERMINAL is nil, that stands for the selected frame's
terminal. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -1933,7 +1872,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
doc: /* Return the list of display names that Emacs has connections to. */)
doc: /* SKIP: real doc in xfns.c. */)
(void)
{
Lisp_Object result = Qnil;
......@@ -2306,8 +2245,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
doc: /* Internal function called by `color-defined-p', which see.
\(Note that the Nextstep version of this function ignores FRAME.) */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object color, Lisp_Object frame)
{
NSColor * col;
......@@ -2317,7 +2255,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
doc: /* Internal function called by `color-values', which see. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object color, Lisp_Object frame)
{
NSColor * col;
......@@ -2342,7 +2280,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
doc: /* Internal function called by `display-color-p', which see. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
NSWindowDepth depth;
......@@ -2360,11 +2298,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p,
0, 1, 0,
doc: /* Return t if the Nextstep display supports shades of gray.
Note that color displays do support shades of gray.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
NSWindowDepth depth;
......@@ -2378,14 +2312,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width,
0, 1, 0,
doc: /* Return the width in pixels of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the pixel width for all
physical monitors associated with TERMINAL. To get information for
each physical monitor, use `display-monitor-attributes-list'. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
struct ns_display_info *dpyinfo = check_ns_display_info (terminal);
......@@ -2396,14 +2323,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
Sx_display_pixel_height, 0, 1, 0,
doc: /* Return the height in pixels of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the pixel height for all
physical monitors associated with TERMINAL. To get information for
each physical monitor, use `display-monitor-attributes-list'. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
struct ns_display_info *dpyinfo = check_ns_display_info (terminal);
......@@ -2648,10 +2568,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
0, 1, 0,
doc: /* Return the number of bitplanes of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
check_ns_display_info (terminal);
......@@ -2662,10 +2579,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
0, 1, 0,
doc: /* Returns the number of color cells of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object terminal)
{
struct ns_display_info *dpyinfo = check_ns_display_info (terminal);
......@@ -2753,35 +2667,7 @@ and GNUstep implementations ("distributor-specific release
DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
doc: /* Show STRING in a \"tooltip\" window on frame FRAME.
A tooltip window is a small window displaying a string.
This is an internal function; Lisp code should call `tooltip-show'.
FRAME nil or omitted means use the selected frame.
PARMS is an optional list of frame parameters which can be used to
change the tooltip's appearance.
Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil
means use the default timeout of 5 seconds.
If the list of frame parameters PARMS contains a `left' parameter,
display the tooltip at that x-position. If the list of frame parameters
PARMS contains no `left' but a `right' parameter, display the tooltip
right-adjusted at that x-position. Otherwise display it at the
x-position of the mouse, with offset DX added (default is 5 if DX isn't
specified).
Likewise for the y-position: If a `top' frame parameter is specified, it
determines the position of the upper edge of the tooltip window. If a
`bottom' parameter but no `top' frame parameter is specified, it
determines the position of the lower edge of the tooltip window.
Otherwise display the tooltip window at the y-position of the mouse,
with offset DY added (default is -10).
A tooltip's maximum size is specified by `x-max-tooltip-size'.
Text larger than the specified size is clipped. */)
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
{
int root_x, root_y;
......@@ -2842,8 +2728,7 @@ with offset DY added (default is -10).
DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0,
doc: /* Hide the current tooltip window, if there is any.
Value is t if tooltip was open, nil otherwise. */)
doc: /* SKIP: real doc in xfns.c. */)
(void)
{
if (ns_tooltip == nil || ![ns_tooltip isActive])
......
......@@ -1874,7 +1874,7 @@ - (Lisp_Object)runDialogAt: (NSPoint)p
DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
doc: /* Return t if a menu or popup dialog is active. */)
doc: /* SKIP: real doc in xmenu.c. */)
(void)
{
return popup_activated () ? Qt : Qnil;
......
......@@ -9380,27 +9380,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
/* TODO: move to common code */
DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,
doc: /* Which toolkit scroll bars Emacs uses, if any.
A value of nil means Emacs doesn't use toolkit scroll bars.
With the X Window system, the value is a symbol describing the
X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
With MS Windows or Nextstep, the value is t. */);
doc: /* SKIP: real doc in xterm.c. */);