Skip to content

Commit 0319351

Browse files
author
Yuuki Harano
committed
Merge branch 'master' of https://github.com/emacs-mirror/emacs into pgtk
2 parents 0640b7c + 6daa80d commit 0319351

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+810
-464
lines changed

doc/emacs/msdos.texi

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,16 @@ non-@code{nil} value.
389389

390390
@vindex ls-lisp-verbosity
391391
The variable @code{ls-lisp-verbosity} controls the file attributes
392-
that @file{ls-lisp.el} displays. The value should be a list that
393-
contains one or more of the symbols @code{links}, @code{uid}, and
394-
@code{gid}. @code{links} means display the count of different file
395-
names that are associated with (a.k.a.@: @dfn{links to}) the file's
396-
data; this is only useful on NTFS volumes. @code{uid} means display
397-
the numerical identifier of the user who owns the file. @code{gid}
398-
means display the numerical identifier of the file owner's group. The
399-
default value is @code{(links uid gid)} i.e., all the 3 optional
400-
attributes are displayed.
392+
that @file{ls-lisp.el} displays. The value should be either
393+
@code{nil} or a list that contains one or more of the symbols
394+
@code{links}, @code{uid}, and @code{gid}. @code{links} means display
395+
the count of different file names that are associated with (a.k.a.@:
396+
@dfn{links to}) the file's data; this is only useful on NTFS volumes.
397+
@code{uid} means display the numerical identifier of the user who owns
398+
the file. @code{gid} means display the numerical identifier of the
399+
file owner's group. The default value is @code{(links uid gid)} i.e.,
400+
all the 3 optional attributes are displayed. The value @code{nil}
401+
means not to display any of these attributes.
401402

402403
@vindex ls-lisp-emulation
403404
The variable @code{ls-lisp-emulation} controls the flavor of the

doc/lispref/lists.texi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,9 +1212,8 @@ functions for sets include @code{memq} and @code{delq}, and their
12121212
@quotation
12131213
@b{Common Lisp note:} Common Lisp has functions @code{union} (which
12141214
avoids duplicate elements) and @code{intersection} for set operations.
1215-
Although standard GNU Emacs Lisp does not have them, the @file{cl-lib}
1216-
library provides versions.
1217-
@xref{Lists as Sets,,, cl, Common Lisp Extensions}.
1215+
In Emacs Lisp, variants of these facilities are provided by the
1216+
@file{cl-lib} library. @xref{Lists as Sets,,,cl,Common Lisp Extensions}.
12181217
@end quotation
12191218

12201219
@defun memq object list

doc/lispref/minibuf.texi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ However, if @var{read} is non-@code{nil}, @code{read-from-minibuffer}
141141
reads the text and returns the resulting Lisp object, unevaluated.
142142
(@xref{Input Functions}, for information about reading.)
143143

144+
@cindex future history in minibuffer input
144145
The argument @var{default} specifies default values to make available
145146
through the history commands. It should be a string, a list of
146147
strings, or @code{nil}. The string or strings become the minibuffer's
@@ -2307,7 +2308,9 @@ This command replaces the minibuffer contents with the value of the
23072308

23082309
@deffn Command next-history-element n
23092310
This command replaces the minibuffer contents with the value of the
2310-
@var{n}th more recent history element.
2311+
@var{n}th more recent history element. The position in the history
2312+
can go beyond the current position and invoke ``future history''
2313+
(@pxref{Text from Minibuffer}).
23112314
@end deffn
23122315

23132316
@deffn Command previous-matching-history-element pattern n
@@ -2338,7 +2341,9 @@ contents of the minibuffer before the point.
23382341
This function puts element of the minibuffer history in the
23392342
minibuffer. The argument @var{nabs} specifies the absolute history
23402343
position in descending order, where 0 means the current element and a
2341-
positive number @var{n} means the @var{n}th previous element.
2344+
positive number @var{n} means the @var{n}th previous element. NABS
2345+
being a negative number -@var{n} means the @var{n}th entry of ``future
2346+
history.''
23422347
@end deffn
23432348

23442349
@node Minibuffer Windows

doc/misc/efaq-w32.texi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ systems.
125125
@cindex Windows, versions
126126
@cindex supported versions of Windows
127127

128-
Emacs @value{EMACSVER} is known to run on all versions of Windows from
129-
Windows 98 and Windows NT 4.0 through to Windows 8.1. The Windows
130-
port is built using the Win32 API and supports most features of the X
131-
version, including variable width fonts, images and tooltips.
128+
Emacs @value{EMACSVER} is known to run on all versions of Windows 9X
129+
from Windows 98 onward, and all versions of the NT family starting
130+
from NT 4.0; this includes all the modern versions from Windows XP and
131+
on. The Windows port is built using the Win32 API and supports most
132+
features of the X version, including variable width fonts, images and
133+
tooltips.
132134

