1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00
Commit Graph

291 Commits

Author SHA1 Message Date
Stefan Kangas
c9758ba48a * lisp/bookmark.el: Doc fix. 2020-12-14 15:11:05 +01:00
Glenn Morris
6c6d06c3ee Merge from origin/emacs-27
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
2020-12-01 07:50:09 -08:00
Karl Fogel
17fa17be3d Save bookmarks by using `write-file' (bug#12507)
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.
2020-11-28 18:17:46 -06:00
Stefan Kangas
61dca6e92a Don't quote lambdas in several places
* lisp/align.el (align-highlight-rule):
* lisp/bookmark.el (bookmark-maybe-sort-alist):
* lisp/emacs-lisp/advice.el (ad-read-advice-name)
(ad-retrieve-args-form, ad-make-hook-form, defadvice)
(ad-with-originals):
* lisp/foldout.el (foldout-inhibit-key-bindings):
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-maybe-sort-alist):
* lisp/mail/rfc822.el (rfc822-addresses-1):
* lisp/net/eudcb-ldap.el (eudc-ldap-cleanup-record-simple):
* lisp/net/net-utils.el (network-connection-to-service):
* lisp/net/socks.el (socks-build-auth-list):
* lisp/org/ox-odt.el (org-odt--image-size):
* lisp/pcomplete.el (pcomplete-command-completion-function)
(pcomplete-default-completion-function, pcomplete-opt):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-tags-hier-init, cperl-tags-treeify)
(cperl-next-interpolated-REx, cperl-time-fontification):
* lisp/shadowfile.el (shadow-copy-files, shadow-shadows-of-1)
(shadow-save-buffers-kill-emacs):
* lisp/strokes.el (strokes-renormalize-to-grid):
* lisp/tempo.el (tempo-insert, tempo-forward-mark)
(tempo-backward-mark):
* lisp/textmodes/artist.el (artist-submit-bug-report):
* lisp/textmodes/ispell.el (ispell-complete-word):
* lisp/url/url-auth.el (url-get-authentication):
* lisp/url/url-cache.el (url-cache-create-filename-human-readable):
* lisp/vcursor.el (vcursor-find-window):
* test/lisp/textmodes/reftex-tests.el
(reftex-parse-bibtex-entry-test): Don't quote lambdas.
2020-11-14 17:04:23 +01:00
Stefan Kangas
61e51fee9c Base bookmark-bmenu-mode on tabulated-list-mode (Bug#39293)
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'.
2020-10-17 17:56:44 +02:00
Lars Ingebrigtsen
9ca83cdd79 Revert "Use format-prompt in read-file-name calls that have a default"
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.
2020-09-13 14:58:24 +02:00
Lars Ingebrigtsen
de4f347901 Use format-prompt in read-file-name calls that have a default
* lisp/xwidget.el (xwidget-webkit-save-as-file):
* lisp/vc/vc.el (vc-backend-for-registration, vc-delete-file)
(vc-rename-file):
* lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file):
* lisp/vc/diff-mode.el (diff-tell-file-name):
* lisp/progmodes/etags.el (visit-tags-table)
(visit-tags-table-buffer):
* lisp/misearch.el (multi-isearch-read-files):
* lisp/mail/rmailmm.el (rmail-mime-save):
* lisp/help-fns.el (doc-file-to-man, doc-file-to-info):
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-load):
* lisp/files.el (write-file, basic-save-buffer):
* lisp/dired.el (dired-read-dir-and-switches):
* lisp/bookmark.el (bookmark-save, bookmark-load):
* lisp/abbrev.el (write-abbrev-file, abbrev-edit-save-to-file):
Use format-prompt in read-file-name calls that have a default.
2020-09-07 22:10:06 +02:00
Lars Ingebrigtsen
7d927fa8dd Use `format-prompt' when prompting with default values
* lisp/woman.el (woman-file-name):
* lisp/wid-edit.el (widget-file-prompt-value)
(widget-coding-system-prompt-value):
* lisp/w32-fns.el (w32-set-system-coding-system):
* lisp/vc/vc.el (vc-print-root-log):
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/emerge.el (emerge-read-file-name):
* lisp/vc/ediff.el (ediff-directories)
(ediff-directory-revisions, ediff-directories3)
(ediff-merge-directories, )
(ediff-merge-directories-with-ancestor)
(ediff-merge-directory-revisions)
(ediff-merge-directory-revisions-with-ancestor)
(ediff-merge-revisions, ediff-merge-revisions-with-ancestor)
(ediff-revision):
* lisp/vc/ediff-util.el (ediff-toggle-regexp-match):
* lisp/vc/ediff-mult.el (ediff-filegroup-action):
* lisp/vc/add-log.el (prompt-for-change-log-name):
* lisp/textmodes/table.el (table-insert-row-column)
(table-span-cell, table-split-cell-horizontally)
(table-split-cell, table-justify, table-generate-source)
(table-insert-sequence, table-capture)
(table--read-from-minibuffer, table--query-justification):
* lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help):
* lisp/textmodes/reftex-ref.el (reftex-goto-label):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/textmodes/css-mode.el (css-lookup-symbol):
* lisp/term.el (serial-read-name, serial-read-speed):
* lisp/speedbar.el (speedbar-change-initial-expansion-list):
* lisp/simple.el (previous-matching-history-element)
(set-variable):
* lisp/ses.el (ses-read-cell, ses-set-column-width):
* lisp/replace.el (query-replace-read-from)
(occur-read-primary-args):
* lisp/rect.el (string-rectangle, string-insert-rectangle):
* lisp/progmodes/tcl.el (tcl-help-on-word):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/python.el (python-eldoc-at-point):
* lisp/progmodes/octave.el (octave-completing-read)
(octave-update-function-file-comment, octave-insert-defun):
* lisp/progmodes/inf-lisp.el (lisp-symprompt):
* lisp/progmodes/cperl-mode.el (cperl-info-on-command)
(cperl-perldoc):
* lisp/progmodes/compile.el (compilation-find-file):
* lisp/net/rcirc.el (rcirc-prompt-for-encryption):
* lisp/net/eww.el (eww):
* lisp/net/browse-url.el (browse-url-with-browser-kind):
* lisp/man.el (man):
* lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
* lisp/mail/mailalias.el (build-mail-aliases):
* lisp/mail/mailabbrev.el (merge-mail-abbrevs)
(rebuild-mail-abbrevs):
* lisp/locate.el (locate-prompt-for-search-string):
* lisp/isearch.el (isearch-occur):
* lisp/international/ogonek.el (ogonek-read-encoding)
(ogonek-read-prefix):
* lisp/international/mule.el (read-buffer-file-coding-system)
(set-terminal-coding-system, set-keyboard-coding-system)
(set-next-selection-coding-system, recode-region):
* lisp/international/mule-cmds.el ()
(universal-coding-system-argument, search-unencodable-char)
(select-safe-coding-system-interactively):
* lisp/info.el (Info-search, Info-search-backward, Info-menu):
* lisp/info-look.el (info-lookup-interactive-arguments):
* lisp/imenu.el (imenu--completion-buffer):
* lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode):
* lisp/hi-lock.el (hi-lock-unface-buffer)
(hi-lock-read-face-name):
* lisp/help.el (view-emacs-news, where-is):
* lisp/help-fns.el (describe-variable, describe-symbol)
(describe-keymap):
* lisp/gnus/mm-decode.el (mm-save-part):
* lisp/gnus/gnus-sum.el (gnus-summary-browse-url):
* lisp/gnus/gnus-group.el (gnus-group--read-bug-ids)
(gnus-group-set-current-level):
* lisp/frame.el (make-frame-on-monitor)
(close-display-connection, select-frame-by-name):
* lisp/format.el (format-encode-buffer, format-encode-region):
* lisp/files.el (recode-file-name):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-value, )
(read-file-local-variable-mode):
* lisp/ffap.el (ffap-menu-ask):
* lisp/faces.el (face-read-string):
* lisp/facemenu.el (facemenu-set-charset):
* lisp/erc/erc-dcc.el (erc-dcc-do-GET-command):
* lisp/emulation/edt-mapper.el (edt-mapper):
* lisp/emacs-lisp/trace.el (trace--read-args)
(trace-function-foreground, trace-function-background):
* lisp/emacs-lisp/smie.el (smie-config-set-indent):
* lisp/emacs-lisp/re-builder.el (reb-change-syntax):
* lisp/emacs-lisp/package.el (describe-package):
* lisp/emacs-lisp/find-func.el (read-library-name)
(find-function-read):
* lisp/emacs-lisp/ert.el (ert-read-test-name)
(ert-run-tests-interactively):
* lisp/emacs-lisp/disass.el (disassemble):
* lisp/emacs-lisp/debug.el (debug-on-entry)
(debug-on-variable-change):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-read-regexp):
* lisp/dired-x.el (dired--mark-suffix-interactive-spec):
* lisp/dired-aux.el (dired-diff):
* lisp/cus-edit.el (custom-variable-prompt, customize-mode)
(customize-changed-options):
* lisp/completion.el (interactive-completion-string-reader):
* lisp/calendar/timeclock.el (timeclock-ask-for-project):
* lisp/calc/calcalg3.el (calc-get-fit-variables):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-bin.el (calc-word-size):
* lisp/bookmark.el (bookmark-set-internal):
* lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for
prompting (bug#12443).
2020-09-06 16:56:54 +02:00
Stefan Kangas
874ba85363 Remove many items obsolete since Emacs 23.1
Emacs 23.1 was five major releases and over a decade ago.
This list can be reviewed before to the next release, but for now
hopefully this motivates any needed external updates.
Ref: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02198.html

* lisp/abbrev.el (pre-abbrev-expand-hook):
* lisp/bookmark.el (bookmark-read-annotation-text-func)
(bookmark-jump-noselect):
* lisp/buff-menu.el (buffer-menu-mode-hook):
* lisp/cus-edit.el (custom-mode-hook, custom-mode):
* lisp/dirtrack.el (dirtrack-debug-toggle, dirtrack-debug):
* lisp/emacs-lisp/crm.el (crm-minibuffer-complete)
(crm-minibuffer-completion-help)
(crm-minibuffer-complete-and-exit):
* lisp/emacs-lisp/easymenu.el
(easy-menu-precalculate-equivalent-keybindings):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-auto-fill):
* lisp/epa.el (epa-display-verify-result):
* lisp/epg.el (epg-passphrase-callback-function):
* lisp/eshell/eshell.el (eshell-report-bug):
* lisp/ffap.el (ffap-bug, ffap-submit-bug):
* lisp/files.el (locate-file-completion):
* lisp/hi-lock.el (hi-lock-face-history, hi-lock-regexp-history):
* lisp/hilit-chg.el (highlight-changes-initial-state)
(highlight-changes-active-string)
(highlight-changes-passive-string, global-highlight-changes):
* lisp/international/mule-cmds.el (nonascii-insert-offset)
(nonascii-translation-table):
* lisp/international/mule-diag.el (non-iso-charset-alist):
* lisp/international/mule-util.el (detect-coding-with-priority):
* lisp/international/mule.el (charset-id, charset-bytes)
(charset-list, char-valid-p, generic-char-p)
(char-coding-system-table, make-coding-system)
(set-coding-priority)
* lisp/mail/rmail.el (rmail-message-filter):
* lisp/minibuffer.el (complete-in-turn, dynamic-completion-table)
(completion-common-substring)
(minibuffer-local-must-match-filename-map):
* lisp/mouse.el (mouse-major-mode-menu, mouse-popup-menubar)
(mouse-popup-menubar-stuff):
* lisp/net/newst-treeview.el (newsticker-groups-filename):
* lisp/obsolete/tpu-edt.el (tpu-have-ispell, GOLD-map):
* lisp/password-cache.el (password-read-and-add):
* lisp/shell.el (shell-dirtrack-toggle):
* lisp/subr.el (forward-point, redisplay-end-trigger-functions)
(process-filter-multibyte-p, set-process-filter-multibyte):
* lisp/t-mouse.el (t-mouse-mode):
* lisp/term/w32-win.el (w32-focus-frame, w32-select-font):
* lisp/textmodes/ispell.el (ispell-aspell-supports-utf8):
* lisp/textmodes/remember.el (remember-buffer):
* lisp/tooltip.el (tooltip-hook):
* lisp/url/url-util.el (url-generate-unique-filename):
* lisp/url/url-vars.el (url-temporary-directory):
* lisp/vc/vc-hooks.el (vc-workfile-version)
(vc-default-working-revision):
* lisp/vc/vc-mtn.el (vc-mtn-command):
* lisp/vc/vc.el (vc-revert-buffer):
* lisp/vcursor.el (vcursor-toggle-vcursor-map):
Remove items, obsolete since Emacs 23.1.
* lisp/abbrev.el (expand-abbrev):
* lisp/epg.el (epg-context): Change
'epg-passphrase-callback-function' call to 'epa-' alternative.
* lisp/eshell/em-rebind.el (eshell-cannot-leave-input-list): Don't
refer to removed function 'forward-point'.
* test/manual/etags/c-src/abbrev.c (Fexpand_abbrev):
(syms_of_abbrev): Don't run removed hook 'pre-abbrev-expand-hook'.
* lisp/international/mule.el (transform-make-coding-system-args):
Declare obsolete.
* lisp/progmodes/idlwave.el:
Update reference to removed function 'char-valid-p'.
* lisp/gnus/mml2015.el (epg-encrypt-string):
* lisp/gnus/mml1991.el (epg-make-context):
* lisp/gnus/mml-smime.el (autoload):
Remove autoload of removed 'epg-passphrase-callback-function'.
* lisp/minibuffer.el (completion-extra-properties):
Remove support for `completion-common-substring'.
* lisp/obsolete/tpu-edt.el (tpu-toggle-overwrite-mode)
Remove support for removed `spell' package.
* src/coding.c (syms_of_coding):
* doc/misc/efaq.texi:
* doc/emacs/frames.texi (Menu Mouse Clicks):
* doc/misc/url.texi (Customization): Doc fixes.
; * etc/NEWS: List removed items.
2020-08-14 13:07:26 +02:00
Matthew White
450644e9f7 Add ability to mark/unmark/delete all bookmarks
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'.
2020-08-09 15:13:05 -05:00
Matthias Meulien
1b8f9081b9 lisp/bookmark.el: Customize choice to show bookmark list in a new tab
* lisp/bookmark.el (bookmark-bmenu-get-buffer): Add as a choice
for new-tab targets (bug#41225).
2020-08-08 13:45:23 +02:00
Glenn Morris
fe2d0ede28 Merge from origin/emacs-27
cd93debc60 (origin/emacs-27) Merge branch 'emacs-27' of git.savannah....
2c0c613ec5 Document prefix arg effects for 'epa-mail-{sign,encrypt}'
551123e0b2 * etc/NEWS: Correct description of :client-certificate change
05c4329cf5 Revert "Fix filename completion in shell mode buffers"
de68572742 Improve documentation of 'bookmark-bmenu-mode'
fd85e70be7 Update systems using GnuTLS certificate files
0d4ba1c2b2 Improve documentation of 'kill-emacs'
b3bbd4fd00 Improve documentation of 'display-raw-bytes-as-hex'
f50d79af6b Correct descriptions of init file
e325d2638c Fix interrupt-process on MS-Windows
d24e56a5e4 Revert "* doc/misc/flymake.texi (An annotated example back...

# Conflicts:
#	etc/NEWS
2020-07-20 07:50:44 -07:00
Eli Zaretskii
de68572742 Improve documentation of 'bookmark-bmenu-mode'
* lisp/bookmark.el (bookmark-bmenu-mode): Add
`bookmark-bmenu-search' to the doc string.  (Bug#42325)
2020-07-18 10:53:20 +03:00
Paul Eggert
313955110b Don’t attempt to modify constant strings
* lisp/bookmark.el (bookmark-bmenu-set-header):
Use copy-sequence instead of concat, for clarity.
Also, the byte-compiler optimizes (concat "a" "b") into "ab".
* lisp/button.el (make-text-button):
* test/lisp/erc/erc-track-tests.el (erc-track--erc-faces-in):
* test/lisp/password-cache-tests.el:
(password-cache-tests-add-and-remove)
(password-cache-tests-read-from-cache)
(password-cache-tests-in-cache-p, password-cache-tests-read)
(password-cache-tests-reset)
(password-cache-tests-add/expires-key)
(password-cache-tests-no-password-cache):
Don’t attempt to modify constant strings.
* lisp/progmodes/elisp-mode.el (elisp--xref-format)
(elisp--xref-format-extra):
Don’t attempt to modify constant strings via put-text-property.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-across-ref):
Don’t attempt to modify constant vectors or strings.
2020-05-16 22:25:07 -07:00
Basil L. Contovounesios
2a8784129d ; Fix recent additions with lisp-data-mode
* 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.
2020-05-01 15:03:59 +01:00
João Távora
43fded12d5 Add lisp-data-mode for editing non-code Lisp data
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.
2020-05-01 12:11:10 +01:00
Glenn Morris
680021ebde Make more load-hooks obsolete
* lisp/align.el (align-load-hook):
* lisp/autorevert.el (auto-revert-load-hook):
* lisp/bookmark.el (bookmark-load-hook):
* lisp/cmuscheme.el (cmuscheme-load-hook):
* lisp/dired.el (dired-load-hook):
* lisp/expand.el (expand-load-hook):
* lisp/ibuffer.el (ibuffer-load-hook):
* lisp/msb.el (msb-after-load-hook):
* lisp/recentf.el (recentf-load-hook):
* lisp/speedbar.el (speedbar-load-hook):
* lisp/strokes.el (strokes-load-hook):
* lisp/calc/calc.el (calc-load-hook):
* lisp/calendar/timeclock.el (timeclock-load-hook):
* lisp/emulation/viper-init.el (viper-load-hook):
* lisp/progmodes/cwarn.el (cwarn-load-hook):
* lisp/progmodes/idlwave.el (idlwave-load-hook):
* lisp/progmodes/inf-lisp.el (inferior-lisp-load-hook):
* lisp/progmodes/meta-mode.el (meta-mode-load-hook):
* lisp/textmodes/reftex-vars.el (reftex-load-hook):
* lisp/textmodes/table.el (table-load-hook):
* lisp/url/url-vars.el (url-load-hook):
* lisp/vc/ediff-init.el (ediff-load-hook):
Obsolete for with-eval-after-load.
2020-01-16 23:06:04 -08:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Stefan Kangas
e94d01f1ac Remove support for upgrading from old bookmark file format
* lisp/bookmark.el (bookmark-alist-from-buffer): Remove support for
old bookmark file format.  (Bug#37122)
(bookmark-upgrade-version-0-alist)
(bookmark-upgrade-file-format-from-0)
(bookmark-grok-file-format-version)
(bookmark-maybe-upgrade-file-format): Declare obsolete.
(bookmark-load): Don't call 'bookmark-maybe-upgrade-file-format'.
* etc/NEWS: Announce it.
2019-09-08 22:48:20 +02:00
Stefan Kangas
7c30ad184f Restore focus to Bookmark List after editing annotation
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.
2019-07-14 09:26:42 +03:00
Stefan Kangas
01aac6c1fc Improve an error message in bookmark.el
* lisp/bookmark.el (bookmark-alist-from-buffer): Improve error
message (bug#36391).
2019-07-06 16:35:52 +02:00
Stefan Kangas
43d2a0a4a8 * lisp/bookmark.el (bookmark-set-internal): Doc fix. (Bug#25032) 2019-07-06 11:54:55 +03:00
Stefan Kangas
4436bd30ae * lisp/bookmark.el (bookmark-quit-flag): Mark unused variable obsolete.
(Bug#36460)
2019-07-06 11:51:57 +03:00
Stefan Kangas
2aa0b01f25 Prefer progress-reporter to 'message' in bookmark.el
* lisp/bookmark.el (bookmark-upgrade-file-format-from-0)
(bookmark-bmenu-execute-deletions): Use progress-reporter.
(Bug#36462)
2019-07-06 11:43:31 +03:00
Stefan Kangas
22760ab357 Add tests for bookmark.el (Bug#36452)
* 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.
2019-07-03 14:49:38 +03:00
Stefan Kangas
d58fc4e8ec Document bookmark annotations in Emacs Manual (bug#36417)
* doc/emacs/regs.texi (Bookmarks): Document annotations.
* lisp/bookmark.el (bookmark-use-annotations): Clarify docstring.
2019-06-28 21:35:21 +03:00
Roland Winkler
9eb7886647 * bookmark.el (bookmark-set-internal): Fix format string. 2019-06-19 21:52:03 -05:00
Lars Ingebrigtsen
e040870e0b Fix compilation warning in bookmark.el
* 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
2019-06-18 12:21:27 +02:00
Roland Winkler
0f4d368f35 * bookmark.el: Watch bookmark file. Use lexical binding.
(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.
2019-06-18 00:59:11 -05:00
Stefan Kangas
cdd8cb3a9e Add MESSAGE string to bookmark-errors (bug#23408)
* lisp/bookmark.el (bookmark-errors): Add MESSAGE parameter string.
2019-06-15 17:08:58 -04:00
Stefan Kangas
794ba60624 Remove Lucid Emacs support from bookmark.el
* lisp/bookmark.el: Remove Lucid Emacs support.
(Bug#36179)
2019-06-15 11:30:46 +03:00
Stefan Kangas
4ec926dc03 Remove XEmacs support from bookmark.el
* lisp/bookmark.el (bookmark-store): Remove XEmacs compat code
(bug#36189).
2019-06-13 16:02:39 +02:00
Stefan Kangas
abe18f5917 Make bookmark-old-default-file variable obsolete
* 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).
2019-06-09 16:47:59 -07:00
Stefan Kangas
d11dd6a90c Make bookmark-maybe-message obsolete (Bug#35918)
* 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.
2019-06-09 16:38:59 -07:00
Stefan Kangas
9816aba518 Make `bookmark-file' variable obsolete
* lisp/bookmark.el (bookmark-file): Redefine as obsolete variable
alias for `bookmark-default-file'.  (Bug#35917)
2019-06-09 16:29:21 -07:00
Stefan Kangas
323648bf36 Remove interactive spec from bookmark-set-internal (bug#36121)
* lisp/bookmark.el (bookmark-set-internal): Remove interactive spec.
2019-06-09 10:17:13 -07:00
Stefan Kangas
fb6610f59e Checkdoc fixes in lisp/bookmark.el
* lisp/bookmark.el (bookmark-bmenu-inline-header-height)
(bookmark-bmenu-marks-width, bookmark-map, bookmark-quit-flag)
(bookmark-name-from-full-record, bookmark-set-internal)
(bookmark-insert-annotation, bookmark--jump-via)
(bookmark-bmenu-set-header, bookmark-show-annotation)
(bookmark-bmenu-other-window-with-mouse, bookmark-bmenu-relocate):
Checkdoc docstring fixes.  (Bug#35916)
2019-06-09 09:50:39 +03:00
Glenn Morris
2101b9d170 Merge from origin/emacs-26
1b2f83b Fix docstring of bookmark-get-bookmark
2019-06-01 12:04:41 -07:00
Stefan Kangas
1b2f83bb79 Fix docstring of bookmark-get-bookmark
* lisp/bookmark.el (bookmark-get-bookmark): Document optional
argument NOERROR. (bug#20148)
2019-05-30 13:32:10 +01:00
Paul Eggert
797ee5871e Remove Maintainer: when it duplicates Author:
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.
2019-05-26 01:00:15 -07:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Robert Pluim
5007c23a6d Remove space from end of coding cookie
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Remove unnecessary space from end of coding cookie.
2018-11-20 10:59:17 +01:00
Pierre-Yves Luyten
f3345dee4b Add functions to open a bookmark in another frame
* 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.
2018-11-08 16:37:23 -08:00
Glenn Morris
4713f5d742 Merge from origin/emacs-26
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.
2018-07-28 07:50:36 -07:00
Noam Postavsky
2f00ffe5f6 ; bookmark-jump: Add comment about last change. 2018-07-24 20:13:55 -04:00
Glenn Morris
64f94785c7 Merge from origin/emacs-26
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
2018-07-24 06:40:58 -07:00
Noam Postavsky
f64c2774e9 Let bookmark-jump override window-point (Bug#31751)
* 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.
2018-07-23 22:07:14 -04:00
Noam Postavsky
7adf1a361d Merge from emacs-26
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
2018-06-10 18:43:49 -04:00
Allen Li
d20beef5f1 Fix prompt in bookmark.el (Bug#24726)
* lisp/bookmark.el (bookmark-set-internal): Conform to the standard
default prompt format (per `minibuffer-electric-default-mode') which
does not use a colon.
2018-06-05 20:29:22 -04:00