Merge from origin/emacs-25
2317c61
Fix last todo-mode change5d4d8a3
Improve last todo-mode fixd7084f2
Fix todo-mode use of minibuffer completion keymap (bug#23695).27dec52
* src/alloc.c (ALIGN): Avoid error on DragonFly BSD. (Bug#23...f526191
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Avoid ...e881070
* lisp/help-fns.el (describe-function-1): Avoid reporting adv...d308aa1
Minor grammar fix (bug#23746)20de667
Doc fixes for grammar and typos (bug#23746)a67a4e5
* doc/lispref/processes.texi (Process Buffers): Minor rewordi...27f440e
Add cross-reference to ELisp manual10802d8
; make change-history-commit4b2d77d
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Fix (bu...12e009e
Restore initial undo boundary with viper291fe0a
Revert "Fix viper undo breakage from undo-boundary changes"6921f4a
Fix dbus crash on 32-bit Cygwin
This commit is contained in:
commit
d9088290ef
23 changed files with 3923 additions and 65 deletions
3831
ChangeLog.2
3831
ChangeLog.2
File diff suppressed because it is too large
Load diff
|
@ -701,7 +701,7 @@ after it visits the file. (This marks the buffer as modified, and you
|
|||
can undo it.) If the value is @code{visit-save}, Emacs adds such
|
||||
newlines both on visiting and on saving. If the value is @code{nil},
|
||||
Emacs leaves the end of the file unchanged; any other non-@code{nil}
|
||||
value means to asks you whether to add a newline. The default is
|
||||
value means Emacs asks you whether to add a newline. The default is
|
||||
@code{nil}.
|
||||
|
||||
@vindex mode-require-final-newline
|
||||
|
|
|
@ -1011,7 +1011,7 @@ scroll bar height, change the @code{scroll-bar-height} frame parameter
|
|||
|
||||
On graphical displays, you can use @dfn{window dividers} in order to
|
||||
separate windows visually. Window dividers are bars that can be dragged
|
||||
with the mouse, thus allowing to easily resize adjacent windows.
|
||||
with the mouse, thus allowing you to easily resize adjacent windows.
|
||||
|
||||
@findex window-divider-mode
|
||||
To toggle the display of window dividers, use the command @kbd{M-x
|
||||
|
|
|
@ -1923,7 +1923,7 @@ Like @code{lpr-buffer} but print only the current region.
|
|||
@findex lpr-region
|
||||
@vindex lpr-switches
|
||||
@vindex lpr-commands
|
||||
On most operating system, the above hardcopy commands submit files
|
||||
On most operating systems, the above hardcopy commands submit files
|
||||
for printing by calling the @command{lpr} program. To change the
|
||||
printer program, customize the variable @code{lpr-command}. To
|
||||
specify extra switches to give the printer program, customize the list
|
||||
|
|
|
@ -1977,7 +1977,7 @@ in @code{event-modifiers}. For example:
|
|||
|
||||
@defun mouse-movement-p object
|
||||
This function returns non-@code{nil} if @var{object} is a mouse movement
|
||||
event.
|
||||
event. @xref{Motion Events}.
|
||||
@end defun
|
||||
|
||||
@defun event-convert-list list
|
||||
|
|
|
@ -438,7 +438,7 @@ Emacs commands for operating on compiler output can be used on these
|
|||
messages.
|
||||
|
||||
When an error is due to invalid syntax in the program, the byte
|
||||
compiler might get confused about the errors' exact location. One way
|
||||
compiler might get confused about the error's exact location. One way
|
||||
to investigate is to switch to the buffer @w{@file{ *Compiler
|
||||
Input*}}. (This buffer name starts with a space, so it does not show
|
||||
up in the Buffer Menu.) This buffer contains the program being
|
||||
|
|
|
@ -1382,7 +1382,7 @@ default global map.
|
|||
The function @code{substitute-key-definition} scans a keymap for
|
||||
keys that have a certain binding and rebinds them with a different
|
||||
binding. Another feature which is cleaner and can often produce the
|
||||
same results to remap one command into another (@pxref{Remapping
|
||||
same results is to remap one command into another (@pxref{Remapping
|
||||
Commands}).
|
||||
|
||||
@defun substitute-key-definition olddef newdef keymap &optional oldmap
|
||||
|
|
|
@ -848,8 +848,8 @@ loaded, into the current Emacs session. This means that the facilities
|
|||
associated with @var{feature} are or will be available for other Lisp
|
||||
programs.
|
||||
|
||||
The direct effect of calling @code{provide} is if not already in
|
||||
@var{features} then to add @var{feature} to the front of that list and
|
||||
The direct effect of calling @code{provide} is to add @var{feature} to
|
||||
the front of @code{features} if it is not already in that list and
|
||||
call any @code{eval-after-load} code waiting for it (@pxref{Hooks for
|
||||
Loading}). The argument @var{feature} must be a symbol.
|
||||
@code{provide} returns @var{feature}.
|
||||
|
|
|
@ -340,10 +340,10 @@ text is inserted at its position. If @var{type} is @code{nil},
|
|||
This function reports the current insertion type of @var{marker}.
|
||||
@end defun
|
||||
|
||||
Most functions that create markers, without an argument allowing to
|
||||
specify the insertion type, create them with insertion type
|
||||
@code{nil}. Also, the mark has, by default, insertion type
|
||||
@code{nil}.
|
||||
All functions that create markers without accepting an argument that
|
||||
specifies the insertion type, create them with insertion type
|
||||
@code{nil} (@pxref{Creating Markers}). Also, the mark has, by
|
||||
default, insertion type @code{nil}.
|
||||
|
||||
@node Moving Markers
|
||||
@section Moving Marker Positions
|
||||
|
|
|
@ -913,7 +913,7 @@ follow these conventions: they may run the parent's mode hook too early,
|
|||
or fail to run @code{after-change-major-mode-hook}. If you encounter
|
||||
such a major mode, please correct it to follow these conventions.
|
||||
|
||||
When you defined a major mode using @code{define-derived-mode}, it
|
||||
When you define a major mode using @code{define-derived-mode}, it
|
||||
automatically makes sure these conventions are followed. If you
|
||||
define a major mode ``by hand'', not using @code{define-derived-mode},
|
||||
use the following functions to handle these conventions automatically.
|
||||
|
@ -1066,7 +1066,7 @@ to invert the sort order.
|
|||
@defun tabulated-list-init-header
|
||||
This function computes and sets @code{header-line-format} for the
|
||||
Tabulated List buffer (@pxref{Header Lines}), and assigns a keymap to
|
||||
the header line to allow sort entries by clicking on column headers.
|
||||
the header line to allow sorting entries by clicking on column headers.
|
||||
|
||||
Modes derived from Tabulated List mode should call this after setting
|
||||
the above variables (in particular, only after setting
|
||||
|
|
|
@ -506,7 +506,7 @@ inputinput@point{}
|
|||
@defun call-process-shell-command command &optional infile destination display
|
||||
This function executes the shell command @var{command} synchronously.
|
||||
The arguments are handled as in @code{call-process}. An old calling
|
||||
convention allowed to pass any number of additional arguments after
|
||||
convention allowed passing any number of additional arguments after
|
||||
@var{display}, which were concatenated to @var{command}; this is still
|
||||
supported, but strongly discouraged.
|
||||
@end defun
|
||||
|
@ -515,7 +515,7 @@ supported, but strongly discouraged.
|
|||
This function is like @code{call-process-shell-command}, but uses
|
||||
@code{process-file} internally. Depending on @code{default-directory},
|
||||
@var{command} can be executed also on remote hosts. An old calling
|
||||
convention allowed to pass any number of additional arguments after
|
||||
convention allowed passing any number of additional arguments after
|
||||
@var{display}, which were concatenated to @var{command}; this is still
|
||||
supported, but strongly discouraged.
|
||||
@end defun
|
||||
|
@ -1382,10 +1382,10 @@ subprocess with a @code{SIGHUP} signal (@pxref{Signals to Processes}).
|
|||
@end defun
|
||||
|
||||
If the process's buffer is displayed in a window, your Lisp program
|
||||
may wish telling the process the dimensions of that window, so that
|
||||
may wish to tell the process the dimensions of that window, so that
|
||||
the process could adapt its output to those dimensions, much as it
|
||||
adapts to the screen dimensions. The following functions allow to
|
||||
communicate this kind of information to processes; however, not all
|
||||
adapts to the screen dimensions. The following functions allow
|
||||
communicating this kind of information to processes; however, not all
|
||||
systems support the underlying functionality, so it is best to provide
|
||||
fallbacks, e.g., via command-line arguments or environment variables.
|
||||
|
||||
|
|
|
@ -1376,10 +1376,10 @@ before executing each key sequence, so that each undo normally undoes
|
|||
the effects of one command. A few exceptional commands are
|
||||
@dfn{amalgamating}: these commands generally cause small changes to
|
||||
buffers, so with these a boundary is inserted only every 20th command,
|
||||
allowing to undo them as a group. By default, commands
|
||||
allowing the changes to be undone as a group. By default, the commands
|
||||
@code{self-insert-command}, which produces self-inserting input
|
||||
characters (@pxref{Commands for Insertion}), and @code{delete-char}
|
||||
which deletes characters (@pxref{Deletion}) are amalgamating.
|
||||
characters (@pxref{Commands for Insertion}), and @code{delete-char},
|
||||
which deletes characters (@pxref{Deletion}), are amalgamating.
|
||||
Where a command affects the contents of several buffers, as may happen,
|
||||
for example, when a function on the @code{post-command-hook} affects a
|
||||
buffer other than the @code{current-buffer}, then @code{undo-boundary}
|
||||
|
|
|
@ -5750,8 +5750,11 @@ With non-nil argument FILE prompt for a file and complete only
|
|||
against categories in that file; otherwise complete against all
|
||||
categories from `todo-category-completions-files'."
|
||||
;; Allow SPC to insert spaces, for adding new category names.
|
||||
(let ((map minibuffer-local-completion-map))
|
||||
(define-key map " " nil)
|
||||
(let ((minibuffer-local-completion-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map minibuffer-local-completion-map)
|
||||
(define-key map " " nil)
|
||||
map)))
|
||||
(let* ((add (eq match-type 'add))
|
||||
(archive (eq match-type 'archive))
|
||||
(file0 (when (and file (> (length todo-files) 1))
|
||||
|
|
|
@ -261,7 +261,7 @@ Assumes the caller has bound `macroexpand-all-environment'."
|
|||
(format "%s quoted with ' rather than with #'"
|
||||
(list 'lambda (nth 1 f) '...))
|
||||
(macroexp--expand-all `(,fun ,arg1 ,f . ,args))))
|
||||
(`(funcall (,(or 'quote 'function) ,(and f (pred symbolp)) . ,_) . ,args)
|
||||
(`(funcall #',(and f (pred symbolp)) . ,args)
|
||||
;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
|
||||
;; has a compiler-macro.
|
||||
(macroexp--expand-all `(,f . ,args)))
|
||||
|
|
|
@ -114,7 +114,10 @@ Each element has the form (WHERE BYTECODE STACK) where:
|
|||
(usage (help-split-fundoc origdoc function)))
|
||||
(setq usage (if (null usage)
|
||||
(let ((arglist (help-function-arglist flist)))
|
||||
(help--make-usage-docstring function arglist))
|
||||
;; "[Arg list not available until function
|
||||
;; definition is loaded]", bug#21299
|
||||
(if (stringp arglist) t
|
||||
(help--make-usage-docstring function arglist)))
|
||||
(setq origdoc (cdr usage)) (car usage)))
|
||||
(help-add-fundoc-usage (concat docstring origdoc) usage))))
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@
|
|||
(viper-over-whitespace-line))
|
||||
(indent-to-left-margin))
|
||||
(viper-add-newline-at-eob-if-necessary)
|
||||
(viper-complete-complex-command-for-undo)
|
||||
(viper-adjust-undo)
|
||||
|
||||
(if (eq viper-current-state 'emacs-state)
|
||||
(viper-restore-cursor-color 'after-emacs-mode)
|
||||
|
@ -1570,7 +1570,7 @@ If the prefix argument ARG is non-nil, it is used instead of `val'."
|
|||
(if (and (eolp) (not (bolp)))
|
||||
(backward-char 1))
|
||||
))
|
||||
(viper-complete-complex-command-for-undo) ; take care of undo
|
||||
(viper-adjust-undo) ; take care of undo
|
||||
;; If the prev cmd was rotating the command ring, this means that `.' has
|
||||
;; just executed a command from that ring. So, push it on the ring again.
|
||||
;; If we are just executing previous command , then don't push viper-d-com
|
||||
|
@ -1670,7 +1670,6 @@ invokes the command before that, etc."
|
|||
|
||||
(undo-start)
|
||||
(undo-more 2)
|
||||
(viper-complete-complex-command-for-undo)
|
||||
;;(setq undo-beg-posn (or undo-beg-posn (point))
|
||||
;; undo-end-posn (or undo-end-posn (point)))
|
||||
;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt)
|
||||
|
@ -1710,17 +1709,41 @@ invokes the command before that, etc."
|
|||
;; The following two functions are used to set up undo properly.
|
||||
;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
|
||||
;; they are undone all at once.
|
||||
(defun viper-complete-complex-command-for-undo ()
|
||||
(setq undo-auto-disable-boundaries nil)
|
||||
(setq viper-undo-in-complex-command nil)
|
||||
(undo-boundary))
|
||||
(defun viper-adjust-undo ()
|
||||
(if viper-undo-needs-adjustment
|
||||
(let ((inhibit-quit t)
|
||||
tmp tmp2)
|
||||
(setq viper-undo-needs-adjustment nil)
|
||||
(when (listp buffer-undo-list)
|
||||
(let ((had-boundary (null (car buffer-undo-list))))
|
||||
(if (setq tmp (memq viper-buffer-undo-list-mark buffer-undo-list))
|
||||
(progn
|
||||
(setq tmp2 (cdr tmp)) ; the part after mark
|
||||
|
||||
;; cut tail from buffer-undo-list temporarily by direct
|
||||
;; manipulation with pointers in buffer-undo-list
|
||||
(setcdr tmp nil)
|
||||
|
||||
(setq buffer-undo-list (delq nil buffer-undo-list))
|
||||
(setq buffer-undo-list
|
||||
(delq viper-buffer-undo-list-mark buffer-undo-list))
|
||||
;; restore tail of buffer-undo-list
|
||||
(setq buffer-undo-list (nconc buffer-undo-list tmp2)))
|
||||
(setq buffer-undo-list (delq nil buffer-undo-list)))
|
||||
;; The top-level loop only adds boundaries if there has been
|
||||
;; modifications in the buffer, so make sure we don't accidentally
|
||||
;; drop the "final" boundary (bug#22295).
|
||||
(if had-boundary (undo-boundary)))))))
|
||||
|
||||
|
||||
(defun viper-set-complex-command-for-undo ()
|
||||
(when (not viper-undo-in-complex-command)
|
||||
(setq undo-auto-disable-boundaries t)
|
||||
(setq viper-undo-in-complex-command t)
|
||||
(undo-boundary)))
|
||||
(if (listp buffer-undo-list)
|
||||
(if (not viper-undo-needs-adjustment)
|
||||
(let ((inhibit-quit t))
|
||||
(setq buffer-undo-list
|
||||
(cons viper-buffer-undo-list-mark buffer-undo-list))
|
||||
(setq viper-undo-needs-adjustment t)))))
|
||||
|
||||
|
||||
;;; Viper's destructive Command ring utilities
|
||||
|
||||
|
@ -2588,7 +2611,7 @@ These keys are ESC, RET, and LineFeed."
|
|||
(delete-char 1 t)
|
||||
(insert char))
|
||||
|
||||
(viper-complete-complex-command-for-undo)
|
||||
(viper-adjust-undo)
|
||||
(backward-char arg)
|
||||
))
|
||||
|
||||
|
|
|
@ -370,8 +370,13 @@ Use `\\[viper-set-expert-level]' to change this.")
|
|||
;; VI-style Undo
|
||||
|
||||
;; Used to 'undo' complex commands, such as replace and insert commands.
|
||||
(viper-deflocalvar viper-undo-in-complex-command nil)
|
||||
(put 'viper-undo-in-complex-command 'permanent-local t)
|
||||
(viper-deflocalvar viper-undo-needs-adjustment nil)
|
||||
(put 'viper-undo-needs-adjustment 'permanent-local t)
|
||||
|
||||
;; A mark that Viper puts on buffer-undo-list. Marks the beginning of a
|
||||
;; complex command that must be undone atomically. If inserted, it is
|
||||
;; erased by viper-change-state-to-vi and viper-repeat.
|
||||
(defconst viper-buffer-undo-list-mark 'viper)
|
||||
|
||||
(defcustom viper-keep-point-on-undo nil
|
||||
"Non-nil means not to move point while undoing commands.
|
||||
|
|
|
@ -571,7 +571,8 @@ FILE is the file where FUNCTION was probably defined."
|
|||
real-function))
|
||||
(aliased (or (symbolp def)
|
||||
;; Advised & aliased function.
|
||||
(and advised (symbolp real-function))))
|
||||
(and advised (symbolp real-function)
|
||||
(not (eq 'autoload (car-safe def))))))
|
||||
(real-def (cond
|
||||
(aliased (let ((f real-function))
|
||||
(while (and (fboundp f)
|
||||
|
|
|
@ -2848,18 +2848,6 @@ buffers that were changed during the last command.")
|
|||
|
||||
If set to non-nil, this will effectively disable the timer.")
|
||||
|
||||
(defvar-local undo-auto-disable-boundaries nil
|
||||
"Disable the automatic addition of boundaries.
|
||||
|
||||
If set to non-nil, `undo-boundary' will not be called
|
||||
automatically in a buffer either at the end of a command, or as a
|
||||
result of `undo-auto-current-boundary-timer'.
|
||||
|
||||
When this is set to non-nil, it is important to ensure that
|
||||
`undo-boundary' is called frequently enough. Failure to do so
|
||||
will result in user-visible warnings that the situation is
|
||||
probably a bug.")
|
||||
|
||||
(defvar undo-auto--this-command-amalgamating nil
|
||||
"Non-nil if `this-command' should be amalgamated.
|
||||
This variable is set to nil by `undo-auto--boundaries' and is set
|
||||
|
@ -2899,8 +2887,7 @@ REASON describes the reason that the boundary is being added; see
|
|||
(dolist (b undo-auto--undoably-changed-buffers)
|
||||
(when (buffer-live-p b)
|
||||
(with-current-buffer b
|
||||
(unless undo-auto-disable-boundaries
|
||||
(undo-auto--ensure-boundary cause)))))
|
||||
(undo-auto--ensure-boundary cause))))
|
||||
(setq undo-auto--undoably-changed-buffers nil))
|
||||
|
||||
(defun undo-auto--boundary-timer ()
|
||||
|
@ -2925,10 +2912,10 @@ default values.")
|
|||
"Add an `undo-boundary' in appropriate buffers."
|
||||
(undo-auto--boundaries
|
||||
(let ((amal undo-auto--this-command-amalgamating))
|
||||
(setq undo-auto--this-command-amalgamating nil)
|
||||
(if amal
|
||||
'amalgamate
|
||||
'command))))
|
||||
(setq undo-auto--this-command-amalgamating nil)
|
||||
(if amal
|
||||
'amalgamate
|
||||
'command))))
|
||||
|
||||
(defun undo-auto-amalgamate ()
|
||||
"Amalgamate undo if necessary.
|
||||
|
|
|
@ -486,6 +486,11 @@ static void *pure_alloc (size_t, int);
|
|||
? ((x) + (y) - 1) - ((x) + (y) - 1) % (y) \
|
||||
: ((x) + (y) - 1) & ~ ((y) - 1))
|
||||
|
||||
/* Bug#23764 */
|
||||
#ifdef ALIGN
|
||||
# undef ALIGN
|
||||
#endif
|
||||
|
||||
/* Return PTR rounded up to the next multiple of ALIGNMENT. */
|
||||
|
||||
static void *
|
||||
|
|
|
@ -943,7 +943,7 @@ xd_get_connection_references (DBusConnection *connection)
|
|||
static DBusConnection*
|
||||
xd_lisp_dbus_to_dbus (Lisp_Object bus)
|
||||
{
|
||||
return (DBusConnection *) (intptr_t) XFASTINT (bus);
|
||||
return (DBusConnection *) XSAVE_POINTER (bus, 0);
|
||||
}
|
||||
|
||||
/* Return D-Bus connection address. BUS is either a Lisp symbol,
|
||||
|
@ -1186,7 +1186,7 @@ this connection to those buses. */)
|
|||
XD_SIGNAL1 (build_string ("Cannot add watch functions"));
|
||||
|
||||
/* Add bus to list of registered buses. */
|
||||
XSETFASTINT (val, (intptr_t) connection);
|
||||
val = make_save_ptr (connection);
|
||||
xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
|
||||
|
||||
/* Cleanup. */
|
||||
|
|
|
@ -185,8 +185,8 @@ If X is zero, both parts (SGNFCAND and EXP) are zero. */)
|
|||
}
|
||||
|
||||
DEFUN ("ldexp", Fldexp, Sldexp, 2, 2, 0,
|
||||
doc: /* Return X * 2**EXP, as a floating point number.
|
||||
EXP must be an integer. */)
|
||||
doc: /* Return SGNFCAND * 2**EXPONENT, as a floating point number.
|
||||
EXPONENT must be an integer. */)
|
||||
(Lisp_Object sgnfcand, Lisp_Object exponent)
|
||||
{
|
||||
CHECK_NUMBER (exponent);
|
||||
|
|
|
@ -6494,8 +6494,8 @@ REPLACEMENT is a face specification, i.e. one of the following:
|
|||
(3) a list in which each element has the form of (1) or (2).
|
||||
|
||||
List values for REPLACEMENT are merged to form the final face
|
||||
specification, with earlier entries taking precedence, in the same as
|
||||
as in the `face' text property.
|
||||
specification, with earlier entries taking precedence, in the same way
|
||||
as with the `face' text property.
|
||||
|
||||
Face-name remapping cycles are suppressed; recursive references use
|
||||
the underlying face instead of the remapped face. So a remapping of
|
||||
|
|
Loading…
Add table
Reference in a new issue