133135
Emacs on Windows can be compiled as either a 32-bit or a 64-bit
134136
executable, using the MinGW GCC compiler and development tools.

etc/NEWS

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,9 @@ directories in the destination.
846846
*** The non-nil value of 'dired-dwim-target' uses one of the most recently
847847
visited windows with a Dired buffer instead of the next window.
848848

849+
*** When the new user option 'dired-vc-rename-file' is non-nil,
850+
Dired performs file renaming using underlying version control system.
851+
849852
** Find-Dired
850853

851854
*** New user option 'find-dired-refine-function'.
@@ -1213,10 +1216,11 @@ A new command 'xref-revert-buffer' is bound to 'g'.
12131216
** Icomplete
12141217

12151218
+++
1216-
*** A new minor mode based on Icomplete, Fido mode, is made available.
1217-
The point of this mode, named after "Fake Ido", is to recover much of
1218-
the functionality that still separated the popular ido-mode from
1219-
Icomplete, while still cooperating fully with all of Emacs's
1219+
*** New minor mode Fido mode.
1220+
This mode is based on Icomplete, and its name stands for "Fake Ido".
1221+
The point of this mode is to be an ido-mode workalike, but provide
1222+
most of the functionality present in Icomplete that is not in
1223+
ido-mode, while being much more compatible with all of Emacs's
12201224
completion facilities.
12211225

12221226
** Ecomplete
@@ -1441,6 +1445,11 @@ unescaping text.
14411445
The maximum level is used by default; customize
14421446
'font-lock-maximum-decoration' to tone down the decoration.
14431447

1448+
---
1449+
*** New user option 'python-pdbtrack-kill-buffers'.
1450+
If non-nil, the default, buffers opened during pdbtracking session are
1451+
killed when pdbtracking session is finished.
1452+
14441453
** Help
14451454

14461455
---

lisp/dired-aux.el

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,11 +1635,26 @@ If `ask', ask for user confirmation."
16351635
dired-create-files-failures)
16361636
(dired-log "Can't set date on %s:\n%s\n" from err))))))
16371637

1638+
(defcustom dired-vc-rename-file nil
1639+
"Whether Dired should register file renaming in underlying vc system.
1640+
If nil, use default `rename-file'.
1641+
If non-nil and the renamed files are under version control,
1642+
rename them using `vc-rename-file'."
1643+
:type '(choice (const :tag "Use rename-file" nil)
1644+
(const :tag "Use vc-rename-file" t))
1645+
:group 'dired
1646+
:version "27.1")
1647+
16381648
;;;###autoload
16391649
(defun dired-rename-file (file newname ok-if-already-exists)
16401650
(dired-handle-overwrite newname)
16411651
(dired-maybe-create-dirs (file-name-directory newname))
1642-
(rename-file file newname ok-if-already-exists) ; error is caught in -create-files
1652+
(if (and dired-vc-rename-file
1653+
(vc-backend file)
1654+
(ignore-errors (vc-responsible-backend newname)))
1655+
(vc-rename-file file newname)
1656+
;; error is caught in -create-files
1657+
(rename-file file newname ok-if-already-exists))
16431658
;; Silently rename the visited file of any buffer visiting this file.
16441659
(and (get-file-buffer file)
16451660
(with-current-buffer (get-file-buffer file)

lisp/emacs-lisp/easymenu.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@ This is expected to be bound to a mouse event."
183183
(when symbol
184184
(set symbol keymap)
185185
(defalias symbol
186-
`(lambda (event) ,doc (interactive "@e")
186+
(lambda (event) (:documentation doc) (interactive "@e")
187187
;; FIXME: XEmacs uses popup-menu which calls the binding
188188
;; while x-popup-menu only returns the selection.
189189
(x-popup-menu event
190-
(or (and (symbolp ,symbol)
190+
(or (and (symbolp symbol)
191191
(funcall
192-
(or (plist-get (get ,symbol 'menu-prop)
192+
(or (plist-get (get symbol 'menu-prop)
193193
:filter)
194194
'identity)
195-
(symbol-function ,symbol)))
196-
,symbol)))))
195+
(symbol-function symbol)))
196+
symbol)))))
197197
(dolist (map (if (keymapp maps) (list maps) maps))
198198
(define-key map
199199
(vector 'menu-bar (easy-menu-intern (car menu)))
@@ -475,7 +475,7 @@ When non-nil, NOEXP indicates that CALLBACK cannot be an expression
475475
;; `functionp' is probably not needed.
476476
(functionp callback) noexp)
477477
callback
478-
`(lambda () (interactive) ,callback)))
478+
(lambda () (interactive) callback)))
479479
command))
480480

