В моем файле. cpp все имеет нормальный отступ до момента, когда я нажимаю точку с запятой ; в следующих строках --- в этот момент emacs отступает до полной длины последнего строка напечатана ...
Как ни странно, этого не произойдет, если я удалю модификатор доступа и объявлю vars int x и int y для любого класса или структуры ..
class Blah {
private int x;
private int y;
private int z;
};
Если я выделю целое поле и нажмите , Emacs рассматривает это как правильный отступ для региона. Кажется, не могу найти что-либо еще связанное с этим, кроме других вопросов о настройки отступа
Дополнительные сведения:
C -hk; приводит к этому описанию, так что, возможно, это связано с этой функцией ---- хотя я не понимаю, потому что описанные отступы относятся к следующей следующей строке, а не к текущему, на котором находится курсор.
; runs the command c-electric-semi&comma (found in c++-mode-map),
which is an interactive compiled Lisp function in ‘cc-cmds.el’.
It is bound to ,, ;.
(c-electric-semi&comma ARG)
Insert a comma or semicolon.
If ‘c-electric-flag’ is non-nil, point isn’t inside a literal and a
numeric ARG hasn’t been supplied, the command performs several electric
actions:
(a) When the auto-newline feature is turned on (indicated by "/la" on
the mode line) a newline might be inserted. See the variable
‘c-hanging-semi&comma-criteria’ for how newline insertion is determined.
(b) Any auto-newlines are indented. The original line is also
reindented unless ‘c-syntactic-indentation’ is nil.
(c) If auto-newline is turned on, a comma following a brace list or a
semicolon following a defun might be cleaned up, depending on the
settings of ‘c-cleanup-list’.