9939c435c1 Return the correct suffix in eww-make-unique-file-name
17fa17be3d Save bookmarks by using `write-file' (bug#12507)
2cdf1fd261 Fix filing messages when 'rmail-output-reset-deleted-flag'...
a72db8ab8b Make file copying in tramp-gvfs more robust
f31cacd1ff Revert "Fix incorrect handling of module runtime and envir...
cdc632fbe6 Fix incorrect handling of module runtime and environment p...
c9160bda78 CC Mode: Fix error in cache handling. This fixes bug #43481
Go back to using `write-file' to save bookmarks, instead of using
`write-region'. This means numbered backups of the bookmark file may
get made again, depending on the value of `bookmark-version-control'.
Thanks especially to Drew Adams and Eli Zaretskii for their
persistence in tracking down information relevant to this change.
Rewriting bookmark-bmenu-mode to be based on 'tabulated-list-mode'
allows us to greatly simplify the code in several cases. In addition,
we get some features for free, such as sorting by column.
The only functional step backwards is that we no longer support the
optional "inline" header line, a bookmark.el-specific feature to have
a header without using 'header-line-format'. This feature is believed
to be not very useful or widely used.
* lisp/bookmark.el (tabulated-list): Require.
(bookmark-bmenu-mode): Inherit from 'tabulated-list-mode' instead of
'special-mode' and make the necessary changes to support that.
(bookmark-bmenu-mode-map): Inherit from 'tabulated-list-mode-map'
instead of 'special-mode-map'. Remove now duplicate key bindings.
(bookmark-bmenu--revert): New function to show the bookmark list using
'tabulated-list-mode'.
(bookmark-bmenu-list): Simplify by using above new function.
(bookmark-bmenu-bookmark): Adapt to 'tabulated-list-mode'.
(bookmark-bmenu--name-predicate)
(bookmark-bmenu--file-predicate): New functions used by
'tabulated-list-mode' to sort.
(bookmark-bmenu-set-header): Redefine as obsolete function alias for
'tabulated-list-init-header'.
(bookmark-bmenu-toggle-filenames, bookmark-bmenu-show-filenames)
(bookmark-bmenu-hide-filenames, bookmark-bmenu-mark)
(bookmark-bmenu-mark-all, bookmark-bmenu-unmark-all)
(bookmark-bmenu-delete-all, bookmark-bmenu-unmark)
(bookmark-bmenu-delete, bookmark-bmenu-delete-backwards): Simplify now
that we can depend on 'tabulated-list-mode' to do more work.
(bookmark-bmenu-use-header-line)
(bookmark-bmenu-inline-header-height): Declare variables relating to
the now unsupported "inline" header obsolete.
(bookmark-bmenu-ensure-position)
(bookmark-bmenu-execute-deletions): Remove code to handle "inline" header.
* test/lisp/bookmark-tests.el
(bookmark-test-bmenu-edit-annotation/show-annotation)
(bookmark-test-bmenu-unmark, bookmark-test-bmenu-mark): Update tests
for minor changes when using 'tabulated-list-mode'.
This reverts commit de4f347901.
read-file-name already displays a long path when given a default
(like INITIAL in many other prompting functions), so using
format-prompt here is superfluous.
Thanks to Karl Fogel for pre-commit review.
* lisp/bookmark.el (bookmark-delete-all): New function to delete all
bookmarks.
(bookmark-bmenu-mark-all): New function to mark all bookmarks in the
bookmark list buffer.
(bookmark-bmenu-unmark-all): New function to unmark all bookmarks in
the bookmark list buffer.
(bookmark-bmenu-delete-all): New function to mark for deletion all
bookmarks in the bookmark list buffer.
(bookmark-map): Map "D" to `bookmark-delete-all'.
(bookmark-bmenu-mode-map): New mappping for "M" to
`bookmark-bmenu-mark-all'.
(bookmark-bmenu-mode-map): New mappping for "U" to
`bookmark-bmenu-unmark-all'.
(bookmark-bmenu-mode-map): New mappping for "D" to
`bookmark-bmenu-delete-all'.
(bookmark-bmenu-mark-all): New bookmark menu to
`bookmark-delete-all'.
(easy-menu-define): New bookmark menu to `bookmark-bmenu-mark-all'.
(easy-menu-define): New bookmark menu to
`bookmark-bmenu-unmark-all'.
(easy-menu-define): New bookmark menu to
`bookmark-bmenu-delete-all'.
(bookmark-bmenu-select): Update docstring to include a reference to
`bookmark-bmenu-mark-all'.
(bookmark-bmenu-mode): Update docstring. Add/Update description:
`bookmark-bmenu-mark-all', `bookmark-bmenu-delete-all',
`bookmark-bmenu-execute-deletions', and `bookmark-bmenu-unmark-all'.
* test/lisp/bookmark-resources/test-list.bmk: New bookmark file to
test a list of bookmarks.
* test/lisp/bookmark-tests.el (bookmark-tests-bookmark-file-list): New
reference to the bookmark file used for testing a list of bookmarks.
(bookmark-tests-bookmark-list-0, bookmark-tests-bookmark-list-1,
bookmark-tests-bookmark-list-2): New cached values for testing a
list of bookmark.
(bookmark-tests-cache-timestamp-list): New variable to set
`bookmark-bookmarks-timestamp'.
(with-bookmark-test-list): New macro environment to test a list of
bookmarks.
(with-bookmark-test-file-list): New macro environment to test a list
of bookmarks with example.txt.
(with-bookmark-bmenu-test-list): New macro environment to test
functions about a list of bookmarks from `bookmark-bmenu-list'.
(bookmark-tests-all-names-list, bookmark-tests-get-bookmark-list,
bookmark-tests-get-bookmark-record-list): New functions to test the
records of the list of bookmarks.
(bookmark-tests-make-record-list): New function to test the creation
of a record from example.txt with a list of bookmarks loaded.
(bookmark-tests-delete-all): New function to test
`bookmark-delete-all'.
(bookmark-test-bmenu-any-marks-list): New function to test
`bookmark-bmenu-any-marks' with a list of bookmarks.
(bookmark-test-bmenu-mark-all): New function to test
`bookmark-bmenu-mark-all'.
(bookmark-test-bmenu-unmark-all): New function to test
`bookmark-bmenu-unmark-all'.
(bookmark-test-bmenu-delete-all): New function to test
`bookmark-bmenu-delete-all'.
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp)
(save-place-alist-to-file): Delimit file-local variables on the -*-
line with semicolons.
* lisp/files.el (auto-mode-alist): Use shy regexp group.
Fixes: bug#40573
The new mode can be used stand-alone or inherited from by modes
intended to edit programs. The existing emacs-lisp-mode and lisp-mode
are examples.
Thanks to Juri Linkov and Basil L. Contovounesios for researching some
data files in Emacs that can be automatically set to use the new mode.
* lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and
".dir-locals-2"
* lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode.
(lisp-mode): Inherit from lisp-data-mode. Set special lisp-mode
stuff here.
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from
lisp-data-mode.
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Use lisp-data-mode.
* lisp/saveplace.el (save-place-alist-to-file): Use
lisp-data-mode.
* lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode.
* lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.
* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use
lisp-data-mode.
* etc/NEWS: Mention lisp-data-mode.
* doc/lispref/modes.texi (Example Major Modes): Update example.
There are two entry points to bookmark-edit-annotation-mode: the first
when we add a bookmark and bookmark-use-annotations is non-nil; the
second when bookmark-bmenu-edit-annotation is run from the bookmark
list. When editing is concluded, in the first case, we should just
quit window. In the second case, we should instead return to the
bookmark list.
* lisp/bookmark.el (text-property-search): Require.
(bookmark-annotation-name): Make buffer-local and improve doc string.
(bookmark--annotation-from-bookmark-list): New buffer-local variable.
(bookmark-edit-annotation): New argument from-bookmark-list sets
bookmark--annotation-from-bookmark-list.
(bookmark-bmenu-edit-annotation): Call bookmark-edit-annotation with
argument from-bookmark-list set to t.
(bookmark-send-edited-annotation): When editing originated in the
bookmark list, restore focus to bookmark list and move point back to
edited bookmark. (Bug#20150)
(bookmark-edit-annotation-mode): Fix typo.
(bookmark-bmenu-buffer): New variable.
(bookmark-bmenu-surreptitiously-rebuild-list)
(bookmark-bmenu-list): Use it.
* test/lisp/bookmark-tests.el (with-bookmark-bmenu-test): New macro.
(bookmark-tests-set/bookmark-use-annotations-t)
(bookmark-bmenu-edit-annotation/show-annotation)
(bookmark-bmenu-send-edited-annotation)
(bookmark-bmenu-send-edited-annotation/restore-focus): New test cases.
* test/lisp/bookmark-resources/example.txt:
* test/lisp/bookmark-resources/test.bmk:
* test/lisp/bookmark-tests.el: New files.
* lisp/bookmark.el: Minor cleanups.
(bookmark-insert-annotation): Signal error on invalid bookmark.
(bookmark-write-file): Add newline at end of file.
* lisp/bookmark.el (bookmarks-already-loaded): Move obsolete alias
definition to before its referent.
In toplevel form:
bookmark.el:279:1:Warning: Alias for `bookmark-bookmarks-timestamp' should be
declared before its referent
(bookmark-watch-bookmark-file): New user variable.
(bookmark-alist): Fix docstring.
(bookmark-bookmarks-timestamp): Renamed from bookmarks-already-loaded.
(bookmark-maybe-load-default-file, bookmark-save, bookmark-load):
Use bookmark-bookmarks-timestamp.
(bookmark-bmenu-mode-map): Define menu bar menu.
(bookmark-show-annotation, bookmark-show-all-annotations):
Make bookmarks buffer read-only.
(bookmark-bmenu-save): Use call-interactively.
* lisp/bookmark.el (bookmark-old-default-file):
Redefine as obsolete variable alias for 'bookmark-default-file'.
(bookmark-maybe-load-default-file): Don't try to rename file
'bookmark-old-default-file' (~/.emacs-bkmrks) to new name (Bug#35940).
* lisp/bookmark.el (bookmark-maybe-message):
Redefine as obsolete function alias for 'message'.
(bookmark-write-file): Use a progress reporter.
(bookmark-load-file): Use a progress reporter.
The convention is that a file with Author: but not Maintainer:
means the author is a maintainer, which makes it confusing
when a file lists the same person as author and maintainer.
Avoid the confusion by removing the duplicate Maintainer: line.
* lisp/bookmark.el (bookmark-jump-other-frame): New function.
Bind in bookmark-map.
(bookmark-bmenu-other-frame): New function.
Bind in bookmark-bmenu-mode-map.
Patch applied by Karl Fogel.
bd52f37 (origin/emacs-26) ; Fix last change: only MinGW runtime 5.0.2...
024d20f Fix compilation with mingw.org's MinGW 5.x headers
38b6748 Update the list of special forms in the ELisp manual
8579105 Don't fail to indent-sexp before a full sexp (Bug#31984)
d24c5f2 Fix calls to modifications hooks in replace-buffer-contents
71a9151 * src/character.c (char_width): Support glyphs with faces. (...
0feb673 Display raw bytes as belonging to 'eight-bit' charset
2e2f00f ; * doc/emacs/mule.texi (International Chars): Fix last change.
00561b5 Fix inaccurate text in the user manual
5cfb7a3 Copyedits in tramp.texi, improved example with bash's readline
6f8f358 Minor Tramp doc update
2585fcb File Shadowing is not available on MS Windows
39da592 ; Minor markup change in indent.texi
2f00ffe ; bookmark-jump: Add comment about last change.
f64c277 (origin/emacs-26) Let bookmark-jump override window-point (Bu...
1208aaa Omit keymap from subword-mode docstring (Bug#32212)
2b70b54 Prevent line-mode term from showing user passwords
5de4441 Check for special filenames in eshell (Bug#30724)
1b4b965 Fix indent-sexp of #s(...) (Bug#31984)
59e8533 Add save-match-data to abbreviate-file-name (Bug#32201)
47f75b1 Fix last change in editfns.c
671dc5a Fix calls to buffer modification hooks from replace-buffer-co...
cc4ceed ; etc/NEWS: Remove unnecessary reference to a bug number.
e0f33ea Fix Bug#32226
7308fa0 Improve doc strings of several variables in keyboard.c
* lisp/bookmark.el (bookmark-jump): Use pop-to-buffer-same-window
instead of switch-to-buffer, the latter obeys
switch-to-buffer-preserve-window-point and so loses the bookmark's
point.
3434edc731 Enlarge DUMPED_HEAP_SIZE for 64-bit Windows builds
36bbdfc017 Update Unicode data files to version 11.0.0 of Unicode
b7b7a5f4f3 * etc/NEWS: Belatedly call out vc-hg changes in v26.1. (B...
5b6f8b54d1 Clarify the documentation of 'dired-recursive-deletes'
9db97b49cd ; * etc/DEBUG: Add information about debugging libXft prob...
0214ffbe60 Clarify doc string of 'update-glyphless-char-display'
ef35d405b1 Clarify subtle issues with 'eq' in byte-compiled code
c6ef3c8321 Make cl-print respect print-quoted (bug#31649)
26b52ac40e Fix unexpected jumps of window-point in 'set-window-config...
4af077ab4d * etc/emacs.appdata.xml: Update Emacs screenshot.
e5ab25deae Fix cursor movement by 'next-logical-line' after 'next-line'
d20beef5f1 Fix prompt in bookmark.el (Bug#24726)
c57e7eaae8 Improve documentation of 'empty' whitespace-style
# Conflicts:
# etc/NEWS
* lisp/bookmark.el (bookmark-set-internal): Conform to the standard
default prompt format (per `minibuffer-electric-default-mode') which
does not use a colon.