diff options
| author | Sacha Chua <sacha@sachachua.com> | 2026-05-01 22:05:41 -0400 |
|---|---|---|
| committer | Sacha Chua <sacha@sachachua.com> | 2026-05-01 22:05:41 -0400 |
| commit | a78061999bbef9e70c001f621d73c2572e2d1cc0 (patch) | |
| tree | 0791ebff9687fcec71062a9643d0c232686aff01 | |
| parent | 987b4f71b0c700a8d1f66a00d8ae81eeef7fbfb1 (diff) | |
| download | emacsconf-el-a78061999bbef9e70c001f621d73c2572e2d1cc0.tar.xz emacsconf-el-a78061999bbef9e70c001f621d73c2572e2d1cc0.zip | |
allow merging with previous if you click on the first word
| -rw-r--r-- | emacsconf-subed.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/emacsconf-subed.el b/emacsconf-subed.el index b3378b5..467ff74 100644 --- a/emacsconf-subed.el +++ b/emacsconf-subed.el @@ -325,8 +325,12 @@ Create it if necessary." (goto-char (posn-point (event-start event))) (skip-syntax-backward "w") (if (derived-mode-p 'subed-mode) - (subed-split-subtitle) - (insert "\n")) + (if (bolp) + (subed-merge-with-previous) + (subed-split-subtitle)) + (if (looking-back "^\\|^\\[.+?\\]: " (line-beginning-position)) + (join-line) + (insert "\n"))) (recenter)) (defun emacsconf-subed-merge-and-unfill () |
