Lines Matching +defs:indent +defs:table
30 ;; *cont-indent* is somewhat buggy, that if pressing C-A,Tab, will
43 (require "indent")
99 (:cont-indent . t)
101 ;; Boolean. Move cursor to the indent column after pressing <Enter>?
102 (:newline-indent . t)
110 (:only-newline-indent . nil)
113 ;; This should default to T when newline-indent is not NIL.
116 ;; Boolean. If this hash-table entry is set, no indentation is done.
118 (:disable-indent . nil))
132 (defindent *perl-mode-indent* :main
134 (indtoken "^\\s*" :indent
181 ;; This avoids some problems with *cont-indent* adding an indentation
185 ((:indent :eol)))
190 ((:indent :expression)
206 (:indent :semi)
218 ((:indent :obrace))
219 (setq *indent* (offset-indentation (+ *ind-offset* *ind-length*) :resolve t))
220 (indent-macro-reject-left))
229 (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
230 (indent-macro-reject-left)))
237 (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
238 (indent-macro-reject-left)))
248 (setq *indent* (offset-indentation *ind-offset* :resolve t))
249 (indent-macro-reject-left))
254 ((:indent :obrace))
256 *indent* (- (offset-indentation *ind-offset* :resolve t) *base-indent*))
257 (indent-macro-reject-left))
263 *indent* (- *indent* *base-indent*)
268 (incf *indent* *base-indent*)))
270 (decf *indent* *base-indent*))
273 *cont-indent*
274 (> *indent* 0)
278 (incf *indent* *base-indent*)))
282 (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))))
286 (defun perl-offset-indent (&aux char (point (point)))
288 (while (member (setq char (char-after point)) indent-spaces)
292 (compile 'perl-offset-indent)
295 (defun perl-should-indent (options &aux char point start offset)
296 (when (hash-table-p options)
299 (indent-clear-empty-line))
302 (and (gethash :disable-indent options)
303 (return-from perl-should-indent))
310 ;; if at bol and should indent only when starting a line
311 (and (gethash :only-newline-indent options)
312 (return-from perl-should-indent (= point start)))
316 (return-from perl-should-indent (gethash :newline-indent options)))
320 (return-from perl-should-indent t))
324 (gethash :cont-indent options)
330 (member (char-before offset) indent-spaces))
334 (return-from perl-should-indent t)))
337 (if (member char '(#\})) (return-from perl-should-indent t))
339 ;; Should not indent
342 (compile 'perl-should-indent)
345 (defun perl-indent (syntax syntable)
348 *base-indent*
349 *cont-indent*)
351 (or (perl-should-indent options) (return-from perl-indent))
353 *base-indent* (gethash :indentation options 4)
354 *cont-indent* (gethash :cont-indent options t))
356 (indent-macro
357 *perl-mode-indent*
358 (perl-offset-indent)
361 (compile 'perl-indent)
370 (defmacro perl-q-string-table (start end)
372 *prop-string* #'default-indent
377 (defsyntax *perl-mode* :main nil #'perl-indent *perl-mode-options*
456 (syntable :string *prop-string* #'default-indent
462 (perl-q-string-table "{" "}")
464 (perl-q-string-table "[" "]")
466 (perl-q-string-table "(" ")")
468 (perl-q-string-table "/" "/")
472 (syntable :constant *prop-constant* #'default-indent
478 (syntable :shell *prop-shell* #'default-indent
491 (syntable :heredoc *prop-documentation* #'default-indent