summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2016-01-11 22:48:10 -0800
committerJohn Wiegley <johnw@newartisans.com>2016-01-11 22:48:10 -0800
commit4b739f70a54579b134ab6da313a3d665640a6a3f (patch)
treea5c8bba0bd10e8c4b2de062d6a5f905ac139f121
parent540bfa7680268a55fc617ffb822e962cb9fb6c59 (diff)
parent43662a240b682de94299e797452ba56d01a04883 (diff)
downloademacs-4b739f70a54579b134ab6da313a3d665640a6a3f.tar.gz
emacs-4b739f70a54579b134ab6da313a3d665640a6a3f.tar.bz2
emacs-4b739f70a54579b134ab6da313a3d665640a6a3f.zip
Merge from origin/emacs-25
43662a2 ; Clarify that xref is still experimental 0a6e6ca ; * admin/release-process: Remove some obsolete records. c2e9e3d * lisp/progmodes/fortran.el (fortran-make-syntax-propertize-function): 8637f3d (semantic-symref-derive-find-filepatterns): Return a list 0a7ad07 ; Re-arrange xref-related entries in NEWS. fe903ef Fix xref-find-references on MS-Windows 55a28d8 ; Fixed visual bell artifact problem on NextStep. d064034 Document new features of tildify-mode 964bea7 Document new features of Whitespace mode cd68f47 Improve documentation of new Hide-IfDef features 723b8bf Fix regression in font-locking cl-assert and cl-check-type
-rw-r--r--admin/release-process20
-rw-r--r--doc/emacs/display.texi18
-rw-r--r--etc/NEWS82
-rw-r--r--lisp/cedet/semantic/symref/grep.el39
-rw-r--r--lisp/emacs-lisp/lisp-mode.el5
-rw-r--r--lisp/progmodes/fortran.el4
-rw-r--r--lisp/progmodes/xref.el5
-rw-r--r--lisp/textmodes/tildify.el4
-rw-r--r--src/nsterm.m35
9 files changed, 146 insertions, 66 deletions
diff --git a/admin/release-process b/admin/release-process
index a6f9c2a19e0..a9f4419e594 100644
--- a/admin/release-process
+++ b/admin/release-process
@@ -213,26 +213,26 @@ names of the people who have checked it.
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
@@ -326,7 +326,7 @@ markers.texi
minibuf.texi
modes.texi
nonascii.texi
-numbers.texi Paul Eggert (24.4)
+numbers.texi
objects.texi
os.texi
package.texi
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 38e7a90bf44..1b75a15427c 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1164,12 +1164,15 @@ indicate-empty-lines t)}.
@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):
@@ -1200,6 +1203,13 @@ Highlight newlines.
@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.
@@ -1210,6 +1220,12 @@ Draw tab 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
diff --git a/etc/NEWS b/etc/NEWS
index 6615a43da62..49bb4a27c1f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -945,16 +945,36 @@ fitting for use in money calculations
---
*** 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
@@ -967,30 +987,47 @@ use PDF instead of DVI.
`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
@@ -1001,11 +1038,6 @@ 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.
diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el
index 52c8d3b972c..3b544d9f912 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -53,6 +53,8 @@ and those hits returned.")
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
@@ -64,28 +66,20 @@ Optional argument MODE specifies the `major-mode' to test."
(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)
@@ -147,7 +141,8 @@ This shell should support pipe redirect syntax."
;; 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 ")
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 4bb1466c930..574ecef0cde 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -383,7 +383,8 @@ This will generate compile-time constants from BINDINGS."
((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.")
@@ -403,7 +404,7 @@ This will generate compile-time constants from BINDINGS."
(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))
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 82e81b23f50..bd08d3fd16d 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -496,12 +496,12 @@ This is used to fontify fixed-format Fortran comments."
;; 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
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index fe0af0c3430..26471b0df3f 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -19,6 +19,11 @@
;;; 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".
;;
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index b11569cd14c..eb799c09510 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -282,7 +282,7 @@ corresponding text part and can be either:
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
@@ -479,7 +479,7 @@ which is assumed to be a space character, should be replaced with a hard space."
;;;###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'),
diff --git a/src/nsterm.m b/src/nsterm.m
index 0510f8e0e91..b270e0e58b5 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1150,9 +1150,11 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
{
// Number of currently active bell:s.
unsigned int nestCount;
+ bool isAttached;
}
- (void)show:(NSView *)view;
- (void)hide;
+- (void)remove;
@end
@implementation EmacsBell
@@ -1162,6 +1164,7 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
if ((self = [super init]))
{
nestCount = 0;
+ isAttached = false;
self.image = [NSImage imageNamed:NSImageNameCaution];
}
return self;
@@ -1183,6 +1186,7 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
[self setFrameOrigin:pos];
[self setFrameSize:self.image.size];
+ isAttached = true;
[[[view window] contentView] addSubview:self
positioned:NSWindowAbove
relativeTo:nil];
@@ -1199,17 +1203,31 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
// 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)
/* --------------------------------------------------------------------------
@@ -1222,7 +1240,6 @@ 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];
@@ -1246,6 +1263,18 @@ ns_ring_bell (struct frame *f)
}
+static void hide_bell ()
+/* --------------------------------------------------------------------------
+ Ensure the bell is hidden.
+ -------------------------------------------------------------------------- */
+{
+ if (bell_view != nil)
+ {
+ [bell_view remove];
+ }
+}
+
+
/* ==========================================================================
Frame / window manager related functions
@@ -2328,6 +2357,8 @@ ns_copy_bits (struct frame *f, NSRect src, NSRect dest)
{
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,