1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00
Commit graph

78974 commits

Author SHA1 Message Date
Michael Albinus
ed320ebe28 ; Fix last change 2021-03-31 21:12:09 +02:00
Michael Albinus
0f5bd3b7fa * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
Make assumption for emba.
2021-03-31 21:09:55 +02:00
Stefan Kangas
f236b516b6 Use lexical-binding in progmodes/inf-lisp.el
* lisp/progmodes/inf-lisp.el: Use lexical-binding.  Doc fixes.
(inferior-lisp-mode-map, lisp-mode-map)
(inferior-lisp-install-letter-bindings): Quote function symbols as such.
(inferior-lisp-menu, lisp-compile-string, lisp-eval-string)
(lisp-show-variable-documentation): Doc fixes.
2021-03-31 12:59:37 +02:00
Michael Albinus
97992a342b ; * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
; Instrument for emba.
2021-03-31 11:37:35 +02:00
Stefan Kangas
3b1c646202 Use lexical-binding in scroll-all.el
* lisp/scroll-all.el: Use lexical-binding.
(scroll-all-scroll-down-all, scroll-all-scroll-up-all)
(scroll-all-page-down-all, scroll-all-page-up-all)
(scroll-all-beginning-of-buffer-all)
(scroll-all-end-of-buffer-all): Doc fixes.
2021-03-31 08:25:24 +02:00
Stefan Kangas
99026711d7 * lisp/dynamic-setting.el: Use lexical-binding. 2021-03-31 08:05:58 +02:00
Luke Lee
8ac3132957 Fix incorrect regular expression for more general text replacements.
* lisp/progmodes/hideif.el (hif-evaluate-macro): fix regexp to trim
  off leading/trailing spaces, but not within.
