Robert Weiner | 26 May 17:52 2016
Picon

Patch to improve function options in find-func.el

This patch does three things to find-func.el:
  1. It allows its *-noselect functions to be called with an additional
     option argument of NO-ERROR, to suppress errors when a definition
     is not found and instead simply return nil, allowing them to be
     called with boolean results.

     Although these functions used to return a list of (buffer) in some
     cases of failure, any caller that tested for this result would test
     for a (cdr nil) which is still nil with the new code.  Returning
     a buffer value in cases where the symbol definition was not found
     made no sense anyway since what buffer would that be and what use
     would it be.

  2. Similarly, find-function-do-it returns a boolean value so you can
     tell if it succeeded or failed.

  3. It improves many of the doc strings.

Note that the one large patch section of one function is really just a
change of a line at the end of the function but diff generated a large
context patch for it, maybe the indentation changed.

Please let me know if these changes are acceptable.  They provide many
benefits to potential callers of this package and make the *-noselect
functions more straightforward to use.

-----

In GNU Emacs 25.0.94.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1603))
 of 2016-05-17 built on builder10-9.local
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp''

Configured features:
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

------------

diff -u find-func-orig.el find-func.el
--- find-func-orig.el 2016-05-17 12:16:33.000000000 -0400
+++ find-func.el 2016-05-26 11:14:02.000000000 -0400
<at> <at> -177,9 +177,11 <at> <at>
             (setq name rel))))
     (unless (equal name library) name)))
 
-(defun find-library-name (library)
+(defun find-library-name (library &optional no-error)
   "Return the absolute file name of the Emacs Lisp source of LIBRARY.
-LIBRARY should be a string (the name of the library)."
+LIBRARY should be a string (the name of the library).
+Signals an error if the source location is not found, unless optional
+NO-ERROR is non-nil, in which case nil is returned."
   ;; If the library is byte-compiled, try to find a source library by
   ;; the same name.
   (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
<at> <at> -201,7 +203,8 <at> <at>
           (locate-file rel
                        (or find-function-source-path load-path)
                        load-file-rep-suffixes)))))
-   (error "Can't find library %s" library)))
+   (unless no-error
+     (error "Can't find library %s" library))))
 
 (defvar find-function-C-source-directory
   (let ((dir (expand-file-name "src" source-directory)))
<at> <at> -224,9 +227,11 <at> <at>
                ofunc)))
       func))
 
-(defun find-function-C-source (fun-or-var file type)
+(defun find-function-C-source (fun-or-var file type &optional no-error)
   "Find the source location where FUN-OR-VAR is defined in FILE.
-TYPE should be nil to find a function, or `defvar' to find a variable."
+TYPE should be nil to find a function, or `defvar' to find a variable.
+Signals an error if the source location is not found, unless optional
+NO-ERROR is non-nil, in which case nil is returned."
   (let ((dir (or find-function-C-source-directory
                  (read-directory-name "Emacs C source dir: " nil nil t))))
     (setq file (expand-file-name file dir))
<at> <at> -242,7 +247,7 <at> <at>
        (find-function-advised-original fun-or-var)))))
   (with-current-buffer (find-file-noselect file)
     (goto-char (point-min))
-    (unless (re-search-forward
+    (cond ((re-search-forward
      (if type
  (concat "DEFVAR[A-Z_]*[ \t\n]*([ \t\n]*\""
  (regexp-quote (symbol-name fun-or-var))
<at> <at> -251,8 +256,10 <at> <at>
        (regexp-quote (subr-name (advice--cd*r fun-or-var)))
        "\""))
      nil t)
-      (error "Can't find source for %s" fun-or-var))
-    (cons (current-buffer) (match-beginning 0))))
+   (cons (current-buffer) (match-beginning 0)))
+  (no-error nil)
+  (t (error "Can't find source for %s" fun-or-var)))))
+
 
 ;;;###autoload
 (defun find-library (library)
<at> <at> -286,63 +293,66 <at> <at>
     (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf)))))
 
 ;;;###autoload
