summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
Commit message (Collapse)AuthorAgeFilesLines
* Partially revert previous define-minor-mode changeLars Ingebrigtsen2020-11-021-6/+4
| | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Only document the values we want to support, not the ones we actually support. (define-minor-mode): Partially revert to previous behaviour.
* * lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Doc typo.Glenn Morris2020-11-011-1/+1
|
* Make minor mode ARG work as documentedLars Ingebrigtsen2020-11-011-9/+19
| | | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Clarify when minor modes are switched on/off when called from lisp (bug#44341). (define-minor-mode): Make calls from Lisp switch the mode on/off as documented.
* Make the -modes variable autoloadedLars Ingebrigtsen2020-10-261-19/+19
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Make the -modes variable be autoloaded.
* Implement a :predicate parameter for globalized minor modesLars Ingebrigtsen2020-10-261-19/+86
| | | | | | | | | * doc/lispref/modes.texi (Defining Minor Modes): Describe the new :predicate keyword (bug#44232). * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Allow a new :predicate keyword. (easy-mmode--globalized-predicate-p): New function.
* * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc tweakStefan Monnier2020-10-101-0/+4
| | | | Try and clarify the meaning of `init-value`.
* Allow customizing hooks defined via define-minor-modeLars Ingebrigtsen2020-09-191-0/+3
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow using Customize on the hooks (bug#10773).
* (define-minor-mode): Don't compute a default :group (bug#41145)Stefan Monnier2020-09-091-10/+1
| | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Rely on the `defcustom`s own defaulting for the :group. * lisp/display-fill-column-indicator.el (global-display-fill-column-indicator-mode): Remove now redundant :group. * lisp/cus-dep.el (custom--get-def): New function. (custom-make-dependencies): Use it.
* Minor mode doc string clarificationLars Ingebrigtsen2020-08-211-1/+4
| | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Clarify that the minor mode hook is called both when enabling and disabling the mode (bug#34073).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fix some &rest body edebug specsLars Ingebrigtsen2019-10-161-1/+1
| | | | | | | | | | | | * lisp/ses.el (ses--letref): * lisp/emacs-lisp/crm.el (crm--completion-command): Fix edebug &rest body spec (bug#28747). * lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): * lisp/emacs-lisp/inline.el (inline--leteval) (inline--letlisteval, inline-letevals):
* Improve docstrings auto-generated by `define-minor-mode'Juanma Barranquero2019-10-051-3/+11
| | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): When using `easy-mmode--arg-docstring' to auto-generate a docstring, refill it up to `emacs-lisp-docstring-fill-column'.
* Revert "Improve docstrings auto-generated by `define-minor-mode'"Juanma Barranquero2019-10-041-11/+5
| | | | | This reverts commit a397fa06d18d6ae37a3a1288f269e1ae9eb3b569. The original change breaks bootstrapping because of a circular dependency.
* Improve docstrings auto-generated by `define-minor-mode'Juanma Barranquero2019-10-041-5/+11
| | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): When using `easy-mmode--arg-docstring' to auto-generate a docstring, refill it up to `emacs-lisp-docstring-fill-column'.
* Make the help page mention the customizeable global mode variableLars Ingebrigtsen2019-10-011-0/+1
| | | | | | | | | | * lisp/help-fns.el (help-fns--customize-variable): Factor out into own function for reuse. (help-fns--globalized-minor-mode): Use it to mention the equivalent variable. * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Mark globalized minor modes as such (bug#7177).
* Respect global-eldoc-mode in minibuffers (Bug#36886)Noam Postavsky2019-08-201-16/+22
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Accept a BODY parameter. * doc/lispref/modes.texi (Defining Minor Modes): Document new parameter. * etc/NEWS: Announce it. * lisp/simple.el (read--expression): Move eldoc-mode setup to... * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): ... here, new function. (global-eldoc-mode): Add or remove it to eval-expression-minibuffer-setup-hook when enabling or disabling global-eldoc-mode. This enables eldoc in the minibuffer (solving Bug#27202), only when global-eldoc-mode is enabled.
* * easy-mmode.el: simplify via custom-current-groupStefan Monnier2019-03-261-6/+0
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Don't try and guess a default :group, defcustom does it better anyway.
* * lisp/emacs-lisp/easy-mmode.el: Fix most obvious bug#34723Stefan Monnier2019-03-131-1/+6
| | | | | (easy-mmode-define-navigation): Don't scroll in the opposite direction of the movement.
* Simplify easy-mmode-define-navigationCharles A. Roelli2019-02-191-3/+1
| | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): Simplify a one-argument call to "or" and use buffer-narrowed-p instead of checking that condition by hand.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Improve doc strings generated by 'easy-mmode-define-navigation'Eli Zaretskii2018-11-091-2/+5
| | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): Include the documentation of prefix argument in the generated doc string.
* | Don't quote self-quoting pcase patternsMichael Heerdegen2018-10-301-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Merge from origin/emacs-26Glenn Morris2018-07-131-12/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 17ebb6e (origin/emacs-26) Use consistent function names in thread-tes... 1c86229 Fix format error in Faccept_process_output b38b91a Lessen stack consumption in recursive read1 3eb4603 Match w32 paths in grep sans --null hits (Bug#32051) 5cc7c4b Fix previous make-network-process change d6a1b69 Another documentation improvement in flyspell.el 9b49a8e Improve documentation of Flyspell 3744fda Provide feature 'threads ef9025f Save the server alias on reconnect (Bug#29657) db3874b Refer to "proper lists" instead of "true lists" 35e0305 Avoid turning on the global-minor-mode recursively 51bf4e4 Fix Bug#32085
| * Avoid turning on the global-minor-mode recursivelyJohn Shahid2018-07-101-12/+16
| | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Clear the buffer-list inside MODE-enable-in-buffers to avoid enabling the mode recursively. (Bug#31793)
* | Optionally add argument description in minor mode DOC (bug#10754)John Shahid2018-07-011-7/+24
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge from origin/emacs-26Paul Eggert2018-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63b04c11d5 Fix copyright years by hand 5c7dd8a783 Update copyright year to 2018 220a9ecba1 Merge from Gnulib 312c565566 Don't add empty keyboard macro to macro ring (Bug#24992) 39ca289a7a Allow customization of decoding of "man" command f8240815ea * etc/NEWS: Add security consideration note on passphrase ... 0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ... acd289c5a4 Fix problems with indexing in User manual b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh... e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846 81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ... 7175496d7a Fix doc string of 'enable-recursive-minibuffers' 5b38406491 Fix documentation of delsel and of killing text # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex
| * Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | Merge from origin/emacs-26Paul Eggert2017-11-021-3/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 460fe4a1bc ; Doc fixes 41adf3281e Avoid duplicate calls to xfree for the same pointer 3e7ebbe1bd Don't clobber docstrings of explicitly-defined mode hook v... 9c8fe0248b Avoid fullscreen ediff control frames by default (Bug#29026) 7d32176acc Fix the bug#24034 change (revno 9eb028f) causing infloop (... ee493663ba Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... ca5eb0d0b7 Fix a typo in the ELisp manual d10c9479ca Fix doc and doc-strings for minibuffer window related func... 18331d00da Fix "Args out of range" error in c-determine-limit. Fixes... edde35e6f8 * lisp/progmodes/perl-mode.el: Fix electric indentation wi... 056587c45f Extend mhtml submode region when in comment 4c4ad80848 Fix mthml submode lighting at end of buffer 557e252aa2 Remember more variables in mhtml-mode 336cd0a11a ; * lisp/select.el (select-enable-primary): Add missing pe... 134099bc90 ; * etc/NEWS (EUDC): Mark as not requiring documentation. 1a340274bf * etc/NEWS (EUDC): Deprecate BBDB 2.x backward compatibility. 4189d0ef7b Fix minibuffer window related docs and strings (Bug#28978) 2ebdde6e9c Add ChkTeX flymake backend for latex-mode 5b59841791 Fix doc typos 82a16c547b Fix some duplicate word typos 266888b1d7 * doc/lispref/commands.texi (Adjusting Point): Fix wording... 00c3c6d88d Avoid segfaults in 64-bit Windows builds a8e6741066 Fix conversion of pixel coordinates to buffer position d43b486f6c Fix doc strings in desktop.el 9102fb603e Add Index to ERT manual 68182a4710 Make manuals and NEWS consistent 451823b0e5 Don't allow (minibuffer-window-active-p nil) to return t cc8f72ca22 Clarify obsolescence message for 'whitespace-tab' 50f711e7fa Fix some duplicate words typos 8bd9524a7c * lisp/button.el (button-activate): Fix doc typo. 0b0d91e60a * lisp/calendar/todo-mode.el (todo-toggle-mark-item): Fix ... e6b4e5ffdf Fix some doc typos e8636ac8cc Fix startup display on Cygwin 3926c5ad83 * src/fileio.c (Fset_default_file_modes): Fix typo in doc ... 9715317dfd * lisp/dired.el (dired-find-alternate-file): Doc fix. (Bu... 9e442a001a Improve documentation of how faces are applied to display ... 1bda71ec3b Improve pixel-scroll-mode 196106d37d Support Certification Authority Authorization in dns-mode.el ec08d70b4f Improve documentation of set-default-file-modes # Conflicts: # etc/NEWS
| * Don't clobber docstrings of explicitly-defined mode hook variablesPhil Sainty2017-10-311-3/+5
| | | | | | | | | | | | * lisp/emacs-lisp/derived.el (define-derived-mode): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): When defining the mode hook variable, do not clobber pre-existing docstrings.
* | Add indent spec to easy-mmode macrosMark Oteiza2017-09-281-0/+2
|/ | | | | | | Ideally these macros should expand to the proper code instead of relegating all the work to a function call. * lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap): (easy-mmode-define-syntax): Add indent spec.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | 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.
* Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | Run admin/update-copyright.
* * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix docstringPhilipp Stephani2016-12-071-3/+4
| | | | | so that it matches the actual implementation. See https://lists.gnu.org/archive/html/help-gnu-emacs/2016-04/msg00071.html
* Wrap the auto-generated doc stringLars Ingebrigtsen2016-05-011-1/+2
| | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Wrap a string to make it less likely that we get overlong lines (bug#17999). (cherry picked from commit 323b69664914d687fd4b48593479cea223dfbcb4)
* Minor fixes in global-auto-composition-modeEli Zaretskii2016-02-151-0/+1
| | | | | | | * lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): Produce prettier names of globalized minor modes. * lisp/composite.el (global-auto-composition-mode): Make it a globalized mode. (Bug#22682)
* Revert commit b1e3d14845517bfa9fa5d6d3840f3ab3160306fdLeo Liu2016-01-071-6/+5
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Don't declare (indent 1).
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Fix docstring quoting problems with ‘ '’Paul Eggert2015-11-171-2/+2
| | | | | | | | | | | | | Problem reported by Artur Malabarba in: http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html Most of these fixes are to documentation; many involve fixing longstanding quoting glitches that are independent of the recent substitute-command-keys changes. The changes to code are: * lisp/cedet/mode-local.el (mode-local-augment-function-help) (describe-mode-local-overload): Substitute docstrings before displaying them. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Quote the generated docstring for later substitution.
* Backslash cleanup in Elisp source filesPaul Eggert2015-09-171-1/+1
| | | | | | | | | | | This patch should not change behavior. It typically omits backslashes where they are redundant (e.g., in the string literal "^\$"). In a few places, insert backslashes where they make regular expressions clearer: e.g., replace "^\*" (equivalent to "^*") with "^\\*", which has the same effect as a regular expression. Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs, and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion with RCS IDs, as that makes it clearer that the backslash is intended.
* In strings, prefer plain ` and ' to \` and \'Paul Eggert2015-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-insert-listified): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): * lisp/ls-lisp.el (ls-lisp-UCA-like-collation) (ls-lisp-string-lessp): * lisp/menu-bar.el (menu-bar-open): * lisp/obsolete/otodo-mode.el (todo-top-priorities): * lisp/progmodes/compile.el (compile): * lisp/progmodes/etags.el (tags-loop-scan): * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation): * lisp/subr.el (posn-actual-col-row): * lisp/term/pc-win.el (x-list-fonts): * lisp/textmodes/texinfmt.el (texinfmt-version): * lisp/textmodes/texnfo-upd.el (texinfo-master-menu): * lisp/time.el (display-time-world-list): * lisp/tmm.el (tmm-menubar): * src/buffer.c (syms_of_buffer): * src/fileio.c (syms_of_fileio): Omit unnecessary and confusing backslash before quote. * lisp/erc/erc.el (erc-cmd-LASTLOG): * lisp/progmodes/flymake.el (flymake-fix-file-name): * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p): Fix string that was intended to escape a backslash and not a quote.
* (define-minor-mode): Use setq-default for :global minor modesStefan Monnier2015-06-171-31/+29
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Use setq-default for :global minor modes (bug#20712).
* emacs-lisp/easy-mmode.el: Clarify mode switch messagesKelly Dean2015-02-171-2/+11
| | | | | * emacs-lisp/easy-mmode.el (define-minor-mode): Clarify mode switch messages for minor modes. (Bug#19690)
* emacs-lisp/easy-mmode.el (define-minor-mode): Clarify docsKelly Dean2015-02-171-3/+6
|
* emacs-lisp/easy-mmode.el: Process macro arguments correctlyKelly Dean2015-02-171-1/+2
| | | | | * emacs-lisp/easy-mmode.el (define-minor-mode): Process macro arguments correctly. (Bug#19685)
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Set `indent' to 1.Oleh Krehel2015-01-301-5/+6
|
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Use mode functionMichael Heerdegen2014-08-291-1/+1
| | | | name instead of variable name in hook docstring. (Bug#18349)
* * emacs-lisp/easy-mmode.el (define-minor-mode): Fix debug spec.Leo Liu2014-02-241-1/+1
|
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|