summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/package.el3
-rw-r--r--lisp/progmodes/cc-engine.el5
2 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 23692aab32a..fbab6debd5d 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -982,7 +982,8 @@ untar into a directory named DIR; otherwise, signal an error."
(write-region
(concat
";;; Generated package description from "
- (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file)
+ (replace-regexp-in-string "-pkg\\.el\\'" ".el"
+ (file-name-nondirectory pkg-file))
" -*- no-byte-compile: t -*-\n"
(prin1-to-string
(nconc
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 1649f507363..75e2f0d21f5 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -9894,8 +9894,9 @@ This function might do hidden buffer changes."
(throw 'at-decl-or-cast t))
(when (and got-parens
- (not got-function-name-prefix)
- ;; (not got-suffix-after-parens)
+ (or (not got-function-name-prefix)
+ (and (not got-suffix-after-parens)
+ at-decl-end))
(or backup-at-type
maybe-typeless
backup-maybe-typeless