SECTION READERS
----------------------------------
-TUTORIAL cyd
-TUTORIAL.bg ogi
-TUTORIAL.cn xfq
+TUTORIAL
+TUTORIAL.bg
+TUTORIAL.cn
TUTORIAL.cs
-TUTORIAL.de wl
+TUTORIAL.de
TUTORIAL.eo
TUTORIAL.es
TUTORIAL.fr
-TUTORIAL.he eliz
+TUTORIAL.he
TUTORIAL.it
TUTORIAL.ja
TUTORIAL.ko
-TUTORIAL.nl Pieter Schoenmakers
+TUTORIAL.nl
TUTORIAL.pl
TUTORIAL.pt_BR
TUTORIAL.ro
-TUTORIAL.ru Alex Ott
+TUTORIAL.ru
TUTORIAL.sk
-TUTORIAL.sl Primoz PETERLIN
-TUTORIAL.sv Mats Lidell
+TUTORIAL.sl
+TUTORIAL.sv
TUTORIAL.th
TUTORIAL.zh
minibuf.texi
modes.texi
nonascii.texi
-numbers.texi Paul Eggert (24.4)
+numbers.texi
objects.texi
os.texi
package.texi
@cindex mode, Whitespace
@findex whitespace-mode
@vindex whitespace-style
+@findex whitespace-toggle-options
Whitespace mode is a buffer-local minor mode that lets you
visualize many kinds of whitespace in the buffer, by either
drawing the whitespace characters with a special face or displaying
them as special glyphs. To toggle this mode, type @kbd{M-x
whitespace-mode}. The kinds of whitespace visualized are determined
-by the list variable @code{whitespace-style}. Here is a partial list
+by the list variable @code{whitespace-style}. Individual elements in
+that list can be toggled on or off in the current buffer by typing
+@w{@kbd{M-x whitespace-toggle-options}}. Here is a partial list
of possible elements (see the variable's documentation for the full
list):
@item empty
Highlight empty lines.
+@item big-indent
+@vindex whitespace-big-indent-regexp
+Highlight too-deep indentation. By default any sequence of at least 4
+consecutive TAB characters or 32 consecutive SPC characters is
+highlighted. To change that, customize the regular expression
+@code{whitespace-big-indent-regexp}.
+
@item space-mark
Draw space and non-breaking characters with a special glyph.
Draw newline characters with a special glyph.
@end table
+@findex global-whitespace-toggle-options
+@findex global-whitespace-mode
+Global Whitespace mode is a global minor mode that lets you visualize
+whitespace in all buffers. To toggle individual features, use
+@kbd{M-x global-whitespace-toggle-options}.
+
@node Selective Display
@section Selective Display
@cindex selective display
---
*** Factorial works with non-integer inputs.
-** HideIfDef mode now support full C/C++ expressions, argumented macro
-expansions, interactive macro evaluation and automatic scanning of
-#defined symbols.
+** Hide-IfDef mode
-*** New custom variable `hide-ifdef-header-regexp' to define C/C++ header file
-name patterns. Default case-insensitive .h, .hh, .hpp, .hxx, and .h++.
+---
+*** Hide-IfDef mode now support full C/C++ expressions in macros,
+macro argument expansion, interactive macro evaluation and automatic
+scanning of #define'd symbols.
+
+---
+*** New command `hif-evaluate-macro', bound to `C-c @ e', displays the
+result of evaluating a macro.
+
+---
+*** New command `hif-clear-all-ifdef-define', bound to `C-c @ C', clears
+all defined symbols in `hide-ifdef-env'.
+
+---
+*** New custom variable `hide-ifdef-header-regexp' to define C/C++ header
+file name patterns. Defaults to files whose extension is one of `.h',
+`.hh', `.hpp', `.hxx', or `.h++', matched case-insensitively.
+
+---
*** New custom variable `hide-ifdef-expand-reinclusion-protection' to prevent
-reinclusion protected header files from being fully hidden.
+reinclusion protected (a.k.a. "idempotent") header files from being hidden.
+(This could happen when an idempotent header file is visited again,
+when its guard symbol is already defined.) Defaults to `t'.
+
+---
*** New custom variable `hide-ifdef-exclude-define-regexp' to define symbol
-name patterns (e.g. all "FOR_DOXYGEN_ONLY_*") to be excluded.
+name patterns (e.g. all "FOR_DOXYGEN_ONLY_*") to be ignored when
+looking for macro definitions. By default, no symbols are ignored.
** TeX mode
`prettify-symbols-mode' in a tex-mode buffer, \alpha ... \omega, and
many other math macros are displayed using unicode characters.
-** whitespace-mode: new 'big-indent style highlighting too much indentation.
-By default, 32 spaces and four TABs are considered to be too much but
-`whitespace-big-indent-regexp' can be configured to change that.
++++
+** New `big-indent' style in `whitespace-mode' highlights deep indentation.
+By default, 32 consecutive spaces or four consecutive TABs are
+considered to be too deep, but the new variable
+`whitespace-big-indent-regexp' can be customized to change that.
-** tildify: `tildify-space-string', `tildify-pattern', and
-`tildify-foreach-region-function' variables added making
+---
+** New options in `tildify-mode'.
+New options `tildify-space-string', `tildify-pattern', and
+`tildify-foreach-region-function' variables make
`tildify-string-alist', `tildify-pattern-alist', and
`tildify-ignored-environments-alist' variables (as well as a few
helper functions) obsolete.
-** xref
-The new package provides generic framework and new commands to find
-and move to definitions, as well as pop back to the original location.
+** New package Xref replaces Etags's front-end and UI
+
+The new package Xref provides a generic framework and new commands to
+find and move to definitions of functions, macros, data structures
+etc., as well as go back to the location where you were before moving
+to a definition. It supersedes and obsoletes many Etags commands,
+while still using the etags.el code that reads the TAGS tables as one
+of its back-ends.
+
+The command `xref-find-definitions' replaces `find-tag' and provides
+an interface to pick one definition among several.
+`tags-loop-continue' is now unbound. `xref-pop-marker-stack' replaces
+`pop-tag-mark', but has a keybinding (`M-,'), unlike `pop-tag-mark'.
-*** New key bindings
-`xref-find-definitions' replaces `find-tag' and provides an interface
-to pick one destination among several. Hence, `tags-loop-continue' is
-unbound. `xref-pop-marker-stack' replaces `pop-tag-mark', but uses an
-easier binding, which is now unoccupied (`M-,').
`xref-find-definitions-other-window' replaces `find-tag-other-window'.
`xref-find-definitions-other-frame' replaces `find-tag-other-frame'.
`xref-find-apropos' replaces `find-tag-regexp'.
+As a result of this, the following commands are now obsolete:
+`find-tag-other-window', `find-tag-other-frame', `find-tag-regexp',
+`tags-apropos', and `tags-loop-continue'.
+
+The framework's API is still experimental and can change in major,
+backward-incompatible ways.
+
*** New variables
+
`find-tag-marker-ring-length' is now an obsolete alias for
`xref-marker-ring-length'. `find-tag-marker-ring' is now an obsolete
alias for a private variable. `xref-push-marker-stack' and
information about mode local overrides (defined by cedet/mode-local.el
`define-overloadable-function' `define-mode-local-overrides').
-** etags
-As a result of the above, these commands are now obsolete:
-`find-tag-other-window', `find-tag-other-frame', `find-tag-regexp',
-`tags-apropos' and `tags-loop-continue'.
-
** EUDC
EUDC's LDAP backend has been improved.
See find -name man page for format.")
(defun semantic-symref-derive-find-filepatterns (&optional mode)
+ ;; FIXME: This should be moved to grep.el, where it could be used
+ ;; for "C-u M-x grep" as well.
"Derive a list of file patterns for the current buffer.
Looks first in `semantic-symref-filepattern-alist'. If it is not
there, it then looks in `auto-mode-alist', and attempts to derive something
(when (not pat)
;; No hit, try auto-mode-alist.
(dolist (X auto-mode-alist)
- (when (eq (cdr X) mode)
- ;; Only take in simple patterns, so try to convert this one.
- (let ((Xp
- (cond ((string-match "\\\\\\.\\([^\\'>]+\\)\\\\'" (car X))
- (concat "*." (match-string 1 (car X))))
- (t nil))))
- (when Xp
- (setq pat (cons Xp pat))))
- )))
+ (when (and (eq (cdr X) mode)
+ ;; Only take in simple patterns, so try to convert this one.
+ (string-match "\\\\\\.\\([^\\'>]+\\)\\\\'" (car X)))
+ (push (concat "*." (match-string 1 (car X))) pat))))
;; Convert the list into some find-flags.
- (cond ((= (length pat) 1)
- (concat "-name \"" (car pat) "\""))
- ((consp pat)
- (concat "\\( "
- (mapconcat (lambda (s)
- (concat "-name \"" s "\""))
- pat
- " -o ")
- " \\)"))
- (t
- (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode))
- )))
+ (if (null pat)
+ (error "Customize `semantic-symref-filepattern-alist' for %S"
+ major-mode)
+ (let ((args `("-name" ,(car pat))))
+ (if (null (cdr args))
+ args
+ `("(" ,@args
+ ,@(apply #'nconc (mapcar (lambda (s) `("-o" "-name" ,s)) pat))
+ ")"))))))
(defvar grepflags)
(defvar greppattern)
;; Find the root of the project, and do a find-grep...
(let* (;; Find the file patterns to use.
(rootdir (semantic-symref-calculate-rootdir))
- (filepattern (semantic-symref-derive-find-filepatterns))
+ (filepatterns (semantic-symref-derive-find-filepatterns))
+ (filepattern (mapconcat #'shell-quote-argument filepatterns " "))
;; Grep based flags.
(grepflags (cond ((eq (oref tool :resulttype) 'file)
"-l ")
((eq type 'type) font-lock-type-face)
((or (not (match-string 2)) ;; Normal defun.
(and (match-string 2) ;; Setf function.
- (match-string 4))) font-lock-function-name-face)))
+ (match-string 4)))
+ font-lock-function-name-face)))
nil t)))
"Subdued level highlighting for Lisp modes.")
(2 font-lock-constant-face nil t))
;; Erroneous structures.
(,(concat "(" el-errs-re "\\_>")
- (1 font-lock-warning-face))
+ (1 font-lock-warning-face prepend))
;; Words inside \\[] tend to be for `substitute-command-keys'.
(,(concat "\\\\\\\\\\[\\(" lisp-mode-symbol-regexp "\\)\\]")
(1 font-lock-constant-face prepend))
;; worth the trouble (about 0.5% of slow down).
(eval ;I hate `eval', but it's hard to avoid it here.
`(syntax-propertize-rules
- ("^[cd\\*]" (0 "<"))
+ ("^[CcDd\\*]" (0 "<"))
;; We mark all chars after line-length as "comment-start", rather than
;; just the first one. This is so that a closing ' that's past the
;; line-length will indeed be ignored (and will result in a string that
;; leaks into subsequent lines).
- ((format "^[^cd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
+ ((format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
(1 "<")))))
(defvar fortran-font-lock-keywords fortran-font-lock-keywords-1
;;; Commentary:
+;; NOTE: The xref API is still experimental and can change in major,
+;; backward-incompatible ways. Everyone is encouraged to try it, and
+;; report to us any problems or use cases we hadn't anticiated, by
+;; sending an email to emacs-devel, or `M-x report-emacs-bug'.
+;;
;; This file provides a somewhat generic infrastructure for cross
;; referencing commands, in particular "find-definition".
;;
CALLBACK is a function accepting two arguments -- REG-BEG and REG-END -- that
will be called for portions of the buffer outside of the environments defined by
-PAIRS regexes.
+PAIRS regexps.
The function will return as soon as CALLBACK returns nil or point goes past END.
CALLBACK may be called on portions of the buffer outside of [BEG END); in fact
;;;###autoload
(define-minor-mode tildify-mode
- "Adds electric behaviour to space character.
+ "Adds electric behavior to space character.
When space is inserted into a buffer in a position where hard space is required
instead (determined by `tildify-space-pattern' and `tildify-space-predicates'),
{
// Number of currently active bell:s.
unsigned int nestCount;
+ bool isAttached;
}
- (void)show:(NSView *)view;
- (void)hide;
+- (void)remove;
@end
@implementation EmacsBell
if ((self = [super init]))
{
nestCount = 0;
+ isAttached = false;
self.image = [NSImage imageNamed:NSImageNameCaution];
}
return self;
[self setFrameOrigin:pos];
[self setFrameSize:self.image.size];
+ isAttached = true;
[[[view window] contentView] addSubview:self
positioned:NSWindowAbove
relativeTo:nil];
// Note: Trace output from this method isn't shown, reason unknown.
// NSTRACE ("[EmacsBell hide]");
- --nestCount;
+ if (nestCount > 0)
+ --nestCount;
// Remove the image once the last bell became inactive.
if (nestCount == 0)
+ {
+ [self remove];
+ }
+}
+
+
+-(void)remove
+{
+ if (isAttached)
{
[self removeFromSuperview];
+ isAttached = false;
}
}
@end
+
+static EmacsBell * bell_view = nil;
+
static void
ns_ring_bell (struct frame *f)
/* --------------------------------------------------------------------------
struct frame *frame = SELECTED_FRAME ();
NSView *view;
- static EmacsBell * bell_view = nil;
if (bell_view == nil)
{
bell_view = [[EmacsBell alloc] init];
}
+static void hide_bell ()
+/* --------------------------------------------------------------------------
+ Ensure the bell is hidden.
+ -------------------------------------------------------------------------- */
+{
+ if (bell_view != nil)
+ {
+ [bell_view remove];
+ }
+}
+
+
/* ==========================================================================
Frame / window manager related functions
{
if (FRAME_NS_VIEW (f))
{
+ hide_bell(); // Ensure the bell image isn't scrolled.
+
ns_focus (f, &dest, 1);
[FRAME_NS_VIEW (f) scrollRect: src
by: NSMakeSize (dest.origin.x - src.origin.x,