2021-03-31 11:42:33 +08:00
Stefan Kangas
571c261525 Use lexical-binding in chistory.el
* lisp/chistory.el: Use lexical-binding.  Remove redundant :group
args.
(command-history-mode-map): Quote function symbols as such.
2021-03-31 01:43:47 +02:00
Stefan Kangas
20f2488dbf * lisp/ebuff-menu.el: Use lexical-binding. 2021-03-31 01:23:29 +02:00
Stefan Kangas
051f791f9e Use lexical-binding in double.el
* lisp/double.el: Use lexical-binding.  Remove redundant :group
args.
2021-03-31 01:11:21 +02:00
Stefan Kangas
995d1d9995 Use lexical-binding in dirtrack.el
* lisp/dirtrack.el: Use lexical-binding.  Remove redundant group
args.
2021-03-31 00:58:18 +02:00
Stefan Kangas
d47db03829 * lisp/progmodes/cwarn.el: Use lexical-binding. 2021-03-31 00:07:03 +02:00
Stefan Kangas
63608efe7e Remove redundant #' before lambda in cedet
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers)
(mode-local--activate-bindings, mode-local--deactivate-bindings)
(setq-mode-local, describe-mode-local-bindings-in-mode):
* lisp/cedet/semantic.el (semantic-repeat-parse-whole-stream):
* lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment):
* lisp/cedet/semantic/db-ebrowse.el
(semanticdb-ebrowse-get-ebrowse-structure):
* lisp/cedet/semantic/db-global.el
(semanticdb-enable-gnu-global-databases):
* lisp/cedet/semantic/edit.el (semantic-changes-in-region):
* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
* lisp/cedet/semantic/grammar.el (semantic-grammar-ASSOC)
(semantic-grammar-tag-symbols, semantic-grammar-keywords)
(semantic--grammar-macros-regexp-1)
(semantic-format-tag-summarize):
* lisp/cedet/semantic/idle.el (semantic-idle-core-handler)
(semantic-idle-work-core-handler):
* lisp/cedet/semantic/imenu.el (semantic-imenu-semanticdb-hook):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map)
(semantic-java-doc-setup):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-save-table)
(semantic-lex-spp-macros):
* lisp/cedet/semantic/lex.el (semantic-lex-map-symbols)
(semantic-lex-keywords, semantic-lex-types):
* lisp/cedet/semantic/util-modes.el
(semantic-toggle-minor-mode-globally):
* lisp/cedet/semantic/wisent/comp.el (wisent-defcontext)
(wisent-automaton-lisp-form):
* lisp/cedet/semantic/wisent/grammar.el (wisent-grammar-assocs)
(wisent-grammar-terminals): Remove redundant #' before lambda.
2021-03-30 23:52:50 +02:00
Stefan Kangas
3c00496baa Delete Emacs 19 compat code in foldout.el
* lisp/foldout.el (foldout-hide-flag):
(foldout-show-flag): Delete Emacs 19 compat code and make obsolete.
(foldout-exit-fold): Don't use above obsolete variable.
2021-03-30 23:37:09 +02:00
Stefan Kangas
d3aac3b34c Use lexical-binding in lpr.el and add rudimentary tests
* lisp/lpr.el: Use lexical-binding.  Remove redundant :group args.
(print-region-function): Declare MS-Windows specific function.
* test/lisp/lpr-tests.el: New file.
2021-03-30 23:11:24 +02:00
Stefan Kangas
4f3c9df047 Use lexical-binding in echistory.el
* lisp/echistory.el: Use lexical-binding.
(electric-history-map): Quote function symbols as such.
(Electric-history-undefined): Use command substitutions.
2021-03-30 19:02:20 +02:00
Stefan Kangas
49cbf2392b Delete empty "History" sections
* lisp/bs.el:
* lisp/calendar/timeclock.el:
* lisp/cedet/semantic/bovine/grammar.el:
* lisp/cedet/semantic/grammar.el:
* lisp/cedet/semantic/wisent.el:
* lisp/cedet/semantic/wisent/comp.el:
* lisp/cedet/semantic/wisent/java-tags.el:
* lisp/cedet/semantic/wisent/wisent.el:
* lisp/erc/erc.el:
* lisp/net/newst-treeview.el:
* lisp/recentf.el:
* lisp/ruler-mode.el:
* lisp/textmodes/remember.el:
* lisp/thumbs.el:
* lisp/tree-widget.el:
* lisp/vc/vc-hg.el: Delete empty "History" sections.

