Skip to content

Commit 40b58a3

Browse files
committed
chore: remove redundant code
1 parent a339c2c commit 40b58a3

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

netlinx-mode.old.el

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -17,48 +17,11 @@
1717

1818
;;; Code:
1919

20-
(require 'treesit)
21-
22-
;; Ensure font-lock file can be loaded
23-
(eval-and-compile
24-
(let ((dir (file-name-directory (or load-file-name buffer-file-name))))
25-
(add-to-list 'load-path dir)))
26-
27-
(require 'netlinx-mode-font-lock)
28-
29-
(declare-function treesit-parser-create "treesit.c")
30-
(declare-function treesit-node-type "treesit.c")
31-
32-
(defgroup netlinx nil
33-
"Major mode for NetLinx using tree-sitter."
34-
:group 'languages
35-
:prefix "netlinx-")
36-
37-
(defcustom netlinx-mode-grammar-location
38-
"https://github.com/Norgate-AV/tree-sitter-netlinx"
39-
"Repository URL for the tree-sitter NetLinx grammar."
40-
:type 'string
41-
:group 'netlinx)
42-
43-
;; Add grammar source on load
44-
(add-to-list 'treesit-language-source-alist
45-
'(netlinx "https://github.com/Norgate-AV/tree-sitter-netlinx"))
46-
47-
(defun netlinx-mode--ensure-grammar ()
48-
"Ensure NetLinx grammar is installed, installing if necessary."
49-
(unless (treesit-language-available-p 'netlinx)
50-
(message "NetLinx: Installing tree-sitter grammar (this may take a minute)...")
51-
(treesit-install-language-grammar 'netlinx)
52-
(message "NetLinx: Grammar installation complete")))
53-
5420
;;;###autoload
5521
(define-derived-mode netlinx-mode prog-mode "NetLinx"
5622
"Major mode for editing NetLinx files with tree-sitter support."
5723
:group 'netlinx
5824

59-
;; Install grammar if needed
60-
(netlinx-mode--ensure-grammar)
61-
6225
(if (treesit-ready-p 'netlinx t)
6326
(progn
6427
;; Create parser
@@ -76,12 +39,4 @@
7639
(treesit-major-mode-setup))
7740
(message "NetLinx: tree-sitter grammar not available. Check *Messages* for errors.")))
7841

79-
;;;###autoload
80-
(add-to-list 'auto-mode-alist '("\\.axs\\'" . netlinx-mode))
81-
82-
;;;###autoload
83-
(add-to-list 'auto-mode-alist '("\\.axi\\'" . netlinx-mode))
84-
85-
(provide 'netlinx-mode)
86-
8742
;;; netlinx-mode.el ends here

0 commit comments

Comments
 (0)