mirror of
https://codeberg.org/scip/config-general-mode.git
synced 2025-12-17 04:20:57 +01:00
fixed <tab> indenting and disabled dabbrev on comment lines, +C-j no adds comment-char if already inside comment
This commit is contained in:
@@ -216,14 +216,20 @@ indent it and move (point) there."
|
|||||||
"Add a new line below, indent it and move (point) there."
|
"Add a new line below, indent it and move (point) there."
|
||||||
(interactive)
|
(interactive)
|
||||||
(end-of-line)
|
(end-of-line)
|
||||||
(newline-and-indent))
|
(if (eq (get-text-property (point) 'face) 'font-lock-comment-face)
|
||||||
|
(indent-new-comment-line)
|
||||||
|
(newline-and-indent)))
|
||||||
|
|
||||||
(defun config-general-tab-or-complete ()
|
(defun config-general-tab-or-complete ()
|
||||||
"Enter a <TAB> or do a dabbrev completion based on (point) position."
|
"Enter a <TAB>, goto current indentation or do a dabbrev
|
||||||
|
completion based on (point) position."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (looking-back "[-%$_a-zA-Z0-9]")
|
(if (looking-back "[-%$_a-zA-Z0-9]")
|
||||||
(dabbrev-completion)
|
(if (not (eq (get-text-property (point) 'face) 'font-lock-comment-face))
|
||||||
(indent-for-tab-command)))
|
(dabbrev-completion))
|
||||||
|
(if (eq (point) (line-end-position))
|
||||||
|
(indent-for-tab-command)
|
||||||
|
(back-to-indentation))))
|
||||||
|
|
||||||
(defun config-general-toggle-flag ()
|
(defun config-general-toggle-flag ()
|
||||||
"Toggle a value of the list `config-general-toggle-values'."
|
"Toggle a value of the list `config-general-toggle-values'."
|
||||||
|
|||||||
Reference in New Issue
Block a user