1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00
Commit Graph

445 Commits

Author SHA1 Message Date
Stefan Kangas
aebba085cb ; More minor stylistic fixes found by checkdoc 2021-09-22 20:26:40 +02:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
Peter Oliver
b16b4d730e If the daemon’s TTY is our only frame, create a new frame
* server.el (server-process-filter): If there won't be a current frame
to use, fall back to trying to create a new one (bug#11033).
2021-06-22 15:21:33 +02:00
Harald Hanche-Olsen
9136c064d6 Add a new `server-edit-abort' command
* doc/emacs/misc.texi (Invoking emacsclient): Document it (bug#11358).

* lisp/server.el (server-edit): Mention it in the doc string.
(server-edit-abort): New command.

Copyright-paperwork-exempt: yes
2021-06-04 11:09:46 +02:00
Lars Ingebrigtsen
53dfb51f55 Don't delete socket on server exit if it was passed in
* lisp/server.el (server-sentinel): Don't delete the socket if it
was passed in to Emacs (bug#47511).
2021-05-08 14:22:30 +02:00
Stefan Kangas
e0fc879c0c Prefer defvar-local in remaining libraries
* lisp/align.el (align-mode-rules-list)
(align-mode-exclude-rules-list):
* lisp/bookmark.el (bookmark-current-bookmark)
(bookmark-annotation-name)
(bookmark--annotation-from-bookmark-list):
* lisp/calc/calc-embed.el (calc-embedded-all-active)
(calc-embedded-some-active):
* lisp/comint.el (comint-password-function):
* lisp/completion.el (completion-syntax-table):
* lisp/dframe.el (dframe-track-mouse-function)
(dframe-help-echo-function, dframe-mouse-click-function)
(dframe-mouse-position-function, dframe-timer)
(dframe-attached-frame, dframe-controlled):
* lisp/ehelp.el (electric-help-orig-major-mode):
* lisp/eshell/esh-util.el (eshell-path-env):
* lisp/expand.el (expand-pos, expand-index, expand-point):
* lisp/face-remap.el (text-scale-mode-remapping)
(text-scale-mode-lighter, text-scale-mode-amount)
(text-scale-remap-header-line, buffer-face-mode-remapping):
* lisp/ffap.el (ffap-menu-alist):
* lisp/files-x.el (connection-local-variables-alist):
* lisp/foldout.el (foldout-fold-list, foldout-mode-line-string):
* lisp/follow.el (follow-start-end-invalid):
* lisp/forms.el (forms--mode-setup):
* lisp/gnus/message.el (message-cross-post-old-target)
(message-options):
* lisp/help-mode.el (help-xref-stack, help-xref-forward-stack)
(help-xref-stack-item, help-xref-stack-forward-item):
* lisp/hexl.el (hexl-mode--old-var-vals, hexl-ascii-overlay):
* lisp/hilit-chg.el (hilit-chg-string):
* lisp/ido.el (ido-eoinput):
* lisp/imenu.el (imenu-generic-expression)
(imenu-create-index-function, imenu-default-goto-function)
(imenu-prev-index-position-function)
(imenu-extract-index-name-function, imenu-name-lookup-function)
(imenu-syntax-alist, imenu-case-fold-search):
* lisp/jka-compr.el (jka-compr-really-do-compress):
* lisp/language/ethio-util.el (ethio-prefer-ascii-space):
* lisp/leim/quail/hangul.el (hangul-input-method-help-text):
* lisp/leim/quail/japanese.el (quail-japanese-package-saved):
* lisp/linum.el (linum-overlays, linum-available):
* lisp/man.el (Man-original-frame, Man-arguments, Man--sections)
(Man--refpages, Man-page-list, Man-current-page)
(Man-page-mode-string):
* lisp/pcomplete.el (pcomplete-current-completions)
(pcomplete-last-completion-length)
(pcomplete-last-completion-stub, pcomplete-last-completion-raw)
(pcomplete-last-window-config, pcomplete-window-restore-timer):
* lisp/reveal.el (reveal-open-spots, reveal-last-tick):
* lisp/ruler-mode.el (ruler-mode):
* lisp/scroll-lock.el (scroll-lock-preserve-screen-pos-save):
* lisp/server.el (server-buffer-clients, server-existing-buffer):
* lisp/tab-line.el (tab-line-exclude):
* lisp/tar-mode.el (tar-data-buffer, tar-data-swapped):
* lisp/thumbs.el (thumbs-current-tmp-filename)
(thumbs-current-image-filename, thumbs-extra-images)
(thumbs-image-num, thumbs-buffer, thumbs-marked-list):
* lisp/tutorial.el (tutorial--point-before-chkeys)
(tutorial--point-after-chkeys, tutorial--lang):
* lisp/url/url-vars.el (url-current-object)
(url-current-mime-headers, url-current-lastloc):
* lisp/view.el (view-mode, view-old-buffer-read-only)
(view-old-Helper-return-blurb, view-page-size)
(view-half-page-size, view-last-regexp, view-return-to-alist)
(view-exit-action, view-overlay):
* lisp/wid-edit.el (widget-global-map, widget-field-new)
(widget-field-list, widget-field-last, widget-field-was):
* lisp/woman.el (woman-imenu-done): Prefer defvar-local.
2021-02-02 09:57:07 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Lars Ingebrigtsen
21097cdd32 Revert recent server.el frame-focus changes
* lisp/server.el (server-switch-buffer, server-execute): Revert
9cef8fc8cd and
c5f2eb56c0.  This change led to
regressions in non-new-frame circumstances.
2020-12-23 06:58:12 +01:00
Lars Ingebrigtsen
c5f2eb56c0 Fix previous frame-focus server.el change
* lisp/server.el (server-execute): Always give Emacs focus,
whether we open a new frame or not.
2020-12-18 10:24:48 +01:00
Basil L. Contovounesios
1537a8c863 ; Fix recent typos/wording in NEWS and server.el 2020-12-07 16:07:41 +00:00
Lars Ingebrigtsen
9cef8fc8cd Ensure that new emacsclient frames has focus
* lisp/server.el (server-execute): Focus the frame here...
(server-switch-buffer): Instead of here (bug#15469).  This ensures
that the frame has focus if Emacs is querying the user about
something when opening a file (for instance "Revert from file?").
2020-12-07 14:29:46 +01:00
Lars Ingebrigtsen
ff5a3c74fc Allow inhibiting the instructions on how to close emacsclient frames
* doc/emacs/misc.texi (Invoking emacsclient): Document it.
* lisp/server.el (server-client-instructions): New variable.
(server-execute): Use it.
2020-12-07 13:53:24 +01:00
Lars Ingebrigtsen
289a04cdda Fix up previous server exit directory deletion
* lisp/server.el (server-start): Only delete the server directory
if it's in /tmp (bug#44644).
2020-11-27 09:23:53 +01:00
Lars Ingebrigtsen
3802f9ce3d Delete the emacs-server directory upon Emacs exit
* lisp/server.el (server-start): Delete the server directory upon
Emacs exit (bug#44644).  This fixes the problem of /tmp/emacs0
directories being left behind when running an Emacs server as root.
2020-11-24 06:41:03 +01:00
Stefan Monnier
f2bb5747f0 * lisp/server.el: Refactor frame creation functions
(server--create-frame): New function, extracted from
`server-create-dumb-terminal-frame`.
(server-create-window-system-frame, server-create-tty-frame):
(server-create-dumb-terminal-frame): Use it.
2020-11-10 23:26:28 -05:00
Eliza Velasquez
47f33e6cb0 * lisp/server.el: Fix frame creation on dumb terminals (bug#25547)
(server-create-dumb-terminal-frame): New function.
(server-process-filter): Use it.
(server-delete-client): Don't delete tty terminal when it's not
exclusive to this client.
2020-11-10 22:14:03 -05:00
Lars Ingebrigtsen
7f2c35d028 Fix emacsclient -c foo.txt behaviour with many frames
* lisp/server.el (server-execute): Pass in whether we opened a new
frame or not (bug#43645).
(server-switch-buffer): Use this to switch to the requested buffer
in the new frame if we have "emacsclient -c foo.txt", and retain
the old behaviour if it's "emacsclient foo.txt".
2020-09-29 16:21:17 +02:00
Lars Ingebrigtsen
95268cdb7e Use format-prompt in read-string calls (that have default values)
* lisp/vc/vc-annotate.el (vc-annotate):
* lisp/vc/log-edit.el (log-edit-comment-search-backward)
(log-edit-comment-search-forward):
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/server.el (server-force-delete):
* lisp/mpc.el (mpc):
* lisp/frame.el (set-frame-name):
* lisp/emulation/cua-rect.el (cua-sequence-rectangle):
* lisp/cedet/semantic/symref/list.el (semantic-symref-regexp):
* lisp/calendar/todo-mode.el (todo-read-time): Use `format-prompt'
in `read-string' calls that have defaults.
2020-09-06 23:19:43 +02:00
Lars Ingebrigtsen
e9eafd2268 Ensure that server-socket-dir doesn't have "//" in the path
* lisp/server.el (server-socket-dir): Use expand-file-name to
avoid "//" in the path name (if either XDG_RUNTIME_DIR or TMPDIR
ends in a slash) (bug#18658).
2020-08-13 12:01:01 +02:00
Paul Eggert
9d626dffc6 Add 'nofollow' flag to set-file-modes etc.
This avoids some race conditions (Bug#39683).  E.g., if some other
program changes a file to a symlink between the time Emacs creates
the file and the time it changes the file’s permissions, using the
new flag prevents Emacs from inadvertently changing the
permissions of a victim in some completely unrelated directory.
* admin/merge-gnulib (GNULIB_MODULES): Add fchmodat.
* doc/lispref/files.texi (Testing Accessibility, Changing Files):
* doc/lispref/os.texi (File Notifications):
* etc/NEWS:
Adjust documentation accordingly.
* lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4:
* m4/lchmod.m4: New files, copied from Gnulib.
* lib/gnulib.mk.in: Regenerate.
* lisp/dired-aux.el (dired-do-chmod):
* lisp/doc-view.el (doc-view-make-safe-dir):
* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
* lisp/eshell/em-pred.el (eshell-pred-file-mode):
* lisp/files.el (backup-buffer-copy, copy-directory):
* lisp/gnus/mail-source.el (mail-source-movemail):
* lisp/gnus/mm-decode.el (mm-display-external):
* lisp/gnus/nnmail.el (nnmail-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
(tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region):
* lisp/net/tramp.el (tramp-handle-write-region)
(tramp-make-tramp-temp-file):
* lisp/server.el (server-ensure-safe-dir):
* lisp/url/url-util.el (url-make-private-file):
When getting or setting file modes, avoid following symbolic links
when the file is not supposed to be a symbolic link.
* lisp/doc-view.el (doc-view-make-safe-dir):
Omit no-longer-needed separate symlink test.
* lisp/gnus/gnus-util.el (gnus-set-file-modes):
* lisp/net/tramp.el (tramp-handle-file-modes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes):
* src/fileio.c (symlink_nofollow_flag): New function.
(Ffile_modes, Fset_file_modes):
Support an optional FLAG arg.  All C callers changed.
* lisp/net/ange-ftp.el (ange-ftp-set-file-modes):
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
Accept an optional FLAG arg that is currently ignored,
and add a FIXME comment for it.
* m4/gnulib-comp.m4: Regenerate.
2020-02-23 16:45:50 -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
Eli Zaretskii
c574d27464 Fix documentation of '-position' server command
* lisp/server.el (server-process-filter): Fix the description
of "-position" command to match the reality.  (Bug#38443)
2019-12-07 11:50:14 +02:00
Eli Zaretskii
e06324a032 Revert "Don't flash previous buffer when connecting with emacsclient"
This reverts commit 49fc040077.
It turns out that the fix for a minor aesthetical annoyance
caused much more serious bugs: bug#31038, bug#35726, Bug#37097,
2019-11-07 19:11:23 +02:00
Paul Eggert
bc1c2cf009 Fix some file-mode races
* lisp/emacs-lisp/autoload.el (autoload-ensure-file-writeable):
* lisp/files.el (after-find-file):
* lisp/gnus/gnus-start.el (gnus-dribble-read-file):
* lisp/htmlfontify.el (hfy-copy-and-fontify-file):
* lisp/server.el (server-ensure-safe-dir):
Avoid a race when getting file permissions.
2019-09-16 18:00:59 -07:00
Eli Zaretskii
40eb4c51a4 ; (server-goto-toplevel): Fix comment to reflect the code. 2019-09-07 12:42:52 +03:00
Eli Zaretskii
cac8152c8e Allow client connections when in recursive-edit
* lisp/server.el (server-goto-toplevel): Check minibuffer
depth, not recursion depth.  This avoids exiting
recursive-edit if a client connection is accepted during
recursive-edit.  (Bug#37176)
2019-09-07 12:33:03 +03:00
Stefan Monnier
8a2f763e5c * lisp/server.el (server-ensure-safe-dir): Revert part of b663c83724
A non-cosmetic change that was mistakenly included.
2019-07-18 11:10:05 -04:00
Michael Shields
14fc8a108b [PATCH 1/1] Pass frame-parameters to server-create-tty-frame
* lisp/server.el: Pass frame-parameters when creating frames, even
on a tty (bug#24147).
2019-06-25 14:53:51 +02: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
Glenn Morris
5fe9375a51 Merge from origin/emacs-26
02bee78 Let dir locals for more specific modes override those from less
b1235f9 Improve documentation of Hexl mode
32d1813 Fix description of (move-to-column <n> t) when column <n> is ...
0397b7c ; Fix smtpmail-stream-type docstring
7dab3ee Recognize single quote attribute values in nxml and sgml (Bug...
e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897)
ca14dd1 Fix nxml-get-inside (Bug#32003)
e7ab351 Fix positioning client buffer as instructed by emacsclient

# Conflicts:
#	lisp/files.el
#	lisp/textmodes/sgml-mode.el
2019-05-14 17:18:18 -07:00
Eli Zaretskii
e7ab351caa Fix positioning client buffer as instructed by emacsclient
* lisp/server.el (server-switch-buffer): Let-bind
switch-to-buffer-preserve-window-point to nil when switching
to the client buffer, when the client requested a specific
position.  (Bug#35602)
2019-05-08 20:34:09 +03:00
Stefan Monnier
b663c83724 * lisp/server.el: Cosmetic changes
Remove redundant :group args.
(server-temp-file-regexp): Fix ^$ to  \`\'.
2019-05-03 09:49:38 -04:00
Stefan Monnier
e08e0880f9 Use lexical-binding by default for M-:, --eval, and *scratch*
* lisp/startup.el (command-line): Default to lexical-binding in *scratch*.
(normal-no-mouse-startup-screen, command-line-1):
Use startup--get-buffer-create-scratch.
(command-line-1):
* lisp/simple.el (eval-expression):
* lisp/server.el (server-eval-and-print): Use lexical-binding to
evaluate the expression.
(server-execute): Use startup--get-buffer-create-scratch.
* lisp/ielm.el (inferior-emacs-lisp-mode): Default to lexical-binding.
2019-04-25 14:36:03 -04:00
Paul Eggert
2a3bd6798e Avoid using obsolete accept-process-output arg
* lisp/gnus/nnheader.el (nnheader-accept-process-output):
* lisp/net/dns.el (dns-query):
* lisp/net/imap.el (imap-wait-for-tag):
* lisp/net/network-stream.el (network-stream-get-response):
* lisp/net/pop3.el (pop3-accept-process-output):
* lisp/obsolete/starttls.el (starttls-negotiate-gnutls)
(starttls-open-stream-gnutls):
* lisp/server.el (server-eval-at):
* lisp/textmodes/ispell.el (ispell-accept-output):
Do not depend on the obsolete milliseconds argument of
accept-process-output.
2019-01-15 14:09:11 -08:00
Eli Zaretskii
f6eacc468b Improve documentation of 'server-name'
* doc/emacs/misc.texi (Emacs Server, TCP Emacs server)
(emacsclient Options):
* lisp/server.el (server-name): Document the usage of
'server-name' to specify the server file as an absolute file
name.  (Bug#33934)
2019-01-04 15:55:59 +02:00
Eli Zaretskii
775517307d Improve documentation of 'server-name'
* doc/emacs/misc.texi (Emacs Server, TCP Emacs server)
(emacsclient Options):
* lisp/server.el (server-name):  Document the usage of
'server-name' to specify the server file as an absolute file
name.  Do not merge to master.  (Bug#33934)
2019-01-04 15:40:43 +02: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
Paul Eggert
92282cb502 emacsclient: prefer XDG_RUNTIME_DIR (Bug#33367)
* lib-src/emacsclient.c: Disable -Wformat-truncation=2,
to avoid false alarms about the new snprintf calls.
(local_sockname): New function.
(set_local_socket): Use it.  Prefer XDG_RUNTIME_DIR (if set)
for location of socket directory.  Avoid unnecessary memory
allocation by using snprintf to destination.
* lisp/server.el (server-socket-dir): Prefer XDG_RUNTIME_DIR if set.
2018-12-01 23:08:48 -08:00
Michael Heerdegen
049bd5d267 Don't quote self-quoting pcase patterns
* admin/bzrmerge.el:
* lisp/char-fold.el:
* lisp/dired.el:
* lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/easy-mmode.el:
* lisp/emacs-lisp/easymenu.el:
* lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/package.el:
* lisp/emacs-lisp/smie.el:
* lisp/faces.el:
* lisp/filesets.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/octave.el:
* lisp/progmodes/opascal.el:
* lisp/progmodes/perl-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ruby-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/server.el:
* lisp/subr.el:
* lisp/textmodes/css-mode.el:
* test/lisp/emacs-lisp/pcase-tests.el: Don't quote self-quoting
'pcase' patterns.
2018-10-30 16:17:45 +01:00
Paul Eggert
662bee7d70 file-attributes cleanup
Mostly, this replaces magic-number calls like (nth 4 A) with
more-informative calls like (file-attribute-access-time A).
It also fixes some documentation and minor timestamp coding
issues that I noticed while looking into this.
* doc/lispref/files.texi (File Attributes):
* lisp/files.el (file-attribute-size)
(file-attribute-inode-number, file-attribute-device-number):
* src/dired.c (Fdirectory_files_and_attributes)
(Ffile_attributes):
Mention which attributes must be integers, or nonnegative integers,
as opposed to merely being numbers.  Remove no-longer-correct
talk about representing large integers as conses of integers.
* doc/lispref/files.texi (Magic File Names):
* doc/misc/gnus.texi (Low-level interface to the spam-stat dictionary):
* lisp/autorevert.el (auto-revert-find-file-function)
(auto-revert-tail-mode, auto-revert-handler):
* lisp/auth-source.el (auth-source-netrc-parse):
* lisp/cedet/ede/files.el (ede--inode-for-dir):
* lisp/cedet/semantic/db-file.el (object-write):
* lisp/cedet/semantic/db-mode.el (semanticdb-kill-hook):
* lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p)
(semanticdb-synchronize):
* lisp/cedet/srecode/table.el (srecode-mode-table-new):
* lisp/desktop.el (desktop-save, desktop-read):
* lisp/dired-aux.el (dired-file-set-difference)
(dired-do-chxxx, dired-do-chmod, dired-copy-file-recursive)
(dired-create-files):
* lisp/dired.el (dired-directory-changed-p, dired-readin):
* lisp/dos-w32.el (w32-direct-print-region-helper):
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads)
(autoload-find-destination, update-directory-autoloads):
* lisp/emacs-lisp/shadow.el (load-path-shadows-same-file-or-nonexistent):
* lisp/epg.el (epg--start, epg-wait-for-completion):
* lisp/eshell/em-ls.el (eshell-ls-filetype-p)
(eshell-ls-applicable, eshell-ls-size-string)
(eshell-ls-file, eshell-ls-dir, eshell-ls-files)
(eshell-ls-entries):
* lisp/eshell/em-pred.el (eshell-predicate-alist)
(eshell-pred-file-type, eshell-pred-file-links)
(eshell-pred-file-size):
* lisp/eshell/em-unix.el (eshell-shuffle-files, eshell/cat)
(eshell-du-sum-directory, eshell/du):
* lisp/eshell/esh-util.el (eshell-read-passwd)
(eshell-read-hosts):
* lisp/files.el (remote-file-name-inhibit-cache)
(find-file-noselect, insert-file-1, dir-locals-find-file)
(dir-locals-read-from-dir, backup-buffer)
(file-ownership-preserved-p, copy-directory)
(read-file-modes):
* lisp/find-lisp.el (find-lisp-format):
* lisp/gnus/gnus-agent.el (gnus-agent-unfetch-articles)
(gnus-agent-read-agentview, gnus-agent-expire-group-1)
(gnus-agent-request-article, gnus-agent-regenerate-group)
(gnus-agent-update-files-total-fetched-for)
(gnus-agent-update-view-total-fetched-for):
* lisp/gnus/gnus-cache.el (gnus-cache-read-active)
(gnus-cache-update-file-total-fetched-for)
(gnus-cache-update-overview-total-fetched-for):
* lisp/gnus/gnus-cloud.el (gnus-cloud-file-new-p):
* lisp/gnus/gnus-score.el (gnus-score-score-files):
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
(gnus-master-read-slave-newsrc):
* lisp/gnus/gnus-sum.el (gnus-summary-import-article):
* lisp/gnus/gnus-util.el (gnus-file-newer-than)
(gnus-cache-file-contents):
* lisp/gnus/mail-source.el (mail-source-delete-old-incoming)
(mail-source-callback, mail-source-movemail):
* lisp/gnus/nneething.el (nneething-create-mapping)
(nneething-make-head):
* lisp/gnus/nnfolder.el (nnfolder-read-folder):
* lisp/gnus/nnheader.el (nnheader-file-size)
(nnheader-insert-nov-file):
* lisp/gnus/nnmail.el (nnmail-activate):
* lisp/gnus/nnmaildir.el (nnmaildir--group-maxnum)
(nnmaildir--new-number, nnmaildir--update-nov)
(nnmaildir--scan, nnmaildir-request-scan)
(nnmaildir-request-update-info)
(nnmaildir-request-expire-articles):
* lisp/gnus/nnmh.el (nnmh-request-list-1)
(nnmh-request-expire-articles, nnmh-update-gnus-unreads):
* lisp/gnus/nnml.el (nnml-request-expire-articles):
* lisp/gnus/spam-stat.el (spam-stat-save, spam-stat-load)
(spam-stat-process-directory, spam-stat-test-directory):
* lisp/ido.el (ido-directory-too-big-p)
(ido-file-name-all-completions):
* lisp/image-dired.el (image-dired-get-thumbnail-image)
(image-dired-create-thumb-1):
* lisp/info.el (info-insert-file-contents):
* lisp/ls-lisp.el (ls-lisp-insert-directory)
(ls-lisp-handle-switches, ls-lisp-classify-file)
(ls-lisp-format):
* lisp/mail/blessmail.el:
* lisp/mail/feedmail.el (feedmail-default-date-generator)
(feedmail-default-message-id-generator):
* lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases)
(mail-abbrevs-setup):
* lisp/mail/mspools.el (mspools-size-folder):
* lisp/mail/rmail.el (rmail-insert-inbox-text):
* lisp/mail/sendmail.el (sendmail-sync-aliases):
* lisp/mh-e/mh-alias.el (mh-alias-tstamp):
* lisp/net/ange-ftp.el (ange-ftp-parse-netrc)
(ange-ftp-write-region, ange-ftp-file-newer-than-file-p)
(ange-ftp-cf1):
* lisp/net/eudcb-mab.el (eudc-mab-query-internal):
* lisp/net/eww.el (eww-read-bookmarks):
* lisp/net/netrc.el (netrc-parse):
* lisp/net/newst-backend.el (newsticker--image-get):
* lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
* lisp/obsolete/fast-lock.el (fast-lock-save-cache):
* lisp/obsolete/vc-arch.el (vc-arch-state)
(vc-arch-diff3-rej-p):
* lisp/org/ob-eval.el (org-babel--shell-command-on-region):
* lisp/org/org-attach.el (org-attach-commit):
* lisp/org/org-macro.el (org-macro-initialize-templates):
* lisp/org/org.el (org-babel-load-file)
(org-file-newer-than-p):
* lisp/org/ox-html.el (org-html-format-spec):
* lisp/org/ox-publish.el (org-publish-find-date)
(org-publish-cache-ctime-of-src):
* lisp/pcmpl-gnu.el (pcomplete/tar):
* lisp/pcmpl-rpm.el (pcmpl-rpm-packages):
* lisp/play/cookie1.el (cookie-snarf):
* lisp/progmodes/cmacexp.el (c-macro-expansion):
* lisp/ps-bdf.el (bdf-file-mod-time):
* lisp/server.el (server-ensure-safe-dir):
* lisp/simple.el (shell-command-on-region):
* lisp/speedbar.el (speedbar-item-info-file-helper)
(speedbar-check-obj-this-line):
* lisp/thumbs.el (thumbs-cleanup-thumbsdir):
* lisp/time.el (display-time-mail-check-directory)
(display-time-file-nonempty-p):
* lisp/url/url-cache.el (url-is-cached):
* lisp/url/url-file.el (url-file-asynch-callback):
* lisp/vc/diff-mode.el (diff-delete-if-empty):
* lisp/vc/pcvs-info.el (cvs-fileinfo-from-entries):
* lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
* lisp/vc/vc-cvs.el (vc-cvs-checkout-model)
(vc-cvs-state-heuristic, vc-cvs-merge-news)
(vc-cvs-retrieve-tag, vc-cvs-parse-status, vc-cvs-parse-entry):
* lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1)
(vc-hg--ignore-patterns-valid-p)
(vc-hg--cached-dirstate-search, vc-hg-state-fast):
* lisp/vc/vc-hooks.el (vc-after-save):
* lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
* lisp/vc/vc-svn.el (vc-svn-merge-news, vc-svn-parse-status):
* lisp/vc/vc.el (vc-checkout, vc-checkin, vc-revert-file):
* lisp/xdg.el (xdg-mime-apps):
Prefer (file-attribute-size A) to (nth 7 A), and similarly
for other file attributes accessors.
* doc/lispref/files.texi (File Attributes):
* doc/lispref/intro.texi (Version Info):
* doc/lispref/os.texi (Idle Timers):
* lisp/erc/erc.el (erc-string-to-emacs-time):
* lisp/files.el (file-attribute-access-time)
(file-attribute-modification-time)
(file-attribute-status-change-time):
* lisp/net/tramp-compat.el:
(tramp-compat-file-attribute-modification-time)
(tramp-compat-file-attribute-size):
* src/buffer.c (syms_of_buffer):
* src/editfns.c (Fget_internal_run_time):
* src/fileio.c (Fvisited_file_modtime)
(Fset_visited_file_modtime):
* src/keyboard.c (Fcurrent_idle_time):
* src/process.c (Fprocess_attributes):
Defer implementation details about timestamp format to the
section that talks about timestamp format, to make it easier
to change the documentation later if timestamp formats are
extended.
* lisp/gnus/gnus-util.el (gnus-file-newer-than):
* lisp/speedbar.el (speedbar-check-obj-this-line):
* lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
Prefer time-less-p to doing it by hand.
* lisp/ls-lisp.el (ls-lisp-format): Inode numbers are no longer conses.
* lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
Use eql, not eq, to compare integers that might be bignums.
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
Prefer float-time to doing time arithmetic by hand.
2018-09-23 18:32:59 -07:00
Noam Postavsky
c0f688808e Handle non-error signals in emacsclient --eval (Bug#10989)
* lisp/server.el (server-process-filter): Handle any signal, not just
errors.
2018-09-04 18:50:29 -04: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
João Távora
ce54573dac Respect s-s-b-default-predicate when killing terminal
Fixes: Bug#31951

* lisp/server.el (server-save-buffers-kill-terminal): Only pass
PRED=t to save-some-bufers if ARG in non-nil.
2018-06-27 14:19:38 +01:00
Glenn Morris
16c2f03c15 Merge from origin/emacs-26
bbc9d37 (origin/emacs-26) Fix previous change in minibuffer-default-a...
7caeef1 * src/editfns.c (Fformat): Make %x easier to spot in doc stri...
ecc29fb Improve responsiveness while in 'replace-buffer-contents'
8182d64 Improve documentation of 'server-start' and friends
decdfed Clarify wording about functions' argument lists
5abac8b * lisp/doc-view.el: Fix typos in the commentary.  (Bug#31937)
2018-06-23 07:51:00 -07:00
Eli Zaretskii
8182d648cb Improve documentation of 'server-start' and friends
* lisp/server.el (server-start, server-running-p): Document how to
reliably check that the current Emacs process started the server.
(Bug#31859)
2018-06-23 10:50:58 +03:00
Eli Zaretskii
a8be860e17 Improve support for desktop restoration in daemon mode
* lisp/server.el (server-after-make-frame-hook): New hook.
(server-execute): Call it after creating a new frame or before
switching to a buffer shown in a client frame.  (Bug#30421)

* doc/emacs/misc.texi (Saving Emacs Sessions): Adjust advice for
restoring desktop in daemon mode to the new hook.
* doc/lispref/frames.texi (Creating Frames, Standard Hooks):
Document server-after-make-frame-hook.

* etc/NEWS: Mention server-after-make-frame-hook.
2018-03-10 13:48:49 +02:00
Aaron Jensen
49fc040077 Don't flash previous buffer when connecting with emacsclient
* lisp/server.el (server-execute): Accept lambda for creating
frame rather than frame.  Ensure newly created tty frame
initially shows the correct buffer.
(server-process-filter): Pass a lambda to server-execute to create
a frame.  (Bug#24218)
2018-02-16 17:43:04 +02:00
Paul Eggert
3a718ffca0 Finish renaming to internal--daemon-sockname
* doc/lispref/processes.texi (Misc Network): Omit discussion of
internal--daemon-sockname, as non-Emacs code shouldn't rely on it.
* src/process.c (syms_of_process): Rename internal-daemon-sockname
to internal--daemon-sockname.  All uses changed.
2018-02-12 12:57:59 -08:00