From: Baloff <washdc@wash.edu>
Subject: marrying braket for ?: operator
Date: 28 Jul 2005 15:20:51 +1000 [thread overview]
Message-ID: <878xzr33rg.fsf@wash.edu> (raw)
Hello
when I move my pointer to a braket, it highlight its marring braket.
but how can I get it to do the same with the ternary if-else operator (?:)
I hope this is a good group for this question otherwise please point
me.
--------------------------------------------------
say this .cpp file for example
(i < 10)? \\open 1
(i > 5)? \\open 2
cout << "5 < i < 10" << endl
: \\close 2
cout << "i <= 5" << endl
: \\close 1
cout << "i >= 10" << endl;
--------------------------------------------------
the files below have been copied from some source I don't remember, and I
am not lisp boy at all.
I am coding c++ using emacs and have
(load "~/.emacs-mc394")
in my ~/.emacs
~/.emacs-mc394 looks like this
**************************************************
;; Modified by Mike Hvidsten from MC38J emacs file
;; Feb. 4, 2004
(c-add-style "mc394-style"
'("cc-mode"
(c-basic-offset . 3) ; In general, indent 3 spaces
(c-hanging-braces-alist
(defun-open after)) ; brace that opens a function definition
(c-cleanup-list brace-else-brace
brace-elseif-brace
empty-defun-braces
defun-close-semi
scope-operator)
(c-hanging-braces-alist
; These determine whether a newline appears before
; and/or after a brace in various situations.
(brace-list-open)
(block-open after) ; statement block open brace
(defun-open after) ; brace that opens a function definition
(substatement-open after); the brace that opens a substatement block
(block-close . c-snug-do-while))
(c-hanging-colons-alist
(access-label after)) ; Newline after protected: or private:
(c-hungry-delete-key t))) ; delete black space all at once
;; Variable should be t if we are running xemacs.
(defvar xemacs-p
(string-match "XEmacs" emacs-version))
(if (not xemacs-p)
(progn
(global-font-lock-mode t)
; If using global-font-lock-mode, make control-L update colors
(global-set-key "\C-l"
(function (lambda (arg) (interactive "P")
(font-lock-fontify-block 100)
(recenter arg))))))
(setq auto-mode-alist (append '(("\\.h$" . c++-mode)) auto-mode-alist))
**************************************************
next reply other threads:[~2005-07-28 5:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 5:20 Baloff [this message]
2005-07-28 7:48 ` marrying braket for ?: operator Alan Mackenzie
2005-07-28 20:06 ` Robert Marshall
2005-07-28 20:37 ` Kevin Rodgers
2005-07-28 22:04 ` Alan Mackenzie
2005-07-29 8:22 ` Baloff
2005-07-31 12:20 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878xzr33rg.fsf@wash.edu \
--to=washdc@wash.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).