The original goal was to remove the remaining use of defadvice (in ergoemacs-advice) but that proved to be dead code, and then I checked the resulting compiler warnings, etc...
Prefer #' to quote function names.
Remove dummy unwind-protect without any unwind forms. Avoid deprecated point-at-bol/eol.
Fix some uses of ' in docstrings.
Also fix a misunderstanding: inhibit-point-motion-hooks is not used by the command loop's point adjustment code, it's only used by the low-level point-motion hooks (those implemented deep inside the C code of goto-char and friends, and which have been deprecated since Emacs-25 because running arbitrary ELisp code from within goto-char is too problematic).
ergoemacs-macros.el (ergoemacs-save-buffer-state): Make it an obsolete alias of with-silent-modifications. Update all callers. (ergoemacs-translation): Simplify kb initialization and remove unneeded progn.
(ergoemacs-advice): Delete unused macro.
ergoemacs-layouts.el: Fix typo in the lexical-binding cookie.
(ergoemacs-layout--regexp): Remove unused var reg.
(ergoemacs-layout-describe): Remove unused vars alias and pt.
ergoemacs-test.el: Require packages, to reduce compiler warnings. (): Don't quote lambda; don't let-bind unused ergoemacs-is-user-defined-map-change-p; and don't specify interactive for a function only used on a hook.
(ergoemacs-use-function-remapping): Declare var as dynamic. (ergoemacs-test): Remove unused var ret and test. (ergoemacs-test-ignore-ctl-w): Remove unused var ret. (ergoemacs-test--dired-sort-map): New var extracted from ergoemacs-test-dired-sort-files.
(ergoemacs-test--dired-hook): New function extracted from ergoemacs-test-dired-sort-files.
(ergoemacs-test-dired-sort-files): Use them to simplify the code by reducing duplication.
ergoemacs-mode.el (ergoemacs-mode): Remove spurious nil arg before the keyword arguments.
(ergoemacs-setup-override-keymap): Don't abuse add-hook on a non-hook.
(ergoemacs-remove-override-keymap): Don't abuse remove-hook on a non-hook.
ergoemacs-mapkeymap.el (ergoemacs-map-keymap): Remove unused/constant var calc-parent-p.
ergoemacs-map.el (ergoemacs-map--alist): Merge two prog1.
ergoemacs-functions.el (ergoemacs-delete-char): Delete one of the two duplicate definitions.
(ergoemacs-run-clean): Remove unused/constant rm-batch variable and associated dead code. Use derived-mode-p.
(ergoemacs-use-beginning-or-end-of-line-only): Fix wrong const format in the :type.
(ergoemacs-beginning-of-line-or-what): beginning-of-buffer is for interactive use only.
(ergoemacs-maximum-number-of-file-to-open): Fix typo in :type. (ergoemacs-camelize-method): Don't quote lambda.
ergoemacs-command-loop.el (ergoemacs-command-loop--decode-event): Comment out unused var timeout-key.
(ergoemacs-command-loop--point-motion-hooks): Don't test inhibit-point-motion-hooks.
(ergoemacs-command-loop--internal): Don't set
inhibit-point-motion-hooks.
ergoemacs-advice.el: Require ergoemacs-command-loop.
(ergoemacs--temporary-disable): Declare var as dynamic.
The original goal was to remove the remaining use of
defadvice
(inergoemacs-advice
) but that proved to be dead code, and then I checked the resulting compiler warnings, etc...Prefer #' to quote function names. Remove dummy
unwind-protect
without any unwind forms. Avoid deprecatedpoint-at-bol/eol
. Fix some uses of ' in docstrings.Also fix a misunderstanding:
inhibit-point-motion-hooks
is not used by the command loop's point adjustment code, it's only used by the low-level point-motion hooks (those implemented deep inside the C code ofgoto-char
and friends, and which have been deprecated since Emacs-25 because running arbitrary ELisp code from withingoto-char
is too problematic).ergoemacs-macros.el (ergoemacs-save-buffer-state): Make it an obsolete alias of
with-silent-modifications
. Update all callers. (ergoemacs-translation): Simplifykb
initialization and remove unneededprogn
. (ergoemacs-advice): Delete unused macro.ergoemacs-theme-engine.el (ergoemacs-describe-key): Fix typo.
ergoemacs-layouts.el: Fix typo in the
lexical-binding
cookie. (ergoemacs-layout--regexp): Remove unused varreg
. (ergoemacs-layout-describe): Remove unused varsalias
andpt
.ergoemacs-test.el: Require packages, to reduce compiler warnings. (): Don't quote
lambda
; don't let-bind unusedergoemacs-is-user-defined-map-change-p
; and don't specifyinteractive
for a function only used on a hook. (ergoemacs-use-function-remapping): Declare var as dynamic. (ergoemacs-test): Remove unused varret
andtest
. (ergoemacs-test-ignore-ctl-w): Remove unused varret
. (ergoemacs-test--dired-sort-map): New var extracted fromergoemacs-test-dired-sort-files
. (ergoemacs-test--dired-hook): New function extracted fromergoemacs-test-dired-sort-files
. (ergoemacs-test-dired-sort-files): Use them to simplify the code by reducing duplication.ergoemacs-mode.el (ergoemacs-mode): Remove spurious
nil
arg before the keyword arguments. (ergoemacs-setup-override-keymap): Don't abuseadd-hook
on a non-hook. (ergoemacs-remove-override-keymap): Don't abuseremove-hook
on a non-hook.ergoemacs-mapkeymap.el (ergoemacs-map-keymap): Remove unused/constant var
calc-parent-p
.ergoemacs-map.el (ergoemacs-map--alist): Merge two
prog1
.ergoemacs-functions.el (ergoemacs-delete-char): Delete one of the two duplicate definitions. (ergoemacs-run-clean): Remove unused/constant
rm-batch
variable and associated dead code. Usederived-mode-p
. (ergoemacs-use-beginning-or-end-of-line-only): Fix wrongconst
format in the:type
. (ergoemacs-beginning-of-line-or-what):beginning-of-buffer
is for interactive use only. (ergoemacs-maximum-number-of-file-to-open): Fix typo in:type
. (ergoemacs-camelize-method): Don't quotelambda
.ergoemacs-command-loop.el (ergoemacs-command-loop--decode-event): Comment out unused var
timeout-key
. (ergoemacs-command-loop--point-motion-hooks): Don't testinhibit-point-motion-hooks
. (ergoemacs-command-loop--internal): Don't setinhibit-point-motion-hooks
.ergoemacs-advice.el: Require
ergoemacs-command-loop
. (ergoemacs--temporary-disable): Declare var as dynamic.