unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "T.V Raman" <raman@google.com>
To: emacs-devel@gnu.org
Subject: Feature Request: Ability to Tweak "/l" in mode-name
Date: Tue, 7 Feb 2023 19:57:21 -0800	[thread overview]
Message-ID: <25571.7585.651274.427720@google.com> (raw)

At present the "/l" vs "/d" for lexical vs dynamic scoping is
hard-wired in the definition of emacs-lisp-mode; Could we make this
configurable?

(define-derived-mode emacs-lisp-mode lisp-data-mode
  `("ELisp"
    (lexical-binding (:propertize "/l"
                      help-echo "Using lexical-binding mode")
                     (:propertize "/d"
                      help-echo "Using old dynamic scoping mode\n\
mouse-1: Enable lexical-binding mode"
		      face warning
		      mouse-face mode-line-highlight
                      local-map ,elisp--dynlex-modeline-map)))
  "Major mode for editing Lisp code to run in Emacs.
Commands:
Delete converts tabs to spaces as it moves back.
Blank lines separate paragraphs.  Semicolons start comments.

When editing Lisp data (as opposed to code), `lisp-data-mode' can
be used instead.

\\{emacs-lisp-mode-map}"
  :group 'lisp
  (defvar project-vc-external-roots-function)
  (setcar font-lock-defaults
          '(lisp-el-font-lock-keywords
            lisp-el-font-lock-keywords-1
            lisp-el-font-lock-keywords-2))
  (setf (nth 2 font-lock-defaults) nil)
  (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
  (if (boundp 'electric-pair-text-pairs)
      (setq-local electric-pair-text-pairs
                  (append '((?\` . ?\') (?\‘ . ?\’))
                          electric-pair-text-pairs))
    (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs))
  (add-hook 'eldoc-documentation-functions
            #'elisp-eldoc-funcall nil t)
  (add-hook 'eldoc-documentation-functions
            #'elisp-eldoc-var-docstring nil t)
  (add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
  (setq-local project-vc-external-roots-function #'elisp-load-path-roots)
  (setq-local syntax-propertize-function #'elisp-mode-syntax-propertize)
  (add-hook 'completion-at-point-functions
            #'elisp-completion-at-point nil 'local)
  (add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
  (add-hook 'flymake-diagnostic-functions
              #'elisp-flymake-byte-compile nil t)
  (add-hook 'context-menu-functions #'elisp-context-menu 10 t))
-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮

--

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮



             reply	other threads:[~2023-02-08  3:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  3:57 T.V Raman [this message]
2023-02-08 12:04 ` Feature Request: Ability to Tweak "/l" in mode-name Eli Zaretskii
2023-02-08 12:30   ` Basil L. Contovounesios
2023-02-08 15:17     ` T.V Raman
2023-02-08 15:22     ` T.V Raman
2023-02-09 11:17       ` Basil L. Contovounesios
2023-02-09 15:22         ` T.V Raman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25571.7585.651274.427720@google.com \
    --to=raman@google.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).