481481
;;;###autoload

lisp/emacs-lisp/package.el

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,7 +2767,7 @@ Letters do not insert themselves; instead, they are commands.
27672767
(setq tabulated-list-sort-key (cons "Status" nil))
27682768
(add-hook 'tabulated-list-revert-hook #'package-menu--refresh nil t)
27692769
(tabulated-list-init-header)
2770-
(setq revert-buffer-function 'package-menu--refresh)
2770+
(setq revert-buffer-function 'package-menu--refresh-contents)
27712771
(setf imenu-prev-index-position-function
27722772
#'package--imenu-prev-index-position-function)
27732773
(setf imenu-extract-index-name-function
@@ -2791,6 +2791,11 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
27912791
(defvar package--emacs-version-list (version-to-list emacs-version)
27922792
"The value of variable `emacs-version' as a list.")
27932793

2794+
(defun package--ensure-package-menu-mode ()
2795+
"Signal a user-error if major mode is not `package-menu-mode'."
2796+
(unless (derived-mode-p 'package-menu-mode)
2797+
(user-error "The current buffer is not a Package Menu")))
2798+
27942799
(defun package--incompatible-p (pkg &optional shallow)
27952800
"Return non-nil if PKG has no chance of being installable.
27962801
PKG is a `package-desc' object.
@@ -2866,8 +2871,7 @@ Installed obsolete packages are always displayed.")
28662871
(defun package-menu-toggle-hiding ()
28672872
"In Package Menu, toggle visibility of obsolete available packages."
28682873
(interactive)
2869-
(unless (derived-mode-p 'package-menu-mode)
2870-
(user-error "The current buffer is not a Package Menu"))
2874+
(package--ensure-package-menu-mode)
28712875
(setq package-menu--hide-packages
28722876
(not package-menu--hide-packages))
28732877
(if package-menu--hide-packages
@@ -3166,7 +3170,7 @@ Return (PKG-DESC [NAME VERSION STATUS DOC])."
31663170
(defvar package-menu--old-archive-contents nil
31673171
"`package-archive-contents' before the latest refresh.")
31683172

3169-
(defun package-menu--refresh (&optional _arg _noconfirm)
3173+
(defun package-menu--refresh-contents (&optional _arg _noconfirm)
31703174
"In Package Menu, download the Emacs Lisp package archive.
31713175
Fetch the contents of each archive specified in
31723176
`package-archives', and then refresh the package menu. Signal a
@@ -3175,8 +3179,7 @@ user-error if there is already a refresh running asynchronously.
31753179
`package-menu-mode' sets `revert-buffer-function' to this
31763180
function. The args ARG and NOCONFIRM, passed from
31773181
`revert-buffer', are ignored."
3178-
(unless (derived-mode-p 'package-menu-mode)
3179-
(user-error "The current buffer is not a Package Menu"))
3182+
(package--ensure-package-menu-mode)
31803183
(when (and package-menu-async package--downloads-in-progress)
31813184
(user-error "Package refresh is already in progress, please wait..."))
31823185
(setq package-menu--old-archive-contents package-archive-contents)
@@ -3188,6 +3191,7 @@ function. The args ARG and NOCONFIRM, passed from
31883191
"Hide a package under point in Package Menu.
31893192
If optional arg BUTTON is non-nil, describe its associated package."
31903193
(interactive)
3194+
(package--ensure-package-menu-mode)
31913195
(declare (interactive-only "change `package-hidden-regexps' instead."))
31923196
(let* ((name (when (derived-mode-p 'package-menu-mode)
31933197
(concat "\\`" (regexp-quote (symbol-name (package-desc-name
@@ -3221,6 +3225,7 @@ If optional arg BUTTON is non-nil, describe its associated package."
32213225
(defun package-menu-mark-delete (&optional _num)
32223226
"Mark a package for deletion and move to the next line."
32233227
(interactive "p")
3228+
(package--ensure-package-menu-mode)
32243229
(if (member (package-menu-get-status)
32253230
'("installed" "dependency" "obsolete" "unsigned"))
32263231
(tabulated-list-put-tag "D" t)
@@ -3229,24 +3234,28 @@ If optional arg BUTTON is non-nil, describe its associated package."
32293234
(defun package-menu-mark-install (&optional _num)
32303235
"Mark a package for installation and move to the next line."
32313236
(interactive "p")
3237+
(package--ensure-package-menu-mode)
32323238
(if (member (package-menu-get-status) '("available" "avail-obso" "new" "dependency"))
32333239
(tabulated-list-put-tag "I" t)
32343240
(forward-line)))
32353241

32363242
(defun package-menu-mark-unmark (&optional _num)
32373243
"Clear any marks on a package and move to the next line."
32383244
(interactive "p")
3245+
(package--ensure-package-menu-mode)
32393246
(tabulated-list-put-tag " " t))
32403247

32413248
(defun package-menu-backup-unmark ()
32423249
"Back up one line and clear any marks on that package."
32433250
(interactive)
3251+
(package--ensure-package-menu-mode)
32443252
(forward-line -1)
32453253
(tabulated-list-put-tag " "))
32463254

32473255
(defun package-menu-mark-obsolete-for-deletion ()
32483256
"Mark all obsolete packages for deletion."
32493257
(interactive)
3258+
(package--ensure-package-menu-mode)
32503259
(save-excursion
32513260
(goto-char (point-min))
32523261
(while (not (eobp))
@@ -3277,6 +3286,7 @@ If optional arg BUTTON is non-nil, describe its associated package."
32773286
"Show short key binding help for `package-menu-mode'.
32783287
The full list of keys can be viewed with \\[describe-mode]."
32793288
(interactive)
3289+
(package--ensure-package-menu-mode)
32803290
(message (mapconcat #'package--prettify-quick-help-key
32813291
package--quick-help-keys "\n")))
32823292

@@ -3285,6 +3295,7 @@ The full list of keys can be viewed with \\[describe-mode]."
32853295

32863296
(defun package-menu-get-status ()
32873297
"Return status text of package at point in Package Menu."
3298+
(package--ensure-package-menu-mode)
32883299
(let* ((id (tabulated-list-get-id))
32893300
(entry (and id (assoc id tabulated-list-entries))))
32903301
(if entry
@@ -3340,8 +3351,6 @@ corresponding to the newer version."
33403351
(defun package-menu--mark-upgrades-1 ()
33413352
"Mark all upgradable packages in the Package Menu.
33423353
Implementation of `package-menu-mark-upgrades'."
3343-
(unless (derived-mode-p 'package-menu-mode)
3344-
(error "The current buffer is not a Package Menu"))
33453354
(setq package-menu--mark-upgrades-pending nil)
33463355
(let ((upgrades (package-menu--find-upgrades)))
33473356
(if (null upgrades)
@@ -3373,6 +3382,7 @@ If there's an async refresh operation in progress, the flags will
33733382
be placed as part of `package-menu--post-refresh' instead of
33743383
immediately."
33753384
(interactive)
3385+
(package--ensure-package-menu-mode)
33763386
(if (not package--downloads-in-progress)
33773387
(package-menu--mark-upgrades-1)
33783388
(setq package-menu--mark-upgrades-pending t)
@@ -3466,8 +3476,7 @@ Packages marked for installation are downloaded and installed;
34663476
packages marked for deletion are removed.
34673477
Optional argument NOQUERY non-nil means do not ask the user to confirm."
34683478
(interactive)
3469-
(unless (derived-mode-p 'package-menu-mode)
3470-
(error "The current buffer is not in Package Menu mode"))
3479+
(package--ensure-package-menu-mode)
34713480
(let (install-list delete-list cmd pkg-desc)
34723481
(save-excursion
34733482
(goto-char (point-min))
@@ -3646,7 +3655,7 @@ short description."
36463655
(package-menu-mode)
36473656

36483657
;; Fetch the remote list of packages.
3649-
(unless no-fetch (package-menu--refresh))
3658+
(unless no-fetch (package-menu--refresh-contents))
36503659

36513660
;; If we're not async, this would be redundant.
36523661
(when package-menu-async
@@ -3693,6 +3702,7 @@ Statuses available include \"incompat\", \"available\",
36933702
(interactive
36943703
(list (completing-read-multiple
36953704
"Keywords (comma separated): " (package-all-keywords))))
3705+
(package--ensure-package-menu-mode)
36963706
(package-show-package-list t (if (stringp keyword)
36973707
(list keyword)
36983708
keyword)))
@@ -3702,6 +3712,7 @@ Statuses available include \"incompat\", \"available\",
37023712
Show only those items whose name matches the regular expression
37033713
NAME. If NAME is nil or the empty string, show all packages."
37043714
(interactive (list (read-from-minibuffer "Filter by name (regexp): ")))
3715+
(package--ensure-package-menu-mode)
37053716
(if (or (not name) (string-empty-p name))
37063717
(package-show-package-list t nil)
37073718
;; Update `tabulated-list-entries' so that it contains all
@@ -3719,6 +3730,7 @@ NAME. If NAME is nil or the empty string, show all packages."
37193730
(defun package-menu-clear-filter ()
37203731
"Clear any filter currently applied to the \"*Packages*\" buffer."
37213732
(interactive)
3733+
(package--ensure-package-menu-mode)
37223734
(package-menu--generate t t))
37233735

37243736
(defun package-list-packages-no-fetch ()

0 commit comments

Comments
 (0)