ENH remove excess ampl mode functions
This commit is contained in:
parent
934736390f
commit
35a9eb2e63
52
etc/conf.org
52
etc/conf.org
|
@ -1465,11 +1465,6 @@ Code shamelessly ripped off from [[https://github.com/dpo/ampl-mode/blob/master/
|
||||||
(if ampl-mode-map
|
(if ampl-mode-map
|
||||||
nil
|
nil
|
||||||
(setq ampl-mode-map (make-sparse-keymap))
|
(setq ampl-mode-map (make-sparse-keymap))
|
||||||
(define-key ampl-mode-map "(" 'ampl-insert-parens)
|
|
||||||
(define-key ampl-mode-map "[" 'ampl-insert-sqbrackets)
|
|
||||||
(define-key ampl-mode-map "{" 'ampl-insert-curlies)
|
|
||||||
(define-key ampl-mode-map "\"" 'ampl-insert-double-quotes)
|
|
||||||
(define-key ampl-mode-map "'" 'ampl-insert-single-quotes)
|
|
||||||
(define-key ampl-mode-map "\C-co" 'ampl-insert-comment))
|
(define-key ampl-mode-map "\C-co" 'ampl-insert-comment))
|
||||||
|
|
||||||
(setq auto-mode-alist
|
(setq auto-mode-alist
|
||||||
|
@ -1637,53 +1632,6 @@ Code shamelessly ripped off from [[https://github.com/dpo/ampl-mode/blob/master/
|
||||||
(replace-match ""))
|
(replace-match ""))
|
||||||
(goto-char point-b))))
|
(goto-char point-b))))
|
||||||
|
|
||||||
(defun ampl-insert-parens (arg)
|
|
||||||
"Insert parenthesis pair. See ampl-auto-close-parenthesis."
|
|
||||||
(interactive "p")
|
|
||||||
(if ampl-auto-close-parenthesis
|
|
||||||
(progn
|
|
||||||
(insert "()")
|
|
||||||
(backward-char 1))
|
|
||||||
(insert "(")))
|
|
||||||
|
|
||||||
(defun ampl-insert-sqbrackets (arg)
|
|
||||||
"Insert square brackets pair. See ampl-auto-close-brackets."
|
|
||||||
(interactive "p")
|
|
||||||
(if ampl-auto-close-brackets
|
|
||||||
(progn
|
|
||||||
(insert "[]")
|
|
||||||
(backward-char 1))
|
|
||||||
(insert "[")))
|
|
||||||
|
|
||||||
(defun ampl-insert-curlies (arg)
|
|
||||||
"Insert curly braces pair. See ampl-auto-close-curlies."
|
|
||||||
(interactive "p")
|
|
||||||
(if ampl-auto-close-curlies
|
|
||||||
(progn
|
|
||||||
(insert "{}")
|
|
||||||
(backward-char 1))
|
|
||||||
(insert "{")))
|
|
||||||
|
|
||||||
(defun ampl-insert-double-quotes (arg)
|
|
||||||
"Insert double quotes pair. See ampl-auto-close-double-quotes."
|
|
||||||
(interactive "p")
|
|
||||||
(if ampl-auto-close-double-quote
|
|
||||||
(progn
|
|
||||||
(insert "\"\"")
|
|
||||||
(backward-char 1))
|
|
||||||
(insert "\"")))
|
|
||||||
|
|
||||||
(defun ampl-insert-single-quotes (arg)
|
|
||||||
"Insert single quotes pair. See ampl-auto-close-single-quotes."
|
|
||||||
(interactive "p")
|
|
||||||
(if ampl-auto-close-single-quote
|
|
||||||
(progn
|
|
||||||
(insert "''")
|
|
||||||
(backward-char 1))
|
|
||||||
(insert "'")))
|
|
||||||
|
|
||||||
;; End of user commands
|
|
||||||
|
|
||||||
(setq major-mode 'ampl-mode)
|
(setq major-mode 'ampl-mode)
|
||||||
(setq mode-name "Ampl")
|
(setq mode-name "Ampl")
|
||||||
(use-local-map ampl-mode-map)
|
(use-local-map ampl-mode-map)
|
||||||
|
|
Loading…
Reference in New Issue