mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Restore missing c++ lineup-arglist advice
This commit is contained in:
@ -1,5 +1,18 @@
|
||||
;;; lang/cc/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +cc*lineup-arglist (orig-fun &rest args)
|
||||
"Improve indentation of continued C++11 lambda function opened as argument."
|
||||
(if (and (eq major-mode 'c++-mode)
|
||||
(ignore-errors
|
||||
(save-excursion
|
||||
(goto-char (c-langelem-pos langelem))
|
||||
;; Detect "[...](" or "[...]{". preceded by "," or "(",
|
||||
;; and with unclosed brace.
|
||||
(looking-at-p ".*[(,][ \t]*\\[[^]]*\\][ \t]*[({][^}]*$"))))
|
||||
0 ; no additional indent
|
||||
(apply orig-fun args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +cc/autoclose->-maybe ()
|
||||
"For some reason smartparens won't autoskip >'s, this hack does."
|
||||
|
Reference in New Issue
Block a user