Insert appropriate line end character like for C
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 34 articles for 0.029 sec
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: David Hansen
Date: Jun 11, 2008 13:58

....net> wrote: `;' is not a "line-end" character in C but a "end-of...care of making sure it's inserted at the appropriate time myself. To be more...(c++-mode . ";") (java-mode . ";"))) (defun dh-insert-eos () (interactive) (let ((eos (assq major-mode dh-eos-alist))) (insert (if eos (cdr eos) "")) ;; Change this if...
Show full article (1.96Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Josh
Date: Jun 11, 2008 12:09

...java-mode or whatever it would insert a ';'. Ideally it would be context...character is. `;' is not a "line-end" character in C but a "... the statement on the next line or not: foo = bar ()         && baz (); David Ok, end of statement is what I was... making sure it's inserted at the appropriate time myself. To ... it, and indents that new line. I can already make Emacs ...
Show full article (2.00Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: David Hansen
Date: Jun 10, 2008 21:17

...emacs command that inserts the appropriate end-of-line character based on mode...java-mode or whatever it would insert a ';'. Ideally it would be ...> it would add a ':' where appropriate, but not elsewhere (and even a... is. `;' is not a "line-end" character in C but a "... Not even a full featured C parser can know if you ... the statement on the next line or not: foo = bar () && baz ...
Show full article (1.10Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: David Hansen
Date: Jun 12, 2008 12:21

... would Emacs be able to indent things appropriately? In python-mode it's aware that a line ending in ':' is special, and so it automatically indents the following line(s), similarly it un-indents the lines ...it's aware of ':' as an important character in python-mode at least. ...just for python-mode, what that special character is. Of course every major-mode implementation...
Show full article (1.17Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Josh
Date: Jun 12, 2008 11:30

...otherwise how would Emacs be able to indent things appropriately? In python-mode it's aware that a line ending in ':' is special, and so it automatically indents the following line(s), similarly it un-indents the lines following a 'return' statement. It's not doing this solely based on ... tested); it's aware of ':' as an important character in python-mode at least. All I'm...
Show full article (0.63Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Josh
Date: Jun 13, 2008 11:37

Hmm, that's annoying. I was hoping to avoid having to go through the code for the modes of all the appropriate modes. I guess it would be simpler to just use the hooks for those modes to add the appropriate behavior separately. :/ Thanks.
Show full article (0.24Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Jason Rumney
Date: Jun 11, 2008 15:03

...t possibly know what my intention is, but it _can_ know what the appropriate end-of-statement character is for the current context. Sure, theoretically it can, but it doesn't. In c-mode and other derived modes, you'd set c-electric-flag to get the sort of behaviour you describe (bound to semi-colons, commas etc, rather than C-S-RET), but it is down to each mode to ...
Show full article (0.56Kb) · Show article thread
Re: Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Thien-Thi Nguyen
Date: Jun 11, 2008 13:20

... to programatically determine what the correct character is. That depends on the programming ... something like: (defvar finish-statement-character '((c-mode . ";") (c++-mode . ";")) "Alist mapping major ...statement-and-start-another () (interactive) (end-of-line) (let ((s (cdr (assq major-mode finish-statement-character)))) (when s (insert s))) (newline-and-indent...
Show full article (0.72Kb) · Show article thread
Insert appropriate line-end character (like ';' for C*)     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Josh
Date: Jun 10, 2008 15:11

...for is a emacs command that inserts the appropriate end-of-line character based on mode. For example, if you're in c-mode or java-mode or whatever it would insert a ';'. Ideally it would be context aware so ... in python-mode it would add a ':' where appropriate, but not elsewhere (and even a ',' if you... I can't figure out is how to determine what the right character is.
Show full article (0.76Kb)
filladapt & c++-mode     

Group: gnu.emacs.help · Group Profile · Search for Insert appropriate line end character like for C in gnu.emacs.help
Author: Florian Kaufmann
Date: Feb 13, 2007 12:41

... filladapt.el: ;;; Adaptive fill ;;; Copyright (C) 1989, 1995-1998 Kyle E.... can extend Filladapt by adding appropriate ;; entries to the following three ...-tolerance nil "*Tolerate filled paragraph lines ending this far from the ... prefix. `spaces' means convert all characters in the token string that ...(delete-region (point-min) (point)) (insert fill-prefix) (add-hook 'filladapt...
Show full article (36.39Kb)
1 · 2 · 3 · 4 · next