1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

101 Commits

Author SHA1 Message Date
Stefan Kangas
cdbbc2081e Use lexical-binding in saveplace.el and add tests
* lisp/saveplace.el: Use lexical-binding.
(save-place-to-alist): Doc fix.
* test/lisp/saveplace-tests.el:
* test/lisp/saveplace-resources/saveplace: New files.
2020-08-08 01:40:38 +02: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
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
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
2019-05-25 14:25:18 -07:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -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
Glenn Morris
6aa93b45af Merge from origin/emacs-26
1908173 (origin/emacs-26) Fix Bug#32828
7f5086d * lisp/net/shr.el (shr-copy-url): Fix docstring.
d309994 Fix typos in documentation
25cdd65 ; Spellcheck two more documentation strings
c8bda05 ; * lisp/simple.el (save-interprogram-paste-before-kill): Fix...
dc7fdee * doc/emacs/kmacro.texi (Basic Keyboard Macro): Mention old b...
17766a1 Improve docs of functions/variables related to 'display-buffer'
a363931 * lisp/mouse.el (tear-off-window): Fix non-mouse use (bug#32799)
8b8a4c0 Improve documentation of directory-local variables
c9c9756 Don't use obsolete variable 'save-place' in documentation
ca208e8 Use save-place-mode instead of save-place
2018-09-28 07:54:24 -07:00
Mark A. Hershberger
ca208e8388 Use save-place-mode instead of save-place
* lisp/menu-bar.el (menu-bar-options-save, menu-bar-options-menu):
* lisp/saveplace.el (save-place-to-alist, save-places-to-alist)
(save-place-find-file-hook, save-place-dired-hook): Use
save-place-mode instead of the obsolete save-place.
2018-09-22 10:41:22 +03:00
John Shahid
ee3e432300 Optionally add argument description in minor mode DOC (bug#10754)
Add a paragraph to minor mode's docstring documenting the mode's ARG
usage if the supplied docstring doesn't already contain the word "ARG".

* easy-mmode.el (easy-mmode--arg-docstring): New const.
(easy-mmode--arg-docstring): New function.
(define-minor-mode): Use them.

Remove argument documentation from all minor modes.
2018-07-01 23:34:53 -04:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Stefan Monnier
fde0cd1adc * lisp/saveplace.el (save-place-local-mode): New minor mode
(toggle-save-place): Define as obsolete alias.
(save-place--setup-hooks): New function.
(save-place-mode): Use it.
2016-02-25 13:44:43 -05:00
Eli Zaretskii
040e0d6b3b Fix 'toggle-save-place'
* lisp/saveplace.el (toggle-save-place): Set up hooks necessary to
support save-place in the buffer.  Autoload the command.
2016-02-24 22:56:32 +02:00
Eli Zaretskii
7c81a0b9c6 Improve documentation of 'save-place-mode'
* lisp/saveplace.el (toggle-save-place): Update the doc string wrt
turning on 'save-place-mode' globally.

* etc/NEWS: Mention the need to call 'save-place-mode' for turning
on the mode in all buffers.
2016-02-24 21:54:21 +02:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Juri Linkov
33efb6d606 * lisp/saveplace.el (toggle-save-place, save-place-to-alist)
(save-places-to-alist, save-place-dired-hook):
Check for dired-subdir-alist.  (Bug#19851)
2015-12-22 02:14:47 +02:00
Stefan Monnier
9c3e1e4e5b * lisp/saveplace.el (save-place-mode): New minor mode.
(save-place): Redefine as an obsolete alias.
2015-04-27 19:12:11 -04:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Juri Linkov
9bb10cbdc5 Avoid compilation warning in saveplace.el for dired-current-directory 2014-12-28 02:52:50 +02:00
Juri Linkov
d51459246b Support subdirectories when saving places in dired.
* lisp/saveplace.el (toggle-save-place, save-place-to-alist)
(save-places-to-alist, save-place-dired-hook):
Use dired-current-directory instead of dired-directory.
(save-place-dired-hook): Add check for alist to make the new
format future-proof to allow other possible formats.

Fixes: debbugs:19436
2014-12-27 02:38:34 +02:00
Andy Sawyer
65b7734774 * lisp/saveplace.el (toggle-save-place): Fix argument handling (tiny change)
Fixes: debbugs:16673
2014-02-27 22:44:49 -08:00
Juanma Barranquero
99e1513378 lisp/saveplace.el (save-place): Remove redundant info in docstring.
(save-place-forget-unreadable-files, toggle-save-place)
(save-place-forget-unreadable-files, save-place-dired-hook):
Fix typos and remove unneeded backslashes.
2014-02-21 01:35:08 +01:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Glenn Morris
ece4bae50f Doc, comment, etc updates for increased use of locate-user-emacs-file
This should have been a prerequisite for making these changes in the
first place.

* doc/emacs/calendar.texi (Time Intervals):
* doc/misc/idlwave.texi (Lesson III---User Catalog, Online Help)
(Starting the Shell, Catalogs, User Catalog):
* doc/misc/remember.texi (Quick Start):
* doc/misc/viper.texi:
* doc/misc/vip.texi (Customization, Customizing Constants)
(Customizing Key Bindings): Update for files being in ~/.emacs.d/.

* lisp/ido.el (ido-save-directory-list-file):
* lisp/saveplace.el (save-place-file):
* lisp/calendar/timeclock.el (timeclock-file):
* lisp/net/quickurl.el (quickurl-url-file):
* lisp/obsolete/otodo-mode.el (todo-file-do, todo-file-done, todo-file-top):
* lisp/progmodes/idlwave.el (idlwave-config-directory):
* lisp/textmodes/remember.el (remember-data-file):
Bump :version.

* lisp/shadowfile.el (shadow-info-file, shadow-todo-file): Doc fix.
* lisp/strokes.el (strokes-file): Doc fix.  Bump :version.
(strokes-help): Doc fix.
* lisp/emulation/viper-init.el (viper-vi-style-in-minibuffer): Doc fix.
* lisp/emulation/viper.el (viper): Doc fix for custom group.
(top-level): Remove oh-so-no-longer-relevant text about vip.
* lisp/obsolete/otodo-mode.el (todo-prefix): Doc fix.

* etc/NEWS: Related edits.
2014-01-26 18:02:28 -08:00
Juri Linkov
71f16bdad4 * lisp/saveplace.el (toggle-save-place, save-place-to-alist)
(save-places-to-alist, save-place-dired-hook): Add (derived-mode-p
'dired-mode) before checking for dired-directory.

Fixes: debbugs:16477
2014-01-20 10:52:44 +02:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Juri Linkov
1d42e5b639 * lisp/saveplace.el (save-place-to-alist): Add `dired-filename' as
a position when `dired-directory' is non-nil.  Check integer
positions with `integerp'.
(toggle-save-place, save-places-to-alist): Add check for
`dired-directory'.
(save-place-find-file-hook): Check integer positions with
`integerp'.
(save-place-dired-hook): Use `dired-goto-file' when
`dired-filename' is found in the assoc list.  Check integer
positions with `integerp'.
(dired-initial-position-hook): Rename from `dired-initial-point-hook'.

* lisp/dired.el (dired-initial-position-hook): Rename back from
`dired-initial-point-hook'.
(dired-initial-position): Rename `dired-initial-point-hook' to
`dired-initial-position-hook'.
(dired-file-name-at-point): Doc fix.

Fixes: debbugs:15329
2013-12-20 22:20:39 +02:00
Glenn Morris
30213927b6 Use with-demoted-errors now that it can format any error messages
* dframe.el (dframe-timer-fn):
* files.el (dir-locals-read-from-file):
* mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run, mpc-format):
* reveal.el (reveal-post-command):
* saveplace.el (load-save-place-alist-from-file):
* shell.el (shell-resync-dirs):
* w32-common-fns.el (x-get-selection-value):
* emacs-lisp/copyright.el (copyright-find-copyright):
* emacs-lisp/eldoc.el (eldoc-print-current-symbol-info):
* emulation/tpu-edt.el (tpu-copy-keyfile):
* play/bubbles.el (bubbles--mark-neighbourhood):
* progmodes/executable.el (executable-make-buffer-file-executable-if-script-p):
* term/pc-win.el (x-get-selection-value): Use with-demoted-errors.
2013-09-11 22:32:57 -07:00
Glenn Morris
144e38fe18 * lisp/saveplace.el (load-save-place-alist-from-file): Demote errors.
Fixes: debbugs:15305
2013-09-08 16:15:17 -07:00
Ivan Kanis
d4466a91f2 Add support for dired in saveplace. 2013-06-14 11:32:01 +02:00
Karl Fogel
1c4a85eda0 * saveplace.el (save-place-alist-to-file): Don't sort
`save-place-alist', just pretty-print it (bug#13882).
2013-03-13 13:54:05 -05:00
Stefan Monnier
940e509914 Use locate-user-emacs-file.
* lisp/type-break.el (type-break-file-name):
* lisp/textmodes/remember.el (remember-data-file):
* lisp/strokes.el (strokes-file):
* lisp/shadowfile.el (shadow-initialize):
* lisp/saveplace.el (save-place-file):
* lisp/ps-bdf.el (bdf-cache-file):
* lisp/progmodes/idlwave.el (idlwave-config-directory):
* lisp/net/quickurl.el (quickurl-url-file):
* lisp/international/kkc.el (kkc-init-file-name):
* lisp/ido.el (ido-save-directory-list-file):
* lisp/emulation/viper.el (viper-custom-file-name):
* lisp/emulation/vip.el (vip-startup-file):
* lisp/calendar/todo-mode.el (todo-file-do, todo-file-done, todo-file-top):
* lisp/calendar/timeclock.el (timeclock-file): Use locate-user-emacs-file.
2013-03-11 22:08:21 -04:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Chong Yidong
865fe16fd2 Update docstrings and comments to use "init file" terminology.
* bookmark.el (bookmark-bmenu-toggle-filenames): Doc fixes.
* comint.el (comint-prompt-read-only):
* custom.el (defcustom):
* hi-lock.el (hi-lock-mode):
* ibuffer.el (ibuffer-formats):
* ielm.el (ielm-prompt-read-only):
* novice.el (disable-command):
* saveplace.el (toggle-save-place):
* speedbar.el (speedbar-supported-extension-expressions):
* startup.el (auto-save-list-file-prefix, init-file-user)
(after-init-hook, inhibit-startup-echo-area-message):
* strokes.el (strokes-help):
* time-stamp.el (time-stamp):
* calendar/calendar.el (calendar, diary-file):
* calendar/diary-lib.el (diary-mail-entries, diary)
(diary-list-entries-hook):
* calendar/holidays.el (holidays, calendar-holidays):
* calendar/lunar.el (lunar-phases):
* calendar/solar.el (sunrise-sunset):
* emulation/edt.el (edt-load-keys):
* emulation/viper.el (viper-mode):
* eshell/em-alias.el (eshell-command-aliases-list):
* eshell/esh-util.el (eshell-convert-numeric-arguments):
* international/ogonek.el (ogonek-information):
* net/tramp-cmds.el (tramp-bug):
* net/quickurl.el (quickurl-reread-hook-postfix):
* play/decipher.el (decipher-font-lock-keywords):
* progmodes/cc-styles.el (c-set-style):
* progmodes/idlw-shell.el (idlwave-shell-prompt-pattern):
* progmodes/inf-lisp.el (inferior-lisp-prompt):
* progmodes/octave-mod.el (octave-mode):
* progmodes/sql.el (sql-mode, sql-interactive-mode, sql-password):
* progmodes/verilog-mode.el (verilog-read-defines):
* textmodes/two-column.el (2C-mode): Likewise.
2012-09-17 13:41:04 +08:00
Tassilo Horn
5dd11cfee6 * saveplace.el (save-place-to-alist)
(save-place-ignore-files-regexp): Allow value nil to disable this
 feature.
2012-03-04 17:56:21 +01:00
Glenn Morris
e23a3fbee4 * lisp/saveplace.el (save-place-ignore-files-regexp): Add :version.
(ps feature freeze anyone?)
2012-02-18 11:04:28 -08:00
Tassilo Horn
0311a3fc3d 2012-02-17 Tassilo Horn <tassilo@member.fsf.org>
* saveplace.el (save-place-ignore-files-regexp): New variable
	allowing for excluding files from saving their location.  The
	default value matches the temporary commit message editing files
	from Git, SVN, Bazaar, and Mercurial.
	(save-place-to-alist): Use it.
2012-02-17 21:19:30 +01:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Glenn Morris
2f6a3e7912 * lisp/saveplace.el (save-place-limit): Make it finite. (Bug#9352) 2011-08-26 20:52:47 -04:00
Juanma Barranquero
3e214b503e New variable `revert-buffer-in-progress-p'.
* lisp/files.el (after-find-file-from-revert-buffer): Remove variable.
  (after-find-file): Dont' bind it.
  (revert-buffer-in-progress-p): New variable.
  (revert-buffer): Bind it.
  Pass nil for `after-find-file-from-revert-buffer'.

* lisp/saveplace.el (save-place-find-file-hook): Use new variable
  `rever-buffer-in-progress-p', not `after-find-file-from-revert-buffer'.

* etc/NEWS: New variable `revert-buffer-in-progress-p'.
2011-04-06 21:38:46 +02:00
Juanma Barranquero
845fc5e555 * lisp/bookmark.el:
* lisp/desktop.el:
* lisp/emacs-lock.el:
* lisp/ps-print.el:
* lisp/saveplace.el:
* lisp/net/tramp-cache.el:
* lisp/textmodes/reftex.el:
* lisp/org/org-id.el: Don't set `kill-emacs-hook' on noninteractive sessions.

Fixes: debbugs:8137
2011-03-06 01:30:16 +01:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Karl Fogel
6e457cc94c * lisp/saveplace.el (save-place-alist-to-file): Save list sorted and
pretty-printed, so that it is mergeable by line-based text merging,
  as suggested by Iain Dalton <iain.dalton {_AT_} gmail.com>.
2010-12-28 22:24:09 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00