unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Feature Request: Ability to Tweak "/l" in mode-name
@ 2023-02-08  3:57 T.V Raman
  2023-02-08 12:04 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: T.V Raman @ 2023-02-08  3:57 UTC (permalink / raw)
  To: emacs-devel

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  🦮



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-09 15:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08  3:57 Feature Request: Ability to Tweak "/l" in mode-name T.V Raman
2023-02-08 12:04 ` 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

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).