-(defun find-function-search-for-symbol (symbol type library)
-  "Search for SYMBOL's definition of type TYPE in LIBRARY.
-Visit the library in a buffer, and return a cons cell (BUFFER . POSITION),
-or just (BUFFER . nil) if the definition can't be found in the file.
+(defun find-function-search-for-symbol (symbol type library &optional no-error)
+  "Search for SYMBOL's definition of TYPE in LIBRARY.
+Visit the library in a buffer, and return a (buffer . position) pair,
+or nil if the definition can't be found in the library.
+
+If the definition can't be found and optional NO-ERROR is non-nil,
+return nil; otherwise, signal an error.
 
 If TYPE is nil, look for a function definition.
 Otherwise, TYPE specifies the kind of definition,
 and it is interpreted via `find-function-regexp-alist'.
 The search is done in the source for library LIBRARY."
   (if (null library)
-      (error "Don't know where `%s' is defined" symbol))
-  ;; Some functions are defined as part of the construct
-  ;; that defines something else.
-  (while (and (symbolp symbol) (get symbol 'definition-name))
-    (setq symbol (get symbol 'definition-name)))
-  (if (string-match "\\`src/\\(.*\\.\\(c\\|m\\)\\)\\'" library)
-      (find-function-C-source symbol (match-string 1 library) type)
-    (when (string-match "\\.el\\(c\\)\\'" library)
-      (setq library (substring library 0 (match-beginning 1))))
-    ;; Strip extension from .emacs.el to make sure symbol is searched in
-    ;; .emacs too.
-    (when (string-match "\\.emacs\\(.el\\)" library)
-      (setq library (substring library 0 (match-beginning 1))))
-    (let* ((filename (find-library-name library))
-   (regexp-symbol (cdr (assq type find-function-regexp-alist))))
-      (with-current-buffer (find-file-noselect filename)
- (let ((regexp (if (functionp regexp-symbol) regexp-symbol
-                        (format (symbol-value regexp-symbol)
-                                ;; Entry for ` (backquote) macro in loaddefs.el,
-                                ;; (defalias (quote \`)..., has a \ but
-                                ;; (symbol-name symbol) doesn't.  Add an
-                                ;; optional \ to catch this.
-                                (concat "\\\\?"
-                                        (regexp-quote (symbol-name symbol))))))
-      (case-fold-search))
-  (with-syntax-table emacs-lisp-mode-syntax-table
-    (goto-char (point-min))
-    (if (if (functionp regexp)
-                    (funcall regexp symbol)
-                  (or (re-search-forward regexp nil t)
-                      ;; `regexp' matches definitions using known forms like
-                      ;; `defun', or `defvar'.  But some functions/variables
-                      ;; are defined using special macros (or functions), so
-                      ;; if `regexp' can't find the definition, we look for
-                      ;; something of the form "(SOMETHING <symbol> ...)".
-                      ;; This fails to distinguish function definitions from
-                      ;; variable declarations (or even uses thereof), but is
-                      ;; a good pragmatic fallback.
-                      (re-search-forward
-                       (concat "^([^ ]+" find-function-space-re "['(]?"
-                               (regexp-quote (symbol-name symbol))
-                               "\\_>")
-                       nil t)))
- (progn
-  (beginning-of-line)
-  (cons (current-buffer) (point)))
-      (cons (current-buffer) nil))))))))
+      (unless no-error
+ (error "Don't know where `%s' is defined" symbol))
+    ;; Some functions are defined as part of the construct
+    ;; that defines something else.
+    (while (and (symbolp symbol) (get symbol 'definition-name))
+      (setq symbol (get symbol 'definition-name)))
+    (if (string-match "\\`src/\\(.*\\.\\(c\\|m\\)\\)\\'" library)
+ (find-function-C-source symbol (match-string 1 library) type)
+      (when (string-match "\\.el\\(c\\)\\'" library)
+ (setq library (substring library 0 (match-beginning 1))))
+      ;; Strip extension from .emacs.el to make sure symbol is searched in
+      ;; .emacs too.
+      (when (string-match "\\.emacs\\(.el\\)" library)
+ (setq library (substring library 0 (match-beginning 1))))
+      (let* ((filename (find-library-name library))
+     (regexp-symbol (cdr (assq type find-function-regexp-alist))))
+ (with-current-buffer (find-file-noselect filename)
+  (let ((regexp (if (functionp regexp-symbol) regexp-symbol
+  (format (symbol-value regexp-symbol)
+  ;; Entry for ` (backquote) macro in loaddefs.el,
+  ;; (defalias (quote \`)..., has a \ but
+  ;; (symbol-name symbol) doesn't.  Add an
+  ;; optional \ to catch this.
+  (concat "\\\\?"
+  (regexp-quote (symbol-name symbol))))))
+ (case-fold-search))
+    (with-syntax-table emacs-lisp-mode-syntax-table
+      (goto-char (point-min))
+      (if (if (functionp regexp)
+      (funcall regexp symbol)
+    (or (re-search-forward regexp nil t)
+ ;; `regexp' matches definitions using known forms like
+ ;; `defun', or `defvar'.  But some functions/variables
+ ;; are defined using special macros (or functions), so
+ ;; if `regexp' can't find the definition, we look for
+ ;; something of the form "(SOMETHING <symbol> ...)".
+ ;; This fails to distinguish function definitions from
+ ;; variable declarations (or even uses thereof), but is
+ ;; a good pragmatic fallback.
+ (re-search-forward
+ (concat "^([^ ]+" find-function-space-re "['(]?"
+ (regexp-quote (symbol-name symbol))
+ "\\_>")
+ nil t)))
+  (progn
+    (beginning-of-line)
+    (cons (current-buffer) (point)))))))))))
 
 (defun find-function-library (function &optional lisp-only verbose)
   "Return the pair (ORIG-FUNCTION . LIBRARY) for FUNCTION.
<at> <at> -362,9 +372,9 <at> <at>
         aliases)
     ;; FIXME for completeness, it might be nice to print something like:
     ;; foo (which is advised), which is an alias for bar (which is advised).
-    (while (and def (symbolp def))
-      (or (eq def function)
-          (not verbose)
+    ;; 5/26/2016 - fixed to not loop forever when (eq def function)
+    (while (and def (symbolp def) (not (eq def function)))
+      (or (not verbose)
           (setq aliases (if aliases
                             (concat aliases
                                     (format-message
<at> <at> -386,25 +396,26 <at> <at>
            ((symbol-file function 'defun))))))
 
 ;;;###autoload
-(defun find-function-noselect (function &optional lisp-only)
-  "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION.
+(defun find-function-noselect (function &optional lisp-only no-error)
+  "Return a (buffer . point) pair pointing to the definition of FUNCTION or nil if not found.
+Signals an error if FUNCTION is null.
 
 Finds the source file containing the definition of FUNCTION
 in a buffer and the point of the definition.  The buffer is
-not selected.  If the function definition can't be found in
-the buffer, returns (BUFFER).
+not selected.
 
-If FUNCTION is a built-in function, this function normally
-attempts to find it in the Emacs C sources; however, if LISP-ONLY
-is non-nil, signal an error instead.
+Built-in functions are found within Emacs C sources unless
+optional LISP-ONLY is non-nil, in which case an error is signaled
+unless optional NO-ERROR is non-nil.
 
 If the file where FUNCTION is defined is not known, then it is
 searched for in `find-function-source-path' if non-nil, otherwise
 in `load-path'."
   (if (not function)
-    (error "You didn't specify a function"))
+      (error "You didn't specify a function"))
   (let ((func-lib (find-function-library function lisp-only t)))
-    (find-function-search-for-symbol (car func-lib) nil (cdr func-lib))))
+    (find-function-search-for-symbol (car func-lib) nil (cdr func-lib)
+     no-error)))
 
 (defun find-function-read (&optional type)
   "Read and return an interned symbol, defaulting to the one near point.
<at> <at> -432,7 +443,9 <at> <at>
                    t nil nil (and symb (symbol-name symb)))))))
 
 (defun find-function-do-it (symbol type switch-fn)
-  "Find Emacs Lisp SYMBOL in a buffer and display it.
+  "Find Emacs Lisp SYMBOL of TYPE in a buffer, display it with SWITCH-FN and return t, else nil if not found.
+Return t if SYMBOL is found, else nil.
+
 TYPE is nil to search for a function definition,
 or else `defvar' or `defface'.
 
<at> <at> -454,11 +467,13 <at> <at>
       (funcall switch-fn new-buf)
       (when new-point (goto-char new-point))
       (recenter find-function-recenter-line)
-      (run-hooks 'find-function-after-hook))))
+      (run-hooks 'find-function-after-hook)
+      t)))
 
 ;;;###autoload
 (defun find-function (function)
   "Find the definition of the FUNCTION near point.
+Return t if FUNCTION is found, else nil.
 
 Finds the source file containing the definition of the function
 near point (selected by `function-called-at-point') in a buffer and
<at> <at> -474,6 +489,7 <at> <at>
 ;;;###autoload
 (defun find-function-other-window (function)
   "Find, in another window, the definition of FUNCTION near point.
+Return t if FUNCTION is found, else nil.
 
 See `find-function' for more details."
   (interactive (find-function-read))
<at> <at> -482,18 +498,21 <at> <at>
 ;;;###autoload
 (defun find-function-other-frame (function)
   "Find, in another frame, the definition of FUNCTION near point.
+Return t if FUNCTION is found, else nil.
 
 See `find-function' for more details."
   (interactive (find-function-read))
   (find-function-do-it function nil 'switch-to-buffer-other-frame))
 
 ;;;###autoload
-(defun find-variable-noselect (variable &optional file)
-  "Return a pair `(BUFFER . POINT)' pointing to the definition of VARIABLE.
+(defun find-variable-noselect (variable &optional file no-error)
+  "Return a (buffer . point) pair pointing to the definition of VARIABLE or nil if not found.
 
 Finds the library containing the definition of VARIABLE in a buffer and
 the point of the definition.  The buffer is not selected.
-If the variable's definition can't be found in the buffer, return (BUFFER).
+
+If the definition can't be found and optional NO-ERROR is non-nil,
+return nil; otherwise, signal an error.
 
 The library where VARIABLE is defined is searched for in FILE or
 `find-function-source-path', if non-nil, otherwise in `load-path'."
<at> <at> -502,11 +521,12 <at> <at>
     (let ((library (or file
                        (symbol-file variable 'defvar)
                        (help-C-file-name variable 'var))))
-      (find-function-search-for-symbol variable 'defvar library))))
+      (find-function-search-for-symbol variable 'defvar library no-error))))
 
 ;;;###autoload
 (defun find-variable (variable)
   "Find the definition of the VARIABLE at or before point.
+Return t if VARIABLE is found, else nil.
 
 Finds the library containing the definition of the variable
 near point (selected by `variable-at-point') in a buffer and
<at> <at> -523,6 +543,7 <at> <at>
 ;;;###autoload
 (defun find-variable-other-window (variable)
   "Find, in another window, the definition of VARIABLE near point.
+Return t if VARIABLE is found, else nil.
 
 See `find-variable' for more details."
   (interactive (find-function-read 'defvar))
<at> <at> -531,47 +552,56 <at> <at>
 ;;;###autoload
 (defun find-variable-other-frame (variable)
   "Find, in another frame, the definition of VARIABLE near point.
+Return t if VARIABLE is found, else nil.
 
 See `find-variable' for more details."
   (interactive (find-function-read 'defvar))
   (find-function-do-it variable 'defvar 'switch-to-buffer-other-frame))
 
 ;;;###autoload
-(defun find-definition-noselect (symbol type &optional file)
-  "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL.
-If the definition can't be found in the buffer, return (BUFFER).
+(defun find-definition-noselect (symbol type &optional file no-error)
+  "Return a (buffer . point) pair pointing to the definition of SYMBOL or nil if not found.
+The buffer is not selected.  SYMBOL may be a symbol or a string.
+If the definition can't be found and optional NO-ERROR is non-nil,
+return nil; otherwise, signal an error.
+
 TYPE says what type of definition: nil for a function, `defvar' for a
 variable, `defface' for a face.  This function does not switch to the
 buffer nor display it.
 
-The library where SYMBOL is defined is searched for in FILE or
+The library where SYMBOL is defined is searched for in optional FILE or
 `find-function-source-path', if non-nil, otherwise in `load-path'."
   (cond
+   ((and (stringp symbol)
+ (setq symbol (intern-soft symbol))
+ ;; Fall through to next type
+ nil))
    ((not symbol)
     (error "You didn't specify a symbol"))
    ((null type)
-    (find-function-noselect symbol))
+    (find-function-noselect symbol nil no-error))
    ((eq type 'defvar)
-    (find-variable-noselect symbol file))
+    (find-variable-noselect symbol file no-error))
    (t
     (let ((library (or file (symbol-file symbol type))))
-      (find-function-search-for-symbol symbol type library)))))
+      (find-function-search-for-symbol symbol type library no-error)))))
 
 ;; For symmetry, this should be called find-face; but some programs
 ;; assume that, if that name is defined, it means something else.
 ;;;###autoload
 (defun find-face-definition (face)
   "Find the definition of FACE.  FACE defaults to the name near point.
+Return t if FACE is found, else nil.
 
-Finds the Emacs Lisp library containing the definition of the face
+Find the Emacs Lisp library containing the definition of the face
 near point (selected by `variable-at-point') in a buffer and
-places point before the definition.
+place point before the definition.
 
 Set mark before moving, if the buffer already existed.
 
-The library where FACE is defined is searched for in
-`find-function-source-path', if non-nil, otherwise in `load-path'.
-See also `find-function-recenter-line' and `find-function-after-hook'."
+The library searched for FACE is given by `find-function-source-path',
+if non-nil, otherwise `load-path'.  See also
+`find-function-recenter-line' and `find-function-after-hook'."
   (interactive (find-function-read 'defface))
   (find-function-do-it face 'defface 'switch-to-buffer))
 
martin rudalics | 26 May 12:44 2016
Picon
Picon

Note on e65c307 breaks font-height

I just noticed this report by Rostislav Svoboda from Thu, 31 Mar 2016
11:10:14 +0200

 > >> Is there a problem in the e65c307 or in my emacs configuration?
 >
 > Just to be sure - I did make clean && make bootstrap
 >
 > After that I put a log-message right on the top of
 > font-setting-change-default-font in lisp/dynamic-setting.el and
 > byte-compiled the file.  I launch emacs in default configuration
 > using:
 >  ./src/emacs -q --eval "(set-face-attribute 'default nil :height 80)" &
 >
 > A *scratch* with font-height 80 appears but immediatelly right after
 > that the font-height gets increased. Moreover my log-message does not
 > appear in the *Messages*.
 >
 > So I think the e65c307 exposes some other bug indeed, but it is
 > specific to just one particular computer. On my other computer
 > everything is fine.
 >
 > Do you have any other idea where should I take a look or put a
 > breakpoint?

I'm experiencing more or less the same problem on Debian here.  The
:height setting in my .emacs for the default font gets ignored when
starting Emacs.  When I reevaluate .emacs it's applied.

I think this is a pretty serious annoyance and should be fixed before
the release - in the worst case by reverting that commit.

Note: I cannot observe this issue on Windows.

martin

martin rudalics | 26 May 09:30 2016
Picon
Picon

Spurious "file errors" when making master

I recently get spurious "file errors" when building master.  The first one
is from Windows XP and goes as

 >>Error occurred processing ../../lisp/gnus/gnus-group.el: File error (("Renaming" "Permission
denied" "c:/emacs-git/trunk/lisp/gnus/gnus-group.elc2552Dme" "c:/emacs-git/trunk/lisp/gnus/gnus-group.elc"))

That file still has its extension .elc2552Dme.

The second one is from Debian and goes as

Error running git rev-parse: (file-error "Searching for program" "No such file or directory" "git")

Any ideas?

Thanks, martin

Magnus Henoch | 25 May 11:45 2016
Picon
Gravatar

Async DNS for OSX

Hi all,

Since Emacs gained the capability to make asynchronous DNS lookups 
under GNU/Linux, I've been wishing for the same thing under OSX. 
Here is a little patch that I've hacked together, that I'd like 
some feedback on.  In particular:

1. In Fmake_network_process, there's an XXX comment about 
deallocating my CFStringRef.  I couldn't figure out from the 
documentation whether CFHostCreateWithName takes ownership of the 
string, or just copies it.

2. There is a callback function, host_client_callback, that writes 
error information into memory referred to by the process struct. 
There is a potential for a race condition here: what if the 
callback is called after the process has been deallocated?  I've 
tried to avoid that by cancelling name resolution before 
deallocating the memory (see free_dns_request), but I suspect 
that's not enough.  Is there a clever way to avoid that?

3. Unlike getaddrinfo_a, this CFHost thing doesn't resolve service 
names to port numbers.  Therefore, I arrange to call getservbyname 
in Fmake_network_process, and insert the port number into a copy 
of the sockaddr struct in check_for_dns.  I _think_ this should 
work for both IPv4 and IPv6, but I haven't tested IPv6.  Is there 
a nicer way to do this?

It took me a while to figure out the port number thing: before I 
added the port number, the process seemed to silently do nothing. 
That's because non-blocking connect would fail, and 
connect_network_socket would treat that as having to do a 
synchronous connect, which ended up not happening.  I'm not sure 
if this is a bug or a feature.

Any other comments are appreciated as well.  I'll have sporadic 
Internet access during the coming week or so, will probably look 
at this again after that time.

Regards,
Magnus

Attachment (async-dns-osx.patch): text/x-patch, 10 KiB
Paul Pogonyshev | 24 May 22:58 2016
Picon

Is byte-compiled code supposed to call `make-byte-code'?

Trying to disassemble a trivial function that invokes a closure:

(defun xxx (fn)
  (mapcar (lambda (x) (1+ (funcall fn x))) '(1 2 3)))
(disassemble 'xxx)

gives:

0       constant  mapcar
1       constant  make-byte-code
2       constant  257
3       constant  "\300!T\207"
4       constant  vconcat
5       constant  vector
6       stack-ref 6
8       call      1
9       constant  []
10      call      2
11      constant  3
12      constant  "\n\n(fn X)"
13      call      5
14      constant  (1 2 3)
15      call      2
16      return

Is it supposed to build closure bytecode object every time? Shouldn't
it be considered a constant?

GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.3) of 2016-05-24

Paul

Alan Third | 24 May 21:52 2016

custom list of bugs in debbugs

Hi,

I'm making up a list of all the NextStep port bugs I can find and I
was wondering if there's any way I can get the debbugs mode to display
just these specific bug reports?

Is there some way to run debbugs-gnu-search against a list of bug
numbers?

I guess I could create a bug report and mark them all as blocking
against it, but that seems awfully intrusive.
--

-- 
Alan Third

John Wiegley | 24 May 19:49 2016
Picon
Gravatar

Eli Zaretskii will be steering this ship until June 13th

Hello Emacsers,

Due to an upcoming vacation -- and the need to prepare for it -- Eli Zaretskii
has graciously accepted to lead our happy company until June 13th.

This period of time should focus primarily on getting the remainder of the
blocking bugs resolved, and getting out more pretests in advance of the first
release candidate. Nicolas has told me that the next pretest will be this
Friday.

Eli has complete deciding authority over all issues during this time, as I
likely won't be available even by e-mail, and don't want to hold up our steady
progress toward the next release.

Thank you,
--

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2
Stefan Monnier | 24 May 02:41 2016
Picon

Reify the cc-mode-common into an actual parent mode

IIRC last conversation, while you disagreed with introducing
a c-derivative-mode (for objc/c++/c), you said you were OK with the idea
of introducing a cc-mode-common.

Here's a corresponding patch.
Any objection?

        Stefan

diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index de903b8..bbb96f2 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
 <at>  <at>  -238,6 +238,8  <at>  <at>  control).  See \"cc-mode.el\" for more info."
      ;; incompatible
      (t (error "CC Mode is incompatible with this version of Emacs")))
     map))
+(make-obsolete 'c-make-inherited-keymap
+	       "Use make-sparse-keymap + (set-keymap-parent c-mode-base-map); or derive from c-mode-common" "26.1")

 (defun c-define-abbrev-table (name defs &optional doc)
   ;; Compatibility wrapper for `define-abbrev' which passes a non-nil
 <at>  <at>  -861,6 +863,7  <at>  <at>  Note that the style variables are always made local to the buffer."
   (if (cc-bytecomp-fboundp 'run-mode-hooks)
       `(run-mode-hooks , <at> hooks)
     `(progn , <at> (mapcar (lambda (hook) `(run-hooks ,hook)) hooks))))
+(make-obsolete 'c-run-mode-hooks "derive your mode from c-common-mode" "26.1")

 
 ;;; Change hooks, linking with Font Lock and electric-indent-mode.
 <at>  <at>  -1431,6 +1434,17  <at>  <at>  This function is called from `c-common-init', once per mode initialization."
     (c-update-modeline)))

 
+(defvar c-mode-common-map c-mode-base-map)
+
+(define-derived-mode c-mode-common prog-mode "CC-common"
+  "Pseudo major mode, parent of all modes using the CC engine."
+  ;; We want to update the mode-line but *after* the major mode's hooks
+  ;; have been run.
+  :after-hook (c-update-modeline)
+  (c-initialize-cc-mode t)
+  (setq abbrev-mode t)  ;; Used for c-electric-continued-statement!
+  )
+
 ;; Support for C

 (defvar c-mode-syntax-table
 <at>  <at>  -1443,7 +1457,7  <at>  <at>  This function is called from `c-common-init', once per mode initialization."
   "Abbreviation table used in c-mode buffers.")

 (defvar c-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Add bindings which are only useful for C.
     (define-key map "\C-c\C-e"  'c-macro-expand)
     map)
 <at>  <at>  -1484,7 +1498,7  <at>  <at>  This function is called from `c-common-init', once per mode initialization."
 (unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))

 ;;;###autoload
-(define-derived-mode c-mode prog-mode "C"
+(define-derived-mode c-mode c-mode-common "C"
   "Major mode for editing C code.

 To submit a problem report, enter `\\[c-submit-bug-report]' from a
 <at>  <at>  -1500,15 +1514,11  <at>  <at>  initialization, then `c-mode-hook'.
 Key bindings:
 \\{c-mode-map}"
   :after-hook (progn (c-make-noise-macro-regexps)
-		     (c-make-macro-with-semi-re)
-		     (c-update-modeline))
-  (c-initialize-cc-mode t)
-  (setq abbrev-mode t)
+		     (c-make-macro-with-semi-re))
   (c-init-language-vars-for 'c-mode)
   (c-common-init 'c-mode)
   (easy-menu-add c-c-menu)
-  (cc-imenu-init cc-imenu-c-generic-expression)
-  (c-run-mode-hooks 'c-mode-common-hook))
+  (cc-imenu-init cc-imenu-c-generic-expression))

 
 ;; Support for C++
 <at>  <at>  -1524,7 +1534,7  <at>  <at>  Key bindings:
   "Abbreviation table used in c++-mode buffers.")

 (defvar c++-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Add bindings which are only useful for C++.
     (define-key map "\C-c\C-e" 'c-macro-expand)
     (define-key map "\C-c:"    'c-scope-operator)
 <at>  <at>  -1537,7 +1547,7  <at>  <at>  Key bindings:
 		  (cons "C++" (c-lang-const c-mode-menu c++)))

 ;;;###autoload
-(define-derived-mode c++-mode prog-mode "C++"
+(define-derived-mode c++-mode c-mode-common "C++"
   "Major mode for editing C++ code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from a
 c++-mode buffer.  This automatically sets up a mail buffer with
 <at>  <at>  -1553,15 +1563,11  <at>  <at>  initialization, then `c++-mode-hook'.
 Key bindings:
 \\{c++-mode-map}"
   :after-hook (progn (c-make-noise-macro-regexps)
-		     (c-make-macro-with-semi-re)
-		     (c-update-modeline))
-  (c-initialize-cc-mode t)
-  (setq abbrev-mode t)
+		     (c-make-macro-with-semi-re))
   (c-init-language-vars-for 'c++-mode)
   (c-common-init 'c++-mode)
   (easy-menu-add c-c++-menu)
-  (cc-imenu-init cc-imenu-c++-generic-expression)
-  (c-run-mode-hooks 'c-mode-common-hook))
+  (cc-imenu-init cc-imenu-c++-generic-expression))

 
 ;; Support for Objective-C
 <at>  <at>  -1576,7 +1582,7  <at>  <at>  Key bindings:
   "Abbreviation table used in objc-mode buffers.")

 (defvar objc-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Add bindings which are only useful for Objective-C.
     (define-key map "\C-c\C-e" 'c-macro-expand)
     map)
 <at>  <at>  -1588,7 +1594,7  <at>  <at>  Key bindings:
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))

 ;;;###autoload
-(define-derived-mode objc-mode prog-mode "ObjC"
+(define-derived-mode objc-mode c-mode-common "ObjC"
   "Major mode for editing Objective C code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from an
 objc-mode buffer.  This automatically sets up a mail buffer with
 <at>  <at>  -1604,15 +1610,11  <at>  <at>  initialization, then `objc-mode-hook'.
 Key bindings:
 \\{objc-mode-map}"
   :after-hook (progn (c-make-noise-macro-regexps)
-		     (c-make-macro-with-semi-re)
-		     (c-update-modeline))
-  (c-initialize-cc-mode t)
-  (setq abbrev-mode t)
+		     (c-make-macro-with-semi-re))
   (c-init-language-vars-for 'objc-mode)
   (c-common-init 'objc-mode)
   (easy-menu-add c-objc-menu)
-  (cc-imenu-init nil 'cc-imenu-objc-function)
-  (c-run-mode-hooks 'c-mode-common-hook))
+  (cc-imenu-init nil 'cc-imenu-objc-function))

 
 ;; Support for Java
 <at>  <at>  -1629,7 +1631,7  <at>  <at>  Key bindings:
   "Abbreviation table used in java-mode buffers.")

 (defvar java-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Add bindings which are only useful for Java.
     map)
   "Keymap used in java-mode buffers.")
 <at>  <at>  -1647,7 +1649,7  <at>  <at>  Key bindings:
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode))

 ;;;###autoload
-(define-derived-mode java-mode prog-mode "Java"
+(define-derived-mode java-mode c-mode-common "Java"
   "Major mode for editing Java code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from a
 java-mode buffer.  This automatically sets up a mail buffer with
 <at>  <at>  -1662,14 +1664,10  <at>  <at>  initialization, then `java-mode-hook'.

 Key bindings:
 \\{java-mode-map}"
-  :after-hook (c-update-modeline)
-  (c-initialize-cc-mode t)
-  (setq abbrev-mode t)
   (c-init-language-vars-for 'java-mode)
   (c-common-init 'java-mode)
   (easy-menu-add c-java-menu)
-  (cc-imenu-init cc-imenu-java-generic-expression)
-  (c-run-mode-hooks 'c-mode-common-hook))
+  (cc-imenu-init cc-imenu-java-generic-expression))

 
 ;; Support for CORBA's IDL language
 <at>  <at>  -1682,7 +1680,7  <at>  <at>  Key bindings:
   "Abbreviation table used in idl-mode buffers.")

 (defvar idl-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Add bindings which are only useful for IDL.
     map)
   "Keymap used in idl-mode buffers.")
 <at>  <at>  -1693,7 +1691,7  <at>  <at>  Key bindings:
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode))

 ;;;###autoload
-(define-derived-mode idl-mode prog-mode "IDL"
+(define-derived-mode idl-mode c-mode-common "IDL"
   "Major mode for editing CORBA's IDL, PSDL and CIDL code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from an
 idl-mode buffer.  This automatically sets up a mail buffer with
 <at>  <at>  -1708,13 +1706,13  <at>  <at>  initialization, then `idl-mode-hook'.

 Key bindings:
 \\{idl-mode-map}"
-  :after-hook (c-update-modeline)
-  (c-initialize-cc-mode t)
+  ;; No c-electric-continued-statement here, so we don't need abbrev-mode.
+  (kill-local-variable 'abbrev-mode)
   (c-init-language-vars-for 'idl-mode)
   (c-common-init 'idl-mode)
   (easy-menu-add c-idl-menu)
   ;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO
-  (c-run-mode-hooks 'c-mode-common-hook))
+  )

 
 ;; Support for Pike
 <at>  <at>  -1729,7 +1727,7  <at>  <at>  Key bindings:
   "Abbreviation table used in pike-mode buffers.")

 (defvar pike-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Additional bindings.
     (define-key map "\C-c\C-e" 'c-macro-expand)
     map)
 <at>  <at>  -1742,7 +1740,7  <at>  <at>  Key bindings:
 ;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))

 ;;;###autoload
-(define-derived-mode pike-mode prog-mode "Pike"
+(define-derived-mode pike-mode c-mode-common "Pike"
   "Major mode for editing Pike code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from a
 pike-mode buffer.  This automatically sets up a mail buffer with
 <at>  <at>  -1757,14 +1755,11  <at>  <at>  initialization, then `pike-mode-hook'.

 Key bindings:
 \\{pike-mode-map}"
-  :after-hook (c-update-modeline)
-  (c-initialize-cc-mode t)
-  (setq	abbrev-mode t)
   (c-init-language-vars-for 'pike-mode)
   (c-common-init 'pike-mode)
   (easy-menu-add c-pike-menu)
   ;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO
-  (c-run-mode-hooks 'c-mode-common-hook))
+  )

 
 ;; Support for AWK
 <at>  <at>  -1781,7 +1776,7  <at>  <at>  Key bindings:
   "Abbreviation table used in awk-mode buffers.")

 (defvar awk-mode-map
-  (let ((map (c-make-inherited-keymap)))
+  (let ((map (make-sparse-keymap)))
     ;; Add bindings which are only useful for awk.
     (define-key map "#" 'self-insert-command);Overrides electric parent binding.
     (define-key map "/" 'self-insert-command);Overrides electric parent binding.
 <at>  <at>  -1804,7 +1799,7  <at>  <at>  Key bindings:
 (declare-function c-awk-unstick-NL-prop "cc-awk" ())

 ;;;###autoload
-(define-derived-mode awk-mode prog-mode "AWK"
+(define-derived-mode awk-mode c-mode-common "AWK"
   "Major mode for editing AWK code.
 To submit a problem report, enter `\\[c-submit-bug-report]' from an
 awk-mode buffer.  This automatically sets up a mail buffer with version
 <at>  <at>  -1818,18 +1813,14  <at>  <at>  initialization, then `awk-mode-hook'.

 Key bindings:
 \\{awk-mode-map}"
-  :after-hook (c-update-modeline)
   ;; We need the next line to stop the macro defining
   ;; `awk-mode-syntax-table'.  This would mask the real table which is
   ;; declared in cc-awk.el and hasn't yet been loaded.
   :syntax-table nil
   (require 'cc-awk)			; Added 2003/6/10.
-  (c-initialize-cc-mode t)
-  (setq	abbrev-mode t)
   (c-init-language-vars-for 'awk-mode)
   (c-common-init 'awk-mode)
-  (c-awk-unstick-NL-prop)
-  (c-run-mode-hooks 'c-mode-common-hook))
+  (c-awk-unstick-NL-prop))

 
 ;; bug reporting

Stefan Monnier | 24 May 01:43 2016
Picon

[Cron Daemon] Cron <elpa <at> elpa> cd /home/elpa/build && ./admin/update-archive.sh --announce gnu-emacs-sources <at> gnu.org

+ make -f /home/elpa/build/GNUmakefile check_copyrights
Compute exceptions >copyright_exceptions~
diff -u "copyright_exceptions" "copyright_exceptions~"
--- copyright_exceptions	2016-02-24 05:02:14.077028657 -0500
+++ copyright_exceptions~	2016-05-23 17:02:42.949292279 -0400
 <at>  <at>  -60,6 +60,7  <at>  <at> 
 ./auctex/style/virtex.el
 ./auctex/tex-fold.el:    ("(C)" ("copyright"))
 ./auctex/tex-info.el:   '("copyright" nil)
+./auctex/tex-jp.el:;; Copyright (C) 1999, 2001 Hidenobu Nabetani <nabe <at> debian.or.jp>
 ./debbugs/debbugs-gnu.el:	  (insert "  Copyright-paperwork-exempt: yes"))
 ./ergoemacs-mode/ergoemacs-advices.el:                         emacs-copyright
 ./ergoemacs-mode/ergoemacs-themes.el:                 ,(lambda () emacs-copyright)
/home/elpa/build/GNUmakefile:15: recipe for target 'check_copyrights' failed
make: *** [check_copyrights] Error 1
+ signal_error check_copyright failed
+ title=check_copyright failed
+ [  =  ]
+ echo Error: check_copyright failed
Error: check_copyright failed
+ exit 1

Robert Weiner | 24 May 01:11 2016
Picon

Please apply this patched function to package.el in Emacs 25.

Replacing this function in package.el allows for correct generation of the <package>-autoloads.el file for packages that have .el files in multiple subdirectories.  The only thing changed is the line with 'apply' in it.  It ignores symlinks to directories in case there are any.  It is a simple change.  I hope you like it.

This is important for larger packages such as my forthcoming Hyperbole package which includes a 2nd directory of code.


(defun package-generate-autoloads (name pkg-dir)
  (let* ((auto-name (format "%s-autoloads.el" name))
         ;;(ignore-name (concat name "-pkg.el"))
         (generated-autoload-file (expand-file-name auto-name pkg-dir))
         ;; Silence `autoload-generate-file-autoloads'.
         (noninteractive inhibit-message)
         (backup-inhibited t)
         (version-control 'never))
    (package-autoload-ensure-default-file generated-autoload-file)
    (apply #'update-directory-autoloads pkg-dir
  (delq nil (mapcar (lambda (f) (and (file-directory-p f)
     (not (file-symlink-p f)) f))
    (directory-files pkg-dir t "[a-zA-Z].*" nil))))
    (let ((buf (find-buffer-visiting generated-autoload-file)))
      (when buf (kill-buffer buf)))
    auto-name))
Glenn Morris | 23 May 17:40 2016
Picon

Re: Processed: Re: bug#19717: 24.4.50; printing.el still uses ps-eval-switch

GNU bug tracker automated control server wrote:

> Processing commands for control <at> debbugs.gnu.org:
>
>> unblock 19759 by 23050

Again, this is not necessary. Closed bugs are not included in the list
at the top of http://debbugs.gnu.org/19759

Explicitly unblocking closed bugs is harmful, because if the bug needs
to be reopened for some reason, it won't reappear in the blocking list.


Gmane