#446149 Forcibly enables develock, annoys non-develock users

Package:
develock-el
Source:
develock-el
Submitter:
"Trent W\. Buck"
Date:
2025-05-24 12:09:01 UTC
Severity:
normal
Tags:
#446149#5
Date:
2007-10-10 18:53:34 UTC
From:
To:
Currently, develock (and global font lock mode) is enabled for all
users.  When a multi-user system has both develock and non-develock
users, this annoys the non-develock users -- they have to put extra
code in their emacs to *disable* the feature.  I believe this is quite
difficult because develock creates advice and eval-after-load hooks.

It is more common for Debian site-start files to only set up load-path
and autoloads; I suggest develock-el follow this approach.  To do so,
change

    (cond ((featurep 'xemacs)
           (require 'develock)
           ;; `turn-on-develock' is equivalent to `turn-on-font-lock',
           ;;  except that it does not highlight the startup screen.
           (add-hook 'lisp-interaction-mode-hook 'turn-on-develock)
           (add-hook 'mail-setup-hook 'turn-on-font-lock))
          ((>= emacs-major-version 20)
           (require 'develock)
           (global-font-lock-mode t)))

to

    (autoload 'develock-mode "develock"
      "Toggle Develock mode.
    With ARG, turn Develock on if and only if ARG is positive.
    In Develock mode, highlighting leading and trailing whitespace,
    long lines and oddities."
      t)
    (autoload 'turn-on-develock-mode "develock"
      "Turn on font-lock after splashing the startup screen under XEmacs.
    This function is used for `lisp-interaction-mode-hook' exclusively.")

...and in README.Debian and debian/changelog suggest users who *do*
want develock to add the following to their .emacs:

  (when (locate-library "develock")
    (require 'develock)
    (if (featurep 'xemacs)
        (setq font-lock-auto-fontify t)
      (global-font-lock-mode +1)))

#446149#10
Date:
2012-02-29 10:03:26 UTC
From:
To:
tags 446149 - patch
thanks

I've been using develock-el for teaching and the auto-load feature was
very helpful.

If users want to disable develock-mode by default, they can add this
little line in their ~/.emacs file:

       (setq develock-auto-enable nil)

Using this invocation will stop auto enabling develock-mode at startup.

Regards,

#446149#19
Date:
2025-05-24 12:07:22 UTC
From:
To:
Perhaps this extremely useful information

could go in /usr/share/doc/develock-el/README. And maybe it could even
go in the documentation string for develock-mode.