* lisp/cedet/semantic/grammar.el
(semantic-grammar-header-template): Don't add "History" section to
generated file.
2021-03-30 15:50:26 +02:00
Stefan Kangas
4ed75f9fcb Use lexical-binding in follow.el
* lisp/follow.el: Use lexical-binding.
(follow-mode-map, follow-debug-message): Quote function symbols as
such.
(follow-pos-visible-in-window-p): Remove unused variable 'last'.
(follow-move-to-window-line): Remove unused variable 'middle-window'.
2021-03-30 15:16:28 +02:00
Mattias Engdegard
c2e90d1119 lisp/progmodes/verilog-mode.el internal code cleanup.
* lisp/progmodes/verilog-mode.el (verilog-at-close-struct-p):
Internal code cleanup.
2021-03-30 07:54:41 -04:00
Arash Esbati
4bfcfdb416 * lisp/textmodes/reftex-auc.el: Improve the external function declarations
(LaTeX-add-bibitems): Move declaration closer to the others.
Fix those declarations to refer to the right file.
2021-03-29 22:40:26 -04:00
Dmitry Gutov
24c92b35b5 Provide information to show icons with Elisp completions
* lisp/progmodes/elisp-mode.el (elisp--company-kind): New function.
(elisp-completion-at-point): Use it.  And a couple of anonymous
:company-kind functions too.
2021-03-30 03:42:11 +03:00
Stefan Monnier
5a5cccb6ac lisp/progmodes/verilog-mode.el: Prepare for lexical-binding.
* lisp/progmodes/verilog-mode.el: Activate lexical-binding.
Insert newlines to avoid some situations where arguments were easy
to misunderstand.
(verilog-set-compile-command): Strength-reduce `eval` to `symbol-value`.
(verilog-error-regexp-add-emacs): Replace `mapcar` => `mapc` since
the result is not used.
(verilog-surelint-off): Remove always-nil var `dir`.
(verilog-do-indent): Minor simplification of the code.
(verilog-pred): Delete var.  It was always nil.
(verilog-flag): Delete var; pass the corresponding data via
explicit arguments instead.
(verilog-keyword-completion): Use `dolist`.
(verilog-completion-response): Rename to `verilog--complete-with-action`.
Change calling convention to match that of `complete-with-action`.
Use `complete-with-action` instead when available.
Adjust all callers.
(verilog-completion, verilog-comp-defun): Change arg names so they
don't collide with dynamically scoped vars, and let-bind `verilog-str`
explicitly instead.  Use `with-current-buffer`.
(verilog-batch-execute-func): Use `with-current-buffer`.
(verilog-complete-word): Don't convert the completion list into
a completion alist, since lists work just as well.
(verilog-showscopes): Use `with-current-buffer`.
(verilog-symbol-detick, verilog-symbol-detick-text)
(verilog-signals-matching-enum): Strength-reduce `eval` to `symbol-value`.
(verilog--insert-indent): Rename from `verilog--insert-indent`.
Add `indent-pt` argument.
(verilog-insert-indent): New macro wrapper to provide the old
calling convention.
(verilog-auto-assign-modport, verilog-auto-inout-modport):
Remove always-nil var `direction-re`.
(verilog--auto-inst-first): Rename from `verilog-auto-inst-first`.
Add `indent-pt` argument.
(verilog-auto-inst-port): Adjust call accordingly.
2021-03-29 18:35:01 -04:00
Stefan Monnier
66d04c0438 * lisp/progmodes/verilog-mode.el: Use #' where appropriate. 2021-03-29 18:07:25 -04:00
Wilson Snyder
b4831acebd lisp/progmodes/verilog-mode.el: Fix indentation of enum.
* lisp/progmodes/verilog-mode.el (verilog-at-close-struct-p): Fix
indentation of enum with multiple objects. Reported by punzik. (#1716).
2021-03-29 18:03:33 -04:00
Stefan Monnier
5c23621db5 * lisp/completion.el: Activate lexical-binding
Remove redundant `:group` arguments.

(list-all-completions-1): Merge into `list-all-completions` and
then delete.
(list-all-completions-by-hash-bucket-1): Use `push`.  Merge into
`list-all-completions-by-hash-bucket` and then delete.
(completions-list-return-value): Delete variable, not used any more.
2021-03-29 16:46:41 -04:00
Stefan Monnier
990720337b * lisp/woman.el: Activate lexical-binding. Require cl-lib
(woman-mode, woman2-roff-buffer): Use `cl-letf`.
(woman-request): Move declaration before first use.
(woman0-macro): Rename arg to not shadow the dynamically scoped var.
(woman-set-arg): Strength-reduce `eval` to `symbol-value`.
2021-03-29 16:34:19 -04:00
Juri Linkov
b6552b1d7c * lisp/progmodes/project.el (project-regexp-history-variable): New variable.
(project--read-regexp): Use it as HISTORY arg of 'read-regexp' with
'grep-regexp-history' default (bug#47012).
2021-03-29 22:34:51 +03:00
Stefan Monnier
fcc7373b28 * lisp/allout*.el: Use lexical-binding
* lisp/allout.el: Activate lexical-binding.
(allout-setup-menubar): Delete "complex no-op" function.
(allout-mode): Delete call to it.
(allout-hotspot-key-handler): Delete XEmacs-only code.
(allout-copy-exposed-to-buffer): Remove always-nil var `start-list`.

* lisp/allout-widgets.el: Activate lexical-binding.
(allout-item-icon-keymap): Use `ignore`.
(allout-widgets-exposure-change-processor): Use `cl-callf` instead of
relying on dynamic binding to apply some code to two different variables.
2021-03-29 15:29:26 -04:00
Alan Mackenzie
1440dbed54 Fix an infinite loop in C++ Mode redisplay. This was bug #47191.
* lisp/progmodes/cc-defs.el (c-forward-syntactic-ws, c-backward-syntactic-ws):
When point is on the wrong side of a supplied search limit, leave point
unmoved rather than setting it to that limit.

* lisp/progmodes/cc-engine.el (c-forward-name): After scanning a template
argument list (which is not itself subject to a search limit) recalculate the
search limit starting from the end point, since these argument lists can
legitimately be long.  At each of the scanning loops, check point hasn't gone
past the limit.
2021-03-29 15:35:50 +00:00
Glenn Morris
7ebd79f3c6 Merge from origin/emacs-27
bcc4cc3362 Doc fixes for 'face-foreground' and 'face-background'.
bf6442fafd ; * admin/make-tarball.txt: Minor addition to the Web page...
38b127d32e * admin/admin.el (set-version): Handle malformed NEWS markup.
0d7e2a993e admin.el fix for bug#47394
fdec444758 ; * etc/NEWS: Fix typo.
1e6ca2765f ; * admin/make-tarball.txt: Another minor addition.

# Conflicts:
#	etc/NEWS
2021-03-29 08:26:25 -07:00
Stefan Kangas
67ef8c36bd Doc fixes in follow.el
* lisp/follow.el:
(follow-pos-visible-in-window-p, follow-adjust-window)
(follow-prev-buffer, follow-internal-force-redisplay):
Minor doc fixes.
2021-03-29 11:31:05 +02:00
Lars Ingebrigtsen
ee3a4e3d1b Fix a dbus.el byte compilation warning
* lisp/net/dbus.el (dbus-register-monitor): Silence a
byte-compilation warning on systems without dbus.
2021-03-28 19:22:15 +02:00
Lars Ingebrigtsen
01cf0eb757 Revert "Clarify dired-do-shell-command doc string"
This reverts commit cf607c262e.

The doc string already explains this.
2021-03-28 17:06:01 +02:00
Lars Ingebrigtsen
cf607c262e Clarify dired-do-shell-command doc string
* lisp/dired-aux.el (dired-do-shell-command): Mention what happens
to FILE-LIST (bug#47432).
2021-03-28 16:01:53 +02:00
Eli Zaretskii
bcc4cc3362 Doc fixes for 'face-foreground' and 'face-background'.
* lisp/faces.el (face-foreground, face-background): Clarify how a
face specified in INHERIT arg is used.  (Bug#47437)
2021-03-28 16:26:21 +03:00
pillule
8b754ca318 compilation-goto-locus does not handle right display-buffer
* lisp/progmodes/compile.el (compilation-goto-locus): Pop to the
source buffer if the match buffer is the selected window (bug#47414).

Copyright-paperwork-exempt: yes
2021-03-28 15:19:47 +02:00
Eli Zaretskii
aceaa0a334 Avoid errors in pulse.el for some face customizations
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Make
sure 'face-background' always returns a color name.  Suggested by
Ingo Lohmar <ingo.lohmar@posteo.net> in bug#47437.
2021-03-28 15:29:41 +03:00
Basil L. Contovounesios
8bf186b229 Demote read-extended-command-predicate errors
For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-03/msg00682.html

* lisp/simple.el (read-extended-command): Demote errors when calling
read-extended-command-predicate so M-x completion doesn't break.
2021-03-27 20:05:10 +00:00
Stefan Monnier
547960488d * lisp/wdired.el (wdired--self-insert): Fix thinko 2021-03-27 14:31:40 -04:00
Stefan Monnier
6838cc50f9 * lisp/wdired.el: Fix minor regressions and simplify a bit
Use `wdired--current-column` more consistently to avoid mayhem when it
doesn't return the same result as `current-column`.

(wdired-get-filename): Fix the unprocessed case.
(wdired-finish-edit): Don't force processing all the lines.
(wdired--col-perm): Remove, redundant with `wdired--perm-beg`.
(wdired-change-to-wdired-mode): Don't error in empty directory.
(wdired--set-permission-bounds): Set `wdired--perm-beg` when we can't
find permissions.  Move `wdired--perm-beg` 1 char further (like
`wdired--col-perm`).  Use `wdired--current-column`.
(wdired--point-at-perms-p): Fix when `wdired--perm-beg` is nil.
(wdired--self-insert): Lookup the keymap to know command to call.
(wdired--before-change-fn): Just use `point` instead of `beg`.
Use `with-silent-modifications` here rather than in each of the
`wdired--preprocess-*` functions.
(wdired--preprocess-files): Presume we're at BOL and within
`with-silent-modifications`.  Fix application of `read-only`.
(wdired-abort-changes): Don't use `with-silent-modifications` since
we're really modifying the buffer.
(wdired--preprocess-symlinks): Presume we're at BOL and within
`with-silent-modifications`.
(wdired--preprocess-perms): Presume we're at BOL and within
`with-silent-modifications`.
(wdired-set-bit): Add `char` argument.  Use `wdired--current-column`.
Copy previous text properties rather than duplicating the code of
`wdired--preprocess-perms`.
(wdired-toggle-bit): Delegate to `wdired-set-bit`.
2021-03-27 11:33:43 -04:00
Arthur Miller
4dbc44550d * lisp/wdired.el: Apply text properties lazily
Entering wdired was taking time proportional to the size of the directory,
making it inconvenient to quickly enter wdired just to rename one or two
files in a large directory.

(wdired-mode-map): Rebind `self-insert-command`.
(wdired--perm-beg, wdired--perm-end): New vars.
(wdired--col-perm, wdired--old-content, wdired--old-point)
(wdired--old-marks): Rename vars, using "--" rather than "-".
All users updated.
(wdired--before-change-fn): New function.
(wdired-change-to-wdired-mode): Use it `before-change-functions`
instead of eagerly putting the various text properties here.
(wdired--set-permission-bounds, wdired--current-column)
(wdired--point-at-perms-p, wdired--line-preprocessed-p):
New auxiliary functions.
(wdired--self-insert): New command.
(wdired--preprocess-files, wdired--preprocess-symlinks)
(wdired--preprocess-perms): Add "--" to the name.  Make it operate only
on the current line.  Use `with-silent-modifications`.
(wdired-abort-changes): Use `with-silent-modifications`.
2021-03-27 09:10:39 -04:00
Matt Armstrong
c4ab173df3 File unlock errors now issue warnings (Bug#46397)
The primary idea is to allow `kill-buffer' and `kill-emacs' to
complete even if Emacs has trouble unlocking the buffer's file.

* lisp/userlock.el (userlock--handle-unlock-error): New function, call
`display-error'.
* src/filelock.c (unlock_file_body): New function, do what
'unlock_file' used to.
(unlock_file_handle_error): New function, call
`userlock--handle-unlock-error' with the captured error.
(unlock_file): Handle `file-error' conditions by calling the handler
defined above.
* test/src/filelock-tests.el (filelock-tests-kill-buffer-spoiled):
(filelock-tests-unlock-spoiled): Modify to test new behavior.
2021-03-27 12:17:31 +03:00
Michael Albinus
c2e72610d2 Improve remote file notifications
* lisp/net/tramp-sh.el (tramp-get-remote-gio-file-monitor): Remove it.
(tramp-sh-handle-file-notify-add-watch): Do not call it.
(tramp-sh-gio-monitor-process-filter): Read monitor name.

* test/lisp/filenotify-tests.el (file-notify--test-read-event)
(file-notify--test-timeout): Change timings.
(file-notify--test-monitor): Read remote monitor name more reliably.
(file-notify-test02-rm-watch): Retrieve remote monitor name in time.
(file-notify--test-event-actions): New defun.
(file-notify--test-with-actions-explainer): Use it.
(file-notify--test-with-actions-check): Use it.  Dump traces in
case of debug.
(file-notify--test-with-actions): Don't stop while debugging.
(file-notify-test03-events, file-notify-test04-autorevert)
(file-notify-test05-file-validity)
(file-notify-test07-many-events, file-notify-test08-backup)
(file-notify-test09-watched-file-in-watched-dir): Adapt tests.
2021-03-26 19:30:05 +01:00
Basil L. Contovounesios
331ddd803a Address some --without-x byte-compilation warnings
These came to light in the contexts of bug#29713 and bug#47234.

* lisp/emulation/edt-mapper.el (edt-xserver):
* lisp/emulation/edt.el (edt-xserver):
* lisp/gnus/gnus-util.el (gnus-rescale-image):
* lisp/gnus/nnimap.el (nnimap-map-port):
* lisp/term/w32-win.el:
* lisp/image.el (image--get-imagemagick-and-warn):
* lisp/frame.el (frame-notice-user-settings): Declare functions that
are known to be present at runtime in GUI builds.
(make-frame-on-display): Signal more informative error when called
interactively in a non-GUI build (bug#29713).
* lisp/international/mule-diag.el (describe-font):
* lisp/org/org-macs.el (org--string-from-props): Pacify warnings
about unknown functions in non-GUI bilds.
* lisp/mh-e/mh-mime.el (mh-small-image-p): Avoid eliminating fboundp
check in non-GUI builds, to pacify unused lexical variable warning.
* lisp/net/newst-plainview.el (newsticker--plainview-tool-bar-map):
* lisp/net/newst-treeview.el (newsticker-treeview-tool-bar-map):
Declare tool-bar-map as a special variable in non-GUI builds.
2021-03-26 17:35:34 +00:00
Stefan Monnier
bc50644137 * lisp/obsolete/tpu-extras.el: Avoid defadvice
(tpu--respect-bottom-scroll-margin): New function, extracted from
`newline`s defadvice.
(newline, newline-and-indent, do-auto-fill): Delete defadvice.
(tpu-set-scroll-margins): Use advice-add instead of
`ad-enable-advice`+`ad-activate`.
Use an explicit arg instead of `called-interactively-p`.
2021-03-26 11:45:31 -04:00
Stefan Monnier
28d0654943 * lisp/mh-e/: Take advice-remove of the newly enabled lexical-binding
* lisp/mh-e/mh-mime.el (mh-mm-inline-message):
* lisp/mh-e/mh-inc.el (mh-inc-spool-generator): Replace `(lambda...)
with a proper closure.
2021-03-26 11:28:03 -04:00
Stefan Monnier
55a7af9123 * lisp/htmlfontify.el: Fix misuses of nconc
(hfy-face-to-style-i): `this` is not known to be fresh.
(hfy--size-to-int): Rename from `hfy--size-to-int` and return just the
integer without wrapping it in a list.
(hfy-flatten-style): Avoid O(n²) problems.  Use `float`.
2021-03-25 12:18:31 -04:00
Bill Wohler
c4e89ac2a2 Remove XEmacs support in lexical-binding
* lisp/mh-e/mh-alias.el (mh-alias-insert-file): Remove reference to
  remove-specifier.
2021-03-25 09:16:23 -07:00
Paul Eggert
b702225619 Merge from origin/emacs-27
deef5efafb ; * ChangeLog.3: Update with the log of the last change.
bd991e3c9b Fix frame-inner-height in non-GUI builds
2021-03-25 08:26:34 -07:00
Michael Albinus
52a7460416 Adapt Tramp file notification support
* lisp/net/tramp-integration.el (tramp-use-ssh-controlmaster-options):
Declare it.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Remove "gvfs-monitor-dir".
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-get-remote-gvfs-monitor-dir): Remove.
(tramp-get-remote-gio-file-monitor): Support also cygwin, and
GFamDirectoryMonitor, GPollFileMonitor.
2021-03-25 12:02:57 +01:00