summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add-minor-mode doc string clarificationLars Ingebrigtsen2021-02-131-1/+2
| | | | | * lisp/subr.el (add-minor-mode): Clarify that this function isn't only about XEmacs compat stuff.
* Delete 20 year old comment in executable.elStefan Kangas2021-02-131-7/+1
| | | | | * lisp/progmodes/executable.el (executable-insert): Delete 20 year old comment.
* Remove redundant :group args in progmodes/*.elStefan Kangas2021-02-1321-320/+148
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/bug-reference.el: * lisp/progmodes/cfengine.el: * lisp/progmodes/cmacexp.el: * lisp/progmodes/cpp.el: * lisp/progmodes/cwarn.el: * lisp/progmodes/dcl-mode.el: * lisp/progmodes/executable.el: * lisp/progmodes/flymake.el: * lisp/progmodes/gud.el: * lisp/progmodes/hideshow.el: * lisp/progmodes/icon.el: * lisp/progmodes/inf-lisp.el: * lisp/progmodes/js.el: * lisp/progmodes/ld-script.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/pascal.el: * lisp/progmodes/perl-mode.el: * lisp/progmodes/prog-mode.el: * lisp/progmodes/simula.el: * lisp/progmodes/xscheme.el: Remove redundant :group args.
* Edebug: Make it possible to debug `gv-expander`s in `declare`Stefan Monnier2021-02-124-4/+30
| | | | | | | | | | | | | | | | | Arrange for declarations to be able to specify their own specs via the `edebug-declaration-spec` property. * lisp/emacs-lisp/edebug.el: (edebug--get-declare-spec): New function. (def-declarations): New spec element. (defun, defmacro): Use it in their spec. * lisp/emacs-lisp/gv.el (gv-expander, gv-setter): Set `edebug-declaration-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-gv-expander): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-use-gv-expander): New test case.
* Comment out mysterious code from cperl-mode.elStefan Kangas2021-02-131-3/+6
| | | | | | | * lisp/progmodes/cperl-mode.el: Comment out mysterious code referring to some unknown variable 'edit-var-mode-alist'. No one seems to know what it is used for, so comment it out and see if anyone complains before Emacs 28.1 or 28.2.
* Remove outdated documentation from cperl-mode.elStefan Kangas2021-02-131-57/+12
| | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-tips, cperl-problems) (cperl-praise, cperl-speed, cperl-mode): Doc fixes; remove references to very old versions of Emacs and other "Emaxen". (cperl-problems-old-emaxen): Make obsolete and remove information on Emacs 20.3 and older.
* Edebug: Overload `edebug-form-spec` even lessStefan Monnier2021-02-1210-238/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `edebug-form-spec` symbol property was used both to map forms's head symbol to the corresponding spec, and to map spec element names to their expansion. This lead to name conflicts which break instrumentation of examples such as (cl-flet ((gate (x) x)) (gate 4)) because of the Edebug spec element `gate`. So introduce a new symbol property `edebug-elem-spec`. * lisp/subr.el (def-edebug-elem-spec): New function. * lisp/emacs-lisp/edebug.el (edebug--get-elem-spec): New function. (edebug-match-symbol): Use it. (Core Edebug elems): Put them on `edebug-elem-spec` instead of `edebug-form-spec`. (ELisp special forms): Set their `edebug-form-spec` via dolist. (Other non-core Edebug elems): Use `def-edebug-elem-spec`. (edebug-\`): Use `declare`. * lisp/emacs-lisp/pcase.el (pcase-PAT, pcase-FUN, pcase-QPAT): * lisp/skeleton.el (skeleton-edebug-spec): * lisp/emacs-lisp/cl-macs.el: Use `def-edebug-elem-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests--conflicting-internal-names): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-cl-flet1): New test case. * doc/lispref/edebug.texi (Specification List): Add `def-edebug-elem-spec`. (Specification Examples): Use it. * doc/lispref/loading.texi (Hooks for Loading): Avoid the use of `def-edebug-spec` in example (better use `debug` declaration).
* Remove XEmacs and Emacs 21 compat code from cperl-modeStefan Kangas2021-02-131-19/+20
| | | | | | | * lisp/progmodes/cperl-mode.el (cperl-mode): Remove XEmacs and Emacs 21 compat code. (cperl-compilation-error-regexp-list): New variable. (cperl-compilation-error-regexp-alist): Make obsolete.
* Fix ElDoc setup for eval-expressionBasil L. Contovounesios2021-02-121-1/+2
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Don't set global value of eldoc-documentation-strategy (bug#44886).
* Use `declare` instead of `def-edebug-spec` in most placesStefan Monnier2021-02-1225-220/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/speedbar.el: Use lexical-binding. (speedbar-with-writable): Use `declare`. * lisp/subr.el (def-edebug-spec): Use `declare`. * lisp/cedet/ede/base.el: Use lexical-binding. (ede-with-projectfile): Use `declare`. (recentf-exclude): Declare var. * lisp/cedet/ede/pmake.el: Use lexical-binding. (ede-pmake-insert-variable-shared, ede-pmake-insert-variable-once): Use `declare`. * lisp/cedet/ede/proj-comp.el: Use lexical-binding. (ede-compiler-begin-unique, ede-compiler-only-once) (ede-linker-begin-unique, ede-linker-only-once): Use `declare`. * lisp/cedet/semantic/ctxt.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-context) (semantic-with-buffer-narrowed-to-command): Use `declare`. (semantic--progress-reporter): Declare var. (semantic-ctxt-end-of-symbol-default): Remove unused var `fieldsep`. * lisp/cedet/semantic/lex-spp.el: Use lexical-binding. (define-lex-spp-macro-declaration-analyzer) (define-lex-spp-include-analyzer, semantic-lex-with-macro-used) (define-lex-spp-macro-undeclaration-analyzer): Use `declare`. (semantic-lex-spp-symbol-remove): Rename arg to avoid colliding with dynamic variable `obarray`. (semantic-lex-spp-symbol-pop): Remove unused var `oldvalue`. (semantic-lex-spp-lex-text-string): Remove unused var `analyzer`. * lisp/cedet/semantic/lex.el (define-lex) (semantic-lex-unterminated-syntax-protection, define-lex-analyzer) (define-lex-regex-analyzer, define-lex-block-analyzer) (semantic-lex-catch-errors): Use `declare`. * lisp/cedet/semantic/tag.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-current-tag) (semantic-with-buffer-narrowed-to-tag): Use `declare`. * lisp/cedet/semantic/wisent.el: Use lexical-binding. (define-wisent-lexer): Use `declare`. * lisp/emacs-lisp/cl-lib.el (cl-pushnew): The arg to :test can be any form not just function form. * lisp/org/ob-comint.el (org-babel-comint-in-buffer) (org-babel-comint-with-output): Use `declare`. * lisp/org/ob-core.el (org-babel-map-src-blocks): Use `declare`. (org-babel-result-cond): Simplify edebug spec. * lisp/org/org-clock.el (org-with-clock-position, org-with-clock): * lisp/org/org-agenda.el (org-agenda-with-point-at-orig-entry): * lisp/org/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`. * lisp/textmodes/rst.el (push): Remove redundant edebug spec. * lisp/vc/pcvs-parse.el: Use lexical-binding. (cvs-parse-buffer): Rename arg to avoid dynbound conflict. (cvs-or): Use `declare`.
* Simplify expression in byte-code decompilerMattias Engdegård2021-02-121-4/+1
| | | | | * lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): Replace roundabout expression with what it essentially does.
* byte-opt.el: More concise expressionMattias Engdegård2021-02-121-10/+9
| | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Refactor `setq` clause.
* Avoid traversing dead `if` branches in bytecode optimiserMattias Engdegård2021-02-121-32/+32
| | | | | | | | | | | | | | | | | | | | There is no point in traversing conditional branches that are statically known never to be executed. This saves some optimisation effort, but more importantly prevents variable assignments and references in those branches from blocking effective constant propagation. Also attempt to traverse as much as possible in an unconditional context, which enables constant-propagation through (linear) assignments. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Rewrite the (tail) recursion into an explicit loop. Normalise a return value of (quote nil) to nil, for easier subsequent optimisations. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't traverse dead `if` branches. Use unconditional traversion context when possible.
* Don't inline tramp-debug-messageMattias Engdegård2021-02-121-1/+1
| | | | | | | * lisp/net/tramp.el (tramp-debug-message): Change defsubst into defun. Until now the byte-compiler hasn't been clever enough to inline this function but this is about to change; the code expansion is unnecessary and makes compiler improvements more difficult to gauge.
* ; Fix typo in last change to m4-mode.el.Basil L. Contovounesios2021-02-121-1/+1
|
* ; Fix recent regexp-opt conversion in cperl-modeStefan Kangas2021-02-121-2/+2
| | | | | | * lisp/progmodes/cperl-mode.el (cperl-init-faces): Add missing identifiers found by static analysis of recent change. Thanks to Mattias Engdegård <mattiase@acm.org>.
* Use regexp-opt for font lock defaults in meta-mode.elStefan Kangas2021-02-121-61/+36
| | | | | | * lisp/progmodes/meta-mode.el: Remove redundant :group args. (meta-font-lock-keywords): Use regexp-opt.
* Minor cleanups in scheme.elStefan Kangas2021-02-121-16/+9
| | | | | * lisp/progmodes/scheme.el: Remove redundant :group args. (dsssl-font-lock-keywords): Use regexp-opt.
* Add font locking for many missing macros in m4-modeStefan Kangas2021-02-121-23/+27
| | | | | | * lisp/progmodes/m4-mode.el (m4--macro-list): New variable. (m4-font-lock-keywords): Use regexp-opt and add many missing macros sourced from the M4 manual.
* * lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op) <&lookup>: New methodStefan Monnier2021-02-124-33/+50
| | | | | | | | | * doc/lispref/edebug.texi (Specification List): Document it. * lisp/emacs-lisp/pcase.el (pcase-PAT): Use it. (pcase-MACRO): Remove Edebug element. (pcase--get-edebug-spec): New function. (pcase--edebug-match-macro): Remove function.
* * lisp/emacs-lisp/cl-macs.el (cl-flet): Fix edebug specStefan Monnier2021-02-121-1/+1
|
* * lisp/emacs-lisp/edebug.el: Misc cleanups.Stefan Monnier2021-02-123-69/+65
| | | | | | | | | | | | | | | | | | Move all definitions under the `edebug-` prefix. (edebug-get-spec): Rename from `get-edebug-spec`. (edebug-move-cursor): Use `cl-callf`. (edebug-spec-p): Remove unused function. (def-edebug-spec, edebug-spec-list, edebug-spec): Remove unused specs (nothing in there gets instrumented anyway). (edebug-tracing): Use `declare`. (edebug-cancel-on-entry): Rename from `cancel-edebug-on-entry`. (edebug-global-prefix): Rename from `global-edebug-prefix`. (edebug-global-map): Rename from `global-edebug-map`. * lisp/emacs-lisp/pcase.el (pcase-PAT): Remove `let`. (let): Use `declare` instead. (pcase--edebug-match-macro): Use new name `edebug-get-spec`.
* Remove Motif supportRobert Pluim2021-02-122-5/+7
| | | | | | * configure.ac: Remove support for configuring --with-x-toolkit=motif * etc/NEWS: Mention removal of Motif support.
* Allow minor modes to specify major modes they're useful inLars Ingebrigtsen2021-02-121-0/+5
|
* * lisp/emacs-lisp/gv.el (gv-place): SimplifyStefan Monnier2021-02-111-1/+1
|
* * lisp/cedet/semantic/symref/: Use lexical-bindingStefan Monnier2021-02-116-11/+13
| | | | | | | | | * lisp/cedet/semantic/symref/cscope.el: * lisp/cedet/semantic/symref/filter.el: * lisp/cedet/semantic/symref/global.el: * lisp/cedet/semantic/symref/grep.el: * lisp/cedet/semantic/symref/idutils.el: * lisp/cedet/semantic/symref/list.el: Use lexical-binding.
* * lisp/cedet/semantic/decorate/: Use lexical-binding in all filesStefan Monnier2021-02-112-7/+7
| | | | | | * lisp/cedet/semantic/decorate/include.el (semantic-decoration-fileless-include-describe): Remove unused var `mm`. * lisp/cedet/semantic/decorate/mode.el: Use lexical-binding.
* Make recursive minibuffers and recursive edits work togetherAlan Mackenzie2021-02-115-59/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/minibuffer.el (exit-minibuffer): When in a minibuffer, throw an error should the command loop nesting level be wrong. * src/lisp.h (minibuffer_quit_level): declare as an extern. (command_loop_level): Move definition from src/window.h * src/window.h (command_loop_level): move definition to src/lisp.h. * src/eval.c (minibuffer_quit_level): Move this variable to file level from being a static inside internal_catch. (internal_catch): Simplify the logic. * src/minibuf.c (Vcommand_loop_level_list): New variable. (move_minibuffer_onto_frame): Set the major mode of *Minibuf-0*. (Fminibuffer_innermost_command_loop_p): New primitive. (Fabort_minibuffers): Check the command loop level before throwing t to 'exit, and set minibuffer_quit_level too. (read_minibuf): New variable calling_window. Before stacking up minibuffers on the current mini-window, check that the mini-window is not the current one. Do not call choose_minibuf_frame from read_minibuf's unwinding process. Bind calling_frame and calling_window over the recursive edit. Set the new minibuffer's major mode directly. Remove the switching away from the minibuffer after the recursive edit. (get_minibuffer): Record the command loop level in new variable Vcommand_loop_level_list. No longer set the major mode of a returned minibuffer. (minibuf_c_loop_level): New function. (read_minibuf_unwind): New variables calling_frame, calling_window are unbound from the binding stack. Remove old variable `window', which could not be set reliably to the expired mini-window. The expired minibuffer is determined as the nth in the list, rather than the contents of the current or previous mini-window. Switch the current window away from the mini-window here (moved from read_minibuf).
* Use lexical-binding in erc-sound.elStefan Kangas2021-02-111-5/+2
| | | | | * lisp/erc/erc-sound.el: Use lexical-binding. Remove redundant :group args.
* Drop XEmacs and SXEmacs support from EDEStefan Kangas2021-02-111-25/+0
| | | | | * lisp/cedet/ede/emacs.el (ede-emacs-version): Drop XEmacs and SXEmacs support from EDE.
* Use lexical-binding in various ede filesStefan Kangas2021-02-119-12/+11
| | | | | | | | | | | | * lisp/cedet/ede/dired.el: * lisp/cedet/ede/emacs.el: * lisp/cedet/ede/make.el: * lisp/cedet/ede/proj-archive.el: * lisp/cedet/ede/proj-aux.el: * lisp/cedet/ede/proj-misc.el: * lisp/cedet/ede/proj-scheme.el: * lisp/cedet/ede/srecode.el: * lisp/cedet/ede/system.el: Use lexical-binding.
* Use lexical-binding in wid-browse.elStefan Kangas2021-02-111-17/+6
| | | | | | | * lisp/wid-browse.el: Use lexical-binding. (widget-browse-mode): Use define-derived-mode. (widget-browse-mode-hook): Remove redundant :group arg. (widget-browse-action, widget-browse-value-create): Doc fixes.
* * lisp/ps-samp.el: Use lexical-binding.Stefan Kangas2021-02-111-1/+1
|
* Fix two Emacs version references in misc manualsStefan Kangas2021-02-112-2/+4
| | | | | | | * doc/misc/forms.texi: Fix reference to Emacs version. * doc/misc/remember.texi: Fix version reference to indicate Emacs version instead of version of remember. The corresponding version variable and header have been marked obsolete.
* ; Fix lexical-binding conversion of semantic/bovine/gcc.elStefan Kangas2021-02-111-2/+3
| | | | | * lisp/cedet/semantic/bovine/gcc.el (semantic-gcc-get-include-paths): Fix sorting and comparison after previous lexical-binding conversion.
* Fix Octave double-quoted string line continuationsBasil L. Contovounesios2021-02-113-24/+39
| | | | | | | | | | | | | | * lisp/progmodes/octave.el (octave-string-continuation-marker): New defconst after octave-continuation-string. (octave-continuation-string): Mention it in docstring. (octave-maybe-insert-continuation-string): Mark unused function as obsolete. (octave-help-function): Simplify action. (octave--indent-new-comment-line): Insert octave-string-continuation-marker instead of octave-continuation-string within double-quoted strings (bug#46420). (octave-indent-new-comment-line): * etc/NEWS: Describe new behavior.
* Use frame monitor in frame_floatAndrii Kolomoiets2021-02-111-2/+2
| | | | | * src/frame.c (frame_float): Use frame monitor attributes instead of attributes of the main monitor (bug#46406).
* Avoid having erc in irrelevant finder categoriesStefan Kangas2021-02-1115-15/+15
| | | | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el: * lisp/erc/erc-button.el: * lisp/erc/erc-dcc.el: * lisp/erc/erc-identd.el: * lisp/erc/erc-join.el: * lisp/erc/erc-lang.el: * lisp/erc/erc-log.el: * lisp/erc/erc-match.el: * lisp/erc/erc-menu.el: * lisp/erc/erc-pcomplete.el: * lisp/erc/erc-replace.el: * lisp/erc/erc-spelling.el: * lisp/erc/erc-stamp.el: * lisp/erc/erc-track.el: * lisp/erc/erc-xdcc.el: Remove irrelevant entries in Keywords header.
* * lisp/progmodes/cperl-mode.el (cperl-init-faces): Use regexp-opt.Stefan Kangas2021-02-111-100/+59
|
* * lisp/play/decipher.el: Use lexical-bindingStefan Monnier2021-02-101-50/+34
| | | | | | (decipher-mode-syntax-table): Move initialization into declaration. (decipher-mode, decipher-stats-mode): Use `define-derived-mode`. (decipher-stats-buffer): Use `buffer-local-value`.
* * lisp/leim/quail: Use lexical-bindingStefan Monnier2021-02-1010-40/+41
| | | | | | | | | | | | | | * lisp/leim/quail/hangul.el: * lisp/leim/quail/indian.el: * lisp/leim/quail/ipa.el: * lisp/leim/quail/japanese.el: * lisp/leim/quail/lao.el: * lisp/leim/quail/latin-ltx.el: * lisp/leim/quail/lrt.el: * lisp/leim/quail/sisheng.el: * lisp/leim/quail/thai.el: * lisp/leim/quail/tibetan.el: Use lexical-binding. * lisp/leim/quail/uni-input.el (ucs-input-method): Remove unused var `str`.
* * lisp/leim/quail: Use lexical-bindingStefan Monnier2021-02-101-7/+7
| | | | | | | | | | | | | | * lisp/leim/quail/hangul.el: * lisp/leim/quail/indian.el: * lisp/leim/quail/ipa.el: * lisp/leim/quail/japanese.el: * lisp/leim/quail/lao.el: * lisp/leim/quail/latin-ltx.el: * lisp/leim/quail/lrt.el: * lisp/leim/quail/sisheng.el: * lisp/leim/quail/thai.el: * lisp/leim/quail/tibetan.el: Use lexical-binding. * lisp/leim/quail/uni-input.el (ucs-input-method): Remove unused var `str`.
* * lisp/subr.el (combine-change-calls-1): Don't presume integer argsStefan Monnier2021-02-101-0/+2
| | | | | This avoids problems where the `after-change-functions` end up called with the new length rather than the old length.
* * lisp/emacs-lisp/macroexp.el (macroexp--fgrep): Break cyclesStefan Monnier2021-02-102-14/+65
| | | | * test/lisp/emacs-lisp/macroexp-tests.el: New file.
* Fix ediff even/odd faces to increase their contrast and readabilityJuri Linkov2021-02-101-14/+28
| | | | | | | | | * lisp/vc/ediff-init.el (ediff-even-diff-A, ediff-even-diff-B) (ediff-even-diff-C, ediff-even-diff-Ancestor, ediff-odd-diff-A) (ediff-odd-diff-B, ediff-odd-diff-C): Add :distant-foreground "Black" for light background. For dark background add :distant-foreground "White", and use darker shades of grey for background colors (bug#46396).
* Fix build problem with previous facemenu changeLars Ingebrigtsen2021-02-102-5/+4
| | | | | | * lisp/facemenu.el (facemenu-add-face-function): Move to avoid a warning. (list-colors-display): Autoload.
* Simplify and speed up after-find-filePaul Eggert2021-02-101-10/+7
| | | | | | | | | | | Use newer primitives like file-accessible-directory-p to simplify and speed up longstanding code in after-find-file. * lisp/files.el (after-find-file): Prefer file-exists-p + file-symlink-p to file-attributes + file-symlink-p + file-chase-links + file-exists-p. Prefer file-accessible-directory-p to directory-file-name + file-attributes. Prefer file-directory-p to file-name-directory + file-exists-p.
* Fix file lock issue (Bug#46397)Paul Eggert2021-02-101-1/+1
| | | | | * src/filelock.c (current_lock_owner): Also treat ENOTDIR as meaning the lock file does not exist.
* Remove the 'M-o' ('facemap-keymap') binding experimentallyLars Ingebrigtsen2021-02-106-16/+47
| | | | | | | | | | | | | | * doc/lispref/maps.texi (Standard Keymaps): * doc/lispref/keymaps.texi (Prefix Keys): Remove mentions. * etc/facemenu-removal.txt: New temporary file. * lisp/loadup.el: Don't load facemenu.el. (removed-facemenu-command): New command. (facemenu-keymap-restore): New function. * lisp/textmodes/text-mode.el (center-paragraph): Remove binding. (center-line): Remove binding.
* * lisp/emacs-lisp/edebug.el: Tweak last changeStefan Monnier2021-02-101-37/+22
| | | | | | | | | | | | | | | Use generic functions i.s.o `edebug--spec-op-function`. <toplevel>: No need to register the &foo and :foo handler any more. (edebug--handle-&-spec-op, edebug--handle-:-spec-op): New generic functions. (edebug-match-specs): Use them. (edebug--get-spec-op): Remove function. (edebug-match-&optional, edebug-match-&rest, edebug-match-&or) (edebug-match-&not, edebug-match-&key, edebug-match-&error) (edebug-match-&define): Turn functions into methods of `edebug--handle-&-spec-op`. (edebug-match-:name, edebug-match-:unique): Turn functions into methods of `edebug--handle-:-spec-op`.