Now on revision 107682. ------------------------------------------------------------ revno: 107682 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Mon 2012-03-26 14:43:36 +0900 message: dispextern.h (struct glyph): Fix previous change. Change the bit length of glyphless.ch to 25 (Bug#11082). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-03-26 04:06:31 +0000 +++ src/ChangeLog 2012-03-26 05:43:05 +0000 @@ -1,3 +1,8 @@ +2012-03-26 Kenichi Handa + + * dispextern.h (struct glyph): Fix previous change. Change the + bit length of glyphless.ch to 25 (Bug#11082). + 2012-03-26 Chong Yidong * keyboard.c (Vselection_inhibit_update_commands): New variable. === modified file 'src/dispextern.h' --- src/dispextern.h 2012-03-25 15:35:23 +0000 +++ src/dispextern.h 2012-03-26 05:43:05 +0000 @@ -454,7 +454,7 @@ /* Length of acronym or hexadecimal code string (at most 8). */ unsigned len : 4; /* Character to display. Actually we need only 22 bits. */ - unsigned ch : 22; + unsigned ch : 25; } glyphless; /* Used to compare all bit-fields above in one step. */ ------------------------------------------------------------ revno: 107681 fixes bug(s): http://debbugs.gnu.org/8996 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-03-26 12:06:31 +0800 message: New variable selection-inhibit-update-commands, for inhibiting selection updates. * keyboard.c (Vselection_inhibit_update_commands): New variable. (command_loop_1): Use it; inhibit selection update for handle-select-window too. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-03-25 18:30:50 +0000 +++ src/ChangeLog 2012-03-26 04:06:31 +0000 @@ -1,3 +1,9 @@ +2012-03-26 Chong Yidong + + * keyboard.c (Vselection_inhibit_update_commands): New variable. + (command_loop_1): Use it; inhibit selection update for + handle-select-window too (Bug#8996). + 2012-03-25 Fabrice Popineau * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific === modified file 'src/keyboard.c' --- src/keyboard.c 2012-02-24 08:34:09 +0000 +++ src/keyboard.c 2012-03-26 04:06:31 +0000 @@ -241,6 +241,7 @@ Time last_event_timestamp; static Lisp_Object Qx_set_selection, Qhandle_switch_frame; +static Lisp_Object Qhandle_select_window; Lisp_Object QPRIMARY; static Lisp_Object Qself_insert_command; @@ -1647,7 +1648,8 @@ ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode))) - && !EQ (Vthis_command, Qhandle_switch_frame)) + && NILP (Fmemq (Vthis_command, + Vselection_inhibit_update_commands))) { EMACS_INT beg = XINT (Fmarker_position (BVAR (current_buffer, mark))); @@ -11649,6 +11651,7 @@ DEFSYM (Qx_set_selection, "x-set-selection"); DEFSYM (QPRIMARY, "PRIMARY"); DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); + DEFSYM (Qhandle_select_window, "handle-select-window"); DEFSYM (Qinput_method_function, "input-method-function"); DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); @@ -12285,6 +12288,16 @@ `deactivate-mark' call uses this to set the window selection. */); Vsaved_region_selection = Qnil; + DEFVAR_LISP ("selection-inhibit-update-commands", + Vselection_inhibit_update_commands, + doc: /* List of commands which should not update the selection. +Normally, if `select-active-regions' is non-nil and the mark remains +active after a command (i.e. the mark was not deactivated), the Emacs +command loop sets the selection to the text in the region. However, +if the command is in this list, the selection is not updated. */); + Vselection_inhibit_update_commands + = list2 (Qhandle_switch_frame, Qhandle_select_window); + DEFVAR_LISP ("debug-on-event", Vdebug_on_event, doc: /* Enter debugger on this event. When Emacs ------------------------------------------------------------ revno: 107680 author: Ami Fischman committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-03-26 11:08:15 +0800 message: * vc/vc-git.el (vc-git-state): Avoid unnecessarily locking. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-26 01:35:47 +0000 +++ lisp/ChangeLog 2012-03-26 03:08:15 +0000 @@ -1,3 +1,7 @@ +2012-03-26 Ami Fischman + + * vc/vc-git.el (vc-git-state): Avoid unnecessarily locking. + 2012-03-26 Glenn Morris * files.el (save-buffers-kill-emacs): Doc fix. === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2012-03-01 09:01:08 +0000 +++ lisp/vc/vc-git.el 2012-03-26 03:08:15 +0000 @@ -217,12 +217,21 @@ ;; operation. (if (not (vc-git-registered file)) 'unregistered - (vc-git--call nil "add" "--refresh" "--" (file-relative-name file)) (let ((diff (vc-git--run-command-string - file "diff-index" "-z" "HEAD" "--"))) - (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0" - diff)) - (vc-git--state-code (match-string 1 diff)) + file "diff-index" "-p" "--raw" "-z" "HEAD" "--"))) + (if (and diff + (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(\\(?:.\\|\n\\)*\\)\\'" + diff)) + (let ((diff-letter (match-string 1 diff)) + (diff-contents (match-string 2 diff))) + (if (not (string-match "\n." diff-contents)) + ;; Empty diff: file contents is the same as the HEAD + ;; revision, but timestamps are different (eg, file + ;; was "touch"ed). Update timestamp in index: + (prog1 'up-to-date + (vc-git--call nil "add" "--refresh" "--" + (file-relative-name file))) + (vc-git--state-code diff-letter))) (if (vc-git--empty-db-p) 'added 'up-to-date))))) (defun vc-git-working-revision (file) ------------------------------------------------------------ revno: 107679 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-03-25 18:35:47 -0700 message: More small edits for lispref/os.texi * doc/lispref/os.texi (Killing Emacs): Copyedits. (Suspending Emacs): Copyedits. Mention not very relevant with GUIs. Shorten the example, use more standard shell prompts. * lisp/files.el (save-buffers-kill-emacs): Doc fix. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-03-26 00:37:04 +0000 +++ doc/lispref/ChangeLog 2012-03-26 01:35:47 +0000 @@ -3,6 +3,9 @@ * os.texi (Startup Summary): Copyedits. Fix startup screen logic. (Init File): Copyedits. (Command-Line Arguments): Copyedits. Do not mention argv alias. + (Killing Emacs): Copyedits. + (Suspending Emacs): Copyedits. Mention not very relevant with GUIs. + Shorten the example, use more standard shell prompts. 2012-03-25 Chong Yidong === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2012-03-26 00:37:04 +0000 +++ doc/lispref/os.texi 2012-03-26 01:35:47 +0000 @@ -601,7 +601,9 @@ There are two ways to get out of Emacs: you can kill the Emacs job, which exits permanently, or you can suspend it, which permits you to -reenter the Emacs process later. +reenter the Emacs process later. (In a graphical environment, you can +of course simply switch to another application without doing anything +special to Emacs, then switch back to Emacs when you want.) @menu * Killing Emacs:: Exiting Emacs irreversibly. @@ -613,9 +615,10 @@ @subsection Killing Emacs @cindex killing Emacs - Killing Emacs means ending the execution of the Emacs process. The -parent process normally resumes control. The low-level primitive for -killing Emacs is @code{kill-emacs}. + Killing Emacs means ending the execution of the Emacs process. +If you started Emacs from a terminal, the parent process normally +resumes control. The low-level primitive for killing Emacs is +@code{kill-emacs}. @deffn Command kill-emacs &optional exit-data This command calls the hook @code{kill-emacs-hook}, then exits the @@ -686,11 +689,17 @@ Suspending works only on a terminal device from which the Emacs session was started. We call that device the @dfn{controlling terminal} of the session. Suspending is not allowed if the -controlling terminal is a graphical terminal. +controlling terminal is a graphical terminal. Suspending is usually +not relevant in graphical environments, since you can simply switch to +another application without doing anything special to Emacs. - Some operating systems do not support suspension of jobs; on these -systems, ``suspension'' actually creates a new shell temporarily as a -subprocess of Emacs. Then you would exit the shell to return to Emacs. +@c FIXME? Are there any systems Emacs still supports that do not +@c have SIGTSTP? +@cindex SIGTSTP + Some operating systems (those without @code{SIGTSTP}, or MS-DOS) do +not support suspension of jobs; on these systems, ``suspension'' +actually creates a new shell temporarily as a subprocess of Emacs. +Then you would exit the shell to return to Emacs. @deffn Command suspend-emacs &optional string This function stops Emacs and returns control to the superior process. @@ -705,9 +714,10 @@ @xref{Multiple Terminals}. If @var{string} is non-@code{nil}, its characters are sent to Emacs's -superior shell, to be read as terminal input. The characters in -@var{string} are not echoed by the superior shell; only the results -appear. +superior shell, to be read as terminal input. +@c FIXME? It seems to me that shell does echo STRING. +The characters in @var{string} are not echoed by the superior shell; +only the results appear. Before suspending, @code{suspend-emacs} runs the normal hook @code{suspend-hook}. After the user resumes Emacs, @@ -718,34 +728,23 @@ unless the variable @code{no-redraw-on-reenter} is non-@code{nil}. @xref{Refresh Screen}. -In the following example, note that @samp{pwd} is not echoed after -Emacs is suspended. But it is read and executed by the shell. +Here is an example of how you could use these hooks: @smallexample @group -(suspend-emacs) - @result{} nil -@end group - -@group (add-hook 'suspend-hook - (function (lambda () - (or (y-or-n-p - "Really suspend? ") - (error "Suspend canceled"))))) - @result{} (lambda nil - (or (y-or-n-p "Really suspend? ") - (error "Suspend canceled"))) -@end group -@group -(add-hook 'suspend-resume-hook - (function (lambda () (message "Resumed!")))) - @result{} (lambda nil (message "Resumed!")) -@end group -@group -(suspend-emacs "pwd") - @result{} nil -@end group + (lambda () (or (y-or-n-p "Really suspend? ") + (error "Suspend canceled")))) +@end group +(add-hook 'suspend-resume-hook (lambda () (message "Resumed!") + (sit-for 2))) +@end smallexample +@c The sit-for prevents the ``nil'' that suspend-emacs returns +@c hiding the message. + +Here is what you would see upon evaluating @code{(suspend-emacs "pwd")}: + +@smallexample @group ---------- Buffer: Minibuffer ---------- Really suspend? @kbd{y} @@ -754,8 +753,8 @@ @group ---------- Parent Shell ---------- -lewis@@slug[23] % /user/lewis/manual -lewis@@slug[24] % fg +bash$ /home/username +bash$ fg @end group @group @@ -763,6 +762,10 @@ Resumed! @end group @end smallexample + +@c FIXME? AFAICS, it is echoed. +Note that @samp{pwd} is not echoed after Emacs is suspended. But it +is read and executed by the shell. @end deffn @defvar suspend-hook @@ -791,23 +794,23 @@ @defun resume-tty &optional tty This function resumes the previously suspended terminal device -@var{tty}; @var{tty} can be a terminal object, a frame (meaning the -terminal for that frame), or @code{nil} (meaning the terminal for the -selected frame). +@var{tty}; where @var{tty} has the same possible values as it does +for @code{suspend-tty}. @vindex resume-tty-functions This function reopens the terminal device, re-initializes it, and -redraws its with that terminal's selected frame. It then runs the +redraws it with that terminal's selected frame. It then runs the hook @code{resume-tty-functions}, passing the terminal object as an argument to each function. If the same device is already used by another Emacs terminal, this -function signals an error. +function signals an error. If @var{tty} is not suspended, this +function does nothing. @end defun -@defun controlling-tty-p &optional terminal -This function returns non-@code{nil} if @var{terminal} is the -controlling terminal of the Emacs session; @code{terminal} can be a +@defun controlling-tty-p &optional tty +This function returns non-@code{nil} if @var{tty} is the +controlling terminal of the Emacs session; @var{tty} can be a terminal object, a frame (meaning the terminal for that frame), or @code{nil} (meaning the terminal for the selected frame). @end defun === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-26 00:37:04 +0000 +++ lisp/ChangeLog 2012-03-26 01:35:47 +0000 @@ -1,5 +1,7 @@ 2012-03-26 Glenn Morris + * files.el (save-buffers-kill-emacs): Doc fix. + * startup.el (normal-top-level, command-line, command-line-1): Give them doc strings. === modified file 'lisp/files.el' --- lisp/files.el 2012-03-21 17:44:55 +0000 +++ lisp/files.el 2012-03-26 01:35:47 +0000 @@ -6290,7 +6290,11 @@ (defun save-buffers-kill-emacs (&optional arg) "Offer to save each buffer, then kill this Emacs process. -With prefix ARG, silently save all file-visiting buffers, then kill." +With prefix ARG, silently save all file-visiting buffers without asking. +If there are active processes where `process-query-on-exit-flag' +returns non-nil, asks whether processes should be killed. +Runs the members of `kill-emacs-query-functions' in turn and stops +if any returns nil. If `confirm-kill-emacs' is non-nil, calls it." (interactive "P") (save-some-buffers arg t) (and (or (not (memq t (mapcar (function ------------------------------------------------------------ revno: 107678 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-03-25 17:37:04 -0700 message: Small edits for lispref/os.texi * doc/lispref/os.texi (Startup Summary): Copyedits. Fix startup screen logic. (Init File): Copyedits. (Command-Line Arguments): Copyedits. Do not mention argv alias. * lisp/startup.el (normal-top-level, command-line, command-line-1): Give them doc strings. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-03-25 07:58:59 +0000 +++ doc/lispref/ChangeLog 2012-03-26 00:37:04 +0000 @@ -1,3 +1,9 @@ +2012-03-26 Glenn Morris + + * os.texi (Startup Summary): Copyedits. Fix startup screen logic. + (Init File): Copyedits. + (Command-Line Arguments): Copyedits. Do not mention argv alias. + 2012-03-25 Chong Yidong * display.texi (Fringes): Note that fringes are shown on graphical === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2012-03-20 07:44:03 +0000 +++ doc/lispref/os.texi 2012-03-26 00:37:04 +0000 @@ -110,8 +110,8 @@ It runs the normal hook @code{before-init-hook}. @item -If appropriate (e.g., not in batch mode or started as a daemon), it -creates a graphical frame. +If appropriate, it creates a graphical frame. This is not done if the +options @samp{--batch} or @samp{--daemon} were specified. @item It initializes the initial frame's faces, and sets up the menu bar @@ -195,7 +195,7 @@ @item If @code{initial-buffer-choice} is a string, it visits the file with -that name. Furthermore, if the @samp{*scratch*} buffer exists and is +that name. If the @samp{*scratch*} buffer exists and is empty, it inserts @code{initial-scratch-message} into that buffer. @c To make things nice and confusing, the next three items can be @@ -221,9 +221,9 @@ @item It displays the @dfn{startup screen}, which is a special buffer that contains information about copyleft and basic Emacs usage. This is -not done if @code{initial-buffer-choice} or -@code{inhibit-startup-screen} are @code{nil}, nor if the -@samp{--no-splash} or @samp{-Q} command-line options were specified. +not done if @code{inhibit-startup-screen} or @code{initial-buffer-choice} +are non-@code{nil}, or if the @samp{--no-splash} or @samp{-Q} command-line +options were specified. @c End of command-line-1. @@ -267,15 +267,14 @@ @end defopt @defopt initial-buffer-choice -This variable, if non-@code{nil}, determines a file or buffer for -Emacs to display after starting up, instead of the startup screen. +If non-@code{nil}, this variable is a string that specifies a file or +directory for Emacs to display after starting up, instead of the +startup screen. @ignore @c I do not think this should be mentioned. AFAICS it is just a dodge @c around inhibit-startup-screen not being settable on a site-wide basis. If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. @end ignore -If its value is a string, that specifies the name of a file for Emacs to -visit. @end defopt @defopt inhibit-startup-echo-area-message @@ -365,11 +364,12 @@ the standard search path for libraries (@pxref{How Programs Do Loading}). The Emacs distribution does not come with this file; it is intended for local customizations. If the default init file exists, -it is loaded whenever you start Emacs, except in batch mode or if -@samp{-q} (or @samp{-Q}) is specified. But your own personal init +it is loaded whenever you start Emacs. But your own personal init file, if any, is loaded first; if it sets @code{inhibit-default-init} to a non-@code{nil} value, then Emacs does not subsequently load the -@file{default.el} file. +@file{default.el} file. In batch mode, or if you specify @samp{-q} +(or @samp{-Q}), Emacs loads neither your personal init file nor +the default init file. Another file for site-customization is @file{site-start.el}. Emacs loads this @emph{before} the user's init file. You can inhibit the @@ -380,6 +380,7 @@ user's init file. Its normal value is @code{"site-start"}. The only way you can change it with real effect is to do so before dumping Emacs. +@c So why even mention it here. I imagine it is almost never changed. @end defopt @xref{Init Examples,, Init File Examples, emacs, The GNU Emacs Manual}, for @@ -387,28 +388,27 @@ @file{.emacs} file. @defopt inhibit-default-init -This variable prevents Emacs from loading the default initialization -library file for your session of Emacs. If its value is non-@code{nil}, -then the default library is not loaded. The default value is -@code{nil}. +If this variable is non-@code{nil}, it prevents Emacs from loading the +default initialization library file. The default value is @code{nil}. @end defopt @defvar before-init-hook This normal hook is run, once, just before loading all the init files -(the user's init file, @file{default.el}, and/or @file{site-start.el}). +(@file{site-start.el}, your init file, and @file{default.el}). (The only way to change it with real effect is before dumping Emacs.) @end defvar @defvar after-init-hook This normal hook is run, once, just after loading all the init files -(the user's init file, @file{default.el}, and/or @file{site-start.el}), -before loading the terminal-specific library and processing the -command-line action arguments. +(@file{site-start.el}, your init file, and @file{default.el}), +before loading the terminal-specific library (if started on a text +terminal) and processing the command-line action arguments. @end defvar @defvar emacs-startup-hook This normal hook is run, once, just after handling the command line -arguments, just before @code{term-setup-hook}. +arguments, just before @code{term-setup-hook}. In batch mode, Emacs +does not run either of these hooks. @end defvar @defvar user-init-file @@ -419,7 +419,7 @@ @defvar user-emacs-directory This variable holds the name of the @file{.emacs.d} directory. It is -ordinarily @file{~/.emacs.d}, but differs on some platforms. +@file{~/.emacs.d} on all platforms but MS-DOS. @end defvar @node Terminal-Specific @@ -442,12 +442,12 @@ does not specify all the terminal's function keys. @xref{Terminal Input}. - When the name of the terminal type contains a hyphen, and no library + When the name of the terminal type contains a hyphen or underscore, and no library is found whose name is identical to the terminal's name, Emacs strips -from the terminal's name the last hyphen and everything that follows +from the terminal's name the last hyphen or underscore and everything that follows it, and tries again. This process is repeated until Emacs finds a -matching library, or until there are no more hyphens in the name -(i.g.@: there is no terminal-specific library). For example, if the +matching library, or until there are no more hyphens or underscores in the name +(i.e.@: there is no terminal-specific library). For example, if the terminal name is @samp{xterm-256color} and there is no @file{term/xterm-256color.el} library, Emacs tries to load @file{term/xterm.el}. If necessary, the terminal library can evaluate @@ -460,10 +460,10 @@ You can also arrange to override some of the actions of the terminal-specific library by setting the variable -@code{term-setup-hook}. This is a normal hook which Emacs runs using -@code{run-hooks} at the end of Emacs initialization, after loading both -your init file and any terminal-specific libraries. You can -use this variable to define initializations for terminals that do not +@code{term-setup-hook}. This is a normal hook that Emacs runs +at the end its initialization, after loading both +your init file and any terminal-specific libraries. You could +use this hook to define initializations for terminals that do not have their own libraries. @xref{Hooks}. @defvar term-file-prefix @@ -478,11 +478,9 @@ @noindent You may set the @code{term-file-prefix} variable to @code{nil} in your init file if you do not wish to load the -terminal-initialization file. To do this, put the following in -your init file: @code{(setq term-file-prefix nil)}. +terminal-initialization file. -On MS-DOS, if the environment variable @code{TERM} is not set, Emacs -uses @samp{internal} as the terminal type. +On MS-DOS, Emacs sets the @code{TERM} environment variable to @samp{internal}. @end defvar @defvar term-setup-hook @@ -492,28 +490,27 @@ You can use @code{term-setup-hook} to override the definitions made by a terminal-specific file. + +For a related feature, @pxref{Window Systems, window-setup-hook}. @end defvar - See @code{window-setup-hook} in @ref{Window Systems}, for a related -feature. - @node Command-Line Arguments @subsection Command-Line Arguments @cindex command-line arguments You can use command-line arguments to request various actions when -you start Emacs. Command-line arguments should not be commonly used, -since the recommended way of using Emacs is to start it just once, -after logging in, and do all editing in the same Emacs session -(@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}); nonetheless, -they can be useful when invoking Emacs from session scripts or -debugging Emacs itself. This section describes how Emacs processes -command-line arguments. +you start Emacs. Note that the recommended way of using Emacs is to +start it just once, after logging in, and then do all editing in the same +Emacs session (@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}). +For this reason, you might not use command-line arguments very often; +nonetheless, they can be useful when invoking Emacs from session +scripts or debugging Emacs. This section describes how Emacs +processes command-line arguments. @defun command-line This function parses the command line that Emacs was called with, -processes it, loads the user's init file and displays the -startup messages. +processes it, and (amongst other things) loads the user's init file and +displays the startup messages. @end defun @defvar command-line-processed @@ -529,9 +526,9 @@ @cindex switches on command line @cindex options on command line @cindex command-line options -The value of this variable is an alist of user-defined command-line -options and associated handler functions. This variable exists so you -can add elements to it. +This variable is an alist of user-defined command-line options and +associated handler functions. By default it is empty, but you can +add elements if you wish. A @dfn{command-line option} is an argument on the command line, which has the form: @@ -571,7 +568,9 @@ @defvar command-line-args-left @vindex argv The value of this variable is the list of command-line arguments that -have not yet been processed. @code{argv} is an alias for this. +have not yet been processed. +@c Don't mention this, since it is a "bad name for a dynamically bound variable" +@c @code{argv} is an alias for this. @end defvar @defvar command-line-functions @@ -592,7 +591,7 @@ argument. If it has also dealt with some of the following arguments, it can indicate that by deleting them from @code{command-line-args-left}. -If all of these functions return @code{nil}, then the argument is used +If all of these functions return @code{nil}, then the argument is treated as a file name to visit. @end defvar === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-25 18:17:46 +0000 +++ lisp/ChangeLog 2012-03-26 00:37:04 +0000 @@ -1,3 +1,8 @@ +2012-03-26 Glenn Morris + + * startup.el (normal-top-level, command-line, command-line-1): + Give them doc strings. + 2012-03-25 Eli Zaretskii * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead === modified file 'lisp/startup.el' --- lisp/startup.el 2012-01-19 07:21:25 +0000 +++ lisp/startup.el 2012-03-26 00:37:04 +0000 @@ -65,6 +65,8 @@ (defvar startup-screen-inhibit-startup-screen nil) +;; FIXME? Why does this get such weirdly extreme treatment, when the +;; more important inhibit-startup-screen does not. (defcustom inhibit-startup-echo-area-message nil "Non-nil inhibits the initial startup echo area message. Setting this variable takes effect @@ -464,6 +466,10 @@ (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail)))))) (defun normal-top-level () + "Emacs calls this function when it first starts up. +It sets `command-line-processed', processes the command-line, +reads the initialization files, etc. +It is the default value of the variable `top-level'." (if command-line-processed (message "Back to top level.") (setq command-line-processed t) @@ -701,6 +707,8 @@ (defvar server-process) (defun command-line () + "A subroutine of `normal-top-level'. +Amongst another things, it parses the command-line arguments." (setq before-init-time (current-time) after-init-time nil command-line-default-directory default-directory) @@ -2076,6 +2084,7 @@ (defalias 'display-splash-screen 'display-startup-screen) (defun command-line-1 (args-left) + "A subroutine of `command-line'." (display-startup-echo-area-message) (when (and pure-space-overflow (not noninteractive)) ------------------------------------------------------------ revno: 107677 author: Fabrice Popineau committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-03-25 20:30:50 +0200 message: Remove dead MSVC-specific code. src/w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-03-25 15:35:23 +0000 +++ src/ChangeLog 2012-03-25 18:30:50 +0000 @@ -1,3 +1,8 @@ +2012-03-25 Fabrice Popineau + + * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific + code. + 2012-03-25 Kenichi Handa * dispextern.h (struct glyph): Change the bit length of === modified file 'src/w32heap.c' --- src/w32heap.c 2012-01-19 07:21:25 +0000 +++ src/w32heap.c 2012-03-25 18:30:50 +0000 @@ -296,27 +296,3 @@ if (need_to_alloc) sbrk (need_to_alloc); } - -#if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined (USE_CRT_DLL)) - -/* MSVC 4.2 invokes these functions from mainCRTStartup to initialize - a heap via HeapCreate. They are normally defined by the runtime, - but we override them here so that the unnecessary HeapCreate call - is not performed. */ - -int __cdecl -_heap_init (void) -{ - /* Stepping through the assembly indicates that mainCRTStartup is - expecting a nonzero success return value. */ - return 1; -} - -void __cdecl -_heap_term (void) -{ - return; -} - -#endif - ------------------------------------------------------------ revno: 107676 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-03-25 20:17:46 +0200 message: Fix parallel "make install" on MS-Windows. nt/makefile.w32-in (install-bin): Don't copy addpm.exe here. Use $(DIRNAME)_same-dir.tst instead of same-dir.tst, to avoid stepping on other (parallel) Make job's toes. (install-other-dirs-nmake, install-other-dirs-gmake): Depend on `all'. (install-shortcuts): Depend on $(INSTALL_DIR)/bin. Copy addpm.exe here. (maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH, dist): Depend on create-tmp-dist-dir. nt/nmake.defs (DIRNAME): New variable. (IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of same-dir.tst. nt/gmake.defs (DIRNAME): New variable. (IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of same-dir.tst, to avoid conflicts between several (parallel) Make jobs. lisp/makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead of same-dir.tst, to avoid stepping on other (parallel) Make job's toes. leim/makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead of same-dir.tst, to avoid stepping on other (parallel) Make job's toes. diff: === modified file 'leim/ChangeLog' --- leim/ChangeLog 2012-03-21 07:41:52 +0000 +++ leim/ChangeLog 2012-03-25 18:17:46 +0000 @@ -1,3 +1,9 @@ +2012-03-25 Eli Zaretskii + + * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead + of same-dir.tst, to avoid stepping on other (parallel) Make job's + toes. + 2012-03-21 Kenichi Handa * quail/indian.el ("devanagari-itrans"): Add a few more useful === modified file 'leim/makefile.w32-in' --- leim/makefile.w32-in 2012-01-19 07:21:25 +0000 +++ leim/makefile.w32-in 2012-03-25 18:17:46 +0000 @@ -201,13 +201,13 @@ install: all - mkdir "$(INSTALLDIR)" - - $(DEL) same-dir.tst - - $(DEL) $(INSTALL_DIR)/same-dir.tst - echo SameDirTest > $(INSTALL_DIR)/same-dir.tst + - $(DEL) $(DIRNAME)_same-dir.tst + - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst + echo SameDirTest > $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst $(IFNOTSAMEDIR) $(CP) leim-list.el $(INSTALLDIR) $(ENDIF) $(IFNOTSAMEDIR) $(CP_DIR) quail $(INSTALLDIR) $(ENDIF) $(IFNOTSAMEDIR) $(CP_DIR) ja-dic $(INSTALLDIR) $(ENDIF) - - $(DEL) $(INSTALL_DIR)/same-dir.tst + - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst clean mostlyclean: - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-25 14:05:51 +0000 +++ lisp/ChangeLog 2012-03-25 18:17:46 +0000 @@ -1,3 +1,9 @@ +2012-03-25 Eli Zaretskii + + * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead + of same-dir.tst, to avoid stepping on other (parallel) Make job's + toes. + 2012-03-25 Chong Yidong * custom.el (load-theme): Even if NO-ENABLE arg is t, reenable the === modified file 'lisp/makefile.w32-in' --- lisp/makefile.w32-in 2012-01-19 07:21:25 +0000 +++ lisp/makefile.w32-in 2012-03-25 18:17:46 +0000 @@ -510,9 +510,9 @@ # install: - mkdir "$(INSTALL_DIR)/lisp" - - $(DEL) ../same-dir.tst - - $(DEL) "$(INSTALL_DIR)/same-dir.tst" - echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" + echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" #ifdef COPY_LISP_SOURCE $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF) #else @@ -528,8 +528,8 @@ # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) #endif - - $(DEL) ../same-dir.tst - - $(DEL) "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" # Need to copy *.el files first, to avoid "source file is newer" annoyance # since cp does not preserve time stamps === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-02-24 10:13:20 +0000 +++ nt/ChangeLog 2012-03-25 18:17:46 +0000 @@ -1,3 +1,23 @@ +2012-03-25 Eli Zaretskii + + * makefile.w32-in (install-bin): Don't copy addpm.exe here. Use + $(DIRNAME)_same-dir.tst instead of same-dir.tst, to avoid stepping + on other (parallel) Make job's toes. + (install-other-dirs-nmake, install-other-dirs-gmake): Depend on `all'. + (install-shortcuts): Depend on $(INSTALL_DIR)/bin. Copy addpm.exe + here. + (maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH, dist): Depend + on create-tmp-dist-dir. + + * nmake.defs (DIRNAME): New variable. + (IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of + same-dir.tst. + + * gmake.defs (DIRNAME): New variable. + (IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of + same-dir.tst, to avoid conflicts between several (parallel) Make + jobs. + 2012-02-24 Eli Zaretskii Prevent endless re-spawning of cmdproxy.exe when some of its === modified file 'nt/gmake.defs' --- nt/gmake.defs 2012-02-05 20:40:36 +0000 +++ nt/gmake.defs 2012-03-25 18:17:46 +0000 @@ -245,9 +245,11 @@ DEL = rm DEL_TREE = rm -r +DIRNAME = $(notdir $(CURDIR)) + ifdef USING_SH -IFNOTSAMEDIR = if [ ! -s ../same-dir.tst ] ; then +IFNOTSAMEDIR = if [ ! -s ../$(DIRNAME)_same-dir.tst ] ; then FOREACH = for f in FORVAR = $${f} FORDO = ; do @@ -262,7 +264,7 @@ else -IFNOTSAMEDIR = if not exist ../same-dir.tst +IFNOTSAMEDIR = if not exist ../$(DIRNAME)_same-dir.tst FOREACH = for %%f in ( FORVAR = %%f FORDO = ) do === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2012-02-27 03:20:00 +0000 +++ nt/makefile.w32-in 2012-03-25 18:17:46 +0000 @@ -214,14 +214,13 @@ install: install-bin install-shortcuts install-bin: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE) - - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin - $(CP) README.W32 $(INSTALL_DIR) - - $(DEL) ../same-dir.tst - - $(DEL) $(INSTALL_DIR)/same-dir.tst - echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst + echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" - mkdir "$(INSTALL_DIR)/etc" - mkdir "$(INSTALL_DIR)/info" - mkdir "$(INSTALL_DIR)/lock" @@ -234,10 +233,10 @@ $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF) $(IFNOTSAMEDIR) $(CP) ../COPYING $(INSTALL_DIR) $(ENDIF) - $(CP) ../COPYING $(INSTALL_DIR)/bin - - $(DEL) ../same-dir.tst - - $(DEL) $(INSTALL_DIR)/same-dir.tst + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) $(INSTALL_DIR)/$(DIRNAME)_same-dir.tst -install-other-dirs-nmake: +install-other-dirs-nmake: all cd ..\lib-src $(MAKE) $(MFLAGS) install cd ..\src @@ -248,21 +247,22 @@ $(MAKE) $(MFLAGS) install cd ..\nt -install-other-dirs-gmake: +install-other-dirs-gmake: all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src install $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src install $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp install $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install -install-shortcuts: +install-shortcuts: $(INSTALL_DIR)/bin + - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin "$(INSTALL_DIR)/bin/addpm" -q maybe-copy-distfiles: maybe-copy-distfiles-$(SHELLTYPE) -maybe-copy-distfiles-CMD: doit +maybe-copy-distfiles-CMD: create-tmp-dist-dir doit @if not $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE)=="" $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin -maybe-copy-distfiles-SH: doit +maybe-copy-distfiles-SH: create-tmp-dist-dir doit @if [ ! $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE)=="" ] ; then \ $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin ; \ fi @@ -272,7 +272,7 @@ # Also create bin directory for dist files. mkdir "$(TMP_DIST_DIR)/bin" -dist: install-bin create-tmp-dist-dir maybe-copy-distfiles +dist: install-bin maybe-copy-distfiles $(CP) "$(INSTALL_DIR)/BUGS" $(TMP_DIST_DIR) $(CP) "$(INSTALL_DIR)/COPYING" $(TMP_DIST_DIR) $(CP) "$(INSTALL_DIR)/README" $(TMP_DIST_DIR) === modified file 'nt/nmake.defs' --- nt/nmake.defs 2012-02-05 20:40:36 +0000 +++ nt/nmake.defs 2012-03-25 18:17:46 +0000 @@ -27,6 +27,7 @@ CURDIR = $(MAKEDIR:\=/) THISDIR = $(MAKEDIR) +DIRNAME = ALL_DEPS = $** @@ -181,7 +182,7 @@ CP = cp -f CP_DIR = cp -rf -IFNOTSAMEDIR = if not exist ..\same-dir.tst +IFNOTSAMEDIR = if not exist ..\$(DIRNAME)_same-dir.tst ENDIF = FOREACH = for %%f in ( FORVAR = %%f ------------------------------------------------------------ revno: 107675 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Mon 2012-03-26 00:36:28 +0900 message: dispextern.h (struct glyph): Change the bit length of glyphless.ch to 22 to make the member glyphless fit in 32 bits. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-03-24 13:43:21 +0000 +++ src/ChangeLog 2012-03-25 15:35:23 +0000 @@ -1,3 +1,8 @@ +2012-03-25 Kenichi Handa + + * dispextern.h (struct glyph): Change the bit length of + glyphless.ch to 22 to make the member glyphless fit in 32 bits. + 2012-03-24 Eli Zaretskii * s/ms-w32.h (tzname): Include time.h before redirecting to === modified file 'src/dispextern.h' --- src/dispextern.h 2012-03-22 07:08:17 +0000 +++ src/dispextern.h 2012-03-25 15:35:23 +0000 @@ -454,7 +454,7 @@ /* Length of acronym or hexadecimal code string (at most 8). */ unsigned len : 4; /* Character to display. Actually we need only 22 bits. */ - unsigned ch : 26; + unsigned ch : 22; } glyphless; /* Used to compare all bit-fields above in one step. */ ------------------------------------------------------------ revno: 107674 fixes bug(s): http://debbugs.gnu.org/11031 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-03-25 22:05:51 +0800 message: Fix interaction of load-theme with cust-theme.el. * lisp/custom.el (load-theme): Even if NO-ENABLE arg is t, reenable the theme if it was previously enabled before (Bug#11031). * lisp/cus-theme.el (customize-create-theme, custom-theme-revert): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-25 12:52:49 +0000 +++ lisp/ChangeLog 2012-03-25 14:05:51 +0000 @@ -1,8 +1,12 @@ 2012-03-25 Chong Yidong + * custom.el (load-theme): Even if NO-ENABLE arg is t, reenable the + theme if it was previously enabled before (Bug#11031). + * cus-theme.el (custom-theme-write-faces): Retrieve current face spec with custom-face-get-current-spec if its :shown-value is not determined yet (Bug#9337). + (customize-create-theme, custom-theme-revert): Doc fixes. * button.el (button-at): Minor addition to docstring. === modified file 'lisp/cus-theme.el' --- lisp/cus-theme.el 2012-03-25 12:52:49 +0000 +++ lisp/cus-theme.el 2012-03-25 14:05:51 +0000 @@ -81,7 +81,9 @@ (defun customize-create-theme (&optional theme buffer) "Create or edit a custom theme. THEME, if non-nil, should be an existing theme to edit. If THEME -is `user', provide an option to remove these as custom settings. +is `user', the resulting *Custom Theme* buffer also contains a +checkbox for removing the theme settings specified in the buffer +from the Custom save file. BUFFER, if non-nil, should be a buffer to use; the default is named *Custom Theme*." (interactive) @@ -209,6 +211,8 @@ (message ""))) (defun custom-theme-revert (_ignore-auto noconfirm) + "Revert the current *Custom Theme* buffer. +This is the `revert-buffer-function' for `custom-new-theme-mode'." (when (or noconfirm (y-or-n-p "Discard current changes? ")) (customize-create-theme custom-theme--save-name (current-buffer)))) === modified file 'lisp/custom.el' --- lisp/custom.el 2012-02-22 06:10:03 +0000 +++ lisp/custom.el 2012-03-25 14:05:51 +0000 @@ -1143,8 +1143,9 @@ optional arg NO-CONFIRM is non-nil, load the theme without prompting. -Normally, this function also enables THEME; if optional arg -NO-ENABLE is non-nil, load the theme but don't enable it. +Normally, this function also enables THEME. If optional arg +NO-ENABLE is non-nil, load the theme but don't enable it, unless +the theme was already enabled. This function is normally called through Customize when setting `custom-enabled-themes'. If used directly in your init file, it @@ -1160,6 +1161,10 @@ nil nil)) (unless (custom-theme-name-valid-p theme) (error "Invalid theme name `%s'" theme)) + ;; If THEME is already enabled, re-enable it after loading, even if + ;; NO-ENABLE is t. + (if no-enable + (setq no-enable (not (custom-theme-enabled-p theme)))) ;; If reloading, clear out the old theme settings. (when (custom-theme-p theme) (disable-theme theme) ------------------------------------------------------------ revno: 107673 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2012-03-25 15:38:22 +0200 message: Fix race condition in url-queue when doing the callback * url-queue.el (url-queue-kill-job): Check whether the buffer has been killed asynchronously before selecting it. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-03-14 02:44:09 +0000 +++ lisp/url/ChangeLog 2012-03-25 13:38:22 +0000 @@ -1,3 +1,8 @@ +2012-03-25 Lars Magne Ingebrigtsen + + * url-queue.el (url-queue-kill-job): Check whether the buffer has + been killed asynchronously before selecting it. + 2012-03-14 Lars Magne Ingebrigtsen * url-queue.el (url-queue-kill-job): Make sure that the callback === modified file 'lisp/url/url-queue.el' --- lisp/url/url-queue.el 2012-03-14 02:44:09 +0000 +++ lisp/url/url-queue.el 2012-03-25 13:38:22 +0000 @@ -160,7 +160,8 @@ ;; Call the callback with an error message to ensure that the caller ;; is notified that the job has failed. (with-current-buffer - (if (bufferp (url-queue-buffer job)) + (if (and (bufferp (url-queue-buffer job)) + (buffer-live-p (url-queue-buffer job))) ;; Use the (partially filled) process buffer it it exists. (url-queue-buffer job) ;; If not, just create a new buffer, which will probably be ------------------------------------------------------------ revno: 107672 fixes bug(s): http://debbugs.gnu.org/9337 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-03-25 20:52:49 +0800 message: Fix for custom-theme-write-faces. * lisp/cus-theme.el (custom-theme-write-faces): Retrieve current face spec with custom-face-get-current-spec if its :shown-value is not determined yet. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-25 07:58:59 +0000 +++ lisp/ChangeLog 2012-03-25 12:52:49 +0000 @@ -1,5 +1,9 @@ 2012-03-25 Chong Yidong + * cus-theme.el (custom-theme-write-faces): Retrieve current face + spec with custom-face-get-current-spec if its :shown-value is not + determined yet (Bug#9337). + * button.el (button-at): Minor addition to docstring. 2012-03-24 Simon Leinen === modified file 'lisp/cus-theme.el' --- lisp/cus-theme.el 2012-02-11 22:13:29 +0000 +++ lisp/cus-theme.el 2012-03-25 12:52:49 +0000 @@ -437,14 +437,17 @@ (princ theme) (princ "\n") (dolist (spec faces) + ;; Insert the face iff the checkbox widget is checked. (when (widget-get (nth 1 spec) :value) (let* ((symbol (nth 0 spec)) (widget (nth 2 spec)) (value - (if (car-safe (widget-get widget :children)) - (custom-face-widget-to-spec widget) - ;; Child is null if the widget is closed (hidden). - (widget-get widget :shown-value)))) + (cond + ((car-safe (widget-get widget :children)) + (custom-face-widget-to-spec widget)) + ;; Child is null if the widget is closed (hidden). + ((widget-get widget :shown-value)) + (t (custom-face-get-current-spec symbol))))) (when (and (facep symbol) value) (princ (if (bolp) " '(" "\n '(")) (prin1 symbol) ------------------------------------------------------------ revno: 107671 committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-03-25 15:58:59 +0800 message: Updates to Display chapter of Lisp manual. * doc/lispref/display.texi (Fringes): Note that fringes are shown on graphical displays only. (Fringe Size/Pos, Fringe Bitmaps, Making Buttons): Clarifications. (Replacing Specs): Clarify example. (Manipulating Buttons): Note that button-at can return a marker. (Buttons): Minor rewrite. (Character Display): New node. Consolidate all character display related nodes into its subsections. (Usual Display): Character 127 is also affected by ctl-arrow. (Display Tables): Improve example. * lisp/button.el (button-at): Minor addition to docstring. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-03-22 06:21:28 +0000 +++ doc/lispref/ChangeLog 2012-03-25 07:58:59 +0000 @@ -1,3 +1,16 @@ +2012-03-25 Chong Yidong + + * display.texi (Fringes): Note that fringes are shown on graphical + displays only. + (Fringe Size/Pos, Fringe Bitmaps, Making Buttons): Clarifications. + (Replacing Specs): Clarify example. + (Manipulating Buttons): Note that button-at can return a marker. + (Buttons): Minor rewrite. + (Character Display): New node. Consolidate all character display + related nodes into its subsections. + (Usual Display): Character 127 is also affected by ctl-arrow. + (Display Tables): Improve example. + 2012-03-22 Glenn Morris * strings.texi (Text Comparison): Mention string-prefix-p. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2012-03-21 07:02:13 +0000 +++ doc/lispref/display.texi 2012-03-25 07:58:59 +0000 @@ -30,13 +30,11 @@ * Buttons:: Adding clickable buttons to Emacs buffers. * Abstract Display:: Emacs's Widget for Object Collections. * Blinking:: How Emacs shows the matching open parenthesis. -* Usual Display:: The usual conventions for displaying nonprinting chars. -* Display Tables:: How to specify other conventions. +* Character Display:: How Emacs displays individual characters. * Beeping:: Audible signal to the user. * Window Systems:: Which window system is being used. * Bidirectional Display:: Display of bidirectional scripts, such as Arabic and Farsi. -* Glyphless Chars:: How glyphless characters are drawn. @end menu @node Refresh Screen @@ -46,7 +44,6 @@ contents of a given frame (@pxref{Frames}). This is useful if the screen is corrupted. -@c Emacs 19 feature @defun redraw-frame frame This function clears and redisplays frame @var{frame}. @end defun @@ -3206,9 +3203,9 @@ @section Fringes @cindex fringes - The @dfn{fringes} of a window are thin vertical strips down the -sides that are used for displaying bitmaps that indicate truncation, -continuation, horizontal scrolling, and the overlay arrow. + On graphical displays, Emacs draws @dfn{fringes} next to each +window: thin vertical strips down the sides which can display bitmaps +indicating truncation, continuation, horizontal scrolling, and so on. @menu * Fringe Size/Pos:: Specifying where to put the window fringes. @@ -3223,7 +3220,7 @@ @subsection Fringe Size and Position The following buffer-local variables control the position and width -of the window fringes. +of fringes in windows showing that buffer. @defvar fringes-outside-margins The fringes normally appear between the display margins and the window @@ -3243,12 +3240,17 @@ width from the window's frame. @end defvar - The values of these variables take effect when you display the -buffer in a window. If you change them while the buffer is visible, -you can call @code{set-window-buffer} to display it once again in the -same window, to make the changes take effect. A buffer that does not -specify values for these variables will use the default values -specified for the frame; see @ref{Layout Parameters}. + Any buffer which does not specify values for these variables uses +the values specified by the @code{left-fringe} and @code{right-fringe} +frame parameters (@pxref{Layout Parameters}). + + The above variables actually take effect via the function +@code{set-window-buffer} (@pxref{Buffers and Windows}), which calls +@code{set-window-fringes} as a subroutine. If you change one of these +variables, the fringe display is not updated in existing windows +showing the buffer, unless you call @code{set-window-buffer} again in +each affected window. You can also use @code{set-window-fringes} to +control the fringe display in individual windows. @defun set-window-fringes window left &optional right outside-margins This function sets the fringe widths of window @var{window}. @@ -3274,9 +3276,9 @@ @cindex fringe indicators @cindex indicators, fringe - The @dfn{fringe indicators} are tiny icons Emacs displays in the -window fringe (on a graphic display) to indicate truncated or -continued lines, buffer boundaries, overlay arrow, etc. + @dfn{Fringe indicators} are tiny icons displayed in the window +fringe to indicate truncated or continued lines, buffer boundaries, +etc. @defopt indicate-empty-lines @cindex fringes, and empty line indication @@ -3448,21 +3450,15 @@ a display specification has the form @example -(left-fringe @var{bitmap} [@var{face}]) -@end example - -@noindent -or - -@example -(right-fringe @var{bitmap} [@var{face}]) -@end example - -@noindent -The symbol @var{bitmap} identifies the bitmap to display. The -optional @var{face} names a face whose foreground color is used to -display the bitmap; this face is automatically merged with the -@code{fringe} face. +(@var{fringe} @var{bitmap} [@var{face}]) +@end example + +@noindent +@var{fringe} is either the symbol @code{left-fringe} or +@code{right-fringe}. @var{bitmap} is a symbol identifying the bitmap +to display. The optional @var{face} names a face whose foreground +color is used to display the bitmap; this face is automatically merged +with the @code{fringe} face. Here is a list of the standard fringe bitmaps defined in Emacs, and how they are currently used in Emacs (via @@ -3710,7 +3706,7 @@ @kindex display @r{(text property)} The @code{display} text property (or overlay property) is used to -insert images into text, and also control other aspects of how text +insert images into text, and to control other aspects of how text displays. The value of the @code{display} property should be a display specification, or a list or vector containing several display specifications. Display specifications in the same @code{display} @@ -3736,8 +3732,8 @@ @node Replacing Specs @subsection Display Specs That Replace The Text - Some kinds of @code{display} specifications specify something to -display instead of the text that has the property. These are called + Some kinds of display specifications specify something to display +instead of the text that has the property. These are called @dfn{replacing} display specifications. Emacs does not allow the user to interactively move point into the middle of buffer text that is replaced in this way. @@ -3750,47 +3746,34 @@ For replacing display specifications, ``the text that has the property'' means all the consecutive characters that have the same Lisp object as their @code{display} property; these characters are -replaced as a single unit. By contrast, characters that have similar -but distinct Lisp objects as their @code{display} properties are -handled separately. Here's a function that illustrates this point: - -@smallexample -(defun foo () - (goto-char (point-min)) - (dotimes (i 5) - (let ((string (concat "A"))) - (put-text-property (point) (1+ (point)) 'display string) - (forward-char 1) - (put-text-property (point) (1+ (point)) 'display string) - (forward-char 1)))) -@end smallexample - -@noindent -It gives each of the first ten characters in the buffer string -@code{"A"} as the @code{display} property, but they don't all get the -same string. The first two characters get the same string, so they -together are replaced with one @samp{A}. The next two characters get -a second string, so they together are replaced with one @samp{A}. -Likewise for each following pair of characters. Thus, the ten -characters appear as five A's. This function would have the same -results: - -@smallexample -(defun foo () - (goto-char (point-min)) - (dotimes (i 5) - (let ((string (concat "A"))) - (put-text-property (point) (+ 2 (point)) 'display string) - (put-text-property (point) (1+ (point)) 'display string) - (forward-char 2)))) -@end smallexample - -@noindent -This illustrates that what matters is the property value for -each character. If two consecutive characters have the same -object as the @code{display} property value, it's irrelevant -whether they got this property from a single call to -@code{put-text-property} or from two different calls. +replaced as a single unit. If two characters have different Lisp +objects as their @code{display} properties (i.e.@: objects which are +not @code{eq}), they are handled separately. + + Here is an example which illustrates this point. A string serves as +a replacing display specification, which replaces the text that has +the property with the specified string (@pxref{Other Display Specs}). +Consider the following function: + +@smallexample +(defun foo () + (dotimes (i 5) + (let ((string (concat "A")) + (start (+ i i (point-min)))) + (put-text-property start (1+ start) 'display string) + (put-text-property start (+ 2 start) 'display string)))) +@end smallexample + +@noindent +This function gives each of the first ten characters in the buffer a +@code{display} property which is a string @code{"A"}, but they don't +all get the same string object. The first two characters get the same +string object, so they are replaced with one @samp{A}; the fact that +the display property was assigned in two separate calls to +@code{put-text-property} is irrelevant. Similarly, the next two +characters get a second string (@code{concat} creates a new string +object), so they are replaced with one @samp{A}; and so on. Thus, the +ten characters appear as five A's. @node Specified Space @subsection Specified Spaces @@ -4952,29 +4935,24 @@ @cindex buttons in buffers @cindex clickable buttons in buffers - The @emph{button} package defines functions for inserting and -manipulating clickable (with the mouse, or via keyboard commands) -buttons in Emacs buffers, such as might be used for help hyper-links, -etc. Emacs uses buttons for the hyper-links in help text and the like. - - A button is essentially a set of properties attached (via text -properties or overlays) to a region of text in an Emacs buffer. These -properties are called @dfn{button properties}. - - One of these properties (@code{action}) is a function, which will -be called when the user invokes it using the keyboard or the mouse. -The invoked function may then examine the button and use its other -properties as desired. - - In some ways the Emacs button package duplicates functionality offered -by the widget package (@pxref{Top, , Introduction, widget, The Emacs -Widget Library}), but the button package has the advantage that it is -much faster, much smaller, and much simpler to use (for elisp -programmers---for users, the result is about the same). The extra -speed and space savings are useful mainly if you need to create many -buttons in a buffer (for instance an @code{*Apropos*} buffer uses -buttons to make entries clickable, and may contain many thousands of -entries). + The Button package defines functions for inserting and manipulating +@dfn{buttons} that can be activated with the mouse or via keyboard +commands. These buttons are typically used for various kinds of +hyperlinks. + + A button is essentially a set of text or overlay properties, +attached to a stretch of text in a buffer. These properties are +called @dfn{button properties}. One of these properties, the +@dfn{action property}, specifies a function which is called when the +user invokes the button using the keyboard or the mouse. The action +function may examine the button and use its other properties as +desired. + + In some ways, the Button package duplicates the functionality in the +Widget package. @xref{Top, , Introduction, widget, The Emacs Widget +Library}. The advantage of the Button package is that it is faster, +smaller, and simpler to program. From the point of view of the user, +the interfaces produced by the two packages are very similar. @menu * Button Properties:: Button properties with special meanings. @@ -4988,10 +4966,10 @@ @subsection Button Properties @cindex button properties - Buttons have an associated list of properties defining their + Each button has an associated list of properties defining its appearance and behavior, and other arbitrary properties may be used -for application specific purposes. Some properties that have special -meaning to the button package include: +for application specific purposes. The following properties have +special meaning to the Button package: @table @code @item action @@ -5027,9 +5005,7 @@ @item type @kindex type @r{(button property)} -The button-type of the button. When creating a button, this is -usually specified using the @code{:type} keyword argument. -@xref{Button Types}. +The button type. @xref{Button Types}. @item help-echo @kindex help-index @r{(button property)} @@ -5055,7 +5031,7 @@ @subsection Button Types @cindex button types - Every button has a button @emph{type}, which defines default values + Every button has a @dfn{button type}, which defines default values for the button's properties. Button types are arranged in a hierarchy, with specialized types inheriting from more general types, so that it's easy to define special-purpose types of buttons for @@ -5120,18 +5096,17 @@ and returns it. @end defun - The following functions are similar, but use Emacs text properties -(@pxref{Text Properties}) to hold the button properties, making the -button actually part of the text instead of being a property of the -buffer. Buttons using text properties do not create markers into the -buffer, which is important for speed when you use extremely large -numbers of buttons. (However, if there is an existing face text -property at the site of the button, the button face may not be visible.) -Both functions return the position of the start of the new button: + The following functions are similar, but using text properties +(@pxref{Text Properties}) to hold the button properties. Such buttons +do not add markers to the buffer, so editing in the buffer does not +slow down if there is an extremely large numbers of buttons. However, +if there is an existing face text property on the text (e.g.@: a face +assigned by Font Lock mode), the button face may not be visible. Both +of these functions return the starting position of the new button. @defun make-text-button beg end &rest properties -This makes a button from @var{beg} to @var{end} in the current buffer, using -text properties. +This makes a button from @var{beg} to @var{end} in the current buffer, +using text properties. @end defun @defun insert-text-button label &rest properties @@ -5190,7 +5165,9 @@ @end defun @defun button-at pos -Return the button at position @var{pos} in the current buffer, or @code{nil}. +Return the button at position @var{pos} in the current buffer, or +@code{nil}. If the button at @var{pos} is a text property button, the +return value is a marker pointing to @var{pos}. @end defun @defun button-type-put type prop val @@ -5214,12 +5191,12 @@ @code{push-button} is the command that a user uses to actually `push' a button, and is bound by default in the button itself to @key{RET} -and to @key{mouse-2} using a region-specific keymap. Commands -that are useful outside the buttons itself, such as -@code{forward-button} and @code{backward-button} are additionally -available in the keymap stored in @code{button-buffer-map}; a mode -which uses buttons may want to use @code{button-buffer-map} as a -parent keymap for its keymap. +and to @key{mouse-2} using a local keymap in the button's overlay or +text properties. Commands that are useful outside the buttons itself, +such as @code{forward-button} and @code{backward-button} are +additionally available in the keymap stored in +@code{button-buffer-map}; a mode which uses buttons may want to use +@code{button-buffer-map} as a parent keymap for its keymap. If the button has a non-@code{nil} @code{follow-link} property, and @var{mouse-1-click-follows-link} is set, a quick @key{Mouse-1} click @@ -5662,70 +5639,111 @@ @end smallexample @end deffn +@node Character Display +@section Character Display + +@cindex glyph +This section describes how characters are actually displayed by Emacs. +Typically, a character is displayed as a @dfn{glyph} (a graphical +symbol which occupies one character position on the screen), whose +appearance corresponds to the character itself. For example, the +character @samp{a} (character code 97) is displayed as @samp{a}. Some +characters, however, are displayed specially. For example, the +formfeed character (character code 12) is usually displayed as a +sequence of two glyphs, @samp{^L}, while the newline character +(character code 10) starts a new screen line. + + You can modify how each character is displayed by defining a +@dfn{display table}, which maps each character code into a sequence of +glyphs. @xref{Display Tables}. A related feature, called the +@dfn{glyph table}, allows you to control how each character is +displayed on a text terminal. @xref{Glyphs}. + + +@menu +* Usual Display:: The usual conventions for displaying characters. +* Display Tables:: What a display table consists of. +* Active Display Table:: How Emacs selects a display table to use. +* Glyphs:: How to define a glyph, and what glyphs mean. +* Glyphless Chars:: How glyphless characters are drawn. +@end menu + @node Usual Display -@section Usual Display Conventions - - The usual display conventions define how to display each character -code. You can override these conventions by setting up a display table -(@pxref{Display Tables}). Here are the usual display conventions: - +@subsection Usual Display Conventions + + Here are the usual conventions for display each character code (in +the absence of a display table, which can override these +@iftex +conventions). +@end iftex +@ifnottex +conventions; @pxref{Display Tables}). +@end ifnottex + +@cindex printable ASCII characters @itemize @bullet @item -Character codes 32 through 126 map to glyph codes 32 through 126. -Normally this means they display as themselves, but a display table -can change that. - -@item -Character code 9 is a horizontal tab. It displays as whitespace -up to a position determined by @code{tab-width}. - -@item -Character code 10 is a newline. It is normally invisible on display, -and has the effect of ending the preceding line and starting a new -line. - -@item -All other codes in the range 0 through 31 display in one of two ways -according to the value of @code{ctl-arrow}. If it is non-@code{nil}, -these codes map to sequences of two glyphs, where the first glyph is -the @acronym{ASCII} code for @samp{^}. (A display table can specify a -glyph to use instead of @samp{^}.) Otherwise, these codes map just -like the raw bytes in the range 128 to 255 (described below). +The @dfn{printable @acronym{ASCII} characters}, character codes 32 +through 126 (consisting of numerals, English letters, and symbols like +@samp{#}) are displayed literally, i.e.@: they map onto glyph codes 32 +through 126. + +@item +The tab character (character code 9) displays as whitespace stretching +up to the next tab stop column. @xref{Text Display,,, emacs, The GNU +Emacs Manual}. The variable @code{tab-width} controls the number of +spaces per tab stop (see below). + +@item +The newline character (character code 10) has the effect of ending the +preceding line and starting a new line. + +@cindex ASCII control characters +@item +The non-printable @dfn{@acronym{ASCII} control characters}---character +codes 0 through 31, as well as the @key{DEL} character (character code +127)---display in one of two ways according to the variable +@code{ctl-arrow}. If this variable is non-@code{nil} (the default), +these characters are displayed as sequences of two glyphs, where the +first glyph is @samp{^} (a display table can specify a glyph to use +instead of @samp{^}); e.g.@: the @key{DEL} character is displayed as +@samp{^?}. + +If @code{ctl-arrow} is @code{nil}, these characters are displayed as +octal escapes (see below). + +This rule also applies to carriage return (character code 13), if that +character appears in the buffer. But carriage returns usually do not +appear in buffer text; they are eliminated as part of end-of-line +conversion (@pxref{Coding System Basics}). @cindex octal escapes @item -Raw bytes (@pxref{Text Representations}) with codes 128 through 255, -and the @acronym{ASCII} control character with code 127, display as -sequences of four glyphs, where the first glyph is the @acronym{ASCII} -code for @samp{\}, and the others are digit characters representing -the character code in octal. (A display table can specify a glyph to -use instead of @samp{\}.) This is known as the @dfn{octal escape} -display. +@dfn{Raw bytes} are non-@acronym{ASCII} characters with codes 128 +through 255 (@pxref{Text Representations}). These characters display +as @dfn{octal escapes}: sequences of four glyphs, where the first +glyph is the @acronym{ASCII} code for @samp{\}, and the others are +digit characters representing the character code in octal. (A display +table can specify a glyph to use instead of @samp{\}.) @item -Non-@acronym{ASCII} character codes above 127 are displayed as -themselves, if the terminal and the available fonts support them. -Characters that are not supported by the terminal, or (on window -systems) have no fonts available for them, are displayed as a question -mark or a hex code or an empty box. @xref{Glyphless Chars}, for how -to control display of the characters not supported by the terminal or -fonts. Display tables can change how a character is displayed, even -if it is supported. +Each non-@acronym{ASCII} character with code above 255 is displayed +literally, if the terminal supports it. If the terminal does not +support it, the character is said to be @dfn{glyphless}, and it is +usually displayed using a placeholder glyph. For example, if a +graphical terminal has no font for a character, Emacs usually displays +a box containing the character code in hexadecimal. @xref{Glyphless +Chars}. @end itemize - The usual display conventions apply even when there is a display + The above display conventions apply even when there is a display table, for any character whose entry in the active display table is @code{nil}. Thus, when you set up a display table, you need only specify the characters for which you want special behavior. - These display rules apply to carriage return (character code 13), when -it appears in the buffer. But that character may not appear in the -buffer where you expect it, if it was eliminated as part of end-of-line -conversion (@pxref{Coding System Basics}). - - These variables affect the way certain characters are displayed on the -screen. Since they change the number of columns the characters occupy, -they also affect the indentation functions. These variables also affect + The following variables affect how certain characters are displayed +on the screen. Since they change the number of columns the characters +occupy, they also affect the indentation functions. They also affect how the mode line is displayed; if you want to force redisplay of the mode line using the new values, call the function @code{force-mode-line-update} (@pxref{Mode Line Format}). @@ -5748,34 +5766,14 @@ @end defopt @node Display Tables -@section Display Tables +@subsection Display Tables @cindex display table -You can use the @dfn{display table} feature to control how all possible -character codes display on the screen. This is useful for displaying -European languages that have letters not in the @acronym{ASCII} character -set. - -The display table maps each character code into a sequence of -@dfn{glyphs}, each glyph being a graphic that takes up one character -position on the screen. You can also define how to display each glyph -on your terminal, using the @dfn{glyph table}. - -Display tables affect how the mode line is displayed; if you want to -force redisplay of the mode line using a new display table, call -@code{force-mode-line-update} (@pxref{Mode Line Format}). - -@menu -* Display Table Format:: What a display table consists of. -* Active Display Table:: How Emacs selects a display table to use. -* Glyphs:: How to define a glyph, and what glyphs mean. -@end menu - -@node Display Table Format -@subsection Display Table Format - - A display table is actually a char-table (@pxref{Char-Tables}) with -@code{display-table} as its subtype. + A display table is a special-purpose char-table +(@pxref{Char-Tables}), with @code{display-table} as its subtype, which +is used to override the usual character display conventions. This +section describes how to make, inspect, and assign elements to a +display table object. @defun make-display-table This creates and returns a display table. The table initially has @@ -5784,10 +5782,10 @@ The ordinary elements of the display table are indexed by character codes; the element at index @var{c} says how to display the character -code @var{c}. The value should be @code{nil} or a vector of the -glyphs to be output (@pxref{Glyphs}). @code{nil} says to display the -character @var{c} according to the usual display conventions -(@pxref{Usual Display}). +code @var{c}. The value should be @code{nil} (which means to display +the character @var{c} according to the usual display conventions; +@pxref{Usual Display}), or a vector of glyph codes (which means to +display the character @var{c} as those glyphs; @pxref{Glyphs}). @strong{Warning:} if you use the display table to change the display of newline characters, the whole buffer will be displayed as one long @@ -5832,12 +5830,11 @@ @example (setq disptab (make-display-table)) -(let ((i 0)) - (while (< i 32) - (or (= i ?\t) (= i ?\n) - (aset disptab i (vector ?^ (+ i 64)))) - (setq i (1+ i))) - (aset disptab 127 (vector ?^ ??))) +(dotimes (i 32) + (or (= i ?\t) + (= i ?\n) + (aset disptab i (vector ?^ (+ i 64))))) +(aset disptab 127 (vector ?^ ??)) @end example @defun display-table-slot display-table slot @@ -5870,17 +5867,19 @@ @subsection Active Display Table @cindex active display table - Each window can specify a display table, and so can each buffer. When -a buffer @var{b} is displayed in window @var{w}, display uses the -display table for window @var{w} if it has one; otherwise, the display -table for buffer @var{b} if it has one; otherwise, the standard display -table if any. The display table chosen is called the @dfn{active} -display table. + Each window can specify a display table, and so can each buffer. +The window's display table, if there is one, takes precedence over the +buffer's display table. If neither exists, Emacs tries to use the +standard display table; if that is @code{nil}, Emacs uses the usual +character display conventions (@pxref{Usual Display}). + + Note that display tables affect how the mode line is displayed, so +if you want to force redisplay of the mode line using a new display +table, call @code{force-mode-line-update} (@pxref{Mode Line Format}). @defun window-display-table &optional window -This function returns @var{window}'s display table, or @code{nil} -if @var{window} does not have an assigned display table. The default -for @var{window} is the selected window. +This function returns @var{window}'s display table, or @code{nil} if +there is none. The default for @var{window} is the selected window. @end defun @defun set-window-display-table window table @@ -5890,39 +5889,29 @@ @end defun @defvar buffer-display-table -This variable is automatically buffer-local in all buffers; its value in -a particular buffer specifies the display table for that buffer. If it -is @code{nil}, that means the buffer does not have an assigned display -table. +This variable is automatically buffer-local in all buffers; its value +specifies the buffer's display table. If it is @code{nil}, there is +no buffer display table. @end defvar @defvar standard-display-table -This variable's value is the default display table, used whenever a -window has no display table and neither does the buffer displayed in -that window. This variable is @code{nil} by default. +The value of this variable is the standard display table, which is +used when Emacs is displaying a buffer in a window with neither a +window display table nor a buffer display table defined. Its default +is @code{nil}. @end defvar - If there is no display table to use for a particular window---that is, -if the window specifies none, its buffer specifies none, and -@code{standard-display-table} is @code{nil}---then Emacs uses the usual -display conventions for all character codes in that window. @xref{Usual -Display}. - -A number of functions for changing the standard display table -are defined in the library @file{disp-table}. +The @file{disp-table} library defines several functions for changing +the standard display table. @node Glyphs @subsection Glyphs -@cindex glyph - A @dfn{glyph} is a generalization of a character; it stands for an -image that takes up a single character position on the screen. Normally -glyphs come from vectors in the display table (@pxref{Display Tables}). - - A glyph is represented in Lisp as a @dfn{glyph code}. A glyph code -can be @dfn{simple} or it can be defined by the @dfn{glyph table}. A -simple glyph code is just a way of specifying a character and a face -to output it in. @xref{Faces}. + A @dfn{glyph} is a graphical symbol which occupies a single +character position on the screen. Each glyph is represented in Lisp +as a @dfn{glyph code}. A glyph code can be @dfn{simple}, or it can be +defined by the @dfn{glyph table}. A simple glyph code is just a way +of specifying a character and a face to output it in. @xref{Faces}. The following functions are used to manipulate simple glyph codes: @@ -6015,6 +6004,99 @@ variable. @end defvar +@node Glyphless Chars +@subsection Glyphless Character Display +@cindex glyphless characters + + @dfn{Glyphless characters} are not displayed in the usual way when +they appear in a buffer, but in some special way (e.g. as a box +containing a hexadecimal code). These include characters that cannot +be displayed with any available font (on a graphical display), or that +cannot be encoded by the terminal's coding system (on a text +terminal). Specific characters can also be defined to be glyphless. + +@defvar glyphless-char-display +The value of this variable is a char-table that defines glyphless +characters and how they are displayed. If an entry is @code{nil}, the +corresponding character is displayed in its usual way. Otherwise, an +entry should be one of the following display methods: + +@table @asis +@item @code{zero-width} +Don't display the character. + +@item @code{thin-space} +Display a thin space, 1-pixel wide on graphical displays, or +1-character wide on text terminals. + +@item @code{empty-box} +Display an empty box. + +@item @code{hex-code} +Display a box containing the Unicode codepoint of the character, in +hexadecimal notation. + +@item an @acronym{ASCII} string +Display a box containing that string. +@end table + +@noindent +Except for @code{zero-width}, these methods display using the +@code{glyphless-char} face. + +An entry can also be a cons cell @code{(@var{graphical} +. @var{text})}, where @var{graphical} and @var{text} are the display +methods on graphical displays and text terminals respectively. + +The char-table has one extra slot, which determines how to display any +character that cannot be displayed with any available font, or cannot +be encoded by the terminal's coding system. Its value should be one +of the above display methods, except @code{zero-width} or a cons cell. +@end defvar + +@defopt glyphless-char-display-control +This user option provides a convenient way to set +@code{glyphless-char-display} for groups of similar characters. It +takes effect via a custom @code{:set} function (@pxref{Variable +Definitions}), which update @code{glyphless-char-display}. + +Its value should be an alist of elements @code{(@var{group} +. @var{method})}, where @var{group} is a symbol specifying a group of +characters, and @var{method} is a symbol specifying how to display +them. + +@var{group} should be one of the following: + +@table @code +@item c0-control +@acronym{ASCII} control characters @code{U+0000} to @code{U+001F}, +excluding the newline and tab characters (normally displayed as escape +sequences like @samp{^A}; @pxref{Text Display,, How Text Is Displayed, +emacs, The GNU Emacs Manual}). + +@item c1-control +Non-@acronym{ASCII}, non-printing characters @code{U+0080} to +@code{U+009F} (normally displayed as octal escape sequences like +@samp{\230}). + +@item format-control +Characters of Unicode General Category `Cf', such as @samp{U+200E} +(Left-to-Right Mark), but excluding characters that have graphic +images, such as @samp{U+00AD} (Soft Hyphen). + +@item no-font +Characters for there is no suitable font, or which cannot be encoded +by the terminal's coding system. +@end table + +@c FIXME: this can also be `acronym', but that's not currently +@c completely implemented; it applies only to the format-control +@c group, and only works if the acronym is in `char-acronym-table'. +The @var{method} symbol should be one of @code{zero-width}, +@code{thin-space}, @code{empty-box}, or @code{hex-code}. These have +the same meanings as in @code{glyphless-char-display}, above. +@end defopt + @node Window Systems @section Window Systems @@ -6290,96 +6372,3 @@ appropriate mirrored character in the reordered text. Lisp programs can affect the mirrored display by changing this property. Again, any such changes affect all of Emacs display. - -@node Glyphless Chars -@section Glyphless Character Display -@cindex glyphless characters - - @dfn{Glyphless characters} are not displayed in the usual way when -they appear in a buffer, but in some special way (e.g. as a box -containing a hexadecimal code). These include characters that cannot -be displayed with any available font (on a graphical display), or that -cannot be encoded by the terminal's coding system (on a text -terminal). Specific characters can also be defined to be glyphless. - -@defvar glyphless-char-display -The value of this variable is a char-table that defines glyphless -characters and how they are displayed. If an entry is @code{nil}, the -corresponding character is displayed in its usual way. Otherwise, an -entry should be one of the following display methods: - -@table @asis -@item @code{zero-width} -Don't display the character. - -@item @code{thin-space} -Display a thin space, 1-pixel wide on graphical displays, or -1-character wide on text terminals. - -@item @code{empty-box} -Display an empty box. - -@item @code{hex-code} -Display a box containing the Unicode codepoint of the character, in -hexadecimal notation. - -@item an @acronym{ASCII} string -Display a box containing that string. -@end table - -@noindent -Except for @code{zero-width}, these methods display using the -@code{glyphless-char} face. - -An entry can also be a cons cell @code{(@var{graphical} -. @var{text})}, where @var{graphical} and @var{text} are the display -methods on graphical displays and text terminals respectively. - -The char-table has one extra slot, which determines how to display any -character that cannot be displayed with any available font, or cannot -be encoded by the terminal's coding system. Its value should be one -of the above display methods, except @code{zero-width} or a cons cell. -@end defvar - -@defopt glyphless-char-display-control -This user option provides a convenient way to set -@code{glyphless-char-display} for groups of similar characters. It -takes effect via a custom @code{:set} function (@pxref{Variable -Definitions}), which update @code{glyphless-char-display}. - -Its value should be an alist of elements @code{(@var{group} -. @var{method})}, where @var{group} is a symbol specifying a group of -characters, and @var{method} is a symbol specifying how to display -them. - -@var{group} should be one of the following: - -@table @code -@item c0-control -@acronym{ASCII} control characters @code{U+0000} to @code{U+001F}, -excluding the newline and tab characters (normally displayed as escape -sequences like @samp{^A}; @pxref{Text Display,, How Text Is Displayed, -emacs, The GNU Emacs Manual}). - -@item c1-control -Non-@acronym{ASCII}, non-printing characters @code{U+0080} to -@code{U+009F} (normally displayed as octal escape sequences like -@samp{\230}). - -@item format-control -Characters of Unicode General Category `Cf', such as @samp{U+200E} -(Left-to-Right Mark), but excluding characters that have graphic -images, such as @samp{U+00AD} (Soft Hyphen). - -@item no-font -Characters for there is no suitable font, or which cannot be encoded -by the terminal's coding system. -@end table - -@c FIXME: this can also be `acronym', but that's not currently -@c completely implemented; it applies only to the format-control -@c group, and only works if the acronym is in `char-acronym-table'. -The @var{method} symbol should be one of @code{zero-width}, -@code{thin-space}, @code{empty-box}, or @code{hex-code}. These have -the same meanings as in @code{glyphless-char-display}, above. -@end defopt === modified file 'doc/lispref/elisp.texi' --- doc/lispref/elisp.texi 2012-03-08 05:27:03 +0000 +++ doc/lispref/elisp.texi 2012-03-25 07:58:59 +0000 @@ -1265,14 +1265,11 @@ * Buttons:: Adding clickable buttons to Emacs buffers. * Abstract Display:: Emacs's Widget for Object Collections. * Blinking:: How Emacs shows the matching open parenthesis. -* Usual Display:: The usual conventions for displaying - nonprinting chars. -* Display Tables:: How to specify other conventions. +* Character Display:: How Emacs displays individual characters. * Beeping:: Audible signal to the user. * Window Systems:: Which window system is being used. * Bidirectional Display:: Display of bidirectional scripts, such as Arabic and Farsi. -* Glyphless Chars:: How glyphless characters are drawn. The Echo Area @@ -1361,11 +1358,13 @@ * Abstract Display Functions:: Functions in the Ewoc package. * Abstract Display Example:: Example of using Ewoc. -Display Tables +Character Display -* Display Table Format:: What a display table consists of. -* Active Display Table:: How Emacs selects a display table to use. -* Glyphs:: How to define a glyph, and what glyphs mean. +* Usual Display:: The usual conventions for displaying characters. +* Display Tables:: What a display table consists of. +* Active Display Table:: How Emacs selects a display table to use. +* Glyphs:: How to define a glyph, and what glyphs mean. +* Glyphless Chars:: How glyphless characters are drawn. Operating System Interface === modified file 'doc/lispref/vol1.texi' --- doc/lispref/vol1.texi 2012-03-08 05:27:03 +0000 +++ doc/lispref/vol1.texi 2012-03-25 07:58:59 +0000 @@ -1287,14 +1287,11 @@ * Buttons:: Adding clickable buttons to Emacs buffers. * Abstract Display:: Emacs's Widget for Object Collections. * Blinking:: How Emacs shows the matching open parenthesis. -* Usual Display:: The usual conventions for displaying - nonprinting chars. -* Display Tables:: How to specify other conventions. +* Character Display:: How Emacs displays individual characters. * Beeping:: Audible signal to the user. * Window Systems:: Which window system is being used. * Bidirectional Display:: Display of bidirectional scripts, such as Arabic and Farsi. -* Glyphless Chars:: How glyphless characters are drawn. The Echo Area @@ -1383,11 +1380,13 @@ * Abstract Display Functions:: Functions in the Ewoc package. * Abstract Display Example:: Example of using Ewoc. -Display Tables +Character Display -* Display Table Format:: What a display table consists of. -* Active Display Table:: How Emacs selects a display table to use. -* Glyphs:: How to define a glyph, and what glyphs mean. +* Usual Display:: The usual conventions for displaying characters. +* Display Tables:: What a display table consists of. +* Active Display Table:: How Emacs selects a display table to use. +* Glyphs:: How to define a glyph, and what glyphs mean. +* Glyphless Chars:: How glyphless characters are drawn. Operating System Interface === modified file 'doc/lispref/vol2.texi' --- doc/lispref/vol2.texi 2012-03-08 05:27:03 +0000 +++ doc/lispref/vol2.texi 2012-03-25 07:58:59 +0000 @@ -1286,14 +1286,11 @@ * Buttons:: Adding clickable buttons to Emacs buffers. * Abstract Display:: Emacs's Widget for Object Collections. * Blinking:: How Emacs shows the matching open parenthesis. -* Usual Display:: The usual conventions for displaying - nonprinting chars. -* Display Tables:: How to specify other conventions. +* Character Display:: How Emacs displays individual characters. * Beeping:: Audible signal to the user. * Window Systems:: Which window system is being used. * Bidirectional Display:: Display of bidirectional scripts, such as Arabic and Farsi. -* Glyphless Chars:: How glyphless characters are drawn. The Echo Area @@ -1382,11 +1379,13 @@ * Abstract Display Functions:: Functions in the Ewoc package. * Abstract Display Example:: Example of using Ewoc. -Display Tables +Character Display -* Display Table Format:: What a display table consists of. -* Active Display Table:: How Emacs selects a display table to use. -* Glyphs:: How to define a glyph, and what glyphs mean. +* Usual Display:: The usual conventions for displaying characters. +* Display Tables:: What a display table consists of. +* Active Display Table:: How Emacs selects a display table to use. +* Glyphs:: How to define a glyph, and what glyphs mean. +* Glyphless Chars:: How glyphless characters are drawn. Operating System Interface === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-24 13:23:23 +0000 +++ lisp/ChangeLog 2012-03-25 07:58:59 +0000 @@ -1,3 +1,7 @@ +2012-03-25 Chong Yidong + + * button.el (button-at): Minor addition to docstring. + 2012-03-24 Simon Leinen * vc/vc.el (vc-merge): Fix a prompt. === modified file 'lisp/button.el' --- lisp/button.el 2012-01-19 07:21:25 +0000 +++ lisp/button.el 2012-03-25 07:58:59 +0000 @@ -349,7 +349,9 @@ ;; Finding buttons in a buffer (defun button-at (pos) - "Return the button at position POS in the current buffer, or nil." + "Return the button at position POS in the current buffer, or nil. +If the button at POS is a text property button, the return value +is a marker pointing to POS." (let ((button (get-char-property pos 'button))) (if (or (overlayp button) (null button)) button ------------------------------------------------------------ revno: 107670 fixes bug(s): http://debbugs.gnu.org/9960 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-03-24 15:43:21 +0200 message: Fix bug #9960 with MSVC build on MS-Windows. src/s/ms-w32.h (tzname): Include time.h before redirecting to _tzname. Fixes the MSVC build. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-03-24 09:29:00 +0000 +++ src/ChangeLog 2012-03-24 13:43:21 +0000 @@ -1,3 +1,8 @@ +2012-03-24 Eli Zaretskii + + * s/ms-w32.h (tzname): Include time.h before redirecting to + _tzname. Fixes the MSVC build. (Bug#9960) + 2012-03-24 Andreas Schwab * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6 === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2012-01-19 07:21:25 +0000 +++ src/s/ms-w32.h 2012-03-24 13:43:21 +0000 @@ -286,6 +286,12 @@ #define stricmp _stricmp #define tzset _tzset +/* Include time.h before redirecting tzname, since MSVC's time.h + defines _tzname to call a function, but also declares tzname a + 2-element array. Having the redirection before including the + header thus has the effect of declaring a function that returns an + array, and triggers an error message. */ +#include #define tzname _tzname #if !defined (_MSC_VER) || (_MSC_VER < 1400) #undef utime ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.