diff options
| author | Glenn Morris | 2014-03-22 14:44:04 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-03-22 14:44:04 -0700 |
| commit | 299ccd03f94008a1580a0dbbfd56c32484dd20f8 (patch) | |
| tree | 04820a73c520d61af01bec3cbf5c37787161cacc | |
| parent | 2ffb10e07574a5a357d2b3e10a4cc7f53ba1521c (diff) | |
| parent | 4118be693dfc66e3640276e404012135ffbf07d4 (diff) | |
| download | emacs-299ccd03f94008a1580a0dbbfd56c32484dd20f8.tar.gz emacs-299ccd03f94008a1580a0dbbfd56c32484dd20f8.zip | |
Merge from emacs-24; up to 2014-03-21T21:27:25Z!dancol@dancol.org
| -rw-r--r-- | doc/lispref/ChangeLog | 17 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 248 | ||||
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 2 | ||||
| -rw-r--r-- | lisp/w32-common-fns.el | 7 | ||||
| -rw-r--r-- | test/automated/data/package/archive-contents | 3 | ||||
| -rw-r--r-- | test/automated/package-test.el | 1 |
8 files changed, 183 insertions, 112 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 3bbcee76884..a6adcdd9720 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2014-03-22 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * commands.texi (Defining Commands): List interactive-only values. | ||
| 4 | |||
| 5 | 2014-03-22 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * functions.texi (Core Advising Primitives): Fix cross-reference | ||
| 8 | in last change. | ||
| 9 | |||
| 10 | 2014-03-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 11 | |||
| 12 | * functions.texi (Advising Functions): Explain a bit more how | ||
| 13 | arguments work. | ||
| 14 | (Advice combinators): New node. | ||
| 15 | (Core Advising Primitives): Use it. Expand description of "depth". | ||
| 16 | (Advising Named Functions): Document limitation of advices on macros. | ||
| 17 | |||
| 1 | 2014-03-21 Martin Rudalics <rudalics@gmx.at> | 18 | 2014-03-21 Martin Rudalics <rudalics@gmx.at> |
| 2 | 19 | ||
| 3 | * frames.texi (Size and Position): In `frame-resize-pixelwise' | 20 | * frames.texi (Size and Position): In `frame-resize-pixelwise' |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 198926a9a6a..38a6970e6f4 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -126,7 +126,12 @@ form in the function body itself. This feature is seldom used. | |||
| 126 | Sometimes, a function is only intended to be called interactively, | 126 | Sometimes, a function is only intended to be called interactively, |
| 127 | never directly from Lisp. In that case, give the function a | 127 | never directly from Lisp. In that case, give the function a |
| 128 | non-@code{nil} @code{interactive-only} property. This causes the | 128 | non-@code{nil} @code{interactive-only} property. This causes the |
| 129 | byte compiler to warn if the command is called from Lisp. | 129 | byte compiler to warn if the command is called from Lisp. The value |
| 130 | of the property can be: a string, which the byte-compiler will | ||
| 131 | use directly in its warning (it should end with a period, | ||
| 132 | and not start with a capital, e.g. ``use @dots{} instead.''); @code{t}; | ||
| 133 | any other symbol, which should be an alternative function to use in | ||
| 134 | Lisp code. | ||
| 130 | 135 | ||
| 131 | @menu | 136 | @menu |
| 132 | * Using Interactive:: General rules for @code{interactive}. | 137 | * Using Interactive:: General rules for @code{interactive}. |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 3e1db68f70d..eeb642a04c3 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1170,9 +1170,10 @@ For example, in order to trace the calls to the process filter of a process | |||
| 1170 | (add-function :before (process-filter @var{proc}) #'my-tracing-function) | 1170 | (add-function :before (process-filter @var{proc}) #'my-tracing-function) |
| 1171 | @end example | 1171 | @end example |
| 1172 | 1172 | ||
| 1173 | This will cause the process's output to be passed first to | 1173 | This will cause the process's output to be passed to @code{my-tracing-function} |
| 1174 | @code{my-tracing-function} and then to the original process filter. | 1174 | before being passed to the original process filter. @code{my-tracing-function} |
| 1175 | When you're done with it, you can revert to the untraced behavior with: | 1175 | receives the same arguments as the original function. When you're done with |
| 1176 | it, you can revert to the untraced behavior with: | ||
| 1176 | 1177 | ||
| 1177 | @example | 1178 | @example |
| 1178 | (remove-function (process-filter @var{proc}) #'my-tracing-function) | 1179 | (remove-function (process-filter @var{proc}) #'my-tracing-function) |
| @@ -1191,20 +1192,24 @@ Similarly, if you want to trace the execution of the function named | |||
| 1191 | (advice-add 'display-buffer :around #'his-tracing-function) | 1192 | (advice-add 'display-buffer :around #'his-tracing-function) |
| 1192 | @end example | 1193 | @end example |
| 1193 | 1194 | ||
| 1194 | and when you're tired of seeing this output, you can revert to the untraced | 1195 | Here, @code{his-tracing-function} is called instead of the original function |
| 1196 | and receives the original function (additionally to that function's arguments) | ||
| 1197 | as argument, so it can call it if and when it needs to. | ||
| 1198 | When you're tired of seeing this output, you can revert to the untraced | ||
| 1195 | behavior with: | 1199 | behavior with: |
| 1196 | 1200 | ||
| 1197 | @example | 1201 | @example |
| 1198 | (advice-remove 'display-buffer #'his-tracing-function) | 1202 | (advice-remove 'display-buffer #'his-tracing-function) |
| 1199 | @end example | 1203 | @end example |
| 1200 | 1204 | ||
| 1201 | The arguments @code{:before} and @code{:above} used in the above examples | 1205 | The arguments @code{:before} and @code{:around} used in the above examples |
| 1202 | specify how the two functions are composed, since there are many different | 1206 | specify how the two functions are composed, since there are many different |
| 1203 | ways to do it. The added function is also called an @emph{advice}. | 1207 | ways to do it. The added function is also called an @emph{advice}. |
| 1204 | 1208 | ||
| 1205 | @menu | 1209 | @menu |
| 1206 | * Core Advising Primitives:: Primitives to Manipulate Advices | 1210 | * Core Advising Primitives:: Primitives to Manipulate Advices |
| 1207 | * Advising Named Functions:: Advising Named Functions | 1211 | * Advising Named Functions:: Advising Named Functions |
| 1212 | * Advice combinators:: Ways to compose advices | ||
| 1208 | * Porting old advices:: Adapting code using the old defadvice | 1213 | * Porting old advices:: Adapting code using the old defadvice |
| 1209 | @end menu | 1214 | @end menu |
| 1210 | 1215 | ||
| @@ -1225,104 +1230,9 @@ argument the interactive spec of the original function. To interpret the spec | |||
| 1225 | received as argument, use @code{advice-eval-interactive-spec}. | 1230 | received as argument, use @code{advice-eval-interactive-spec}. |
| 1226 | 1231 | ||
| 1227 | @var{where} determines how @var{function} is composed with the | 1232 | @var{where} determines how @var{function} is composed with the |
| 1228 | existing function. It can be one of the following: | 1233 | existing function, e.g. whether @var{function} should be called before, or |
| 1229 | 1234 | after the original function. @xref{Advice combinators}, for the list of | |
| 1230 | @table @code | 1235 | available ways to compose the two functions. |
| 1231 | @item :before | ||
| 1232 | Call @var{function} before the old function. Both functions receive the | ||
| 1233 | same arguments, and the return value of the composition is the return value of | ||
| 1234 | the old function. More specifically, the composition of the two functions | ||
| 1235 | behaves like: | ||
| 1236 | @example | ||
| 1237 | (lambda (&rest r) (apply @var{function} r) (apply @var{oldfun} r)) | ||
| 1238 | @end example | ||
| 1239 | This is similar to @code{(add-hook @var{hook} @var{function})}, except that it | ||
| 1240 | applies to single-function hooks rather than normal hooks. | ||
| 1241 | |||
| 1242 | @item :after | ||
| 1243 | Call @var{function} after the old function. Both functions receive the | ||
| 1244 | same arguments, and the return value of the composition is the return value of | ||
| 1245 | the old function. More specifically, the composition of the two functions | ||
| 1246 | behaves like: | ||
| 1247 | @example | ||
| 1248 | (lambda (&rest r) (prog1 (apply @var{oldfun} r) (apply @var{function} r))) | ||
| 1249 | @end example | ||
| 1250 | This is similar to @code{(add-hook @var{hook} @var{function} nil 'append)}, | ||
| 1251 | except that it applies to single-function hooks rather than normal hooks. | ||
| 1252 | |||
| 1253 | @item :override | ||
| 1254 | This completely replaces the old function with the new one. The old function | ||
| 1255 | can of course be recovered if you later call @code{remove-function}. | ||
| 1256 | |||
| 1257 | @item :around | ||
| 1258 | Call @var{function} instead of the old function, but provide the old function | ||
| 1259 | as an extra argument to @var{function}. This is the most flexible composition. | ||
| 1260 | For example, it lets you call the old function with different arguments, or | ||
| 1261 | within a let-binding, or you can sometimes delegate the work to the old | ||
| 1262 | function and sometimes override it completely. More specifically, the | ||
| 1263 | composition of the two functions behaves like: | ||
| 1264 | @example | ||
| 1265 | (lambda (&rest r) (apply @var{function} @var{oldfun} r)) | ||
| 1266 | @end example | ||
| 1267 | |||
| 1268 | @item :before-while | ||
| 1269 | Call @var{function} before the old function and don't call the old | ||
| 1270 | function if @var{function} returns @code{nil}. Both functions receive the | ||
| 1271 | same arguments, and the return value of the composition is the return value of | ||
| 1272 | the old function. More specifically, the composition of the two functions | ||
| 1273 | behaves like: | ||
| 1274 | @example | ||
| 1275 | (lambda (&rest r) (and (apply @var{function} r) (apply @var{oldfun} r))) | ||
| 1276 | @end example | ||
| 1277 | This is reminiscent of @code{(add-hook @var{hook} @var{function})}, when | ||
| 1278 | @var{hook} is run via @code{run-hook-with-args-until-failure}. | ||
| 1279 | |||
| 1280 | @item :before-until | ||
| 1281 | Call @var{function} before the old function and only call the old function if | ||
| 1282 | @var{function} returns @code{nil}. More specifically, the composition of the | ||
| 1283 | two functions behaves like: | ||
| 1284 | @example | ||
| 1285 | (lambda (&rest r) (or (apply @var{function} r) (apply @var{oldfun} r))) | ||
| 1286 | @end example | ||
| 1287 | This is reminiscent of @code{(add-hook @var{hook} @var{function})}, when | ||
| 1288 | @var{hook} is run via @code{run-hook-with-args-until-success}. | ||
| 1289 | |||
| 1290 | @item :after-while | ||
| 1291 | Call @var{function} after the old function and only if the old function | ||
| 1292 | returned non-@code{nil}. Both functions receive the same arguments, and the | ||
| 1293 | return value of the composition is the return value of @var{function}. | ||
| 1294 | More specifically, the composition of the two functions behaves like: | ||
| 1295 | @example | ||
| 1296 | (lambda (&rest r) (and (apply @var{oldfun} r) (apply @var{function} r))) | ||
| 1297 | @end example | ||
| 1298 | This is reminiscent of @code{(add-hook @var{hook} @var{function} nil 'append)}, | ||
| 1299 | when @var{hook} is run via @code{run-hook-with-args-until-failure}. | ||
| 1300 | |||
| 1301 | @item :after-until | ||
| 1302 | Call @var{function} after the old function and only if the old function | ||
| 1303 | returned @code{nil}. More specifically, the composition of the two functions | ||
| 1304 | behaves like: | ||
| 1305 | @example | ||
| 1306 | (lambda (&rest r) (or (apply @var{oldfun} r) (apply @var{function} r))) | ||
| 1307 | @end example | ||
| 1308 | This is reminiscent of @code{(add-hook @var{hook} @var{function} nil 'append)}, | ||
| 1309 | when @var{hook} is run via @code{run-hook-with-args-until-success}. | ||
| 1310 | |||
| 1311 | @item :filter-args | ||
| 1312 | Call @var{function} first and use the result (which should be a list) as the | ||
| 1313 | new arguments to pass to the old function. More specifically, the composition | ||
| 1314 | of the two functions behaves like: | ||
| 1315 | @example | ||
| 1316 | (lambda (&rest r) (apply @var{oldfun} (funcall @var{function} r))) | ||
| 1317 | @end example | ||
| 1318 | |||
| 1319 | @item :filter-return | ||
| 1320 | Call the old function first and pass the result to @var{function}. | ||
| 1321 | More specifically, the composition of the two functions behaves like: | ||
| 1322 | @example | ||
| 1323 | (lambda (&rest r) (funcall @var{function} (apply @var{oldfun} r))) | ||
| 1324 | @end example | ||
| 1325 | @end table | ||
| 1326 | 1236 | ||
| 1327 | When modifying a variable (whose name will usually end with @code{-function}), | 1237 | When modifying a variable (whose name will usually end with @code{-function}), |
| 1328 | you can choose whether @var{function} is used globally or only in the current | 1238 | you can choose whether @var{function} is used globally or only in the current |
| @@ -1343,11 +1253,22 @@ identify which function to remove. Typically used when @var{function} is an | |||
| 1343 | anonymous function. | 1253 | anonymous function. |
| 1344 | 1254 | ||
| 1345 | @item depth | 1255 | @item depth |
| 1346 | This specifies where to place the advice, in case several advices are present. | 1256 | This specifies how to order the advices, in case several advices are present. |
| 1347 | By default, the depth is 0. A depth of 100 indicates that this advice should | 1257 | By default, the depth is 0. A depth of 100 indicates that this advice should |
| 1348 | be kept as deep as possible, whereas a depth of -100 indicates that it | 1258 | be kept as deep as possible, whereas a depth of -100 indicates that it |
| 1349 | should stay as the outermost advice. When two advices specify the same depth, | 1259 | should stay as the outermost advice. When two advices specify the same depth, |
| 1350 | the most recently added advice will be outermost. | 1260 | the most recently added advice will be outermost. |
| 1261 | |||
| 1262 | For a @code{:before} advice, being outermost means that this advice will be run | ||
| 1263 | first, before any other advice, whereas being innermost means that it will run | ||
| 1264 | right before the original function, with no other advice run between itself and | ||
| 1265 | the original function. Similarly, for an @code{:after} advice innermost means | ||
| 1266 | that it will run right after the original function, with no other advice run in | ||
| 1267 | between, whereas outermost means that it will be run very last after all | ||
| 1268 | other advices. An innermost @code{:override} advice will only override the | ||
| 1269 | original function and other advices will apply to it, whereas an outermost | ||
| 1270 | @code{:override} advice will override not only the original function but all | ||
| 1271 | other advices applied to it as well. | ||
| 1351 | @end table | 1272 | @end table |
| 1352 | @end defmac | 1273 | @end defmac |
| 1353 | 1274 | ||
| @@ -1419,8 +1340,10 @@ In particular, Emacs's own source files should not put advice on | |||
| 1419 | functions in Emacs. (There are currently a few exceptions to this | 1340 | functions in Emacs. (There are currently a few exceptions to this |
| 1420 | convention, but we aim to correct them.) | 1341 | convention, but we aim to correct them.) |
| 1421 | 1342 | ||
| 1422 | Macros can also be advised, in much the same way as functions. | 1343 | Special forms (@pxref{Special Forms}) cannot be advised, however macros can |
| 1423 | However, special forms (@pxref{Special Forms}) cannot be advised. | 1344 | be advised, in much the same way as functions. Of course, this will not affect |
| 1345 | code that has already been macro-expanded, so you need to make sure the advice | ||
| 1346 | is installed before the macro is expanded. | ||
| 1424 | 1347 | ||
| 1425 | It is possible to advise a primitive (@pxref{What Is a Function}), | 1348 | It is possible to advise a primitive (@pxref{What Is a Function}), |
| 1426 | but one should typically @emph{not} do so, for two reasons. Firstly, | 1349 | but one should typically @emph{not} do so, for two reasons. Firstly, |
| @@ -1453,6 +1376,119 @@ Call @var{function} for every advice that was added to the named function | |||
| 1453 | and its properties. | 1376 | and its properties. |
| 1454 | @end defun | 1377 | @end defun |
| 1455 | 1378 | ||
| 1379 | @node Advice combinators | ||
| 1380 | @subsection Ways to compose advices | ||
| 1381 | |||
| 1382 | Here are the different possible values for the @var{where} argument of | ||
| 1383 | @code{add-function} and @code{advice-add}, specifying how the advice | ||
| 1384 | @var{function} and the original function should be composed. | ||
| 1385 | |||
| 1386 | @table @code | ||
| 1387 | @item :before | ||
| 1388 | Call @var{function} before the old function. Both functions receive the | ||
| 1389 | same arguments, and the return value of the composition is the return value of | ||
| 1390 | the old function. More specifically, the composition of the two functions | ||
| 1391 | behaves like: | ||
| 1392 | @example | ||
| 1393 | (lambda (&rest r) (apply @var{function} r) (apply @var{oldfun} r)) | ||
| 1394 | @end example | ||
| 1395 | @code{(add-function :before @var{funvar} @var{function})} is comparable for | ||
| 1396 | single-function hooks to @code{(add-hook '@var{hookvar} @var{function})} for | ||
| 1397 | normal hooks. | ||
| 1398 | |||
| 1399 | @item :after | ||
| 1400 | Call @var{function} after the old function. Both functions receive the | ||
| 1401 | same arguments, and the return value of the composition is the return value of | ||
| 1402 | the old function. More specifically, the composition of the two functions | ||
| 1403 | behaves like: | ||
| 1404 | @example | ||
| 1405 | (lambda (&rest r) (prog1 (apply @var{oldfun} r) (apply @var{function} r))) | ||
| 1406 | @end example | ||
| 1407 | @code{(add-function :after @var{funvar} @var{function})} is comparable for | ||
| 1408 | single-function hooks to @code{(add-hook '@var{hookvar} @var{function} | ||
| 1409 | 'append)} for normal hooks. | ||
| 1410 | |||
| 1411 | @item :override | ||
| 1412 | This completely replaces the old function with the new one. The old function | ||
| 1413 | can of course be recovered if you later call @code{remove-function}. | ||
| 1414 | |||
| 1415 | @item :around | ||
| 1416 | Call @var{function} instead of the old function, but provide the old function | ||
| 1417 | as an extra argument to @var{function}. This is the most flexible composition. | ||
| 1418 | For example, it lets you call the old function with different arguments, or | ||
| 1419 | many times, or within a let-binding, or you can sometimes delegate the work to | ||
| 1420 | the old function and sometimes override it completely. More specifically, the | ||
| 1421 | composition of the two functions behaves like: | ||
| 1422 | @example | ||
| 1423 | (lambda (&rest r) (apply @var{function} @var{oldfun} r)) | ||
| 1424 | @end example | ||
| 1425 | |||
| 1426 | @item :before-while | ||
| 1427 | Call @var{function} before the old function and don't call the old | ||
| 1428 | function if @var{function} returns @code{nil}. Both functions receive the | ||
| 1429 | same arguments, and the return value of the composition is the return value of | ||
| 1430 | the old function. More specifically, the composition of the two functions | ||
| 1431 | behaves like: | ||
| 1432 | @example | ||
| 1433 | (lambda (&rest r) (and (apply @var{function} r) (apply @var{oldfun} r))) | ||
| 1434 | @end example | ||
| 1435 | @code{(add-function :before-while @var{funvar} @var{function})} is comparable | ||
| 1436 | for single-function hooks to @code{(add-hook '@var{hookvar} @var{function})} | ||
| 1437 | when @var{hookvar} is run via @code{run-hook-with-args-until-failure}. | ||
| 1438 | |||
| 1439 | @item :before-until | ||
| 1440 | Call @var{function} before the old function and only call the old function if | ||
| 1441 | @var{function} returns @code{nil}. More specifically, the composition of the | ||
| 1442 | two functions behaves like: | ||
| 1443 | @example | ||
| 1444 | (lambda (&rest r) (or (apply @var{function} r) (apply @var{oldfun} r))) | ||
| 1445 | @end example | ||
| 1446 | @code{(add-function :before-until @var{funvar} @var{function})} is comparable | ||
| 1447 | for single-function hooks to @code{(add-hook '@var{hookvar} @var{function})} | ||
| 1448 | when @var{hookvar} is run via @code{run-hook-with-args-until-success}. | ||
| 1449 | |||
| 1450 | @item :after-while | ||
| 1451 | Call @var{function} after the old function and only if the old function | ||
| 1452 | returned non-@code{nil}. Both functions receive the same arguments, and the | ||
| 1453 | return value of the composition is the return value of @var{function}. | ||
| 1454 | More specifically, the composition of the two functions behaves like: | ||
| 1455 | @example | ||
| 1456 | (lambda (&rest r) (and (apply @var{oldfun} r) (apply @var{function} r))) | ||
| 1457 | @end example | ||
| 1458 | @code{(add-function :after-while @var{funvar} @var{function})} is comparable | ||
| 1459 | for single-function hooks to @code{(add-hook '@var{hookvar} @var{function} | ||
| 1460 | 'append)} when @var{hookvar} is run via | ||
| 1461 | @code{run-hook-with-args-until-failure}. | ||
| 1462 | |||
| 1463 | @item :after-until | ||
| 1464 | Call @var{function} after the old function and only if the old function | ||
| 1465 | returned @code{nil}. More specifically, the composition of the two functions | ||
| 1466 | behaves like: | ||
| 1467 | @example | ||
| 1468 | (lambda (&rest r) (or (apply @var{oldfun} r) (apply @var{function} r))) | ||
| 1469 | @end example | ||
| 1470 | @code{(add-function :after-until @var{funvar} @var{function})} is comparable | ||
| 1471 | for single-function hooks to @code{(add-hook '@var{hookvar} @var{function} | ||
| 1472 | 'append)} when @var{hookvar} is run via | ||
| 1473 | @code{run-hook-with-args-until-success}. | ||
| 1474 | |||
| 1475 | @item :filter-args | ||
| 1476 | Call @var{function} first and use the result (which should be a list) as the | ||
| 1477 | new arguments to pass to the old function. More specifically, the composition | ||
| 1478 | of the two functions behaves like: | ||
| 1479 | @example | ||
| 1480 | (lambda (&rest r) (apply @var{oldfun} (funcall @var{function} r))) | ||
| 1481 | @end example | ||
| 1482 | |||
| 1483 | @item :filter-return | ||
| 1484 | Call the old function first and pass the result to @var{function}. | ||
| 1485 | More specifically, the composition of the two functions behaves like: | ||
| 1486 | @example | ||
| 1487 | (lambda (&rest r) (funcall @var{function} (apply @var{oldfun} r))) | ||
| 1488 | @end example | ||
| 1489 | @end table | ||
| 1490 | |||
| 1491 | |||
| 1456 | @node Porting old advices | 1492 | @node Porting old advices |
| 1457 | @subsection Adapting code using the old defadvice | 1493 | @subsection Adapting code using the old defadvice |
| 1458 | 1494 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 786710f3689..fcd7cb3dd37 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-03-22 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * emacs-lisp/package.el (package-desc): Use the contents of the | ||
| 4 | quoted form, not its cdr. (Bug#16873) | ||
| 5 | |||
| 6 | 2014-03-22 Juanma Barranquero <lekktu@gmail.com> | ||
| 7 | |||
| 8 | * w32-common-fns.el (x-selection-owner-p): Add empty docstring for the | ||
| 9 | benefit of doc.c; change parameter profile to match the X function. | ||
| 10 | |||
| 1 | 2014-03-22 Leo Liu <sdl.web@gmail.com> | 11 | 2014-03-22 Leo Liu <sdl.web@gmail.com> |
| 2 | 12 | ||
| 3 | * help.el (temp-buffer-setup-hook): Remove help-mode-setup. | 13 | * help.el (temp-buffer-setup-hook): Remove help-mode-setup. |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index ae2c2862887..480fddbd320 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -334,7 +334,7 @@ contrast, `package-user-dir' contains packages for personal use." | |||
| 334 | (when value | 334 | (when value |
| 335 | (push (cons (car rest-plist) | 335 | (push (cons (car rest-plist) |
| 336 | (if (eq (car-safe value) 'quote) | 336 | (if (eq (car-safe value) 'quote) |
| 337 | (cdr value) | 337 | (cadr value) |
| 338 | value)) | 338 | value)) |
| 339 | alist)))) | 339 | alist)))) |
| 340 | (setq rest-plist (cddr rest-plist))) | 340 | (setq rest-plist (cddr rest-plist))) |
diff --git a/lisp/w32-common-fns.el b/lisp/w32-common-fns.el index 72946f9bb96..d149500c327 100644 --- a/lisp/w32-common-fns.el +++ b/lisp/w32-common-fns.el | |||
| @@ -84,9 +84,10 @@ ignored on MS-Windows and MS-DOS." | |||
| 84 | (get 'x-selections (or type 'PRIMARY))) | 84 | (get 'x-selections (or type 'PRIMARY))) |
| 85 | 85 | ||
| 86 | ;; x-selection-owner-p is used in simple.el | 86 | ;; x-selection-owner-p is used in simple.el |
| 87 | (defun x-selection-owner-p (&optional type) | 87 | (defun x-selection-owner-p (&optional selection _terminal) |
| 88 | (and (memq type '(nil PRIMARY SECONDARY)) | 88 | "" ; placeholder for doc.c |
| 89 | (get 'x-selections (or type 'PRIMARY)))) | 89 | (and (memq selection '(nil PRIMARY SECONDARY)) |
| 90 | (get 'x-selections (or selection 'PRIMARY)))) | ||
| 90 | 91 | ||
| 91 | ;; The "Windows" keys on newer keyboards bring up the Start menu | 92 | ;; The "Windows" keys on newer keyboards bring up the Start menu |
| 92 | ;; whether you want it or not - make Emacs ignore these keystrokes | 93 | ;; whether you want it or not - make Emacs ignore these keystrokes |
diff --git a/test/automated/data/package/archive-contents b/test/automated/data/package/archive-contents index a6df6b8086e..e2f92304f86 100644 --- a/test/automated/data/package/archive-contents +++ b/test/automated/data/package/archive-contents | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | (simple-single . | 2 | (simple-single . |
| 3 | [(1 3) | 3 | [(1 3) |
| 4 | nil "A single-file package with no dependencies" single | 4 | nil "A single-file package with no dependencies" single |
| 5 | ((:url . "http://doodles.au"))]) | 5 | ((:url . "http://doodles.au") |
| 6 | (:keywords quote ("frobnicate")))]) | ||
| 6 | (simple-depend . | 7 | (simple-depend . |
| 7 | [(1 0) | 8 | [(1 0) |
| 8 | ((simple-single (1 3))) "A single-file package with a dependency." single]) | 9 | ((simple-single (1 3))) "A single-file package with a dependency." single]) |
diff --git a/test/automated/package-test.el b/test/automated/package-test.el index 72422a8684b..6d0dcdab299 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el | |||
| @@ -326,6 +326,7 @@ Must called from within a `tar-mode' buffer." | |||
| 326 | (should (search-forward "Summary: A single-file package with no dependencies" | 326 | (should (search-forward "Summary: A single-file package with no dependencies" |
| 327 | nil t)) | 327 | nil t)) |
| 328 | (should (search-forward "Homepage: http://doodles.au" nil t)) | 328 | (should (search-forward "Homepage: http://doodles.au" nil t)) |
| 329 | (should (search-forward "Keywords: frobnicate")) | ||
| 329 | ;; No description, though. Because at this point we don't know | 330 | ;; No description, though. Because at this point we don't know |
| 330 | ;; what archive the package originated from, and we don't have | 331 | ;; what archive the package originated from, and we don't have |
| 331 | ;; its readme file saved. | 332 | ;; its readme file saved. |